锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品极品美女粉嫩高清在线 ,亚洲精品乱码久久久久久,亚洲欧美自拍偷拍http://www.shnenglu.com/jolleydtan/plan,refactor,daily-build, self-discipline,zh-cnTue, 16 Sep 2025 09:39:09 GMTTue, 16 Sep 2025 09:39:09 GMT60nginx寮鍙戠涓涓猦elloworld.http://www.shnenglu.com/jolleydtan/archive/2016/05/10/213147.htmljolleyjolleyTue, 10 May 2016 00:25:00 GMThttp://www.shnenglu.com/jolleydtan/archive/2016/05/10/213147.htmlhttp://www.shnenglu.com/jolleydtan/comments/213147.htmlhttp://www.shnenglu.com/jolleydtan/archive/2016/05/10/213147.html#Feedback2http://www.shnenglu.com/jolleydtan/comments/commentRss/213147.htmlhttp://www.shnenglu.com/jolleydtan/services/trackbacks/213147.html 

Nginx寮鍙戠涓夋柟妯″潡瀹炰緥

Ø 搴忚█

Nginx鏄竴涓瀬鍏鋒墿灞曟х殑鏈嶅姟鍣?/span>,榪欐樉钁椾綋鐜板湪瀵圭涓夋柟妯″潡鐨勬敮鎸侊紝寮鍙戣呰兘澶熷皢鑷繁寮鍙戠殑妯″潡錛屾寜鐓?/span>nginx鏃㈡湁鐨勮鍒欙紝瀹岀編鍦拌瀺鍚堣繘http妗嗘灦涓紝浠ュ疄鐜板紑鍙戣呭畾鍒跺姛鑳界殑浣滅敤銆?/span>

榪欑瘒鏂囩珷涓昏鐢ㄤ簬緇撳悎濡備綍寮鍙戜竴涓畝鍗曠殑絎笁鏂規(guī)ā鍧楋紝鐩爣浜虹兢涓烘兂浜嗚Вnginx寮鍙戠涓夋柟妯″潡鐨勫悓瀛︼紝鏂囩珷鍐呭涓昏鍖呮嫭涓変釜閮ㄥ垎錛屽浣曞皢HTTP妯″潡宓屽叆nginx鍜屽浣曞紑鍙戠涓夋柟妯″潡浠ュ強涓涓緥瀛愩?/span>

Ø 濡備綍灝?/span>HTTP妯″潡宓屽叆nginx

Nginx鐩墠鏉ヨ鎻愪緵浜嗕簩縐嶆柟寮?/span>,config鏂囦歡+configure 鑴氭湰錛屾墜鍔ㄦ柟寮忥紝鍚庨潰鎵嬪姩鏂瑰紡鏄洿鍔犲鏉傜殑錛屼笖瀹規(guī)槗鍑洪敊錛屽湪甯歌鐨?/span>nginx寮鍙戜腑錛屽熀鏈笂閮芥槸鐢?/span>config鏂囦歡+configure鑴氭湰鏂瑰紡姣旇緝澶氥傛帴涓嬫潵鍒嗗埆浠嬬粛榪欎袱縐嶆柟寮忋?/span>

 

1)      Config鏂囦歡+configure鑴氭湰

Config鏂囦歡

榪欎釜鏄寚鎻愪緵config鏂囦歡錛屽茍涓斿湪鏂囦歡閲岄潰緇欏嚭涓変釜閰嶇疆欏癸紝灝卞彲浠ヨ揪鍒版晥鏋溿傝繖涓変釜閰嶇疆欏規(guī)槸鎸囷細

A.      Ngx_addon_name錛?/span>灝辨槸鑷繁瑕佸紑鍙戠殑榪欎釜妯″潡鍚嶅瓧銆?/span>

B.        Nginx妯″潡鍚嶏細榪欐湁鐐瑰儚璁劇疆鐜鍙橀噺鍟ョ殑錛岄鍏堣鐭ラ亾鑷繁寮鍙戝暐妯″潡錛?/span>nginx瀵瑰簲鐨勬ā鍧楁湁錛?/span>$HTTP_MODULES(甯歌鐨?/span>http妯″潡), $HTTP_FILTER_MODULES(HTTP榪囨護妯″潡)錛?/span>$HTTP_HEAD_FILTER_MODULES(HTTP 澶撮儴榪囨護妯″潡)錛?/span> $CORE_MODULES(nginx鐨勬牳蹇冩ā鍧?/span>)錛?/span>$EVENT_MODULES(nginx鐨勪簨浠舵ā鍧?/span>)絳夛紝鐒跺悗鍦ㄥ悗闈㈡坊鍔犱綘鎵瑕佹坊鍔犵殑妯″潡鍚嶅瓧錛屼互絀烘牸闅斿紑錛屾瘮濡傝繖嬈℃垜浠紑鍙戞坊鍔犵殑妯″潡:

HTTP_MODULES = “$HTTP_MODULES ngx_http_helloworld_module”

C.        NGX_ADDON_SRCS錛?/span>榪欎釜欏懼悕鎬濅箟錛屽氨鏄寚瀹氭柊娣誨姞鏂囦歡鐨勮礬寰勶紝涓嶈繃榪欎釜閮芥槸鐩稿璺緞錛屽洜涓哄湪configure鐨勬椂鍊欏氨鎸囧畾浜嗕笂灞傝礬寰勶紝姣斿--add-modules=PATH銆?/span>

姣斿鎴戜滑榪欐寮鍙戣娣誨姞鐨勬簮鏂囦歡錛?/span>

NGX_ADDON_SRCS = “$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_helloworld_module.c”

Configure鑴氭湰

榪欓噷闇瑕佺敤- -add-module=PATH灝嗙涓夋柟妯″潡鐨勮礬寰勫姞鍏ワ紝

姣斿configure - -add-module=~/ngx_3rd_modules/

閭f垜浠兘鍒嗘瀽涓嬭繖鑳屽悗鍋氫簡浠涔堝憿錛熸垜浠粠涓嬮潰涓や釜閮ㄥ垎鏉ュ睍寮璇存槑

a)      Auto/modules

榪欎釜涓昏鏄鏄庡皢瀹氬埗鐨勭涓夋柟妯″潡娣誨姞鍒扮敓鎴愮殑ngx_modules.c閲岄潰銆?/span>

a)         鎸囧畾妯″潡涓嬮潰鐨勯厤緗枃浠?/span>.

b)         鐢熸垚妯″潡淇℃伅

涓銆?/span>鐢熸垚妯″潡鏁扮粍

鏍規(guī)嵁闇瑕佸紑鍚殑妯″潡鍔犺澆瀵瑰簲鐨勬ā鍧?/span>,涓嬮潰鏄紑鍚?/span>http妯″潡鍚庣殑鎵闇瑕佺殑妯″潡
 

浜屻?/span>鐢熸垚ngx_modules.c鏂囦歡

 

b)      Auto/make

鏄捐屾槗瑙侊紝榪欎釜灝辨槸璐熻矗緙栬瘧鐩稿叧鐨勬ā鍧椼?/span>

1)         鐢熸垚絎笁鏂規(guī)簮鐮?br />

2)         鐢熸垚閾炬帴浠g爜錛屽茍灝嗙洰鏍囨枃浠訛紝搴撴枃浠墮摼鎺ユ垚浜岃繘鍒剁▼搴?br />

2)      鎵嬪姩鏂瑰紡

鍒嗕袱姝ユ潵鍋氾紝絎竴錛屼慨鏀?/span>obj/ngx_modules.c, 鍦ㄩ噷闈㈠鍔犲搴旂殑絎笁鏂規(guī)ā鍧楋紝絎簩錛屼慨鏀?/span>obj/Makefile,鍦ㄩ噷闈㈠鍔犵涓夋柟妯″潡鐨勭紪璇戯紝榪欑鐩存帴淇敼鐨勬柟娉曚笉澶彲鍙栵紝鏄撳嚭閿欙紝涓鑸兘鏄敤涓婇潰鐨勭浜岀鏂規(guī)硶銆?/span>

Ø 寮鍙戠涓夋柟妯″潡娉ㄦ剰浜嬮」

棣栧厛,瑕佺‘瀹氶拡瀵歸偅涓ā鍧楄繘琛屽紑鍙戯紝nginx鐨勬ā鍧楁槸鏈夐『搴忔х殑錛屾瘮濡傦細 HTTP_MODULES = “$HTTP_MODULES ngx_http_helloworld_module”

鍏舵錛屽洜涓?/span>nginx鏄紓姝ラ潪闃誨鐨勶紝鍦ㄧ紪鍒朵唬鐮佹椂錛屼竴瀹氳娉ㄦ剰涓嶈兘闃誨nginx榪涚▼.

Ø 紺轟緥

瑙侀檮浠?a href="/Files/jolleydtan/test.zip">/Files/jolleydtan/test.zip

 

 鍙傝冿細

娣卞叆鐞嗚Вnginx. 



