分类: 程序员预览模式: 普通 | 列表

DBPROP_COMMANDTIMEOUT does not seem to work?

This is set as a property to a dbcommand,
程序代码 程序代码

propSet.AddProperty(DBPROP_COMMANDTIMEOUT, 30);

查看更多...

分类:程序员 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 191

[zt] Virtuality

A very insightful article about Virtuality in C++:

http://www.gotw.ca/publications/mill18.htm

Tags: virtual c++ desctructor

分类:程序员 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 164

typedef or class wrapper

I faced a question to ensure correct parameter type is passed in, although the type essentially is a WORD only:
1. typedef
程序代码 程序代码

typedef WORD ParamType

查看更多...

Tags: typedef class_wrapper c++ compiler

分类:程序员 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 131

va_start does not work with reference parameter

It is the first time I noticed this issue.

Basically the first parameter of a unknown number of parameters function call must have the first parameter passed as value.

See the full discussion at http://stackoverflow.com/questions/222195/are-there-gotchas-using-varargs-with-reference-parameters

Tags: va_start reference

分类:程序员 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 141

Compiler expression evaluation Interesting

程序代码 程序代码

    CString strTest2(_T("Hello")), strTest3;
    LPCTSTR szBuf = TRUE ? NULL : strTest2;
    LPCTSTR szBuf2 = TRUE ? NULL : strTest3;
    LPCWSTR szBuf3 = TRUE ? (LPCTSTR)NULL : strTest3;

查看更多...

分类:程序员 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 137

Building Boost.Locale

1. download and install cmake
2. download and uncompress icu 4.4 binary format
3. download and uncompress boost 1.33.1+.
3. download boost locale library source code and uncompress.
4. create build directory:

查看更多...

Tags: boost locale ICU build cmake

分类:程序员 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 165

Basic GNU Gettext how-to

1. Mark the strings using chosen keywoard (for example, '_')

2. Extract text template out of source code with specified keyword and domain name:
程序代码 程序代码

\gettext-0.17\bin\xgettext -k_ PnxErrors.h Error.cpp -ophoenix.po -dPhoenix

查看更多...

Tags: gettext how-to localization

分类:程序员 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 169