Archive for the 'Programming' Category


Happy birthday,sweet little EQ

No words can express how much I love you from the day you were born until now,you have held a special place in my heart, one that is irreplaceable and invaluable.

35eq

Happy birthday, My sweet little EQ.

December 28th, 2009 in Programming | 2 comments


基于Wu-Manber算法的快速多关键词搜索

很多应用都需要高性能的多关键词搜索功能,网络”扫黄”开始后更是如此,如何在文本内容中快速地搜索出敏感关键字变得越来越重要。

Wu-Manber算法是一个不错的解决方案,尤其是针对包含有大量关键词的搜索。Wu-Manber算法的C语言实现非常丰富,为了方便如C#,VB.net等编程语言使用该算法,我用C/C++写了一个基于改进的Wu-Manber算法的多关键词搜索组件:wu-manber-com

Download wu-manber-com

使用方法

以vb.net/c#为例,使用前,先运行regsvr32 stringsearch.dll注册该组件,然后将stringsearch.dll添加到项目引用中。调用示例代码如下:

StringSearchLib.WuManber s = new StringSearchLib.WuManber();
s.AddPatterns("keyword1,keyword2,keyword3", ",", false);
int index = s.Search("... some text for searching...");
Console.WriteLine(index);

该控件不会搜寻所有存在的关键词,碰到第一个匹配的关键词,即返回该匹配的关键词在原文中的位置索引,没有找到则返回-1。

December 21st, 2009 in Programming | 3 comments


Compile with /MP flag on my system

The most interesting feature I like in VC 2008 is the parallel build capability.

The /MP option can reduce the total time to compile the source files on the command line. The /MP option causes the compiler to create one or more copies of itself, each in a separate process. Then these copies simultaneously compile the source files. Consequently, the total time to build the source files can be significantly reduced.

Continue Reading...

September 8th, 2009 in Programming | No comments yet


QT/VC2008:Project is rebuilt every time even though I didn’t make any modifications

I have encountered problem when attempting to compile VC projects created by QT 4.5.2,VC always rebuilds the whole project when I start to run or build the project, even though I didn’t make any modifications to the code.the project is always “out of date”.

Continue Reading...

September 8th, 2009 in Programming | 1 comment


LogMicroscope:boost performance for logging system by 43%

Recently,I have rewritten the logging engine for LogMicroscope,using circular-buffer in log writing threads,and WriteFileGather in file writing thread to gathers up the data from these discrete buffers in memory and transfers them "in place" as a single operation.

Continue Reading...

September 2nd, 2009 in Programming | No comments yet


Moved OpenSSL for windows to google code

Due to the bandwidth limitation and the lack of issue tracking system,I have moved OpenSSL for windows to google code: http://code.google.com/p/openssl-for-windows/

if you have any questions/issues,please submit an issue at http://code.google.com/p/openssl-for-windows/issues/list

July 24th, 2009 in Programming | 3 comments