自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(63)
  • 资源 (3)
  • 收藏
  • 关注

原创 sprintf trap

<br />when "%d" is used to format 64bit integer, it will introduce interesting behavior. <br />__int64  a = 1, b=2;<br />char buf[128];<br />sprintf(buf, "%d, %d.", a, b); 

2010-12-18 16:51:00 282

原创 和客户沟通

<br />有些客户不愿意给出书面意见,也许对自己的意见没有足够的信心,也许怕担责任,也许是其他原因,这种情况下,邮件也是一种书面材料,还可以和客户开会,发出会议备忘录。沟通的时候对方不主动输出信息,那也可以让他被动输出。只要有邮件发送出来,那就相当于客户意思表述,他不认可某些内容,也可以发出备忘录更新给相关人员。

2010-12-16 12:26:00 416

原创 收集一些中国象棋程序

一些中国象棋程序Java版中国象棋人机对战源代码,[email protected], QQ:554653408gmchess hoxchess

2010-12-16 00:46:00 932 1

原创 Java and HL7 V3 Messaging Standard

There are some activities related to Java implementation between 2002 and 2005.Some publications are:A Java API for HL7 Version 3 RIMJava SIG API Demo Release (including demo)Sample HMD files for javaSIGV3 Messaging Standard http://www.hl7.org/implement/st

2010-12-13 20:11:00 4388 1

原创 build breakpad

I have to install autoconf package. sudo apt-get install autoconfGet a copy of source code svn checkout http://google-breakpad.googlecode.com/svn/trunk/ google-breakpad-read-onlythen the build steps are same as building other projects./configuremake sudo m

2010-12-04 00:22:00 975

原创 Qt and environment variables passed to main

