Monthly Archives: January 2006

想吃甜品

今天中午很想吃甜的东西,家里的巧克力在深深地诱惑我,我走到离它不远的地方停住了,哎,忘了买一个秤回家,我好像胖了,运动太少,今天还是不吃了。把剩下的开心果消灭了。 对肉没有胃口,昨天吃了一块咸鱼。

Posted in Uncategorized | Leave a comment

novel

I spent 3 days reading the novel 亡天,我自己的神话, which is published at http://www.plsd.net/book_read/htm/bid_7242.htm

Posted in Uncategorized | Leave a comment

read formated data from cin

the following code snippet was created by Onega. built on cygwin.  g++ tmp_1.cpp -o a.exe #include <iostream> #include <cmath> using namespace std; double read_double(const char* prompt) {   double dret = 0;   do{     cout<<prompt<<endl;     cin>>dret; … Continue reading

Posted in Uncategorized | Leave a comment

cppunit unicode configuration build error

win32dynamiclibrarymanager.cpp(57) : error C2440: ‘initializing’ : cannot convert from ‘LPCTSTR’ to ‘std::basic_string<_Elem,_Traits,_Ax>’ My fix:#include <cppunit/Portability.h> #if defined(CPPUNIT_HAVE_WIN32_DLL_LOADER) #include <cppunit/plugin/DynamicLibraryManager.h> #define WIN32_LEAN_AND_MEAN #define NOGDI //#define NOUSER  //Onega: comment out it for comutil.h #define NOKERNEL #define NOSOUND #define NOMINMAX #include <windows.h> #include … Continue reading

Posted in Uncategorized | Leave a comment

config ATL service project to auto start

    bool auto_start_service()    {        SC_HANDLE schSCManager = NULL;        schSCManager = OpenSCManager(            NULL,            NULL,            SC_MANAGER_ALL_ACCESS);        if (schSCManager == NULL)        {            SC_TRACE(_T("Failed to open SCManager"));            return false;        … Continue reading

Posted in Uncategorized | Leave a comment

register service as autostart in ATL7.1 service project

add a method to CAtlServiceModuleT derived class    BOOL Install() throw()    {//install auto start service.        if (IsInstalled())            return TRUE;         // Get the executable file path        TCHAR szFilePath[MAX_PATH + _ATL_QUOTES_SPACE];        DWORD dwFLen = ::GetModuleFileName(NULL, szFilePath … Continue reading

Posted in Uncategorized | Leave a comment

auto link header for VC++

//The following header file is created by Onega //*********need to set this library name****************#define CPPUNIT_PROJ_NAME "cppunit_1_10_2" #if _MSC_VER == 1400  //v6.0 #define CPPUNIT_VC_NAME  "_VC80" #endif #if _MSC_VER == 1310 #define CPPUNIT_VC_NAME  "_VC71" #endif #if _MSC_VER == 1200  //v6.0 #define CPPUNIT_VC_NAME  … Continue reading

Posted in Uncategorized | Leave a comment

Windows System Programming, Third Edition

Author Johnson M. Hart I read the translated version, and the content is out of my expectation. It is just a basic introduction to windows programming.

Posted in Uncategorized | Leave a comment

领导辞职了

昨天被老板叫进去交待了这件事。

Posted in Uncategorized | Leave a comment

第50天

去医院拿了2盒补各种维生素之类的东西,196,不可报销。 ef胃口不好,不想吃油腻的东西,只想喝稀饭。 口里是苦的,买了大白兔奶糖也不顶用。 去那个医院很不方便,下车后要走15分钟。

Posted in Uncategorized | Leave a comment