jolley 2016-05-10 08:25 鍙戣〃璇勮
]]>
娓告垙鏈嶅姟鍣ㄦ鏋惰璁?/title><link>http://www.shnenglu.com/jolleydtan/archive/2016/04/16/213293.html</link><dc:creator>jolley</dc:creator><author>jolley</author><pubDate>Sat, 16 Apr 2016 09:33:00 GMT</pubDate><guid>http://www.shnenglu.com/jolleydtan/archive/2016/04/16/213293.html</guid><wfw:comment>http://www.shnenglu.com/jolleydtan/comments/213293.html</wfw:comment><comments>http://www.shnenglu.com/jolleydtan/archive/2016/04/16/213293.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/jolleydtan/comments/commentRss/213293.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/jolleydtan/services/trackbacks/213293.html</trackback:ping><description><![CDATA[<p class="MsoNormal" style="text-align: center; margin: 0cm 0cm 0pt" align="center"><span style="font-size: 14pt; font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">娓告垙鏈嶅姟鍣ㄦ鏋惰璁?/span><span lang="EN-US" style="font-size: 14pt"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l2 level1 lfo1"><span lang="EN-US" style="font-size: 12pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><span style="mso-list: Ignore">Ø<span style="font: 7pt "Times New Roman"">  </span></span></span><strong style="mso-bidi-font-weight: normal"><span style="font-size: 12pt; font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">搴忚█</span></strong><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 12pt"><o:p></o:p></span></strong></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">浜轟滑鍦ㄨ璇嗕簨鐗╃殑鏃跺欙紝涓鑸兘鏄厛浠庡ぇ鑷寸殑楠ㄦ灦寮濮嬶紝鐒跺悗鍐嶅埌鍏蜂綋鐨勭粏鑺傦紝閲戝瓧濉斿師鐞嗕腑鐢ㄧ殑姣旇緝澶氱殑灝辨槸鑷笂鑰屼笅鐨勫垎鏋愭柟娉曪紝榪欎釜鏂規(guī)硶鏀懼湪鏀句箣鍥涙搗鑰岀殕鍑嗐傞偅涔堝洖鍒版垜浠父鎴忔湇鍔″櫒寮鍙戜笂闈紝涔熸槸濡傛銆傞偅涔堝浣曡璁″拰閫夋嫨鏈嶅姟鍣ㄦ灦鏋勪互鍙婃湁鍟ラ渶瑕佹敞鎰忕殑鍛紵</span><font face="Calibri"> </font><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">榪欐槸鏈枃绔犺瑙e喅鐨勯棶棰樸?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鏂囩珷涓昏鐩爣浜虹兢鏄紝瀵規(guī)湇鍔″櫒妗嗘灦璁捐鎰熷叴瓚o紝鏈変粠浜嬭繃娓告垙妗嗘灦璁捐鐨勫悓瀛︺?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鏂囩珷鍐呭錛屼粙緇嶄簲澶ц璁″師鍒欎互鍙婄粰鍑轟袱涓ず渚?/span><span lang="EN-US"><font face="Calibri">,</font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鏈鍚庡仛鎬葷粨銆?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l2 level1 lfo1"><span lang="EN-US" style="font-size: 12pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><span style="mso-list: Ignore">Ø<span style="font: 7pt "Times New Roman"">  </span></span></span><strong style="mso-bidi-font-weight: normal"><span style="font-size: 12pt; font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">璁捐鍘熷垯</span></strong><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 12pt"><o:p></o:p></span></strong></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">璁捐鍘熷垯鍏跺疄涔熸槸鍦ㄨ璁℃椂闇瑕佽冭檻鐨勫洜绱狅紝榪囧害璁捐鏄姞閲嶅伐浣滈噺鐨勫厓鍑訛紝璁捐鏈川灝辨槸涓轟簡瑙e喅闂鑰屽瓨鍦ㄧ殑錛屼笅闈㈠垪鍑轟簡</span><span lang="EN-US"><font face="Calibri">5</font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">澶ф瘮杈冨吀鍨嬬殑鍘熷垯銆?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l4 level1 lfo2; mso-para-margin-left: 2.0gd"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">1.</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">涓氬姟閫昏緫寮鍙?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 63pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo4; mso-para-margin-left: 4.0gd"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">a)</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">姣斿娓告垙涓轟簡澧炲姞瀛樺偍錛屼綘灝遍渶瑕佽冭檻浣跨敤鍐呭瓨鏁版嵁搴撹繕鏄紕涓暟鎹簱緗戝叧鏈嶅姟鍣ㄦ潵澶勭悊銆?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 63pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo4; mso-para-margin-left: 4.0gd"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">b)</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">姣斿娓告垙涓轟簡綆$悊娓告垙鐜╁璐﹀彿錛屼互鍙婃敮鎸佸騫沖彴璐﹀彿鐨勬帴鍏ワ紝閭d箞灝遍渶瑕佽處鍙鋒湇鍔″櫒銆?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 63pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l0 level1 lfo4; mso-para-margin-left: 4.0gd"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">c)</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">姣斿娓告垙涓轟簡綆$悊娓告垙鐜╁璁㈠崟鍜岃窡韙粯璐規(guī)儏鍐碉紝鍙兘灝遍渶瑕佹敮浠樻湇鍔″櫒錛屽鏋滄父鎴忕被鍨嬫槸璁℃椂鏀惰垂鐨勮瘽錛岄偅涔堝彲鑳戒細闇瑕佽鏃舵湇鍔″櫒銆?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l4 level1 lfo2; mso-para-margin-left: 2.0gd"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">2.</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">榪愯惀緇存姢</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 63pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l1 level2 lfo3; mso-para-margin-left: 4.0gd"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">a)</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">閰嶇疆</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 63pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">榪欓噷鐗墊秹鍒伴潤鎬侀厤緗拰鍔ㄦ侀厤緗殑闂錛屽亣璁劇幇鍦ㄦ湁涓鍙扮綉鍏蟲湇鍔″櫒鍜屼笁鍙版父鎴忛昏緫鏈嶅姟鍣紝闈欐侀厤緗殑璇濓紝灝辨槸緗戝叧鏈嶅姟鍣ㄨ繖杈瑰啓姝誨彧榪炴帴榪欎笁鍙版湇鍔″櫒錛岀劧鍚庤緗戝叧鏈嶅姟鍣ㄤ富鍔ㄥ幓榪炴帴錛屽姩鎬侀厤緗殑璇濓紝灝辨槸璁╄繖涓夊彴鏈嶅姟鍣ㄧ煡閬撹繖涓綉鍏蟲湇鍔″櫒鐨勫湴鍧錛岀劧鍚庤嚜宸卞湪鍚姩鐨勬椂鍊欏幓榪炴帴銆?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 63pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l1 level2 lfo3; mso-para-margin-left: 4.0gd"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">b)</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">寮鍚垨鑰呭叧闂『搴?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 63pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">榪欎富瑕佹槸鐪嬪悇涓湇鍔″櫒涓婇潰璐熻矗浠涔堝姛鑳戒互鍙婃湇鍔″櫒涓婇潰鐨勭浉鍏沖姛鑳斤紝鎷挎父鎴忕櫥闄嗘湇鍔″櫒錛屾父鎴忛昏緫鏈嶄互鍙婃暟鎹簱緗戝叧鏈嶅姟鍣ㄨ繖涓変釜鏈嶅姟鍣ㄧ殑鏋舵瀯鏉ヨ錛屾瘮濡傚紑鍚殑鏃跺欙紝浣犲敖鍙兘鍦拌窡鐜╁鐧婚檰榪炴帴鐨勯『搴忕浉鍙嶏紝</span><font face="Calibri"> </font><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">涓鑸兘鏄暟鎹簱緗戝叧鏈嶅姟鍣紝鐒跺悗鎵嶆槸娓告垙閫昏緫鏈嶏紝鏈鍚庢墠鏄父鎴忕櫥闄嗘湇鍔″櫒錛屽叾瀹炲氨鏄槻姝㈢帺瀹惰繃鏃╁湴鐧婚檰榪涙潵錛屽嵈鍙戠幇鏁版嵁榪樻病鏈夊噯澶囧ソ銆?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 63pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鍏抽棴鐨勯『搴忓叾瀹炲氨鏄浉鍙嶇殑錛屼富瑕佸師鍒欏氨鏄鏁版嵁灝藉彲鑳藉湴淇濆瓨濂斤紝騫朵笖璁╃帺瀹朵笉鍐嶈繘鏉ャ?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 63pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l1 level2 lfo3; mso-para-margin-left: 4.0gd"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">c)</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鍔ㄦ佸鍒犳敼</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 63pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">澧炲垹鏀瑰垎涓轟笁閮ㄥ垎錛?/span><span lang="EN-US"><font face="Calibri">1</font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">錛夊鍔犱竴鍙版湇鍔″櫒錛?/span><span lang="EN-US"><font face="Calibri">2</font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">錛夊噺灝戜竴鍙版湇鍔″櫒錛?/span><span lang="EN-US"><font face="Calibri">3</font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">錛変慨鏀規(guī)湇鍔″櫒淇℃伅錛屾瘮濡傚墠闈㈡彁鍒扮殑闈欐侀厤緗紝灝辨槸涓嶅お鏂逛究澧炲姞鏈嶅姟鍣紝瑕佸鍔犱竴鍙版湇鍔″櫒錛岄渶瑕佹洿鏂扮綉鍏蟲湇鍔″櫒鐨勯厤緗〃錛岀劧鍚庤緗戝叧鏈嶅姟鍣ㄩ噸鏂拌繛鎺ュ埌鏂扮殑鏈嶅姟鍣紝鑰屽姩鎬侀厤緗殑璇濓紝灝遍潪甯告柟渚匡紝璁╂柊澧炵殑鏈嶅姟鍣ㄥ彂璧峰埌緗戝叧鏈嶅姟鍣ㄥ氨濂戒簡銆傛棤闇鏇存敼閰嶇疆銆?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 63pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l1 level2 lfo3; mso-para-margin-left: 4.0gd"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">d)</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鏈嶅姟鍣ㄧ鐞?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 63pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鏈嶅姟鍣ㄧ殑綆$悊涓昏鍦ㄦ湇鍔″櫒鐨勫湪綰跨綰跨姸鎬佺殑綆$悊錛屼腑蹇冩湇鍔″櫒錛堢敤鏉ョ鐞嗗叾瀹冩湇鍔″櫒錛夊繀欏誨疄鏃剁煡閬撴墍綆$悊鏈嶅姟鍣ㄧ殑鐘舵侊紝姣斿緗戝叧鏈嶅姟鍣ㄥ繀欏昏瀹炴椂鐭ラ亾娓告垙閫昏緫鏈嶇殑鐘舵侊紝榪欐牱鎵嶅ソ鏇存柊鍒扮櫥闄嗘湇鍔″櫒涓婇潰錛屾洿鏀規(guī)湇鍔″櫒鐘舵併傚熀鏈笂鍦ㄤ紬澶氬悓綰ф湇鍔″櫒涓婇潰鍩烘湰涓婇兘浼氭湁涓腑蹇冩湇鍔″櫒銆?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l4 level1 lfo2; mso-para-margin-left: 2.0gd"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">3.</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鎬ц兘鏁堢巼</span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">榪欓渶瑕佹潈琛″埄寮婂拰鎬ц兘浼樺姡錛屾瘮濡傚湪</span><span lang="EN-US"><font face="Calibri">ARPG</font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">娓告垙閫昏緫鏈嶅姟鍣ㄩ噷闈㈠ぇ閲忕殑娑堣楀湪</span><span lang="EN-US"><font face="Calibri">AI</font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">涓婇潰錛岄偅涔堝氨瑕佽冭檻緇欏紕涓嚎紼嬭繕鏄繘紼?/span><span lang="EN-US"><font face="Calibri">,</font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">榪欏悓鏍烽傜敤浜庤亰澶╁姛鑳斤紝鏈変竴浜涜亰澶╁姛鑳斤紝鎴栬鍙互閫夋嫨浣跨敤</span><span lang="EN-US"><font face="Calibri">UDP</font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鏉ヤ綔涓虹綉緇滃眰閫氳鏂瑰紡銆傛槸鍚﹀皢鍔熻兘妯″潡璁捐鎴愬崟鐙繘紼嬶紝榪欓渶瑕佹潈琛★紝铏界劧鍙兘鍦ㄨ繍钀ヤ腑浼氶儴緗插唴緗戯紝鐩鎬簰涔嬮棿鏄氳繃鍙戞秷鎭殑錛岀被浼間簬鍏變韓鍐呭瓨錛屼絾鏄繕鏄細浜х敓涓浜涙秷鑰楃殑銆?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: 0cm; mso-char-indent-count: 0"><span lang="EN-US"><o:p><font face="Calibri"> </font></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l4 level1 lfo2; mso-para-margin-left: 2.0gd"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">4.</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">璐熻澆鍧囪 </span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">榪欓噷鍖呮嫭涓や釜閮ㄥ垎錛岀‖浠惰礋杞藉潎琛★紝鍜岃蔣浠惰礋杞藉潎琛°傜‖浠惰礋杞藉潎琛′富瑕佹槸鎸囪礬鐢卞櫒銆傝蔣浠惰礋杞藉潎琛′富瑕佹湁鍑犵杞歡</span><span lang="EN-US"><font face="Calibri">,nginx/lvs/haproxy/dns, </font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">璐熻澆鍧囪 鐨勭瓥鐣ワ紝鍙互鍙傝?/span><span lang="EN-US"><font face="Calibri">nginx </font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鐨勮礋杞藉潎琛★紝涓昏鏈?/span><span lang="EN-US"><font face="Calibri">round-robin, least-connected, </font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">浠ュ強</span><span lang="EN-US"><font face="Calibri">ip-hash</font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">絳夈?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">涓鑸潵璇達紝娓告垙涓ぇ閮芥槸浜岀駭璐熻澆錛岄鍏堟槸鍦ㄧ櫥闄嗚繖杈硅礋杞戒竴嬈★紝鐒跺悗鍐嶅湪榪涘叆娓告垙閫昏緫鏈嶉偅杈硅礋杞戒竴嬈★紝榪欐牱灝卞浜嗐?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l4 level1 lfo2; mso-para-margin-left: 2.0gd"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">5.</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">瀹夊叏鎬?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">榪欓噷璇翠笅緗戝叧鏈嶅姟鍣紝鍏跺畠鍦版柟涔熷彨鍓嶇疆鏈嶅姟鍣紝</span><span lang="EN-US"><font face="Calibri">front-end servers,</font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">錛岃繖涓湁鍑犱釜濂藉錛?/span><span lang="EN-US"><font face="Calibri">1</font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">錛夐殣钘忔父鎴忛昏緫鏈嶇殑榪炴帴淇℃伅</span><span lang="EN-US"><font face="Calibri">. 2) </font></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">緇熺娓告垙閫昏緫鏈嶇殑璐熻澆淇℃伅銆?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l2 level1 lfo1"><span lang="EN-US" style="font-size: 12pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><span style="mso-list: Ignore">Ø<span style="font: 7pt "Times New Roman"">  </span></span></span><strong style="mso-bidi-font-weight: normal"><span style="font-size: 12pt; font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鏈嶅姟鍣ㄦ鏋剁ず渚?/span></strong><strong style="mso-bidi-font-weight: normal"><span lang="EN-US" style="font-size: 12pt"><o:p></o:p></span></strong></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l3 level1 lfo5"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">1)</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鏃犱腑蹇冩湇鍔″櫒鏋舵瀯<br /><img style="border-top-color: ; border-left-color: ; border-bottom-color: ; border-right-color: " border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/jolleydtan/sf1.png" width="710" longdesc="" height="189" /><br /></span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: 0cm; mso-char-indent-count: 0"><span lang="EN-US" style="mso-no-proof: yes"><v:shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype></span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l3 level1 lfo5"><span lang="EN-US" style="mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><span style="mso-list: Ignore"><font face="Calibri">2)</font><span style="font: 7pt "Times New Roman"">         </span></span></span><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鏈変腑蹇冩湇鍔″櫒鏋舵瀯<br /><img style="border-top-color: ; border-left-color: ; border-bottom-color: ; border-right-color: " border="0" alt="" src="http://www.shnenglu.com/images/cppblog_com/jolleydtan/sf2.png" width="348" longdesc="" height="242" /><br /></span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: 0cm; mso-char-indent-count: 0"><span lang="EN-US" style="mso-no-proof: yes"></span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: -21pt; mso-char-indent-count: 0; mso-list: l2 level1 lfo1"><span lang="EN-US" style="font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><span style="mso-list: Ignore">Ø<span style="font: 7pt "Times New Roman"">  </span></span></span><strong style="mso-bidi-font-weight: normal"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">緇撹</span><span lang="EN-US"><o:p></o:p></span></strong></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: 0cm; mso-char-indent-count: 0"><span style="font-family: 瀹嬩綋; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 瀹嬩綋; mso-fareast-theme-font: minor-fareast; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin">鏈嶅姟鍣ㄦ鏋惰璁℃洿鍍忎竴闂ㄨ壓鏈紝闇瑕佸湪瑙e喅闂鐨勫悓鏃訛紝鍙堥渶瑕佹敞鎰忓鉤琛″緱澶便?/span><span lang="EN-US"><o:p></o:p></span></p> <p class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: 0cm; mso-char-indent-count: 0"><span lang="EN-US"><o:p><font face="Calibri"> </font></o:p></span></p><br /><br /><br /><img src ="http://www.shnenglu.com/jolleydtan/aggbug/213293.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/jolleydtan/" target="_blank">jolley</a> 2016-04-16 17:33 <a href="http://www.shnenglu.com/jolleydtan/archive/2016/04/16/213293.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>浠庨暱搴︿負N鐨勬暟緇勯噷闈㈤殢鏈哄彇寰桵涓暟http://www.shnenglu.com/jolleydtan/archive/2016/04/02/213183.htmljolleyjolleySat, 02 Apr 2016 03:51:00 GMThttp://www.shnenglu.com/jolleydtan/archive/2016/04/02/213183.htmlhttp://www.shnenglu.com/jolleydtan/comments/213183.htmlhttp://www.shnenglu.com/jolleydtan/archive/2016/04/02/213183.html#Feedback0http://www.shnenglu.com/jolleydtan/comments/commentRss/213183.htmlhttp://www.shnenglu.com/jolleydtan/services/trackbacks/213183.html1錛夐殢鏈烘帓搴忥紝鎸夌収欏哄簭鍏堝悗鍙栧嚭M涓暟瀛椼?br /> IntVec shuffle(IntVec& vec)
133 {
134 int size = vec.size();
135 IntVec::iterator first = vec.begin();
136 IntVec::iterator last = vec.end();
137 for(IntVec::iterator i = first + 1; i != last; ++i)
138 {
139 std::iter_swap(i, first + rand()%((i - first)+ 1));
140 }
141 return vec;
142 }
榪欎釜鍛紝涓嶄細褰卞搷婧愭暟緇勶紝榪欎釜
2錛夊彇M嬈★紝姣忔鍋氫釜浜嬫儏灝辨槸闅忔満鍑轟竴涓暟錛屾坊鍔犲埌鐩爣鏁扮粍閲岄潰錛岀劧鍚庝粠婧愭暟緇勪腑鍒犻櫎銆傘?font color="#000000" face="Verdana">
143
144 IntVec shuffle(IntVec& vec, int count)
145 {
146     IntVec desVec;
147     for(int i = 0; i < count;i++)
148     {
149         int random = rand()%vec.size();
150         desVec.push_back(vec[random]);
151         vec.erase(remove(vec.begin(),vec.end(),vec[random]),vec.end());
152     }  
153     return desVec;
154 }
榪欎釜鍛紝浼氬獎鍝嶆簮鏁扮粍銆?br />3錛夊彇M嬈★紝鍊熷姪涓涓緟鍔╂暟緇勮褰曞摢涓暟鎹鍙栬繃錛岄殢鏈哄嚭涓涓暟錛屾坊鍔犲埌鐩爣鏁扮粍閲岄潰錛岀劧鍚庡皢榪欎釜鍊兼坊鍔犲埌杈呭姪鏁扮粍閲岄潰.
 IntVec shuffle2(IntVec& vec, int count)
