锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
闅忕潃鎼滅儲鐨勫瀭鐩村垎鍓? 鎼滅儲甯傚満涔熻緇嗗寲
1. 瑙嗛鎼滅儲鐨勭獊璧? youtube 浠?007.10 鍒?2008.10 鐨勬悳绱㈠闀夸簡114%, 鍗犱簡google 鎼滅儲鐨?6%.
2. 瀹炴椂娑堟伅鐨勫彂灞? 浠?a >twitter 涓轟唬琛? 甯傚満瀵圭獊鍙戜簨浠剁殑瑕佹眰鐨勫己鐑? 浣垮緱twitter 榪呴熷彂灞? twitter 鐨勬悳绱?http://search.twitter.com/)涓庝紶緇熷紩鎿庝緷璧栧唴瀹圭浉鍏充互鍙婇摼鎺ュ叧緋葷浉姣? 鏇存敞閲嶆椂闂寸殑鐩稿叧鎬?
Gerry campbell 鐨勬枃绔?nbsp;Search is broken – really broken. 鐨勪竴涓浘璇存槑浜嗚繖縐嶈秼鍔?
]]>
BHO鍏寵仈鍘熺悊 (BHO鍏寵仈鐨勬槸SHDOCVW,涔熷氨鏄涓嶅彧鍏寵仈IE,涓嬮潰鍏ㄩ儴鐢↖E鏉ヨ鏄?
1.IE鐨勭獥鍙f墦寮鏃?鍏堝鎵綡KLM涓嬬殑SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\ 閲岀殑CLSID,榪欎簺CLSID,閮藉搴旂潃鐩稿簲鐨凚HO鎻掍歡錛岀劧鍚庢牴鎹繖涓狢LSID鍒癏KCR涓嬬殑CLSIDs閲屾壘鍒版鎻掍歡鐨勪俊鎭紝鍖呮嫭鏂囦歡浣嶇疆絳夈?br>2.IE鏍規嵁鎵懼埌鐨凜LSID淇℃伅鍒涘緩 BHO 瀵硅薄,騫朵笖鏌ユ壘 IObjectWithSite 鎺ュ彛. (榪欎釜鎺ュ彛闈炲父綆鍗?鍙湁SetSite鍜孏etSite涓や釜鏂規硶)
3.IE鎶奍WebBrowser2(嫻忚鍣ㄦ彃浠?浼犲埌 BHO 鐨?SetSite 鏂規硶錛岀敤鎴峰湪姝ゆ柟娉曚腑鍙寕杞借嚜宸辯殑浜嬩歡澶勭悊鏂規硶銆?br>4.紿楀彛鍏抽棴鏃?IE鎶?null 浼犲埌 BHO 鐨?SetSite 鏂規硶錛屾鏂規硶鐢ㄦ潵鍘繪帀鎸傝澆鐨勪簨浠跺鐞嗘柟娉曘?/p>
緙栧啓BHO嫻佺▼
1.鍒涘緩IObjectWithSite鏄懼紡鎺ュ彛錛屽垱寤?COM 綾誨瀷錛屽疄鐜扮戶鎵縄ObjectWithSite鎺ュ彛
2.瀹炵幇姝ゆ帴鍙e茍鍦⊿etSite鏂規硶閲屽姞涓婃墍瑕佹寕杞界殑浜嬩歡
3.澶勭悊浜嬩歡
4.娉ㄥ唽姝HO鍒版敞鍐岃〃涓璈KLM涓嬬殑Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser Helper Objects;(HKCR涓嬬殑CLSIDs鏄牴鎹笂闈㈢殑璺緞鑷姩娉ㄥ唽鐨?
5銆?net 涓嬮』璁劇疆姝HO欏圭洰鐨?閰嶇疆灞炴>鐢熸垚 涓負Interop娉ㄥ唽涓篢rue錛岃繖鏍鋒墠鑳藉皢.net 綾誨簱鏂囦歡娉ㄥ唽鍒癈OM
鍒犻櫎BHO
鎵撳紑娉ㄥ唽琛ㄩ」鍒?HKLM涓嬬殑Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser Helper Objects 鍙互鐪嬪埌涓嬮潰鏈変竴浜汣LSID鍊?榪欎簺鍊煎搴旂浉鍏崇殑鎻掍歡,鐐瑰嚮鍙互鍦ㄩ粯璁ゅ煎悗鐪嬪埌鐩稿叧鎻掍歡鐨勫悕縐?鍙互澶嶅埗鐩稿叧CLSID鍒版敞鍐岃〃涓悳绱㈢浉鍏矯LSID,鎵懼埌鍚庢墦寮InprocServer32鍙互鐪嬪埌鐩稿叧鏂囦歡鐨勮礬寰?鑷充簬DLL鏂囦歡絳夊彲浠ョ敤UEDIT32.exe宸ュ叿鎵撳紑鏌ョ湅鍏蜂綋淇℃伅,褰撶劧涔熷彲浠ョ敤淇敼紼嬪簭綾葷殑eXeScope.exe鐮旂┒涓涓?
璇鋒牴鎹叿浣撴儏鍐靛垹闄ょ浉鍏抽敭鍊煎拰鐩稿叧鏂囦歡!
REF:
BHO 鐨勭紪鍐?nbsp;
VCKBase 鍏充簬IE 緙栫▼鏂囨。涓績
C++涓嬌鐢˙HO鏉ュ睆钄界壒瀹氱綉绔?/a>
嫻忚鍣ㄩ泦鎴愭暀瀛?鑷畾涔夋祻瑙堝櫒
1. Define early on what success means for you, the team and the business
You have to have a clear idea of what you want. You also have to understand what team members and the management want. You also have to be aware that what people really want, what they say the want and sometimes even what they think they want are very different things. Try to be very honest at least with yourself. Success has different definitions for different people. If there is a big disconnect between these definitions you have a problem before you start.
2. Believe in the project: idea, architecture, time, team
You cannot have any kind of success if you are convinced you lead a team of morons to implement a stupid idea using the wrong architecture in a ridiculously short time. You have to really believe in the project to have a chance to success. This does not mean lie to yourself. It means do whatever you can to understand your concerns and work on them with the management. As for the architecture, it is best if you have a heavy word or if you are the architect.
3. Understand the domain, the business requirements and the technical challenges
You should be an expert in the technologies used for implementation. You also have to become very knowledgeable in the problem domain and the business case. This will help you understand the business decisions dropped on your head from upstairs and also will help you stand a chance at negotiating them.
4. Know your team: strengths, weaknesses, ambitions and personalities
Software is created by people. Your job as a “tech lead” is to support them in doing that, both from a technical point of view and at a human level. You want to lead a team of motivated and enthusiastic people. But each person gets motivated by different things.
5. Have a plan as a result of a planning activity
“Plans are useless but planning is essential” - (Dwight D Eisenhower, US President, general 1890-1969). Planning will make you think about the problems you face in detail. Also keep in mind that “a plan is just a list of things that ain’t gonna happen” - (Benicio Del Torro in “The Way of the Gun”).
6. Be part in the design of everything
This does not mean do the whole design. You want to empower team members. But your job is to understand and influence each significant subsystem in order to maintain architectural integrity.
7. Get your hands dirty and code
Yes you should take parts of the code and implement them. Even the least glamorous parts. This will help you not getting stuck alone between management and the team. It will also help you gain respect in the team.
8. Act as a communication proxy for your team
In long complex projects with big teams communication is one of the most complicated aspects. The more people you have involved in solving a problem the bigger the communication matrix becomes. Since people need information to be able to make the right decisions this will lead to an exponential increase in the time consumed for communication. Agile methodologies alleviate this problem. But in the end it is up to you to propagate important information to the right people.
9. Make sure everybody understands the big picture: their work has implications
This will help you greatly because will allow team members to design and implement in a way that you don’t have to fight. It is also hard work from your part.
10. Fight for architecture and design consistency
Doing the right thing from the design and architecture point of view is not more costly. It is actually cheaper in every project longer than a couple of months. Every early investment in architecture pays for itself later during integration and maintenance. Even if you have to admit an occasional hack or prototype in the code base you should contain it in very specific modules.
11. Know the status of everybody’s work and detect slippage
This allows for corrective actions and for early communication with the management. You don’t want to be caught by surprise. Remember that during 90% of the allocated time for a task the code is 90% complete.
12. Record technical debt if you need shortcuts but try to maintain architectural integrity; report the debt
This one is very important for products that will have multiple releases. Technical debt should be analyzed at the beginning of each iteration.
13. Use the process that makes sense in your particular case
Tough one. Sometimes (most of the times?) the process is not up to you. In the enterprise usually the process is pre-decided. But always keep in mind that the process in itself means nothing. It is the people who give meaning to the process. Good people can make the worst process work while the wrong team cannot make any process work. Waterfall can be implemented in a very agile way and the agile methodologies can be applied with “rigor mortis” agility (see The Agile 800 Pounds Gorilla).
14. Avoid dogmas - question why everything is done the way is done; make sure everybody else knows the reasons
Sometimes I hear from programmers: we are agile and combine XP and Scrum and we also do TDD (Test Driven Development - I still hope for a TDD that means Thought Driven Development). The questions that pop up in my mind are: Do you need all those? Do you “really” do them by the book?
Anyway the point here is don’t do anything just because it is the way it has always been done. Understand why. Then explain the reasons to all team members. Rinse and repeat.
15. Avoid design by committee; listen to everybody but make your own decisions
No good design is born from referendum. There are lots of people making wild exotic suggestions when their a$$ is not on the line. There are also excessively prudent ideas born from fear. Even with good ideas you have to filter them and make them yours before you can include them in the design. A good architecture and a good design is usually born in one mind, an open mind that looks around. The obvious example is Linux.
璇ユ枃鎬葷粨浜?php 鐨勪竴浜涙ā鏉? 鎴戜嬌鐢ㄨ繃鐨勬湁smarty, template lib, 榪樻湁鍚庢潵鐢ㄧ殑 Savant. 鎰熻smarty 澶鏉備簡, template lib 闇瑕佸涔犱竴浜涙爣絳? 騫朵笖涓嶆槸寰堝己澶? 緇煎悎鑰冭檻榪樻槸Savant 鏈濂? 鏃㈠彲浠ヤ嬌鐢ㄦā鏉挎満鍒? 鍙﹀欏甸潰妯℃澘鐩存帴浣跨敤php 鍑芥暟鏉ヨ緭鍑? 鍔熻兘涔熻繕鍙互.
Smarty
Smarty is a template engine that compiles the templates into PHP scripts, then executes those scripts. Very fast, very flexible.
Savant
A powerful but lightweight PEAR-compliant template system. It is non-compiling, and uses PHP itself as its template language.
Heyes Template Class
A very easy to use, yet powerful and quick template engine that enables you to separate your page layout and design from your code.
FastTemplate
A simple variable interpolation template class that parses your templates for variables and spits out HTML with their values
ShellPage
A simple and easy to use class that lets you make whole websites based on template files for layouts. Change the template and your whole site changes.
STP Simple Template Parser
A simple, light weight and easy to use template parser class. It can assemble a page from several templates, output result pages to the browser or write them to the filesystem.
OO Template Class
An object oriented template class you can use in your own programs.
SimpleTemplate
A template engine to create and structure websites and applications. It can translate and compile the templates.
bTemplate
A small and fast template class that allows you to separate your PHP logic from your HTML presentation code.
ETS - easy template system
A template system that allows you to reshuffle templates with exactly the same data.
EasyTemplatePHP
A simple, yet powerful templating system for your site.
vlibTemplate
A fast, full featured template system that includes a caching and debugging class.
AvanTemplate
A template engine that is multi-byte safe and consumes little computing resource. It supports variable replacement and content blocks that can be set to hidden or shown.
Grafx Software’s Fast Template
A modification of the popular Fast Template system, this includes a cache function, debug console, and silent removal of unassigned dynamic blocks.
TemplatePower
A fast, simple and powerful template class. Features nested dynamic block support, block/file include support and show/hide unassigned variables.
TagTemplate
This library function was designed for use with template files and allows you to retrieve info from HTML files.
htmltmpl: templating engine
A templating engine for Python and PHP. Targeted to web application developers, who want to separate program code and design of their projects.
PHP Class for Parsing Dreamweaver templates
A simple class to parse a Dreamweaver template for use in custom mods for a Gallery 2 and a WordPress blog.
MiniTemplator (Template Engine)
A compact template engine for HTML files. It features a simple syntax for template variables and blocks. Blocks can be nested.
Layout Solution
Simplifies website development and maintenance. It holds commonly used variables and page elements so you don’t need to duplicate common layouts over and over.
Cached Fast Template
This inclusion into FastTemplate allows for caching of the template files, and can even cache with different specifications on separate blocks of content.
TinyButStrong
A template engine that supports MySQL, Odbc, Sql-Server and ADODB. It includes seven methods and two properties.
Brian Lozier’s php based template engine
Only 2k in size, very fast and object-orientated.
WACT
a template engine that separates code from design.
PHPTAL
a XML/XHTML template library for PHP.
ref:
http://www.sitepoint.com/forums/showthread.php?t=123769 瀵瑰叾浠栫殑php 妯℃澘榪涜浜嗚璁?/p>
鍙﹀鍊煎緱璇存槑鐨勬槸, HTTP 璇鋒眰鏄棤鐘舵佺殑錛岃〃鏄庡湪澶勭悊涓涓姹傛椂錛學eb鏈嶅姟鍣ㄥ茍涓嶈浣忔潵鑷悓涓瀹㈡埛绔殑璇鋒眰銆?/p>
= Http 璇鋒眰澶?
鍖呭惈4涓儴鍒? 璇鋒眰琛屻佽姹傚ご銆佺┖琛屽拰璇鋒眰鏁版嵁
1. 璇鋒眰琛?br>鐢變笁涓爣璁扮粍鎴愶細璇鋒眰鏂規硶銆佽姹俇RI鍜孒TTP鐗堟湰錛屽畠浠敤絀烘牸鍒嗛殧, 濡傦細GET /index.html HTTP/1.1
HTTP 瑙勮寖瀹氫箟浜?縐嶈姹傛柟娉曪細
GET 媯绱RI涓爣璇嗚祫婧愮殑涓涓畝鍗曡姹?br>HEAD 涓嶨ET鏂規硶鐩稿悓錛屾湇鍔″櫒鍙繑鍥炵姸鎬佽鍜屽ご鏍囷紝騫朵笉榪斿洖璇鋒眰鏂囨。
POST 鏈嶅姟鍣ㄦ帴鍙楄鍐欏叆瀹㈡埛绔緭鍑烘祦涓殑鏁版嵁鐨勮姹?br>PUT 鏈嶅姟鍣ㄤ繚瀛樿姹傛暟鎹綔涓烘寚瀹歎RI鏂板唴瀹圭殑璇鋒眰
DELETE 鏈嶅姟鍣ㄥ垹闄RI涓懡鍚嶇殑璧勬簮鐨勮姹?br>OPTIONS 鍏充簬鏈嶅姟鍣ㄦ敮鎸佺殑璇鋒眰鏂規硶淇℃伅鐨勮姹?br>TRACE Web鏈嶅姟鍣ㄥ弽棣圚ttp璇鋒眰鍜屽叾澶存爣鐨勮姹?br>CONNECT 宸叉枃妗e寲浣嗗綋鍓嶆湭瀹炵幇鐨勪竴涓柟娉曪紝棰勭暀鍋氶毀閬撳鐞?/p>
2. 璇鋒眰澶?[ 鍙棤 ]
鐢卞叧閿瓧鍙婂煎緇勬垚錛屾瘡琛屼竴瀵癸紝鍏抽敭瀛楀拰鍊肩敤鍐掑彿錛?錛夊垎闅斻傚
> User-Agent: curl/7.16.4 (i586-pc-mingw32msvc) libcurl/7.16.4 OpenSSL/0.9.7e zlib/1.2.2
> Host: www.baidu.com
> Accept: */*
鍏蜂綋璇鋒眰澶村鍚庢墍鍒?
3. 絀鴻
鏈鍚庝竴涓姹傚ご涔嬪悗鏄竴涓┖琛岋紝鍙戦佸洖杞︾鍜岄琛岋紝閫氱煡鏈嶅姟鍣ㄤ互涓嬩笉鍐嶆湁澶存爣銆?/p>
4. 璇鋒眰鏁版嵁 [ 鍙棤 ]
浣跨敤POST浼犻佹暟鎹紝鏈甯鎬嬌鐢ㄧ殑鏄疌ontent-Type鍜孋ontent-Length澶存爣
= Web 鍝嶅簲
鐢卞洓涓儴鍒嗙粍鎴? 鐘舵佽銆佸搷搴斿ご銆佺┖琛屻佸搷搴旀暟鎹? 濡?
< HTTP/1.1 200 OK
< Date: Thu, 25 Sep 2008 05:14:30 GMT
< Server: BWS/1.0
< Content-Length: 3342
< Content-Type: text/html
< Cache-Control: private
< Expires: Thu, 25 Sep 2008 05:14:30 GMT
< Set-Cookie: BAIDUID=3A8165EF68FFEE5F605D33ADEF300BA1:FG=1; expires=Thu, 25-Sep-38 05:14:30 GMT; path=/; domain=.baidu.com
< P3P: CP=" OTI DSP COR IVA OUR IND COM "
<
<html><head><meta http-equiv=Content-Type content="text/html;charset=gb2312"><title>......
1.鐘舵佽
鐢變笁涓爣璁扮粍鎴愶細HTTP鐗堟湰銆佸搷搴斾唬鐮佸拰鍝嶅簲鎻忚堪
HTTP鐗堟湰:: 鍚戝鎴風鎸囨槑鍏跺彲鐞嗚В鐨勬渶楂樼増鏈?br>鍝嶅簲浠g爜:: 3浣嶇殑鏁板瓧浠g爜錛屾寚鍑鴻姹傜殑鎴愬姛鎴栧け璐ワ紝濡傛灉澶辮觸鍒欐寚鍑哄師鍥犮?br>鍝嶅簲鎻忚堪:: 涓哄搷搴斾唬鐮佺殑鍙鎬цВ閲娿?br>濡?
< HTTP/1.1 200 OK
HTTP鍝嶅簲鐮佸垝鍒嗗涓?紲ヨ鍚?錛?br>1xx錛氫俊鎭紝璇鋒眰鏀跺埌錛岀戶緇鐞?br>2xx錛氭垚鍔燂紝琛屼負琚垚鍔熷湴鎺ュ彈銆佺悊瑙e拰閲囩撼
3xx錛氶噸瀹氬悜錛屼負浜嗗畬鎴愯姹傦紝蹇呴』榪涗竴姝ユ墽琛岀殑鍔ㄤ綔
4xx錛氬鎴風閿欒
2.鍝嶅簲澶?br>璺熻姹傚ご涓鏍鳳紝瀹冧滑鎸囧嚭鏈嶅姟鍣ㄧ殑鍔熻兘錛屾爣璇嗗嚭鍝嶅簲鏁版嵁鐨勭粏鑺傘?/p>
3.絀鴻
鏈鍚庝竴涓搷搴斿ご鏍囦箣鍚庢槸涓涓┖琛岋紝鍙戦佸洖杞︾鍜岄琛岋紝琛ㄦ槑鏈嶅姟鍣ㄤ互涓嬩笉鍐嶆湁澶存爣銆?/p>
4.鍝嶅簲鏁版嵁
HTML鏂囨。鍜屽浘鍍忕瓑錛屽氨鏄疕TML鏈韓銆?
= HTTP澶?br>鐢ㄤ互鎻忚堪瀹㈡埛绔垨鑰呮湇鍔″櫒鐨勫睘鎬с佽浼犺緭鐨勮祫婧愮瓑, 鍒嗕負
1.閫氱敤澶存爣錛氬嵆鍙敤浜庤姹傦紝涔熷彲鐢ㄤ簬鍝嶅簲錛屾槸浣滀負涓涓暣浣撹屼笉鏄壒瀹氳祫婧愪笌浜嬪姟鐩稿叧鑱斻?br>2.璇鋒眰澶存爣錛氬厑璁稿鎴風浼犻掑叧浜庤嚜韜殑淇℃伅鍜屽笇鏈涚殑鍝嶅簲褰㈠紡銆?br>3.鍝嶅簲澶存爣錛氭湇鍔″櫒鍜屼簬浼犻掕嚜韜俊鎭殑鍝嶅簲銆?br>4.瀹炰綋澶存爣錛氬畾涔夎浼犻佽祫婧愮殑淇℃伅銆傚嵆鍙敤浜庤姹傦紝涔熷彲鐢ㄤ簬鍝嶅簲銆?/p>
涓嬭〃鎻忚堪鍦℉TTP/1.1涓敤鍒扮殑澶存爣
Accept 瀹氫箟瀹㈡埛绔彲浠ュ鐞嗙殑濯掍綋綾誨瀷錛屾寜浼樺厛綰ф帓搴忥紱
鍦ㄤ竴涓互閫楀彿涓哄垎闅旂殑鍒楄〃涓紝鍙互瀹氫箟澶氱綾誨瀷鍜屼嬌鐢ㄩ氶厤絎︺備緥濡傦細Accept: image/jpeg,image/png,*/*
Accept-Charset 瀹氫箟瀹㈡埛绔彲浠ュ鐞嗙殑瀛楃闆嗭紝鎸変紭鍏堢駭鎺掑簭錛?br> 鍦ㄤ竴涓互閫楀彿涓哄垎闅旂殑鍒楄〃涓紝鍙互瀹氫箟澶氱綾誨瀷鍜屼嬌鐢ㄩ氶厤絎︺備緥濡傦細Accept-Charset: iso-8859-1,*,utf-8
Accept-Encoding 瀹氫箟瀹㈡埛绔彲浠ョ悊瑙g殑緙栫爜鏈哄埗銆備緥濡傦細Accept-Encoding:gzip,compress
Accept-Language 瀹氫箟瀹㈡埛绔箰浜庢帴鍙楃殑鑷劧璇█鍒楄〃銆備緥濡傦細Accept-Language: en,de
Accept-Ranges 涓涓搷搴斿ご鏍囷紝瀹冨厑璁告湇鍔″櫒鎸囨槑錛氬皢鍦ㄧ粰瀹氱殑鍋忕Щ鍜岄暱搴﹀錛屼負璧勬簮緇勬垚閮ㄥ垎鐨勬帴鍙楄姹傘?br> 璇ュご鏍囩殑鍊艱鐞嗚В涓鴻姹傝寖鍥寸殑搴﹂噺鍗曚綅銆備緥濡侫ccept-Ranges: bytes鎴朅ccept-Ranges: none
Age 鍏佽鏈嶅姟鍣ㄨ瀹氳嚜鏈嶅姟鍣ㄧ敓鎴愯鍝嶅簲浠ユ潵鎵緇忚繃鐨勬椂闂撮暱搴︼紝浠ョ涓哄崟浣嶃?br> 璇ュご鏍囦富瑕佺敤浜庣紦瀛樺搷搴斻備緥濡傦細Age: 30
Allow 涓涓搷搴斿ご鏍囷紝瀹冨畾涔変竴涓敱浣嶄簬璇鋒眰URI涓殑嬈℃簮鎵鏀寔鐨凥TTP鏂規硶鍒楄〃銆備緥濡傦細Allow: GET,PUT
AUTHORIZATION 涓涓搷搴斿ご鏍囷紝鐢ㄤ簬瀹氫箟璁塊棶涓縐嶈祫婧愭墍蹇呴渶鐨勬巿鏉冿紙鍩熷拰琚紪鐮佺殑鐢ㄦ埛ID涓庡彛浠わ級銆?br> 渚嬪錛欰uthorization: Basic YXV0aG9yOnBoaWw=
Cache-Control 涓涓敤浜庡畾涔夌紦瀛樻寚浠ょ殑閫氱敤澶存爣銆備緥濡傦細Cache-Control: max-age=30
Connection 涓涓敤浜庤〃鏄庢槸鍚︿繚瀛榮ocket榪炴帴涓哄紑鏀劇殑閫氱敤澶存爣銆備緥濡傦細Connection: close鎴朇onnection: keep-alive
Content-Base 涓縐嶅畾涔夊熀鏈琔RI鐨勫疄浣撳ご鏍囷紝涓轟簡鍦ㄥ疄浣撹寖鍥村唴瑙f瀽鐩稿URLs銆?br> 濡傛灉娌℃湁瀹氫箟Content-Base澶存爣瑙f瀽鐩稿URLs錛屼嬌鐢–ontent-Location URI錛堝瓨鍦ㄤ笖緇濆錛夋垨浣跨敤URI璇鋒眰銆?br> 渚嬪錛欳ontent-Base: Http://www.myweb.com
Content-Encoding 涓縐嶄粙璐ㄧ被鍨嬩慨楗扮錛屾爣鏄庝竴涓疄浣撴槸濡備綍緙栫爜鐨勩備緥濡傦細Content-Encoding: zip
Content-Language 鐢ㄤ簬鎸囧畾鍦ㄨ緭鍏ユ祦涓暟鎹殑鑷劧璇█綾誨瀷銆備緥濡傦細Content-Language: en
Content-Length 鎸囧畾鍖呭惈浜庤姹傛垨鍝嶅簲涓暟鎹殑瀛楄妭闀垮害銆備緥濡傦細Content-Length:382
Content-Location 鎸囧畾鍖呭惈浜庤姹傛垨鍝嶅簲涓殑璧勬簮瀹氫綅錛圲RI錛夈?br> 濡傛灉鏄竴緇濄傚URL瀹冧篃浣滀負琚В鏋愬疄浣撶殑鐩稿URL鐨勫嚭鍙戠偣銆?br> 渚嬪錛欳ontent-Location: http://www.myweb.com/news
Content-MD5 瀹炰綋鐨勪竴縐峂D5鎽樿錛岀敤浣滄牎楠屽拰銆?br> 鍙戦佹柟鍜屾帴鍙楁柟閮借綆桵D5鎽樿錛屾帴鍙楁柟灝嗗叾璁$畻鐨勫間笌姝ゅご鏍囦腑浼犻掔殑鍊艱繘琛屾瘮杈冦?br> 渚嬪錛欳ontent-MD5: <base64 of 128 MD5 digest>
Content-Range 闅忛儴鍒嗗疄浣撲竴鍚屽彂閫侊紱鏍囨槑琚彃鍏ュ瓧鑺傜殑浣庝綅涓庨珮浣嶅瓧鑺傚亸縐伙紝涔熸爣鏄庢瀹炰綋鐨勬婚暱搴︺?br> 渚嬪錛欳ontent-Range: 1001-2000/5000
Contern-Type 鏍囨槑鍙戦佹垨鑰呮帴鏀剁殑瀹炰綋鐨凪IME綾誨瀷銆備緥濡傦細Content-Type: text/html
Date 鍙戦丠TTP娑堟伅鐨勬棩鏈熴備緥濡傦細Date: Mon,10PR 18:42:51 GMT
ETag 涓縐嶅疄浣撳ご鏍囷紝瀹冨悜琚彂閫佺殑璧勬簮鍒嗘淳涓涓敮涓鐨勬爣璇嗙銆?br> 瀵逛簬鍙互浣跨敤澶氱URL璇鋒眰鐨勮祫婧愶紝ETag鍙互鐢ㄤ簬紜畾瀹為檯琚彂閫佺殑璧勬簮鏄惁涓哄悓涓璧勬簮銆?br> 渚嬪錛欵Tag: "208f-419e-30f8dc99"
Expires 鎸囧畾瀹炰綋鐨勬湁鏁堟湡銆備緥濡傦細Expires: Mon,05 Dec 2008 12:00:00 GMT
Form 涓縐嶈姹傚ご鏍囷紝緇欏畾鎺у埗鐢ㄦ埛浠g悊鐨勪漢宸ョ敤鎴風殑鐢靛瓙閭歡鍦板潃銆備緥濡傦細From: webmaster@myweb.com
Host 琚姹傝祫婧愮殑涓繪満鍚嶃傚浜庝嬌鐢℉TTP/1.1鐨勮姹傝岃█錛屾鍩熸槸寮哄埗鎬х殑銆備緥濡傦細Host: www.myweb.com
If-Modified-Since 濡傛灉鍖呭惈浜咷ET璇鋒眰錛屽鑷磋璇鋒眰鏉′歡鎬у湴渚濊禆浜庤祫婧愪笂嬈′慨鏀規棩鏈熴?br> 濡傛灉鍑虹幇浜嗘澶存爣錛屽茍涓旇嚜鎸囧畾鏃ユ湡浠ユ潵錛屾璧勬簮宸茶淇敼錛屽簲璇ュ弽鍥炰竴涓?04鍝嶅簲浠g爜銆?br> 渚嬪錛欼f-Modified-Since: Mon,10PR 18:42:51 GMT
If-Match 濡傛灉鍖呭惈浜庝竴涓姹傦紝鎸囧畾涓涓垨鑰呭涓疄浣撴爣璁般傚彧鍙戦佸叾ETag涓庡垪琛ㄤ腑鏍囪鍖洪厤鐨勮祫婧愩?br> 渚嬪錛欼f-Match: "208f-419e-308dc99"
If-None-Match 濡傛灉鍖呭惈涓涓姹傦紝鎸囧畾涓涓垨鑰呭涓疄浣撴爣璁般傝祫婧愮殑ETag涓嶄笌鍒楄〃涓殑浠諱綍涓涓潯浠跺尮閰嶏紝鎿嶄綔鎵嶆墽琛屻?br> 渚嬪錛欼f-None-Match: "208f-419e-308dc99"
If-Range 鎸囧畾璧勬簮鐨勪竴涓疄浣撴爣璁幫紝瀹㈡埛绔凡緇忔嫢鏈夋璧勬簮鐨勪竴涓嫹璐濄傚繀欏諱笌Range澶存爣涓鍚屼嬌鐢ㄣ?br> 濡傛灉姝ゅ疄浣撹嚜涓婃琚鎴風媯绱互鏉ワ紝榪樹笉鏇句慨鏀硅繃錛岄偅涔堟湇鍔″櫒鍙彂閫佹寚瀹氱殑鑼冨洿錛屽惁鍒欏畠灝嗗彂閫佹暣涓祫婧愩?br> 渚嬪錛歊ange: byte=0-499<CRLF>If-Range:"208f-419e-30f8dc99"
If-Unmodified-Since 鍙湁鑷寚瀹氱殑鏃ユ湡浠ユ潵錛岃璇鋒眰鐨勫疄浣撹繕涓嶆浘琚慨鏀硅繃錛屾墠浼氳繑鍥炴瀹炰綋銆?br> 渚嬪錛欼f-Unmodified-Since:Mon,10PR 18:42:51 GMT
Last-Modified 鎸囧畾琚姹傝祫婧愪笂嬈¤淇敼鐨勬棩鏈熷拰鏃墮棿銆備緥濡傦細Last-Modified: Mon,10PR 18:42:51 GMT
Location 瀵逛簬涓涓凡緇忕Щ鍔ㄧ殑璧勬簮錛岀敤浜庨噸瀹氬悜璇鋒眰鑰呰嚦鍙︿竴涓綅緗?br> 涓庣姸鎬佺紪鐮?02錛堟殏鏃剁Щ鍔級鎴栬?01錛堟案涔呮хЩ鍔級閰嶅悎浣跨敤銆?br> 渚嬪錛歀ocation: http://www2.myweb.com/index.jsp
Max-Forwards 涓涓敤浜嶵RACE鏂規硶鐨勮姹傚ご鏍囷紝浠ユ寚瀹氫唬鐞嗘垨緗戝叧鐨勬渶澶ф暟鐩紝璇ヨ姹傞氳繃緗戝叧鎵嶅緱浠ヨ礬鐢便?br> 鍦ㄩ氳繃璇鋒眰浼犻掍箣鍓嶏紝浠g悊鎴栫綉鍏沖簲璇ュ噺灝戞鏁扮洰銆備緥濡傦細Max-Forwards: 3
Pragma 涓涓氱敤澶存爣錛屽畠鍙戦佸疄鐜扮浉鍏崇殑淇℃伅銆備緥濡傦細Pragma: no-cache
Proxy-Authenticate 綾諱技浜嶹WW-Authenticate錛屼究鏄湁鎰忚姹傚彧鏉ヨ嚜璇鋒眰閾撅紙浠g悊錛夌殑涓嬩竴涓湇鍔″櫒鐨勮璇併?br> 渚嬪錛歅roxy-Authenticate: Basic realm-admin
Proxy-Proxy-Authorization 綾諱技浜庢巿鏉冿紝浣嗗茍闈炴湁鎰忎紶閫掍換浣曟瘮鍦ㄥ嵆鏃舵湇鍔″櫒閾句腑鏇磋繘涓姝ョ殑鍐呭銆?br> 渚嬪錛歅roxy-Proxy-Authorization: Basic YXV0aG9yOnBoaWw=
Public 鍒楄〃鏄劇ず鏈嶅姟鍣ㄦ墍鏀寔鐨勬柟娉曢泦銆備緥濡傦細Public: OPTIONS,MGET,MHEAD,GET,HEAD
Range 鎸囧畾涓縐嶅害閲忓崟浣嶅拰涓涓儴鍒嗚璇鋒眰璧勬簮鐨勫亸縐昏寖鍥淬備緥濡傦細Range: bytes=206-5513
Refener 涓縐嶈姹傚ご鏍囧煙錛屾爣鏄庝駭鐢熻姹傜殑鍒濆璧勬簮銆傚浜嶩TML琛ㄥ崟錛屽畠鍖呭惈姝よ〃鍗曠殑Web欏甸潰鐨勫湴鍧銆?br> 渚嬪錛歊efener: http://www.myweb.com/news/search.html
Retry-After 涓縐嶅搷搴斿ご鏍囧煙錛岀敱鏈嶅姟鍣ㄤ笌鐘舵佺紪鐮?03錛堟棤娉曟彁渚涙湇鍔★級閰嶅悎鍙戦侊紝浠ユ爣鏄庡啀嬈¤姹備箣鍓嶅簲璇ョ瓑寰呭闀挎椂闂淬?br> 姝ゆ椂闂村嵆鍙互鏄竴縐嶆棩鏈燂紝涔熷彲浠ユ槸涓縐嶇鍗曚綅銆備緥濡傦細Retry-After: 18
Server 涓縐嶆爣鏄嶹eb鏈嶅姟鍣ㄨ蔣浠跺強鍏剁増鏈彿鐨勫ご鏍囥備緥濡傦細Server: Apache/2.0.46(Win32)
Transfer-Encoding 涓縐嶉氱敤澶存爣錛屾爣鏄庡搴旇鎺ュ彈鏂瑰弽鍚戠殑娑堟伅浣撳疄鏂藉彉鎹㈢殑綾誨瀷銆備緥濡傦細Transfer-Encoding: chunked
Upgrade 鍏佽鏈嶅姟鍣ㄦ寚瀹氫竴縐嶆柊鐨勫崗璁垨鑰呮柊鐨勫崗璁増鏈紝涓庡搷搴旂紪鐮?01錛堝垏鎹㈠崗璁級閰嶅悎浣跨敤銆?br> 渚嬪錛歎pgrade: HTTP/2.0
User-Agent 瀹氫箟鐢ㄤ簬浜х敓璇鋒眰鐨勮蔣浠剁被鍨嬶紙鍏稿瀷鐨勫Web嫻忚鍣級銆?br> 渚嬪錛歎ser-Agent: Mozilla/4.0(compatible; MSIE 5.5; Windows NT; DigExt)
Vary 涓涓搷搴斿ご鏍囷紝鐢ㄤ簬琛ㄧず浣跨敤鏈嶅姟鍣ㄩ┍鍔ㄧ殑鍗忓晢浠庡彲鐢ㄧ殑鍝嶅簲琛ㄧず涓夋嫨鍝嶅簲瀹炰綋銆備緥濡傦細Vary: *
Via 涓涓寘鍚墍鏈変腑闂翠富鏈哄拰鍗忚鐨勯氱敤澶存爣錛岀敤浜庢弧瓚寵姹傘備緥濡傦細Via: 1.0 fred.com, 1.1 wilma.com
Warning 鐢ㄤ簬鎻愪緵鍏充簬鍝嶅簲鐘舵佽ˉ鍏呬俊鎭殑鍝嶅簲澶存爣銆備緥濡傦細Warning: 99 www.myweb.com Piano needs tuning
www-Authenticate 涓涓彁紺虹敤鎴蜂唬鐞嗘彁渚涚敤鎴峰悕鍜屽彛浠ょ殑鍝嶅簲澶存爣錛屼笌鐘舵佺紪鐮?01錛堟湭鎺堟潈錛夐厤鍚堜嬌鐢ㄣ傚搷搴斾竴涓巿鏉冨ご鏍囥?br> 渚嬪錛歸ww-Authenticate: Basic realm=zxm.mgmt
= HTTP鐮佸簲鐮?br>鍝嶅簲鐮佺敱涓変綅鍗佽繘鍒舵暟瀛楃粍鎴愶紝瀹冧滑鍑虹幇鍦ㄧ敱HTTP鏈嶅姟鍣ㄥ彂閫佺殑鍝嶅簲鐨勭涓琛? 鍒嗕簲縐嶇被鍨嬶紝鐢卞畠浠殑絎竴浣嶆暟瀛楄〃紺猴細
- 1xx錛氫俊鎭紝璇鋒眰鏀跺埌錛岀戶緇鐞?br>- 2xx錛氭垚鍔燂紝琛屼負琚垚鍔熷湴鎺ュ彈銆佺悊瑙e拰閲囩撼
- 3xx錛氶噸瀹氬悜錛屼負浜嗗畬鎴愯姹傦紝蹇呴』榪涗竴姝ユ墽琛岀殑鍔ㄤ綔
- 4xx錛氬鎴風閿欒錛岃姹傚寘鍚娉曢敊璇垨鑰呰姹傛棤娉曞疄鐜?br>- 5xx錛氭湇鍔″櫒閿欒錛屾湇鍔″櫒涓嶈兘瀹炵幇涓縐嶆槑鏄炬棤鏁堢殑璇鋒眰
涓嬭〃鏄劇ず姣忎釜鍝嶅簲鐮佸強鍏跺惈涔夛細
100 緇х畫
101 鍒嗙粍浜ゆ崲鍗?br>200 OK
201 琚垱寤?br>202 琚噰綰?br>203 闈炴巿鏉冧俊鎭?br>204 鏃犲唴瀹?br>205 閲嶇疆鍐呭
206 閮ㄥ垎鍐呭
300 澶氶夐」
301 姘鎬箙鍦頒紶閫?br>302 鎵懼埌
303 鍙傝鍏朵粬
304 鏈敼鍔?br>305 浣跨敤浠g悊
307 鏆傛椂閲嶅畾鍚?br>400 閿欒璇鋒眰
401 鏈巿鏉?br>402 瑕佹眰浠樿垂
403 紱佹
404 鏈壘鍒?br>405 涓嶅厑璁哥殑鏂規硶
406 涓嶈閲囩撼
407 瑕佹眰浠g悊鎺堟潈
408 璇鋒眰瓚呮椂
409 鍐茬獊
410 榪囨湡鐨?br>411 瑕佹眰鐨勯暱搴?br>412 鍓嶆彁涓嶆垚绔?br>413 璇鋒眰瀹炰緥澶ぇ
414 璇鋒眰URI澶ぇ
415 涓嶆敮鎸佺殑濯掍綋綾誨瀷
416 鏃犳硶婊¤凍鐨勮姹傝寖鍥?br>417 澶辮觸鐨勯鏈?br>500 鍐呴儴鏈嶅姟鍣ㄩ敊璇?br>501 鏈浣跨敤
502 緗戝叧閿欒
503 涓嶅彲鐢ㄧ殑鏈嶅姟
504 緗戝叧瓚呮椂
505 HTTP鐗堟湰鏈鏀寔
= 瀹炰緥
== POST 鏁版嵁
== 涓婁紶涓涓枃浠?
鍋囪鎺ュ彈鏂囦歡鐨勭綉欏電▼搴忎綅浜?a
bb
ccc
瀹㈡埛绔摼鎺?192.168.29.65 鍚? 搴旇鍙戦佸涓媓ttp 璇鋒眰錛?br>POST /upload_file/UploadFile HTTP/1.1
Accept: text/plain, */*
Accept-Language: zh-cn
Host: 192.168.29.65
Content-Type:multipart/form-data;boundary=---------------------------7d33a816d302b6
User-Agent: Mozilla/4.0 (compatible; OpenOffice.org)
Content-Length: 333
Connection: Keep-Alive
-----------------------------7d33a816d302b6
Content-Disposition: form-data; name="userfile1"; filename="E:s"
Content-Type: application/octet-stream
a
bb
ccc
-----------------------------7d33a816d302b6
Content-Disposition: form-data; name="text1"
foo
-----------------------------7d33a816d302b6
Content-Disposition: form-data; name="password1"
bar
-----------------------------7d33a816d302b6--
(涓婇潰鏈変竴涓洖杞?
姝ゅ唴瀹瑰繀欏諱竴瀛椾笉宸紝鍖呮嫭鏈鍚庣殑鍥炶濺銆?
娉ㄦ剰錛欳ontent-Length: 333 榪欓噷鐨?33鏄孩鑹插唴瀹圭殑鎬婚暱搴︼紙鍖呮嫭鏈鍚庣殑鍥炶濺錛?
娉ㄦ剰榪欎竴琛岋細
Content-Type: multipart/form-data; boundary=---------------------------7d33a816d302b6
鏍規嵁 rfc1867, multipart/form-data鏄繀欏葷殑.
---------------------------7d33a816d302b6 鏄垎闅旂錛屽垎闅斿涓枃浠躲佽〃鍗曢」銆傚叾涓?3a816d302b6 鏄嵆鏃剁敓鎴愮殑涓涓暟瀛楋紝鐢ㄤ互紜繚鏁翠釜鍒嗛殧絎︿笉浼氬湪鏂囦歡鎴栬〃鍗曢」鐨勫唴瀹逛腑鍑虹幇銆?strong>Form姣忎釜閮ㄥ垎鐢ㄥ垎闅旂鍒嗗壊錛屽垎闅旂涔嬪墠蹇呴』鍔犱笂"--"鐫涓や釜瀛楃(鍗?-{boundary})鎵嶈兘琚玥ttp鍗忚璁や負鏄疐orm鐨勫垎闅旂錛岃〃紺虹粨鏉熺殑璇濈敤鍦ㄦ紜殑鍒嗛殧絎﹀悗闈㈡坊鍔?--"琛ㄧず緇撴潫銆?/strong>
鍓嶉潰鐨?---------------------------7d 鏄?IE 鐗規湁鐨勬爣蹇?Mozila 涓?--------------------------71.
姣忎釜鍒嗛殧鐨勬暟鎹殑閮藉彲浠ョ敤Content-Type鏉ヨ〃紺轟笅闈㈡暟鎹殑綾誨瀷錛屽彲浠ュ弬鑰價fc1341 (http://www.ietf.org/rfc/rfc1341.txt) 渚嬪錛?
Contect-Type:application/octet-stream 琛ㄧず涓嬮潰鐨勬暟鎹槸浜岃繘鍒舵暟鎹?
Contect-Type:text/plain 琛ㄧず涓嬮潰鐨勬暟鎹槸ASSCII鐮佹暟鎹?
Contect-Type:text/richtext 琛ㄧず涓嬮潰鐨勬暟鎹槸RTF鏍煎紡
鍦ㄨ繍琛屾椂鍙兘浼氫駭鐢熺被浼?'import site' failed; use -v for traceback 鐨勯敊璇? 鍘熷洜鏄痯ython 鍦╥mport module 鐨勬椂鍊欑殑璺緞闂. 鏈?縐嶆柟娉曞彲浠ヨВ鍐?浠ュ墠閫氳繃璁劇疆鐜鍙橀噺 PYTHONPATH 濂藉儚鍦?.5 宸茬粡鏃犳晥浜?.
0. 鍙栨秷娉ㄩ噴 Py_NoSiteFlag = 1;
榪欎釜鍙槸鍙栨秷import site , 褰撶劧濡傛灉鍦ㄤ唬鐮佷腑瑕乮mport 鍟ョ殑璇? 榪樻槸浼氬嚭鐜伴敊璇殑.
a. 璁劇疆鐜鍙橀噺 PYTHONHOME = D:\usr\Python
b. 鍦ㄨ皟鐢?Py_Initialize 涔嬪墠璋冪敤鍑芥暟
Py_SetPythonHome("D:\\usr\\Python"); // 鍙傛暟鏄痯ython 鐨勫畨瑁呯洰褰?
2. 鍏朵粬涓浜涙湁鐢ㄧ殑璧勬簮
Python/C API Reference Manual (API 鍙傝? , Extending and Embedding the Python Interpreter (鎵╁睍鍙婂祵鍏ython瑙i噴鍣? 涓昏璇存槑浜嗗浣曟墿灞昉ython, 緇橮ython 鍐欐墿灞? 鍏朵腑 5. Embedding Python in Another Application 涓绔犺榪頒簡鍦–++涓祵鍏?璋冪敤Python 浠g爜 )
浣跨敤C/C++鎵╁睍Python 瀵規枃 Extending and Embedding the Python Interpreter 浣滀簡綺劇畝, 寰堜笉閿欑殑涓綃囨枃绔? 浣嗘槸璺寵繃浜嗕竴浜涘熀紜 .
Building Hybrid Systems with Boost.Python 浠嬬粛浜嗕嬌鐢╞oost.python 鏂逛究python 鎻掍歡寮鍙? python緇戝畾c++紼嬪簭 鏄叾涓枃鐗堟湰.
Embedding Python in Multi-Threaded C/C++ Applications 璁蹭簡c++鍦ㄥ綰跨▼鐜濡備綍浣跨敤Python , 鏂?nbsp;C++澶氱嚎紼嬩腑璋冪敤python api鍑芥暟 鎻愪緵浜嗕竴涓綰跨▼鐨勫皝瑁?
SCXX - A Simple Python/C++ API
http://davidf.sjsoft.com/mirrors/mcmillan-inc/scxx.html
C++鎵╁睍鍜屽祵鍏ython搴旂敤 (浠嬬粛浜嗕竴浜汸ython/C API 鍑芥暟, 浠ュ強ext 渚嬪瓙, 涓鑸埇)
http://hi.baidu.com/yunsweet/blog/item/20b08aeebaa2b1282cf534c7.html
3. Python 澶氱嚎紼嬬殑浣跨敤
zz http://blog.csdn.net/liguangyi/archive/2007/06/20/1659697.aspx
浠婂ぉ鐪嬩簡榪戜竴澶╁叧浜庡綰跨▼鐨勫簲鐢ㄤ腑錛屽浣曞畨鍏ㄨ皟鐢╬ython鏂歸潰鐨勮祫鏂欙紝寮濮嬬殑鏃跺欑湅鐨勭畝鐩村ご澶у鏂楋紝琚玴ython璇█鐨勫叏灞閿?Global Interpreter Lock)銆佺嚎紼嬬姸鎬?Thread State )絳夐兘鏈夌偣緇曟檿浜嗭紝鍚庢潵緇忚繃鍚勬柟闈㈡枃绔犲拰甯姪鏂囨。鐨勭浉浜掑弬鑰冿紝鍙戠幇瀵逛簬2.4/2.5鐗堟湰錛屾彁渚涗簡PyGILState_Ensure, PyGILState_Release錛屽搸錛岃繖涓嬪彲鏂逛究澶у彂浜嗐?/p>
涓銆侀鍏堝畾涔変竴涓皝瑁呯被錛屼富瑕佹槸淇濊瘉PyGILState_Ensure, PyGILState_Release閰嶅浣跨敤錛岃屼笖榪欎釜綾繪槸鍙互宓屽浣跨敤鐨勩?/p>
#include <python.h>
class PyThreadStateLock
{
public:
PyThreadStateLock(void)
{
state = PyGILState_Ensure( );
}
~PyThreadStateLock(void)
{
PyGILState_Release( state );
}
private:
PyGILState_STATE state;
};
浜屻佸湪涓葷嚎紼嬩腑錛岃繖鏍峰鐞?/p>
// 鍒濆鍖?br> Py_Initialize();
// 鍒濆鍖栫嚎紼嬫敮鎸?br> PyEval_InitThreads();
// 鍚姩瀛愮嚎紼嬪墠鎵ц錛屼負浜嗛噴鏀綪yEval_InitThreads鑾峰緱鐨勫叏灞閿侊紝鍚﹀垯瀛愮嚎紼嬪彲鑳芥棤娉曡幏鍙栧埌鍏ㄥ眬閿併?br> PyEval_ReleaseThread(PyThreadState_Get());
// 鍏朵粬鐨勫鐞嗭紝濡傚惎鍔ㄥ瓙綰跨▼絳?br> ......
// 淇濊瘉瀛愮嚎紼嬭皟鐢ㄩ兘緇撴潫鍚?br> PyGILState_Ensure();
Py_Finalize();
// 涔嬪悗涓嶈兘鍐嶈皟鐢ㄤ換浣昿ython鐨凙PI
涓夈佸湪涓葷嚎紼嬶紝鎴栬呭瓙綰跨▼涓紝璋冪敤python鏈韓鍑芥暟鐨勯兘閲囩敤濡備笅澶勭悊
{
class PyThreadStateLock PyThreadLock;
// 璋冪敤python鐨凙PI鍑芥暟澶勭悊
......
}
鍛靛懙錛岀湅榪欐牱鏄惁闈炲父綆鍗曚簡銆?/p>
鍙﹀榪樻湁涓や釜鍜屽叏灞閿佹湁鍏崇殑瀹忥紝Py_BEGIN_ALLOW_THREADS 鍜?Py_END_ALLOW_THREADS銆傝繖涓や釜瀹忔槸涓轟簡鍦ㄨ緝闀挎椂闂寸殑C鍑芥暟璋冪敤鍓嶏紝涓存椂閲婃斁鍏ㄥ眬閿侊紝瀹屾垚鍚庨噸鏂拌幏鍙栧叏灞閿侊紝浠ラ伩鍏嶉樆濉炲叾浠杙ython鐨勭嚎紼嬬戶緇繍琛屻傝繖涓や釜瀹忓彲浠ヨ繖鏍瘋皟鐢?/p>
{
class PyThreadStateLock PyThreadLock;
// 璋冪敤python鐨凙PI鍑芥暟澶勭悊
......
Py_BEGIN_ALLOW_THREADS
// 璋冪敤闇瑕侀暱鏃墮棿鐨凜鍑芥暟
......
Py_END_ALLOW_THREADS
// 璋冪敤python鐨凙PI鍑芥暟澶勭悊
......
}
4. 鍙兘鐨勯敊璇強瑙e喅
a. 鍦╲s 200x 涓?debug 妯″紡鍑虹幇閾炬帴闂
extmodule.obj : error LNK2019: unresolved external symbol __imp___Py_Dealloc referenced in function _PySwigObject_format
extmodule.obj : error LNK2019: unresolved external symbol __imp___Py_NegativeRefcount referenced in function _PySwigObject_format
extmodule.obj : error LNK2001: unresolved external symbol __imp___Py_RefTotal
extmodule.obj : error LNK2019: unresolved external symbol __imp___PyObject_DebugFree referenced in function _PySwigObject_dealloc
extmodule.obj : error LNK2019: unresolved external symbol __imp___PyObject_DebugMalloc referenced in function _PySwigObject_New
extmodule.obj : error LNK2019: unresolved external symbol __imp__Py_InitModule4TraceRefs referenced in function _init_extmodule
涓昏鏄洜涓?Py_DEBUG/Py_TRACE_REFS 寮曡搗, 淇敼 Python\include 涓嬬殑 pyconfig.h, object.h 涓や釜鏂囦歡灝辮浜?... 璇﹁ http://www.nabble.com/link-error-in-debug-mode-td3126668.html
Command-Line Option |
Description |
---|---|
|
The default is to register the COM objects. |
|
Unregisters the objects. This removes all references to the objects from the Windows registry. |
|
Registers the COM servers in debug mode. We discuss debugging COM servers later in this chapter. |
|
Register (or unregister) the object quietly (i.e., don't report success). |