锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品久久久久久久久鸭,97久久精品无码一区二区,久久精品国产欧美日韩99热http://www.shnenglu.com/maosher/zh-cnWed, 07 May 2025 00:58:59 GMTWed, 07 May 2025 00:58:59 GMT60鎴戠殑 vim for golang http://www.shnenglu.com/maosher/archive/2015/07/01/211114.htmlBrandonBrandonWed, 01 Jul 2015 08:33:00 GMThttp://www.shnenglu.com/maosher/archive/2015/07/01/211114.htmlhttp://www.shnenglu.com/maosher/comments/211114.htmlhttp://www.shnenglu.com/maosher/archive/2015/07/01/211114.html#Feedback0http://www.shnenglu.com/maosher/comments/commentRss/211114.htmlhttp://www.shnenglu.com/maosher/services/trackbacks/211114.html/Files/maosher/vimrc.txt


Brandon 2015-07-01 16:33 鍙戣〃璇勮
]]>
鏂版墜鐨勬椂鍊欑鍒扮殑棰勫鐞嗗懡浠?/title><link>http://www.shnenglu.com/maosher/archive/2011/02/17/140191.html</link><dc:creator>Brandon</dc:creator><author>Brandon</author><pubDate>Wed, 16 Feb 2011 16:04:00 GMT</pubDate><guid>http://www.shnenglu.com/maosher/archive/2011/02/17/140191.html</guid><wfw:comment>http://www.shnenglu.com/maosher/comments/140191.html</wfw:comment><comments>http://www.shnenglu.com/maosher/archive/2011/02/17/140191.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/maosher/comments/commentRss/140191.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/maosher/services/trackbacks/140191.html</trackback:ping><description><![CDATA[浠婂ぉ涓涓柊鍚屽鏉ラ棶涓涓吀鍨嬬殑棰勫鐞嗙殑闂錛屾垜褰撳勾涔熺鍒拌繖鏍風(fēng)殑闂錛岃創(chuàng)鍑烘潵錛岃鏇村鐨勪漢鑳界洿鎺ユ悳鍒?br><br> <h1>棰勫鐞嗗懡浠?/h1> <hr> <h2><a name="">#,## </a></h2> <p># 鍜?## 鎿嶄綔絎︽槸鍜?a href="mk:@MSITStore:E:\doc\C++%20璇█鍙傝?chm::/cppreference.com/preproc_details.html#define"><u><font color=#810081>#define</font></u></a>瀹忎嬌鐢ㄧ殑. 浣跨敤# 浣垮湪#鍚庣殑棣栦釜鍙傛暟榪斿洖涓轟竴涓甫寮曞彿鐨勫瓧絎︿覆. 渚嬪, 鍛戒護(hù) </p> <pre> #define to_string( s ) # s </pre> <p>灝嗕細(xì)浣跨紪璇戝櫒鎶婁互涓嬪懡浠?</p> <pre> cout << to_string( Hello World! ) << endl; </pre> <p>鐞嗚В涓?</p> <pre> cout << "Hello World!" << endl; </pre> <p>浣跨敤##榪炵粨##鍓嶅悗鐨勫唴瀹? 渚嬪, 鍛戒護(hù) </p> <pre> #define concatenate( x, y ) x ## y ... int xy = 10; ... </pre> <p>灝嗕細(xì)浣跨紪璇戝櫒鎶?</p> <pre> cout << concatenate( x, y ) << endl; </pre> <p>瑙i噴涓?</p> <pre> cout << xy << endl; </pre> <p>鐞嗘墍褰撶劧,灝嗕細(xì)鍦ㄦ爣鍑嗚緭鍑哄鏄劇ず'10'.</p> <br><br> <h2><a name=line>#line</a> </h2> <em>璇硶:</em> <table bgColor=#ccccff> <tbody> <tr> <td> <pre> #line line_number "filename" </pre> </td> </tr> </tbody> </table> <p>#line鍛戒護(hù)鏄敤浜庢洿鏀筥_LINE__ 鍜?__FILE__鍙橀噺鐨勫? 鏂囦歡鍚嶆槸鍙夌殑. __LINE__ 鍜?__FILE__ 鍙橀噺鎻忚堪琚鍙栫殑褰撳墠鏂囦歡鍜岃. 鍛戒護(hù) </p> <pre> #line 10 "main.cpp" </pre> <p>鏇存敼琛屽彿涓?0,褰撳墠鏂囦歡鏀逛負(fù)"main.cpp". <br><br><br></p> <h2><a name=predefined>棰勫畾涔夊彉閲?/a> </h2> <p><em>璇硶:</em> <table bgColor=#ccccff> <tbody> <tr> <td> <pre> __LINE__ __FILE__ __DATE__ __TIME__ _cplusplus __STDC__ </pre> </td> </tr> </tbody> </table> </p> <p>涓嬪垪鍙傛暟鍦ㄤ笉鍚岀殑緙栬瘧鍣ㄥ彲鑳戒細(xì)鏈夋墍涓嶅悓, 浣嗘槸涓鑸槸鍙敤鐨? <ul> <li>__LINE__ 鍜?__FILE__ 鍙橀噺琛ㄧず姝e湪澶勭悊鐨勫綋鍓嶈鍜屽綋鍓嶆枃浠? <li>__DATE__ 鍙橀噺琛ㄧず褰撳墠鏃ユ湡,鏍煎紡涓?em>month/day/year</em>(鏈?鏃?騫?. <li>__TIME__ 鍙橀噺鎻忚堪褰撳墠鐨勬椂闂?鏍煎紡涓?em>hour:minute:second</em>(鏃?鍒?縐?. <li>_cplusplus 鍙橀噺鍙湪緙栬瘧涓涓狢++紼嬪簭鏃跺畾涔? <li>__STDC__ 鍙橀噺鍦ㄧ紪璇戜竴涓狢紼嬪簭鏃跺畾涔?緙栬瘧C++鏃朵篃鏈夊彲鑳藉畾涔? </li> </ul> <br> <img src ="http://www.shnenglu.com/maosher/aggbug/140191.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/maosher/" target="_blank">Brandon</a> 2011-02-17 00:04 <a href="http://www.shnenglu.com/maosher/archive/2011/02/17/140191.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>浠嬬粛涓涓枃浠舵仮澶嶅伐鍏?/title><link>http://www.shnenglu.com/maosher/archive/2011/02/16/140190.html</link><dc:creator>Brandon</dc:creator><author>Brandon</author><pubDate>Wed, 16 Feb 2011 15:56:00 GMT</pubDate><guid>http://www.shnenglu.com/maosher/archive/2011/02/16/140190.html</guid><wfw:comment>http://www.shnenglu.com/maosher/comments/140190.html</wfw:comment><comments>http://www.shnenglu.com/maosher/archive/2011/02/16/140190.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/maosher/comments/commentRss/140190.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/maosher/services/trackbacks/140190.html</trackback:ping><description><![CDATA[<p>浠婂ぉ鍚屽鐨剈鐩樿涓嶅嚭鏁版嵁鏉ヤ簡(jiǎn)錛屾彁紺烘湭鏍煎紡鍖栵紝鍦ㄧ嚎鎼滀簡(jiǎn)涓</p> <p>涓嬶紝鎵懼埌涓涓悕鍙玾inhex鐨勫伐鍏楓傛尯濂界敤鐨勶紝澶у鏈夎繖鏍風(fēng)殑</p> <p>闂鐨勬椂鍊欏彲浠ョ敤涓涓嬨?br>鐚滄兂涓涓媤inhex鐨勬仮澶嶆寚瀹氱被鍨嬫枃浠跺伐浣滃師鐞?br>struct stBitMap<br>{<br> uint fileType;<br> uint ver;<br> uint size;<br> uint createDate; <br>}</p> <p>鍋囧涓婇潰鏄竴涓綅鍥劇殑鏂囦歡緇撴瀯澶撮儴鍒嗭紝閭d箞winhex閫愭鎵?/p> <p>鎻忔枃浠跺潡姣旇緝 鍜岃繖涓粨鏋勯噷姣旇緝</p> <img src ="http://www.shnenglu.com/maosher/aggbug/140190.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/maosher/" target="_blank">Brandon</a> 2011-02-16 23:56 <a href="http://www.shnenglu.com/maosher/archive/2011/02/16/140190.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>濂藉惂錛屾垜琚緛鏈嶄簡(jiǎn)鈥斺?鍏充簬 c++ unsigned char http://www.shnenglu.com/maosher/archive/2011/02/13/139977.htmlBrandonBrandonSun, 13 Feb 2011 08:12:00 GMThttp://www.shnenglu.com/maosher/archive/2011/02/13/139977.htmlhttp://www.shnenglu.com/maosher/comments/139977.htmlhttp://www.shnenglu.com/maosher/archive/2011/02/13/139977.html#Feedback0http://www.shnenglu.com/maosher/comments/commentRss/139977.htmlhttp://www.shnenglu.com/maosher/services/trackbacks/139977.html1 unsigned char i;
2 i=-20;
3  涓婇潰涓孌靛緢綆鍗曠殑浠g爜錛屽鏋滆緭鍑轟細(xì)鏄粈涔?鍛紵
浠婂ぉ緹ら噷鐨勬柊瀛++鍚屽闂垜錛寀nsighed char 鍜宑har 鏈夊暐鍖哄埆錛屼笂闈㈢殑杈撳嚭浼?xì)鏈変粈涔?涓嶅悓
鍦ㄨ繖閲岋紝鎴戝厛閯欒涓涓嬭嚜宸憋紝鎴戠洿瑙傜殑鐞嗚В涓洪氬父鐨?棣栦綅絎﹀彿浣嶏紝鐒跺悗涓笅鐨勫氨鏄緭鍏ユ棤絎﹀彿鐨勩傚ソ鍚э紝浼拌鍚勪綅鐪嬪畼璇存垜澶彍錛屼絾紜疄鏄緭鍑虹殑緇撴灉鍜屾垜鎯崇殑涓嶅ぇ涓鏍鳳紝濡傛灉鍚勪綅娌℃槑鐧芥垜璇寸殑鏄粈涔堥棶棰橈紝鍙互璇曚竴涓嬨傜劧鍚庡洖鏉ョ湅涓嬮潰鐨勫唴瀹廣?br>