158 {
159     IntVec desVec;
160     IntVec flagVec;
161     for(int j = 0; j < count; j++)
162     {
163         flagVec.push_back(0);
164     }
165     for(int i = 0; i < count;i++)
166     {
167
168         int random = rand()%vec.size();
169         if (flagVec[random] == 0)
170         {
171             desVec.push_back(vec[random]);
172             flagVec[random] = 1;
173         }
174         else
175         {
176             i--;// 濡傛灉宸茬粡鍙栬繃浜嗭紝榪欐涓嶇畻.
177         }
178
179     }
180     return desVec;
181 }


jolley 2016-04-02 11:51 鍙戣〃璇勮
]]>
浜屽垎鏌ユ壘娉?/title><link>http://www.shnenglu.com/jolleydtan/archive/2016/03/23/213101.html</link><dc:creator>jolley</dc:creator><author>jolley</author><pubDate>Wed, 23 Mar 2016 14:16:00 GMT</pubDate><guid>http://www.shnenglu.com/jolleydtan/archive/2016/03/23/213101.html</guid><wfw:comment>http://www.shnenglu.com/jolleydtan/comments/213101.html</wfw:comment><comments>http://www.shnenglu.com/jolleydtan/archive/2016/03/23/213101.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/jolleydtan/comments/commentRss/213101.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/jolleydtan/services/trackbacks/213101.html</trackback:ping><description><![CDATA[<font color="#000000" face="Verdana">榪欎釜鏄敼鑹増鐨勪簩鍒嗘煡鎵炬爲錛屾槸閫氳繃闃呰nebula device鎰忓鑾峰緱錛岃繖杈瑰厛璁頒笅鏉ャ傘?br />typedef vector<int> IntVec;<br /> 16 int binarysearch(const IntVec& vec, int element)<br /> 17 {<br /> 18     int num = vec.size();<br /> 19     int begin = 0;<br /> 20     int end = num - 1;<br /> 21     int half;<br /> 22     int mid;<br /> 23     int count = 0;<br /> 24     printf("binarysearch--- vec count=%d, element=%d\n",num, element);<br /> 25     while(begin <= end)<br /> 26     {<br /> 27         count++;<br /> 28         if((half = num / 2))<br /> 29         {<br /> 30             if (element == vec[begin])<br /> 31             {<br /> 32                 printf("count=%d\n", count);<br /> 33                 return begin;<br /> 34             }<br /> 35             if (element == vec[end])<br /> 36             {<br /> 37                 printf("count=%d\n", count);<br /> 38                 return end;<br /> 39             }<br /> 40             mid = begin + ((num & 1)? half : (half - 1));<br /> 41             printf("vec[%d]=%d\n",mid, vec[mid]);<br /> 42 <br /> 43             if(element < vec[mid])<br /> 44             {<br /> 45                 end = mid - 1;<br /> 46                 num = (num & 1)? half: half - 1;<br /> 47                 printf("element < vec[mid]-- end, num\n", end, num);<br /> 48             }<br /> 49             else if (element > vec[mid])<br /> 50             {<br /> 51                 begin = mid + 1;<br /> 52                 num = half;<br /> 53                 printf("element < vec[mid]-- end, num\n",end, num);<br /> 54             }<br /> 55             else<font color="#000000" face="Verdana"><br /> 56             {<br /> 57                 printf("count=%d\n", count);<br /> 58                 return mid;<br /> 59             }<br /> 60         }<br /> 61         else if(num)<br /> 62         {<br /> 63             if (element != vec[begin])<br /> 64             {<br /> 65                 return -1;<br /> 66             }<br /> 67             else<br /> 68             {<br /> 69                 return begin;<br /> 70             }<br /> 71         }<br /> 72         else<br /> 73         {<br /> 74             break;<br /> 75         }<br /> 76     }<br /> 77     return -1;<br /> 78 }<br /></font></font><img src ="http://www.shnenglu.com/jolleydtan/aggbug/213101.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/jolleydtan/" target="_blank">jolley</a> 2016-03-23 22:16 <a href="http://www.shnenglu.com/jolleydtan/archive/2016/03/23/213101.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>nginx tcp璐熻澆鍧囪 http://www.shnenglu.com/jolleydtan/archive/2016/03/11/212962.htmljolleyjolleyFri, 11 Mar 2016 00:44:00 GMThttp://www.shnenglu.com/jolleydtan/archive/2016/03/11/212962.htmlhttp://www.shnenglu.com/jolleydtan/comments/212962.htmlhttp://www.shnenglu.com/jolleydtan/archive/2016/03/11/212962.html#Feedback0http://www.shnenglu.com/jolleydtan/comments/commentRss/212962.htmlhttp://www.shnenglu.com/jolleydtan/services/trackbacks/212962.html鐜板湪nginx鐨勭増鏈凡緇忓埌浜?.9.12錛屼笉榪囧湪1.9.0鐨勬椂鍊欙紝灝卞紑濮嬩簡瀵筎CP浠g悊鏈嶅姟鍣ㄧ殑鏀寔銆?br />涔嬪墠涔熸湁涓浜涙棭鏈熺殑鍋氭硶錛屾瘮濡傚氨鏈夊啓浜唍ginx_tcp_module妯″潡鐨?a style="text-transform: none; text-indent: 0px; letter-spacing: normal; font: 15px/24px Helvetica, 'Hiragino Sans GB', 寰蔣闆呴粦, 'Microsoft YaHei UI', SimSun, SimHei, arial, sans-serif; white-space: normal; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px" >https://github.com/yaoweibin/nginx_tcp_proxy_module,
浠ュ強nginx_stream_lua妯″潡鐨?br />https://github.com/openresty/stream-lua-nginx-module
鏈潵灝辨兂鐫鐢ㄨ繖涓や釜鐨勶紝鍚庢潵鍙戠幇宸茬粡鏈夋敮鎸佷簡錛屽氨鍏堟潵璇曡瘯鐪嬬湅榪欎釜浜嗐?br />榛樿鐨勮瘽錛宯ginx鏄病鏈夊紑鍚tcp鐨勬敮鎸佺殑.濡傛灉瑕佹敮鎸佺殑璇濓紝闇瑕佺敤--with-stream鍘繪寚瀹氥?br />鎴戣繖杈瑰彧瑕侀渶瑕佷笁涓狪P錛屼竴涓槸nginx榪涚▼鎵鍦ㄧ殑鏈哄櫒錛屾垜榪欒竟鐢?92.168.1.4琛ㄧず錛?br />鍙﹀涓ゅ彴灝辨槸TCP涓婃父涓氬姟鏈嶅姟鍣紝鎴戜滑鍒嗗埆鐢?92.168.1.5鍜?92.168.1.21鏉ヨ〃紺猴紝
鍩轟簬榪欐牱鐨勮冭檻鏄洜涓簄ginx鍏呭綋tcp浠g悊鏈嶅姟鍣ㄥ悗錛岃嚜韜篃浼氬崰鐢ㄤ竴涓鍙c?br />騫朵笖浠庣洰鍓嶆潵璇達紝璨屼技涓涓猲ginx榪涚▼涔熷氨鍙兘listen涓涓鍙c?br />鎴戠敤鐨勭増鏈槸nginx 1.9.9.
鎴戝湪/usr/local/nginx/conf涓嬮潰鏂板緩浜唍ginx_stream_tcp.conf浣滀負鏈鐨勬祴璇曘?br />worker_processes auto;
  2 error_log /usr/local/nginx/logs/error.log info;
  3 events {
  4     worker_connections  1024;
  5 }
  6
  7 stream {
  8     upstream loadbalance {
  9 # Specifies a load balancing method for a server group where client-server mapping is based on the hashed key value
 10         hash $remote_addr consistent;
 11 # sets the weight of the server, by default, 1.
 12         server 192.168.1.21:8001 weight=5;
 13 # by default, the parameter is set to 10 seconds.
 14         server 192.168.1.5:9001  max_fails=3 fail_timeout=30s;
 15
 16 
 17     }
 18
 19 server {
 20 # listen 8001.
 21         listen 8001;
 22 # Defines a timeout for establishing a connection with a proxied server.
 23         proxy_connect_timeout 1s;
 24 # Sets the timeout between two successive read or write operations on client or proxied server connections
 25         proxy_timeout 3s;
 26 # Sets the address of a proxied server
 27         proxy_pass loadbalance;
 28     }
 29
 30 }
榪欎釜澶ч儴鍒嗘槸瀹樼綉鏀寔鐨勶紝鎵浠ュ叾瀹炴垜涔熸病鏈変慨鏀瑰お澶氾紝灝辮緗簡鍑犱釜IP鍜岀鍙c?br />鍦ㄧ紪璇戝ソnginx鍚庯紝鍙互鐢?usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx_stream_tcp.conf
灝卞彲浠ヨ搗鏉ヤ簡錛屽彲浠ラ氳繃netstat -tlnp鏌ョ湅鏄惁璧鋒潵錛屽ぇ鑷存樉紺鴻繖鏍風殑錛?br />tcp        0      0 0.0.0.0:8001            0.0.0.0:*               LISTEN      7744/nginx_stream_t
褰撶劧涔熷彲浠ラ氳繃telnet鏉ユ煡鐪嬨?br />鎺ヤ笅鏉ワ紝鍐欎釜綆鍗曠殑cs紼嬪簭鏉ラ獙璇佷笅鍚?

server绔細
if __name__ == '__main__':
 import socket
 import commands
 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
 sock.bind(('192.168.1.21', 8001))
 sock.listen(5)
 while True:
  connection,address = sock.accept()
  print "connected by",address
  while 1:

    buf = connection.recv(1024)
    if buf != "" :
     print "connection buffer", buf
     connection.sendall(buf)
 connection.close()

client绔細
if __name__ == '__main__': 
    import socket
    HOST='192.168.1.4'
    PORT=8001
    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 
    sock.connect((HOST, PORT))
    while 1:
        cmd = raw_input("please input cmd:")
        sock.sendall(cmd)
        data = sock.recv(1024)
        print data
    sock.close()

鍦╟lient鍚?92.168.1.4鍙戣搗涓涓猅CP榪炴帴鏃訛紝鎺ヤ笅鏉?92.168.1.4浼氳繛鎺ュ埌192.168.1.21錛?br />
192.168.1.21鐨剆erver绔細鏄劇ず錛?connected by ('192.168.1.4',58559)
鍚庨潰鐨勭鍙e簲璇ユ槸闅忔満鐨勪復鏃剁鍙c?br />鍏跺疄瀹冪殑紜搗鍒頒簡杞彂浣滅敤錛岃繖涓猲ginx榪涚▼鐩稿綋浜庝竴涓氱敤緗戝叧錛屽鏋滄湁涓や釜client鍚憂ginx榪涚▼鍙戣搗榪炴帴錛屼竴鏃ginx閭h竟璋冨害鍒板悓涓涓笂娓窽CP鏈嶅姟鍣紝閭d箞鍙渶瑕佷粠NGINX榪涚▼寤虹珛涓涓猅CP榪炴帴鍒頒笂娓窽CP鏈嶅姟鍣ㄥ嵆鍙?br />
涔嬪墠鎴戣嚜宸辮璁$綉鍏崇殑鏃跺欙紝涓嶆槸渚濊禆浜庣敤鎴風殑錛岃屾槸閫氳繃闈欐侀厤緗潵寤虹珛榪炴帴鐨勶紝姣斿涓婃父閫昏緫鏈嶅姟鍣ㄨ窡緗戝叧鏈夎繛鎺ワ紝閭i兘鏄湪鍚姩鏈嶅姟鍣ㄧ殑鏃跺欙紝灝卞緩绔嬭搗鏉ヤ簡銆?br />榪欐牱鏈変釜濂藉灝辨槸鍙互鐪佷簨錛屼笉榪囦篃鍙互閲囩敤榪欑鏂瑰紡錛屾湁鐜╁榪炴帴榪涙煇涓笂娓窽CP鏈嶅姟鍣ㄦ墠璁╃綉鍏寵窡榪欎釜TCP鏈嶅姟鍣ㄥ緩绔嬭繛鎺ワ紝鍚﹀垯鏃犻渶澶勭悊銆傚洜涓轟笉灝戞椂鍊欒繕鏄細鏈変笉灝戞湇鍔″櫒澶勪簬絀洪棽鐨?



