锘??xml version="1.0" encoding="utf-8" standalone="yes"?>男女久久久国产一区二区三区,久久综合九色综合网站,伊人久久综合成人网http://www.shnenglu.com/jaxe/archive/2014/12/10/VPNSwitcher.html嫻╂瘺嫻╂瘺Wed, 10 Dec 2014 04:34:00 GMThttp://www.shnenglu.com/jaxe/archive/2014/12/10/VPNSwitcher.htmlhttp://www.shnenglu.com/jaxe/comments/209143.htmlhttp://www.shnenglu.com/jaxe/archive/2014/12/10/VPNSwitcher.html#Feedback0http://www.shnenglu.com/jaxe/comments/commentRss/209143.htmlhttp://www.shnenglu.com/jaxe/services/trackbacks/209143.htmlStool - Easily switch VPN server for  Mac 鍙戝竷

杞歡涓婚〉:www.oldjiang.com

涓昏鍔熻兘:
1.鏂逛究綆$悊澶ч噺VPN鏈嶅姟鍣ㄥ拰璐︽埛
2.鎵歸噺媯嫻媀PN鏈嶅姟鍣ㄩ熷害
3.鏂逛究鐨勫垏鎹PN榪炴帴,騫惰嚜鍔ㄧ洃嫻媀PN榪炴帴鐘舵?
4.鏀寔L2TP鍜孭PTP.
瀹屽叏鍏嶈垂,嬈㈣繋澶у浣跨敤.
涓嬩竴姝?璁″垝鍔犲叆鐘舵佹爮鏀寔.

鐗堟湰 1.0
涓嬭澆鍦板潃: Download

鎴浘:









嫻╂瘺 2014-12-10 12:34 鍙戣〃璇勮
]]>
Lua鐨剋eak table鍜孶serdatahttp://www.shnenglu.com/jaxe/archive/2011/08/11/153054.html嫻╂瘺嫻╂瘺Thu, 11 Aug 2011 06:33:00 GMThttp://www.shnenglu.com/jaxe/archive/2011/08/11/153054.htmlhttp://www.shnenglu.com/jaxe/comments/153054.htmlhttp://www.shnenglu.com/jaxe/archive/2011/08/11/153054.html#Feedback0http://www.shnenglu.com/jaxe/comments/commentRss/153054.htmlhttp://www.shnenglu.com/jaxe/services/trackbacks/153054.html
lua 鎵嬪唽鍘熸枃鏄繖鏍瘋В閲婄殑:
A weak table is a table whose elements are weak references. A weak reference is ignored by the garbage collector. In other words, if the only references to an object are weak references, then the garbage collector will collect this object.
A weak table can have weak keys, weak values, or both. A table with weak keys allows the collection of its keys, but prevents the collection of its values. A table with both weak keys and weak values allows the collection of both keys and values. In any case, if either the key or the value is collected, the whole pair is removed from the table. The weakness of a table is controlled by the __mode field of its metatable. If the __mode field is a string containing the character 'k', the keys in the table are weak. If __mode contains 'v', the values in the table are weak.
After you use a table as a metatable, you should not change the value of its __mode field. Otherwise, the weak behavior of the tables controlled by this metatable is undefined.

鍦╨ua涓?鍍弔able,userdata,function榪欎簺綾誨瀷鐨勫奸兘鏄紩鐢ㄤ紶閫?閫氳繃寮曠敤璁℃暟鏉ュ垽鏂槸鍚︽敹鎺夊璞?鑰屽急寮曠敤(weak reference)浼?xì)琚瀮鍦惧洖鏀跺櫒蹇界?weak table灝辨槸瀹冪殑鍏冪礌鏄急寮曠敤鐨?涓涓厓绱?閿煎)鍙兘閿槸寮卞紩鐢?涔熷彲鑳藉兼槸寮卞紩鐢ㄧ殑,涔熷彲鑳介兘鏄急寮曠敤, 榪欎釜鐗規(guī)ф槸閫氳繃寮辮〃鐨刴etatable鐨刜_mode鐨勫兼潵璁劇疆鐨?鐗瑰埆鏈夋剰鎬濈殑鏄?褰撳急琛ㄤ腑涓涓敭鍊煎,瀹冪殑閿垨鍊煎叧鑱?寮曠敤/鎸囧悜)鐨勯偅涓璞¤鍨冨溇鍥炴敹鍣ㄥ洖鏀剁殑鏃跺?榪欎釜閿煎浼?xì)浠庡嫁p〃涓鑷姩鍒犻櫎鎺?榪欐槸涓緢閲嶈鐨勭壒鐐?

閭d箞寮辮〃鍒板簳鏈変粈涔堢敤鍛? 鍦╨ua鐨剋iki涓湁涓綃囦嬌鐢╱serdata鐨勪緥瀛?,鍏朵腑灝卞緢宸у鐨勭敤鍒頒簡寮辮〃,鍘熸枃鍦板潃 http://lua-users.org/wiki/CppBindingWithLunar
榪欑瘒鏂囩珷浠嬬粛浜嗗浣曢氳繃userdata緇戝畾c++瀵硅薄鍒拌剼鏈腑
fulluserdata鑳藉璁劇疆metatable,涔熷氨鑳芥ā鎷熷嚭瀵硅薄鐨勬晥鏋滃嚭鏉?瀵逛竴涓狢++鐨勭被鐨勫璞″疄渚嬫潵璇?push鍒拌剼鏈腑,涓鑸槸鍒涘緩浜嗕竴涓猽serdata,鏂囩珷涓敤寮辮〃閬垮厤浜嗗悓涓涓璞″疄渚?鎸囬拡) push鍒拌剼鏈腑,澶氭鍒涘緩userdata鐨勯棶棰?
鎹㈠彞璇濇潵璇?濡傛灉C++瀵硅薄鐨勭敓瀛樺懆鏈熸槸闈爈ua鐨勫瀮鍦懼洖鏀舵潵鎺у埗鐨勮瘽(userdata琚洖鏀舵椂,璋冪敤鍏冭〃鐨刜_gc鏂規(guī)硶,__gc鏂規(guī)硶涓瀽鏋刢++瀵硅薄),涓涓狢++瀵硅薄鍙兘鏈変竴涓敮涓鐨剈serdata. 鍦╱serdata鐨刴etatable涓垱寤轟竴涓兼槸寮卞紩鐢ㄧ殑寮辮〃,鐢–++瀵硅薄鎸囬拡鍋氶敭,姣忔push c++瀵硅薄鐨勬椂鍊?灝卞幓鐢ㄦ寚閽堝兼煡寮辮〃,濡傛灉鏈?灝眕ush閭d釜userdata,娌℃湁灝卞垱寤?  鍚屾椂,褰搖serdata鏄寮卞紩鐢ㄧ殑,褰撹鍨冨溇鍥炴敹鎺夌殑鏃跺?寮辮〃涓畠鎵鍦ㄧ殑閿煎鑷姩琚攢姣佷簡. 





嫻╂瘺 2011-08-11 14:33 鍙戣〃璇勮
]]>
涓涓埄鐢ˋOI璁$畻鍋氱殑 NPC璺熼殢鐨?D鏈嶅姟鍣―EMOhttp://www.shnenglu.com/jaxe/archive/2011/08/11/153037.html嫻╂瘺嫻╂瘺Thu, 11 Aug 2011 03:22:00 GMThttp://www.shnenglu.com/jaxe/archive/2011/08/11/153037.htmlhttp://www.shnenglu.com/jaxe/comments/153037.htmlhttp://www.shnenglu.com/jaxe/archive/2011/08/11/153037.html#Feedback0http://www.shnenglu.com/jaxe/comments/commentRss/153037.htmlhttp://www.shnenglu.com/jaxe/services/trackbacks/153037.html鍒╃敤AOI妯″潡浜х敓鐨別nterAOI,LeaveAOI浜嬩歡 瑙﹀彂NPC榪介殢鐜╁