銆?br>

In an unsigned type, all the bits represent the value. If a type is defined for a particular machine to use 8 bits, then the unsigned version of this type could hold the values 0 through 255.

鏃犵鍙峰瀷涓紝鎵鏈夌殑浣嶉兘琛ㄧず鏁板箋傚鏋滃湪鏌愮鏈哄櫒涓紝瀹氫箟涓縐嶇被鍨嬩嬌鐢?8 浣嶈〃紺猴紝閭d箞榪欑綾誨瀷鐨? unsigned 鍨嬪彲浠ュ彇鍊?0 鍒?255銆?/p>

The C++ standard does not define how signed types are represented at the bit level. Instead, each compiler is free to decide how it will represent signed types. These representations can affect the range of values that a signed type can hold. We are guaranteed that an 8-bit signed type will hold at least the values from 127 through 127; many implementations allow values from 128 through 127.

C++ 鏍囧噯騫舵湭瀹氫箟 signed 綾誨瀷濡備綍鐢ㄤ綅鏉ヨ〃紺猴紝鑰屾槸鐢辨瘡涓紪璇戝櫒鑷敱鍐沖畾濡備綍琛ㄧず signed 綾誨瀷銆傝繖浜涜〃紺烘柟寮忎細(xì)褰卞搷 signed 綾誨瀷鐨勫彇鍊艱寖鍥淬? 浣?signed 綾誨瀷鐨勫彇鍊艱偗瀹氳嚦灝戞槸浠?-127 鍒?127錛屼絾涔熸湁璁稿瀹炵幇鍏佽鍙栧間粠 -128 鍒?127銆?/p>

Under the most common strategy for representing signed integral types, we can view one of the bits as a sign bit. Whenever the sign bit is 1, the value is negative; when it is 0, the value is either 0 or a positive number. An 8-bit integral signed type represented using a sign-bit can hold values from 128 through 127.

琛ㄧず signed 鏁村瀷綾誨瀷鏈甯歌鐨勭瓥鐣ユ槸鐢ㄥ叾涓竴涓綅浣滀負(fù)絎﹀彿浣嶃傜鍙蜂綅涓?1錛屽煎氨涓鴻礋鏁幫紱絎﹀彿浣嶄負(fù) 0錛屽煎氨涓?0 鎴栨鏁般備竴涓?signed 鏁村瀷鍙栧兼槸浠?-128 鍒?127銆?/p>

Assignment to Integral Types
鏁村瀷鐨勮祴鍊?/h5>

The type of an object determines the values that the object can hold. This fact raises the question of what happens when one tries to assign a value outside the allowable range to an object of a given type. The answer depends on whether the type is signed or unsigned.

瀵硅薄鐨勭被鍨嬪喅瀹氬璞$殑鍙栧箋傝繖浼?xì)寮曡捣涓涓枒闂細(xì)褰撴垜浠瘯鐫鎶婁竴涓秴鍑哄叾鍙栧艱寖鍥寸殑鍊艱祴緇欎竴涓寚瀹氱被鍨嬬殑瀵硅薄鏃訛紝緇撴灉浼?xì)鎬庢牱鍛紵絳旀鍙栧喅浜庤繖縐嶇被鍨嬫槸 signed 榪樻槸 unsigned 鐨勩?/p>

For unsigned types, the compiler must adjust the out-of-range value so that it will fit. The compiler does so by taking the remainder of the value modulo the number of distinct values the unsigned target type can hold. An object that is an 8-bit unsigned char, for example, can hold values from 0 through 255 inclusive. If we assign a value outside this range, the compiler actually assigns the remainder of the value modulo 256. For example, we might attempt to assign the value 336 to an 8-bit signed char. If we try to store 336 in our 8-bit unsigned char, the actual value assigned will be 80, because 80 is equal to 336 modulo 256.

