随笔 - 60  文章 - 5  trackbacks - 0
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿(2)

随笔分类(42)

随笔档案(60)

文章档案(2)

我收藏的博客

搜索

  •  

最新评论

阅读排行榜

评论排行榜

本章介绍了MySQL可使用的API,从哪里获得它们,以及如何使用它们。 详细介绍C API,这是因为它是由MySQL团队开发的,而且它也是大多数其他API的基础。 本章还介绍了libmysqld库(嵌入式服务器),以及对应用程序开发人员有用的一些程序。

posted @ 2011-04-25 21:54 黄剑父 阅读(259) | 评论 (0)编辑 收藏
mysql的中文参考手册:http://dev.mysql.com/doc/refman/5.1/zh/index.html
posted @ 2011-04-25 19:54 黄剑父 阅读(189) | 评论 (0)编辑 收藏
研究一下google pacman的代码
https://github.com/macek/google_pacman
insertCoin()投币,开始初始化游戏
newGame(),初始化单人游戏。
  g.newGame = function () {
    g.playerCount = 1;//玩家数
    g.createChrome();
    g.createPlayfield();//创建地图
    g.createActors();//创建玩家
    g.startGameplay()
  };

g.keyPressed//键盘响应函数
posted @ 2011-04-17 08:37 黄剑父 阅读(1679) | 评论 (0)编辑 收藏
http://boxcomputing.baidu.com/
posted @ 2011-04-13 00:26 黄剑父 阅读(1129) | 评论 (0)编辑 收藏
https://developer.mozilla.org/en/Canvas_tutorial
https://developer.mozilla.org/cn/Canvas_tutorial
http://www.cssass.com/blog
国内的一个博客
http://www.benjoffe.com/es/
国外的一个个人站点,有几个demo并有源码。
posted @ 2011-03-17 16:04 黄剑父 阅读(1187) | 评论 (0)编辑 收藏
最近在开设计模式方面的资料。
设计模式这些东西,要常看看,这样会给自己在新项目设计的时候或者是老项目重构的时候提供一些思路。

当然任何设计模式,都是有一些基本的目标,比如易于扩展,灵活,稳定。为了达到这个目标,在设计软件的时候,那么就应该遵守一些基本的原则。
下面这几个原则就是比较重要的。
一、单一职责原则
重点:职责如何划分。

二、里氏替换原则
重点:

三、依赖倒置原则
重点:
高层模块不要依赖低层模块,高层和低层模块都要依赖抽象;
抽象不应该依赖细节;
细节应该依赖抽象。

从语言层面说就是,面向接口编程。
模块间的依赖通过抽象发生,实现类之间不发生直接的依赖关系,其依赖关系是通过接口或抽象类产生的;
接口或抽象类不依赖于实现类;
实现类依赖接口或抽象类。

实例:
这个举实际编程中遇到的例子,以后补充。

四、接口隔离原则

五、迪米特法则

六、开闭原则
posted @ 2010-11-24 11:15 黄剑父 阅读(2253) | 评论 (0)编辑 收藏
关于线程的创建与结束,值得写一篇小文章。
有这个想法,是由解决一个bug引起的。那个bug是因为在线程退出的时候没有释放线程资源,导致线程对象句柄一直往上升,后面的结果可想而知了。
AfxBeginThread和AfxEndThread。

这边文章以后补上来。
posted @ 2010-11-24 10:37 黄剑父 阅读(222) | 评论 (0)编辑 收藏
BM算法
http://www.javaeye.com/topic/352954,BM模式匹配算法-原理(图解)这篇文章是我见过的最好的讲解了。
同时还有一篇http://www.javaeye.com/topic/353137,BM模式匹配算法-实现(C语言)。

WM算法
posted @ 2010-01-22 14:33 黄剑父 阅读(111) | 评论 (0)编辑 收藏

source:http://msdn.microsoft.com/en-us/library/ms524352.aspx
For an ISAPI extension to be used by IIS, it must provide a standard interface. To provide a standard interface, each ISAPI extension DLL must implement and export two primary functions, GetExtensionVersion and HttpExtensionProc. A third function, TerminateExtension, is optional and is commonly used by extensions to perform cleanup operations.

Initialization Using GetExtensionVersion
Initialization is handled by the entry-point function GetExtensionVersion. This function's role is to perform all initialization, including the creation of worker threads, synchronization objects, and database connections, and to establish the version of ISAPI that was used to build the DLL.

Adding Functionality Using HttpExtensionProc

In general, an extension's functionality is exposed through the HttpExtensionProc entry-point function. This function receives a pointer to an EXTENSION_CONTROL_BLOCK structure, which contains data used for the required processing and is also used by the extension to communicate with IIS.
When HttpExtensionProc in employed, it should first send a response header to the client. The header provides the client with information, such as the content type that is returned. After the header is sent, any other processing can be performed through the various callback functions provided in the EXTENSION_CONTROL_BLOCK.

Termination Using TerminateExtension

When an extension is no longer needed, IIS removes it from memory. If the extension provides the TerminateExtension function, IIS calls it before removing the extension. Use of TerminateExtension is recommended to close down any threads that an extension initialized during processing.

After IIS finishes processing a request for an ISAPI extension, the connection can either be closed or kept open. A request can specify that the connection remain open by specifying the Connection: Keep-Alive header. If an ISAPI extension is designed to support Keep-Alive requests, this should be indicated to the client by calling the HSE_REQ_SEND_RESPONSE_HEADER server support function. The specified response header should contain Connection: Keep-Alive.

posted @ 2010-01-12 09:15 黄剑父 阅读(244) | 评论 (0)编辑 收藏
指针与引用看上去完全不同,指针操作符(*和->),引用操作符 (.),但是它们似乎有相同的功能。指针与引用都是让你可以间接引用其他对象。
指针与引用的不同点:
第一:不存在指向空值的引用,指针可以指向空值。
第二:指针可以被重新赋值,指向另一个不同的对象,但是引用则总是指向在初始化时被指定的对象,以后不能改变。
什么情况下该使用指针或引用。总体来说,
posted @ 2009-12-01 11:34 黄剑父 阅读(76) | 评论 (0)编辑 收藏
仅列出标题
共6页: 1 2 3 4 5 6