本章介紹了MySQL可使用的API,從哪里獲得它們,以及如何使用它們。 詳細(xì)介紹C API,這是因?yàn)樗怯蒑ySQL團(tuán)隊(duì)開發(fā)的,而且它也是大多數(shù)其他API的基礎(chǔ)。 本章還介紹了libmysqld庫(嵌入式服務(wù)器),以及對應(yīng)用程序開發(fā)人員有用的一些程序。
posted @
2011-04-25 21:54 黃劍父 閱讀(292) |
評論 (0) |
編輯 收藏
mysql的中文參考手冊:
http://dev.mysql.com/doc/refman/5.1/zh/index.html
posted @
2011-04-25 19:54 黃劍父 閱讀(221) |
評論 (0) |
編輯 收藏
研究一下google pacman的代碼
insertCoin()投幣,開始初始化游戲
newGame(),初始化單人游戲。
g.newGame = function () {
g.playerCount = 1;//玩家數(shù)
g.createChrome();
g.createPlayfield();//創(chuàng)建地圖
g.createActors();//創(chuàng)建玩家
g.startGameplay()
};
g.keyPressed//鍵盤響應(yīng)函數(shù)
posted @
2011-04-17 08:37 黃劍父 閱讀(1719) |
評論 (0) |
編輯 收藏
http://boxcomputing.baidu.com/
posted @
2011-04-13 00:26 黃劍父 閱讀(1152) |
評論 (0) |
編輯 收藏
https://developer.mozilla.org/en/Canvas_tutorial
https://developer.mozilla.org/cn/Canvas_tutorial
http://www.cssass.com/blog
國內(nèi)的一個(gè)博客
http://www.benjoffe.com/es/
國外的一個(gè)個(gè)人站點(diǎn),有幾個(gè)demo并有源碼。
posted @
2011-03-17 16:04 黃劍父 閱讀(1215) |
評論 (0) |
編輯 收藏
最近在開設(shè)計(jì)模式方面的資料。
設(shè)計(jì)模式這些東西,要常看看,這樣會給自己在新項(xiàng)目設(shè)計(jì)的時(shí)候或者是老項(xiàng)目重構(gòu)的時(shí)候提供一些思路。
當(dāng)然任何設(shè)計(jì)模式,都是有一些基本的目標(biāo),比如易于擴(kuò)展,靈活,穩(wěn)定。為了達(dá)到這個(gè)目標(biāo),在設(shè)計(jì)軟件的時(shí)候,那么就應(yīng)該遵守一些基本的原則。
下面這幾個(gè)原則就是比較重要的。
一、單一職責(zé)原則
重點(diǎn):職責(zé)如何劃分。
二、里氏替換原則
重點(diǎn):
三、依賴倒置原則
重點(diǎn):
高層模塊不要依賴低層模塊,高層和低層模塊都要依賴抽象;
抽象不應(yīng)該依賴細(xì)節(jié);
細(xì)節(jié)應(yīng)該依賴抽象。
從語言層面說就是,面向接口編程。
模塊間的依賴通過抽象發(fā)生,實(shí)現(xiàn)類之間不發(fā)生直接的依賴關(guān)系,其依賴關(guān)系是通過接口或抽象類產(chǎn)生的;
接口或抽象類不依賴于實(shí)現(xiàn)類;
實(shí)現(xiàn)類依賴接口或抽象類。
實(shí)例:
這個(gè)舉實(shí)際編程中遇到的例子,以后補(bǔ)充。
四、接口隔離原則
五、迪米特法則
六、開閉原則
posted @
2010-11-24 11:15 黃劍父 閱讀(2288) |
評論 (0) |
編輯 收藏
關(guān)于線程的創(chuàng)建與結(jié)束,值得寫一篇小文章。
有這個(gè)想法,是由解決一個(gè)bug引起的。那個(gè)bug是因?yàn)樵诰€程退出的時(shí)候沒有釋放線程資源,導(dǎo)致線程對象句柄一直往上升,后面的結(jié)果可想而知了。
AfxBeginThread和AfxEndThread。
這邊文章以后補(bǔ)上來。
posted @
2010-11-24 10:37 黃劍父 閱讀(260) |
評論 (0) |
編輯 收藏
BM算法
http://www.javaeye.com/topic/352954,BM模式匹配算法-原理(圖解)這篇文章是我見過的最好的講解了。
同時(shí)還有一篇
http://www.javaeye.com/topic/353137,BM模式匹配算法-實(shí)現(xiàn)(C語言)。
WM算法
posted @
2010-01-22 14:33 黃劍父 閱讀(141) |
評論 (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 黃劍父 閱讀(278) |
評論 (0) |
編輯 收藏
指針與引用看上去完全不同,指針操作符(*和->),引用操作符 (.),但是它們似乎有相同的功能。指針與引用都是讓你可以間接引用其他對象。
指針與引用的不同點(diǎn):
第一:不存在指向空值的引用,指針可以指向空值。
第二:指針可以被重新賦值,指向另一個(gè)不同的對象,但是引用則總是指向在初始化時(shí)被指定的對象,以后不能改變。
什么情況下該使用指針或引用。總體來說,
posted @
2009-12-01 11:34 黃劍父 閱讀(94) |
評論 (0) |
編輯 收藏