瀵逛簬 unsigned 綾誨瀷鏉ヨ錛岀紪璇戝櫒蹇呴』璋冩暣瓚婄晫鍊間嬌鍏舵弧瓚寵姹傘傜紪璇戝櫒浼?xì)灏嗚鍊煎 unsigned 綾誨瀷鐨勫彲鑳藉彇鍊兼暟鐩眰妯★紝鐒跺悗鍙栨墍寰楀箋傛瘮濡?8 浣嶇殑 unsigned char錛屽叾鍙栧艱寖鍥翠粠 0 鍒? 255錛堝寘鎷?255錛夈傚鏋滆祴緇欒秴鍑?guó)櫩欎釜鑼冨洿鐨勫鹼紝閭d箞緙栬瘧鍣ㄥ皢浼?xì)鍙栬鍊煎 256 姹傛ā鍚庣殑鍊箋備緥濡傦紝濡傛灉璇曞浘灝?336 瀛樺偍鍒?8 浣嶇殑 unsigned char 涓紝鍒欏疄闄呰祴鍊間負(fù) 80錛屽洜涓?80 鏄?336 瀵?256 姹傛ā鍚庣殑鍊箋?/p>

For the unsigned types, a negative value is always out of range. An object of unsigned type may never hold a negative value. Some languages make it illegal to assign a negative value to an unsigned type, but C++ does not.

瀵逛簬 unsigned 綾誨瀷鏉ヨ錛岃礋鏁版繪槸瓚呭嚭鍏跺彇鍊艱寖鍥淬?tt>unsigned 綾誨瀷鐨勫璞″彲鑳芥案榪滀笉浼?xì)淇濆瓨璐熸暟銆傛湁浜涜璦涓皢璐熸暟璧嬬粰 unsigned 綾誨瀷鏄潪娉曠殑錛屼絾鍦?C++ 涓繖鏄悎娉曠殑銆?/p>


In C++ it is perfectly legal to assign a negative number to an object with unsigned type. The result is the negative value modulo the size of the type. So, if we assign 1 to an 8-bit unsigned char, the resulting value will be 255, which is 1 modulo 256.

C++ 涓紝鎶婅礋鍊艱祴緇?unsigned 瀵硅薄鏄畬鍏ㄥ悎娉曠殑錛屽叾緇撴灉鏄璐熸暟瀵硅綾誨瀷鐨勫彇鍊間釜鏁版眰妯″悗鐨勫箋傛墍浠ワ紝濡傛灉鎶?-1 璧嬬粰8浣嶇殑 unsigned char錛岄偅涔堢粨鏋滄槸 255錛屽洜涓?255 鏄?-1 瀵?256 姹傛ā鍚庣殑鍊箋?/p>



When assigning an out-of-range value to a signed type, it is up to the compiler to decide what value to assign. In practice, many compilers treat signed types similarly to how they are required to treat unsigned types. That is, they do the assignment as the remainder modulo the size of the type. However, we are not guaranteed that the compiler will do so for the signed types.

褰撳皢瓚呰繃鍙栧艱寖鍥寸殑鍊艱祴緇?signed 綾誨瀷鏃訛紝鐢辯紪璇戝櫒鍐沖畾瀹為檯璧嬬殑鍊箋傚湪瀹為檯鎿嶄綔涓紝寰堝鐨勭紪璇戝櫒澶勭悊 signed 綾誨瀷鐨勬柟寮忓拰 unsigned 綾誨瀷綾諱技銆備篃灝辨槸璇達(dá)紝璧嬪兼椂鏄彇璇ュ煎璇ョ被鍨嬪彇鍊兼暟鐩眰妯″悗鐨勫箋傜劧鑰屾垜浠笉鑳戒繚璇佺紪璇戝櫒閮戒細(xì)榪欐牱澶勭悊 signed 綾誨瀷銆?/p>



浠ヤ笂鎽樿嚜 c++ primer,鎯劎錛岃繕鏄啀緇嗙粏鐨勪粠澶村搧涓嬈¤繖涔﹀惂銆?br>











Brandon 2011-02-13 16:12 鍙戣〃璇勮
]]>澶у鏉ョ湅涓嬭繖涓猻ql璇彞http://www.shnenglu.com/maosher/archive/2010/10/25/131209.htmlBrandonBrandonMon, 25 Oct 2010 08:41:00 GMThttp://www.shnenglu.com/maosher/archive/2010/10/25/131209.htmlhttp://www.shnenglu.com/maosher/comments/131209.htmlhttp://www.shnenglu.com/maosher/archive/2010/10/25/131209.html#Feedback0http://www.shnenglu.com/maosher/comments/commentRss/131209.htmlhttp://www.shnenglu.com/maosher/services/trackbacks/131209.htmlIF (@ID NOT IN (@IDS))
begin
---do
end

澶ч儴鍒嗘椂闂存垜浠敤IN 錛孨OT IN鍦╓HERE瀛愬彞閲岋紝榪欐牱鐩存帴鐢ㄥソ涔堬紝鏈変粈涔堥棶棰橈紝嬈㈣繋璁ㄨ