jolley 2016-03-11 08:44 鍙戣〃璇勮
]]>
鏁村瀷鏁版嵁璺熷瓧絎︿覆姣旇緝http://www.shnenglu.com/jolleydtan/archive/2011/06/08/148296.htmljolleyjolleyWed, 08 Jun 2011 12:30:00 GMThttp://www.shnenglu.com/jolleydtan/archive/2011/06/08/148296.htmlhttp://www.shnenglu.com/jolleydtan/comments/148296.htmlhttp://www.shnenglu.com/jolleydtan/archive/2011/06/08/148296.html#Feedback0http://www.shnenglu.com/jolleydtan/comments/commentRss/148296.htmlhttp://www.shnenglu.com/jolleydtan/services/trackbacks/148296.htmlstruct A
{
 int a;// 瑁呭
 int b;// 瑙掕壊鏁版嵁
 char c;
};
void main( void )
{
 //printf("hello world!");
 char buffer[] = "This is a test of the memset function";

 A aStruct;
 // 鍙戠幇鏁版嵁鐩稿悓銆?br /> memset(&aStruct,'*',sizeof(aStruct));
 printf( "Before: %s\n", buffer );
 memset( buffer, '*', 4 );
 printf( "After:  %s\n", buffer );
 if (buffer[2] == '*')
 {
  printf("hello,world\n");
 }
 // 鍒ゆ柇榪欎釜鏄惁瑕佷繚瀛樸?br /> if (aStruct.a == 0x2a2a2a2a)
 {
  // 鍙戦佺粰DBSERVER.
  printf("hello char\n");
 }
 if (aStruct.c == 0x2a)
 {

 }
 getchar();



jolley 2011-06-08 20:30 鍙戣〃璇勮
]]>
3D絎旇鏉傜儵http://www.shnenglu.com/jolleydtan/archive/2009/04/10/70024.htmljolleyjolleyFri, 10 Apr 2009 08:56:00 GMThttp://www.shnenglu.com/jolleydtan/archive/2009/04/10/70024.htmlhttp://www.shnenglu.com/jolleydtan/comments/70024.htmlhttp://www.shnenglu.com/jolleydtan/archive/2009/04/10/70024.html#Feedback0http://www.shnenglu.com/jolleydtan/comments/commentRss/70024.htmlhttp://www.shnenglu.com/jolleydtan/services/trackbacks/70024.html璋冭瘯d3d,灝嗘帶鍒墮潰鏉夸腑D3DDebugging鎵撳紑錛岃繘琛岃皟璇曪紝鍦ㄩ夋嫨璋冭瘯淇℃伅杈撳嚭絳夌駭鐨勬椂鍊欙紝鍙互閫夋嫨more鏉ヨ幏寰楁洿鍔犲寰楄緇嗕俊鎭?br>http://nexe.gamedev.net/directKnowledge/default.asp?p=Debugging銆?
Direct3D9: (INFO) :MemFini!
Direct3D9: (WARN) :Memory still allocated!  Alloc count = 152
Direct3D9: (WARN) :Current Process (pid) = 00000fb8
Direct3D9: (WARN) :Memory Address: 00c95988 lAllocID=1 dwSize=000047f8, (pid=00000fb8)
榪欓噷鏄嫻嬪嚭鍐呭瓨娉勯湶浜?
涓鑸槸鍐呭瓨淇℃伅浠涔堢殑娌℃湁releasing鍜宒eleting鎺?
涔嬪墠閬囧埌鐨勪竴涓棶棰榣ock is not supported when multi-sampling is enabled鏄洜涓簊hader debugging鎵撳紑浜嗭紝涔嬪悗鍏抽棴浜嗭紝灝辨病鏈変簨鎯呬簡銆?br>鍒氭墠緙栬瘧hlsl鐨勬椂鍊欙紝鍙戠幇浜唜3025閿欒錛屽悗鏉ョ殑dx鐗堟湰瑕佷嬌鐢―3DXSHADER_ENABLE_BACKWARDS_COMPATIABLITY|D3DXSHADER_DEBUG鎵嶈兘緙栬瘧,鐗瑰埆鏄?008騫寸殑dx鐗堟湰銆?br>
 DX榛樿鐨勬槸D3DFILL_SOLID錛屽鏋滃嚭鐜癉3DFILL_WIREFRAME鐨勬儏鍐典竴瀹氳璁劇疆鍥炲幓銆?
CD3DArcBall:鍏佽浣犲皢鐢ㄦ埛鐨勮緭鍏ヨВ閲婁負鏃嬭漿鎴栬呭鉤縐?鎴戜滑鎵瑕佸仛鐨勬槸灝嗛紶鏍囨秷鎭紶閫掔粰榪欎釜綾?騫朵笖灝嗚鍥劇煩闃佃涓虹被鐨勬棆杞垨鑰呭鉤縐葷煩闃靛氨鍙互浜?
鐐逛箻: a.b = ||a|| *||b|| * cosA, 涓鑸敤鏉ュ垽鏂負0,閭d箞琛ㄦ槑姝d氦,>0,鏂瑰悜鍩烘湰鐩稿悓,<0,鏂瑰悜鍩烘湰鐩稿弽.浣跨敤鐐逛箻鏉ヨ綆楁姇褰?
緇欏畾涓ゅ悜閲弙,n,灝嗗叾鍒嗚В涓簐騫沖拰v鍨?鍒嗗埆騫寵浜庡拰鍨傜洿浜巒,騫朵笖婊¤凍 v = v騫?v鍨?涓鑸垚騫寵鍒嗛噺v騫充負v鍦╪ 涓婄殑鎶曞獎.
V騫?= n * ||V騫硘| / ||n||.
cosA = ||V騫硘|/||V|| cosA||V|| = ||V騫硘|
V騫? n*n*v/( ||n||*||n||).
鍙変箻寰楀埌鐨勫悜閲忓瀭鐩翠簬鍘熸潵鐨勪袱涓悜閲?
a *b鎸囧悜璇ュ鉤闈㈢殑姝d笂鏂?鍨傜洿浜巃鍜宐.
||a*b|| = ||a|| * ||b|| * sinA.
||a*b|| 涔熺瓑浜庝互a鍜宐涓轟袱杈圭殑騫寵鍥涜竟褰㈢殑闈㈢Н.
濡傛灉a,b騫寵鎴栦換鎰忎竴涓負0,鍒檃*b = 0,鍙変箻瀵歸浂鍚戦噺鐨勮В閲婃槸瀹冨鉤琛屼簬浠繪剰鍏朵粬鍚戦噺,鐐逛箻鐨勮В閲婃槸鍜屼換鎰忓叾浠栧悜閲忓瀭鐩?
浠繪剰瀵硅鐭╅樀D,閮芥湁D杞疆鐭╅樀= D,鍖呮嫭鍗曚綅鐭╅樀.
DirectX浣跨敤鐨勮鍚戦噺.
v = xp+yq+zr,鍚戦噺v灝辮〃紺烘垚p,q,r鐨勭嚎鎬у彉鎹簡,鍚戦噺p,q,r縐板仛鍩哄悜閲?榪欓噷鍩哄悜閲忔槸絎涘崱灝斿潗鏍囩郴
鍙樻崲鐗╀綋鐩稿綋浜庝互鐩稿弽鐨勯噺鍙樻崲鎻忚堪榪欎釜鐗╀綋鐨勫潗鏍囩郴.
2d閲岄潰鏄繖鏍瘋緗殑:
閫嗘椂閽堟棆杞粡甯?涓嶆槸蹇呴』)琚涓烘槸姝f柟鍚?欏烘椂閽堟柟鍚戞槸璐熸柟鍚?
緇晉杞存棆杞?
[ 1 0 0        
0 cosA sinA
0 -sinA cosA]
緇晊杞存棆杞?
[cosA 0 -sinA
0  1 0
sinA 0 cosA]
緇晍杞存棆杞?
[ cosA sinA 0
-sinA cosA 0
0 0 1]
緇曡醬n鏃嬭漿瑙掑害A,閭d箞鑾峰緱鐨勭煩闃墊槸:
[nx*nx*(1-cosA)+cosA     nx*ny*(1-cosA)-nz * sinA  nx*nz*(1-cosA) + ny*sinA
nx * ny *(1-cosA) - nz *sinA ny*ny*(1-cosA)+cosA  ny*nz*(1-cosA) - nx* sinA
nx * nz *(1-cosA)+ny * sinA ny * nz *(1-cosA) + nx* sinA nz*nz*(1-cosA)+cosA]
緙╂斁:閫氳繃鍩哄悜閲忔瀯閫犵煩闃?寰楀埌浠ュ崟浣嶅悜閲弉涓虹緝鏀炬柟鍚?k涓哄洜瀛愮殑緙╂斁鐭╅樀:
s(n,k) = [ p]     [ 1 + (k-1)nx2  (k-1)nxny   (k-1)nxnz]
                    =
             [ q]     [ (k -1)nxny   1+(k-1)ny2   (k-1)nxnz]
             [ r]     [(k-1)nxnz  (k-1)nzny   1+(k-1)nz2]

鎶曞獎鎰忓懗鐫闄嶇淮鎿嶄綔,鏈変竴縐嶆姇褰辨柟娉曟槸鍦ㄦ煇涓柟鍚戜笂鐢ㄩ浂鍋氱緝鏀懼洜瀛?榪欑鎯呭喌涓?鎵鏈夌偣閮借鎷夊鉤鑷沖瀭鐩寸殑杞?2D)鎴栧鉤闈?3D),榪欑綾誨瀷鐨勬姇褰辯О鍋氭浜ゆ姇褰?鎴栬呭鉤琛屾姇褰?鍥犱負浠庡師鏉ョ殑鐐瑰埌鎶曞獎鐐圭殑鐩寸嚎鐩鎬簰騫寵.
n鍨傜洿浜庢姇褰辯洿綰?鑰屼笉鏄鉤琛?3D涓?鍚戝瀭鐩翠簬n鐨勫鉤闈㈡姇褰辯殑鐭╅樀濡傚叕寮?
p(N) =   [1-nx2 -nxny -nxnz]
              [-nxny 1-ny2 -nynz]
              [-nxnz -nzny 1-nz2]
