"R을 이용한 데이터 처리 & 분석 실무 - 서민구 지음" 정리 자료 #1
- https://thebook.io/006723/
- 첫번째 : goo.gl/FJjOlq
- 두번째 : goo.gl/Wdb90g
- 세번째 : goo.gl/80VGcn
- 네번째 : goo.gl/lblUsR
"R을 이용한 데이터 처리 & 분석 실무 - 서민구 지음" 정리 자료 #1
- https://thebook.io/006723/
- 첫번째 : goo.gl/FJjOlq
- 두번째 : goo.gl/Wdb90g
- 세번째 : goo.gl/80VGcn
- 네번째 : goo.gl/lblUsR
"R을 이용한 데이터 처리 & 분석 실무 - 서민구 지음" 정리 자료 #2
- https://thebook.io/006723/
- 첫번째 : goo.gl/FJjOlq
- 두번째 : goo.gl/Wdb90g
- 세번째 : goo.gl/80VGcn
- 네번째 : goo.gl/lblUsR
"R을 이용한 데이터 처리 & 분석 실무 - 서민구 지음" 정리 자료 #3
- https://thebook.io/006723/
- 첫번째 : goo.gl/FJjOlq
- 두번째 : goo.gl/Wdb90g
- 세번째 : goo.gl/80VGcn
- 네번째 : goo.gl/lblUsR
"R을 이용한 데이터 처리 & 분석 실무 - 서민구 지음" 정리 자료 #4
- https://thebook.io/006723/
- 첫번째 : goo.gl/FJjOlq
- 두번째 : goo.gl/Wdb90g
- 세번째 : goo.gl/80VGcn
- 네번째 : goo.gl/lblUsR
Aprovat inicialment el Pla Territorial Metropolità de Barcelona i en estudi el nou Pla Director d'Infraestructures pel 2009-2018 resulta molt oportú escoltar l'opinió del responsable de Mobilitat del Govern de Catalunya
"R을 이용한 데이터 처리 & 분석 실무 - 서민구 지음" 정리 자료 #2
- https://thebook.io/006723/
- 첫번째 : goo.gl/FJjOlq
- 두번째 : goo.gl/Wdb90g
- 세번째 : goo.gl/80VGcn
- 네번째 : goo.gl/lblUsR
"R을 이용한 데이터 처리 & 분석 실무 - 서민구 지음" 정리 자료 #3
- https://thebook.io/006723/
- 첫번째 : goo.gl/FJjOlq
- 두번째 : goo.gl/Wdb90g
- 세번째 : goo.gl/80VGcn
- 네번째 : goo.gl/lblUsR
"R을 이용한 데이터 처리 & 분석 실무 - 서민구 지음" 정리 자료 #4
- https://thebook.io/006723/
- 첫번째 : goo.gl/FJjOlq
- 두번째 : goo.gl/Wdb90g
- 세번째 : goo.gl/80VGcn
- 네번째 : goo.gl/lblUsR
Aprovat inicialment el Pla Territorial Metropolità de Barcelona i en estudi el nou Pla Director d'Infraestructures pel 2009-2018 resulta molt oportú escoltar l'opinió del responsable de Mobilitat del Govern de Catalunya
boost라이브러리 중에서 가장 많이 사용하는 기능인 BOOST_FOREACH()와 shared_ptr의 내부 구조를 분석합니다. 그리고 boost의 내부 구현에 사용된 이 기능을 프로그래밍에 응용하는 방법을 제시합니다.
* BOOST_FOREACH 구조 분석 및 응용
* shared_ptr 구조 분석 및 응용
크고 아름다운 Java 기반의 레거시 시스템. 하지만 매일 같이 반복되는 Java 코드를 찍어내기에 지쳤다면? 레거시 시스템에 Django를 들이밀어 한DB 두살림을 구축해보자. 아 그거 inspectdb 하나만 쓰면 되는 거 아닌가? 크고 작은 삽질들을 모아모아 공유합니다.
8. BOOST_PP 를 이용한 해결
• 전처리기 기본
• 매크로
– object-like macro
• #define 식별자 치환 - 목록
– function-like macro
• #define 식별자 (a0,a1,…,an-1) 치환 - 목록
• 매크로 인수
– , ( )
9. • 매크로 인수
– FOO( std::pair<int,long> ) // 인수 2 개
– FOO({int x=1,y=2;return x+y;}) // 인수 2 개
– FOO( (std::pair<int,long>) ) // 인수 1 개
– FOO(({int x=1,y=2;return x+y;})) // 인수 1 개
9
, 를 전달할 때는 BOOST_PP_COMMA 를
사용한다 .
28. 28
#define POST_STATE_MAX_ARG 2
class KSystemStateEvent
{
public:
template<typename T>
void _Push( const char* pszInEvent_, T inValue_ )
{
std::cout << pszInEvent_ << ":" << inValue_ << std::endl;
}//_Push()
#define _POST_STATE_EVENT_TEMPLATE(z, n, unused)
template<BOOST_PP_ENUM_PARAMS(n, typename T)>
void PostStateEvent( const char* szInEvent_,
BOOST_PP_ENUM_PARAMS( n, T ) );
BOOST_PP_REPEAT_FROM_TO( 1,
BOOST_PP_ADD(POST_STATE_MAX_ARG,1),
_POST_STATE_EVENT_TEMPLATE, ~ )
#undef _POST_STATE_EVENT_TEMPLATE
};//class KSystemStateEvent
선언과 body 를 별도로 구현 .
먼전 선언 부분을 간단하게 구
현한다 .
29. 29
#ifndef BOOST_PP_IS_ITERATING
1) 반복을 호출하는 부분 작성
#else // #ifndef BOOST_PP_IS_ITERATING
2) 되풀이 되는 패턴을 제공하는 부분 작성
#endif // #ifndef BOOST_PP_IS_ITERATING
KSystemState.hpp 파일 작성
30. 30
#ifndef _KSYSTEMSTATE_INL
#define _KSYSTEMSTATE_INL
#include <boost/preprocessor/repetition.hpp>
#include <boost/preprocessor/arithmetic/sub.hpp>
#include <boost/preprocessor/punctuation/comma_if.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#define _POST_ARG(z, n, unused) BOOST_PP_CAT(T,n) BOOST_PP_CAT(In,n)
#define _POST_PUSH(z, n, unused) _Push( pszInEvent, BOOST_PP_CAT(In,n) );
// generate specializations
#define BOOST_PP_ITERATION_LIMITS (1, POST_STATE_MAX_ARG)
#define BOOST_PP_FILENAME_1 "KSystemState.hpp" // this file
#include BOOST_PP_ITERATE()
#undef BOOST_PP_FILENAME_1
#undef BOOST_PP_ITERATION_LIMITS
#undef _POST_PUSH
#undef _POST_ARG
#endif // #ifndef _KSYSTEMSTATE_INL
1) 반복을 호출하는
부분
각각의 n 에 대해 자기자신
KSystemState.hpp 를
include 한다 .
31. 31
#define n BOOST_PP_ITERATION()
template<BOOST_PP_ENUM_PARAMS(n, typename T)>
void KSystemStateEvent::PostStateEvent( const char* pszInEvent
, BOOST_PP_ENUM( n, _POST_ARG, ~) )
{
BOOST_PP_REPEAT( n, _POST_PUSH, ~ )
}
#undef n
2) 되풀이 되는 패턴을 제공하는
부분
각각의 n 에 대해 (n 이 1, 2 일 때 ) 확장된다 .
32. 32
…
#define POST_STATE_MAX_ARG 4
class KSystemStateEvent
{
…
};//class KSystemStateEvent
#include "KSystemState.hpp"
KSystemStateEvent g_systemState;
void main()
{
g_systemState.PostStateEvent( "Input", 0 );
g_systemState.PostStateEvent( "Output", 1, "dummy", 1.2f, 0xff );
//Input:0
//Output:1
//Output:dummy
//Output:1.2
//Output:255
// 계속하려면아무키나누르십시오 . . .
}//main()
이제 자유롭게 아규먼트의 개
수만 정의하면 됩니다 ^^;