欏轟究涔熸祴璇曚笅鏈嶅姟鍣ㄥ疄浣撶殑嬈ф媺瑙掕綆?br />

鍏堣繍琛孯egionApp.exe
鐒跺悗鍐嶈繍琛孋lientDemo

WSAD 鍓嶅悗宸﹀彸 J涓奒涓?br />
瀹㈡埛绔仛鐨勫緢綆鍗?.., 鏀寔澶氬紑...

涓嬭澆DEMO

嫻╂瘺 2011-08-11 11:22 鍙戣〃璇勮
]]>
娓告垙鏈嶅姟鍣ㄧ殑鍦烘櫙綆$悊璁$畻AOI緇堜簬鎼炲嚭涓涓潬璋辯殑鏂規(guī)浜嗐傘傘?/title><link>http://www.shnenglu.com/jaxe/archive/2011/06/20/148998.html</link><dc:creator>嫻╂瘺</dc:creator><author>嫻╂瘺</author><pubDate>Sun, 19 Jun 2011 17:25:00 GMT</pubDate><guid>http://www.shnenglu.com/jaxe/archive/2011/06/20/148998.html</guid><wfw:comment>http://www.shnenglu.com/jaxe/comments/148998.html</wfw:comment><comments>http://www.shnenglu.com/jaxe/archive/2011/06/20/148998.html#Feedback</comments><slash:comments>23</slash:comments><wfw:commentRss>http://www.shnenglu.com/jaxe/comments/commentRss/148998.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/jaxe/services/trackbacks/148998.html</trackback:ping><description><![CDATA[鏈榪戝湪浼樺寲娓告垙鏈嶅姟鍣ㄧ殑AOI錛坅rea of interest)閮ㄥ垎錛屼綅緗湁鍏崇殑娓告垙瀹炰綋涓鑸兘鏈変竴涓閲庢垨鍏沖績鐨勮寖鍥達(dá)紝<br /> 褰撳叾浠栧疄浣撹繘鍑烘煇涓疄浣撶殑榪欎釜鑼冨洿鐨勬椂鍊欙紝灝變細(xì)瑙﹀彂leaveAOI鎴杄nterAOI浜嬩歡錛屽茍緇存姢涓浠紸OI 瀹炰綋鍒楄〃銆?br /> 鎴戜滑鏉ヨ冭檻鏈綆鍗曠殑瀹炵幇錛屽亣璁懼尯鍩烺涓湁1000涓狤ntity錛屽綋鏌愪釜entity浣嶇疆鍙戠敓鍙樺寲鏃訛紝闇瑕佽綆梕ntity鐨凙OI浜嬩歡鍜屽垪琛紝浼唬鐮佸涓嬶細(xì) <br /> <br /> function onEntityMove(who)    <br />   for entity in entities do <br />     if who <> entity then<br />         璁$畻who鍜宔ntity涔嬮棿鐨勮窛紱?br />         濡傛灉who縐誨姩鍓峞ntity鍦╳ho鐨凙OI鑼冨洿鍐咃紝涓旂幇鍦ㄥ湪鑼冨洿澶?br />            瑙﹀彂who.onLeaveAOI(entity)<br />         濡傛灉who縐誨姩鍓峞ntity鍦╳ho鐨凙OI鑼冨洿澶栵紝涓旂幇鍦ㄥ湪鑼冨洿鍐?br />            瑙﹀彂who.onEnterAOI(entity)  <br />          濡傛灉who縐誨姩鍓嶅湪 entity鐨凙OI鑼冨洿鍐咃紝涓旂幇鍦ㄥ湪鑼冨洿澶?nbsp;  <br />           瑙﹀彂entity.onLeaveAOI(who)<br />           濡傛灉who縐誨姩鍓嶅湪 entity鐨凙OI鑼冨洿澶栵紝涓旂幇鍦ㄥ湪 鑼冨洿鍐?br />            瑙﹀彂entity.onEntityAOI(who)<br />       end<br />   end<br /> end <br /> 姣忔涓涓疄浣撶Щ鍔ㄤ竴嬈′綅緗氨瑕侀亶鍘?000涓疄浣撴潵璁$畻錛岃繖 鏍峰仛鏄劇劧涓嶈錛屾晥鐜囧お浣庝簡錛?br /> 閭d箞灝遍渶瑕佸紩鍏ュ満鏅鐞嗭紝灝嗗尯鍩烺鍒嗘垚n涓牸瀛愶紝姣忎釜鏍煎瓙緇存姢涓涓疄浣撻摼琛紝entity縐誨姩鏃訛紝鍙亶鍘嗗畠鎵鍦ㄧ殑鏍煎瓙鍜屽懆鍥寸殑8涓牸瀛愮殑瀹炰綋閾捐〃錛?br /> 鍐嶄紭鍖栦笅錛屽彲浠ュ姞鍏OI鍦嗗拰鏍煎瓙鐨勭鎾炴鏌ワ紝9涓牸瀛愪腑鍐嶅幓鎺夋病鏈夌浉浜ょ殑鏍煎瓙銆傘傘傜瓑絳?br /> 涔熸湁鐢ㄥ洓鍙夋爲(wèi)鏉ヨ繘琛屽満鏅鐞嗙殑銆?br /> <br /> 榪樻湁浜涙柟妗堟洿綆鍗曪紝鐩存帴鏄敾鏍煎瓙錛屾寜浠ュ疄浣撲負(fù)涓績鐨勪節(jié)涓牸瀛愯繘琛屼綅緗箍鎾紝 瀹炰綋浠庝竴涓牸瀛愮Щ鍔ㄥ埌鍙﹀鐨勬牸瀛愭椂瑙﹀彂浜嬩綋銆傘傚ソ澶勬槸璁$畻閲忕畝鍗曪紝緙虹偣鏄甫瀹藉崰鐢ㄥぇ<br /> <br /> 鎴戜笂闈㈢殑鏂規(guī)閮借瘯榪囦簡錛屾晥鐜囧拰甯﹀鍗犵敤閮戒笉鐞嗘兂錛屾渶榪戠粓浜庡紕鍑轟竴涓柊鐨勬柟妗堬紝鐜板湪鐨凙OI璁$畻閲忔槸鎴戜滑鏈嶅姟鍣ㄤ互鍓嶈綆楅噺鐨?/40-1/80錛岀敱浜庢秹鍙?qiáng)鍒板叕鍙哥殑淇濆瘑鍒跺害锛屼笉渚烤l嗚錛屼笂鍑犱釜嫻嬭瘯鐨勬姄鍥撅細(xì)<br /> <br /> 鏈哄櫒閰嶇疆錛歸in7 ,T5870 inter鍙屾牳2G,2G鍐呭瓨<br /> 20涓猠ntity 闅忔満榪愬姩璁$畻涓嬈℃墍鏈塭ntity AOI鐨勬椂闂村湪0.02姣宸﹀彸錛?br /> <img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/jaxe/AOI20.jpg" width="600" height="459" /> <br /> 220涓疄浣擄紝閫夋嫨鐨勫疄浣揂OI鑼冨洿閲屾湁68涓疄浣擄細(xì)<br /> <a href="/images/cppblog_com/jaxe/AOI200.jpg" target="_blank"><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/jaxe/AOI200.jpg" width="600" height="456" /></a> <br /> 4000涓疄浣擄紝閫夋嫨鐨勫疄浣撶殑AOI鍖哄煙閲屾湁465涓疄浣?br /> </a><a href="/images/cppblog_com/jaxe/AOI4000.jpg" target="_blank"><img border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/jaxe/AOI4000.jpg" width="600" height="459" /></a> <br /> <a href="/Files/jaxe/AOIDemo.rar" target="_blank">AOIDemo.exe 涓嬭澆</a><br /> <br /><img src ="http://www.shnenglu.com/jaxe/aggbug/148998.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/jaxe/" target="_blank">嫻╂瘺</a> 2011-06-20 01:25 <a href="http://www.shnenglu.com/jaxe/archive/2011/06/20/148998.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>闈㈠悜鏈嶅姟鏋舵瀯(SOA)鐨勪竴浜涙濊?/title><link>http://www.shnenglu.com/jaxe/archive/2010/12/29/137631.html</link><dc:creator>嫻╂瘺</dc:creator><author>嫻╂瘺</author><pubDate>Tue, 28 Dec 2010 16:31:00 GMT</pubDate><guid>http://www.shnenglu.com/jaxe/archive/2010/12/29/137631.html</guid><wfw:comment>http://www.shnenglu.com/jaxe/comments/137631.html</wfw:comment><comments>http://www.shnenglu.com/jaxe/archive/2010/12/29/137631.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/jaxe/comments/commentRss/137631.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/jaxe/services/trackbacks/137631.html</trackback:ping><description><![CDATA[ SOA:Service-oriented architecture<br>鏈榪戝湪鍋氭父鎴忔湇鍔″櫒寮曟搸錛屾煡浜嗕笉灝戞湁鍏砈OA鐨勮璁℃柟闈㈢殑璧勬枡銆傚彂鐜癑AVA涓栫晫鏈夌浉褰撳鐨勬妧鏈爣鍑嗐?br>鍏朵腑姣旇緝濂界殑鏄疧SGi 錛?a >http://www.osgi.org/About/WhatIsOSGi</a>錛夛紝OSGi鎶鏈槸闈㈠悜Java鐨勫姩鎬佹ā鍨嬬郴緇熴侽SGi鏈嶅姟騫沖彴鍚慗ava鎻愪緵鏈嶅姟錛岃繖浜涙湇鍔′嬌Java鎴愪負(fù)杞歡闆嗘垚鍜岃蔣浠跺紑鍙戠殑棣栭夌幆澧冦侸ava鎻愪緵鍦ㄥ涓鉤鍙版敮鎸佷駭鍝佺殑鍙Щ妞嶆с侽SGi鎶鏈彁渚涘厑璁稿簲鐢ㄧ▼搴忎嬌鐢ㄧ簿鐐箋佸彲閲嶇敤鍜屽彲鍗忎綔鐨勭粍浠舵瀯寤虹殑鏍囧噯鍖栧師璇傝繖浜涚粍浠惰兘澶熺粍瑁呰繘涓涓簲鐢ㄥ拰閮ㄧ講涓?br>鍙傝冨畠鐨勬濊礬錛岀粨鍚圕++璇█鐨勭壒鐐癸紝鎴戝皢涓涓湇鍔″櫒鍩虹妗嗘灦璁捐鎴愪簡榪欐牱涓縐?<br><img border="0" align="absmiddle" src="http://www.shnenglu.com/images/cppblog_com/jaxe/SOA.jpg"><br>涓涓湇鍔″櫒搴旂敤錛岀敱澶氫釜緇勪歡緇勬垚錛岀粍浠剁墿鐞嗕笂鍙互鏄姩鎬佸簱錛屼篃鍙互鏄疎XE閲屼竴孌靛疄闄呯殑浠g爜錛屾瘡涓粍浠跺彲浠ュ悜ApplicationFramework娉ㄥ唽澶氫釜鏈嶅姟錛堟瘮濡傛棩蹇楁湇鍔★紝緗戠粶鏈嶅姟絳夛級銆?br>ApplicationFramework鍚姩鏃訛紝閫氳繃閰嶇疆鏂囦歡錛屽姩鎬佸姞杞藉拰鍚姩緇勪歡錛岃鍙栨湇鍔$殑鍙厤緗睘鎬с侳ramework瑙﹀彂IComponentActivator鐨凮nStart() 鍜孫nStop()浜嬩歡錛屽湪Start浜嬩歡涓紝鍙互娉ㄥ唽緇勪歡鑷繁鐨勬湇鍔★紝涔熷彲浠ュ姞鍏ヤ竴涓湇鍔$洃鍚櫒鏉ョ洃鍚叧蹇冪殑鏈嶅姟鐨勬敞鍐岋紝娉ㄩ攢絳変簨浠躲?br>鎴戦殢渚跨敾浜嗗嚑涓ぇ姒傜殑鎺ュ彛錛?br><img border="0" align="absmiddle" src="http://www.shnenglu.com/images/cppblog_com/jaxe/SOA2.jpg">  <img src ="http://www.shnenglu.com/jaxe/aggbug/137631.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/jaxe/" target="_blank">嫻╂瘺</a> 2010-12-29 00:31 <a href="http://www.shnenglu.com/jaxe/archive/2010/12/29/137631.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>vim鏇挎崲^M瀛楃(杞?http://www.shnenglu.com/jaxe/archive/2010/10/15/130001.html嫻╂瘺嫻╂瘺Fri, 15 Oct 2010 03:28:00 GMThttp://www.shnenglu.com/jaxe/archive/2010/10/15/130001.htmlhttp://www.shnenglu.com/jaxe/comments/130001.htmlhttp://www.shnenglu.com/jaxe/archive/2010/10/15/130001.html#Feedback0http://www.shnenglu.com/jaxe/comments/commentRss/130001.htmlhttp://www.shnenglu.com/jaxe/services/trackbacks/130001.html鏇挎崲^M瀛楃
鍦↙inux涓嬩嬌鐢╲i鏉ユ煡鐪嬩竴浜涘湪Windows涓嬪垱寤虹殑鏂囨湰鏂囦歡錛屾湁鏃朵細(xì)鍙戠幇鍦ㄨ灝炬湁涓浜?#8220;^M”銆傛湁鍑犵鏂規(guī)硶鍙互澶勭悊銆?/p>