闀滃儚: 灝嗙墿浣撴部鐩寸嚎(2D涓?鎴栧鉤闈?3D涓?緲繪姌.
P(n) = [ 1-2nx2 -2nxny -2nxnz]
          [-2nxny 1-2ny2 -2nynz]
          [-2nxnz -2nzny 1-2nz2]
Hxy鐨勬剰涔夋槸x,y鍧愭爣琚潗鏍噝鏀瑰彉
Hxy(s,t) = [1 0 0]
                [0 1 0]
                [s  t 1 ]

Hxz(s,t) = [ 1 0 0]
                [s  1 t]
                [0 0 1]

Hyz(s,t) = [1 s t]
                [0 1 0]
                [0 0 1] 

M鐗╀綋->鍍忔満 = M鐗╀綋->涓栫晫M涓栫晫->鍍忔満
P->鍍忔満 = P鐗╀綋 M鐗╀綋->鍍忔満
綰垮艦鍙樻崲: 濡傛灉婊¤凍涓嬪紡,閭d箞鏄犲皠f(a)灝辨槸綰挎х殑:
f(a+b) = f(a) + f(b)
浠ュ強F(ka) = kf(a).
浠垮皠鍙樻崲: 綰挎у彉鎹㈠悗鎺ョ潃騫崇Щ,鍥犳浠垮皠鍙樻崲鐨勯泦鍚堟槸綰挎у彉鎹㈢殑瓚呴泦.浠諱綍綰挎у彉鎹㈤兘鏄豢灝勫彉鎹?浣嗕笉鏄墍鏈変豢灝勫彉鎹㈤兘鏄嚎鎬у彉鎹?
濡傛灉瀛樺湪涓涓嗗彉鎹㈠彲浠?鎾ゆ秷"鍘熷彉鎹?閭d箞璇ュ彉鎹㈡槸鍙嗙殑.
濡傛灉鍙樻崲鍓嶅悗涓ゅ悜閲忓す瑙掔殑澶у皬鍜屾柟鍚戦兘涓嶆敼鍙?璇ュ彉鎹㈡槸絳夎.鍙湁騫崇Щ,鏃嬭漿鍜屽潎鍖緙╂斁鏄瓑瑙掑彉鎹?
絳夎鍙樻崲灝嗕細淇濇寔姣斾緥涓嶅彉.
騫崇Щ,鏃嬭漿鍜岄暅鍍忔槸浠呮湁鐨勬浜ゅ彉鎹?闀垮害,瑙掑害,闈㈢Н,鍜屼綋縐兘淇濇寔涓嶅彉.
鍒氫綋鍙樻崲鍙敼鍙樼墿浣撶殑浣嶇疆鍜屾柟鍚?涓嶅寘鎷艦鐘?鎵鏈夐暱搴?瑙掑害,闈㈢Н鍜屼綋縐兘涓嶅彉.騫崇Щ鍜屾棆杞槸浠呮湁鐨勫垰浣撳彉鎹?闀滃儚騫朵笉琚涓烘槸鍒氫綋鍙樻崲.
鍋囪鐭╅樀M鏈塺琛?c鍒?璁版硶Mij琛ㄧず浠嶮涓櫎鍘葷i琛屽拰絎琷鍒楀悗鍓╀笅鐨勭煩闃?鏄劇劧,璇ョ煩闃墊湁r-1琛?c-1鍒?鐭╅樀Mij縐頒負M鐨勪綑瀛愬紡.


jolley 2009-04-10 16:56 鍙戣〃璇勮
]]>
鍦▁p涓婂畨瑁卻qlserver2000閬囧埌鐨勯棶棰橈紝浠ュ強application verifier鐨勭浉鍏充俊鎭?/title><link>http://www.shnenglu.com/jolleydtan/archive/2009/03/30/78299.html</link><dc:creator>jolley</dc:creator><author>jolley</author><pubDate>Mon, 30 Mar 2009 00:46:00 GMT</pubDate><guid>http://www.shnenglu.com/jolleydtan/archive/2009/03/30/78299.html</guid><wfw:comment>http://www.shnenglu.com/jolleydtan/comments/78299.html</wfw:comment><comments>http://www.shnenglu.com/jolleydtan/archive/2009/03/30/78299.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/jolleydtan/comments/commentRss/78299.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/jolleydtan/services/trackbacks/78299.html</trackback:ping><description><![CDATA[榪欏嚑澶╁畨瑁呰繖涓猻ql server 2000,鑺辨帀浜嗗緢澶氭椂闂達紝甯屾湜浠ュ悗瀹夎鐨勬椂鍊欙紝灝介噺閬垮厤鍑虹幇榪欎簺鎯呭喌錛屽叾瀹冪殑閿欒鎯呭喌灝變笉璇存槑浜嗭紝鐜板湪鍙鏄庢垜閬囧埌鐨勯棶棰樼殑瑙e喅鍔炴硶錛氬皢鍘熸潵鐨勫畨瑁呯洰褰曞垹闄ゆ帀錛屽皢c:\program files\Microsoft SQL Server涓嬮潰鐨?0鐩綍緇欏垹闄ゆ帀錛屽皢娉ㄥ唽琛ㄩ噷闈㈢殑HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server浠ュ強HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer閲岄潰鐨勯敭鍊間俊鎭垹闄ゆ帀銆傛垜鏈哄櫒涓婇潰騫舵病鏈塇KEY_LOCAL_USER\SOFTWARE\Microsoft\Microsoft SQL Server榪欎釜鐩綍鐨勩?<br>application verifier 鐨勪俊鎭彲浠ヤ粠榪欓噷鑾峰緱:http://technet.microsoft.com/en-us/library/bb457063.aspx<br>application verifier涓昏鐢ㄦ潵媯嫻嬫寚閽堝紩璧風殑鍐呭瓨閿欒.鍦ㄧ▼搴忚繍琛屾湡闂磋繘琛岃窡韙唴瀛樹嬌鐢ㄦ儏鍐? <br>application verifier鐨刲og淇℃伅鍖呮嫭閿欒鎵鍦ㄧ殑璋冪敤鍫嗘爤,騫朵笖瑕佹敞鎰忓強鏃跺湴娓呴櫎涓婃鐨勯敊璇褰?鎴戜箣鍓嶉亣鍒扮殑闂鏄?鎴戠敤application verifier媯嫻嬪埌鏌愪釜閿欒,鑰屼箣鍚庡啀鐢ㄨ繖涓猠xedebug鍚姩鐨勬椂鍊?灝辨姤閿?鍚庢潵鍦╝pplication verifier閲岄潰娓呴櫎浜嗚褰曟墠鍙互姝e父榪愯. <img src ="http://www.shnenglu.com/jolleydtan/aggbug/78299.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/jolleydtan/" target="_blank">jolley</a> 2009-03-30 08:46 <a href="http://www.shnenglu.com/jolleydtan/archive/2009/03/30/78299.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>3D綆$嚎http://www.shnenglu.com/jolleydtan/archive/2009/02/17/74039.htmljolleyjolleyTue, 17 Feb 2009 07:49:00 GMThttp://www.shnenglu.com/jolleydtan/archive/2009/02/17/74039.htmlhttp://www.shnenglu.com/jolleydtan/comments/74039.htmlhttp://www.shnenglu.com/jolleydtan/archive/2009/02/17/74039.html#Feedback0http://www.shnenglu.com/jolleydtan/comments/commentRss/74039.htmlhttp://www.shnenglu.com/jolleydtan/services/trackbacks/74039.htmlcomputer display = a single graphics adapter + a display monitor.
graphics adapter contains the hardware needed store and display images on a monitor or other display device.
all of these adapters stored a representation of the displayed image in a bank of dual-ported memeory called a frame buffer.
the system uses one of the ports to read and write images into the frame buffer.the second port is used by the video scan out circuitry of the adapter to create a signal for the monitor.Direct3D only supports VGA compatible adapters.

Frame                               Color Lookup
Buffer                               Table


2D Pixel                           D/A
Engine                              Converter

Host CPU                        CRT Monitor

Direct3D abstractions include :device, swap chains, surfaces, and resource .

an application enumerates the devices available on each adapter, examining their capablities and supported display modes to find an acceptable device.
device is the object that expose the rendering operations of the hardware. its properties control the rendering behavior or provide information about rendering, while the device's methods are used to perform the rendering itself.

devices always contain at least one swap chain and a collection of resources used for rendering.
resources are application specific data stored in or near the device hardware for use during rendering Direct3D provides resources for scene geometry(vertices and indices) and appearance(images, textures, and volumes).

a surface is a resource containing a rectangular collection of pixel data such as color, alpha, depth/stencil or texture information.
a swap chain contains one or more back buffer surfaces where scenes are rendered and presented for display on the monitor, is a collection of back buffers.

a device's render target is the back buffer surface, with an optional depth/stencil surface, in which rendering will occur.

while all back buffers are valid render targets, not all render targets are back buffers.
it is also possible to have a texture as a render target allowing dynamic rendering effects.

to obtain a device object, Direct3D provides an object for device enumeration and creation. all other objects are created through the device. an application first obtains the runtime interface, then selects and creates a device from those available, and using the device creates the necessary resources for rendering.

most COM methods return HRESULT to indicate success or failure.
in windowed mode: the results of graphic rendering are presented for display insidei the client area of a window on the desktop.
Direct3D cooperates with GDI to make the results of rendering visible, using a ::StretchBlt operation to present a back buffer in the window's client region
in exclusive mode: Direct3D communicates directly with the display driver avoiding GDI. when an exclusive mode application is running, no other applications have access to display hardware and no GDI is visible on the screen.

HAL(hardware abstraction layer): has hardware acceleration of graphics rendering, making it fastest device type.

reference device: useful for debugging, when developing software applications that target new features not yet common in hardware, the reference device maybe your obly choice for generating an image with those Direct3D features.

the null reference device: does nothing and all rendering will result in a black screen.useful for manipulating resources on a machine that provides no hardware or software  implementation of the runtime.

the pluggable software device: RegisterSoftwareDevice method,

each resource has Type, Pool, Format, and Usage attributes, each of these attributes of a resource are specified at the time the resource is created and remain constant for the lifetime of the resource object.
type attributes describes the kind of resource and is defined by D3DRESOURCETYPE.
pool attribute of a resource describes how it is managed by the Direct3D runtime and is defined by the D3DPOOL enumeration.
resources in the default pool exist only in device memory.
resources in the managed pool exist in system memory and will be copied into the device's memory by the runtime when needed.
resource in the system memory pool exist only in system memory
resource in the scratch pool reside only in system memory and are not bound  by format constraints of the device
when a device is lost, all resources in the default pool are lost and should be released and recreated by the application when the device is regained.
Format attribute of a resource describes the layout of the resources's data in memory and is defined by the D3DFORMAT enumeration.

all resources have a format, but most of the format enumerants define the memory layout for pixel data.
D3DFMT_D24S8: D:depth buffer, S:stencil buffer.

Usage attribute describes how the application will be use the resource and is defined by a collection of flag bits. static reources are typically loaded with data once and used repeatedly without change, while dynamic resources are repeatedly modified bu the application.
a direct3D application starts by obtaining the IDirect3D9 COM interface pointer by calling Direct3DCreate9.
GetAdapterCount is to determine the number of adapters in the system. each adapter provides a number of video display modes. each display mode contains a screen dimention, refresh rate and pixel format and is described by D3DDISPLAYMODE structure.
the back buffer surface format of a device must be compatible with the display mode's format. CheckDeviceFormat method can be used to discover compatible formats.
GetAdapterModeCount: the number of display modes.
EnumAdapterModes: the display mode information.
GetAdapterDisplayMode: the display mode currently in use by the adapter.
two display modes can have the same width, height and format values but different values for the RefreshRates.
the CheckDeviceType method tells us if a particular combination of display format and back buffer format are valid for a device of a given type operating in windowed or exclusive mode.
with a valid device type, we can check the device's capabilities for rendering required by our application with GetDeviceCaps.

we can validate all the resources required by our application with the CheckDeviceFormat, checkDeviceFormat should be used to validate all the format of all resources used by the application: back buffer surfaces, depth/stencil surfaces, texture surfaces, and volume texture formats. if the application requires a depth buffer for viaiblitiy determination, it should use CheckDepthStencilMatch to find a depth buffer that can be used with its render target formats in a given display mode.
CheckDeviceMultiSampleType: check multisampling needs.
GetAdapterIdentifier: allows an application to identify a specific brand of adapter from a specific vendor.
D3DCREATE_ADAPTERGROUP_DEVICE: allows an application to drive both video outputs through a single device interface, allowing resources to be shaed for both outputs.
Direct3D uses single precision floating point computations. if an application requires higher precision from FPU.there are two choices, either the application can ensure that the FPU is in single precision mode when calling into Direct3D, or ir can request that the device preserve the application's FPU precision before Direct3D performs any floating -point operations and restore the precision before returning to the application.
D3DCREATE_SOFTWARE_VERTEXPROCESSING: select software vertex processing, which is always available from the runtime.the runtime used an efficient implementation of software vertex processing that is optimized for the CPU.
D3DCREATE_MIXED_VEVERTEXPROCESSING: select a combination of software and hardware vertex processing selected by SetSoftwareVertexProcessing mixed vertex processing is incompatible with a pure device and will fail if both are requested together.

D3DPRESENTFLAG_DEVICECLIP: restricts the results of a present operation to the client area of the device window in windowed mode.
D3DPRESENTFLAG_DISCARDDEPTHSTENCIL: instructs the runtime to discard the contents of the depth stencil surface after a call to Present, or when a new depth stencil surface is set on the device.
D3DPRESENTFLAG_LOCKABLEBACKBUFFER: requests a default swap chain with back buffer surfaces that can be directly accessed by the application.
in windowed mode: hDeviceWindow specifies the window whose client area will be used for presentation in windowed operation  if hDeviceWindow is zero, then the focus window willbe used for presentation.
in exclusive mode, hDeviceWindow specifies the top-level window used by the application

D3DPRESENT_RATE_DEFAULT: instructs the runtime to choose a suitable refresh rate in exclusive mode, and uses the current refresh rate in windowed mode.
an application may wish to create a full-screen display on a specific monitor.
GetAdapterMonitor: return an HMONITOR handle for an adapter, once you have the handle to the device 's montior, u can determine what part of the virtual desktop is covered by the monitor.

a scene is a collection of three dimensional objects that are projected onto the render target surface from the viewpoint of a syntheitic camera
each object in a scene is described by a collection of geometric primitives, such as points, lines, and triangles, with the device's action methods. 
the pipeline converts geometric descriptions into pixels on the render target surface through the process of rasterization. graphic primitives are rendered in the order in which they are described to the devices similar to the way a CPU executes binary instructions sequentially through memory.
the entire graphics pipeline is controlled through the properties of the device.
the properites are manipulated through the Get/Set methods of the device.
every device has a distinct set of capabilities. Direct3D specifies an abstract machine interface, but does not provide a software emulation for a feature not provided directly by the hardware's driver.
 a device provides specific information on its capabilities to allow an application to adapt to the capabilities of the device.
much of the behavior of the graphics pipeline is controlled by render states.
groups of device properties, including render states, can be cached and set as a group with state blocks.
the device object represents the rendering pipeline, we get images from the pipeline by supplying it with scene data and instructing it to render scenes into images.
scene data consists of geometric data defining shapes in space and data defining the appearance of the shapes.
we can break the pipeline up into large sections consisting of vertex data assembly, vertex processing, promitive assembly and rasterization, pixel processing, the frame buffer,a dn video scan out.

vertex data assembly section gathers together vertex components from a collection of data streams to assemble a compute vertex and its associated data.
vertex processing performs computations on each vertex such as the transformation and lighting of vertices.the processed vertex data is then assembled into graphic primitives and rasterized into a stream of pixels.
pixel processing performs a computations on each rasterized pixel to determine the final color of the pixel that will be written into the frame buffer.
frame buffer performs a read/modify/write operations combining processed pixels from the rasterizer with the existing pixels in the render ttarget.
video scan out reads the pixels out of the frame buffer for conversion into video signals displayed by the monitor.

