Monthly Archives: February 2009

wxCommandEventHandler and Loki::PimplOf

For a dialog class T derived from wxDialog and also inherited Loki::PimplOf<T>::Owner, it is still possible to hide the implementation of wxCommandEventHandler, just inherit the Loki::ImplOf<T> from wxEvtHandler like the following: class T: public wxDialog, private Loki::PimplOf<T>::Owner { } template … Continue reading

Posted in GUI | Leave a comment

Network problem

Webbrowser often failed to access some sites this weekend, but for some sites it is quit fast – download speed is about 200MB/s. Access to google is fine, but Eclipse.org and sf.net mirros are terrible.

Posted in Computer and Internet | Leave a comment

Build boost 1.38 with python 3.0 and ICU via VC++ 2008

Start “Visual Studio 2008 Command Prompt”, go to boost source folder and run following command: D:\src\boost\boost_1_38_0>..\bjam.exe –toolset=msvc stage –build-type=complete After building the folder size is 6.53GB. Size of D:\src\boost\boost_1_38_0\bin.v2 is 3.25GB, can be deleted. boost.python is not compatible with Python30. … Continue reading

Posted in Open Source | Leave a comment

store string in boost::circular_buffer

#include <boost/circular_buffer.hpp> #include <string> #include <iostream> int _tmain(int argc, _TCHAR* argv[]) { // create a circular buffer of capacity 3 boost::circular_buffer<std::string> cb(3); // insert some elements into the circular buffer for (size_t i=0; i<cb.capacity()*2; i++)     { char buf[128]; sprintf_s(buf, … Continue reading

Posted in CPP | Leave a comment