1.浣跨敤dos2unix鍛戒護(hù)銆備竴鑸殑鍒嗗彂鐗堟湰涓兘甯︽湁榪欎釜灝忓伐鍏鳳紙濡傛灉娌℃湁鍙互鏍規(guī)嵁涓嬮潰鐨勮繛鎺ュ幓涓嬭澆錛夛紝浣跨敤璧鋒潵寰堟柟渚?
$ dos2unix myfile.txt
涓婇潰鐨勫懡浠や細(xì)鍘繪帀琛屽熬鐨刕M銆?/p>

2.浣跨敤vi鐨勬浛鎹㈠姛鑳姐傚惎鍔╲i錛岃繘鍏ュ懡浠ゆā寮忥紝杈撳叆浠ヤ笅鍛戒護(hù):
:%s/^M$//g # 鍘繪帀琛屽熬鐨刕M銆?/p>

:%s/^M//g # 鍘繪帀鎵鏈夌殑^M銆?/p>

:%s/^M/[ctrl-v]+[enter]/g # 灝哵M鏇挎崲鎴愬洖杞︺?/p>

:%s/^M/\r/g # 灝哵M鏇挎崲鎴愬洖杞︺?/p>

3.浣跨敤sed鍛戒護(hù)銆傚拰vi鐨勭敤娉曠浉浼鹼細(xì)
$ sed -e ‘s/^M/\n/g’ myfile.txt

