1. TimesTen有两种访问模式:Direct模式和Client/Server模式,以下为来自Operations Guide 的描述Connecting using TimesTen ODBC drivers,TimesTen includes the following ODBC drivers: ■ TimesTen Data Manager driver: A TimesTen ODBC driver for use with direct connect applications. ■ TimesTen Client driver: A TimesTen Client OD... Read More
posted @ 2013-09-24 15:54 lingjip Views(2135) Comments(0) Diggs(0) Edit
前几天遇到类似的问题[http://bbs.chinaunix.net/thread-1589386-1-1.html]:在Makefile里面定义一个字符串在程序里面使用,CFLAGS += -DMY_PATH=/etc/mycfgCFLAGS += -DMY_PATH="/etc/mycfg"上面两种写法都不行。正确的写法如下:CFLAGS += -DMY_PATH=\"/etc/mycfg\" Read More
posted @ 2013-09-05 10:36 lingjip Views(4926) Comments(0) Diggs(0) Edit
1.CRect,CPoint,CSize的使用WTL提供了CString,CRect,CPoint和CSize,可能后来版本的ATL也提供了,WTL作者推荐使用ATL的实现,所以:#include // CString#include // CRect,CPoint,CSize注意,这两行必须放在#include 的上面,然后,这个放最后好了:#define _WTL_NO_WTYPES#define _WTL_NO_CSTRING#include Read More
posted @ 2013-08-29 17:02 lingjip Views(366) Comments(0) Diggs(0) Edit
在使用WTL的CComboBoxEx时,InsertItem之后,运行程序,ComboBox显不了问题,其原因如下:I guess you want to place combo box to dialog template.Your combo box will collaborate :-) under the next conditions:1. A "ComboBoxEx32" class must be initialized by callingthe InitCommonControlsEx function, specifying ICC_USEREX_CL Read More
posted @ 2013-08-23 21:30 lingjip Views(678) Comments(0) Diggs(0) Edit
vs2005提示 error C2664: “CWnd::MessageBoxW”: 不能将参数 1 从“const char [17]”转换为“LPCTSTR”。在用vs2005编写mfc程序的时候经常要MessageBox("提示信息")函数,在vc6.0是没有问题的,但是在vs2005却会有下面的提示:error C2664: “CWnd::MessageBoxW”: 不能将参数 1 从“const char [17]”转换为“LPCTSTR”这个错误提示的原因是VS2005默认使用的是UNICODE字符集,在参数转换时会出错解决方法很简单。方法一:MessageBo Read More
posted @ 2013-08-20 09:52 lingjip Views(21555) Comments(1) Diggs(0) Edit
目前有两种方式可用于解决:1. 微软官方的一个解决方案: http://support.microsoft.com/kb/320216/zh-cn 发现是嵌入清单的问题,于是对该工程以及所有依赖工程进行如下操作 右键->工程属性->配置属性-> 清单工具->输入和输出->嵌入清单,选择[否]。2.连接器LNK是通过调用cvtres.exe完成文件向coff格式的转换的,所以出现这种错误的原因就是cvtres.exe出现了问题。 在电脑里面搜索一下cvtres.exe,发现存在多个文件,使用最新的cvtres.exe替换老的文件即可,替换之前记得备份一下,如果不对, Read More
posted @ 2013-08-19 17:30 lingjip Views(293) Comments(0) Diggs(0) Edit
一. Win7 64位编译Python扩展解决”error: Unable to find vcvarsall.bat”问题 系统上安装有Visual Studio 2010以及相应的SDK,然后Python编译扩展命令python setup.py install但命令总是失败,出现error: Unable to find vcvarsall.bat。1. 打开64位Visual Studio 2010命令行编译模式,你可以依次从开始菜单 – Microsoft Visual Studio 2010 – Visual Studio Tools – Visual Studio x64 Win Read More
posted @ 2013-08-01 18:29 lingjip Views(1064) Comments(1) Diggs(0) Edit
#include <iostream>#include <algorithm>#include <deque>using namespace std;struct Node { int x,y; Node(int a = 0,int b = 0):x(a),y(b){} bool operator <(const Node& n) { if (x == n.x) return y > n.y ; return x > n.x ; } };typedef struct Node SNode;stru... Read More
posted @ 2013-04-12 18:05 lingjip Views(391) Comments(0) Diggs(0) Edit
gsoap 在发送时,乱码的处理。通过源码stdsoap2.c 的soap_string_in,soap_string_out实现了解,解决办法如下:1.编译选项定义宏HAVE_MBTOWC(编译gsoap库时);2.调用soap_set_mode,将soap消息的字符编码设置为SOAP_C_UTFSTRING;3.在soap消息填充时,将消息内容转化为UTF-8编码(可能需要iconv调用) Read More
posted @ 2012-12-05 11:05 lingjip Views(344) Comments(0) Diggs(0) Edit
根据网上代码http://blog.csdn.net/zchengdong/article/details/6934466 修改,具体打开的socket情况使用lsof -u username 查看,修改后的代码情况如下,可分别修改读取的s[0],s[1]查看读写情况。#include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <errno.h> #include <errno.h> #include Read More
posted @ 2012-03-14 14:34 lingjip Views(420) Comments(0) Diggs(0) Edit