Brandon 2010-10-25 16:41 鍙戣〃璇勮
]]>
SQL瀛楃涓插嚱鏁幫紙浜岋級(jí)http://www.shnenglu.com/maosher/archive/2010/10/22/130850.htmlBrandonBrandonFri, 22 Oct 2010 00:32:00 GMThttp://www.shnenglu.com/maosher/archive/2010/10/22/130850.htmlhttp://www.shnenglu.com/maosher/comments/130850.htmlhttp://www.shnenglu.com/maosher/archive/2010/10/22/130850.html#Feedback0http://www.shnenglu.com/maosher/comments/commentRss/130850.htmlhttp://www.shnenglu.com/maosher/services/trackbacks/130850.html涓銆佸瓧絎﹁漿鎹㈠嚱鏁?/strong>
1銆丄SCII()
榪斿洖瀛楃琛ㄨ揪寮忔渶宸︾瀛楃鐨凙SCII 鐮佸箋傚湪ASCII錛堬級(jí)鍑芥暟涓紝綰暟瀛楃殑瀛楃涓插彲涓嶇敤‘’鎷搗鏉ワ紝浣嗗惈鍏跺畠瀛楃鐨勫瓧絎︿覆蹇呴』鐢?#8216;’鎷搗鏉ヤ嬌鐢紝鍚﹀垯浼?xì)鍑洪敊銆?/span>
2銆丆HAR()
灝咥SCII 鐮佽漿鎹負(fù)瀛楃銆傚鏋滄病鏈夎緭鍏? ~ 255 涔嬮棿鐨凙SCII 鐮佸鹼紝CHAR錛堬級(jí) 榪斿洖NULL 銆?/span>
3銆丩OWER()鍜孶PPER()
LOWER()灝嗗瓧絎︿覆鍏ㄩ儴杞負(fù)灝忓啓錛沀PPER()灝嗗瓧絎︿覆鍏ㄩ儴杞負(fù)澶у啓銆?/span>
4銆丼TR()
鎶婃暟鍊煎瀷鏁版嵁杞崲涓哄瓧絎﹀瀷鏁版嵁銆?/span>
STR (<float_expression>[錛宭ength[錛?<decimal>]])
length 鎸囧畾榪斿洖鐨勫瓧絎︿覆鐨勯暱搴︼紝decimal 鎸囧畾榪斿洖鐨勫皬鏁頒綅鏁般傚鏋滄病鏈夋寚瀹氶暱搴︼紝緙虹渷鐨刲ength 鍊間負(fù)10錛?decimal 緙虹渷鍊間負(fù)0銆?/span>
褰搇ength 鎴栬卍ecimal 涓鴻礋鍊兼椂錛岃繑鍥濶ULL錛?/span>
褰搇ength 灝忎簬灝忔暟鐐瑰乏杈癸紙鍖呮嫭絎﹀彿浣嶏級(jí)鐨勪綅鏁版椂錛岃繑鍥瀕ength 涓?錛?/span>
鍏堟湇浠巐ength 錛屽啀鍙杁ecimal 錛?/span>
褰撹繑鍥炵殑瀛楃涓蹭綅鏁板皬浜巐ength 錛屽乏杈硅ˉ瓚崇┖鏍箋?/span>
浜屻佸幓絀烘牸鍑芥暟
1銆丩TRIM() 鎶婂瓧絎︿覆澶撮儴鐨勭┖鏍煎幓鎺夈?/span>

2銆丷TRIM() 鎶婂瓧絎︿覆灝鵑儴鐨勭┖鏍煎幓鎺夈?/span>

涓夈佸彇瀛愪覆鍑芥暟
1銆乴eft() 
LEFT (<character_expression>錛?<integer_expression>)
榪斿洖character_expression 宸﹁搗 integer_expression 涓瓧絎︺?/span>

2銆丷IGHT() 
RIGHT (<character_expression>錛?<integer_expression>)
榪斿洖character_expression 鍙寵搗 integer_expression 涓瓧絎︺?/span>

3銆丼UBSTRING()
SUBSTRING (<expression>錛?<starting_ position>錛?length)
榪斿洖浠庡瓧絎︿覆宸﹁竟絎瑂tarting_ position 涓瓧絎﹁搗length涓瓧絎︾殑閮ㄥ垎銆?/span>

鍥涖佸瓧絎︿覆姣旇緝鍑芥暟
1銆丆HARINDEX()
榪斿洖瀛楃涓蹭腑鏌愪釜鎸囧畾鐨勫瓙涓插嚭鐜扮殑寮濮嬩綅緗?/span>
CHARINDEX (<’substring_expression’>錛?<expression>)
鍏朵腑substring _expression 鏄墍瑕佹煡鎵劇殑瀛楃琛ㄨ揪寮忥紝expression 鍙負(fù)瀛楃涓蹭篃鍙負(fù)鍒楀悕琛ㄨ揪寮忋傚鏋滄病鏈夊彂鐜板瓙涓詫紝鍒欒繑鍥? 鍊箋?/span>
姝ゅ嚱鏁頒笉鑳界敤浜嶵EXT 鍜孖MAGE 鏁版嵁綾誨瀷銆?/span>
2銆丳ATINDEX()
榪斿洖瀛楃涓蹭腑鏌愪釜鎸囧畾鐨勫瓙涓插嚭鐜扮殑寮濮嬩綅緗?/span>
PATINDEX (<’%substring _expression%’>錛?<column_ name>)鍏朵腑瀛愪覆琛ㄨ揪寮忓墠鍚庡繀欏繪湁鐧懼垎鍙?#8220;%”鍚﹀垯榪斿洖鍊間負(fù)0銆?/span>
涓嶤HARINDEX 鍑芥暟涓嶅悓鐨勬槸錛孭ATINDEX鍑芥暟鐨勫瓙涓蹭腑鍙互浣跨敤閫氶厤絎︼紝涓旀鍑芥暟鍙敤浜嶤HAR銆?VARCHAR 鍜孴EXT 鏁版嵁綾誨瀷銆?/span>

浜斻佸瓧絎︿覆鎿嶄綔鍑芥暟
1銆丵UOTENAME()
榪斿洖琚壒瀹氬瓧絎︽嫭璧鋒潵鐨勫瓧絎︿覆銆?/span>
QUOTENAME (<’character_expression’>[錛?quote_ character]) 鍏朵腑quote_ character 鏍囨槑鎷瓧絎︿覆鎵鐢ㄧ殑瀛楃錛岀己鐪佸間負(fù)“[]”銆?/span>
2銆丷EPLICATE()
榪斿洖涓涓噸澶峜haracter_expression 鎸囧畾嬈℃暟鐨勫瓧絎︿覆銆?/span>
REPLICATE (character_expression integer_expression) 濡傛灉integer_expression 鍊間負(fù)璐熷鹼紝鍒欒繑鍥濶ULL 銆?/span>

3銆丷EVERSE()
灝嗘寚瀹氱殑瀛楃涓茬殑瀛楃鎺掑垪欏哄簭棰犲掋?/span>
REVERSE (<character_expression>) 鍏朵腑character_expression 鍙互鏄瓧絎︿覆銆佸父鏁版垨涓涓垪鐨勫箋?/span>

4銆丷EPLACE()
榪斿洖琚浛鎹簡(jiǎn)鎸囧畾瀛愪覆鐨勫瓧絎︿覆銆?/span>
REPLACE (<string_expression1>錛?<string_expression2>錛?<string_expression3>) 鐢╯tring_expression3 鏇挎崲鍦╯tring_expression1 涓殑瀛愪覆string_expression2銆?/span>

4銆丼PACE()
榪斿洖涓涓湁鎸囧畾闀垮害鐨勭┖鐧藉瓧絎︿覆銆?/span>
SPACE (<integer_expression>) 濡傛灉integer_expression 鍊間負(fù)璐熷鹼紝鍒欒繑鍥濶ULL 銆?/span>

5銆丼TUFF()
鐢ㄥ彟涓瀛愪覆鏇挎崲瀛楃涓叉寚瀹氫綅緗侀暱搴︾殑瀛愪覆銆?/span>
STUFF (<character_expression1>錛?<start_ position>錛?<length>錛?lt;character_expression2>)
濡傛灉璧峰浣嶇疆涓鴻礋鎴栭暱搴﹀間負(fù)璐燂紝鎴栬呰搗濮嬩綅緗ぇ浜巆haracter_expression1 鐨勯暱搴︼紝鍒欒繑鍥濶ULL 鍊箋?/span>
濡傛灉length 闀垮害澶т簬character_expression1 涓?start_ position 浠ュ彸鐨勯暱搴︼紝鍒檆haracter_expression1 鍙繚鐣欓瀛楃銆?/span>
鍏佹暟鎹被鍨嬭漿鎹㈠嚱鏁?/strong>
1銆丆AST()
CAST (<expression> AS <data_ type>[ length ])

