Archive for the 'Programming' Category


How to create a jabber chat bot based on AIML,the C# way.

I have created a jabber chat bot based on on the A.L.I.C.E(Artificial Linguistic Internet Computer Entity) and AIML(Artificial Intelligence Markup Language).which is named alice@35.cn,you can add alice@35.cn to your contact list and chat with her anytime:

September 1st, 2008 in Programming | 10 comments


How to compile TORCS with visual studio 2005(VC 8.0)

TORCS is an open source, highly portable multi platform car racing simulation. It is used as ordinary car racing game, as AI racing game and as research platform.
image

TORCS can be compiled smoothly with Visual C++ 6.0.but you’ll get lots of compilation errors when trying to compile it with Visual Studio 2005(VC 8).here is the steps to resolve this issue:

September 1st, 2008 in Programming | 2 comments


What I’m doing and what will be done

With months of development during off-duty time,I had created an web-based Microsoft SQL Database administration tool in C/C++,which codename is "Labrina".

image 

With Labrina , you will do through a browser almost everything you did before with MS Enterprise Manager.It is intended to handle the administration of SQL Server databases over the Web. It allows you to fully manage your databases even when you don’t want or cannot use MS Enterprise Manager.

August 12th, 2008 in Programming | 3 comments


QWebView:How to open link in an extern browser

I have got some problem with QWebView when I tried to open link in an extern browser(Such as FireFox). here is the solution I came up with:

void SomeClass::someFunction()
{
	QWebView *view = new QWebView(this);
	view->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
	connect( view->page(), SIGNAL(linkClicked(const QUrl &)),
		this, SLOT(newsOnLinkClicked(const QUrl &)));
	view->load(QUrl(url));
	view->show();
}

void SomeClass::newsOnLinkClicked(const QUrl & url)
{
	QDesktopServices::openUrl(url);
}

June 5th, 2008 in Programming | No comments yet


Compiler warning C4022 when building OpenSSL 0.9.8e On Windows

I got the following compiler error when building OpenSSL-0.9.8e in Windows environments with Visual studio 2005:

.\apps\enc.c(380) : error C2220: warning treated as error - no ‘object’ file generated
.\apps\enc.c(380) : warning C4022: ‘BIO_ctrl’ : pointer mismatch for actual parameter 4

August 25th, 2007 in Programming, Windows | 3 comments


I have created a MSN Chat bot: alice@35.cn

I Have created a MSN chat bot based on the A.L.I.C.E(Artificial Linguistic Internet Computer Entity) and AIML(Artificial Intelligence Markup Language).you can add alice@35.cn to your contact and  chat with her all day long on MSN messager:)

August 14th, 2007 in 35.com, Programming, Technology | 49 comments


how to sort CAtlArray using qsort

This is nothing new at all,here is the source code:

CAtlArray< CSomeClass*> m_myArray;
qsort(m_myArray.GetData(), m_myArray.GetCount(), sizeof(CSomeClass*),
  (int(*)(const void*, const void*))SortTheArray);

 

the Comparison function would look like the following:

August 12th, 2007 in Programming | 3 comments


100 Open Source Web Design Tools, Resources, and Template Repositories

The unique combination of the open source model with the universalism of web design remains one of the ideal applications of the open access philosophy. Here are 100 resources–including open source design software packages, CSS tools and generators, templates, and code sources–that can save you time and money while designing web sites.

July 23rd, 2007 in Programming | 2 comments


bugs on www.openid.org

I have found some terrible bugs on www.openid.org .

It’s funny that they have got such lousy bugs.maybe they are developing and debugging it on the server.it looks like that they are still far away from official launch.

June 26th, 2007 in Programming | 4 comments


How to detect whether or not user is running a full-screen program

Recently I was asked how to detect whether or not user is runing a full screen program,here is the code snippet: 

April 20th, 2007 in Programming, Windows | 7 comments


Choose a programming language

This is by far the best ever guide I have seen on how to choose a programming language. Something you will read once and remember the rest of your life.

December 1st, 2006 in Programming | 10 comments


Convert Ip Address To Geographic Location

网上有不少关于如何使用纯真IP数据库(QQWRY.dat),来查找IP所在的地理位置的文档和源代码,但基本都是java实现,很少有C的,而且大部分都使用了打开文件句柄,通过文件指针的多次跳转来实现单次查找,运行效率很低,尤其是在短时间内需要执行大量IP->地理位置的转换的场合,这种方式的运行性能基本是难以接受的。

October 12th, 2006 in Programming | 4 comments