기본 콘텐츠로 건너뛰기

글

Jenkins 서비스가 시작 안되는 문제, java update 관련 하여 수정함.

Jenkins 서비스가 시작 하면 아래에 이벤트뷰어에 오류를 떨어뜨리고 졸료됨... jenkins는 java Runtime base tool이며 빌드자동화 도구이자 UI는 Web service 이용한 서비스를 시작할 수 없습니다. System.ComponentModel.Win32Exception (0x80004005): 지정된 파일을 찾을 수 없습니다    위치: System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)    위치: winsw.Util.ProcessHelper.StartProcessAndCallbackForExit(Process processToStart, String executable, String arguments, Dictionary`2 envVars, String workingDirectory, Nullable`1 priority, ProcessCompletionCallback callback)    위치: winsw.WrapperService.StartProcess(Process processToStart, String arguments, String executable)    위치: winsw.WrapperService.OnStart(String[] _)    위치: System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)   내가 해결한 방법 같은 폴더에 있는 jenkins.xml 파일을 열어서 아래 사항을 확인했다. 1.포트 번호 확인 2.java runtime environment 경로가 맞는지 확인한다 --> 이게 잘못되어 있어서 실행이 안됨. 해당 경로 수정 요약. java runtime update가 되면서 경로가 변경됨, jenkins...

std::list::remove_if(), std::list::sort()

link  http://hyunity3d.tistory.com/244?category=527936 코드 돌려보고 c++11 형태로 문법오류 수정해서 동작 처리 #include <iostream> #include <list> #include <functional>   // std::unary_function // 20 이상 30 미만이면 true template <typename T> class Is_Over20_Under30 : public std::unary_function<T, bool> // argument type - T, result type - bool { public: bool operator( ) (T& val) { return (val >= 20 && val < 30); } }; // 함수 객체 정의 template <typename T> struct COMPARE_ITEM { bool operator()(const T l, const T r) const { // 정렬 시에는 올림 차순으로된다. 내림 차순으로 하고 싶으면 < 에서 > 로 변경하면 된다. return l < r; } }; int test8() { std::list< int > list1; list1.push_back(10); list1.push_back(20); list1.push_back(25); list1.push_back(30); list1.push_back(34); std::cout << std::endl << "remove_if  테스트 1 - 사용자가 정의한 조건에 의해 삭제" << std::endl; // 20 이상 30 미만은 삭제한다. list1.remove_if(I...

[c++] template class (singletone)

link: http://hyunity3d.tistory.com/243?category=527936 template class 정의 관련해서 보다가 사용하신 소스가 예전 버전이라, c++11 (vs2013)에 소스에서 오류가 나는 곳을 수정했습니다. 자세한 내용은 링크를 참고하세요. #include <stdafx.h> #include <iostream> #include <string> template <typename T> class MySingleton { public: MySingleton() {} virtual ~MySingleton() {} // 이 멤버를 통해서만 생성이 가능합니다. static T* GetSingleton() { // 아직 생성이 되어 있지 않으면 생성한다. if (NULL == _Singleton) { _Singleton = new T; } return (_Singleton); } static void Release() { delete _Singleton; _Singleton = NULL; } private: static T* _Singleton; }; template <typename T> T* MySingleton<T>::_Singleton = NULL; class MyObject : public MySingleton<MyObject> { public: MyObject() : _nValue(10) {} void SetValue(int Value) { _nValue = Value; } int GetValue() { return _nValue; } private: int _nValue; }; void test2() { MyObject* MyObj1 = MyObject::GetSingleton(); std:...

warning C4512: 'XXX' : assignment operator could not be generated

link: http://blog.bfitz.us/?p=2292 c++11 코드를 이용하여 WarningLevel 4로 컴파일 중에 Warning C4512 가 갑자기 발생해서 곤란했었슴. 대락젹인 이유는 멤버중 const 특징을 가진 경우에 발생하는데, 일반적으로 3가지의 해결책이 있다고 함. 1. const 타입 제거 2. 할당 연산자 관련 정의 추가 3. 단순 경고 다른 것 검토하다가 2번째 방법을 사용해서 수정함. 아래는 c++11 에서 동작하는 코드. CBaseClass& operator=(const CBaseClass&) = delete; // decleation only - warning C4512: 'XXX' : assignment operator could not be generated

[Windows 환경] github 에서 googletest 내려받고 빌드하기

Link: https://github.com/google/googletest https://github.com/google/googletest/blob/master/googletest/docs/Primer.md ** 빌드없이 그냥 윈도우용 바이너리만 가져다 쓸꺼면 아래 주소 참고하여 다운로드 https://github.com/iat-cener/tonatiuh/wiki/Installing-Google-Test-For-Windows 0. google test 를 검토하고 있는 이유 - c++ unit test에서 사용성이 검증됨 - 플랫폼 중립적, 다양한 운영체제(Windows, Mac, Linux 등) 다양한 컴파일러(msvc, gcc,  지원(한번만 익히면 플랫폼과 사용없이 사용가능) - 다양한 테스트 셋을 지원 : 테스트 실행하여 오류시 중지와 오류 결과 표시 등 다양한 옵션이 존제 - 다양한 오픈소스 프로젝트에서 사용중, Chrom, LLVM 등 1. 다운로드 git client git client 가 없는 경우에 https://git-scm.com/downloads 로 가서 해당 운영 체제에 맞는 클라이언트를 다운로드 함 난 Windows용으로 SourceTree를 사용함... 사실 자주 하지는 않음. 간단한 기능만 주로 사용하기에 GUI 에서 버턴들만 약간 습득하면 충분히 설정가능 2. 경로 획득하기 google test 다운로드 경로 (github.com) 메뉴 말고 화면 위쪽 부분에 "Clone or Download"를 선택하면 git으로 다운받을 수 있는 리모드 경로를 획득 3. 위 2번에서 얻은 다운로드 경로를 이용해서 clone으로 git 다운로드 각자 알아서 수행 4. google test 빌드하기 다운로드 받은 google test 의 경로에 googletest/msvc/ 폴더로 이동해서 VisualStudio로 해당 Debug/Release Win32/Win64용 구분...

[tip] c++ std::wostringstream, std::ostringstream gabage char

// release build is ok, only debug build std::wostringstream stLog; stLog << L"test"; // sometime gabage char in debugging view or string. // add to 'std::ends' stLog << L"test" << std::ends; // caution: solution but write null char in file. // convet to 'std::wstring' std::wstring strValue = stLog.str(); // solution... but, Debugger string --;;;; // check below setlocale(LC_ALL, "");

PostgreSQL 을 맥에서 설치하는 2가지 방법.

homebrew를 이용해서 설치를 했는데, 항상 웹서비스를 할 것이 아니라서, 이렇게 할 필요가 있나 생각했는데, PostgreSQL에 PostgreSQL.app 앱이 별도로 있어서 이건 왜 있나 했더니, 나처럼 필요한 경우에만 동작하고 필요없으면 끄고자 하는 경우에 쓰면 좋을 것 같다. 우선은 Postgresql.app 을 써서 사용해 보고 나중에 HomeBrew로 다시 설치해서 데몬으로 동작하고자 한다. 아래는 참고 링크 링크: http://jonnung.blogspot.kr/2014/12/osx-postgresql-install.html https://rorlab.gitbooks.io/railsguidebook/content/appendices/postgresql_install.html OS X 에서 Postgresql 설치하는 두가지 방법