2銆丆ONVERT()
CONVERT (<data_ type>[ length ]錛?<expression> [錛?style])

1錛塪ata_type涓篠QL Server緋葷粺瀹氫箟鐨勬暟鎹被鍨嬶紝鐢ㄦ埛鑷畾涔夌殑鏁版嵁綾誨瀷涓嶈兘鍦ㄦ浣跨敤銆?/span>
2錛塴ength鐢ㄤ簬鎸囧畾鏁版嵁鐨勯暱搴︼紝緙虹渷鍊間負(fù)30銆?/span>
3錛夋妸CHAR鎴朧ARCHAR綾誨瀷杞崲涓鴻濡侷NT鎴朣AMLLINT榪欐牱鐨処NTEGER綾誨瀷銆佺粨鏋滃繀欏繪槸甯︽鍙鋒垨璐熷彿鐨勬暟鍊箋?/span>
4錛塗EXT綾誨瀷鍒癈HAR鎴朧ARCHAR綾誨瀷杞崲鏈澶氫負(fù)8000涓瓧絎︼紝鍗矯HAR鎴朧ARCHAR鏁版嵁綾誨瀷鏄渶澶ч暱搴︺?/span>
5錛塈MAGE綾誨瀷瀛樺偍鐨勬暟鎹漿鎹㈠埌BINARY鎴朧ARBINARY綾誨瀷錛屾渶澶氫負(fù)8000涓瓧絎︺?/span>
6錛夋妸鏁存暟鍊艱漿鎹負(fù)MONEY鎴朣MALLMONEY綾誨瀷錛屾寜瀹氫箟鐨勫浗瀹剁殑璐у竵鍗曚綅鏉ュ鐞嗭紝濡備漢姘戝竵銆佺編鍏冦佽嫳闀戠瓑銆?/span>
7錛塀IT綾誨瀷鐨勮漿鎹㈡妸闈為浂鍊艱漿鎹負(fù)1錛屽茍浠嶄互BIT綾誨瀷瀛樺偍銆?/span>
8錛夎瘯鍥捐漿鎹㈠埌涓嶅悓闀垮害鐨勬暟鎹被鍨嬶紝浼?xì)鎴煭铦{鎹㈠煎茍鍦ㄨ漿鎹㈠煎悗鏄劇ず“+”錛屼互鏍囪瘑鍙戠敓浜?jiǎn)杩櫩U嶆埅鏂?/span>
9錛夌敤CONVERT錛堬級(jí) 鍑芥暟鐨剆tyle 閫夐」鑳戒互涓嶅悓鐨勬牸寮忔樉紺烘棩鏈熷拰鏃墮棿銆俿tyle 鏄皢DATATIME 鍜孲MALLDATETIME 鏁版嵁杞崲涓哄瓧絎︿覆鏃舵墍閫夌敤鐨勭敱SQL Server 緋葷粺鎻愪緵鐨勮漿鎹㈡牱寮忕紪鍙鳳紝涓嶅悓鐨勬牱寮忕紪鍙鋒湁涓嶅悓鐨勮緭鍑烘牸寮忋?/span>
涓冦佹棩鏈熷嚱鏁?/strong>
1銆乨ay(date_expression) 
榪斿洖date_expression涓殑鏃ユ湡鍊?/span>

2銆乵onth(date_expression)
榪斿洖date_expression涓殑鏈堜喚鍊?/span>

3銆亂ear(date_expression)
榪斿洖date_expression涓殑騫翠喚鍊?/span>

4銆丏ATEADD()
DATEADD (<datepart>錛?<number>錛?<date>)
榪斿洖鎸囧畾鏃ユ湡date 鍔犱笂鎸囧畾鐨勯澶栨棩鏈熼棿闅攏umber 浜х敓鐨勬柊鏃ユ湡銆?/span>
5銆丏ATEDIFF()
DATEDIFF (<datepart>錛?<date1>錛?<date2>)
榪斿洖涓や釜鎸囧畾鏃ユ湡鍦╠atepart 鏂歸潰鐨勪笉鍚屼箣澶勶紝鍗砫ate2 瓚呰繃date1鐨勫樊璺濆鹼紝鍏剁粨鏋滃兼槸涓涓甫鏈夋璐熷彿鐨勬暣鏁板箋?/span>

6銆丏ATENAME()
DATENAME (<datepart>錛?<date>)
浠ュ瓧絎︿覆鐨勫艦寮忚繑鍥炴棩鏈熺殑鎸囧畾閮ㄥ垎姝ら儴鍒嗐傜敱datepart 鏉ユ寚瀹氥?/span>

7銆丏ATEPART()
DATEPART (<datepart>錛?<date>)
浠ユ暣鏁板肩殑褰㈠紡榪斿洖鏃ユ湡鐨勬寚瀹氶儴鍒嗐傛閮ㄥ垎鐢眃atepart 鏉ユ寚瀹氥?/span>
DATEPART (dd錛?date) 絳夊悓浜嶥AY (date)
DATEPART (mm錛?date) 絳夊悓浜嶮ONTH (date)
DATEPART (yy錛?date) 絳夊悓浜嶻EAR (date)

8銆丟ETDATE()
浠ATETIME 鐨勭己鐪佹牸寮忚繑鍥炵郴緇熷綋鍓嶇殑鏃ユ湡鍜屾椂闂淬?/span> 