scenes are rendered to the render target selected on the device. if the render target is part of a swap chain, the render target can be made viaible on the device through presentation.
the render target may not be part of a swap chain if the render target is a texture resource.
you present renderings for display through a swap chain as the last thing you do when rendering a scene.
a swap chain consists of one or more back color buffers into which images are rendered. a device is always associated with at least one swap chain and in windowed mode additional swap chains can be created to obtain multiple presentable surfaces.
the philosophy of the Direct3D object is to expose the capabilities of the hardware to the application programmer and let the application adapt to the hardware.
GetDeviceCaps: return the capabilities of an actual device, while GetDeviceCaps method on the Direct3D object returns the generic capabilities of a device.
IUnknown 
      IDirect3DVolume9
      IDirect3DResource9
           IDirect3DIndexBuffer9
           IDirect3DVertexBuffer9
           IDirect3DSurface9
           IDirect3DBaseTexture9
               IDirect3DTexture9
               IDirect3DCubeTexture9
               IDirect3DVolumeTexture9
resource objects are used as containers for the scene data rendered by the device such as primitive vertices, indices intto vertex arrays, surface textures and volumes. 
two and three dimensional textures expose their contents as collections of sutfaces and volumes, respectively. the back buffer, depth/stencil buffer and render target properties of the device are also exposed as surfaces.
volume objects do not inherit from IDirect3DResoutce9 and therefore do not participate in the resource management exposed by this interface.
managed resources are assigned an unsigned integer priority, with higher priority taking precedence so that resources with a lower priority are discarded from device memory first.
non-managed resources always return a priority of zero. within the same priority, Direct3D uses a least-recently used strategy to discard old resoucrs in preference to newly created resources.
when the application attempts to use more resources than the card can hold while rendering a scene, Direct3D switches to a most-recently used first strategy for discarding memory.
resources in D3DPOOL_DEFAULT are not managed and are never discarded from device memory by the resource manager.
if u need to allocate new resources in the default pool after managed resources have been loaded, you should evict all managed resources before allocating new resources in the default pool.
resources in pool D3DPOOL_SYSTEMMEM are never located in device memory, so that they do not participate in resource management.
GetAvailableTextureMem: obtain an estimate of the available texture memory.
the GetDevice method returns the device with which this resource is associated. resources cannot be shared across devices.
GetPrivateData/SetPrivateData: allow an application to associate its own arbitrary chunks of data with any Direct3D erouces.
each distinct item of private data is identified by a GUID. all private data associated with a resource is freed when the associated resource itself is freed.
methods and functions in Direct3D that create COM objects, such as CreateDevice, add a reference to the object for the caller before they return the interface pointer, the application must release these objects when they are no longer needed to avoid a memory leak.
Device queries allow you to obtain information from the driver layer of the device, the two main uses for driver queries are for obtaining rendering statistics and event notifications from the device.
D3DQUERYTYPE enumeration gives the possible kinds of queries: vertex cache description queries, resource manager statistics queries, vertex statistics queries, event queries, occlusion queries, timestamp queries, time queries and cache utilization queries.
a query exists in one of three state: signaled, building, or issued.
Issue: used by the application to signal a state transition on the query.
the device driver can also change the state of a query when it has returned the data requested by the query.
the query will report the results for primitives issued between the begining of the query and the end of the query.
occlusion queries return the number of pixels that passed the depth test for primitives rendered between the begin and end of the query.
the resource manager statistics query returns a D3DDEVINFO_RESOURCEMANAGER structure, which contains an array of D3DRESOURCESTATS structure, one for each resource type.
the vertex cache is a memory cache close to the GPU that avoids access to vertex memory for a small number of recently used vertices.
PIX: is a performance measurement tool for DirectX applications. the remaining query types return data for performance measurements with tools like PIX.
the device object's properties control the behavior of the rendering pipeline while its methods supply data for the pipeline to render.

state blocks are COM objects that provide a way for your application to cache a group of device properties for later use.
each state block is associated with a device, returned by the GetDevice method.once  a state block has been created, the state block can be applied to the device by calling apply on the state block, calling capture on an existing state block captures the current values of the device properties into the state block.
there are two ways to create a state block object and fill it with specific device property values.
the first way: call CreateStateBlock with D3DSTATEBLOCKTYPE value identifying the kind of state you  want recorded in the block.
the second way of obtaining a state block object is to call BeginStateBlock, set device properties and then call EndStateBlock.
when EndStateBlock is called, each device property marked for capture is recorded into the state block. if a device property is set multiple times between BeginStateBlock and EndStateBlock, only the last value set in the property is captureed into the state block.
release the state block COM object when you are finished with a state block.
a pure device has a performance advantage because the runtime and driver do not have to keep a copy of the non-queryable state for the application.
scenes contain one or more objects that are positioned relative to each other and to the virtual camera that views the scene. such objects are called "models", and contain data that define their shape and apperance. the shape of a model is described by a collection of a simple geometric shapes, called graphic primitives.
when we draw a three dimensional scene, we need to solve the problem of visibility: objects in the foreground should occlude objects in the background. Two- dimensional applications use a painter's algorithm to determine visibility. Direct3D can use depth/stencil surfaces to resolve visibility.

using either a flexible vertex format or a vertex shader declaration, Direct3D describes colors, textures corrdinates,vertex blending weights and arbitrary shader data at each vertex.the vertex data is supplied to the device through a collection of streams, each associated with a vertex buffer.
the streams can be driven through a level of indirection with an index buffer.the streams can be driven though a level of indirection with an index buffer.
the scene is described to the device one primitive at a time. each primitive  is rasterized into a collection of pixels written to the render target property of the device.
All Direct3D rendering is done within a scene. each successive frame draws the models at successive moments in time, as in cel animation used for cartoons.
frame rates of greater than 15 fps can be preceived as "real-time", the z-buffer algorithm solution to the visibility problem works at each pixels on the render target instead of on models, as models are rasterized, each pixel that is associated with z value is used to determine which pixel is cloest to the camera.the closer pixels are stored into the render target, while pixels farther away are discarded. the depth/stencil buffer holds each pixel's depth from the camera. to use the Z-buffer for resolving visibility, set RS_Z Enable to D3DZB_TRUE, RS_Z Write Enable to TRUE, and RS_Z Func to D3DCMP_LESS.

if the D3DPRASTERCAPS_ZBUFFERLESSHSR bit of D3DCAPS9:RasterCaps is set, it indicates the device has an alternative visivility algorithm for hidden surface removal that doesn't use a Z-buffer. how visibility is determined is hardware dependent and application transparent. 

all back buffers on swap chains are valid render targets, but render targets are not restricted to back buffer surfaces, when the device is created or reset, the render target is back buffer zero of the device's default swap chain. when present is called on the device, the render target  advances to the next back buffer so that after present returns, render target is back buffer zero again.

setting the render target to a surface other than a back buffer surface allows the device to render directly into an imanage surface instead of rendering into a swap chain's back buffer and using stretchrect to obtain the results of the rendering, which could stall the pipeline.

D3DPT_POINTLIST draws a collection of points,
D3DPT_LINELIST draws a squence of possibly disjoint line segments.


jolley 2009-02-17 15:49 鍙戣〃璇勮
]]>
緙栫▼鏉傜儵http://www.shnenglu.com/jolleydtan/archive/2009/01/31/66889.htmljolleyjolleySat, 31 Jan 2009 00:23:00 GMThttp://www.shnenglu.com/jolleydtan/archive/2009/01/31/66889.htmlhttp://www.shnenglu.com/jolleydtan/comments/66889.htmlhttp://www.shnenglu.com/jolleydtan/archive/2009/01/31/66889.html#Feedback2http://www.shnenglu.com/jolleydtan/comments/commentRss/66889.htmlhttp://www.shnenglu.com/jolleydtan/services/trackbacks/66889.html // 鍙傛暟1:瀵嗚亰鐢ㄦ埛鍚?鍙傛暟2:棰戦亾淇℃伅
 static bool ChangeChannelAndSetFocus(char* username,Channel channel);
榪欐浠g爜鐪嬭搗鏉ユ槸娌℃湁浜嬫儏鐨?浣嗘槸鍦ㄦ帴鍙h緗笂闈㈠瓨鍦ㄤ笉濂界殑鍋氭硶,濡傛灉鏄瀵嗛閬撶殑璇?鏄湁鐢╱sername鍋氱鑱婂璞$殑,濡傛灉鏄潪縐佽亰棰戦亾鐨勮瘽,灝辨病鏈夎繖涓鑱婂璞′簡.浣嗘槸濡傛灉瑕佽皟鐢ㄨ繖涓帴鍙g殑璇?榪樺緱緇欎釜榪欐牱鐨勫?
姣斿榪欐牱鐨勭敤娉?->ChangeChannelAndSetFocus("",public_channel),
鍏跺疄濡傛灉紼嶅井鏀瑰彉涓涓嬫帴鍙h緗殑璇?灝卞ソ浜?
 static bool ChangeChannelAndSetFocus(Channel channelchar* username = "");
榪欐牱浣跨敤榛樿鍙傛暟灝卞ソ浜?
涔嬪墠鐨勮皟鐢ㄥ氨鍙互榪欐牱浣跨敤浜?
:->ChangeChannelAndSetFocus(public_channel),鐪嬭搗鏉ヨ垝鏈嶅浜?鍝庢劅瑙夌紪紼嬪姛搴曡繕鏈夊緟鍔犲己,榪欎箞綆鍗曠殑闂,鎷垮嚭鏉ユ兂鎯?榪樻湁榪欎箞澶氬闂憿.

榪欏嚑澶╁啓浜嗕竴孌靛嚱鏁頒唬鐮?鍚庢潵琚竴涓浼欒皟鐢ㄤ簡,浠栫洿鎺ュ湪鎴戠殑鍑芥暟閲岄潰淇敼,榪欐牱閫犳垚浜嗗師鏉ユ垜鍑芥暟閲岄潰鐨勯昏緫鍑虹幇閿欒,鐜板湪鎯蟲潵,濡傛灉浠ュ悗鏄繖鏍風殑鎯呭喌,灝變笉鑳藉厑璁鎬粬鍦ㄦ垜鐨勫嚱鏁伴噷闈慨鏀規(guī)垜鐨勯昏緫鍜岀浉鍏寵皟鐢?浣嗘槸瑕佺暀鍑烘帴鍙g粰瀹冭皟鐢?鑷充簬鍏蜂綋鐨勬搷浣?瑕佹垜鑷繁鍏佽鎵嶈兘娣誨姞,褰撶劧鎴戝彲浠ュ府浠栫湅鐪嬪師鏉ヤ粬娣誨姞鐨勪唬鐮?浣嗘槸榪欐牱涔熷氨娌℃湁浠涔堟剰涔変簡.榪欑鍚堜綔鎬х殑宸ヤ綔灝ゅ叾瑕佽絀惰繖浜?涓嶇劧寰堥夯鐑︾殑.


紿佺劧鎯寵搗鏉ヨ璁板綍鐐逛粈涔?璋冭瘯寮曟搸鐨勬椂鍊?鍙互閲囩敤榪欐牱鐨勬柟寮?鎵撳紑涓婂眰閫昏緫鐨勫伐紼?鐒跺悗灝嗗紩鎿庣浉鍏崇殑浠g爜鎷栨嫿鍒頒笂灞傞昏緫鎵鍦ㄧ殑宸ョ▼閲岄潰鍘?鐒跺悗鍦ㄨ繖涓唬鐮侀噷闈㈠彲浠ヨ緗浉鍏蟲柇鐐?浠ュ墠鎬諱笉鐭ラ亾鎬庝箞鎵句笂灞傞昏緫涓庡簳灞傚紩鎿庣殑鍏ュ彛,鏈榪戠粓浜庣煡閬撲簡.鍛靛懙.閫氳繃榪欐牱鐨勬柟娉?灝卞彲浠ュ湪涓婂眰閫昏緫鍋氭煇浜涙搷浣?鐒跺悗鍏寵仈榪欎簺閫昏緫鐩稿叧鐨勫紩鎿庝唬鐮?

浠婂ぉ涓鐩村湪琚崟鎬佸洶鎵扮潃,浜嬫儏鏄繖鏍風殑:澶у巺鍜屾垬鏂楀満鏅噷闈㈤兘鏈変袱涓被浼肩殑chatroom,騫朵笖浠栦滑鍚勮嚜浣跨敤鐨勫崗璁槸涓嶄竴鏍風殑.鐜板湪鎯蟲妸浠栧悎騫惰搗鏉ュ仛鎴愮被浼約ingleton鐨勪笢瑗? 涔嬪墠灝遍亣鍒頒竴涓棶棰橈紝澶у巺鍜屾垬鏂楀満鏅笉鑳藉湪鐩鎬簰涔嬮棿鍙戦佷俊鎭紝鍚庢潵鎴戠殑澶勭悊鏂規(guī)硶鏄皢鎴樻枟鍦烘櫙閲岄潰娣誨姞澶у巺閲岄潰鐨勫搷搴斾簨浠訛紝榪欐牱鐨勮瘽錛屽湪澶у巺閲岄潰鍙戦佺鑱婁俊鎭埌鎴樻枟鍦烘櫙閲岄潰錛屽氨鍙互鎺ュ彈鍒頒簡錛屼絾鏄悗鏉ュ彂鐜板湪鎴樻枟鍦烘櫙閲岄潰鍙戦佷俊鎭埌澶у巺閲岄潰錛屽嵈鎺ュ彈涓嶅埌錛屽茍涓旇繖涓椂鍊欙紝鍦ㄥぇ鍘呭拰鎴樻枟鍦烘櫙閲岄潰宸茬粡瀛樺湪寰堝鍐椾綑浠g爜浜嗭紝榪欐牱鐨勫鐞嗚鎴戞劅瑙夊緢涓嶇埥錛屾垜鍦ㄦ兂鏈夋病鏈夊叾瀹冨姙娉曪紝鍚庢潵璇鋒暀浜嗚佸ぇ錛岃佸ぇ甯繖瑙i噴浜嗕竴涓嬶紝鍚庢潵錛屽湪鍗忚澶勭悊鏂瑰紡涓婇潰淇敼浜嗕竴涓嬶紝鎵嶅彲浠ョ殑銆俢hatroom鍦ㄤ笉鍚岀殑鏃跺欏彂閫佷笉鍚岀殑鍗忚灝卞ソ浜嗭紝騫朵笖鍦ㄦ帴鍙楃殑鏃跺欏垎寮澶у巺鍜屾垬鏂楀満鏅鐞嗗氨濂戒簡錛岃繖鏍瘋繕鏄敤浜嗘帴鍙椼佸拰鍙戦佽繖涓ゆ搴熶唬鐮併傚浜巗ingleton鐨勪簡瑙h繕鏄笉澶熷ソ銆?nbsp;