娉ㄦ剰錛氳繖閲岀殑“^M”瑕佷嬌鐢?#8220;CTRL-V CTRL-M”鐢熸垚錛岃屼笉鏄洿鎺ラ敭鍏?#8220;^M”銆?

杞嚜錛?a target=__blank>http://hi.baidu.com/mofeis/blog/item/23c7b2fb92dc97234e4aea6d.html



嫻╂瘺 2010-10-15 11:28 鍙戣〃璇勮
]]>
娓告垙鏈嶅姟鍣ㄤ腑鐨勬暟鎹簱寮傛鎿嶄綔鎶鏈拰娓告垙鏁版嵁鐨勪繚瀛樻満鍒?/title><link>http://www.shnenglu.com/jaxe/archive/2010/08/30/125258.html</link><dc:creator>嫻╂瘺</dc:creator><author>嫻╂瘺</author><pubDate>Mon, 30 Aug 2010 03:35:00 GMT</pubDate><guid>http://www.shnenglu.com/jaxe/archive/2010/08/30/125258.html</guid><wfw:comment>http://www.shnenglu.com/jaxe/comments/125258.html</wfw:comment><comments>http://www.shnenglu.com/jaxe/archive/2010/08/30/125258.html#Feedback</comments><slash:comments>12</slash:comments><wfw:commentRss>http://www.shnenglu.com/jaxe/comments/commentRss/125258.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/jaxe/services/trackbacks/125258.html</trackback:ping><description><![CDATA[<p>    鍦ㄦ父鎴忔湇鍔″櫒涓紝澶勭悊鐜╁鐧婚檰闇瑕佸悜鏁版嵁搴撴煡璇㈢帺瀹剁殑璐﹀彿鍜屽瘑鐮侊紝鐜╁涓婄嚎鍜屼笅綰塊渶瑕佸鐜╁鐨勮鑹叉暟鎹粠鏁版嵁搴撲腑璇誨彇鍜屼繚瀛樸傚彲浠ヨ錛岀浉瀵逛簬娓告垙閫昏緫澶勭悊鏉ヨ錛屾暟鎹簱鎿嶄綔鏄竴縐嶇浉瀵瑰緢鎱㈢殑鎿嶄綔錛屽嵆渚夸綘閫氳繃浣跨敤澶氫釜綰跨▼澶氫釜鏁版嵁搴撹繛鎺ユ潵鎻愰珮鏁版嵁搴撴搷浣滅殑澶勭悊鑳藉姏錛屼絾鏄紝鍦ㄩ珮騫跺彂楂樿礋杞界殑鏈嶅姟鍣ㄥ簲鐢ㄤ腑錛岃繖鏍蜂粛鐒朵細(xì)鏄浉褰撶殑璐熻澆鐡墮銆傝鎯寵繖鏍蜂竴縐嶈璁℃柟妗堬紝瑙佷笅鍥撅細(xì)<br><img border=0 alt="" src="http://www.shnenglu.com/images/cppblog_com/jaxe/db1.png" width=543 height=292><br>    鍦ㄥぇ閲忕帺瀹剁櫥闄嗘父鎴忔湇鍔″櫒鏃訛紝鐢變簬鏈夊ぇ閲忕殑鏁版嵁搴撹闂姹傦紝鍗充究鏄湁鑷繁瀹炵幇鐨凜ACHE鏈哄埗錛岃繕鏄細(xì)瀵艱嚧鏈嶅姟鍣ㄨ楀敖鎵鏈夌殑閫昏緫綰跨▼璧勬簮錛屾湇鍔″櫒鐨勫鐞嗚兘鍔涘皢闄嶄綆鎴怐BMS鐨勫鐞嗚兘鍔涖?br>    <br>     涓轟簡涓嶉樆濉為昏緫綰跨▼錛屽彲浠ラ噰鐢ㄥ紓姝ユ暟鎹簱璁塊棶鐨勬柟寮忥紝鍗蟲暟鎹簱鎿嶄綔璇鋒眰鎻愪氦緇欎笓闂ㄧ殑鏁版嵁搴撳鐞嗙嚎紼嬫睜錛岀劧鍚庨昏緫綰跨▼涓嶅啀絳夊緟鏁版嵁搴撳鐞嗙粨鏋滐紝緇х畫澶勭悊鍏朵粬錛屼笉鍐嶉樆濉炲湪榪欓噷銆?br>     鎶借薄鐨勬潵鐪嬶紝瀵逛簬涓涓渶瑕佹寔涔呭寲鐨勬父鎴忓璞℃潵璇達(dá)紝鍙互鑰冭檻瀹冩湁2涓柟娉曪紝璇誨彇鍜屼繚瀛樸傞偅涔堟垜浠娊璞′竴涓狣BO鎺ュ彛錛?br>    </p> <div style="BORDER-BOTTOM: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #eeeeee; PADDING-LEFT: 4px; WIDTH: 98%; PADDING-RIGHT: 5px; FONT-SIZE: 13px; WORD-BREAK: break-all; BORDER-TOP: #cccccc 1px solid; BORDER-RIGHT: #cccccc 1px solid; PADDING-TOP: 4px"><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><span style="COLOR: #0000ff">struct</span><span style="COLOR: #000000"> IDbo<br><img id=Codehighlighter1_12_84_Open_Image onclick="this.style.display='none'; Codehighlighter1_12_84_Open_Text.style.display='none'; Codehighlighter1_12_84_Closed_Image.style.display='inline'; Codehighlighter1_12_84_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_12_84_Closed_Image onclick="this.style.display='none'; Codehighlighter1_12_84_Closed_Text.style.display='none'; Codehighlighter1_12_84_Open_Image.style.display='inline'; Codehighlighter1_12_84_Open_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ContractedBlock.gif"></span><span style="BORDER-BOTTOM: #808080 1px solid; BORDER-LEFT: #808080 1px solid; BACKGROUND-COLOR: #ffffff; DISPLAY: none; BORDER-TOP: #808080 1px solid; BORDER-RIGHT: #808080 1px solid" id=Codehighlighter1_12_84_Closed_Text></span><span id=Codehighlighter1_12_84_Open_Text><span style="COLOR: #000000">{<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    </span><span style="COLOR: #0000ff">virtual</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">bool</span><span style="COLOR: #000000"> SaveToDB(DB</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">)</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">    </span><span style="COLOR: #0000ff">virtual</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">bool</span><span style="COLOR: #000000"> LoadFromDB(DB</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">)</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif">}</span></span><span style="COLOR: #000000">;</span></div>     <br>     鐒跺悗鎶婅璁℃柟妗堟敼鎴愪笅闈㈣繖縐嶏細(xì)<br><br><img style="WIDTH: 569px; HEIGHT: 225px" border=0 alt="" src="http://www.shnenglu.com/images/cppblog_com/jaxe/db3.png" width=569 height=225> <br><br>     鏀規(guī)垚鏁版嵁搴撳紓姝ュ鐞嗗悗錛屽湪鎯蟲兂鐜板湪鐨勬父鎴忔暟鎹殑淇濆瓨鏈哄埗搴旇鏄庢牱鏀硅繘鐨勶紝涓轟簡淇濋殰鏁版嵁瀹夊叏錛屾垜浠笇鏈涗笉鍙槸鐜╁涓嬬嚎鐨勬椂鍊欐墠浼?xì)淇濆瓨鐜╁鏁版嵁锛岃屾槸甯屾湜姣忛殧涓孌墊椂闂寸粺涓淇濆瓨鎵鏈夊湪綰跨帺瀹剁殑鏁版嵁錛岄偅涔堬紝鍙互鑰冭檻榪欐牱鐨勬濊礬錛氬亣璁炬垜浠湁涓涓狦AMEDB鏈嶅姟鍣紝GAMEDB緙撳瓨浜嗘墍鏈夊湪綰跨帺瀹剁殑瑙掕壊鏁版嵁錛屾瘡鍒頒繚瀛樻椂闂達(dá)紝GAMEDB灝卞皢鎵鏈夊湪綰跨帺瀹剁殑鏁版嵁(DBO錛夌殑鍓湰閮界粺涓鎻愪氦緇橠B綰跨▼姹狅紝璁╁畠淇濆瓨鏁版嵁錛屾彁浜ょ殑榪囩▼寰堝揩錛屾彁浜ゅ畬鍚庯紝GAMEDB鐨勯昏緫綰跨▼浠嶈兘緇х畫澶勭悊娓告垙鏈嶅姟鍣ㄧ殑鏇存柊鍜岃鍙朇ACHE鐨勮姹傘備負(fù)浠涔堣淇濆瓨鍓湰鍛紝DB綰跨▼鐨勬墽琛屼繚瀛橀槦鍒楃殑榪囩▼涔熻寰堣楁椂錛屼絾鏄槦鍒椾腑鐨勬暟鎹兘鏄疓AMEDB鎻愪氦DBO閭d釜鏃跺埢鐨勬暟鎹紝榪欐牱灝辮兘淇濊瘉鐜╁鐨勬父鎴忔暟鎹殑瀹屾暣鎬с?br>      褰撶劧錛屾垜榪欓噷鎻愮殑榪欏彧鏄釜鎬濊礬錛岃繖閲岄潰榪樻湁寰堝緇嗚妭娌℃湁璁ㄨ錛屼緥濡傚鏋淒B綰跨▼姹犳鍦ㄤ繚瀛樹節(jié)鐐歸挓鏃跺埢淇濆瓨鐨勬暟鎹紝鍒頒簡鍗佺偣閽熸柊鐨勪繚瀛樻椂鍒繪椂錛孌B綰跨▼姹犺繕娌′繚瀛樺畬涔?jié)鐐归挓鏃跺埲潥凞BO鍓湰闃熷垪錛岃繖鏃跺簲璇ユ庝箞澶勭悊錛汥BO瀵硅薄鐨勫垝鍒嗙矑搴︾殑闂錛汥BO闃熷垪鐨勪紭鍏堢駭鐨勯棶棰樼瓑絳夈?br><br>     PS:榪欑瘒鏂囩珷閲岀殑鏋舵瀯鍏跺疄灝辨槸涓涓狦AMEDB鏈嶅姟鍣紝閲岄潰鐨勯昏緫澶勭悊灝辨槸GAMEDB鐨勯昏緫澶勭悊銆備綘鍙互鎶婅繖綃囨枃绔犵悊瑙f垚錛氫竴涓狦AMEDB鏈嶅姟鍣?鐨勫疄鐜版濊礬銆傘傘? <img src ="http://www.shnenglu.com/jaxe/aggbug/125258.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/jaxe/" target="_blank">嫻╂瘺</a> 2010-08-30 11:35 <a href="http://www.shnenglu.com/jaxe/archive/2010/08/30/125258.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>閰嶇疆VIM瀹炵幇鏂板緩c/c++鏂囦歡錛岃嚜鍔ㄦ彃鍏ユ敞閲婂拰鏂囦歡澶?http://www.shnenglu.com/jaxe/archive/2010/07/29/121566.html嫻╂瘺嫻╂瘺Thu, 29 Jul 2010 04:26:00 GMThttp://www.shnenglu.com/jaxe/archive/2010/07/29/121566.htmlhttp://www.shnenglu.com/jaxe/comments/121566.htmlhttp://www.shnenglu.com/jaxe/archive/2010/07/29/121566.html#Feedback1http://www.shnenglu.com/jaxe/comments/commentRss/121566.htmlhttp://www.shnenglu.com/jaxe/services/trackbacks/121566.html緙栬緫~/.vimrc 鍔犲叆浠ヤ笅浠g爜

 1 autocmd BufNewFile *.[ch],*.hpp,*.cpp exec ":call SetTitle()" 
 2 
 3 "鍔犲叆娉ㄩ噴
 4 func SetComment()
 5     call setline(1,"/*==============================================================="
 6     call append(line("."),   "*   Copyright (C) ".strftime("%Y")." All rights reserved.")
 7     call append(line(".")+1"*   "
 8     call append(line(".")+2"*   鏂囦歡鍚嶇О錛?/span>".expand("%:t")) 
 9     call append(line(".")+3"*   鍒?nbsp;寤?nbsp;鑰咃細(xì)钂嬫旦")
10     call append(line(".")+4"*   鍒涘緩鏃ユ湡錛?/span>".strftime("%Y騫?m鏈?d鏃?/span>")) 
11     call append(line(".")+5"*   鎻?nbsp;   榪幫細(xì)"
12     call append(line(".")+6"*")
13     call append(line(".")+7"*   鏇存柊鏃ュ織錛?/span>"
14     call append(line(".")+8"*"
15     call append(line(".")+9"================================================================*/"
16 endfunc
17 
18 "瀹氫箟鍑芥暟SetTitle錛岃嚜鍔ㄦ彃鍏ユ枃浠跺ご 
19 func SetTitle()
20     call SetComment()
21     if expand("%:e"== 'hpp' 
22  call append(line(".")+10"#ifndef _".toupper(expand("%:t:r"))."_H"
23  call append(line(".")+11"#define _".toupper(expand("%:t:r"))."_H"
24  call append(line(".")+12"#ifdef __cplusplus"
25  call append(line(".")+13"extern \"C\""
26  call append(line(".")+14"{"
27  call append(line(".")+15"#endif"
28  call append(line(".")+16""
29  call append(line(".")+17"#ifdef __cplusplus"
30  call append(line(".")+18"}"
31  call append(line(".")+19"#endif"
32  call append(line(".")+20"#endif //".toupper(expand("%:t:r"))."_H"
33     elseif expand("%:e"== 'h' 
34  call append(line(".")+10"#pragma once"
35     elseif &filetype == 'c' 
36  call append(line(".")+10,"#include \"".expand("%:t:r").".h\""
37     elseif &filetype == 'cpp' 
38  call append(line(".")+10"#include \"".expand("%:t:r").".h\""
39     endif
40 endfunc
41 


 



嫻╂瘺 2010-07-29 12:26 鍙戣〃璇勮
]]>
澶氱嚎紼嬭繕鏄崟綰跨▼錛?/title><link>http://www.shnenglu.com/jaxe/archive/2010/07/06/119387.html</link><dc:creator>嫻╂瘺</dc:creator><author>嫻╂瘺</author><pubDate>Mon, 05 Jul 2010 16:06:00 GMT</pubDate><guid>http://www.shnenglu.com/jaxe/archive/2010/07/06/119387.html</guid><wfw:comment>http://www.shnenglu.com/jaxe/comments/119387.html</wfw:comment><comments>http://www.shnenglu.com/jaxe/archive/2010/07/06/119387.html#Feedback</comments><slash:comments>13</slash:comments><wfw:commentRss>http://www.shnenglu.com/jaxe/comments/commentRss/119387.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/jaxe/services/trackbacks/119387.html</trackback:ping><description><![CDATA[<p>涓涓吀鍨嬬殑娓告垙鏈嶅姟鍣ㄨ璁′腑錛屼竴鑸兘鏄敤鐨勫綰跨▼錛屾湇鍔″櫒涓竴鑸繍琛屼袱綾葷嚎紼嬶紝N涓猄OCKET IO綰跨▼錛?涓昏緫綰跨▼錛?br>IO綰跨▼鎺ュ彈瀹㈡埛绔彂鏉ョ殑淇℃伅錛岄氳繃娑堟伅闃熷垪鍙戦佺粰閫昏緫綰跨▼澶勭悊鍚庯紝鍐嶅彂閫佹秷鎭粰瀹㈡埛绔紝鍙戦佹秷鎭繖閲屼竴鑸槸IO綰跨▼澶勭悊瀹為檯鍙戦併?br><br>鍏跺疄鎴戣涓猴紝濡傛灉閫昏緫綰跨▼閮芥槸娑堣楃殑CPU榪愮畻璧勬簮鐨勮瘽錛屾湇鍔″櫒瀹屽叏閲囩敤鍗曠嚎紼嬬殑鏂瑰紡鏉ュ仛銆?br><br>棣栧厛錛屾垜浠湅IO澶勭悊錛屽熀鏈氨鏄暟鎹叆闃熴佸嚭闃燂紝send銆乺ecv鎿嶄綔錛屼綔涓烘湇鍔″櫒鐨凷OCKET澶勭悊涓鑸兘鏄紓姝OCKET錛屼篃灝辨槸璇達(dá)紝send銆乺ecv鎿嶄綔鍙槸灝嗕俊鎭痗opy鍒皊ocket搴曞眰鐨勫彂閫佹帴鏀剁紦鍐插尯鍘諱簡錛屼笉瀛樺湪IO鍫靛鐨勯棶棰樸?br><br>鐒跺悗錛屾垜浠啀鏉ョ湅閫昏緫澶勭悊錛屽墠闈㈠凡緇忚浜嗭紝閲囩敤鍗曠嚎紼嬬殑鍓嶆彁鏄昏緫澶勭悊鍙槸娑堣桟PU榪愮畻璧勬簮錛岄偅涔堬紝涓嶇浣犲紑鍑犱釜綰跨▼錛屽鍗曟牳鐨凜PU鏉ヨ錛屽畠鐨勫鐞嗛熷害灝辨槸榪欎箞澶氾紝騫朵笉浼?xì)鍥犱皋Z綘綰跨▼寮鐨勮秺澶氾紝灝卞鐞嗙殑瓚婂揩銆?br><br>鍥犳鎴戜滑鍙笉鍙互榪欐牱璇村憿錛屽湪鍗曟牳鏈哄櫒涓婏紝鍙秷鑰桟PU榪愮畻鐨勬湇鍔★紝澶氱嚎紼嬪茍涓嶆瘮鍗曠嚎紼嬭兘鎻愰珮澶氬皯鏁堢巼銆?br><br>鎺ヤ笅鏉ワ紝鎴戜滑鍐嶈璁轟笅澶氭牳鐨勬儏鍐碉紝浣犺偗瀹氳鎯籌紝鎴戣繖鍙版湇鍔″櫒鏄?涓弻鏍窩PU錛屽氨鍙窇涓涓崟綰跨▼鐨勬湇鍔″櫒涓嶆槸浜忔浜嗭紝澶氱嚎紼嬪濂斤紝鎴戝紑8涓嚎紼嬶紝灝辮兘寰堝ソ鐨勫埄鐢ㄦ垜鐨勬満鍣ㄥ暒銆傛槸鍟婏紝鎴戜篃瑙夊緱榪欐牱寰堝ソ錛屼笉榪囧湪LINUX銆乁NIX涓嬶紝瀵圭嚎紼嬬殑鏀寔騫朵笉鍍廤INDOWS涓嬮偅涔堝ソ錛孡INUX銆乁NIX涓嬩竴鑸兘鏄敤LWP錛堣交閲忕駭榪涚▼錛夌殑鏂瑰紡鏉ユ敮鎸佸綰跨▼紼嬪簭鐨勶紝Linux鍐呮牳鍙彁渚涗簡杞婚噺榪涚▼鐨勬敮鎸侊紝闄愬埗浜嗘洿楂樻晥鐨勭嚎紼嬫ā鍨嬬殑瀹炵幇錛屼絾Linux鐫閲嶄紭鍖栦簡榪涚▼鐨勮皟搴﹀紑閿錛屼竴瀹氱▼搴︿笂涔熷譏琛ヤ簡榪欎竴緙洪櫡銆傚悓鏃訛紝婊ョ敤澶氱嚎紼嬩篃浼?xì)閫犳垚涓嶅繀瑕佺殑涓婁笅鏂囧垏鎹紝涓嶅繀瑕佺殑鍚屾鏈哄埗鐨勫紩鍏ワ紙濡俻thread_mutex錛夛紝璁╃▼搴忛綣佺殑鍦ㄥ唴鏍稿拰鐢ㄦ埛闂撮綣佸垏鎹€傚彟澶栵紝浠庡紑鍙戣搴︽潵鐪嬶紝鍗曠嚎紼嬪紑鍙戞瘮澶氱嚎紼嬬幆澧冨紑鍙戞洿涓嶅鏄撳嚭閿欏拰鏇村姞鍋ュ.銆?br><br>鍦ㄦ父鎴忔湇鍔″櫒鏋舵瀯涓紝涓轟簡鎻愰珮鐜╁鍦ㄧ嚎浜烘暟錛屽疄鐜拌礋杞藉潎琛★紝鐜板湪涓鑸兘鏄噰鐢ㄥ垎甯冨紡鐨勫榪涚▼鏈嶅姟鍣ㄩ泦緹ょ殑鏂瑰紡錛屾垜浠潵鐪嬬湅鏈嶅姟鍣ㄩ泦緹や腑錛屾瘡涓湇鍔¤繘紼嬫槸閲囩敤澶氱嚎紼嬬殑鏂瑰紡榪樻槸鍗曠嚎紼嬬殑鏂瑰紡濂藉憿錛熸垜瑙夊緱錛屽浜庢湁鎱㈤烮O璁塊棶鐨勯渶姹傜殑搴旂敤榪涚▼錛屽綰跨▼鑲畾姣斿崟綰跨▼濂斤紝鏈鍏稿瀷鐨勬儏鍐靛氨鏄暟鎹簱璁塊棶榪欏潡錛屽畬鍏ㄥ彲浠ラ噰鐢∟涓狣B綰跨▼錛屼竴涓昏緫綰跨▼鐨勬灦鏋勶紝鑰屽鍙槸娑堣桟PU榪愮畻璧勬簮鐨勫簲鐢ㄨ繘紼嬶紝灝介噺鍗曠嚎紼嬪氨琛屼簡錛屽鏋滆寰楀崟綰跨▼璐熻澆涓嶈鐨勮瘽錛屽畬鍏ㄥ彲浠ュ垎鎴愬涓繘紼嬫潵璺戙傘?br><br>浠ヤ笂鍙槸鎴戣嚜宸辯殑涓浜涚湅娉曪紝琛ㄨ揪鏈夐檺錛屾榪庢寚姝c傘傘?/p> <img src ="http://www.shnenglu.com/jaxe/aggbug/119387.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/jaxe/" target="_blank">嫻╂瘺</a> 2010-07-06 00:06 <a href="http://www.shnenglu.com/jaxe/archive/2010/07/06/119387.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Boost.Program_options涓殑涓涓嚱鏁板紡緙栫▼鐨勪緥瀛?/title><link>http://www.shnenglu.com/jaxe/archive/2010/07/05/119385.html</link><dc:creator>嫻╂瘺</dc:creator><author>嫻╂瘺</author><pubDate>Mon, 05 Jul 2010 15:08:00 GMT</pubDate><guid>http://www.shnenglu.com/jaxe/archive/2010/07/05/119385.html</guid><wfw:comment>http://www.shnenglu.com/jaxe/comments/119385.html</wfw:comment><comments>http://www.shnenglu.com/jaxe/archive/2010/07/05/119385.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.shnenglu.com/jaxe/comments/commentRss/119385.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/jaxe/services/trackbacks/119385.html</trackback:ping><description><![CDATA[    boost閲岀殑program_options鎻愪緵紼嬪簭鍛樹竴縐嶆柟渚跨殑鍛戒護(hù)琛屽拰閰嶇疆鏂囦歡榪涜紼嬪簭閫夐」璁劇疆鐨勬柟娉曘?br>    鍏舵枃妗d緥瀛愪腑鏈夊涓嬩唬鐮侊細(xì)<br>    <div style="BORDER-BOTTOM: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #eeeeee; PADDING-LEFT: 4px; WIDTH: 98%; PADDING-RIGHT: 5px; FONT-SIZE: 13px; WORD-BREAK: break-all; BORDER-TOP: #cccccc 1px solid; BORDER-RIGHT: #cccccc 1px solid; PADDING-TOP: 4px"><span style="COLOR: #008080">1</span> <span style="COLOR: #0000ff">using</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">namespace</span><span style="COLOR: #000000"> boost::program_options;<br></span><span style="COLOR: #008080">2</span> <span style="COLOR: #000000"></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">澹版槑闇瑕佺殑閫夐」</span><span style="COLOR: #008000"><br></span><span style="COLOR: #008080">3</span> <span style="COLOR: #008000"></span><span style="COLOR: #000000">options_description desc(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Allowed options</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br></span><span style="COLOR: #008080">4</span> <span style="COLOR: #000000">desc.add_options()<br></span><span style="COLOR: #008080">5</span> <span style="COLOR: #000000">        (</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">help,h</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">, </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">produce help message</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)<br></span><span style="COLOR: #008080">6</span> <span style="COLOR: #000000">        (</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">person,p</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">, value</span><span style="COLOR: #000000"><</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">()</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">default_value(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">world</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">), </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">who</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);</span></div> <br>    鐪嬬4鍒?琛岋紝鏄笉鏄劅瑙夊緢鎬紵榪欑鏂瑰紡浣撶幇浜嗗嚱鏁板紡緙栫▼涓渶澶х殑鐗圭偣錛氬嚱鏁版槸涓綾誨鹼紝寮曠敤璧勬枡鏉ヨ,<em>鎵璋?#8220;鍑芥暟鏄竴綾誨鹼紙F(tuán)irst Class Value錛?#8221;鎸囩殑鏄嚱鏁板拰鍊兼槸鍚岀瓑鐨勬蹇碉紝涓涓嚱鏁板彲浠ヤ綔涓哄彟澶栦竴涓嚱鏁扮殑鍙傛暟錛屼篃鍙互浣滀負(fù)鍊間嬌鐢ㄣ傚鏋滃嚱鏁板彲浠ヤ綔涓轟竴綾誨間嬌鐢紝閭d箞鎴戜滑灝卞彲浠ュ啓鍑轟竴浜涘嚱鏁幫紝浣垮緱榪欎簺鍑芥暟鎺ュ彈鍏跺畠鍑芥暟浣滀負(fù)鍙傛暟騫惰繑鍥炲彟澶栦竴涓嚱鏁般傛瘮濡傚畾涔変簡f鍜実涓や釜鍑芥暟錛岀敤compose(f,g)鐨勯鏍煎氨鍙互鐢熸垚鍙﹀涓涓嚱鏁幫紝浣垮緱榪欎釜鍑芥暟鎵цf(g(x))鐨勬搷浣滐紝鍒欏彲縐癱ompose涓洪珮闃跺嚱鏁幫紙Higher-order Function錛夈?br><br></em>    program_options閲岀殑榪欑鏂瑰紡鏄庝箞瀹炵幇鐨勫憿錛熼氳繃鍒嗘瀽boost鐨勬簮浠g爜錛屾垜浠嚜宸辨潵鍐欎釜綾諱技鐨勫疄鐜扮湅鐪嬶細(xì)<br>     test.h    <div style="BORDER-BOTTOM: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #eeeeee; PADDING-LEFT: 4px; WIDTH: 98%; PADDING-RIGHT: 5px; FONT-SIZE: 13px; WORD-BREAK: break-all; BORDER-TOP: #cccccc 1px solid; BORDER-RIGHT: #cccccc 1px solid; PADDING-TOP: 4px"><span style="COLOR: #008080"> 1</span> <span style="COLOR: #000000">#pragma once<br></span><span style="COLOR: #008080"> 2</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 3</span> <span style="COLOR: #000000">#include </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">iostream</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 4</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">using</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">namespace</span><span style="COLOR: #000000"> std;<br></span><span style="COLOR: #008080"> 5</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 6</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> Test;<br></span><span style="COLOR: #008080"> 7</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 8</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> Test_easy_init<br></span><span style="COLOR: #008080"> 9</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">10</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080">11</span> <span style="COLOR: #000000">    Test_easy_init(Test</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> owner):m_owner(owner){}<br></span><span style="COLOR: #008080">12</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">13</span> <span style="COLOR: #000000">    Test_easy_init </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">operator</span><span style="COLOR: #000000"> () (</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> name);<br></span><span style="COLOR: #008080">14</span> <span style="COLOR: #000000">    Test_easy_init </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">operator</span><span style="COLOR: #000000"> () (</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> name,</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> id);<br></span><span style="COLOR: #008080">15</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080">16</span> <span style="COLOR: #000000">    Test</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> m_owner;<br></span><span style="COLOR: #008080">17</span> <span style="COLOR: #000000">};<br></span><span style="COLOR: #008080">18</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">19</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">20</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> Test<br></span><span style="COLOR: #008080">21</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">22</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080">23</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> add(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> name);<br></span><span style="COLOR: #008080">24</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> add(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> name,</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> id);<br></span><span style="COLOR: #008080">25</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">26</span> <span style="COLOR: #000000">    Test_easy_init add_some();<br></span><span style="COLOR: #008080">27</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">28</span> <span style="COLOR: #000000">};</span></div> <br>test.cpp<br> <div style="BORDER-BOTTOM: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #eeeeee; PADDING-LEFT: 4px; WIDTH: 98%; PADDING-RIGHT: 5px; FONT-SIZE: 13px; WORD-BREAK: break-all; BORDER-TOP: #cccccc 1px solid; BORDER-RIGHT: #cccccc 1px solid; PADDING-TOP: 4px"><span style="COLOR: #008080"> 1</span> <span style="COLOR: #000000">#include </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">test.h</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 2</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 3</span> <span style="COLOR: #000000">Test_easy_init </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> Test_easy_init::</span><span style="COLOR: #0000ff">operator</span><span style="COLOR: #000000"> () (</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> name,</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> id)<br></span><span style="COLOR: #008080"> 4</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080"> 5</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 6</span> <span style="COLOR: #000000">    m_owner</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">add(name,id);<br></span><span style="COLOR: #008080"> 7</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">*</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">;<br></span><span style="COLOR: #008080"> 8</span> <span style="COLOR: #000000">}<br></span><span style="COLOR: #008080"> 9</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">10</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">11</span> <span style="COLOR: #000000">Test_easy_init </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> Test_easy_init::</span><span style="COLOR: #0000ff">operator</span><span style="COLOR: #000000"> () (</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> name)<br></span><span style="COLOR: #008080">12</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">13</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">14</span> <span style="COLOR: #000000">    m_owner</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">add(name);<br></span><span style="COLOR: #008080">15</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">*</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">;<br></span><span style="COLOR: #008080">16</span> <span style="COLOR: #000000">}<br></span><span style="COLOR: #008080">17</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">18</span> <span style="COLOR: #000000">Test_easy_init Test::add_some()<br></span><span style="COLOR: #008080">19</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">20</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> Test_easy_init(</span><span style="COLOR: #0000ff">this</span><span style="COLOR: #000000">);<br></span><span style="COLOR: #008080">21</span> <span style="COLOR: #000000">}<br></span><span style="COLOR: #008080">22</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">23</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">24</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> Test::add(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> name)<br></span><span style="COLOR: #008080">25</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">26</span> <span style="COLOR: #000000">    cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">add:</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">name</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br></span><span style="COLOR: #008080">27</span> <span style="COLOR: #000000">}<br></span><span style="COLOR: #008080">28</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">29</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> Test::add(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">char</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> name,</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> id)<br></span><span style="COLOR: #008080">30</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">31</span> <span style="COLOR: #000000">    cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">add:</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">name</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">id</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br></span><span style="COLOR: #008080">32</span> <span style="COLOR: #000000">}</span></div> <br>浣跨敤鏂瑰紡錛?br> <div style="BORDER-BOTTOM: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #eeeeee; PADDING-LEFT: 4px; WIDTH: 98%; PADDING-RIGHT: 5px; FONT-SIZE: 13px; WORD-BREAK: break-all; BORDER-TOP: #cccccc 1px solid; BORDER-RIGHT: #cccccc 1px solid; PADDING-TOP: 4px"><span style="COLOR: #008080">1</span> <span style="COLOR: #000000">Test t1;<br></span><span style="COLOR: #008080">2</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">3</span> <span style="COLOR: #000000">t1.add_some()<br></span><span style="COLOR: #008080">4</span> <span style="COLOR: #000000">    (</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">hello</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">)<br></span><span style="COLOR: #008080">5</span> <span style="COLOR: #000000">    (</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">no id</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)<br></span><span style="COLOR: #008080">6</span> <span style="COLOR: #000000">    (</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">hello2</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">);</span></div> <br>鏄笉鏄緢鏈夋剰鎬濄俛dd_some()鏂規(guī)硶榪斿洖涓涓猅est_easy_init綾葷殑瀵硅薄錛孴est_easy_init綾婚噸杞戒簡鎿嶄綔絎?)錛屾搷浣滅()鏂規(guī)硶榪斿洖Test_easy_init綾誨璞¤嚜韜殑寮曠敤銆傘? <img src ="http://www.shnenglu.com/jaxe/aggbug/119385.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/jaxe/" target="_blank">嫻╂瘺</a> 2010-07-05 23:08 <a href="http://www.shnenglu.com/jaxe/archive/2010/07/05/119385.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.p146.cn" target="_blank">日本人妻丰满熟妇久久久久久</a>| <a href="http://www.zqek.cn" target="_blank">91精品日韩人妻无码久久不卡</a>| <a href="http://www.fcaiwanzhen.cn" target="_blank">99久久综合国产精品二区</a>| <a href="http://www.t0oal.cn" target="_blank">亚洲精品乱码久久久久66</a>| <a href="http://www.68002.com.cn" target="_blank">久久精品免费一区二区</a>| <a href="http://www.17youshi.cn" target="_blank">国产精品久久久久久久人人看</a>| <a href="http://www.fttyz.com.cn" target="_blank">一级女性全黄久久生活片免费 </a>| <a href="http://www.enikl.cn" target="_blank">久久综合精品国产二区无码</a>| <a href="http://www.ynxcm.cn" target="_blank">国内精品伊人久久久影院</a>| <a href="http://www.fozhun.cn" target="_blank">精品国产乱码久久久久软件</a>| <a href="http://www.girlsp.cn" target="_blank">久久久国产视频</a>| <a href="http://www.by8d5c.cn" target="_blank">影音先锋女人AV鲁色资源网久久</a>| <a href="http://www.ppxp.com.cn" target="_blank">久久久久高潮综合影院</a>| <a href="http://www.lbyk.com.cn" target="_blank">久久综合噜噜激激的五月天</a>| <a href="http://www.yidasoft.com.cn" target="_blank">国产精品久久午夜夜伦鲁鲁</a>| <a href="http://www.gkvw.cn" target="_blank">狠狠狠色丁香婷婷综合久久俺</a>| <a href="http://www.e-ben.cn" target="_blank">亚洲一区二区三区日本久久九</a>| <a href="http://www.x3077.cn" target="_blank">久久久久国产一级毛片高清版</a>| <a href="http://www.cn-trip.cn" target="_blank">99久久国产主播综合精品</a>| <a href="http://www.sywanfu.cn" target="_blank">国产亚洲色婷婷久久99精品91</a>| <a href="http://www.veixzew.cn" target="_blank">欧美激情精品久久久久久久九九九</a>| <a href="http://www.lrv9.cn" target="_blank">久久高清一级毛片</a>| <a href="http://www.syyinuo.cn" target="_blank">久久久久99这里有精品10 </a>| <a href="http://www.xfb55.cn" target="_blank">怡红院日本一道日本久久</a>| <a href="http://www.jlife-pal.cn" target="_blank">亚洲欧美日韩精品久久</a>| <a href="http://www.xinwenzaocan.org.cn" target="_blank">久久久WWW成人免费毛片</a>| <a href="http://www.rahd.cn" target="_blank">久久笫一福利免费导航</a>| <a href="http://www.sskca.cn" target="_blank">国产亚洲精品自在久久</a>| <a href="http://www.henpu.cn" target="_blank">国产精品va久久久久久久</a>| <a href="http://www.ywpc88.cn" target="_blank">久久亚洲精品国产亚洲老地址</a>| <a href="http://www.masterflexpump.com.cn" target="_blank">亚洲欧美伊人久久综合一区二区</a>| <a href="http://www.onceday.cn" target="_blank">99久久国产热无码精品免费</a>| <a href="http://www.jjshjlbf.cn" target="_blank">久久久久噜噜噜亚洲熟女综合</a>| <a href="http://www.s9459.cn" target="_blank">久久亚洲春色中文字幕久久久 </a>| <a href="http://www.hnxxzw.cn" target="_blank">性做久久久久久久久老女人</a>| <a href="http://www.bekin.com.cn" target="_blank">狠狠色婷婷久久一区二区</a>| <a href="http://www.lzcoxag.cn" target="_blank">久久精品国产亚洲网站</a>| <a href="http://www.yunea.cn" target="_blank">久久国产欧美日韩精品免费</a>| <a href="http://www.superpic.cn" target="_blank">久久se精品一区二区</a>| <a href="http://www.feichangyemen.cn" target="_blank">欧美亚洲国产精品久久高清</a>| <a href="http://www.sxxnjy.cn" target="_blank">伊人丁香狠狠色综合久久</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>