Brandon 2010-10-22 08:32 鍙戣〃璇勮
]]>
Sql瀛楃涓插嚱鏁?/title><link>http://www.shnenglu.com/maosher/archive/2010/10/21/130776.html</link><dc:creator>Brandon</dc:creator><author>Brandon</author><pubDate>Thu, 21 Oct 2010 10:01:00 GMT</pubDate><guid>http://www.shnenglu.com/maosher/archive/2010/10/21/130776.html</guid><wfw:comment>http://www.shnenglu.com/maosher/comments/130776.html</wfw:comment><comments>http://www.shnenglu.com/maosher/archive/2010/10/21/130776.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/maosher/comments/commentRss/130776.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/maosher/services/trackbacks/130776.html</trackback:ping><description><![CDATA[ <div><strong><span style="font-weight: normal; font-family: verdana, 'ms song', 瀹?huà)浣? Arial, 寰蔣闆呴粦, Helvetica, sans-serif; font-size: 13px; line-height: 19px; "><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 0px; line-height: 1.5em; color: rgb(0, 0, 0); font-size: 13px; ">棣栧厛瀛︿範(fàn)涓や釜鍑芥暟<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "></p>1.<strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">substring</strong>  榪斿洖瀛楃銆乥inary銆乼ext 鎴?image 琛ㄨ揪寮忕殑涓閮ㄥ垎銆?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">      <strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">鍩烘湰璇硶:</strong>SUBSTRING <strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">( </strong><em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">expression </em><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">,</strong> <em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">start </em><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">,</strong> <em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">length </em><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">) </strong><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">      <em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">expression</em>:瀛楃涓層佷簩榪涘埗瀛楃涓層乼ext銆乮mage銆佸垪鎴栧寘鍚垪鐨勮〃杈懼紡<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">      <em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">start</em>:鏁存暟錛屾寚瀹氬瓙涓茬殑寮濮嬩綅緗?nbsp;     <span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(255, 0, 0); background-color: rgb(204, 255, 204); ">娉?SQL涓?1"琛ㄧず瀛楃涓蹭腑鐨勭涓涓瓧絎?鑰?NET涓?0"琛ㄧず絎竴涓瓧絎?/span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">      <em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">length</em>:鏁存暟錛屾寚瀹氬瓙涓茬殑闀垮害錛堣榪斿洖鐨勫瓧絎︽暟鎴栧瓧鑺傛暟錛?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> 2.<strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">patindex</strong>  榪斿洖鎸囧畾琛ㄨ揪寮忎腑鏌愭ā寮忕涓嬈″嚭鐜扮殑璧峰浣嶇疆錛涘鏋滃湪鍏ㄩ儴鏈夋晥鐨勬枃鏈拰瀛楃鏁版嵁綾誨瀷涓病鏈夋壘鍒拌妯″紡錛屽垯榪斿洖闆躲?br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">      <strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">鍩烘湰璇硶:</strong>PATINDEX <strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">( '</strong><em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">%pattern%</em><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">' ,</strong> <em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">expression </em><strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">) <br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">      </strong><em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">pattern:</em>瀛楃涓層傚彲浠ヤ嬌鐢ㄩ氶厤絎︼紝浣?pattern 涔嬪墠鍜屼箣鍚庡繀欏繪湁 % 瀛楃錛堟悳绱㈢涓涓拰鏈鍚庝竴涓瓧絎︽椂闄ゅ錛夈俻attern 鏄煭瀛楃鏁版嵁綾誨瀷綾誨埆鐨勮〃杈懼紡<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><em style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">      expression</em>:琛ㄨ揪寮忥紝閫氬父涓鴻鍦ㄥ叾涓悳绱㈡寚瀹氭ā寮忕殑鍒楋紝expression 涓哄瓧絎︿覆鏁版嵁綾誨瀷</span></strong></div><div><strong><span style="font-weight: normal; font-family: verdana, 'ms song', 瀹?huà)浣? Arial, 寰蔣闆呴粦, Helvetica, sans-serif; font-size: 13px; line-height: 19px; "><br></span></strong></div><div><strong><span style="font-weight: normal; font-family: verdana, 'ms song', 瀹?huà)浣? Arial, 寰蔣闆呴粦, Helvetica, sans-serif; font-size: 13px; line-height: 19px; "><br></span></strong></div><div><strong><span style="font-weight: normal; font-family: verdana, 'ms song', 瀹?huà)浣? Arial, 寰蔣闆呴粦, Helvetica, sans-serif; font-size: 13px; line-height: 19px; "><table id="Table1" class="tb" cellspacing="0" cellpadding="3" border="0" style="font-size: 13px; font-family: Simsun; line-height: normal; "><tbody><tr><td><pre><div><span style="color: rgb(0, 0, 255); ">declare</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); ">@a</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 0); font-weight: bold; ">varchar</span><span style="color: rgb(0, 0, 0); ">(</span><span style="color: rgb(128, 0, 0); font-weight: bold; ">50</span><span style="color: rgb(0, 0, 0); ">) </span><span style="color: rgb(0, 0, 255); ">set</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); ">@a</span><span style="color: rgb(128, 128, 128); ">=</span><span style="color: rgb(255, 0, 0); ">'</span><span style="color: rgb(255, 0, 0); ">2009騫?鏈?5鏃ユ槦鏈熶簲</span><span style="color: rgb(255, 0, 0); ">'</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">select</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(255, 0, 255); ">substring</span><span style="color: rgb(0, 0, 0); ">(</span><span style="color: rgb(0, 128, 0); ">@a</span><span style="color: rgb(0, 0, 0); ">,</span><span style="color: rgb(128, 0, 0); font-weight: bold; ">1</span><span style="color: rgb(0, 0, 0); ">,</span><span style="color: rgb(128, 0, 0); font-weight: bold; ">4</span><span style="color: rgb(0, 0, 0); ">) </span><span style="color: rgb(0, 128, 128); ">--</span><span style="color: rgb(0, 128, 128); ">鑾峰彇騫翠喚2009</span><span style="color: rgb(0, 128, 128); "> </span><span style="color: rgb(0, 0, 255); ">declare</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); ">@b</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 0); font-weight: bold; ">int</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 0, 255); ">set</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(0, 128, 0); ">@b</span><span style="color: rgb(128, 128, 128); ">=</span><span style="color: rgb(255, 0, 255); ">patindex</span><span style="color: rgb(0, 0, 0); ">(</span><span style="color: rgb(255, 0, 0); ">'</span><span style="color: rgb(255, 0, 0); ">%鏃?</span><span style="color: rgb(255, 0, 0); ">'</span><span style="color: rgb(0, 0, 0); ">,</span><span style="color: rgb(0, 128, 0); ">@a</span><span style="color: rgb(0, 0, 0); ">) </span><span style="color: rgb(0, 128, 128); ">--</span><span style="color: rgb(0, 128, 128); ">鑾峰彇'鏃?榪欎釜瀛楃鍦ㄥ瓧絎︿覆涓殑浣嶇疆,鍗?0</span><span style="color: rgb(0, 128, 128); "> </span><span style="color: rgb(0, 0, 255); ">select</span><span style="color: rgb(0, 0, 0); "> </span><span style="color: rgb(255, 0, 255); ">substring</span><span style="color: rgb(0, 0, 0); ">(</span><span style="color: rgb(0, 128, 0); ">@a</span><span style="color: rgb(0, 0, 0); ">,</span><span style="color: rgb(128, 0, 0); font-weight: bold; ">6</span><span style="color: rgb(0, 0, 0); ">,</span><span style="color: rgb(0, 128, 0); ">@b</span><span style="color: rgb(128, 128, 128); ">-</span><span style="color: rgb(128, 0, 0); font-weight: bold; ">5</span><span style="color: rgb(0, 0, 0); ">) </span><span style="color: rgb(0, 128, 128); ">--</span><span style="color: rgb(0, 128, 128); ">鑾峰彇鏃ユ湡'7鏈?5鏃?</span></div></pre></td></tr></tbody></table></span></strong></div><img src ="http://www.shnenglu.com/maosher/aggbug/130776.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/maosher/" target="_blank">Brandon</a> 2010-10-21 18:01 <a href="http://www.shnenglu.com/maosher/archive/2010/10/21/130776.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>AfxGetMainWnd()鍦ㄧ嚎紼嬮噷浣跨敤鐨勯棶棰?/title><link>http://www.shnenglu.com/maosher/archive/2010/08/26/124783.html</link><dc:creator>Brandon</dc:creator><author>Brandon</author><pubDate>Thu, 26 Aug 2010 03:08:00 GMT</pubDate><guid>http://www.shnenglu.com/maosher/archive/2010/08/26/124783.html</guid><wfw:comment>http://www.shnenglu.com/maosher/comments/124783.html</wfw:comment><comments>http://www.shnenglu.com/maosher/archive/2010/08/26/124783.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/maosher/comments/commentRss/124783.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/maosher/services/trackbacks/124783.html</trackback:ping><description><![CDATA[<font size=1>AfxGetMainWnd()鐨勪嬌鐢ㄤ緷璧栦簬綰跨▼<br>鍏蜂綋鍙傚姞婧愪唬鐮?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><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><span style="COLOR: #000000">_AFXWIN_INLINE CWnd</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> AFXAPI AfxGetMainWnd()<br></span><span style="COLOR: #008080"> 2</span><span style="COLOR: #000000"><img id=Codehighlighter1_44_142_Open_Image onclick="this.style.display='none'; Codehighlighter1_44_142_Open_Text.style.display='none'; Codehighlighter1_44_142_Closed_Image.style.display='inline'; Codehighlighter1_44_142_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_44_142_Closed_Image onclick="this.style.display='none'; Codehighlighter1_44_142_Closed_Text.style.display='none'; Codehighlighter1_44_142_Open_Image.style.display='inline'; Codehighlighter1_44_142_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_44_142_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_44_142_Open_Text><span style="COLOR: #000000">{ CWinThread</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> pThread </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> AfxGetThread();<br></span><span style="COLOR: #008080"> 3</span><span style="COLOR: #000000"><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif">   </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> pThread </span><span style="COLOR: #000000">!=</span><span style="COLOR: #000000"> NULL </span><span style="COLOR: #000000">?</span><span style="COLOR: #000000"> pThread</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">GetMainWnd() : NULL; }</span></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 4</span><span style="COLOR: #000000"><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"><br></span><span style="COLOR: #008080"> 5</span><span style="COLOR: #000000"><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">鑰孉fxGetThread鑾峰彇鐨勬槸褰撳墠綰跨▼錛岃屼笉鏄富綰跨▼錛?/span><span style="COLOR: #008000"><br></span><span style="COLOR: #008080"> 6</span><span style="COLOR: #008000"><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"></span><span style="COLOR: #000000">CWinThread</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> AFXAPI AfxGetThread()<br></span><span style="COLOR: #008080"> 7</span><span style="COLOR: #000000"><img id=Codehighlighter1_211_392_Open_Image onclick="this.style.display='none'; Codehighlighter1_211_392_Open_Text.style.display='none'; Codehighlighter1_211_392_Closed_Image.style.display='inline'; Codehighlighter1_211_392_Closed_Text.style.display='inline';" align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockStart.gif"><img style="DISPLAY: none" id=Codehighlighter1_211_392_Closed_Image onclick="this.style.display='none'; Codehighlighter1_211_392_Closed_Text.style.display='none'; Codehighlighter1_211_392_Open_Image.style.display='inline'; Codehighlighter1_211_392_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_211_392_Closed_Text><img src="http://www.shnenglu.com/Images/dot.gif"></span><span id=Codehighlighter1_211_392_Open_Text><span style="COLOR: #000000">{<br></span><span style="COLOR: #008080"> 8</span><span style="COLOR: #000000"><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif"></span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> check for current thread in module thread state</span><span style="COLOR: #008000"><br></span><span style="COLOR: #008080"> 9</span><span style="COLOR: #008000"><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif"></span><span style="COLOR: #000000">AFX_MODULE_THREAD_STATE</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> pState </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> AfxGetModuleThreadState();<br></span><span style="COLOR: #008080">10</span><span style="COLOR: #000000"><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif">CWinThread</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000"> pThread </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> pState</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">m_pCurrentWinThread;<br></span><span style="COLOR: #008080">11</span><span style="COLOR: #000000"><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/InBlock.gif"></span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> pThread;<br></span><span style="COLOR: #008080">12</span><span style="COLOR: #000000"><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/ExpandedBlockEnd.gif">}</span></span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">13</span><span style="COLOR: #000000"><img align=top src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif"></span></div> </font>鎵浠ュ湪闈炰富綰跨▼閲屼嬌鐢ㄥ彲鑳戒細(xì)鏈夐棶棰橈紝瑙e喅鏂規(guī)硶錛屽湪鏂板垱寤虹殑綰跨▼閲屼嬌鐢ˋfxGetApp()->m_pMainWnd; <img src ="http://www.shnenglu.com/maosher/aggbug/124783.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/maosher/" target="_blank">Brandon</a> 2010-08-26 11:08 <a href="http://www.shnenglu.com/maosher/archive/2010/08/26/124783.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>娓告爣http://www.shnenglu.com/maosher/archive/2010/08/11/123121.htmlBrandonBrandonWed, 11 Aug 2010 15:22:00 GMThttp://www.shnenglu.com/maosher/archive/2010/08/11/123121.htmlhttp://www.shnenglu.com/maosher/comments/123121.htmlhttp://www.shnenglu.com/maosher/archive/2010/08/11/123121.html#Feedback0http://www.shnenglu.com/maosher/comments/commentRss/123121.htmlhttp://www.shnenglu.com/maosher/services/trackbacks/123121.html
adOpenForwardOnly   >   adOpenDynamic   >   adOpenKeyset   >   adOpenStatic  