涔嬪墠閬囧埌鐨勯棶棰橈紝鏄亰澶╁彂閫佹秷鎭茍涓嶇珛鍗蟲樉紺哄湪鏈湴錛岃岃鍏堝皢淇℃伅杞埌鏈嶅姟绔紝鏈嶅姟绔繘琛屾煡璇紝濡傛灉鑳藉鎵懼埌榪欎釜縐佽亰瀵硅薄錛岄偅涔堝氨榪斿洖緇欎俊鎭紝鍚﹀垯灝辨樉紺鴻璇ョ敤鎴蜂笉瀛樺湪錛屽湪鎴樻枟鍦烘櫙閲岄潰鍚戝ぇ鍘呯殑鏌愪釜鐜╁鍙戦佺鑱婁俊鎭互鍚庯紝閫鍑烘垬鏂楀満鏅互鍚庯紝鍙戠幇澶у巺閲岄潰榪樻樉紺虹潃鍦ㄦ垬鏂楀満鏅噷闈㈠彂閫佺殑鑱婂ぉ淇℃伅銆傝繖鏍峰嵆浣挎垜鎸夌収甯歌鎬濊礬鍘繪妸緗戠粶鎺ュ彈绔殑鐩稿叧浠g爜娉ㄩ噴鎺変篃涓嶈兘杈懼埌娑堥櫎澶у巺閲岄潰鐨勮亰澶╀俊鎭殑鐩殑錛屾劅瑙夊緢閮侀椃銆傚悗鏉ユ煡鐪嬬鑱婁俊鎭柟闈㈢殑浠g爜錛屽彂鐜版病鏈夊皢淇℃伅鏈夋晥鍦版嫤鎴紝縐佽亰淇℃伅鍦ㄦ湰鍦頒笂闈㈣繕鍙互琚樉紺猴紝娌℃湁緇忚繃緗戠粶鏂歸潰鐨勯獙璇佸氨鐩存帴鍙戦佽繃鏉ヤ簡銆傚湪縐佽亰淇℃伅鏂歸潰鍋氫竴浜涘鐞嗗茍涓斿湪閫鍑烘垬鏂楀満鏅殑鏃跺欏仛涓浜涗俊鎭垹闄ゅ鐞嗭紝榪欐牱灝卞彲浠ヨ揪鍒扮洰鐨勪簡銆?
鍥犱負鐜╁瀵硅薄浣嶇疆鏁版嵁鏄粠鏈嶅姟鍣ㄩ偅杈瑰彂閫佽繃鏉ョ殑,鐜╁浠庢湇鍔″櫒鑾峰緱鏁版嵁闇瑕佷竴孌墊椂闂?鎵浠ラ渶瑕佸姞鍏ヤ竴涓彃鍊?鏉ュ皢鐜板湪鐨勪綅緗繃娓″埌涓嬩竴涓殑浣嶇疆.榪欓噷鍙互閲囩敤澶氱鎻掑兼柟娉?

浠婂ぉ鍐欎簡浠g爜鍘繪敼鍐欏己鍒跺姩浣滅殑澶勭悊錛岀粨鏋滃彂鐜板緢澶氬鏄湁闂鐨勶紝鍏朵腑鍘熷洜鏄病鏈夊皢鍘熸潵鐨勪唬鐮佷綔鐢ㄧ湅浠旂粏閫犳垚浜嗭紝鎰熷埌緹炴劎鍛紝

鍙﹀鍦ㄧ紪鍐欎氦浜掓ф瘮杈冨己鐨勪唬鐮佹椂錛屼竴瀹氳鑰冭檻鑷繁鐨勪唬鐮佸彲鑳藉甫鏉ョ殑褰卞搷銆?br>
鏇存柊鏌愪釜鏂囦歡姣旇緝楹葷儲鐨勮瘽,閭d箞鍙互鍏堥噰鐢ㄥ師濮嬫枃浠跺垹闄?騫朵笖閲嶆柊鍏ㄩ儴鏇存柊鐨勫仛娉曞幓鍋?鑰屼笉鏄敤鏇存柊鏌愪釜瀛楁鐨勬柟娉曞幓鍋?

濡傛灉娌℃湁鍒濆鍖栧0闊寵澶囨垚鍔熺殑璇?閭d箞搴旇鍙互寮瑰嚭鎻愮ず淇℃伅妗?騫朵笖灝嗗師濮嬪0闊抽煶閲忚緗負0.

涔嬪墠鍦ㄤ慨鏀逛竴涓猙ug(鍦ㄤ漢鐗╂帶鍒墮潰鏉挎墦寮浠ュ悗,涓鐩村厠闅唎bject,閫犳垚浜嗗湪寮曟搸搴曞眰鏃犳硶閿佸畾vertexBuffer鐨勯棶棰?,寮濮嬩互涓烘槸鍐呭瓨娉勯湶浜?鍦ㄦ墦寮鎺у埗闈㈡澘10鍒嗛挓浠ュ悗,娓告垙灝辯獊鐒跺嚭閿欎簡,榪樹竴搴︽兂鐢ㄤ竴浜涜緟鍔╁伐鍏鋒潵鏌ユ壘鍐呭瓨鐨勪俊鎭槸鍚﹀嚭閿?鍚庢潵鍙戠幇鍦ㄤ漢鐗╂帶鍒墮潰鏉塊噷闈㈠厠闅嗕簡榪囧鐨勪漢鐗﹐bject,鑰岃繖浜沷bject鍗存病鏈夊強鏃跺湴鍒犻櫎,閫犳垚鍗犵敤榪囧鐨勮祫婧?鍒版渶鍚庤繛閿佷綇vertex buffer涔熶笉琛屼簡.鍦ㄥ垎鏋愯繖涓棶棰樹笂闈㈢殑鏃跺?鎴戣繕鏄竴涓姴鍦版寲搴曞眰鑰屾病鏈夎冭檻澶鐨勯昏緫灞傞潰鐨勪笢瑗?瀹炲湪鏈夌偣鍗楄緯鍖楄緳鐨勫懗閬?鍊煎緱鍙嶇渷.

鍦ㄨ緭鍏ョ殑浣跨敤涓婇潰,涓鑸殑娓告垙閮介噰鐢╠irectInput,鍗充嬌鏄疷2,涓婃閬囧埌鐨勯棶棰樻槸,鍦ㄤ竴鍚屼簨鏈哄櫒涓婇潰榪愯杈撳叆鐨勬椂鍊欏氨榪涘叆涓嶄簡,浣嗘槸鍦ㄥ埆浜虹殑鏈哄櫒涓婇潰鍗村彲浠ヨ繍琛屽ソ濂界殑,鍚庢潵緇忓父鏌ヨ鍙戠幇:1)鐢ㄩ厤緗枃浠跺啓鍏ョ殑,涔嬪悗鍐嶇粦瀹氬埌鏌愪釜鐗瑰畾閿殑蹇嵎閿兘涓嶈兘鐢?鍥犱負榪欎簺鏄鍏ュ唴瀛樹互鍚?鐒跺悗鐢╝dd_binding鏉ョ粦瀹氬埌directInput璁懼涓婇潰鐨?2) 鍦ㄦ父鎴忛噷闈嬌鐢╳indows message鐨勫嵈鍙互姝e父浣跨敤.榪涘叆娓告垙鐨勬椂鍊?浣犱笉鑳借緭鍏?鑰屽彧鑳藉洖杞?鎸塼ab閿互鍚?灝卞彲浠ュ湪鐧婚檰鐣岄潰杈撳叆,濡傛灉涓嶈兘鎸塼ab閿?鍒欎笉鑳借緭鍏?榪涘叆娓告垙浠ュ悗鍗村彲浠ユ寜涓嶆槸浠庨厤緗枃浠墮噷闈㈣鍙栫殑淇℃伅,姣斿鎶鑳?浜虹墿闈㈡澘,浠撳簱,浠ュ強鍦板浘絳?
鍏朵腑鎴戜釜浜哄緩璁槸,灝介噺涓嶈鐢╠irectInput.1)棣栧厛鏄痙irectInput渚濊禆浜庢満鍣?濡傛灉鏈哄櫒濂界殑璇?閭d箞娌′簨鎯?濡傛灉鏈変簨鎯呯殑璇?閭d箞涔熷緢闅捐В鍐?2)directInput閲岄潰閲囩敤浜唄ook,鏉ユ嫤鎴秷鎭?榪欐牱,榪樹笉濡傜洿鎺ョ敤windows message鏉ョ殑蹇?
http://www.gamedev.net/community/forums/topic.asp?topic_id=520366
璇︾粏鐨勮璁鴻涓婇潰.

鍦ㄨ皟璇曢昏緫娌℃湁鍙戠幇浠涔堥敊璇彁紺虹殑鏃跺?璇曠潃鍘昏皟璇曞紩鎿?鍙兘闂鍙戠敓寰楁洿鍔犳繁,涓嶅湪閫昏緫灞傞潰涓?鑰屽湪寮曟搸鍐呴儴,榪欐牱灝辮鐩存帴璋冭瘯寮曟搸浜?

鍦ㄦ秹鍙婂埌娓叉煋鏂歸潰鐨刡ug,灝介噺鍊熺敤d3ddebugging鏉ヨ緟鍔╂煡閿?榪欐牱鍙互鏂逛究瑙e喅闂.

榪炴帴閿欒錛欼ID_IDirectSound3DBuffer錛屽叾瀹炲姞涓奷xguid.lib灝卞ソ浜嗐?br>綰圭悊瀵誨潃妯″紡鍖呮嫭錛?br>wrap, border color, clamp,鍜宮irror浠ュ強mirror once.
 pDrawPrimInternal->SetTexture(hTex);
涔嬪墠閬囧埌鐨勪竴涓棶棰樻槸錛屾樉紺虹帺瀹跺湪灝忓湴鍥句笂闈㈠埌鍦板浘杈圭晫浜嗭紝榪樿兘閲嶅緇樺埗鍦板浘錛岀粰浜虹殑鎰熻濂藉儚鏄蛋涓嶅埌杈圭晫錛岃蛋鍦板浘濂藉儚鏄湪鍗瘋醬閲岄潰涓鏍楓?br>鍚庢潵鎵嶇煡閬撲竴鑸粯璁ょ殑綰圭悊瀵誨潃妯″紡鏄痺rap鏂瑰紡銆?br> get_device()->SetSamplerState(0,D3DSAMP_BORDERCOLOR,0x00ffffff);
 get_device()->SetSamplerState(0, D3DSAMP_ADDRESSU, D3DTADDRESS_BORDER);
 get_device()->SetSamplerState(0, D3DSAMP_ADDRESSV, D3DTADDRESS_BORDER);

瑙e喅bug鏈夋椂鍊欎笉濡傞噸鍐?br>灝介噺璁╃瓥鍒掑幓綆$悊閫昏緫錛岄昏緫紼嬪簭鍛樺敖閲忓皢閲嶅績鏀懼湪鍏蜂綋鎶鏈棶棰樹笂闈紝涓嶆噦鐨勫湴鏂瑰簲璇ヤ富鍔ㄨ窡絳栧垝娌熼氾紝鑰屼笉鏄嚜宸辨兂銆?br>浠g爜鍙互鍏堟ā鎷熷嚭鏉ワ紝鐒跺悗鍐嶆斁鍒板叿浣撶殑鐜閲岄潰嫻嬭瘯錛岀嫭绔嬪啓涓猟emo涔嬪悗鍐嶅幓嫻嬭瘯錛岃繖鏍峰線寰浼氭瘮杈冨揩鎹峰拰鐪佷簨鎯呫?br>瀛︿細妯℃嫙鏈哄櫒鎵ц浠g爜鐨勬搴忥紝騫朵笖鎻愰珮闃呰浠g爜鐨勯棶棰橈紝涔嬪墠鐨勬椂鍊欙紝鎴戜嬌鍔插幓璋冭瘯錛屾瘡嬈¤皟璇曞彧涓轟簡瑙e喅涓涓棶棰橈紝浣嗘槸浜嬪疄涓婏紝濡傛灉浠庨槄璇諱唬鐮佸紑濮嬬殑璇濓紝閭d箞鎴戝彲浠ョ渷鎺?澶╃殑鏃墮棿銆?br>瀛︿細璋冭妭緙栧啓浠g爜鏃跺欑殑蹇冩儏鍜屽績鎬侊紝榪欐牱鏈夊姪浜庤繘琛岄珮鏁堢紪紼嬶紝褰撳績鎯呬笉濂界殑鏃跺欙紝涓瀹氳闆嗕腑鍏ㄩ儴鐨勬敞鎰忓姏錛屽茍涓斿皢鎬濊礬鍜屾祦紼嬩綔鍑哄浘璁拌澆鍦ㄧ焊涓婇潰錛岃繖鏍峰彲浠ュ己榪嚜宸卞叏紲炶瘡娉ㄣ?br>
浠婂ぉ閬囧埌鐨勬枃浠舵墦寮闂鏄枃浠跺悕璺緞鏈夌┖鏍奸犳垚鐨勶紝鍊煎緱鎸囧嚭鐨勬槸瀵逛簬鏂囦歡鎵撳紑鎶ラ敊錛屼竴鑸緢闅捐幏寰楄繑鍥炲間俊鎭紝浣嗘槸鍙互閫氳繃GetLastError鎴栬匑Err,浠ュ強hr絳夋潵鑾峰緱涓浜涢敊璇繑鍥炲間俊鎭?br>
瀵瑰瓧絎︿覆鎿嶄綔錛屽敖閲忚媯鏌ユ槸鍚︽湁絀烘牸錛屽鏋滃瓧絎︿覆闀垮害鍓嶉潰鏈夌┖鏍肩殑璇濓紝閭d箞灝嗚璁や負鎵鎻愪緵鐨勫瓧絎︿覆鏄┖鐨勩傝閬垮厤榪欑鎯呭喌鐨勫彂鐢熴傚浜庡瓧絎︿覆鍖歸厤瑕佹敞鎰忛儴鍒嗗尮閰嶇殑鎯呭喌錛屾瘮濡?Tex", "Text",榪欓噷濡傛灉鍙尮閰嶅墠闈笁涓瓧絎︾殑璇濓紝閭d箞涓よ呮槸鐩哥瓑鐨勶紝涔嬪墠灝遍亣鍒頒竴涓繖鏍風殑闂錛屽氨鏄痶exture鐨勪俊鎭text淇℃伅鎵瑕嗙洊浜嗭紝瀵艱嚧鎺т歡鎵句笉鍒版紜殑texture鑰屼笉鑳芥樉紺哄嚭鏉ャ?nbsp;