On ubuntu I can use the environment variables passed to main as the following, but it does not work on Windows since QT does not pass env in qtmain_win.cpp.int main(int argc, char *argv[], char* env[]){    //C:/Qt/4.6.3/src/winmain/qtmain_win.cpp does not

2010-11-29 18:29:00 593

原创 ubuntu

KPackageKit reported 29 blocked updates, but the following command fixed the issue:sudo apt-get update && sudo apt-get dist-upgradeThe above command is from this post - http://forum.kde.org/viewto

2010-11-26 14:24:00 327

原创 C++使用WMI的感想

<br />C++使用WMI比其他语言复杂的多,文档很少,而且还可能是错误的。曾经看到MSDN上有一篇介绍WMI访问远程机器信息的文章就有错误,少做了一个CoSetProxyBlanket的操作,就算把它的代码原封不动拷贝出来,也不工作。由此可知,一个掌握许多理论知识的工程师也是需要有相应的实践,很多人觉得自己懂多线程,tcp, database, 不需要对某个具体语言/操作系统熟悉就可以很快学起来,往往是忘记了在自己熟悉领域遇到难题的经历。一个精通C++的人肯定不能预知跨线程共享COM对象的复杂性。

2010-11-26 11:43:00 1292

原创 Build boost 1.45 with VC++ 2008 on Windows XP and gcc on Ubuntu

On Windows, add the following to G:/src/boost_1_45_0/tools/build/v2/user-config.jamusing qt : C://Qt//4.6.3 ;##########################################################using python    : 3.1                         # Version    : C://Python31//python.exe    

2010-11-22 17:17:00 705

原创 record start/stop time in batch file

<br /><br />When executing a time consuming task, I am always interested in knowing the time it takes. Here is a way.<br /> <br />set temp_time=%TIME%<br />pause<br />@echo start at %temp_time%<br />@echo stop at %TIME%

2010-11-22 10:59:00 443

原创 Use link file to install eclipse plugin

<br />User can put a link file in eclipse dropins folder, so that it is easy to share plugins between different copies of eclipse, like I am using CDT and WTP. Here is an example link file:<br />create a file /d4/ux/j2ee/eclipse/dropins/sqlexplorer.link  w

2010-11-20 20:00:00 620

原创 Derby embedded database

<br />Driver class name is org.apache.derby.jdbc.EmbeddedDriver.<br />Need to put derby.jar in class path, which can be found at glassfishv3/javadb/lib/derby.jar.<br />Database URL is jdbc:derby:/d4/workspace/jboss/getimg/helloDB;create=true

2010-11-20 17:52:00 532

原创 A simple QT application

log4cpp only provides VC++ 6.0 project files, so I have to convert those project files to VC++ 2008 and also make some changes in order to build them successfully. Here is the steps. unzip to D:/opensource/log4cpp-1.0Open D:/opensource/log4cpp-1.0/msvc6/ms

2010-11-18 22:59:00 380

原创 Build log4cpp with VC++ 2008

<br />log4cpp only provides VC++ 6.0 project files, so I have to convert those project files to VC++ 2008 and also make some changes in order to build them successfully. Here is the steps.<br />unzip to D:/opensource/log4cpp-1.0<br />Open D:/opensource/log

2010-11-17 23:59:00 752

原创 Win32_OperatingSystem.Win32Shutdown is not reliable

The same software running in Administrator mode on Windows XP on the same machine, some times it can shutdown successfully, some times it failed. It seems that if user connected to other computer with different credentials, the operation may fail.

2010-11-08 23:47:00 747

原创 FindNextFile can crash process

<br />Two threads are using FindFirstFile/FindNextFile independently. The first thread released hFindHandle twice, thus causes the second thread crash sometimes. 

2010-10-17 13:55:00 426

原创 Zip package support in C++

Native Zip package support is available in .NET(ZipPackage) andJava(ZipInputStream/ZipOutputStream). After some investigation, Idecided to choose the Java style interface which is more confortable

2009-04-15 19:44:00 630

原创 Use Ultraedit to extract variable declaration

if we have to define quite a number of constants, or global variables, it would be easier to use ultraedit to extract variable declaration from variable definitions.copy variable definitions to ult

2004-10-03 16:41:00 1023

原创 some collected macros for C++

#define ARRAY_SIZE(X) sizeof(X)/sizeof(X[0])#define WIDEN2(x) L ## x#define WIDEN(x) WIDEN2(x)#define __WFILE__ WIDEN(__FILE__)#define __WFUNCTION__ WIDEN(__FUNCTION__)#ifdef _UNICODE#de

2004-10-03 16:08:00 993

原创 简单的2维数组操作

简单的2维数组操作(90度,180/270度旋转,镜像,flip),希望有人提供更好/更快的方法。Use it at your own risk!//By Onega#include #include using namespace std;templatevoid array_rotateL90(const DT* psrc,int h,int w,DT* dest){ //psrc[h

2004-09-21 10:28:00 1164

原创 初学打印文字和位图

以前竟然没有做过打印的程序(为了省事,曾经使用word automation打印过)。突然要打印文字和图片,而且不能再使用word了,就花了一点时间理解map mode和打印,或许这些内容对您也有点用,原理很简单,能省一些您打字的功夫也不错:-)//Author: Onega#include #include LPCTSTR bmp_filename = "C://test//PrintD

2004-09-21 10:22:00 1310

原创 如何在window2000下调试isapi

先把isapi放在有可执行权限的目录下,在IE中访问这个dll,如果是下载而不是看到执行的结果,那是你没有设定这个目录可执行权限,把Execute Permissions设为Scripts and Executables就可以执行ISAPI了 ,例如设wwwroot的可执行属性:在administrative tools中打开Internet Information Services, 打开Def

2001-06-20 11:35:00 1569 1

原创 调试在ASP下运行的COM(Visual C++)

调试在ASP下运行的COM(Visual C++):工作环境:  win2000 , VC6.0 , IIS5.01.写一个调用com的 ASP2.在asp文件中加上使得asp不会被cache.3.假定把asp放在Default Web Site(如c:/Inetpub/wwwroot/)下,在IIS 中选择Default Web Site的属性,在Home Directory tab上,Appl

2001-04-22 00:25:00 1242 1

convert jpg/bmp to dicom image

Convert jpg/bitmap file to DICOM file using dicomlib and CxImage libraries within 80 lines of code. The converted dicom file can be displayed by ezDicom.exe.

2011-03-25

VC++ Use WMI example

一个VC++ 2010开发的小工具,可以生成process dump 文件,执行WMI查询,调用WMI 方法(StdRegProv.GetDWORDValue和 Win32_OperatingSystem.Reboot 和Win32Shutdown方法)。

2010-11-15

Windbg introduction

Windbg使用简介,包括如何分析dump文件,如何设置断点,查看内存,变量,调用堆栈和函数的参数

2010-11-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除