娓告爣綾誨瀷鏈変互涓嬪洓縐嶇被鍨嬶細(xì)
1銆?  AdOpenForwardOnly   錛堥粯璁ゅ鹼級(jí)涓嬈″彧鑳藉悜鍓嶇Щ鍔ㄤ竴琛屻?
2銆?  AdOpenKeyset   鎵撳紑閿泦綾誨瀷娓告爣銆?
3銆?  AdOpenDynamic   鎵撳紑鍔ㄦ佺被鍨嬫父鏍?
4銆?  AdOpenStatic   鎵撳紑闈?rùn)鎬佺被鍨嬫父鏍囥?
AdOpenForwardOnly鍜孉dOpenStatic榪欎袱縐嶆父鏍囦嬌寰楄褰曢泦鍙錛屽畠琛ㄧず鍒涘緩鏁版嵁鐨勪竴涓揩鐓с傚悗鑰呮瘮鍓嶈呯伒媧伙紝鍥犱負(fù)瀹冨彲浠ュ厑璁鎬換鎰忔柟鍚戠Щ鍔ㄣ?
AdOpenKeyset鍏佽浠繪剰縐誨姩錛屽茍涓斿厑璁告洿鏀硅褰曢泦銆傚叾浠栫敤鎴峰璁板綍闆嗙殑娣誨姞鍜屽垹闄わ紝榪欎釜娓告爣鍙嶆槧涓嶅嚭鏉ャ備絾瀹冭兘鍙嶆槧鍑哄叾浠栫敤鎴峰璁板綍闆嗙殑鏇存敼銆?
AdOpenDynamic鍏佽鎵鏈夋搷浣滐紝鍏朵粬鐢ㄦ埛瀵硅褰曢泦鐨勬坊鍔犮佸垹闄ゃ佹洿鏀瑰湪姝よ褰曢泦涓?
閮芥槸鍙鐨勩?
LockType=   adLockOptimistic
Options   鐪佺暐  
澶у闇瑕佹敞鎰忕殑鏄細(xì)褰撲嬌鐢ˋdOpenKeyset鏃訛紝瑕佹眰璁板綍闆嗕腑姣忔潯璁板綍閮芥湁鍞竴鐨勫叧閿瓧銆傚惁鍒欙紝鎵ц鐨勭粨鏋滃氨涓嶆槸鎮(zhèn)ㄦ墍瑕佺殑鎵鏈夎褰曚簡(jiǎn)銆?
娓呮浜?jiǎn)娓告爣绫诲瀷锛屽啀鏉ョ湅鐪嬮攣绫诲瀷LockType
AdLockReadOnly   錛堥粯璁ゅ鹼級(jí)鍙   ---   涓嶈兘鏀瑰彉鏁版嵁銆?
AdLockPessimistic   鎮(zhèn)茶閿侊紙閫愪釜錛?--   涓虹‘淇濇垚鍔熷畬鎴愮紪杈戣褰曟墍闇鐨勫伐浣滐紝
鍦ㄧ紪杈戞椂绔嬪嵆閿佸畾鏁版嵁婧愮殑璁板綍銆?
AdLockOptimistic   涔愯閿侊紙閫愪釜錛?--   鍙湪璋冪敤Update   鏂規(guī)硶鏃舵墠閿佸畾璁板綍銆?
AdLockBatchOptimistic   涔愯鎵規(guī)洿鏂?--鐢ㄤ簬鎵規(guī)洿鏂版ā寮忥紙涓庣珛鍗蟲(chóng)洿鏂版ā寮忕浉瀵癸級(jí)銆?
瀵逛簬鎮(zhèn)茶閿併佷箰瑙傞攣鐨勮В閲婏細(xì)
涔愯鐨勯攣絳栫暐鏄妸璁板綍蹇呴』鍔犻攣鐨勬椂闂村噺鍒版渶鐭紝褰撶敤鎴峰璁板綍鐨勫唴瀹硅繘琛岀紪杈戞椂錛屼箰瑙傞攣涓嶈搗浣滅敤錛屽叾浠栫敤鎴峰彲浠ヨ闂拰緙栬緫鏁版嵁錛屼絾褰撳叾涓殑涓涓敤鎴鋒兂瑕佹洿鏂版暟鎹椂錛岃褰曞氨浼?xì)鍔犱笂閿佸Q?
鎮(zhèn)茶鐨勯攣絳栫暐鏄綋絎竴涓敤鎴鋒墦寮璁板綍榪涜緙栬緫鐨勬椂鍊欙紝璁板綍灝變細(xì)鍔犻攣錛岀洿鍒頒嬌鐢ㄨ褰曠殑鐢ㄦ埛瑙i櫎閿佹椂閿佹墠涓嶈搗浣滅敤銆備竴鏃︽?zhèn)茶閿佽捣浣滅敤锛屽叾浠栫殑鐢ㄦ埛灏辩湅涓嶅埌鏁版嵁锛岀洿鍒拌閿佽瑙i櫎锛?
瀵逛簬AdLockBatchOptimistic錛屽彧鑳戒笌AdOpenKeyset娓告爣涓璧蜂嬌鐢ㄣ傚畠鍦ㄦ洿鏂版椂涓嶄細(xì)绔嬪嵆鎶婃洿鏂拌繃鐨勮褰曞啓鍏ュ埌鏁版嵁婧愪腑錛岃屾槸鎶婂璁稿鏉¤褰曟墍鍋氱殑鏀瑰姩鍏堟斁鍦ㄥ鎴瘋綆楁満涓紝鐒跺悗鎶婃洿鏂拌繃鐨勮褰曚綔涓轟竴鎵瑰啓鍏ユ暟鎹簮