浠婂ぉ閬囧埌鐨勯棶棰樻槸榪欐牱鐨勶紝涔嬪墠閬囧埌鐨勭姸鎬佸垏鎹㈤棶棰橈紝鏄笌鐘舵佸垏鎹㈡棤鍏籌紝鑰屼笌鎻掑兼湁鍏籌紝鍦ㄥ垏鎹㈢姸鎬佷互鍚庯紝鏀跺埌涓涓彃鍊間綅緗紝榪欐牱鍙堢粰瑙掕壊涓涓柊鐨勪綅緗紝緇欏埆浜虹湅鐨勬晥鏋滃氨鏄鑹插厛钀藉湴浜嗭紝涔嬪悗鍙堜笂鍗囦簡錛屽儚鍧愮數姊竴鏍楓備笉榪囦粠榪欓噷璇存槑浜嗕竴涓棶棰?鎴戝湪鎬濊冮棶棰樼殑鏃跺欙紝鏈夋瑺鍛ㄥ叏鐨勫洜绱犮?br>
浠婂ぉ璺熻釜涓涓猙ug,鍦ㄦ垬鏂楃殑鏃跺欙紝鍑虹幇鍗℃鐨勬儏鍐碉紝鍚庢潵鍙戠幇鐘舵佸垏鎹㈠嚭鐜頒簡闂錛屽悗鏉ヤ竴鐩村幓鏌ョ湅鎴樻枟鏂歸潰鐨勭姸鎬侊紝浣嗘槸榪樻病鏈夊彂鐜頒粈涔堢粨鏋滐紝鐜板湪鍦ㄦ兂鍦ㄦ垬鏂椾腑鐨勬爣蹇楁垨鑰呯姸鎬佺殑鏃跺欏簲璇ヨ绔嬩竴浜涙爣蹇楅泦鍚堬紝榪欐牱渚夸簬鍦ㄦ煇涓椂鍊欐鏌ヤ竴浜涚姸鎬佺殑淇℃伅銆傜幇鍦ㄥ緢澶氱殑鏍囧織鍦ㄦ父鎴忛噷闈紝灞閮ㄧ殑錛屽叏灞鐨勶紝鏍囧織鍦ㄨ鑹蹭笂闈㈢殑錛屾爣蹇楀湪鐗╀綋涓婇潰鐨勶紝榪欎簺閮介渶瑕佸ソ濂藉湴綆$悊銆?br>
鍏ㄦ柟闈?澶氳搴﹀湴鎬濊冮棶棰?鑰屼笉鑳藉皢鎬濈淮灞闄愬湪鏌愬.瀛︿細浠庡ぇ灞鎴栬呭皬澶勫幓鍒嗘瀽闂,澶у涓嶈鐨勮瘽,灝卞皬澶?灝嗙浉鍏崇殑淇℃伅涓茶搗鏉?鎵鏈夌殑淇℃伅搴旇鏄釜涓插瀷鎴栬呴摼鍨嬬殑.涔嬪墠鍦ㄥ鐞嗛棶棰樼殑鏃跺?鎶婃濊礬闄愬埗鍦ㄥお灝忕殑鑼冨洿鍐呬簡.浠ヨ嚦浜庤姳浜嗗緢澶氭椂闂存墠鎵懼埌闂鎵鍦?

鏍規(guī)嵁姝e父鎯呭喌鍜岄潪姝e父鎯呭喌鏉ヨ幏寰楁暟鎹瘮杈冿紝浠ョ‘瀹氭紜殑嫻佺▼鍜岀粨鏋勩傚鏋滈亣鍒伴敊璇殑涔卞鹼紝閭d箞灝辯湅鐪嬫甯哥殑鏁板鹼紝鐒跺悗鏍規(guī)嵁榪欎釜姣旇緝鏉ヨ幏寰椾竴浜涙彁紺轟俊鎭?br>
浠婂ぉ鐘簡閿欒錛岃嚜宸辨湁鏈鏂扮増鏈紝浣嗘槸娌℃湁涓婁紶錛岀粨鏋渧ss涓婇潰鐨勭増鏈妸鑷繁鐨勬渶鏂扮増鏈粰瑕嗙洊浜嗐?br>
鍦ㄥ彂閫佹秷鎭殑鏃跺欙紝鏈夋椂鍊欎負浜嗛槻姝㈤綣佸彂閫佹秷鎭紝瑕佸姞鍏ヤ竴涓猚d鏃墮棿錛岄槻姝㈠洜涓虹綉緇滈棶棰橈紝鏈嶅姟绔敹鍒扮帺瀹惰繛緇殑淇℃伅銆?br>
鐗╃悊緋葷粺, v = v0 - gt. 鐜╁涓婅煩鐨勯熷害琛ㄧず,鑰屽湪涓嬮檷,鍒欐槸v = gt,鎸夌収鑷敱钀戒綋榪愬姩鏉ヨ繘琛?騫朵笖閫熷害鏄釜鍚戦噺,榪欐牱濡傛灉鍦╔,Z杞翠笂闈㈡湁鍒濋熷害鐨勮瘽,閭d箞灝卞彲鑳藉嚭鐜版姏鐗╃嚎鐨勬儏鍐?





jolley 2009-01-31 08:23 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            久久久久久久综合狠狠综合| 亚洲天堂网站在线观看视频| 久久久99免费视频| 国产中文一区二区| 免费av成人在线| 嫩草成人www欧美| 亚洲精品影院在线观看| 亚洲精品看片| 欧美日韩一区在线观看视频| 亚洲免费一级电影| 久久aⅴ国产欧美74aaa| 91久久在线播放| 在线视频精品一| 合欧美一区二区三区| 亚洲丁香婷深爱综合| 欧美日韩福利在线观看| 欧美中日韩免费视频| 久久午夜色播影院免费高清| 99视频在线观看一区三区| 亚洲在线电影| 亚洲精品乱码久久久久久蜜桃麻豆 | 欧美超级免费视 在线| 亚洲婷婷国产精品电影人久久| 午夜精品久久久久久99热| 在线日韩中文| 亚洲一区免费网站| 亚洲黄色一区| 午夜精品视频在线观看一区二区| 亚洲国产精品欧美一二99| 亚洲深夜福利网站| 亚洲国产精品123| 亚洲欧美日韩精品综合在线观看| 亚洲第一免费播放区| 亚洲伊人网站| 一级日韩一区在线观看| 久久久综合网站| 欧美一区二区三区的| 欧美日本网站| 男人的天堂成人在线| 国产欧美日韩一区二区三区在线| 亚洲国产欧美日韩另类综合| 国产亚洲成av人在线观看导航| 亚洲精品视频中文字幕| 亚洲国产精品精华液2区45| 小黄鸭精品密入口导航| 亚洲自拍三区| 欧美日韩三级电影在线| 亚洲高清久久久| 影音欧美亚洲| 久久激情一区| 久久精品水蜜桃av综合天堂| 国产精品卡一卡二卡三| 9色精品在线| 一区二区三区视频观看| 欧美精品videossex性护士| 免费成人在线视频网站| 精品99一区二区| 久久精品亚洲热| 欧美在线一区二区| 国产九九精品| 亚洲欧美经典视频| 欧美在线免费播放| 国产亚洲综合在线| 欧美综合国产| 巨胸喷奶水www久久久免费动漫| 国产欧美一区二区精品秋霞影院| 亚洲一区二区三区免费观看| 欧美一级片久久久久久久| 国产精品网曝门| 性久久久久久久| 久久久夜夜夜| 亚洲国产日韩一区| 欧美激情亚洲| 中文一区在线| 久久久久国产成人精品亚洲午夜| 国产日韩欧美91| 久久久午夜精品| 亚洲国产另类久久精品| 一本色道久久综合狠狠躁的推荐| 欧美日韩国产一区精品一区 | 亚洲国产精品一区| 亚洲性感美女99在线| 国产精品亚洲成人| 久久国产精品99国产| 欧美粗暴jizz性欧美20| 99精品视频免费在线观看| 国产精品高清网站| 久久精品一区二区三区不卡| 欧美成人一区二区| 亚洲午夜精品久久久久久浪潮| 国产精品久久久久久av福利软件| 欧美亚洲日本国产| 亚洲国产精品久久久久秋霞不卡| 亚洲网站在线| 国模精品一区二区三区| 欧美大片在线观看| 午夜精品在线观看| 欧美激情影音先锋| 小黄鸭精品aⅴ导航网站入口 | 欧美精品在线免费观看| 亚洲专区一区| 亚洲国产日韩精品| 久久精品视频在线播放| 日韩一级精品视频在线观看| 国产美女精品视频| 欧美激情视频一区二区三区免费| 亚洲在线视频免费观看| 亚洲高清二区| 久久久久免费视频| 亚洲亚洲精品在线观看| 亚洲福利国产精品| 国产日本欧美在线观看| 欧美日韩国产影院| 老牛影视一区二区三区| 亚洲欧美资源在线| 亚洲精品欧美一区二区三区| 久久综合五月| 久久精品成人欧美大片古装| 亚洲特级毛片| 日韩视频国产视频| 亚洲国产婷婷香蕉久久久久久99| 国产伦理一区| 国产精品大片| 欧美日韩在线亚洲一区蜜芽| 美女诱惑黄网站一区| 久久久99国产精品免费| 欧美一区不卡| 亚洲制服少妇| 亚洲综合第一| 亚洲在线免费视频| 亚洲欧美日本在线| 亚洲天堂免费观看| 一区二区三区成人| 中日韩美女免费视频网址在线观看| 亚洲国产成人av| 欧美第一黄网免费网站| 老司机午夜精品视频在线观看| 久久精品中文字幕一区| 久久精品成人一区二区三区| 先锋a资源在线看亚洲| 性视频1819p久久| 欧美亚洲视频在线观看| 午夜一区在线| 久久成人综合视频| 久久久久久久97| 久久综合伊人77777麻豆| 久久人人爽国产| 男女精品视频| 亚洲国产一区二区精品专区| 亚洲国产日韩在线一区模特| 亚洲成人在线网站| 亚洲精品国产精品乱码不99按摩| 亚洲欧洲精品一区二区三区不卡 | 欧美日韩国产a| 欧美日韩精品一二三区| 国产精品久久久久久久一区探花| 国产精品久久国产精品99gif| 国产精品久久久久久久app| 国产精品久久久久久户外露出| 国产精品伊人日日| 精品粉嫩aⅴ一区二区三区四区| 精品成人在线| 夜夜爽av福利精品导航| 欧美一级大片在线观看| 老鸭窝毛片一区二区三区| 亚洲国产高清在线| 一区二区三区 在线观看视| 性色一区二区| 欧美国产日韩一区二区| 国产精品初高中精品久久| 国内揄拍国内精品久久| 亚洲理论在线观看| 亚洲欧美日韩国产综合| 久久综合精品国产一区二区三区| 91久久国产综合久久| 亚洲在线中文字幕| 男人的天堂成人在线| 国产嫩草影院久久久久 | 欧美日韩精品免费观看视频| 国产日韩精品一区二区| 亚洲另类自拍| 久久精品一区蜜桃臀影院| 亚洲乱码久久| 久久久久久亚洲综合影院红桃| 欧美日本精品一区二区三区| 99精品免费网| 黄色日韩精品| 夜夜狂射影院欧美极品| 久久福利一区| 亚洲精品一线二线三线无人区| 亚洲欧美日韩国产综合精品二区| 毛片av中文字幕一区二区| 欧美午夜精品久久久久久超碰| 国产一区二区三区自拍| 正在播放欧美视频| 欧美激情精品久久久久久蜜臀| 亚洲一区国产| 欧美日韩一区二区三区| 亚洲国产欧美一区二区三区丁香婷| 午夜欧美精品|