Monthly Archives: March 2008

_open_osfhandle failed to open STD_OUTPUT_HANDLE

_open_osfhandle always returns error when passing GetStdHandle(STD_OUTPUT_HANDLE) to it. However, STD_ERROR_HANDLE works fine. full code snippet: HANDLE output_handle = GetStdHandle(STD_OUTPUT_HANDLE);if (output_handle==INVALID_HANDLE_VALUE){    std::stringstream ss;    ss << "GetStdHandle return " << GetLastError();    OutputDebugString(ss.str().c_str());}else{    std::cout.sync_with_stdio(true);    int m_nCRTOut= _open_osfhandle( (intptr_t)output_handle, 0 );    if (m_nCRTOut==-1)    … Continue reading

Posted in GUI | Leave a comment

杨州2日游

在大明寺安排了2个小时,实际用了45分钟就出来购物了。个园安排了1个小时,在里面转了好几圈才把时间用完。第二天瘦西湖安排了2个小时,结果才看了一半,就要集合了。每天路上坐车5小时,累。花园国际大酒店的被子很粗糙,不舒服。

Posted in Entertainment | Leave a comment

DDJ: A cross-platform plugin framework for C/C++

Building Your Own Plugin Framework: Part 1, Part 2, Part 3, Part 4, Part 5

Posted in CPP | Leave a comment

sqlite automatic commit and manual commit

Number of records inserted: 2008 OS: Windows XP SP2 SQLite 3.5.7 Machine: Compaq nc6230 By: Onega Commit Batch Size Duration (milliseconds) Automatic commit 242766 128 5469 256 2875 512 1703 1024 828 2048 422   Resource on DDJ:The SQLite Database … Continue reading

Posted in Database | Leave a comment

TV online

Shared by a nice guy. mms://211.167.102.66/ch-10    Sports mms://211.167.102.66/ch-11    Discovery mms://211.167.102.66/ch-12    AZIO TV mms://211.167.102.66/ch-13    ET Today mms://211.167.102.66/ch-14    ESPN mms://211.167.102.66/ch-15    High Point Education mms://211.167.102.66/ch-16    N/A mms://211.167.102.66/ch-17    Star Sports mms://211.167.102.66/ch-18    ETTV mms://211.167.102.66/ch-19    National Geographic mms://211.167.102.66/ch-20    AXN

Posted in Entertainment | Leave a comment

python http via proxy

via urllib

Posted in Computers and Internet | Leave a comment

sqlite3 sample

There is a quick start in its official web site, but I think  another example(Embedding SQLite in a C program) is much better.

Posted in Database | Leave a comment