Brandon 2010-08-11 23:22 鍙戣〃璇勮
]]>
RadioButtonhttp://www.shnenglu.com/maosher/archive/2010/07/26/121276.htmlBrandonBrandonMon, 26 Jul 2010 00:19:00 GMThttp://www.shnenglu.com/maosher/archive/2010/07/26/121276.htmlhttp://www.shnenglu.com/maosher/comments/121276.htmlhttp://www.shnenglu.com/maosher/archive/2010/07/26/121276.html#Feedback0http://www.shnenglu.com/maosher/comments/commentRss/121276.htmlhttp://www.shnenglu.com/maosher/services/trackbacks/121276.htmlRadioButton鐨勫垎緇勬槸鎸塗abStop鏉ュ垎鐨勶紝絎竴涓狦roup涓簍rue 鐩村埌紕板埌涓嬩竴涓狦roup涓簍rue鍓嶏紝涓鐩存槸涓緇?/p>

Brandon 2010-07-26 08:19 鍙戣〃璇勮
]]>
久久99国产精品久久久| 996久久国产精品线观看| …久久精品99久久香蕉国产| 亚洲&#228;v永久无码精品天堂久久| 久久久久无码精品国产| 狠狠色丁香久久婷婷综合图片| 久久se这里只有精品| 嫩草影院久久99| 久久精品国产91久久综合麻豆自制| 无码人妻少妇久久中文字幕蜜桃| 人人妻久久人人澡人人爽人人精品 | 久久综合综合久久97色| 久久综合亚洲欧美成人| 亚洲AV日韩AV永久无码久久| 亚洲日本va中文字幕久久| 亚洲欧美一区二区三区久久| 久久精品无码一区二区app| 久久精品国产一区二区三区 | 蜜桃麻豆www久久| 88久久精品无码一区二区毛片| 久久噜噜电影你懂的| 国产亚州精品女人久久久久久| 狠狠色伊人久久精品综合网| 久久精品无码一区二区三区日韩 | 亚洲国产小视频精品久久久三级 | 精品久久久久久久久中文字幕| 99久久精品国产高清一区二区| 狠狠色丁香久久综合婷婷| 久久香蕉综合色一综合色88| 久久av免费天堂小草播放| 女人高潮久久久叫人喷水| 伊人久久综合精品无码AV专区| 精品无码久久久久久午夜| 久久最近最新中文字幕大全| 久久免费99精品国产自在现线| 香蕉久久久久久狠狠色| 少妇高潮惨叫久久久久久 | 国产一区二区三精品久久久无广告 | 亚洲中文字幕久久精品无码喷水| 久久w5ww成w人免费| 成人精品一区二区久久久|