<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6794224713753030932</id><updated>2024-12-19T11:18:11.890+08:00</updated><category term="編寫自己"/><category term="Android"/><category term="IPHONE"/><category term="Wince"/><category term="Language"/><category term="Favor song"/><category term="閱讀"/><category term="MISC"/><category term="Maven"/><category term="OpenGL"/><category term="SQL"/><category term="Bugzilla"/><category term="CUFON"/><category term="Eclipse"/><category term="FONT"/><category term="HTML"/><category term="Hadoop"/><category term="PHP"/><category term="Reading"/><category term="SEO"/><category term="SVN"/><category term="UML"/><category term="求才"/><category term="黑的部落"/><title type='text'>以手為半徑的大同世界</title><subtitle type='html'>以手為半徑是我的世界範圍!&#xa;&#xa;在這個世界裡頭沒有爭吵，沒有公司派的勾心鬥角，當然也沒有那種跟你搏軟然後在背後捅你一百多刀的恐怖smile!&#xa;&#xa;所以這是屬於我的半徑! 閒人勿進，因為結界的關西。&#xa;半徑內的咖啡、半徑內的電波、半徑變成了一個獨立的單位在這個獨立的世界與國家中。&#xa;&#xa;而我的半徑中我是完全自由的非固體!&#xa;因為我是法系人物!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>71</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-7946927668857903134</id><published>2011-11-01T11:36:00.000+08:00</published><updated>2011-11-01T11:42:07.086+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CUFON"/><category scheme="http://www.blogger.com/atom/ns#" term="FONT"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><title type='text'>CUFON 讓Web Design時能使用更多美麗的字型</title><content type='html'>CUFON是解決網頁設計時受限於字型的限制。他的原理是將字形檔轉換成圖片，然後使用Javascript技術呈現。&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;使用步驟很簡單&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;下載你想要的字型（當然是挑美的下載），最下方有字型網站的連結。需要注意的是版權的問題，使用者得自行負責版權的責任。&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG0a5EkARCsDNWwff0Ml-u4JeoPjyMt6OS-UPzWZPuPx3-Uo6NstOr7ofbEfFo175TQP_amN2jhkugrOvKMD1Ch37PZgnIGwVSLsXHSRlPirhTDD19guQ-lvoZnmiCmf-D3TDKDEwHbq8s/s1600/font_download.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;302&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG0a5EkARCsDNWwff0Ml-u4JeoPjyMt6OS-UPzWZPuPx3-Uo6NstOr7ofbEfFo175TQP_amN2jhkugrOvKMD1Ch37PZgnIGwVSLsXHSRlPirhTDD19guQ-lvoZnmiCmf-D3TDKDEwHbq8s/s320/font_download.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;到CUFON網站下載所需要的Javascript檔案&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrQ65gHt3jtTo70GiEWhneV0aFGjKP1jvyMgEC8cdYeI-FZ4lyi3o-lLir_vn9VpPd-11wHLqVjSgQ5kAo9urCKTMab-pWALcydFX-tepfr0bc1C0ndQ1E8lOrElqd0bcYaGOV14KfRdJs/s1600/down_js.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;232&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrQ65gHt3jtTo70GiEWhneV0aFGjKP1jvyMgEC8cdYeI-FZ4lyi3o-lLir_vn9VpPd-11wHLqVjSgQ5kAo9urCKTMab-pWALcydFX-tepfr0bc1C0ndQ1E8lOrElqd0bcYaGOV14KfRdJs/s320/down_js.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;將下載好的字形檔使用CUFON網站的線上轉檔程式轉成Javascript &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDfTVLSMkaI43DOXu-YZimjs-RVpcC2u8_epMWGE_8BpVobGcgVuvaPnyeyUtOmkqvORNfk0dBdzYUD-r1uuUOO4Fe4wieaxApOfeyq0VLj1KzglYV_AvX1g_EE-tP5R7wLPc3LoyhNPz_/s1600/convert_font.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDfTVLSMkaI43DOXu-YZimjs-RVpcC2u8_epMWGE_8BpVobGcgVuvaPnyeyUtOmkqvORNfk0dBdzYUD-r1uuUOO4Fe4wieaxApOfeyq0VLj1KzglYV_AvX1g_EE-tP5R7wLPc3LoyhNPz_/s1600/convert_font.jpg&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;編輯HTML將JS檔Include進去 &lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy3MnFzMRnmI4Vv9_aSoaJPDYckfn0L9zahfeoarf195KBJVP_2qdeeqPHxu4Rj5cilYaOohRzBzqYBu7fR15noY4tOxyQ_CBQQx-5-ACpDso1mdPNLZRHQaqmXPQex2YTfKMsLmPNRv_V/s1600/Screen+Shot+2011-11-01+at+11.32.38+AM.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy3MnFzMRnmI4Vv9_aSoaJPDYckfn0L9zahfeoarf195KBJVP_2qdeeqPHxu4Rj5cilYaOohRzBzqYBu7fR15noY4tOxyQ_CBQQx-5-ACpDso1mdPNLZRHQaqmXPQex2YTfKMsLmPNRv_V/s640/Screen+Shot+2011-11-01+at+11.32.38+AM.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;然後就搞定了，就是這樣簡單&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil2KmtNVpOMingWQeeo4v1t6EH_R31a5Hd2sljZKm19CcMkFgoRr1R47kS60uGiBgGavwm5A69oD5j5cdlcb0AgF-sHAqQkYVKTYD12rB3UECR3604rvpBBfUwnXUr19VH7n0AI97yeJ9e/s1600/Screen+Shot+2011-11-01+at+11.34.29+AM.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil2KmtNVpOMingWQeeo4v1t6EH_R31a5Hd2sljZKm19CcMkFgoRr1R47kS60uGiBgGavwm5A69oD5j5cdlcb0AgF-sHAqQkYVKTYD12rB3UECR3604rvpBBfUwnXUr19VH7n0AI97yeJ9e/s1600/Screen+Shot+2011-11-01+at+11.34.29+AM.jpg&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;相關聯結 &lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;CURON網站：&lt;a href=&quot;http://cufon.shoqolate.com/generate/&quot;&gt;http://cufon.shoqolate.com/generate/&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;字型下載網站&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;CUFON Fonts：&lt;a href=&quot;http://www.cufonfonts.com/zh-TW/&quot;&gt;http://www.cufonfonts.com/zh-TW/&lt;/a&gt;, 每種字型都提供了原始字形擋下載與CUFON檔案下載，可以大大省去了轉檔的麻煩。&lt;/li&gt;
&lt;li&gt;DAFont：&lt;a href=&quot;http://www.dafont.com/&quot;&gt;http://www.dafont.com/&lt;/a&gt;, 提供原始字型的下載&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/7946927668857903134/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/7946927668857903134' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/7946927668857903134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/7946927668857903134'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/10/cufon-web-design.html' title='CUFON 讓Web Design時能使用更多美麗的字型'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG0a5EkARCsDNWwff0Ml-u4JeoPjyMt6OS-UPzWZPuPx3-Uo6NstOr7ofbEfFo175TQP_amN2jhkugrOvKMD1Ch37PZgnIGwVSLsXHSRlPirhTDD19guQ-lvoZnmiCmf-D3TDKDEwHbq8s/s72-c/font_download.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-5367819304352801535</id><published>2011-10-31T09:41:00.000+08:00</published><updated>2011-11-01T11:39:56.564+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="閱讀"/><title type='text'>[轉＋記] Idea Scout 與 Idea Connector – 開放式創新的關鍵角色</title><content type='html'>&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;a href=&quot;http://cdn.inside.com.tw/wp-content/uploads/2011/10/mayer_marissa.png&quot; rel=&quot;lightbox[20669]&quot; style=&quot;color: #3c78a7; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;size-full wp-image-21237 aligncenter&quot; height=&quot;407&quot; src=&quot;http://cdn.inside.com.tw/wp-content/uploads/2011/10/mayer_marissa.png&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; margin-bottom: 5px; margin-left: 0px; margin-right: 10px; margin-top: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px;&quot; width=&quot;610&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
(Google 的 Vice President Marissa Mayer)&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
在 2011年秋季號的「&lt;a href=&quot;http://sloanreview.mit.edu/&quot; style=&quot;color: #3c78a7; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;Sloan Management Review&lt;/a&gt;」裡一篇標題為 「&lt;a href=&quot;http://sloanreview.mit.edu/the-magazine/2011-fall/53108/creating-employee-networks-that-deliver-open-innovation/&quot; style=&quot;color: #3c78a7; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;Creating Employee Networks That Deliver Open Innovation&lt;/a&gt;」的文章當中，提到兩種員工在的開放式創新裡扮演相當重要的角色，並分別為這兩種角色命名為「idea scout」及「idea connector」。這些為數稀少的員工對企業所產生的影響力相當重大，是目前頂尖企業關注的新類型人才，有的公司已經把這類型的工作從「兼任」或「員工個人興趣」抽離獨立成職位。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
這裡提出，企業要有三種利用外部知識的能力：&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;一、爬梳企業外部的可行創意的能力絕對必要，但是光有這個還不足夠。&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;二、管理階層必須確保這些嶄新的創意得以到達有能力善用的人身上。&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;三、有「創意偵察人」（ idea scouts） 以及「創意連結者」（idea connectors）的技巧就更為完善。&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
一樣是大企業，為何像是 Procter &amp;amp; Gamble 、Intel 以及 Cisco 等公司能夠藉由「開放式創新」的方式在同業間保持領先地位，而其他仿效該創新模式的企業卻無法達到相同效果？原因在於：這些公司無能確保這些來自外部的意見得以傳達到有能力運用這些意見的人身上。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
改變這種狀況，必須要仰賴兩種所謂的「創新經理人」（Innovation Broker），也就是「idea scouts」以及「idea connectors」。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
一個實際案例：A 軟體公司輸掉了一紙大合約，只因對手多了一項「更先進的語音辨識功能」。事實上，A 公司早在一年前就有公司員工發現同一項技術，並立即通報給該公司的技術主管知道。後來因為該技術主管在人際網絡裡找不到信得過的專業人士來諮商，所以遲遲沒有相關動作，直到錯失良機。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
在這個案例中，我們看到了 idea scout 的角色的重要性，也發現缺乏 idea connector 的結果就是讓偵察到的創意無從擴散到適合的人身上、也沒有機會被消化應用。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
下圖說明 Idea Scout 以及 Idea Connector的角色運作：&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;&quot; height=&quot;407&quot; src=&quot;http://cdn.inside.com.tw/wp-content/uploads/2011/10/idea_scout.jpg&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; margin-bottom: 5px; margin-left: 0px; margin-right: 10px; margin-top: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px;&quot; width=&quot;610&quot; /&gt;&lt;br /&gt;
[參考資料來源&amp;nbsp;&lt;a href=&quot;http://sloanreview.mit.edu/&quot; style=&quot;color: #3c78a7; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;MIT Sloan Management Review&lt;/a&gt;&amp;nbsp;所繪製]&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
從上圖，我們看到 C 先生雖然時常進行創意偵察的動作，也努力將可行的創意傳遞給認識的研發部門。礙於 C 先生與公司內部研發部門的連結有限，創意始終沒有到達對的人身上，也沒有擴散到足以產生影響的規模，因為「信箱超載」的現象讓人習慣將與自己現有工作「不直接相關」的信息刪除。 C 先生的能力雖然重要，卻被浪費了。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
A 先生就幸運的多，他擁有大量的外部連結、大量的創意，更重要的是他與 B 小姐 – 一位能連結到內部研發部門每個人的 idea connector – 有扎實的連結，所以他偵察到的創意得以透過 B 小姐進行擴散，到達有能力近一步分析、應用的研發人員身上。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
文中所舉的 idea connector 在真實世界裡的化身，就是 Google 的 Vice President Marissa Mayer。她採用的方法之一就是舉行為期三週的面談，跟想提出新點子的人一起發想、並壓榨出更多關於這些創意的功能細節，然後再來決定要不要往上提給 Larry Page 以及 Sergey Brin.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
在開放式創新（Open Innovation）的過程中，Idea scouts 以及 idea connectors 最能發揮貢獻的三個階段：&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;成形（Ideation）、篩選（Selection）、擴散（Diffusion）&lt;/b&gt;。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
如下圖所示：&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;&quot; height=&quot;407&quot; src=&quot;http://cdn.inside.com.tw/wp-content/uploads/2011/10/who-shines-when.jpg&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; margin-bottom: 5px; margin-left: 0px; margin-right: 10px; margin-top: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px;&quot; width=&quot;610&quot; /&gt;&lt;br /&gt;
[參考資料來源&amp;nbsp;&lt;a href=&quot;http://sloanreview.mit.edu/&quot; style=&quot;color: #3c78a7; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;MIT Sloan Management Review&lt;/a&gt;&amp;nbsp;所繪製]&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;成形（Ideation）&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
雖然所有員工都有取得公司外部創意的能力，僅少數人有技術專長與個人興趣來定期地、有效的進行此任務。管理者只要提供足夠的資助讓這些人進行創意的搜尋，但是這些人最需要的是「時間」。文中的案例是一家藥廠，已經指派其 idea scout 的擔任者投入全部時間進行創意偵查。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
除了資源與電腦連線外，參加如會議、商展等等公司外部的聚會或活動，也很重要。除了可以多幾條創意的渠道，也同時向外宣示公司對創新的支持與參與。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;篩選（Selection）&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
只要有鍵盤、滑鼠、跟網路連線，任何人都能把創意跟想法發佈道網路上，如何從爆量的訊息中分離出有用的資訊才是最難的步驟。所以 idea scout 跟 idea connector 這兩者的互動之所以重要，不僅僅因為這樣才能挑出有展望、又合適該企業的創意，更重要的是能辨別爬梳回來的創意是否真實可靠、而非誇大的行銷說詞。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;b style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;擴散（Diffusion）&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
一旦確認新概念有潛力，就必須擴散到知道如何應用的人身上。像 Marissa Mayer 這樣的 idea connectors 雖然因其專業能力受僱，卻同時具備社交天賦。日積月累，這些人進化成具備跨領域知識與廣泛興趣的通才。善用 idea connectors 的方式就是讓他們多參與不同專案或是工作調動，藉以發揮其影響力。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
投資「創新經理人」&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
企業領導人必須認清，光把新點子和技術引進組織裡並無法達成「開放式創新」。點子不會自己長大成創新的成果，除非這些創意能到達有能力與影響力的員工們身上。不管網路如何改變知識與創意的發佈與流動，innovation broker 的角色依然吃重。管理者能夠投資 idea scouts 與 idea connectors 並確保這兩者有確實連結，開放式創新就在不遠處了。&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Helvetica, Arial; font-size: 15px; line-height: 26px; margin-bottom: 15px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
（本文資料摘譯自 MIT SloanN Management Review）&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/5367819304352801535/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/5367819304352801535' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/5367819304352801535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/5367819304352801535'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/10/idea-scout-idea-connector.html' title='[轉＋記] Idea Scout 與 Idea Connector – 開放式創新的關鍵角色'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Taipei City, Taiwan</georss:featurename><georss:point>25.091075 121.5598345</georss:point><georss:box>24.976033 121.401906 25.206117 121.71776299999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-6025604558155521550</id><published>2011-09-22T13:44:00.000+08:00</published><updated>2011-09-22T13:44:40.074+08:00</updated><title type='text'>人才招募：SEO 面試考題</title><content type='html'>1.    你認為甚麼是SEO?&lt;br /&gt;
&lt;br /&gt;
2.    SEO有哪些衡量指標？&lt;br /&gt;
&lt;br /&gt;
3.    Google, Yahoo, 百度在SEO上差異是甚麼？&lt;br /&gt;
4.    你使用過那些SEO工具&lt;br /&gt;
5.    為甚麼要作流量分析？有哪些流量分析軟體並描述一下。&lt;br /&gt;
6.    流量分析有哪些你認為重要的衡量指標？並描述一下你的看法</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/6025604558155521550/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/6025604558155521550' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/6025604558155521550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/6025604558155521550'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/09/seo.html' title='人才招募：SEO 面試考題'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-4006000663651391023</id><published>2011-09-22T11:34:00.000+08:00</published><updated>2011-09-22T11:34:06.758+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SEO"/><title type='text'>關鍵字密度是什麼？關鍵字密度是不是越高越好？</title><content type='html'>&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;什麼是關鍵字密度？&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;a data-cke-saved-href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot; href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot;&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;strong&gt;SEO&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;關鍵字密度就是一個關鍵字或一個&lt;/span&gt;&lt;strong&gt;&lt;a data-cke-saved-href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot; href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot;&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;關鍵字行銷&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;在網頁上出現的總次數與其他文字的比例。相對於頁面總字數而言，&lt;/span&gt;&lt;a data-cke-saved-href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot; href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot;&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;strong&gt;SEO行銷&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;關鍵字出現的次數越多，那麼總的關鍵字密度也就越大。其他文字出現的次數越多，關鍵字的比例就越低，則關鍵字密度越小。為自然提高在搜索引擎中的排名位置，您網站中&lt;/span&gt;&lt;strong&gt;&lt;a data-cke-saved-href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot; href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot;&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;網頁設計&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;頁 面的關鍵字密度不能過高，也不要過低，一般在1%到7%較為合適。如果要達到1%的比例，那麼您在平均100&amp;nbsp;個文字中出現1個關鍵字或是關鍵字組，如果 在&amp;nbsp;1000&amp;nbsp;個文字中僅僅只包含1個關鍵字或關鍵字組，那麼關鍵字密度就顯得過於稀少囉。記住，您千萬別把所有的關鍵字或關鍵字組堆積在一起，要不&lt;/span&gt;&lt;a data-cke-saved-href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot; href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot;&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;strong&gt;網路行銷&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;搜索引擎將視為一種惡意行為(Spam)，那是會直接降低您網站的排名，其實對關鍵字密度也不要過分約束與要求的。&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;1、&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;strong&gt;&lt;a data-cke-saved-href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot; href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot;&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;SEO&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;關鍵字先利用雅虎關鍵字工具或google工具查詢。&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;2、先構思該網站或&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;a data-cke-saved-href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot; href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot;&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;strong&gt;網頁設計&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;中的主要關鍵字與延伸關鍵字後，自己參考與搜尋後，創造一篇相關性文章。&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;3、網路搜尋主要關鍵字與延伸關鍵字的關係與搜尋量，主要關鍵字如果排名提升時，相對地延伸關鍵字也會明顯提升。首頁一個頁面使用一個主要關鍵字，兩三個延伸關鍵字。&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;針對關鍵字&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;strong&gt;&lt;a data-cke-saved-href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot; href=&quot;http://www.redwall.com.tw/index.php/web/products/&quot;&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;SEO行銷&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style=&quot;color: dimgrey;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;優化的網站觀察後建議：關鍵字的密度要在3%～7%左右是最佳狀態，再視排名狀況去做調整與增加文章，不要太高，也不要太低。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/4006000663651391023/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/4006000663651391023' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/4006000663651391023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/4006000663651391023'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/09/blog-post.html' title='關鍵字密度是什麼？關鍵字密度是不是越高越好？'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-1386405823546295465</id><published>2011-09-02T11:03:00.000+08:00</published><updated>2011-09-02T11:03:05.328+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="求才"/><title type='text'>人才招募：SEO Engineer</title><content type='html'>&lt;br /&gt;
Responsibilities&lt;br /&gt;
1. 製定SEO計劃並執行，包括制定關鍵指標與測量優化的方式。&lt;br /&gt;
2. 執行內部網站的追蹤/報告規劃&lt;br /&gt;
3. 提供對網頁搜索引擎優化的建議與相關技術規劃與設計（例如：標題，URL結構，內部鏈接，內容..等等）。&lt;br /&gt;
4. 定期提供SEO的報告與測試結果&lt;br /&gt;
5. 持續的研究SEO與流量分析的知識與技術&lt;br /&gt;
&lt;br /&gt;
Requirements:&lt;br /&gt;
1. 熟悉SEO 技術，並有一年以上相關經驗&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
2. 熟悉網頁技術開發 CSS, HTML, Javascript&lt;br /&gt;
3. 有使用分析工具經驗，如：Omniture, Google Analytics, Webtrends, Hitwise, ComScore&lt;br /&gt;
4. 擁有優化國際搜尋引擎與本地化搜尋引擎經驗，例如: Google, Yahoo, Yahoo Kimo, 百度&lt;br /&gt;
5. 了解搜尋排名的因素 : site maps, robots files, URL structures, crawler issues, indexing problems, algorithm changes, metadata use, SEO copywriting, link research, link building, back-link analysis, anchor link analysis, broken links, cross linking, 301 redirects, etc.&lt;br /&gt;
6. 良好的溝通技巧&lt;br /&gt;
7. 良好的資料分析能力，能分析並提出改善建議&lt;br /&gt;
8. 熟悉Microsoft Office</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/1386405823546295465/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/1386405823546295465' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/1386405823546295465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/1386405823546295465'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/09/seo-engineer.html' title='人才招募：SEO Engineer'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-2107222352778800533</id><published>2011-08-17T09:17:00.000+08:00</published><updated>2011-08-17T09:17:05.020+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SVN"/><title type='text'>記錄文章：一次向svn中增加所有新增文件 svn add all new files</title><content type='html'>&lt;blockquote&gt; &lt;span style=&quot;font-size: 18px;&quot;&gt;以下摘自：《卓有成效的程序員》之自動化&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  我經常會一次往Subversion裡添加一批文件。在使用命令行做這件事時，你必須指定所有想要添加的文件名。如果文件不多的話這還不算太糟糕，但如果 你要添加20個文件，那就費事了。當然你也可以用通配符，但這樣一來就可能匹配到已經在版本控制之下的文件(這不會有什麼損害，只不過會輸出一堆錯誤信 息，可能會跟別的錯誤信息混淆)。為瞭解決這個問題，我寫了一行簡單的bash命令：&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 18px;&quot;&gt;　　svn st | grep &#39;^\?&#39; | tr &#39;^\?&#39; &#39; &#39; | sed &#39;s/[ ]*//&#39; | sed &#39;s/[ ]/\\ /g&#39; | xargs svn add&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 18px;&quot;&gt;　　表4.3詳細解釋了這一行命令。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 18px;&quot;&gt;　&lt;img align=&quot;middle&quot; alt=&quot;&quot; src=&quot;http://hi.csdn.net/attachment/201108/10/0_131299310710LW.gif&quot; /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 18px;&quot;&gt;　　我大概花了15分鐘寫出這條命令，然後用了它成百上千次。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ****************************************************&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 18px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 這個自動化過程已經很完美了，一個「簡單」的shell腳本，這是一個權威編寫並使用了&lt;span style=&quot;font-size: 18px;&quot;&gt;百上千次&lt;/span&gt;的腳本。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 18px;&quot;&gt;然後我在一個博客中看到這樣一個腳本：&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 18px;&quot;&gt;svn st|awk &#39;{print $2}&#39;|xargs svn add。&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 18px;&quot;&gt;乍看之下覺得更加精煉，仔細看下就會發現這個腳本沒有區分文件狀態。所以完善了以下這個腳本：&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter bg_ruby&quot;&gt;&lt;div class=&quot;bar&quot;&gt;&lt;div class=&quot;tools&quot;&gt;&lt;a class=&quot;ViewSource&quot; href=&quot;http://blog.csdn.net/spare_h/article/details/6677435#&quot; title=&quot;view plain&quot;&gt;view plain&lt;/a&gt;&lt;a class=&quot;PrintSource&quot; href=&quot;http://blog.csdn.net/spare_h/article/details/6677435#&quot; title=&quot;print&quot;&gt;print&lt;/a&gt;&lt;a class=&quot;About&quot; href=&quot;http://blog.csdn.net/spare_h/article/details/6677435#&quot; title=&quot;?&quot;&gt;?&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;ol class=&quot;dp-rb&quot; start=&quot;1&quot;&gt;&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span&gt;svn&amp;nbsp;st&amp;nbsp;|&amp;nbsp;awk&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&#39;{if&amp;nbsp;(&amp;nbsp;$1&amp;nbsp;==&amp;nbsp;&quot;?&quot;)&amp;nbsp;{&amp;nbsp;print&amp;nbsp;$2}}&#39;&lt;/span&gt;&lt;span&gt;&amp;nbsp;|&amp;nbsp;xargs&amp;nbsp;svn&amp;nbsp;add&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 18px;&quot;&gt;這樣，以後我可能使用這個腳本成百上千次。(當然這個腳本也沒有考慮過濾掉不要添加的文件）&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;span style=&quot;font-size: 18px;&quot;&gt;&lt;br /&gt;
當你第三次做一件事情的時候，就應該考慮將其工具化，自動化！&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/2107222352778800533/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/2107222352778800533' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/2107222352778800533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/2107222352778800533'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/08/svn-svn-add-all-new-files.html' title='記錄文章：一次向svn中增加所有新增文件 svn add all new files'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-1918215448118022931</id><published>2011-05-03T19:42:00.001+08:00</published><updated>2011-05-03T19:43:36.704+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IPHONE"/><title type='text'>(轉載紀錄)让 iPhone App 以 https 方式连接网络</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 class=&quot;article_title&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #0088dd; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 50px;&quot;&gt;http://www.cocoachina.com/iphonedev/sdk/2010/1112/2339.html&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 class=&quot;article_title&quot; style=&quot;color: #0088dd; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 22px; line-height: 50px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;让 iPhone App 以 https 方式连接网络&lt;/h2&gt;&lt;div class=&quot;date&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 12px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;时间:&lt;span class=&quot;gray&quot; style=&quot;color: grey; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;2010-11-12 17:20&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;excerpt&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; color: #666666; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;&quot;&gt;问题 你是否也想让自己的 iPhone 应用程序连接 https 服务器呢？下面我就介绍一下其使用方法。 通常使用 Objective-C 的 NSURLConnection 连接有证明书的 https 服务器时会出现验证错误，我们可&lt;/div&gt;&lt;div id=&quot;content&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 20px; word-break: break-all; word-wrap: break-word;&quot;&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: large; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;问题&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 你是否也想让自己的 iPhone 应用程序连接 https 服务器呢？下面我就介绍一下其使用方法。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 通常使用 Objective-C 的 NSURLConnection 连接有证明书的 https 服务器时会出现验证错误，我们可以使用私有API — setAllowsAnyHTTPSCertificate:forHost 来解决这个问题。如果是 Cocoa 的应用程序应该是没有什么问题，但是用在 iPhone 上，很可能过不了 App Store 的审查。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 所以这里我们使用 libcurl 来完成在 iphone 上连接 https 服务器。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: large; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;准备&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;编译 openssl&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 连接 https 的前提是要有 OpenSSL。你可以参考&amp;nbsp;&lt;a href=&quot;http://www.therareair.com/2009/01/01/tutorial-how-to-compile-openssl-for-the-iphone/&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; target=&quot;_blank&quot;&gt;这里&lt;/a&gt;&amp;nbsp;来为 iPhone 编译 OpenSSL 静态库。最终得到下面两个静态库文件。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #339966; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;libcrypto.a&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;libssl.a&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;编译 libcurl&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 接下来我们下载/编译&amp;nbsp;&lt;a href=&quot;http://curl.haxx.se/download.html&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; target=&quot;_blank&quot;&gt;libcurl&lt;/a&gt;。下载展开后，按照下面配置(根据实际情况更改你的SDK目录，版本)。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #339966; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;./configure --prefix=$HOME/tmp/iphonelib/curl \&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --host=arm-apple-darwin --disable-shared --with-random=/dev/urandom \&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CFLAGS=&quot;-arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk -I$HOME/tmp/iphonelib/openssl/include -L$HOME/tmp/iphonelib/openssl/lib&quot; \&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp \&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 如果最后输出下面的内容，说明可以编译支持 https 的 libcurl 了。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #339966; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;SSL support:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enabled (OpenSSL)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 接下来&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #339966; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;make&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;make install&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 编译结果输出到 ~/tmp/iphonelib/curl/lib 下的 libcurl.a。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: large; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;使用&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;添加到工程中&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 如下图所示，将编译好的静态库拖到你的工程中：&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;187&quot; src=&quot;http://www.cocoachina.com/cms/uploads/allimg/101112/8_101112173954_1.png&quot; style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-top-style: none; border-top-width: 0px; cursor: pointer; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-width: 630px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; width=&quot;212&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 另外，由于 openssl 中使用了 zlib，所以还需要在工程中加入链接开关。(该库被包含在iPhone中，不需要重新编译)&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 如下图所示，在连接中追加 -lz。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;427&quot; src=&quot;http://www.cocoachina.com/cms/uploads/allimg/101112/8_101112174124_1.jpg&quot; style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-top-style: none; border-top-width: 0px; cursor: pointer; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-width: 630px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; width=&quot;500&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 最后，如下图添加编译所需的头文件路径。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;427&quot; src=&quot;http://www.cocoachina.com/cms/uploads/allimg/101112/8_101112174154_1.jpg&quot; style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-top-style: none; border-top-width: 0px; cursor: pointer; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-width: 630px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; width=&quot;500&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 比如，编译 libcurl 时的头文件的路径 ~/tmp/iphonelib/curl/include 。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: large; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;代码例子&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 下来，让我们看看在程序中使用 libcurl 的例子。下面的例子在 AppDelegate.m 中实现。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #339966; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;#import &quot;AppDelegate.h&quot;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;#include &lt;curl curl.h=&quot;&quot;&gt;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;@implementation AppDelegate&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;-(void)applicationDidFinishLaunching:(UIApplication *)application {&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Override point for customization after application launch&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [window makeKeyAndVisible];&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CURL *curl;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CURLcode res;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; curl = curl_easy_init();&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (curl) {&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curl_easy_setopt(curl, CURLOPT_URL, &quot;https://twitter.com/&quot;);&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; res = curl_easy_perform(curl);&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (0 != res) {&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fprintf(stderr, &quot;curl error: %d\n&quot;, res);&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curl_easy_cleanup(curl);&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;-(void)dealloc {&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [window release];&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [super dealloc];&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;}&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;@end&lt;/curl&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 编译运行，可以用调试工具得到取得的html，如下图。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;392&quot; src=&quot;http://www.cocoachina.com/cms/uploads/allimg/101112/8_101112174352_1.jpg&quot; style=&quot;border-bottom-style: none; border-bottom-width: 0px; border-color: initial; border-left-style: none; border-left-width: 0px; border-right-style: none; border-right-width: 0px; border-top-style: none; border-top-width: 0px; cursor: pointer; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-width: 630px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: middle;&quot; width=&quot;500&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: large; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;在模拟器中使用 libcurl&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 上面介绍的都是在设备上运行的例子，如果要在模拟器上使用，由于处理器结构不一样，需要重新编译 openssl 和 curl 静态库。编译的时候，只要将 SDK 的路径由 iPhoneOS.platform ⇒ iPhoneSimulator.platform，编译开关 -arch armv6 ⇒ -arch i386 就可以了。只是编译的文件名最好和iphone上用的区别开来，如下所示：&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;color: #339966; font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;libcrypto_simulator.a&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;libssl_simulator.a&lt;br style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;libcurl_simulator.a&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 又或者不改变库的名称，而是增加新的编译目标。&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; font-size: 14px; line-height: 1.8; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: right;&quot;&gt;&lt;strong style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;转自&amp;nbsp;&lt;/strong&gt;&lt;a href=&quot;http://www.yifeiyang.net/iphone-web-development-skills-of-the-article-5-https-server-using-libcurl-to-connect/&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; target=&quot;_blank&quot;&gt;&lt;strong style=&quot;font-family: &#39;Lucida Grande&#39;, Geneva, Arial, Verdana, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;http://www.yifeiyang.net/iphone-web-development-skills-of-the-article-5-https-server-using-libcurl-to-connect/&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/1918215448118022931/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/1918215448118022931' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/1918215448118022931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/1918215448118022931'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/05/iphone-app-https.html' title='(轉載紀錄)让 iPhone App 以 https 方式连接网络'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-1333918985497246797</id><published>2011-03-30T15:52:00.000+08:00</published><updated>2011-03-30T15:52:01.807+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="UML"/><title type='text'>UML 基本图示[轉貼]</title><content type='html'>&lt;div class=&quot;tit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://hiphotos.baidu.com/yiwanqiushui/pic/item/db42d551b4d80d7c1138c2be.jpeg); background-origin: initial; background-repeat: no-repeat no-repeat; border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-style: solid; border-left-width: 0px; border-right-style: solid; border-right-width: 0px; border-top-style: solid; border-top-width: 0px; color: #254c51; filter: none; font-family: Georgia; font-size: 16px; font-weight: bold; height: 20px; line-height: 15px; overflow-x: hidden; overflow-y: hidden; padding-top: 4px; text-indent: 20px; visibility: visible !important; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;UML 基本图示&lt;/div&gt;&lt;div class=&quot;date&quot; style=&quot;color: #254c51; filter: none; font-family: Arial; font-size: 12px; line-height: 18px; visibility: visible !important; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;2009-07-11 17:58&lt;/div&gt;&lt;table style=&quot;color: #254c51; font-family: Arial; font-size: 12px; line-height: 18px; table-layout: fixed; width: 900px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;color: #254c51; filter: none; font-family: Arial; font-size: 12px; line-height: 18px; visibility: visible !important; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;div class=&quot;cnt&quot; id=&quot;blog_text&quot; style=&quot;color: #254c51; filter: none; font-family: Arial; font-size: 12px; line-height: 18px; overflow-x: hidden; overflow-y: hidden; position: static; visibility: visible !important; word-break: normal; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;div class=&quot;tit&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://hiphotos.baidu.com/yiwanqiushui/pic/item/db42d551b4d80d7c1138c2be.jpeg); background-origin: initial; background-position: initial initial; background-repeat: no-repeat no-repeat; border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-left-style: solid; border-left-width: 0px; border-right-style: solid; border-right-width: 0px; border-top-style: solid; border-top-width: 0px; color: #254c51; filter: none; font-family: Georgia; font-size: 18px; font-weight: bold; height: 20px; line-height: normal; overflow-x: hidden; overflow-y: hidden; padding-top: 4px; text-decoration: none; text-indent: 20px; visibility: visible !important; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;UML 基本图速查---类图. 对象图. 用例图 .参与者. 依赖关系. 泛化/继承关系. 关联.....&lt;/div&gt;&lt;div class=&quot;date&quot; style=&quot;color: #254c51; filter: none; font-family: Arial; font-size: 18px; line-height: normal; text-decoration: none; visibility: visible !important; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;/div&gt;&lt;table style=&quot;line-height: normal; table-layout: fixed;&quot;&gt;&lt;tbody style=&quot;line-height: normal;&quot;&gt;
&lt;tr style=&quot;line-height: normal;&quot;&gt;&lt;td style=&quot;color: #254c51; filter: none; font-family: Arial; font-size: 12px; line-height: normal; visibility: visible !important; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;div class=&quot;cnt&quot; style=&quot;color: #254c51; filter: none; font-family: Arial; font-size: 18px; line-height: normal; overflow-x: hidden; overflow-y: hidden; position: static; text-decoration: none; visibility: visible !important; word-break: normal; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;div class=&quot;postTitle&quot; style=&quot;color: #254c51; filter: none; font-family: Arial; font-size: 18px; line-height: normal; text-decoration: none; visibility: visible !important; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;a class=&quot;postTitle2&quot; href=&quot;http://www.cnblogs.com/christan/archive/2008/04/11/1145571.html&quot; style=&quot;color: #254c51; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 12px; line-height: normal; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: #646464; line-height: normal;&quot;&gt;UML图示&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;strong style=&quot;line-height: normal;&quot;&gt;UML 类图. 对象图. 接口图. 用例图 .包,参与者. 依赖关系. 泛化/继承关系. 关联关系 .聚合/聚集关系. 实现关系 组合关系。&lt;/strong&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 style=&quot;line-height: normal;&quot;&gt;结构元素&lt;/h4&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;结构元素包括，类，对象，接口，用例，参与者。&lt;/div&gt;&lt;h5 style=&quot;line-height: normal;&quot;&gt;类图&lt;/h5&gt;&lt;div class=&quot;floatLPic&quot; style=&quot;color: #254c51; filter: none; font-family: Arial; font-size: 18px; line-height: normal; text-decoration: none; visibility: visible !important; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.cnblogs.com/images/cnblogs_com/christan/class.jpg&quot; style=&quot;line-height: normal;&quot; /&gt;&lt;br style=&quot;line-height: normal;&quot; /&gt;类图图示&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 类图是UML中最基本的元素了吧？根据OO的思想“天下一切皆对象”，而类是对象的抽象。&amp;nbsp;&lt;br style=&quot;line-height: normal;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 左侧图示为一个类图。顶端“ClassName”表示类名&amp;nbsp;&lt;br style=&quot;line-height: normal;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 中间部分为该类的属性，其中分别表示为可访问性，属性名，以及属性的数据类型。&amp;nbsp;&lt;br style=&quot;line-height: normal;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 第三部分为该类的方法，包括方法的可访问性，方法名，方法的参数以及方法的返回值。&amp;nbsp;&lt;br style=&quot;line-height: normal;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 需要说明的是：&lt;/div&gt;&lt;ul style=&quot;line-height: normal;&quot;&gt;&lt;il style=&quot;line-height: normal;&quot;&gt;&lt;/il&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “#”表示protected&amp;nbsp;&lt;br style=&quot;line-height: normal;&quot; /&gt;&lt;il style=&quot;line-height: normal;&quot;&gt;&lt;/il&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “+”表示Public&lt;br style=&quot;line-height: normal;&quot; /&gt;&lt;il style=&quot;line-height: normal;&quot;&gt;&lt;/il&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “-”表示private&lt;br style=&quot;line-height: normal;&quot; /&gt;&lt;il style=&quot;line-height: normal;&quot;&gt;&lt;/il&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; “i”表示internal&lt;/ul&gt;&lt;div class=&quot;floatRPic&quot; style=&quot;color: #254c51; filter: none; font-family: Arial; font-size: 18px; line-height: normal; text-decoration: none; visibility: visible !important; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;81&quot; src=&quot;http://www.cnblogs.com/images/cnblogs_com/christan/Obj.jpg&quot; style=&quot;line-height: normal;&quot; width=&quot;96&quot; /&gt;&lt;br style=&quot;line-height: normal;&quot; /&gt;对象图图示&lt;/div&gt;&lt;h5 style=&quot;line-height: normal;&quot;&gt;对象图&lt;/h5&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;右侧图示为一对象图，该对象为类className类的一个实例对象&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;该图第一部分说明了该对象为className的一个实例，第二部分指定了该实例的属性值。该图指定的是一个特殊的实例的对象，如果要代表className的所有的对象可省略掉对象名，即为“:ClassName”。&lt;/div&gt;&lt;h5 style=&quot;line-height: normal;&quot;&gt;接口&lt;/h5&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;floatLPic&quot; style=&quot;color: #254c51; filter: none; font-family: Arial; font-size: 18px; line-height: normal; text-decoration: none; visibility: visible !important; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.cnblogs.com/images/cnblogs_com/christan/Interface.jpg&quot; style=&quot;line-height: normal;&quot; /&gt;&lt;br style=&quot;line-height: normal;&quot; /&gt;类图图示&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;左图为一个比较简单的接口事例图示。与类图差不多，该图示分为三部分，第一部分为接口名，为了更明确的标明其“接口”的身份通常以“I”开头。第二部分为属性，第三部分为方法。&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;/div&gt;&lt;h5 style=&quot;line-height: normal;&quot;&gt;用例与参与者&lt;/h5&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;下图为一简单的用例视图。小人表示参与者，而椭圆表示的是用例。&lt;/div&gt;&lt;div style=&quot;border-bottom-color: teal; border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: teal; border-left-style: dotted; border-left-width: 1px; border-right-color: teal; border-right-style: dotted; border-right-width: 1px; border-top-color: teal; border-top-style: dotted; border-top-width: 1px; color: teal; filter: none; font-family: Arial; font-size: 9pt; line-height: normal; text-align: center; text-decoration: none; visibility: visible !important; width: 115px; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.cnblogs.com/images/cnblogs_com/christan/Case.jpg&quot; style=&quot;line-height: normal;&quot; /&gt;&lt;br style=&quot;line-height: normal;&quot; /&gt;用例与参与者图示&lt;/div&gt;&lt;div class=&quot;floatRPic&quot; style=&quot;color: #254c51; filter: none; font-family: Arial; font-size: 18px; line-height: normal; text-decoration: none; visibility: visible !important; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;69&quot; src=&quot;http://www.cnblogs.com/images/cnblogs_com/christan/Packbag.jpg&quot; style=&quot;height: 69px; line-height: normal; width: 88px;&quot; width=&quot;88&quot; /&gt;&lt;br style=&quot;line-height: normal;&quot; /&gt;包图图示&lt;/div&gt;&lt;h5 style=&quot;line-height: normal;&quot;&gt;包&lt;/h5&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;右侧图示为一包图，该图示为一名称为Utility的工具包。&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;包用来组织类，被包含在包里的类一般通过如Utility::StrUtility的形式来反应该类的路径。&lt;/div&gt;&lt;h4 style=&quot;line-height: normal;&quot;&gt;关系&lt;/h4&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 关系元素包括了聚集，组成，实现，继承，依赖，关联等。&lt;/div&gt;&lt;h5 style=&quot;line-height: normal;&quot;&gt;关联&lt;/h5&gt;&lt;div style=&quot;border-bottom-color: teal; border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: teal; border-left-style: dotted; border-left-width: 1px; border-right-color: teal; border-right-style: dotted; border-right-width: 1px; border-top-color: teal; border-top-style: dotted; border-top-width: 1px; color: teal; filter: none; font-family: Arial; font-size: 9pt; line-height: normal; text-align: center; text-decoration: none; visibility: visible !important; width: 115px; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;127&quot; src=&quot;http://www.cnblogs.com/images/cnblogs_com/christan/guanlian.jpg&quot; style=&quot;line-height: normal;&quot; width=&quot;313&quot; /&gt;&lt;br style=&quot;line-height: normal;&quot; /&gt;关联图示&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 关联是类之间的联系，如篮球队员与球队之间的关联（下图所示）。其中，关联两边的&quot;employee&quot;和“employer”标示了两者之间的关系，而数字表示两者的关系的限制，是关联两者之间的多重性。通常有“*”（表示所有，不限），“1”（表示有且仅有一个），“0...”（表示0个或者多个），“0，1”（表示0个或者一个），“n...m”(表示n到m个都可以),“m...*”（表示至少m个）。&lt;br style=&quot;line-height: normal;&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 在关联中有一种叫“限定关联”，还有一种谓之自身关联。另外，对象之间的关联就没那么复杂，只是将类的关联实例化而已。&lt;/div&gt;&lt;h5 style=&quot;line-height: normal;&quot;&gt;依赖&lt;/h5&gt;&lt;div style=&quot;border-bottom-color: teal; border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: teal; border-left-style: dotted; border-left-width: 1px; border-right-color: teal; border-right-style: dotted; border-right-width: 1px; border-top-color: teal; border-top-style: dotted; border-top-width: 1px; color: teal; filter: none; font-family: Arial; font-size: 9pt; line-height: normal; text-align: center; text-decoration: none; visibility: visible !important; width: 115px; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;116&quot; src=&quot;http://www.cnblogs.com/images/cnblogs_com/christan/ylai.jpg&quot; style=&quot;line-height: normal;&quot; width=&quot;331&quot; /&gt;&lt;br style=&quot;line-height: normal;&quot; /&gt;依赖图示&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;依赖是表示一个类中使用了另外一个类，最常用的依赖是在类A的方法中使用了类B，那么A依赖B。如上图所示。&lt;/div&gt;&lt;h5 style=&quot;line-height: normal;&quot;&gt;继承&lt;/h5&gt;&lt;div style=&quot;border-bottom-color: teal; border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: teal; border-left-style: dotted; border-left-width: 1px; border-right-color: teal; border-right-style: dotted; border-right-width: 1px; border-top-color: teal; border-top-style: dotted; border-top-width: 1px; color: teal; filter: none; font-family: Arial; font-size: 9pt; line-height: normal; text-align: center; text-decoration: none; visibility: visible !important; width: 115px; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;86&quot; src=&quot;http://www.cnblogs.com/images/cnblogs_com/christan/jchen.jpg&quot; style=&quot;line-height: normal;&quot; width=&quot;270&quot; /&gt;&lt;br style=&quot;line-height: normal;&quot; /&gt;继承图示&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;这里的继承是指子类对父类的关系。理解面向对象的各位对继承应该不陌生。啥也不说，看看图好了。&lt;br style=&quot;line-height: normal;&quot; /&gt;继承使用空心箭头表示继承的方向，用实线连接。&lt;/div&gt;&lt;h5 style=&quot;line-height: normal;&quot;&gt;实现&lt;/h5&gt;&lt;div style=&quot;border-bottom-color: teal; border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: teal; border-left-style: dotted; border-left-width: 1px; border-right-color: teal; border-right-style: dotted; border-right-width: 1px; border-top-color: teal; border-top-style: dotted; border-top-width: 1px; color: teal; filter: none; font-family: Arial; font-size: 9pt; line-height: normal; text-align: center; text-decoration: none; visibility: visible !important; width: 115px; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;91&quot; src=&quot;http://www.cnblogs.com/images/cnblogs_com/christan/shixian.jpg&quot; style=&quot;line-height: normal;&quot; width=&quot;273&quot; /&gt;&lt;br style=&quot;line-height: normal;&quot; /&gt;实现图示&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;实现指的是类对接口的实现。接口实现的表示与继承的表示差不多，只是将实线变为了虚线。&lt;/div&gt;&lt;h5 style=&quot;line-height: normal;&quot;&gt;聚集&lt;/h5&gt;&lt;div style=&quot;border-bottom-color: teal; border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: teal; border-left-style: dotted; border-left-width: 1px; border-right-color: teal; border-right-style: dotted; border-right-width: 1px; border-top-color: teal; border-top-style: dotted; border-top-width: 1px; color: teal; filter: none; font-family: Arial; font-size: 9pt; line-height: normal; text-align: center; text-decoration: none; visibility: visible !important; width: 115px; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;251&quot; src=&quot;http://www.cnblogs.com/images/cnblogs_com/christan/juji.jpg&quot; style=&quot;line-height: normal;&quot; width=&quot;490&quot; /&gt;&lt;br style=&quot;line-height: normal;&quot; /&gt;聚集图示&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;一个类可能有几个部分类聚集在一起而成。如：电脑主机由CPU，主板，光驱....等组成。类与类之间是“整体-部分”的关系。&lt;/div&gt;&lt;h5 style=&quot;line-height: normal;&quot;&gt;组合&lt;/h5&gt;&lt;div style=&quot;border-bottom-color: teal; border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: teal; border-left-style: dotted; border-left-width: 1px; border-right-color: teal; border-right-style: dotted; border-right-width: 1px; border-top-color: teal; border-top-style: dotted; border-top-width: 1px; color: teal; filter: none; font-family: Arial; font-size: 9pt; line-height: normal; text-align: center; text-decoration: none; visibility: visible !important; width: 115px; word-break: break-all; word-wrap: break-word; zoom: 1 !important;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;195&quot; src=&quot;http://www.cnblogs.com/images/cnblogs_com/christan/zucheng.jpg&quot; style=&quot;line-height: normal;&quot; width=&quot;321&quot; /&gt;&lt;br style=&quot;line-height: normal;&quot; /&gt;组成图示&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;组成是强类型的聚集，每个部分体只能属于一个整体。如桌子由桌腿和桌面组成。&lt;br style=&quot;line-height: normal;&quot; /&gt;----------------------------------------------------------------------------------------------------------------------------------&lt;br style=&quot;line-height: normal;&quot; /&gt;以上为UML的基本元素的一些表示法，主要目的是供查阅。&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/1333918985497246797/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/1333918985497246797' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/1333918985497246797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/1333918985497246797'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/03/uml.html' title='UML 基本图示[轉貼]'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-1895741217736259181</id><published>2011-03-23T10:56:00.001+08:00</published><updated>2011-03-23T10:56:32.275+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>HTC 手機重設方式(Reset)</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Verdana; font-size: 14px; line-height: 19px;&quot;&gt;在手機關機的情況下，按住調低音量鍵，然後快速按下電源鍵。&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Verdana; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Verdana; font-size: 14px; line-height: 19px;&quot;&gt;等待畫面上出現 3 個 Android 影像，然後放開調低音量鍵。&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Verdana; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Verdana; font-size: 14px; line-height: 19px;&quot;&gt;按下調低音量鍵，選取清理磁碟空間，然後按下電源鍵。&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Verdana; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br style=&quot;word-wrap: break-word;&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Verdana; font-size: 14px; line-height: 19px;&quot;&gt;按下調低音量鍵，開始執行出廠重設。&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/1895741217736259181/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/1895741217736259181' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/1895741217736259181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/1895741217736259181'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/03/htc-reset.html' title='HTC 手機重設方式(Reset)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-315067286426759406</id><published>2011-03-22T16:56:00.000+08:00</published><updated>2011-03-22T16:56:50.711+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IPHONE"/><title type='text'>UIActivityIndicatorView : WaitView implementation</title><content type='html'>&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;Header file&amp;nbsp;--------------------------------------------------&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&amp;nbsp; WaitView.h&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&amp;nbsp; UIActivityIndicatorView&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&amp;nbsp; Created by Lin, Justin on 2011/3/22.&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&amp;nbsp; Copyright 2011 __MyCompanyName__. All rights reserved.&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #d62b24; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: #7a482f;&quot;&gt;#import &lt;/span&gt;&lt;foundation/foundation.h&gt;&lt;/foundation/foundation.h&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;@interface&lt;/span&gt; WaitView : NSObject {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #7340a3; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;UIActivityIndicatorView&lt;span style=&quot;color: black;&quot;&gt; *&lt;/span&gt;&lt;span style=&quot;color: #4b8186;&quot;&gt;activityIndicator&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;-(&lt;span style=&quot;color: #bf2e9d;&quot;&gt;void&lt;/span&gt;) endWait;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #bf2e9d;&quot;&gt;void&lt;/span&gt;) beginWait;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #bf2e9d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;@end&lt;/div&gt;&lt;div style=&quot;color: #bf2e9d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #008326; font-family: Menlo; font-size: 11px;&quot;&gt;Source file&amp;nbsp;--------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #008326; font-family: Menlo; font-size: 11px;&quot;&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&amp;nbsp; WaitView.m&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&amp;nbsp; UIActivityIndicatorView&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&amp;nbsp; Created by Lin, Justin on 2011/3/22.&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&amp;nbsp; Copyright 2011 __MyCompanyName__. All rights reserved.&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;//&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #d62b24; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: #7a482f;&quot;&gt;#import &lt;/span&gt;&quot;WaitView.h&quot;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;@interface&lt;/span&gt; WaitView(PrivateMethods)&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #7340a3;&quot;&gt;UIView&lt;/span&gt; *) mainWindow;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #bf2e9d;&quot;&gt;void&lt;/span&gt;) startWaitAnimation;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #bf2e9d;&quot;&gt;void&lt;/span&gt;) stopWaitAnimation;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #bf2e9d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;@end&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #bf2e9d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;@implementation&lt;span style=&quot;color: black;&quot;&gt; WaitView&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #7340a3;&quot;&gt;UIView&lt;/span&gt; *) mainWindow {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #3f217c; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; [[[&lt;/span&gt;&lt;span style=&quot;color: #7340a3;&quot;&gt;UIApplication&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;sharedApplication&lt;span style=&quot;color: black;&quot;&gt;] &lt;/span&gt;windows&lt;span style=&quot;color: black;&quot;&gt;] &lt;/span&gt;objectAtIndex&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #2832cf;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #bf2e9d;&quot;&gt;void&lt;/span&gt;) startWaitAnimation {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #4b8186; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; (&lt;/span&gt;activityIndicator&lt;span style=&quot;color: black;&quot;&gt; != &lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #bf2e9d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;return&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3f217c; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #4b8186;&quot;&gt;activityIndicator&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; = [[&lt;/span&gt;&lt;span style=&quot;color: #7340a3;&quot;&gt;UIActivityIndicatorView&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;alloc&lt;span style=&quot;color: black;&quot;&gt;] &lt;/span&gt;initWithActivityIndicatorStyle&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;UIActivityIndicatorViewStyleGray&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3f217c; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #4b8186;&quot;&gt;activityIndicator&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;setFrame&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;CGRectMake&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2832cf;&quot;&gt;135&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #2832cf;&quot;&gt;125&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #2832cf;&quot;&gt;24&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #2832cf;&quot;&gt;24&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;)];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3f217c; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #4b8186;&quot;&gt;activityIndicator&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;setHidesWhenStopped&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;YES&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #4b8186; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[[&lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #2e595d;&quot;&gt;mainWindow&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;color: #3f217c;&quot;&gt;addSubview&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;activityIndicator&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #4b8186; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[&lt;/span&gt;activityIndicator&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3f217c;&quot;&gt;startAnimating&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #bf2e9d;&quot;&gt;void&lt;/span&gt;) stopWaitAnimation {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #4b8186; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; (&lt;/span&gt;activityIndicator&lt;span style=&quot;color: black;&quot;&gt; == &lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;) {&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #bf2e9d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;return&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #4b8186; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[&lt;/span&gt;activityIndicator&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #3f217c;&quot;&gt;stopAnimating&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3f217c; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;[&lt;/span&gt;&lt;span style=&quot;color: #4b8186;&quot;&gt;activityIndicator&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;removeFromSuperview&lt;span style=&quot;color: black;&quot;&gt;];&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #4b8186; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;activityIndicator&lt;span style=&quot;color: black;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;-(&lt;span style=&quot;color: #bf2e9d;&quot;&gt;void&lt;/span&gt;) endWait {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// stop thread&lt;/div&gt;&lt;div style=&quot;color: #3f217c; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; [&lt;/span&gt;&lt;span style=&quot;color: #7340a3;&quot;&gt;NSThread&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;detachNewThreadSelector&lt;span style=&quot;color: black;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;@selector&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2e595d;&quot;&gt;stopWaitAnimation&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;) &lt;/span&gt;toTarget&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;withObject&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;- (&lt;span style=&quot;color: #bf2e9d;&quot;&gt;void&lt;/span&gt;) beginWait {&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #008326; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;// start thread&lt;/div&gt;&lt;div style=&quot;color: #3f217c; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; [&lt;/span&gt;&lt;span style=&quot;color: #7340a3;&quot;&gt;NSThread&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;detachNewThreadSelector&lt;span style=&quot;color: black;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;@selector&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #2e595d;&quot;&gt;startWaitAnimation&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;) &lt;/span&gt;toTarget&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;withObject&lt;span style=&quot;color: black;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color: #bf2e9d;&quot;&gt;nil&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;];&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px; min-height: 13.0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: #bf2e9d; font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 0.0px;&quot;&gt;@end&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/315067286426759406/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/315067286426759406' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/315067286426759406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/315067286426759406'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/03/uiactivityindicatorview-waitview.html' title='UIActivityIndicatorView : WaitView implementation'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-3860768872603657512</id><published>2011-03-21T18:47:00.000+08:00</published><updated>2011-03-21T18:47:21.801+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>[轉貼] JavaScript Touch and Gesture Events iPhone and Android</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: #333333; font-family: Trebuchet, &#39;Trebuchet MS&#39;, Arial, sans-serif; font-size: 16px; font-weight: bold; line-height: 1.1em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;JavaScript Touch and Gesture Events iPhone and Android&lt;/h3&gt;&lt;div class=&quot;post-header&quot; style=&quot;color: #333333; font-family: Trebuchet, &#39;Trebuchet MS&#39;, Arial, sans-serif; font-size: 13px; line-height: 1.3em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div class=&quot;post-header-line-1&quot; style=&quot;line-height: 1.3em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Trebuchet, &#39;Trebuchet MS&#39;, Arial, sans-serif; font-size: 13px; line-height: 1.3em; margin-bottom: 0.75em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;There are quite a few sites that describe the touch and gesture events that can be used in the mobile version of WebKit running on iPhone and iPod Touch. There is, however, not so much info with regards to Android. I&#39;ve placed a few links at the bottom of this article that contain information used to compile this brief explanation.&lt;br /&gt;
Touch events are a bit like mouse events, but there are some very important differences when it comes to touch vs. mouse:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;A touch is very hard to keep steady whilst a mouse can stay at a fixed position - this means that we go from a touchStart event directly to a touchMove event. Unlike a mouse where a mouseDown event is likely to fire without being followed up by a mouseMove event.&lt;/li&gt;
&lt;li&gt;There is no mouseOver equivalent since a touch can be discontinuous, i.e., we can get from point A to point B without the need of drawing a continuous line between these points.&lt;/li&gt;
&lt;li&gt;A touch is an averaged point taken from the surface area in contact with the pointing device (your finger) translated to pixel coordinates - like finding the centre of a circle. A mouse is very precise and there is no averaging that needs to be done. What I&#39;m trying to say is that a touch is not as accurate as a mouse.&lt;/li&gt;
&lt;/ul&gt;&lt;h3 style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Android and iPhone touch events&lt;/h3&gt;Android and iPhone versions of WebKit have some touch events in common:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;touchstart&lt;/strong&gt;&amp;nbsp;- triggered when a touch is initiated. Mouse equivalent - mouseDown&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;touchmove&lt;/strong&gt;&amp;nbsp;- triggered when a touch moves. Mouse equivalent - mouseMove&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;touchend&lt;/strong&gt;&amp;nbsp;- triggered when a touch ends. Mouse equivalent - mouseUp. This one is a bit special on the iPhone - see below&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;touchcancel&lt;/strong&gt;&amp;nbsp;- bit of a mystery&lt;/li&gt;
&lt;/ul&gt;Example:&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;touchstart&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; alert&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;touches&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;h4&gt;The Event object&lt;/h4&gt;As you may have noticed above, the event object contains an array called touches (in Androids case, the event object also containes a touch object - at this stage, touches has always a length of 1 in Android so event.touches[0] === event.touch). The touches array is Apples way of handling multi-touch events - but more on that later.&lt;br /&gt;
A touch object contains pretty much the same data as a mouse event such as pageX, pageY etc...&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;touchmove&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;preventDefault&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; touch &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;touches&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;];&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&quot;Touch x:&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; touch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;pageX &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&quot;, y:&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; touch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;pageY&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;h4&gt;What about a click?&lt;/h4&gt;mouseClick events are triggered after a touchStart, touchEnd event sequence. A reason for mouseClick events not triggering can be that the event propagates further and a touchMove being initiated - this will cancel the mouseClick event sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;iPhone Touch and Gesture Events&lt;/h3&gt;&lt;br /&gt;
Apples WebKit implementation has a few things that are different from the Android implementation. The touchEnd event removes the current touch from the&amp;nbsp;&lt;code&gt;event.touches&amp;nbsp;&lt;/code&gt;array. Instead, we have to look inside the event.changedTouches array.&lt;br /&gt;
&lt;h4&gt;Apples event object for touch events&lt;/h4&gt;The event object contains the following arrays:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;touches&lt;/strong&gt;&amp;nbsp;- contains touch information upon touchStart and touchMove not touchEnd events&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;targetTouches&lt;/strong&gt;&amp;nbsp;- contains information for touches originating from the same target element&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;changedTouches&lt;/strong&gt;&amp;nbsp;- contains touch information upon all touch events&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Gesture events&lt;/h4&gt;Apple supports gestures which are mult-touch events such as &quot;pinching&quot; and &quot;rotating&quot;:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;strong&gt;gesturestart&lt;/strong&gt;&amp;nbsp;- triggered when initiating a multi-touch event&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;gesturechange&lt;/strong&gt;&amp;nbsp;- triggered when multiple touches move&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;gestureend&lt;/strong&gt;&amp;nbsp;- triggered when a multi-touch event ends&lt;/li&gt;
&lt;/ul&gt;The event object for gesture events looks very different. It contains scale and rotation values and no touch objects.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&#39;gesturechange&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;preventDefault&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
&amp;nbsp; &amp;nbsp; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&quot;Scale: &quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;scale &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;color: #008800;&quot;&gt;&quot;, Rotation: &quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;rotation&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;h3 style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Event table&lt;/h3&gt;&lt;table&gt;&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;touchstart&lt;/th&gt;&lt;th&gt;touchmove&lt;/th&gt;&lt;th&gt;touchend&lt;/th&gt;&lt;th&gt;gesturestart&lt;/th&gt;&lt;th&gt;gesturemove&lt;/th&gt;&lt;th&gt;gestureend&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Android&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;n&lt;/td&gt;&lt;td&gt;n&lt;/td&gt;&lt;td&gt;n&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;iPhone&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;has event.touches&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;n&lt;/td&gt;&lt;td&gt;n&lt;/td&gt;&lt;td&gt;n&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(iPhone) has event.scale and event.rotation&lt;/td&gt;&lt;td&gt;n&lt;/td&gt;&lt;td&gt;n&lt;/td&gt;&lt;td&gt;n&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(iPhone) touch in event.touches&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;n&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(iPhone) touch in event.changedTouches&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;y&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;h3 style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Links&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://developer.apple.com/safari/library/documentation/appleapplications/reference/SafariWebContent/HandlingEvents/HandlingEvents.html&quot; style=&quot;color: #336699;&quot;&gt;ADC Safari Reference Library&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.sitepen.com/blog/2008/07/10/touching-and-gesturing-on-the-iphone/&quot; style=&quot;color: #336699;&quot;&gt;sitepen: Touching and Gesturing on the iPhone&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://phonegap.com/&quot; style=&quot;color: #336699;&quot;&gt;(like) AIR for iPhone / Android / Blackberry&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://rakaz.nl/2009/09/iphone-webapps-101-getting-safari-out-of-the-way.html&quot; style=&quot;color: #336699;&quot;&gt;iPhone Webapps 101&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/iui/&quot; style=&quot;color: #336699;&quot;&gt;iUI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dl.dropbox.com/u/2746641/Presentations/webkit_webapps.pdf&quot; style=&quot;color: #336699;&quot;&gt;My slides&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/3860768872603657512/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/3860768872603657512' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/3860768872603657512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/3860768872603657512'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/03/javascript-touch-and-gesture-events.html' title='[轉貼] JavaScript Touch and Gesture Events iPhone and Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-501181583021313798</id><published>2011-03-03T11:24:00.001+08:00</published><updated>2011-03-03T11:24:39.634+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IPHONE"/><title type='text'>7-11 賬單條碼規則</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Pmingliu, Verdana; font-size: 12px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 20px;&quot;&gt;&lt;b style=&quot;line-height: 20px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 14pt; line-height: 32px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;代收服務之電腦條碼及安全機制&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;※條碼品質及規則：&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: -36pt;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;一、&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;第一段條碼固定為&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;9&lt;/span&gt;碼，前&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;6&lt;/span&gt;碼為代收期限，後&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;3&lt;/span&gt;碼&lt;/span&gt;為代收代號&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: -36pt;&quot;&gt;&lt;span style=&quot;line-height: 32px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;二、&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;strong style=&quot;font-weight: bold; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;條碼固定為&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;Code39&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;碼&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;，品質為C&lt;/span&gt;&lt;/span&gt;級以上，由&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;7-11&lt;/span&gt;&lt;/span&gt;行銷作業人員檢測通過&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: -36pt;&quot;&gt;&lt;span style=&quot;line-height: 32px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;三、&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;strong style=&quot;font-weight: bold; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;各段條碼由上而下依序排列，條碼間距請至少保留&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;0.6&lt;/span&gt;公分，左右間距的空白長度一般為「&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;X&lt;/span&gt;」&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;dimension&lt;/span&gt;的&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;10&lt;/span&gt;&lt;/span&gt;倍寬或&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;1/4&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;英吋&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;，建議以約2&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;公分&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;為主。&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: -36pt;&quot;&gt;&lt;span style=&quot;line-height: 32px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;四、&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;strong style=&quot;font-weight: bold; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;條碼長度不可超過&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;6.2&lt;/span&gt;公分，英數字位數不超過&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;20&lt;/span&gt;位，條碼高度建議在&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;0.8&lt;/span&gt;公分至&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;1.4&lt;/span&gt;公分左右，建議條碼寬窄比&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;2:5&lt;/span&gt;&lt;/span&gt;及印刷寬度愈大愈好。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: -36pt;&quot;&gt;&lt;span style=&quot;line-height: 32px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;五、&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;strong style=&quot;font-weight: bold; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;避免列印條碼為彩色或淺色系顏色，背景色&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;(&lt;/span&gt;建議為白色空白&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;與條碼及空白間顏色的對比需明顯&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: -36pt;&quot;&gt;&lt;span style=&quot;line-height: 32px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;六、&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;strong style=&quot;font-weight: bold; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;條碼前後需加起始字元&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;及結束字元&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: -36pt;&quot;&gt;&lt;span style=&quot;line-height: 32px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;七、&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;strong style=&quot;font-weight: bold; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;條碼區請加印「統一超商專用條碼區」以利辨視&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: -36pt;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;八、&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;strong style=&quot;font-weight: bold; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;2-3&lt;/span&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;段條碼欄位內容，英數字及長度依各代收項目規格設定&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: -36pt;&quot;&gt;&lt;span style=&quot;line-height: 32px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;九、&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;strong style=&quot;font-weight: bold; line-height: 15px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;條碼檢查碼計算方式依所指定公式計算。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 32px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: small; line-height: normal;&quot;&gt;&lt;b style=&quot;line-height: 27px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 14pt; line-height: 32px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;Barcode&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;line-height: 27px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 14pt; line-height: 32px;&quot;&gt;：三段式條碼&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;line-height: 20px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 14pt; line-height: 32px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: small; line-height: normal;&quot;&gt;&amp;nbsp;(9+16+15)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;第一段&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(9)&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;繳費期限&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;yymmdd (6) +&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;代收項目&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;XXX(3)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;第二段&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(16)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;業者自行訂定&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&amp;nbsp;(16)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;第三段&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(15)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;應繳日期&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;mmdd (4) +&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;檢碼&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(2) +&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;應繳金額&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(9)&lt;br style=&quot;line-height: 22px;&quot; /&gt;ps: 1.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;檢碼為&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;”&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;檢查碼公式一&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;二碼&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;之校對碼公式&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;)”&lt;br style=&quot;line-height: 22px;&quot; /&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;2.yymm&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;為民國年月&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;br style=&quot;line-height: 20px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;3.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;帳單之唯一性以第二段條碼為依據&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;繳費證明單上查詢依據&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;)&lt;br style=&quot;line-height: 22px;&quot; /&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;4.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;第二段條碼不足位數者，由位數小者補&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 14pt; line-height: 32px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;5.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;請說明第二段條碼編碼原則&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 14pt; line-height: 32px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;校對碼計算：&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: bottom;&quot;&gt;&lt;b style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: small; line-height: normal;&quot;&gt;附件&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small; line-height: normal;&quot;&gt;&lt;b style=&quot;line-height: 27px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 27px;&quot;&gt;校對碼公式一&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 27px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;line-height: 27px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 27px;&quot;&gt;二碼&lt;/span&gt;&lt;/b&gt;&lt;b style=&quot;line-height: 27px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 27px;&quot;&gt;校對碼的公式&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 27px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: bottom;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;(1).Barcode&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;中金額欄位之前二字元為全部條碼之檢查碼&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: bottom;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;(2)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;若&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;Barcode&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;中有文字型態資料&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;則將其轉換成數值後計算&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: bottom;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;轉換&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;Table&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-bottom-color: initial; border-bottom-style: none; border-bottom-width: medium; border-collapse: collapse; border-left-color: initial; border-left-style: none; border-left-width: medium; border-right-color: initial; border-right-style: none; border-right-width: medium; border-top-color: initial; border-top-style: none; border-top-width: medium; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;tbody style=&quot;line-height: 20px;&quot;&gt;
&lt;tr style=&quot;line-height: 20px;&quot;&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;字母&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ａ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｂ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｃ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｄ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｅ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｆ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｇ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｈ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #ccffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｉ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｊ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｋ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｌ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｍ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｎ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｏ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｐ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｑ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #ccffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｒ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｓ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｔ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｕ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｖ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｗ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｘ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｙ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #ccffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;Ｚ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;line-height: 20px;&quot;&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;代碼&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;6&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;7&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #ccffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;9&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;6&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;7&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #ccffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;9&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;6&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;7&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-attachment: initial; background-clip: initial; background-color: #ccffcc; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 15.4pt;&quot; width=&quot;21&quot;&gt;&lt;div align=&quot;center&quot; style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;9&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;line-height: 13pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: bottom;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&lt;/span&gt;(3)&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;校對碼之第一碼計算公式&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;:&lt;br style=&quot;line-height: 22px;&quot; /&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;各段&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;Barcode&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;之&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;’&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;基數值&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;’&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;之加總值&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;除以&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;11&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;後之&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;’&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;餘數&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;’&lt;br style=&quot;line-height: 22px;&quot; /&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;若餘數為&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;則放&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;A,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;若餘數為&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;則放&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;B)&amp;nbsp;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 13pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: bottom;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;校對碼之第二碼算公式&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;:&lt;br style=&quot;line-height: 22px;&quot; /&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;各段&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;Barcode&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;之&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;’&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;偶數值&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;’&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;之加總值&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;除以&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;11&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;後之&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;’&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;餘數&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;’&lt;br style=&quot;line-height: 22px;&quot; /&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;若餘數為&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;0&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;則放&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;X,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;若餘數為&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;則放&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;Y)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 13pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: bottom;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;例&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;有三段條碼&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;而&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;Barcode3&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;的後&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;9&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;碼&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;為&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;’&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;金額“則&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;**&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;即為校對碼&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Barcode1: 9&lt;u style=&quot;line-height: 22px;&quot;&gt;9&lt;/u&gt;1&lt;u style=&quot;line-height: 22px;&quot;&gt;2&lt;/u&gt;3&lt;u style=&quot;line-height: 22px;&quot;&gt;1&lt;/u&gt;Y&lt;u style=&quot;line-height: 22px;&quot;&gt;0&lt;/u&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Barcode2: A&lt;u style=&quot;line-height: 22px;&quot;&gt;B&lt;/u&gt;C&lt;u style=&quot;line-height: 22px;&quot;&gt;D&lt;/u&gt;E&lt;u style=&quot;line-height: 22px;&quot;&gt;F&lt;/u&gt;G&lt;u style=&quot;line-height: 22px;&quot;&gt;H&lt;/u&gt;I&lt;u style=&quot;line-height: 22px;&quot;&gt;K&lt;/u&gt;L&lt;u style=&quot;line-height: 22px;&quot;&gt;M&lt;/u&gt;N&lt;u style=&quot;line-height: 22px;&quot;&gt;P&lt;/u&gt;Q&lt;u style=&quot;line-height: 22px;&quot;&gt;R&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;Barcode3: 1&lt;u style=&quot;line-height: 22px;&quot;&gt;2&lt;/u&gt;3&lt;u style=&quot;line-height: 22px;&quot;&gt;4&lt;/u&gt;**0&lt;u style=&quot;line-height: 22px;&quot;&gt;0&lt;/u&gt;0&lt;u style=&quot;line-height: 22px;&quot;&gt;0&lt;/u&gt;0&lt;u style=&quot;line-height: 22px;&quot;&gt;7&lt;/u&gt;8&lt;u style=&quot;line-height: 22px;&quot;&gt;9&lt;/u&gt;0&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: maroon; font-size: 10pt; line-height: 22px;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;本例不佳，因前&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: maroon; font-size: 10pt; line-height: 22px;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;碼&lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;為&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: maroon; font-size: 10pt; line-height: 22px;&quot;&gt;MMDD&lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;，&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: maroon; font-size: 10pt; line-height: 22px;&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;月沒&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: maroon; font-size: 10pt; line-height: 22px;&quot;&gt;34&lt;/span&gt;&lt;span style=&quot;color: maroon; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;日&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: maroon; font-size: 10pt; line-height: 22px;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;校對碼之第一碼計算&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;第一段積數位總和&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;(9+1+3+&#39;Y&#39;:8+1)&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;= 22&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;第二段積數位總和&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;(&#39;A&#39;:1+&#39;C&#39;:3+&#39;E&#39;:5+&#39;G&#39;:7+&#39;I&#39;:9+&#39;L&#39;:3+&#39;N&#39;:5+&#39;Q&#39;:8) = 41&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;第三段積數位總和&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;(1+3+0+0+8)&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;= 12&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: red; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;積數位總位&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: red; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;22+41+12= 75 / 11&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;→餘數&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: red; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;9&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;校對碼之第二碼計算&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;第一段偶數位總和&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;(9+2+1+0)&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;= 12&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;第二段偶數位總和&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;(&#39;B&#39;:2+&#39;D&#39;:4+&#39;F&#39;:6+&#39;H&#39;:8+&#39;K&#39;:2+&#39;M&#39;:4+&#39;P&#39;:7+&#39;R&#39;:9)= 42&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;第三段偶數位總和&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;(2+4+0+0+0+8+0) = 22&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: red; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: 絡遺羹; font-size: 10pt; line-height: 22px;&quot;&gt;偶數位總位&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: red; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;12+42+22= 76 / 11&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;→餘數&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: red; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 12pt; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: 新細明體; font-size: 10pt; line-height: 22px;&quot;&gt;→因此校對碼為&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;color: blue; font-size: 10pt; line-height: 22px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: red; font-size: 10pt; line-height: 22px;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&#39;9Y&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;※超商手續費代碼&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;超商稱之為「代收項目」以台中商銀為例&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-bottom-color: initial; border-bottom-style: none; border-bottom-width: medium; border-collapse: collapse; border-left-color: initial; border-left-style: none; border-left-width: medium; border-right-color: initial; border-right-style: none; border-right-width: medium; border-top-color: initial; border-top-style: none; border-top-width: medium; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;tbody style=&quot;line-height: 20px;&quot;&gt;
&lt;tr style=&quot;line-height: 20px;&quot;&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 139.35pt;&quot; valign=&quot;top&quot; width=&quot;186&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;機構代碼&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 139.35pt;&quot; valign=&quot;top&quot; width=&quot;186&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;費用區間&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 139.4pt;&quot; valign=&quot;top&quot; width=&quot;186&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;手續費&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;line-height: 20px;&quot;&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 139.35pt;&quot; valign=&quot;top&quot; width=&quot;186&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;625&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 139.35pt;&quot; valign=&quot;top&quot; width=&quot;186&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;10000&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;以下&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 139.4pt;&quot; valign=&quot;top&quot; width=&quot;186&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;line-height: 20px;&quot;&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 139.35pt;&quot; valign=&quot;top&quot; width=&quot;186&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;62E&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 139.35pt;&quot; valign=&quot;top&quot; width=&quot;186&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;10000-20000&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 139.4pt;&quot; valign=&quot;top&quot; width=&quot;186&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;15&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;line-height: 20px;&quot;&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 139.35pt;&quot; valign=&quot;top&quot; width=&quot;186&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;6BE&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 139.35pt;&quot; valign=&quot;top&quot; width=&quot;186&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;20000&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;以上&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 139.4pt;&quot; valign=&quot;top&quot; width=&quot;186&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; font-size: x-small; line-height: normal;&quot;&gt;20&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;※超商條碼&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-bottom-color: initial; border-bottom-style: none; border-bottom-width: medium; border-collapse: collapse; border-left-color: initial; border-left-style: none; border-left-width: medium; border-right-color: initial; border-right-style: none; border-right-width: medium; border-top-color: initial; border-top-style: none; border-top-width: medium; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;tbody style=&quot;line-height: 20px;&quot;&gt;
&lt;tr style=&quot;line-height: 20px;&quot;&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 55.8pt;&quot; valign=&quot;top&quot; width=&quot;74&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;條碼一&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 273.6pt;&quot; valign=&quot;top&quot; width=&quot;365&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;繳費期限&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(YYMMDD)+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;機構代碼&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: windowtext; border-top-style: solid; border-top-width: 1pt; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 52.4pt;&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;9&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;碼&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;line-height: 20px;&quot;&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 55.8pt;&quot; valign=&quot;top&quot; width=&quot;74&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;條碼二&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 273.6pt;&quot; valign=&quot;top&quot; width=&quot;365&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;學校代碼&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;&quot; style=&quot;color: #3f3f9f; cursor: pointer; font-weight: inherit; line-height: 20px; text-decoration: none;&quot;&gt;&lt;span style=&quot;color: black; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;繳費編號&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;8&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;碼&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;span style=&quot;line-height: 22px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;+00&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 52.4pt;&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;16&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;碼&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;line-height: 20px;&quot;&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: windowtext; border-left-style: solid; border-left-width: 1pt; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 55.8pt;&quot; valign=&quot;top&quot; width=&quot;74&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 20px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;條碼三&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 273.6pt;&quot; valign=&quot;top&quot; width=&quot;365&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;繳費期限&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(MMDD)+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;校對碼&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;2&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;碼&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;)+&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;繳款金額&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;9&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: 新細明體; line-height: normal;&quot;&gt;碼&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: transparent; border-bottom-color: windowtext; border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(192, 192, 192); border-left-style: initial; border-left-width: initial; border-right-color: windowtext; border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(192, 192, 192); border-top-style: initial; border-top-width: initial; line-height: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 52.4pt;&quot; valign=&quot;top&quot; width=&quot;70&quot;&gt;&lt;div style=&quot;line-height: 20px; margin-bottom: 1.35em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span style=&quot;font-size: x-small; line-height: normal;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;line-height: 22px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;15&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: 新細明體; line-height: 22px;&quot;&gt;碼&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/501181583021313798/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/501181583021313798' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/501181583021313798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/501181583021313798'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/03/7-11.html' title='7-11 賬單條碼規則'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-1090780852550502513</id><published>2011-02-17T14:25:00.001+08:00</published><updated>2011-02-17T14:25:36.925+08:00</updated><title type='text'>「IPHON, 轉貼紀錄」助你開發iOS game的基礎知識</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h1 style=&quot;color: #444444; font-family: Arial, Helvetica; font-size: 17px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1.2em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Frame rate&lt;/h1&gt;&lt;h2 style=&quot;font-family: Arial, Helvetica; font-size: 16px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;簡單解說&lt;/h2&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;iOS game的Frame rate就用60、30、15或10吧。&lt;/div&gt;&lt;h2 style=&quot;font-family: Arial, Helvetica; font-size: 16px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;詳解&lt;/h2&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;iOS Device的螢幕的刷新速度是60Hz（即每秒刷新60次），所以iOS game的frame rate可以是60的因數（這就是60、30、15等的由來）。&lt;/div&gt;&lt;div id=&quot;_mcePaste&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;那該用那個因數才好？這沒有一個標準答案。高的Frame Rate會使動畫看起來更順，但對處理器效能要求也高。筆者的遊戲就使用了「30」這個Frame Rate，因為筆者曾作測試，這遊戲大約能在30下仍能保持平穩地執行。&lt;/div&gt;&lt;h1 style=&quot;color: #444444; font-family: Arial, Helvetica; font-size: 17px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1.2em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;動畫／圖片格式&lt;/h1&gt;&lt;h2 style=&quot;font-family: Arial, Helvetica; font-size: 16px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;簡單解說&lt;/h2&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;iOS game的常見圖像格式是PNG及PVRTC。PNG圖像品質最好，但會佔用較多記憶體；PVRTC圖像品質相對較差，但佔用較少記憶體。&lt;/div&gt;&lt;h2 style=&quot;font-family: Arial, Helvetica; font-size: 16px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;詳解&lt;/h2&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;PNG是一種常見的圖像格式，大部份圖像軟體（包括小畫家、Photoshop、Flash）都支援。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;要留意的是，PNG主要分為2種模式，一種是32Bit模式（在Photoshop選”File”–&amp;gt; “Save for web &amp;amp; device”，然後選”PNG-24″格式。嗯，雖然名稱上是「24」，但實際上是32Bit的），另一種是8Bit模式。在下文，”PNG”會泛指「32Bit模式的PNG」。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;PNG的優點是圖像質素較佳，幾乎無失真，另外亦支援8Bit的精細透明度；&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;PVRTC則是一種冷門的圖像格式，大部份圖像軟體（包括Photoshop）都不會支援。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;PVRTC的好處是佔用較小的記憶體（通常是2 或 4 bit per pixel），缺點是作了很大程度上的失真壓縮，因此圖像品質不及PNG精美。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;PVRTC的品質有點似GIF，就是容易使圖像出現塊狀顏色。&lt;/div&gt;&lt;h1 style=&quot;color: #444444; font-family: Arial, Helvetica; font-size: 17px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1.2em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Texture ﹠ Memory Management&lt;/h1&gt;&lt;h2 style=&quot;font-family: Arial, Helvetica; font-size: 16px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;簡單解說&lt;/h2&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;假如把以下的火柴人小動畫以最高畫質的方式載入記憶體，大約會佔用1.6%記憶空間。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;&lt;object classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; height=&quot;100&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;100&quot;&gt;&lt;/object&gt;&lt;/div&gt;&lt;h2 style=&quot;font-family: Arial, Helvetica; font-size: 16px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;詳解&lt;/h2&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;當程式把動畫、圖片（統稱為Texture）讀取後，會儲在相關圖像硬件的記憶體中。一幅Texture會耗用多少記憶體則視乎其bit per pixel (bpp)，越高bbp畫質就越好，但也會耗用更多記憶體。最高的bpp是32。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;至於應該用多少bpp，其中涉及的細節太多，有機會筆者另寫文章再介紹。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;iPhone 3G支援最多24MB的Texture Memory，iPhone 3Gs或iPhone4則支援更多Texture Memory，但由於現時有不少iPhone 3G用家，所以筆者依然以「最多使用24MB」Texture Memory為限。據筆者的測試，假如載入超過24MB的texture後，遊戲就會當機。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;上面的火柴人小動畫的長濶是50×100 pixels，總共有20格frame。假如使用32 bpp的話，這段動畫約佔用了391 KB 記憶體（[50pixel] x [100pixel] x [20 number of frames] x [32 bit]），以iPhone 3G的24MB texture memory為上限，上面的動畫「理論上」佔用了1.6%的記憶體空間了。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;單一個火柴人已佔用了1.6%空間，還未計背景、遊戲中的敵人、配角、按掣、聲效，可想而知iOS game的記憶體是非常珍貴，必需事前好好規劃。&lt;/div&gt;&lt;h1 style=&quot;color: #444444; font-family: Arial, Helvetica; font-size: 17px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1.2em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Atlas&lt;/h1&gt;&lt;h2 style=&quot;font-family: Arial, Helvetica; font-size: 16px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;簡單解說&lt;/h2&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;建議的圖像檔案儲存方法，如下圖所示，是把很多個圖像拼貼至一個大的圖像檔案去儲存。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone size-full wp-image-258&quot; height=&quot;512&quot; src=&quot;http://eddyl.com/blog/wp-content/uploads/2010/11/man_texture.png&quot; style=&quot;border-bottom-color: rgb(183, 169, 154); border-bottom-left-radius: 4px 4px; border-bottom-right-radius: 4px 4px; border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(183, 169, 154); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(183, 169, 154); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(183, 169, 154); border-top-left-radius: 4px 4px; border-top-right-radius: 4px 4px; border-top-style: solid; border-top-width: 1px; margin-bottom: 4px; margin-left: 10px; margin-right: 10px; margin-top: 4px; padding-bottom: 3px; padding-left: 3px; padding-right: 3px; padding-top: 3px;&quot; title=&quot;man_texture&quot; width=&quot;256&quot; /&gt;&lt;/div&gt;&lt;h2 style=&quot;font-family: Arial, Helvetica; font-size: 16px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;詳解&lt;/h2&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;以上面的火柴人小動畫為例，它總共有20格frame，其中一個最符合直覺的儲存方法是用20個PNG file來儲存。當讀取動畫時，就載入20張PNG file。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;然而，這不是建議的做法，因為載入檔案本身會非常慢，同樣是20格frame，把20格frame拼貼在單一個大的PNG file會比分散在20個小的PNG file讀取得更快。這個「拼貼著20格frame」的單一PNG file就叫作Atlas。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;此外，基於OpenGL架構的特性，處理1個Atlas比處理20個小Texture更有效率及快。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 60px; padding-right: 0px; padding-top: 0px;&quot;&gt;載入的Atlas的長闊必須是2的次方，例如256×256、512×512、1024×1024，假如Atlas的長闊是211×233，系統也會強制以256×256的大小來載入記憶體。&lt;/div&gt;&lt;h1 style=&quot;color: #444444; font-family: Arial, Helvetica; font-size: 17px; font-weight: bold; letter-spacing: -0.04em; line-height: 17px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1.2em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;總結&lt;/h1&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;以上的解說是筆者在研究Cocos2d及Sparrow這2套iOS game framework的所領悟的知識，希望可以幫到你。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;兩套Framework都是以OpenGL為基礎的，假如你或你所使用的game framework並非以OpenGL為基礎的話，本文所提及的很多原則可能並不適用。&lt;/div&gt;&lt;div style=&quot;line-height: 16px; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 30px; padding-right: 0px; padding-top: 0px;&quot;&gt;另外，這兩套framework都是2D framework，假如你開發3D game的話可能會遇到不同的細節。&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/1090780852550502513/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/1090780852550502513' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/1090780852550502513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/1090780852550502513'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/02/iphon-ios-game.html' title='「IPHON, 轉貼紀錄」助你開發iOS game的基礎知識'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-5333020127946866493</id><published>2011-02-17T14:22:00.001+08:00</published><updated>2011-02-17T14:22:44.268+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IPHONE"/><title type='text'>Cocos2d pvr or pvrtc 格式圖檔</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; color: #444444; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 22px;&quot;&gt;遊戲可以考慮使用Cocos2D來開發，會簡化不少的開發時間與流程，如動畫播完去呼叫程式，使用Cocos2D中Action的Sequence及CallFunc就可以輕易的達到要的效果。&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; color: #444444; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 22px;&quot;&gt;&lt;br style=&quot;line-height: normal; word-wrap: break-word;&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; color: #444444; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 22px;&quot;&gt;&lt;br style=&quot;line-height: normal; word-wrap: break-word;&quot; /&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; color: #444444; font-family: Verdana, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 22px;&quot;&gt;另外若動畫張數多，您可以試著將圖檔格式轉為pvr或pvrtc看看，效能上會有顯著的提升，只是轉檔後的圖片品質，看您是否能夠接受了。&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/5333020127946866493/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/5333020127946866493' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/5333020127946866493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/5333020127946866493'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/02/cocos2d-pvr-or-pvrtc.html' title='Cocos2d pvr or pvrtc 格式圖檔'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-4148743741620670519</id><published>2011-01-19T13:20:00.001+08:00</published><updated>2011-01-19T13:20:31.586+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IPHONE"/><title type='text'>討厭的 EXC_BAD_ACCES</title><content type='html'>&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;color: #d52a33; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font: normal normal normal 22px/normal Georgia, Utopia, &#39;Palatino Linotype&#39;, Palatino, serif; line-height: 18px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; position: relative;&quot;&gt;&lt;a href=&quot;http://ipdevelop.blogspot.com/2010/01/excbadaccess.html&quot; style=&quot;color: #d52a33; font: normal normal normal 22px/normal Georgia, Utopia, &#39;Palatino Linotype&#39;, Palatino, serif; text-decoration: none;&quot;&gt;討厭的 EXC_BAD_ACCESS&lt;/a&gt;&lt;/h3&gt;&lt;div class=&quot;post-header&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 1em; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div class=&quot;post-header-line-1&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post-body entry-content&quot; style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.4; position: relative; width: 506px;&quot;&gt;相信有很多人遇過 EXC_BAD_ACCESS 的錯誤訊息，有時候進 debug 也查不出個所以然，這種記憶體的問題，不管在哪種開發工具都會遇到。&lt;br /&gt;
&lt;br /&gt;
而 Xcode 有個 Zombie 的方式，可以指出哪裡出問題！&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
從 Xcode 左側，展開 Groups &amp;amp; Files 內的 Executables 分類，點選 Project 名稱的項目，按右鍵選 Get Info。&lt;br /&gt;
&lt;br /&gt;
切換到 Arguments 的標簽頁，在底下 Variables to be set in environment 下方有個「＋」與「-」，按下「＋」後，在「Name」輸入 『NSZombieEnabled』，「Value」輸入『YES』。&lt;br /&gt;
&lt;br /&gt;
以後只要有物件建立，Zombie 也會自動建立，這樣在 debug 過程，如果有錯誤訊息發生，也可以透過 Zombie 找到進一步的問題點。&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/4148743741620670519/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/4148743741620670519' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/4148743741620670519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/4148743741620670519'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/01/excbadacces.html' title='討厭的 EXC_BAD_ACCES'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-8196764977530893110</id><published>2011-01-05T17:26:00.001+08:00</published><updated>2011-01-05T17:26:36.453+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IPHONE"/><title type='text'>[轉] iPhone Development 101: User Interface:  Sizes of iPhone UI Elements</title><content type='html'>&lt;form action=&quot;http://www.idev101.com/search.html&quot; method=&quot;POST&quot; name=&quot;search&quot; style=&quot;font-family: &#39;Lucida Grande&#39;; font-size: 13px;&quot;&gt;&lt;h2 class=&quot;gray&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; margin-top: 0px; padding-bottom: 4px; padding-left: 10px; padding-right: 4px; padding-top: 4px;&quot;&gt;&lt;a class=&quot;linkback&quot; href=&quot;http://www.idev101.com/&quot; style=&quot;color: #007ade; font-size: 10pt; font-weight: bold; text-decoration: none;&quot;&gt;iPhone Development 101:&lt;/a&gt;&amp;nbsp;&lt;a class=&quot;linkback&quot; href=&quot;http://www.idev101.com/code/User_Interface/&quot; style=&quot;color: #007ade; font-size: 10pt; font-weight: bold; text-decoration: none;&quot;&gt;User Interface:&lt;/a&gt;&lt;br /&gt;
Sizes of iPhone UI Elements&lt;/h2&gt;&lt;/form&gt;&lt;div class=&quot;sec&quot; style=&quot;font-family: &#39;Lucida Grande&#39;; font-size: 13px; margin-left: 30px; margin-right: 50px;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;742&quot; src=&quot;http://www.idev101.com/code/User_Interface/sizes.png&quot; width=&quot;630&quot; /&gt;&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #eeeeee;&quot;&gt;Element&lt;/th&gt;&lt;th style=&quot;background-color: #eeeeee;&quot;&gt;Size (in pixels)&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;padding-right: 10px;&quot;&gt;Window (including status bar)&lt;/td&gt;&lt;td&gt;320 x 480px&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Status Bar&lt;br /&gt;
&lt;span class=&quot;small&quot; style=&quot;font-size: x-small;&quot;&gt;(&lt;a href=&quot;http://www.idev101.com/code/User_Interface/UIStatusBar.html&quot; style=&quot;color: #007ade; font-weight: bold; text-decoration: none;&quot;&gt;How to hide the status bar&lt;/a&gt;)&lt;/span&gt;&lt;/td&gt;&lt;td&gt;20 px&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;View inside window&lt;br /&gt;
(visible status bar)&lt;/td&gt;&lt;td&gt;320 x 460&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Navigation Bar&lt;/td&gt;&lt;td&gt;44 px&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Nav Bar Image /&lt;br /&gt;
Toolbar Image&lt;/td&gt;&lt;td&gt;up to 20 x 20 px (transparent PNG)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Tab Bar&lt;/td&gt;&lt;td&gt;49 px&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Tab Bar Icon&lt;/td&gt;&lt;td&gt;up to 30 x 30 px (transparent PNGs)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Text Field&lt;/td&gt;&lt;td&gt;31 px&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Height of a view inside&lt;br /&gt;
a navigation bar&lt;/td&gt;&lt;td&gt;416 px&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Height of a view inside&lt;br /&gt;
a tab bar&lt;/td&gt;&lt;td&gt;411 px&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Height of a view inside&lt;br /&gt;
a navbar&amp;nbsp;&lt;i&gt;and&lt;/i&gt;&amp;nbsp;a tab bar&lt;/td&gt;&lt;td&gt;367 px&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Portrait Keyboard height&lt;/td&gt;&lt;td&gt;216 px&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Landscape Keyboard height&lt;/td&gt;&lt;td&gt;140 px&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Viewing / Adjusting Sizes in Interface Builder&lt;/h3&gt;Sizes for specific UI elements (buttons, text fields, images, etc.) can be adjusted in the size panel of the Inspector window (&lt;b&gt;↑⌘I&lt;/b&gt;):&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th&gt;icon&lt;/th&gt;&lt;th&gt;shortcut&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;img src=&quot;http://www.idev101.com/learn/img/ib_size_tab.png&quot; /&gt;&lt;/td&gt;&lt;td align=&quot;center&quot;&gt;&lt;b&gt;⌘3&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Size&lt;/b&gt;&amp;nbsp;is the size and location (in X,Y coordinates) of the object on screen.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Size (and location) can also be adjusted programmatically:&lt;br /&gt;
&lt;div class=&quot;code&quot; style=&quot;background-color: #f1f5f9; border-bottom-color: rgb(201, 209, 215); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(201, 209, 215); border-left-style: solid; border-left-width: 3px; border-right-color: rgb(201, 209, 215); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(201, 209, 215); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal Monaco, Courier, mono; padding-bottom: 0px; padding-left: 10px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;pre style=&quot;font: normal normal normal 9pt/normal Monaco, Courier, mono; white-space: pre-wrap; width: 737px; word-wrap: break-word;&quot;&gt;[button setFrame:CGRectMake(x, y, width, height)];
&lt;/pre&gt;&lt;/div&gt;The x, y position refers to the top left corner of the view being positioned.&lt;br /&gt;
&lt;h3&gt;Frame and Bounds&lt;/h3&gt;The&amp;nbsp;&lt;b&gt;frame&lt;/b&gt;&amp;nbsp;is the outer container for the view - the position of the item within its enclosing superview. x is the distance left-right, where x = 0 is the left side. y is the distance up-down, where y = 0 is the top of the frame.&lt;br /&gt;
The&amp;nbsp;&lt;b&gt;bounds&lt;/b&gt;&amp;nbsp;rectangle determines the origin and scale in the view&#39;s coordinate system within its frame rectangle. Setting this property changes the value of the frame property accordingly.&lt;br /&gt;
When you set the frame property, the size of the bounds property is set to match the size of the frame property. The center property is also adjusted to match the center point of the new frame.&lt;br /&gt;
&lt;h3&gt;Additional References&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;The&amp;nbsp;&lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIBarButtonItem_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40007519-CH3-SW3&quot; style=&quot;color: #007ade; font-weight: bold; text-decoration: none;&quot;&gt;UIBarButtonItem Class Reference&lt;/a&gt;&amp;nbsp;says &quot;Typically, the size of a toolbar and navigation bar image is 20 x 20 points.&quot;&lt;/li&gt;
&lt;li&gt;The&amp;nbsp;&lt;a href=&quot;http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITabBarItem_Class/Reference/Reference.html#//apple_ref/occ/instm/UITabBarItem/initWithTitle:image:tag:&quot; style=&quot;color: #007ade; font-weight: bold; text-decoration: none;&quot;&gt;UITabBarItem Class Reference&lt;/a&gt;&amp;nbsp;says &quot;The size of an tab bar image is typically 30 x 30 points.&quot;&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/8196764977530893110/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/8196764977530893110' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/8196764977530893110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/8196764977530893110'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2011/01/iphone-development-101-user-interface.html' title='[轉] iPhone Development 101: User Interface:  Sizes of iPhone UI Elements'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-8969724840294700711</id><published>2010-11-24T18:35:00.001+08:00</published><updated>2010-11-24T18:35:53.767+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MISC"/><title type='text'>Application Architecture</title><content type='html'>&lt;span style=&quot;color: white; font-size: large;&quot;&gt;&lt;b&gt;Application&amp;nbsp;Architecture&lt;/b&gt;&lt;/span&gt;          &lt;br /&gt;
&lt;br /&gt;
As mentioned before, I live mostly in the Application Architecture area. Even within this one area, there are several views of the architecture. I like Rational&#39;s &lt;b&gt;Four Plus One&lt;/b&gt;  views.&amp;nbsp; Rational has refined the definitions several times since &lt;a href=&quot;http://www.surfscranton.com/architecture/documents/FourPlusOne.pdf&quot;&gt;Phillipe Kruchten&#39;s original paper&lt;/a&gt;, but I stick with Frank Dupont, my first Rational trainer when RUP was still in beta:&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;td align=&quot;left&quot; valign=&quot;top&quot; width=&quot;180&quot;&gt;&lt;b&gt;Logical View&lt;/b&gt;&lt;/td&gt; &lt;td align=&quot;left&quot; valign=&quot;top&quot;&gt;Allocates classes and responsibilities to packages and subsystems.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;left&quot; valign=&quot;top&quot; width=&quot;180&quot;&gt;&lt;b&gt;Development View&lt;/b&gt;&lt;/td&gt; &lt;td align=&quot;left&quot; valign=&quot;top&quot;&gt; Allocates packages and subsystems to layers and components. Also defines the development structure.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;left&quot; valign=&quot;top&quot; width=&quot;180&quot;&gt;&lt;b&gt;Process View&lt;/b&gt;&lt;/td&gt; &lt;td align=&quot;left&quot; valign=&quot;top&quot;&gt; Allocates components to processes.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;left&quot; valign=&quot;top&quot; width=&quot;180&quot;&gt;&lt;b&gt;Physical View&lt;/b&gt;&lt;/td&gt; &lt;td align=&quot;left&quot; valign=&quot;top&quot;&gt; Allocates processes to processors, nodes, networks.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td align=&quot;left&quot; valign=&quot;top&quot; width=&quot;180&quot;&gt;&lt;b&gt;Use Case View&lt;/b&gt;&lt;/td&gt; &lt;td align=&quot;left&quot; valign=&quot;top&quot;&gt; (The Plus One) Captures requirements used to develop and validate each of the other views.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Application architecture can be considered alone, but it makes most sense as part of the &lt;a href=&quot;http://www.surfscranton.com/architecture/ArchitecturalViewpoints.htm&quot;&gt;pyramid&lt;/a&gt;. Applications spring from needs and requirements coming from the business and information layers. Application architects must work with data and infrastructure designers to get their systems working and deployed to their users. Increasingly, new systems use services of existing systems, so application architects must work together to integrate. While Application Architects are more focused on individual systems than Enterprise Architects, the scope of their interactions and interests are often the same.&lt;br /&gt;
&lt;h3&gt;By the Way, What is an Application?&lt;/h3&gt;Back in mainframe and Client-Server days, we knew what &quot;application&quot; meant. It was a collection of programs, or maybe one gigantic client program, that delivered a set of related business functions to the user. One project team usually built an application from end-to-end in one cohesive effort. In my COBOL days, the company imposed a project code in the name space, so for example we knew that every file and program starting with E0186 was part of the Work In Process application.&lt;br /&gt;
Nowadays things are more complex. A solid Enterprise Application Integration architecture allows interoperation between nearly any two platforms. A cohesive set of screens or web pages may still feel like an application to the user, but the back-end may combine parts from different systems, platforms and languages with purchased components and software hosted by business partners. It is becoming less useful to talk about &quot;an application&quot; and more useful to deliver increasingly integrated functionality to end users.&lt;br /&gt;
This kind of environment has great management and political challenges - who builds what and how does the next system pay to use it - but it really makes architecture fun.&lt;br /&gt;
&lt;h3&gt;Application Architecture Goals&lt;/h3&gt;Since the earliest days of data processing, coders and their managers have struggled to define programming goodness. We can see this in an arc over the years, from Edsger W. Dijkstra&#39;s letter &quot;&lt;a href=&quot;http://www.cs.utexas.edu/users/EWD/ewd02xx/EWD215.PDF&quot;&gt;Go-To Statement Considered Harmful&lt;/a&gt;&quot; through structured concepts of coupling, cohesion and information hiding, and object oriented encapsulation and whole books of design principles.&lt;br /&gt;
Architecture, thinking in larger terms than code, components or individual systems, has its own vocabulary of goodness. I have a list of about 100 possible measures of quality that I pull out for review before starting a project. An organization should decide which ones it believes are important, and set clear priorities, perhaps as enterprise defaults modified by business needs on a project-by-project basis. Here are just a few: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Meet business goals by enabling software to reduce costs, increase profits or differentiate the company. &lt;/li&gt;
&lt;li&gt;RASP: Reliability, Availability, Scalability, Performance,&amp;nbsp; &lt;/li&gt;
&lt;li&gt;Usability. &lt;/li&gt;
&lt;li&gt;Extensibility. &lt;/li&gt;
&lt;li&gt;Freedom from defects. &lt;/li&gt;
&lt;li&gt;Low cost and rapid delivery. &lt;/li&gt;
&lt;li&gt;Layered architectures, wherein ...&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Each layer has a clear, focused purpose (high cohesion) &lt;/li&gt;
&lt;li&gt;Layers are cleanly separated and independent (low coupling) &lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Conformance to team, department, company and industry standards. &lt;/li&gt;
&lt;li&gt;Practice reuse. &lt;/li&gt;
&lt;li&gt;Contribute components to future reuse. &lt;/li&gt;
&lt;li&gt;Channel independence - use the same components for Internet, fat-client, voice response units, wireless, etc. &lt;/li&gt;
&lt;li&gt;Consistent data and rules across all channels &lt;/li&gt;
&lt;li&gt;Interoperability between disparate platforms, languages, etc. &lt;/li&gt;
&lt;li&gt;Portability &lt;/li&gt;
&lt;li&gt;And many more ... &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;The Architect&#39;s Job&lt;/h3&gt;The Application Architect operates nearly as a peer to the project manager. While the project manager deals with budgets, plans, resources and tracking progress, the architect sets the technical vision for the project, mentors the technical staff, and monitors design and implementation artifacts for quality and compliance to standards.</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/8969724840294700711/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/8969724840294700711' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/8969724840294700711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/8969724840294700711'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2010/11/application-architecture.html' title='Application Architecture'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-1617973011612866980</id><published>2010-11-10T12:16:00.000+08:00</published><updated>2010-11-10T12:16:47.595+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IPHONE"/><title type='text'>What is the IBAction and IBOutlet</title><content type='html'>&lt;b&gt;Apress - Learn Cocoa on the Mac (Feb 2010) (ATTiCA)&lt;/b&gt; &lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
You might be wondering just what IBAction and IBOutlet are. Are they part of the Objective-C language? &lt;br /&gt;
Nope. They&#39;re good old-fashioned C pre-processor macros. If you go into the AppKit.framework and look at the NSNibDeclarations.h header file, you&#39;ll see that they&#39;re defined like this: &lt;br /&gt;
&lt;br /&gt;
#ifndef IBOutlet &lt;br /&gt;
#define IBOutlet &lt;br /&gt;
#endif &lt;br /&gt;
&lt;br /&gt;
#ifndef IBAction &lt;br /&gt;
#define IBAction void &lt;br /&gt;
#endif &lt;br /&gt;
&lt;br /&gt;
Confused? These two keywords do absolutely nothing as far as the compiler is concerned. IBOutlet gets entirely removed from the code before the compiler ever sees it. IBAction resolves to a void return type, which just means that action methods do not return a value. So, what&#39;s going on here? &lt;br /&gt;
The answer is simple, really: IBOutlet and IBAction are not used by the compiler. They are used by Interface Builder. Interface Builder uses these keywords to parse out the outlets and actions available to it. Interface Builder can only see methods that are prefaced with IBAction and can only see variables or properties that are prefaced with IBOutlet. Also, the presence of these keywords tells other programmers, looking at your code in the future, that the variables and methods in question aren&#39;t dealt with entirely in code. They &#39;ll need to delve into the relevant nib file to see how things are hooked up and used.</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/1617973011612866980/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/1617973011612866980' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/1617973011612866980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/1617973011612866980'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2010/11/what-is-ibaction-and-iboutlet.html' title='What is the IBAction and IBOutlet'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-7411055421503599602</id><published>2010-09-10T14:31:00.000+08:00</published><updated>2010-09-10T14:32:16.846+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Language"/><title type='text'>Spring事务配置的五种方式</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(75, 75, 75); line-height: 19px; &quot;&gt;&lt;div class=&quot;postTitle&quot; style=&quot;font-size: 14.7px; font-weight: bold; margin-bottom: 10px; &quot;&gt;&lt;a id=&quot;viewpost1_TitleUrl&quot; class=&quot;postTitle2&quot; href=&quot;http://www.blogjava.net/robbie/archive/2009/04/05/264003.html&quot; style=&quot;text-decoration: none; color: rgb(26, 139, 200); &quot;&gt;Spring事务配置的五种方式&lt;/a&gt;&lt;/div&gt;&lt;p&gt;    前段时间对Spring的事务配置做了比较深入的研究，在此之间对Spring的事务配置虽说也配置过，但是一直没有一个清楚的认识。通过这次的学习发觉Spring的事务配置只要把思路理清，还是比较好掌握的。&lt;/p&gt;&lt;p&gt;    总结如下：&lt;/p&gt;&lt;p&gt;    Spring配置文件中关于事务配置总是由三个组成部分，分别是DataSource、TransactionManager和代理机制这三部分，无论哪种配置方式，一般变化的只是代理机制这部分。&lt;/p&gt;&lt;p&gt;    DataSource、TransactionManager这两部分只是会根据数据访问方式有所变化，比如使用Hibernate进行数据访问时，DataSource实际为SessionFactory，TransactionManager的实现为HibernateTransactionManager。&lt;/p&gt;&lt;p&gt;    具体如下图：&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.blogjava.net/images/blogjava_net/robbie/WindowsLiveWriter/Spring_9C9C/Spring%E4%BA%8B%E5%8A%A1%E9%85%8D%E7%BD%AE%20(2).jpg&quot; style=&quot;color: rgb(26, 139, 200); text-decoration: none; &quot;&gt;&lt;img alt=&quot;Spring事务配置 (2)&quot; src=&quot;http://www.blogjava.net/images/blogjava_net/robbie/WindowsLiveWriter/Spring_9C9C/Spring%E4%BA%8B%E5%8A%A1%E9%85%8D%E7%BD%AE%20(2)_thumb.jpg&quot; border=&quot;0&quot; width=&quot;654&quot; height=&quot;378&quot; style=&quot;border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-color: initial; &quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;    根据代理机制的不同，总结了五种Spring事务的配置方式，配置文件如下：&lt;/p&gt;&lt;p&gt;    第一种方式：每个Bean都有一个代理&lt;/p&gt;&lt;div style=&quot;border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); padding-top: 4px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; background-color: rgb(238, 238, 238); width: 922px; font-size: 13px; &quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;?&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255); &quot;&gt;xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;?&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;beans &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/beans&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:xsi&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:context&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/context&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:aop&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/aop&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;    xsi:schemaLocation&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/beans&lt;br /&gt;           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd&lt;br /&gt;           http://www.springframework.org/schema/context&lt;br /&gt;           http://www.springframework.org/schema/context/spring-context-2.5.xsd&lt;br /&gt;           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;br /&gt;            class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.orm.hibernate3.LocalSessionFactoryBean&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;configLocation&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;classpath:hibernate.cfg.xml&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;configurationClass&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.hibernate.cfg.AnnotationConfiguration&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 定义事务管理器（声明式的事务） &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;        class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.orm.hibernate3.HibernateTransactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 配置DAO &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;userDaoTarget&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;com.bluesky.spring.dao.UserDaoImpl&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;userDao&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;br /&gt;        class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.transaction.interceptor.TransactionProxyFactoryBean&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;           &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 配置事务管理器 &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;           &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;    &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;target&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;userDaoTarget&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;         &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;proxyInterfaces&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;com.bluesky.spring.dao.GeneratorDao&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 配置事务属性 &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionAttributes&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;            &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;props&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;                &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;prop &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;*&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;PROPAGATION_REQUIRED&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;prop&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;props&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;    第二种方式：所有Bean共享一个代理基类&lt;/p&gt;&lt;div style=&quot;border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); padding-top: 4px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; background-color: rgb(238, 238, 238); width: 922px; font-size: 13px; &quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;?&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255); &quot;&gt;xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;?&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;beans &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/beans&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:xsi&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:context&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/context&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:aop&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/aop&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xsi:schemaLocation&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/beans&lt;br /&gt;           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd&lt;br /&gt;           http://www.springframework.org/schema/context&lt;br /&gt;           http://www.springframework.org/schema/context/spring-context-2.5.xsd&lt;br /&gt;           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;br /&gt;            class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.orm.hibernate3.LocalSessionFactoryBean&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;configLocation&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;classpath:hibernate.cfg.xml&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;configurationClass&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.hibernate.cfg.AnnotationConfiguration&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 定义事务管理器（声明式的事务） &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;        class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.orm.hibernate3.HibernateTransactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionBase&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;br /&gt;            class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.transaction.interceptor.TransactionProxyFactoryBean&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;br /&gt;            lazy-init&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;true&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; abstract&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;true&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 配置事务管理器 &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 配置事务属性 &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionAttributes&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;            &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;props&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;                &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;prop &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;*&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;PROPAGATION_REQUIRED&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;prop&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;            &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;props&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;   &lt;br /&gt;  &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 配置DAO &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;userDaoTarget&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;com.bluesky.spring.dao.UserDaoImpl&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;userDao&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; parent&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionBase&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;target&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;userDaoTarget&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;  &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;第三种方式：使用拦截器&lt;/p&gt;&lt;div style=&quot;border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); padding-top: 4px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; background-color: rgb(238, 238, 238); width: 922px; font-size: 13px; &quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;?&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255); &quot;&gt;xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;?&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;beans &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/beans&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:xsi&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:context&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/context&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:aop&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/aop&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;    xsi:schemaLocation&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/beans&lt;br /&gt;           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd&lt;br /&gt;           http://www.springframework.org/schema/context&lt;br /&gt;           http://www.springframework.org/schema/context/spring-context-2.5.xsd&lt;br /&gt;           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;br /&gt;            class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.orm.hibernate3.LocalSessionFactoryBean&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;configLocation&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;classpath:hibernate.cfg.xml&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;configurationClass&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.hibernate.cfg.AnnotationConfiguration&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 定义事务管理器（声明式的事务） &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;        class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.orm.hibernate3.HibernateTransactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;  &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionInterceptor&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;br /&gt;        class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.transaction.interceptor.TransactionInterceptor&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 配置事务属性 &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionAttributes&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;            &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;props&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;                &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;prop &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;key&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;*&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;PROPAGATION_REQUIRED&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;prop&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;            &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;props&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;     &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;beanNames&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;            &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;                &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;*Dao&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;            &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;interceptorNames&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;            &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;                &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;transactionInterceptor&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;            &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;list&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 配置DAO &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;userDao&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;com.bluesky.spring.dao.UserDaoImpl&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;第四种方式：使用tx标签配置的拦截器&lt;/p&gt;&lt;div style=&quot;border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); padding-top: 4px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; background-color: rgb(238, 238, 238); width: 922px; font-size: 13px; &quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;?&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255); &quot;&gt;xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;?&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;beans &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/beans&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:xsi&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:context&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/context&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:aop&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/aop&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:tx&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/tx&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xsi:schemaLocation&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/beans&lt;br /&gt;           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd&lt;br /&gt;           http://www.springframework.org/schema/context&lt;br /&gt;           http://www.springframework.org/schema/context/spring-context-2.5.xsd&lt;br /&gt;           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd&lt;br /&gt;           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;context:annotation-config &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;context:component-scan &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;base-package&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;com.bluesky&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;br /&gt;            class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.orm.hibernate3.LocalSessionFactoryBean&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;configLocation&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;classpath:hibernate.cfg.xml&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;configurationClass&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.hibernate.cfg.AnnotationConfiguration&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 定义事务管理器（声明式的事务） &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;        class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.orm.hibernate3.HibernateTransactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;tx:advice &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;txAdvice&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; transaction-manager&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;tx:attributes&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;            &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;tx:method &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;*&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; propagation&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;REQUIRED&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;tx:attributes&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;tx:advice&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;   &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;aop:config&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;aop:pointcut &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;interceptorPointCuts&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;            expression&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;execution(* com.bluesky.spring.dao.*.*(..))&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;aop:advisor &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;advice-ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;txAdvice&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;            pointcut-ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;interceptorPointCuts&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;       &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;aop:config&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;     &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;第五种方式：全注解&lt;br /&gt;&lt;/p&gt;&lt;div style=&quot;border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); padding-top: 4px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; background-color: rgb(238, 238, 238); width: 922px; font-size: 13px; &quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;?&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 255); &quot;&gt;xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;?&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;beans &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;xmlns&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/beans&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:xsi&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:context&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/context&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:aop&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/aop&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xmlns:tx&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/tx&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;    xsi:schemaLocation&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;http://www.springframework.org/schema/beans&lt;br /&gt;           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd&lt;br /&gt;           http://www.springframework.org/schema/context&lt;br /&gt;           http://www.springframework.org/schema/context/spring-context-2.5.xsd&lt;br /&gt;           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd&lt;br /&gt;           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;context:annotation-config &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;context:component-scan &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;base-package&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;com.bluesky&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;tx:annotation-driven &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;transaction-manager&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;br /&gt;            class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.orm.hibernate3.LocalSessionFactoryBean&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;configLocation&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;classpath:hibernate.cfg.xml&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;configurationClass&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; value&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.hibernate.cfg.AnnotationConfiguration&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;&lt;!--&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt; 定义事务管理器（声明式的事务） &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 128, 0); &quot;&gt;--&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;transactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;&lt;br /&gt;        class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;org.springframework.orm.hibernate3.HibernateTransactionManager&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;property &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt;name&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; ref&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;=&quot;sessionFactory&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;/&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;bean&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;   &lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&lt;/&lt;/span&gt;&lt;span style=&quot;color: rgb(128, 0, 0); &quot;&gt;beans&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;此时在DAO上需加上@Transactional注解，如下：&lt;/p&gt;&lt;div style=&quot;border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); padding-top: 4px; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; background-color: rgb(238, 238, 238); width: 922px; font-size: 13px; &quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;package&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; com.bluesky.spring.dao;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; java.util.List;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; org.hibernate.SessionFactory;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; org.springframework.beans.factory.annotation.Autowired;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; org.springframework.orm.hibernate3.support.HibernateDaoSupport;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; org.springframework.stereotype.Component;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;import&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; com.bluesky.spring.domain.User;&lt;br /&gt;&lt;br /&gt;@Transactional&lt;br /&gt;@Component(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;userDao&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; UserDaoImpl &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;extends&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; HibernateDaoSupport &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;implements&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; UserDao {&lt;br /&gt;&lt;br /&gt;    &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; List&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;User&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; listUsers() {&lt;br /&gt;        &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255); &quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;.getSession().createQuery(&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;from User&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;).list();&lt;br /&gt;    }&lt;br /&gt;   &lt;br /&gt;    &lt;img alt=&quot;&quot; src=&quot;http://www.blogjava.net/Images/dot.gif&quot; style=&quot;border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; &quot; /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: rgb(0, 0, 0); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/7411055421503599602/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/7411055421503599602' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/7411055421503599602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/7411055421503599602'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2010/09/spring.html' title='Spring事务配置的五种方式'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-7574930261323110441</id><published>2010-09-06T16:45:00.001+08:00</published><updated>2010-09-06T16:45:36.685+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Maven"/><title type='text'>COPY－軟件版本Beta,RC,Demo,Build,GA等是什麼意思呢？</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: 12px; line-height: 18px; &quot;&gt;&lt;div class=&quot;tit&quot; style=&quot;font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: 26px; background-image: url(http://hiphotos.baidu.com/shineaqua/pic/item/7cc23b170ecd09024a90a7f6.jpg); background-attachment: initial; background-origin: initial; background-clip: initial; background-color: initial; font-weight: bold; overflow-x: hidden; overflow-y: hidden; background-position: initial initial; background-repeat: repeat no-repeat; &quot;&gt;COPY－軟件版本Beta,RC,Demo,Build,GA等是什麼意思呢？&lt;/div&gt;&lt;div class=&quot;date&quot; style=&quot;font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 12px; line-height: 18px; margin-top: 5px; margin-right: 0px; margin-bottom: 8px; margin-left: 0px; color: rgb(102, 102, 102); &quot;&gt;2009/02/23 10:40&lt;/div&gt;&lt;table style=&quot;table-layout: fixed; width: 958px; &quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;font-family: Arial; word-wrap: break-word; word-break: break-all; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 12px; line-height: 18px; &quot;&gt;&lt;div id=&quot;blog_text&quot; class=&quot;cnt&quot; style=&quot;font-family: Arial; word-wrap: break-word; word-break: normal; visibility: visible !important; zoom: 1 !important; filter: none; font-size: 14px; line-height: 20px; color: rgb(51, 51, 51); overflow-x: hidden; overflow-y: hidden; position: static; &quot;&gt;Alpha：是內部測試版,一般不向外部發佈,會有很多Bug.一般只有測試人員使用。&lt;br /&gt;Beta：也是測試版，這個階段的版本會一直加入新的功能。在Alpha版之後推出。&lt;br /&gt;RC：(Release　Candidate)顧名思義麼 ! 用在軟件上就是候選版本。系統平台上就是發行候選版本。RC版不會再加入新的功能了，主要著重於除錯。&lt;br /&gt;RTM：(Release to Manufacture)是給工廠大量壓片的版本，內容跟正式版是一樣的，不過RTM版也有出限制、評估版的。但是和正式版本的主要程序代碼都是一樣的。&lt;br /&gt;OEM：是給計算機廠商隨著計算機販賣的，也就是隨機版。只能隨機器出貨，不能零售。只能全新安裝，不能從舊有操作系統升級。包裝不像零售版精美，通常只有一面CD和說明書(授權書)。&lt;br /&gt;RVL：號稱是正式版，其實RVL根本不是版本的名稱。它是中文版/英文版文檔破解出來的。&lt;br /&gt;EVAL：而流通在網絡上的EVAL版，與「評估版」類似，功能上和零售版沒有區別。&lt;br /&gt;RTL：Retail(零售版)是真正的正式版，正式上架零售版。在安裝盤的i386文件夾裡有一個eula.txt，最後有一行 EULAID，就是你的版本。比如簡體中文正式版是EULAID:WX.4_PRO_RTL_CN，繁體中文正式版是WX.4_PRO_RTL_TW。其中：如果是WX.開頭是正式版，WB.開頭是測試版。_PRE，代表家庭版；_PRO，代表專業版。&lt;br /&gt;&lt;br /&gt;版本號：&lt;br /&gt;V（Version）：即版本，通常用數字表示版本號。(如:EVEREST　Ultimate　v4.20.1188　Beta　)&lt;br /&gt;Build：用數字或日期標示版本號的一種方式。(如:VeryCD　eMule　v0.48a　Build　071112)&lt;br /&gt;SP：Service　Pack，升級包。(如:Windows　XP　SP　2/Vista　SP　1)&lt;br /&gt;&lt;br /&gt;授權和功能劃分：&lt;br /&gt;Trial：試用版，通常都有時間限制，有些試用版軟件還在功能上做了一定的限制。可註冊或購買成為正式版&lt;br /&gt;Unregistered：未註冊版，通常沒有時間限制，在功能上相對於正式版做了一定的限制。可註冊或購買成為正式版。&lt;br /&gt;Demo：演示版，僅僅集成了正式版中的幾個功能，不能升級成正式版。&lt;br /&gt;Lite：精簡版。&lt;br /&gt;Full　version：完整版，屬於正式版。&lt;br /&gt;&lt;br /&gt;語言劃分：&lt;br /&gt;SC：Simplified　Chinese簡體中文版。&lt;br /&gt;CN　：　簡體中文版&lt;br /&gt;GBK：簡體中文漢字內碼擴展規範版。&lt;br /&gt;TC：Traditional　Chinese繁體中文版。&lt;br /&gt;CHT　：　繁體中文版&lt;br /&gt;BIG5：繁體中文大五碼版。&lt;br /&gt;EN　：　英文版&lt;br /&gt;Multilanguage　：　多語言版&lt;br /&gt;UTF8：Unicode　Transformation　Format　8　bit，對現有的中文系統不是好的解決方案。&lt;br /&gt;&lt;br /&gt;開發階段劃分：&lt;br /&gt;α（Alpha）版：內測版，內部交流或者專業測試人員測試用。Bug較多，普通用戶最好不要安裝。&lt;br /&gt;β（Beta）版：公測版，專業愛好者大規模測試用，存在一些缺陷，該版本也不適合一般用戶安裝。&lt;br /&gt;γ（Gamma）版：相當成熟的測試版，與即將發行的正式版相差無幾。&lt;br /&gt;RC版：Release　Candidate。&lt;br /&gt;RC　版。是　Release　Candidate　的縮寫，意思是發佈倒計時，候選版本，處於Gamma階段，該版本已經完成全部功能並清除大部分的 BUG。到了這個階段只會除BUG，不會對軟件做任何大的更改。從Alpha到Beta再到Gamma是改進的先後關係，但RC1、RC2往往是取捨關係。&lt;br /&gt;Final：正式版。&lt;br /&gt;&lt;br /&gt;其他版本&lt;br /&gt;Enhance　：增強版或者加強版　屬於正式版1&lt;br /&gt;Free　：自由版&lt;br /&gt;Release　：發行版　有時間限制&lt;br /&gt;Upgrade　：升級版&lt;br /&gt;Retail　　：零售版&lt;br /&gt;Cardware　：屬共享軟件的一種，只要給作者回覆一封電郵或明信片即可。（有的作者並由此提供註冊碼等），目前這種形式已不多見。/　S&lt;br /&gt;Plus　：屬增強版，不過這種大部分是在程序界面及多媒體功能上增強。&lt;br /&gt;Preview　：預覽版&lt;br /&gt;Corporation　&amp;amp;　Enterprise　：企業版&lt;br /&gt;Standard　：標準版&lt;br /&gt;Mini　：迷你版也叫精簡版只有最基本的功能&lt;br /&gt;Premium　：　貴價版&lt;br /&gt;Professional　：　專業版&lt;br /&gt;Express　：　特別版&lt;br /&gt;Deluxe　：　豪華版&lt;br /&gt;Regged　：　已註冊版&lt;br /&gt;Rip　：是指從原版文件（一般是指光盤或光盤鏡像文件）直接將有用的內容（核心內容）分離出來，剔除無用的文檔，例如PDF說明文件啊，視頻演示啊之類的東西，也可以算做是精簡版吧…但主要內容功能是一點也不能缺少的！另：DVDrip是指將視頻和音頻直接從DVD光盤裡以文件方式分離出來。&lt;br /&gt;RTM　版　：這基本就是最終的版本，英文是　Release　To　Manufactur，意思是發佈到生產商。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RC就是Release Candidate（候選版本）的簡稱&lt;br /&gt;GA:General Availability,正式發佈的版本，在國外都是用GA來說明release版本的&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/7574930261323110441/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/7574930261323110441' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/7574930261323110441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/7574930261323110441'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2010/09/copybetarcdemobuildga.html' title='COPY－軟件版本Beta,RC,Demo,Build,GA等是什麼意思呢？'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-3609434846572267016</id><published>2010-08-24T16:28:00.001+08:00</published><updated>2010-08-24T16:28:51.146+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="閱讀"/><title type='text'>技術對談－看Google怎麼用Java</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;trebuchet ms&#39;, &#39;lucida grande&#39;, &#39;lucida sans unicode&#39;, arial, helvetica, sans-serif; font-size: 13px; color: rgb(34, 34, 34); line-height: 20px; &quot;&gt;&lt;p class=&quot;postdate&quot; style=&quot;margin-top: 0.25em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; font-size: 0.85em; text-transform: uppercase; &quot;&gt;SATURDAY, 9. SEPTEMBER 2006, 05:40:03&lt;/p&gt;&lt;p class=&quot;tags&quot; style=&quot;margin-top: -1em; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; font-size: 0.85em; text-transform: uppercase; &quot;&gt;&lt;a href=&quot;http://my.opera.com/hand-mind/blog/index.dml/tag/java&quot; rel=&quot;tag&quot; style=&quot;color: rgb(17, 17, 17); &quot;&gt;JAVA&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;content&quot; style=&quot;clear: both; &quot;&gt;席捲全球Java界的《Java Puzzlers》作者－Google首席Java架構師&lt;br /&gt;Joshua Bloch與Google專任工程師兼Java講師Neal Gafter，應邀來臺擔任Java 2006的講師。iThome邀請多位Java專家與兩位Google大師對談。在輕鬆的氣氛中，Joshua與Neal針對Java的發展與Google的技術應用等議題，以幽默詼諧的方式提出他們的看法。&lt;br /&gt;&lt;br /&gt;PC組成高度容錯的分散式架構&lt;br /&gt;王建興：當我們知道可與兩位來自Google的Java大師座談時，心中浮現的自然是Google舉世聞名的分散式架構，Java向來有效能上的爭議，但Google為何會採用Java？又如何應用Java？&lt;br /&gt;&lt;br /&gt;Neal：Google打造的許多應用程式都是大型的分散式系統，我們不會將應用程式放到一臺大型的單一主機上。我們喜歡使用現成的PC，來建構我們的系統，而不是大型而且可靠度佳的昂貴主機。單一PC隨時可能發生錯誤，我們試著用軟體的方式建立容錯的機制。&lt;br /&gt;&lt;br /&gt;基本上，我們沒使用J2EE，這其中有許多原因，包括Google在J2EE之前就已經有了自己的分散式架構，甚至還是使用 Java 語言建構出來的。所以Google有自己的RPC（Remote Procedure Call）系統，而且廣泛地使用，它可以在不同語言之間達到良好的溝通，不論伺服器、用戶端、Java、Python 或C++，而且運作地很平順。&lt;br /&gt;&lt;br /&gt;我們應用Interface Definition Language編譯程式，成為可以跨Java、Python及C++三種語言的系統。所以當我們設計一個分散式系統時，其中一件事就是看哪種通訊協定可以適合這些語言來開發，另外就是我們怎麼處理容錯、備份、如何確保我們不會遺失任何使用者的資料、如何恢復某臺當掉的機器。Google有特別的解決方式處理這方面的問題，我們有個通用的解決方法。&lt;br /&gt;&lt;br /&gt;Joshua：沒錯，如Neal所言，失敗不是少見的情況，而是很常見的。當你要建立一個像Google這樣規模的搜尋服務，你可以想像會有多少問題，但是我們就是要持續的讓服務運作下去，盡量讓系統可以自動修復，不要造成延遲。&lt;br /&gt;&lt;br /&gt;王文彬：Google的應用好像都是自製的，是否曾使用其他公司的產品？&lt;br /&gt;&lt;br /&gt;Joshua：會的，我們會拿現成的來用，多數工具是我們自製的，不過如果有別人已開發好的軟體，剛好是我們需要的，而且價格不錯，我們會買下它，Google Web Toolkit（GWT）就是很好的例子。&lt;br /&gt;&lt;br /&gt;Neal：我們就常用一些開放源碼的產品，用哪些可能不方便講，不過我們用很多Linux工具，有時候我們會用些其他人開發好的工具，其實Google沒有規定一定什麼都要自己開發，當你要把程式交給開放源碼社群時，你會傾向社群支持你的東西，但你不會要他們付錢給你。&lt;br /&gt;&lt;br /&gt;彬：這就是JBoss要做的。&lt;br /&gt;&lt;br /&gt;Java與C++人才的比重逐漸改變&lt;br /&gt;王建興：我們聽早上的主題演講，你們說Google應用Java在中介層（Middle-Tier），例如GMail、Calendar。我們很有興趣知道什麼樣的應用適合使用Java？&lt;br /&gt;&lt;br /&gt;Neal：沒錯，在中介層的開發，Java是很好的選擇。Google 有很多基礎的設施，Web Servlet 引擎，讓你很簡單就能以Java撰寫與部署中介層的程式。&lt;br /&gt;&lt;br /&gt;Joshua：而且有許多現成的函式庫，不需要用到bit-level，就可以整合原有底層的C++程式，這可以廣泛地移植到用戶端的程式，像是一些AJAX程式。&lt;br /&gt;&lt;br /&gt;Neal：這還是要看各個開發團隊決定用什麼，如果是要開發一些以Web為主的程式，可能就不考慮Java而選擇C++，有可能因為他們對C++很熟，所以，即使他們開發的東西和我做的很像，但他們還是決定選擇C++。&lt;br /&gt;&lt;br /&gt;王建興：你們認為Java能提供更好的可攜性嗎？&lt;br /&gt;&lt;br /&gt;Joshua：絕對是的。而且Java可以提供較好的效能表現。&lt;br /&gt;&lt;br /&gt;Neal：一般來說，以Google使用Java的方式下，可攜性沒那麼重要。因為我們將Java應用程式部署在特定版本的Linux。&lt;br /&gt;&lt;br /&gt;不過，可攜性的優點，是當我們移至下一個版本的Java，或下一個版本的Linux時，我們不想鎖在某個特定版本的Java、架構或作業系統，所以可攜性很重要。&lt;br /&gt;&lt;br /&gt;Joshua：但我們不會要求寫程式時，要同時兼顧在任何平臺上都可以執行，這有點與寫程式的態度有關，你是要寫給自己用的，或是寫給全世界用的。&lt;br /&gt;&lt;br /&gt;王建興：我想你們會採用 Java 有一個很重要的理由是想要降低開發的心力和時間。&lt;br /&gt;&lt;br /&gt;Joshua：絕對如此。還有另一個理由，學生在學校裡學的都是Java，而且喜歡Java，他們甚至不懂C++，所以比找C++人才容易。&lt;br /&gt;&lt;br /&gt;Neal：而且Java除錯容易多了。&lt;br /&gt;&lt;br /&gt;王文彬：現在Google的C++與Java工程師的比例為何？各占一半嗎？&lt;br /&gt;&lt;br /&gt;Joshua：我不太確定。可以肯定的是Google正在徵求更多的Java工程師。&lt;br /&gt;&lt;br /&gt;Neal：應該不到這個比例，使用C++的應該多一點，可能是 6：4 左右。不過，使用Java的人正在成長中，5年前Google大概沒什麼人使用Java，所以我們可以預見，Java在Google裏越來越重要。&lt;br /&gt;&lt;br /&gt;王建興：即使Java對開發企業應用程式是夠快的，可是你們怎麼兼顧延展性（Scalability）？&lt;br /&gt;&lt;br /&gt;Joshua： Google解決Java的延展性，就像解決其他這類延展性問題。像是複製、大型分散式系統，或者用更多機器來解決這些問題。&lt;br /&gt;&lt;br /&gt;王建興：所以你們會用分散式架構來解決？&lt;br /&gt;&lt;br /&gt;Joshua：對。&lt;br /&gt;&lt;br /&gt;葉秉哲：請問Google分散式基礎架構早在Google搜尋引擎剛草創的時代就已經存在了嗎？&lt;br /&gt;&lt;br /&gt;Neal：許多Google的叢集和分散式基礎架構，的確可追溯到Google兩位創始者在史丹福大學研究所，以三五臺機器研究時代。不過早期的基礎架構都已被重新設計過，所以現在已經很難看到雜亂的程式碼了。單以搜尋引擎核心本身而言，大概就被改寫過三次。&lt;br /&gt;&lt;br /&gt;Joshua：不過，當然，某些核心的演算法，例如PageRank仍然存在。&lt;br /&gt;&lt;br /&gt;沒有修改JVM，調校是從程式著手&lt;br /&gt;王建興：在你們早上的演講中，提到有許多在Java社群有所貢獻的人，現在都在Google，我們看到有很多人都熟悉JVM，我們猜你們有基於效率的考量修改JVM。我們有猜對嗎？&lt;br /&gt;&lt;br /&gt;Joshua、Neal：猜錯了。&lt;br /&gt;&lt;br /&gt;Joshua：你們可能會這麼想，但就我所知沒有。我們使用現成的JVM，不是我們為自己人說話，但昇陽的JVM效能一直在精進，我們把原來跑在JRE 1.4的程式放在Tiger上，發現，哇！效能這麼好。再放在Mustang，哇！效能更快，我們就不用花什麼功夫特別去調整我們的程式了。&lt;br /&gt;&lt;br /&gt;Neal：我們的確是和昇陽保持聯繫，所以當我們遇到了特定的問題時，我們就會讓他們知道，這樣的VM對我們不夠用。&lt;br /&gt;&lt;br /&gt;Joshua：而且我們提供解決方案。&lt;br /&gt;&lt;br /&gt;王建興：所以最佳化是在應用程式的層級進行？&lt;br /&gt;&lt;br /&gt;Joshua：是的，開發精簡而有效率的程式，Java是很好的工具。Java程式既短且清楚，而且提供夠多的函式庫，可以根據需求置換。要寫出一樣的C++程式，就得花上更多的力氣。&lt;br /&gt;&lt;br /&gt;Neal：你可以找到許多用在Java的效能衡量與調校的工具，那可以很容易找出問題在哪。&lt;br /&gt;&lt;br /&gt;王建興：程式效能的瓶頸。&lt;br /&gt;&lt;br /&gt;Neal：是呀，我總是很驚訝瓶頸怎麼會在這兒，所以總是真的找到了才相信。&lt;br /&gt;&lt;br /&gt;王建興：效能瓶頸所在，總是令人驚訝不已。&lt;br /&gt;&lt;br /&gt;Joshua：沒有真的證明前，總是猜錯瓶頸究竟在哪裏。&lt;br /&gt;&lt;br /&gt;開放原始碼，對Java的幫助有限&lt;br /&gt;朱仲傑：我們知道這幾年Java將會開放原始碼，你們們覺得這會對提升Java的效能，或找出Java的效能瓶頸有幫助嗎？&lt;br /&gt;&lt;br /&gt;Joshua：Neal和我並不同意這個觀點，基本上我們有研究許可（Research License）已經可以閱讀原始碼，調校或找出問題都很簡單，我不是要說這麼做沒用，而是我們不需要因為原始碼不夠開放而這麼做，從1995年到現在，已有很多進步，可以寫很高效能的Java程式。&lt;br /&gt;&lt;br /&gt;Neal：Java SE今年年底就要釋出原始碼，你可能會覺得屆時開放源碼社群協助Java SE，找出Java SE的問題。不過，其實他們現在就已經可以這麼做了，Java SE已有公開的原始碼，你可以在上面加些警告，也可以告訴昇陽哪裏有問題。但是實際上，很少人這麼做，所以我不覺得完全開放源碼之後，會吸引大家貢獻些什麼，因為現在就可以了。&lt;br /&gt;&lt;br /&gt;Joshua：不過學術單位在Java開放以後，就可以更自由的使用與修改Java了。&lt;br /&gt;&lt;br /&gt;Neal：有些事是開放Java源碼以後可以做的。像是Java語法的實驗，現在我雖然可以改Java的東西，做些實驗性質的應用，加些新的功能，但因為我不是昇陽的員工，不被允許提供給別人試用。&lt;br /&gt;&lt;br /&gt;Joshua：我要提出相反的看法，7年前Philip Wadler、Martin Odersky這兩個人，在Java上加了很多功能，然後取名叫「Pizza」，現在的Generic功能很多都是根源於Pizza的。&lt;br /&gt;&lt;br /&gt;Neal：但如果他們在Java開放原始碼之後再做，就不需要自己重寫一個Java SE了！&lt;br /&gt;&lt;br /&gt;Joshua：我要說的是，這類在Java之上的再開發，7、8年前就有。&lt;br /&gt;&lt;br /&gt;Google力求提供在地化的服務&lt;br /&gt;馮彥文：我很好奇Google的軟體，有沒有還未自動化的？需要人工處理的？&lt;br /&gt;&lt;br /&gt;Neal：有，像在地化，因地區不同的翻譯之類。&lt;br /&gt;&lt;br /&gt;Joshua：也是有些工具可以幫忙。&lt;br /&gt;&lt;br /&gt;Neal：其實也有系統幫助不在Google工作的人，協助我們做在地化。&lt;br /&gt;&lt;br /&gt;Joshua：基本上Google會盡量能自動化就自動化，Yahoo就不那麼自動化，Yahoo是有歷史原因的，因為從一開始的設計就是由人工登錄網址；而Google從一開始的索引就是讓網路自己搜尋，但也沒辦法做到樣樣自動化。&lt;br /&gt;&lt;br /&gt;Neal：還是有些服務像登廣告，得由人工檢查填寫資料的是否正確，及是否侵犯他人的商標。&lt;br /&gt;&lt;br /&gt;Joshua：不過我再強調，我們都盡量自動化，不能做到的，才用人工補強。例如Google News，就不是用人工挑選資料，是電腦篩選的。&lt;br /&gt;&lt;br /&gt;Neal：Google設計服務時，還是以自動化為原則，這樣的服務才不會被限制住。如果有服務是我們無法靠自動化來解決的，可能我們就做錯了方向。&lt;br /&gt;&lt;br /&gt;馮彥文：所以像 Google廣告，如果我想申請的是中文、日文，這些不同語言的廣告，你們需要不同地區的人協助嗎？&lt;br /&gt;&lt;br /&gt;Neal：我想我們在全球不同國家，都有分公司照顧各種語言的用戶，我們的服務在全球都有，還是需要有人知道當地的語言、文化、法律的特色，才能服務當地的人。&lt;br /&gt;&lt;br /&gt;葉秉哲：所以我們才能看到Google Map在日本是日文，在希臘是希臘文。&lt;br /&gt;&lt;br /&gt;Neal：沒錯。&lt;br /&gt;&lt;br /&gt;Joshua：Google了解這個世界只有一小部分人的母語是英文，我們也了解，在這個一直成長的網路世界人口中，大部分的人說著其他語言，Google想要為這部分的人服務。&lt;br /&gt;&lt;br /&gt;衝擊可以激盪出更多興奮的點子&lt;br /&gt;錢世豐：Google在全球有那麼多員工，分散在不同的地方，如何合作完成工作？&lt;br /&gt;&lt;br /&gt;Joshua：我們公司使用電子郵件和即時傳訊系統溝通。有人說到Google Talk嗎？&lt;br /&gt;&lt;br /&gt;昨晚我抵達台北的時候，寫電子郵件給老婆，一打開即時通訊，就有Google的人傳訊過來問我「Hey，你現在在哪裏？我有個技術問題想問你，有個API裏有個名字，我不認為那是個好名字，你覺得呢？」基本上，Google是個全球性的公司，合作的方法就是要有全球化的想法。&lt;br /&gt;&lt;br /&gt;Neal：Google盡可能的維持小型團隊，而且讓小型團隊在同地點工作，理想的團隊規模可能是5個人，4個或5個，也許多到8個。大過這個數字，溝通就複雜多了。&lt;br /&gt;&lt;br /&gt;Joshua：舉例像匹茲堡分公司，匹茲堡的團隊可能有些人會在某個計畫上分擔工作，和位於山景城（Mountain View）總部的員工合作。Google是從史丹福的研究生開始的，逐漸聚集許多工程師加入，這些工程師聚在一起就會有些東西蹦出來。&lt;br /&gt;&lt;br /&gt;王文彬：你們現在有多少員工？一萬人？&lt;br /&gt;&lt;br /&gt;Neal：還沒，大約7000~8000人。&lt;br /&gt;&lt;br /&gt;王文彬：那現在一定也多了許多人是從事業務工作，從一個管理者的角度來看，如何和業務這類不同性質的人合作？&lt;br /&gt;&lt;br /&gt;Joshua：這對公司而言的確是有點挑戰。可能有時候需要順從別人的意見，但Google還是盡量保有某些原則。當然還是有混亂衝擊（Chaos）的時候，優秀的科技公司，總是會有些「衝擊」，因為衝擊可以激盪出更多令人興奮的點子。&lt;br /&gt;&lt;br /&gt;王文彬：我總很好奇，你們有很多東西都是自製的，那新進同仁要如何學習這些東西呢？學習方式為何？&lt;br /&gt;&lt;br /&gt;Joshua：這是非常棒的問題，來到Google就像剛移民時，都要上一些課，像剛上大學會有新生訓練一樣，Google有兩個禮拜的新生訓練，教導Google現有的產品。例如我們是開發Java程式的，就會教導一些寫Java的方式。&lt;br /&gt;&lt;br /&gt;Neal：新進員工會有指定的mentor（學長）帶他，如果有什麼問題，可以問學長，實作上的問題，所有辦公室都是可以分享的資源，Google人都很樂意幫忙。尤其新進來的工程師會有個「Starter Project」，會指導你怎麼做某些特別的事，讓你習慣程式管理機制，例如如何檢查程式、程式撰寫的原則、有問題該找誰等。&lt;br /&gt;&lt;br /&gt;Neal：一般來說，Google不會把5、6個新員工放在一起，由他們自己做事，新員工都會安插在一些原有的團隊裡面。&lt;br /&gt;Joshua：其實老員工都還會輪調到不同分公司，彼此交換經驗，像我這趟臺灣行結束後，我會馬上去賓州的匹茲堡分公司輪調一個星期。&lt;br /&gt;&lt;br /&gt;Google的80/20工作法則&lt;br /&gt;錢世豐：Google的員工可以利用20%的工作時間做任何想做的事，是真的嗎？&lt;br /&gt;&lt;br /&gt;Neal：真的！我當初的20%時間是做一個行事曆的應用，後來發展成為今日的Google Calendar。它現在變成我的80%，而目前來臺灣就是用我的20%時間。&lt;br /&gt;&lt;br /&gt;Joshua：很多年來，我的20%是更新《Effective Java》。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Google專任工程師Neal Gafter（左）與Google首席Java架構師Joshua Bloch（右），兩人利用Google的20%自由工作時間寫出《Java Puzzlers》暢銷書。攝影／賴基能&lt;br /&gt;&lt;br /&gt;AJAX仍在演進，是未來的趨勢&lt;br /&gt;朱仲傑：我們知道AJAX是從Google Map點燃的，而AJAX現在正火紅，Java Script有個大問題是相容性，有些語法只能在IE或Firefox上使用。Gmail可以在很多瀏覽器上使用，但Google Calendar就只能在IE和Firefox上用。&lt;br /&gt;&lt;br /&gt;Neal：不，它現在可以在Mac OS上使用了。&lt;br /&gt;&lt;br /&gt;使用AJAX撰寫應用程式，會比用Java用戶端技術撰寫應用程式花上更多力氣。真的，因為可攜性不會是免費奉送的。另一方面，並不是很多人的機器都裝有Java，但每個人都有瀏覽器，Firefox到處都有，而IE更佔有90%，只要有Windows就有IE。實務上來說，當你能夠在這兩個瀏覽器上執行，對大多數人來說，就具備了可攜性。&lt;br /&gt;&lt;br /&gt;Joshua：我看AJAX是比以前的HTML更豐富，但還是沒有比傳統的Windows、Mac OS或Unix上的應用程式豐富。不過另方面，AJAX一直在改進，比以往更容易移植、更容易維護，這些背後技術的演進，讓使用者能自然地使用，不會感覺到技術端有什麼不同，這些都是好事。我有時候對AJAX做不到一些功能而感到挫折，但另一方面以一些商業的角度來看，選AJAX還是正確的決定。&lt;br /&gt;&lt;br /&gt;Neal：AJAX的應用還是無法像一般例如Java開發的程式來得豐富，其中部分原因是技術太新，所以不那麼普及，沒有那麼多函式庫可以讓開發變得簡單，而且AJAX還是有效能上的問題，Java Script還是一個直譯式的語言，如果未來有更豐富複雜的以AJAX 開發的應用程式，我們還是需要有更好的Java Script解譯方法。我還是會很高興看到越來越多用戶端在使用Java。&lt;br /&gt;&lt;br /&gt;Joshua：會的，大約60%的電腦出廠時就裝好Java 5的JRE（Java Runtime Environment)。&lt;br /&gt;&lt;br /&gt;丁彬：Google以併購的方式取得GWT，Google還有其他的AJAX 工具集的計畫嗎？&lt;br /&gt;&lt;br /&gt;Neal：Google很多專案採用AJAX技術，不過如果你的問題，是Google有沒有其他的AJAX Toolkit產品，就我所知是沒有。&lt;br /&gt;&lt;br /&gt;Joshua：就我所知，也是沒有。就算有，我也不被允許談論這些計畫。&lt;br /&gt;&lt;br /&gt;葉秉哲：所以你們會用嗎？（指GWT）&lt;br /&gt;&lt;br /&gt;Neal：我們現在沒有，因Google Calendar在AJAX誕生之前就開始開發了，但如果開發時就有這些工具，我想我會採用。至於我現在是否會將Google Calendar轉由AJAX工具開發，這聽起來就有點費功夫了，可能不太值得。&lt;br /&gt;&lt;br /&gt;葉秉哲：如果有新的應用，你們可能就會採用？&lt;br /&gt;&lt;br /&gt;Neal：如果有新的計畫是以AJAX為目標，我想會採用的，因為有現成的可以利用。&lt;br /&gt;&lt;br /&gt;Joshua：如果有時間我也會想用，不過有點困難。&lt;br /&gt;&lt;br /&gt;葉秉哲：當Google在使用腳本語言時，為什麼會選擇Python，而不是Perl 之類的語言？&lt;br /&gt;&lt;br /&gt;Joshua：當我們任職於Google時，Google已經採用Python，所以我並不知道最初的原因。在Google內部也有人使用Perl，不過只是用於個人的20%時間，屬於實驗性質，用來展示及說服個人的想法；當此計畫成長到有其他人加入時，還是得轉移到Google最常用的語言平臺上。&lt;br /&gt;&lt;br /&gt;Google OS？只是揶揄微軟&lt;br /&gt;朱仲傑：現在你們用的Java是哪一個版本？&lt;br /&gt;&lt;br /&gt;Joshua：我很驕傲的說，現在我們已經用到Tiger，我是2004年7月4日加入Google，大約從2005年3月起，全公司就轉換到Tiger，這是在Tiger發表後沒多久的事。&lt;br /&gt;&lt;br /&gt;Neal：我們已經完成JDK 1.6的測試，只要等JDK 1.6公佈後，我們也可以很快地轉換過去。&lt;br /&gt;&lt;br /&gt;錢世豐：請問你們有自己的作業系統嗎？&lt;br /&gt;&lt;br /&gt;Joshua：沒有，我們用Linux，我們在一些大規模的系統用Linux，但我們沒有自己的作業系統。&lt;br /&gt;&lt;br /&gt;Neal：但我在自己的筆記型電腦上做了一個「Google OS」的螢幕保護程式，當我去演講開會的時候，大家都會看到我用「Google OS」。&lt;br /&gt;&lt;br /&gt;王文彬：這是行銷？&lt;br /&gt;&lt;br /&gt;Neal：是我們在揶揄微軟。&lt;br /&gt;&lt;br /&gt;C#與Java各擅勝場&lt;br /&gt;王建興：.NET是Java的主要競爭對手，現在也有開放源碼的.NET Framework可執行於Linux，它叫做Mono，你對Mono的看法？&lt;br /&gt;&lt;br /&gt;Neal：嗯，它還不完整，是吧。有很多開放源碼的Java實作，也都不完整。很多Java的實作，都只有60%～70%的API支援，就算是90%都不夠好。那意謂著我可能會呼叫到一個不能起作用的方法。要支援全部才算有用。&lt;br /&gt;&lt;br /&gt;Joshua：像我在Java的委員會，我還是覺得即使是.NET公開的API也不會很實際，Java有完整公開的計畫，主要就是要把所有函式庫都公開。&lt;br /&gt;&lt;br /&gt;丁彬：那C#呢？C#的目的之一，就是要從Java社群挖走一些人，你們覺得呢？&lt;br /&gt;&lt;br /&gt;Neal：我認為C#的確有一些好的想法。他們有自由選擇不需要保留向下相容性，舉例來說，當他們在語言中決定增加Generics語法時，他們建立了另一套全新的Collections API，身為程式設計員或是軟體廠商，必須在原本的和新的介面中，選擇一套來使用。以語言設計的角度來說，這樣做可能比Java設計者的選擇來得好，C#有這樣的自由可以讓設計者更大幅地改良語言的設計。&lt;br /&gt;&lt;br /&gt;Joshua：我這樣說好了，「模仿」絕對是高度的讚美，何況是像C#如此公開的模仿。我不全然認為C#挖走了Java 的開發者。當你的目標是在Windows 上開發時，為了某些明顯的因素，使用C#或C++會面臨較少的整合性問題。&lt;br /&gt;&lt;br /&gt;Neal：在Java的Generics中，有Wildcard的語法，我認為這是一個極為重要的部分，它讓程式設計人員更有威力、可以更靈活的表達設計理念。C#中就沒有這項功能，這也可能和當時的程式語言社群中對於 Wildcard 的需求討論還沒這麼熱烈有關，但我認為對C#來說，要增加這項功能已經太晚了。&lt;br /&gt;&lt;br /&gt;Joshua：每一種程式語言都有它的優點和缺點，我或許有點偏頗，不過我的確很喜歡Java中這些新的功能。C# 中有太多過去Pascal及C++的影子。&lt;br /&gt;&lt;br /&gt;王建興：以一個架構師的角度，可以區別一下Java和.NET的核心的不同嗎？&lt;br /&gt;&lt;br /&gt;Joshua：我對.NET的核心沒有那麼熟，他們出現得比Java晚，所以可以針對Java的缺點改進，但如果你有看《Java Puzzlers》，你會發現還是有很多Puzzlers也同樣在C#出現。&lt;br /&gt;&lt;br /&gt;朱仲傑：《Java Puzzlers》、《Effective Java》的第二版何時會問市呢？&lt;br /&gt;&lt;br /&gt;Joshua：我在今年舊金山的JavaOne大會，於數千人面前保證，在下一屆JavaOne之前，會推出《Effective Java 2nd edition》，我會繼續努力朝著明年出版的目標努力。至於《Java Puzzlers》的第二版，希望不會再有那麼多難題了。因為越多難題與陷阱其實代表這個語言的缺點越多，只要我們不要再加入更多不好的語言特性在Java中，就不會有太多新的難題。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Java太肥了嗎？&lt;br /&gt;王文彬：我對Java的未來方向有點好奇，Java已經很成熟，若我們再持續加入新功能，會不會讓語言太過龐大而失焦？&lt;br /&gt;&lt;br /&gt;Joshua：會的，每個語言都有生命週期，有些語言持續增加新功能，導致該語言後來很難寫、很醜、難以使用，很多語言後來變成這樣，而我會盡力讓Java不變成這樣。我相信現在的Java已經是一個相當完整的語言，雖然還是有很多好的功能可以加入，但將這些東西一股腦全部加進來絕對是錯的。&lt;br /&gt;&lt;br /&gt;Neal：我覺得在JDK 5就加入了太多功能。&lt;br /&gt;&lt;br /&gt;王文彬：是的，像annotation 就是。&lt;br /&gt;&lt;br /&gt;Joshua：但是使用者喜歡耶！我是annotation技術團隊的負責人，雖然這不是我心目中最想要的功能，但是我相信它對一般的Java工程師幫助很大。&lt;br /&gt;&lt;br /&gt;Neal：有兩個我覺得後悔的功能：Static Import 和 Varargs。&lt;br /&gt;Joshua：其實Static Import我覺得並沒有太傷害Java語言本身，因為根本就很少用。Varargs在特定的時候，確實會造成無法預期的結果。&lt;br /&gt;&lt;br /&gt;錢世豐：你們最喜歡哪些Java新功能？&lt;br /&gt;&lt;br /&gt;Joshua：我覺得enum這個小功能很重要，但當初沒有規劃好enum的比較，現在的規格允許我們可以比較兩個enum是否相等，但是卻不能使用像是大於、小於來比較兩個enum。另外像switch不能使用在String 上，很多人需要這個功能，沒理由Java無法做到。我覺得像這樣的小功能，是我很希望未來的Java再加入。&lt;br /&gt;&lt;br /&gt;Neal：我自己認為有個功能是現在Java缺乏的：closures。&lt;br /&gt;&lt;br /&gt;Web 2.0的定義始終是分歧的&lt;br /&gt;朱仲傑：你們怎麼看Web 2.0呢？會覺得是泡沫嗎？&lt;br /&gt;&lt;br /&gt;Joshua：我覺得這只是大家為現在的網路現象取個名字，就像從寫HTML開始，後來有Java Script，現在有公開的API，就可以做一些Mashups（混搭程式），我覺得一些Mashups很棒，像房屋網站Zillow.com就整合Google Map，這些東西都很棒，不過這比較像是行銷人員把這種現象取了個Web 2.0的名詞。&lt;br /&gt;&lt;br /&gt;Neal：我不知道大家怎麼看待Web 2.0的意義，我認為這是把網路應用服務集合的意思，其中有些想法也是行之有年，像Amazon上可以寫書評。不過我想Web 2.0會是現在和未來一些網路服務的趨勢。&lt;br /&gt;&lt;br /&gt;Joshua：那如果說Web 2.0是平臺呢？當我們說 Web 2.0是一些以網路服務為基礎的平臺，像Amazon、Google、eBay有提供 API，這樣一些網路服務就可以利用其他網站現有的平臺提供更多應用。&lt;br /&gt;&lt;br /&gt;錢世豐：我覺得直到有租屋網站和Google Map整合後，大家才開始注意Web 2.0的現象。&lt;br /&gt;&lt;br /&gt;Neal：我覺得大家對Web 2.0的定義都不大相同，幾年後如果Web 2.0成功了，這個詞就還會存在；如果沒有成功，就不會再叫Web 2.0了。&lt;br /&gt;&lt;br /&gt;錢世豐：有些人說GMail與Google Map是 Web 2.0 的開始。&lt;br /&gt;Joshua：Google Map無疑的是屬於Web 2.0服務，你看Zillow.com就是整合Google Map的應用。整理⊙李延華&lt;br /&gt;&lt;br /&gt;Joshua Bloch&lt;br /&gt;Google首席架構師，著有《Effective Java》、《Java Puzzlers》“當你要建立一個像Google這樣規模的搜尋服務，你可以想像會有多少問題，但是我們就是要持續的讓服務運作下去，盡量讓系統可以自動修復，不要造成延遲。”&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Neal Gafter&lt;br /&gt;Google專任工程師兼Java講師，著有《Java Puzzlers》“使用AJAX撰寫應用程式，會比用Java用戶端技術撰寫應用程式花上更多力氣，因為可攜性不會是免費奉送的。”&lt;/div&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/3609434846572267016/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/3609434846572267016' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/3609434846572267016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/3609434846572267016'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2010/08/googlejava.html' title='技術對談－看Google怎麼用Java'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-5696694221820508790</id><published>2010-08-19T14:07:00.001+08:00</published><updated>2010-08-19T14:07:47.851+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Reading"/><title type='text'>記錄：人月神話</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Tahoma, Arial, serif; font-size: 12px; color: rgb(51, 51, 51); line-height: 21px; &quot;&gt;曾經接過急迫且大型的網站建置專案，但是進行上卻還算順利，這是由於系統工程師十分有經驗，在分工、次序與掌控上，都做了很好的安排。&lt;br /&gt;但在最近的一個朋友的經驗中，卻是遇到網站的機制改版，在時程與資源運用上卻不斷延遲，還好是內部機制，不用對客戶交代，否則所蒙受的將不是只有金錢上的損失。&lt;br /&gt;我們知道時程延遲，但原因在哪裡？為何會發生？&lt;br /&gt;人月神話的第二章，應該是這本書的精華，也是書名的由來，看完這個章節，發現作者道出很多軟體專案上的管理關鍵。而軟體專案是不可以完全套用傳統產業的專案管理方式。&lt;br /&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;第一個關鍵 樂觀&lt;/b&gt;&lt;br /&gt;首先作者提出了一件常常發生的事情，這也是一個朋友身上發生的故事：『程式設計師都是樂觀的傢伙。』而且我發現越年輕越樂觀，但是無可避免的這是個年輕的產業，很少會遇到很有經驗的程式設計人員，這些年輕人，即使告訴他這樣是會有問題的，他也不改其樂觀。&lt;br /&gt;所以『他們所做的第一個錯誤假設是一切都會進行的很順利』可是沒有想到一個bug，就可以花上一天時間也無法解決。然後，就延遲了後面本來假設可以順利進行的部分。&lt;br /&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;第二個關鍵 人月&lt;/b&gt;&lt;br /&gt;人月，是我們預估和排定時程用的，但是作者提出一個前提：『使用人月必須要在人力與工時可以互換的狀況下。而且要當工作可以切割、投入工作的人不用溝通，人力與工時才能互換。』就是說要可以互換，才能使一個人做30天，與30個人做一天的結果一樣，不然單純用人月去估算時程，一定會有誤差。&lt;br /&gt;為什麼呢？首先軟體專案有其連續性，作者舉了個例子，蠻傳神的，他說，生小孩就是要九個月，你叫多少個媽來生都是一樣。第二點是因為即使工作可切割，但是需要溝通，越多人投入就需要多的溝通與教育的時間，所以一個人做30天的工作不可能用30個人做一天就完成。&lt;br /&gt;所以，Brooks定論說，在一個時程已經落後的軟體專案中增加人手，只會讓它更加落後。&lt;br /&gt;因此，要讓一個專案順利進行，首先要有良好的時程規劃，考慮所有的因素，而且，程式人員要有勇氣不要妥協，堅持自己預估的時程。就像是廚師一樣，即使外面的客人在等著上菜，一隻雞要烤多久就要烤多久，不能因為妥協就用大火烤焦了。&lt;br /&gt;&lt;b style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; &quot;&gt;外科手術團隊&lt;/b&gt;&lt;br /&gt;這個篇章看完突然想到研究所的專案管理課程，三個學分，卻是我們一個學期的研究重心，四個實際運作的專案，大家分組進行，教授不斷的製造專案危機，像是公司被併購、人員流失、專案形式改變、客戶不斷施以壓力等等，但最後大家還是順利的結案。&lt;br /&gt;這是個難以忘懷的經驗，組員們的默契在起初的確造成危機，但是，由於大家的素質還算整齊，很快就可以建立溝通的語言。加上大家熟悉協同科技概念與網路溝通，可以做到分時分地作業，也使得專案進行有效率。&lt;br /&gt;但當我看完這篇外科手術團隊後，我發現其實還有個成功的關鍵在其中，就是同學們各有專長，所以，分工很容易，又因為有選出leader作為掌控者，所以，不會亂。大家不會做重複的事情。每個人按照時程交差，就可以順利完成。&lt;br /&gt;作者認為一個外科手術中，有操刀的大夫，有護士、有麻醉師等等，各司其職。而不是像屠夫團隊，每個人都得拿刀。一個團隊中只有一個人操刀，其他人扮演支援的角色。這樣整件事情就會出自一個腦袋不會亂，也不需要不斷的溝通協調。&lt;br /&gt;這兩個篇章是我比較有感覺的，寫出來跟大家分享。&lt;br /&gt;最後，作者還有一個人月的概念我覺得很重要，這會影響到組織的公平性：一個好手，花一天可以做完，但同樣一件事，庸才卻需要三四天以上，甚至加班趕工，也許還領加班費。如果照這樣去計算人月，一定會差之千里。&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/5696694221820508790/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/5696694221820508790' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/5696694221820508790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/5696694221820508790'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2010/08/blog-post.html' title='記錄：人月神話'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-7249138645042643111</id><published>2010-06-10T10:32:00.001+08:00</published><updated>2010-06-10T10:32:56.806+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Language"/><title type='text'>[轉貼記錄] hibernate學習筆記</title><content type='html'>&lt;h1 class=&quot;title_txt&quot;&gt;                     &lt;img src=&quot;http://blog.csdn.net/images/authorship.gif&quot; alt=&quot;原创&quot; border=&quot;0&quot; height=&quot;15&quot; width=&quot;15&quot; /&gt;                      hibernate學習筆記：hibernate中的Cache管理                     &lt;cite class=&quot;fav_csdnstylebykimi&quot;&gt;&lt;a href=&quot;javascript:d=document;t=d.selection?(d.selection.type!=&#39;None&#39;?d.selection.createRange().text:&#39;&#39;):(d.getSelection?d.getSelection():&#39;&#39;);void(saveit=window.open(&#39;http://wz.csdn.net/storeit.aspx?t=&#39;+escape(d.title)+&#39;&amp;amp;u=&#39;+escape(d.location.href)+&#39;&amp;amp;c=&#39;+escape(t),&#39;saveit&#39;,&#39;scrollbars=no,width=590,height=300,left=75,top=20,status=no,resizable=yes&#39;));saveit.focus();&quot; class=&quot;fav_csdnstylebykimi&quot; title=&quot;收藏到我的網摘中，並分享給我的朋友&quot;&gt;收藏&lt;/a&gt; &lt;/cite&gt;                                      &lt;/h1&gt;                                       &lt;script type=&quot;text/javascript&quot;&gt;                         document.body.oncopy = function() {                             if (window.clipboardData) {                                 setTimeout(function() {                                     var text = clipboardData.getData(&quot;text&quot;);                                     if (text &amp;&amp; text.length &gt; 300) {                                         text = text + &quot;\r\n\n本文來自CSDN博客，轉載請標明出處：&quot; + location.href;                                         clipboardData.setData(&quot;text&quot;, text);                                     }                                 }, 100);                             }                         }      &lt;/script&gt;                      &lt;script type=&quot;text/javascript&quot;&gt;                        function StorePage() { d = document; t = d.selection ? (d.selection.type != &#39;None&#39; ? d.selection.createRange().text : &#39;&#39;) : (d.getSelection ? d.getSelection() : &#39;&#39;); void (keyit = window.open(&#39;http://www.365key.com/storeit.aspx?t=&#39; + escape(d.title) + &#39;&amp;u=&#39; + escape(d.location.href) + &#39;&amp;c=&#39; + escape(t), &#39;keyit&#39;, &#39;scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes&#39;)); keyit.focus(); }&lt;/script&gt;                      &lt;p&gt;Hibernate 中實現了良好的Cache 機制，我們可以借助Hibernate  內部的Cache迅速提高系統數據讀取性能。&lt;/p&gt;&lt;p&gt;需要注意的是：Hibernate做為一個應用級的數據訪問層封裝，只能在其作用範圍內保持 Cache中數據的的有效性，也就是說，在我們的系統與第三方系統共享數據庫的情況下，Hibernate的Cache機制可能失效。一個很簡單的例子， 如果你用access修改了庫中的值，那麼這就不會更新JVM中的緩衝池，這就導致了贓數據的產生。&lt;/p&gt;&lt;p&gt;Hibernate 在本地JVM  中維護了一個緩衝池，並將從數據庫獲得的數據保存到池中以供下次重複使用（如果在Hibernate中數據發生了變動，Hibernate同樣也會更新池 中的數據版本）。此時，如果有第三方系統對數據庫進行了更改，那麼，Hibernate並不知道數據庫中的數據已經發生了變化，也就是說，池中的數據還是 修改之前的版本，下次讀取時，Hibernate會將此數據返回給上層代碼，從而導致潛在的問題。外部系統的定義，並非限於本系統之外的第三方系統，即使 在本系統中，如果出現了繞過Hibernate數據存儲機制的其他數據存取手段，那麼Cache的有效性也必須細加考量。如，在同一套系統中，基於 Hibernate和基於JDBC的兩種數據訪問方式並存，那麼通過JDBC更新數據庫的時候，Hibernate同樣無法獲知數據更新的情況，從而導致 髒數據的出現。&lt;/p&gt;&lt;p&gt;基於Java 的Cache 實現，最簡單的莫過於HashTable，hibernate 提供了基於Hashtable  的Cache 實現機制，不過，由於其性能和功能上的侷限，僅供開發調試中使用。同時，Hibernate 還提供了面向第三方Cache  實現的接口，如JCS、EHCache、OSCache、JBoss Cache、SwarmCache等。&lt;/p&gt;&lt;p&gt;Hibernate中的 Cache大致分為兩層，第一層Cache在Session實現，屬於事務級數據緩衝，一旦事務結束，這個Cache 也就失效。此層Cache  為內置實現，無需我們進行干涉。第二層Cache，是Hibernate 中對其實例範圍內的數據進行緩存的管理容器。&lt;/p&gt;&lt;p&gt;我們主要學習第二層 Cache。&lt;/p&gt;&lt;p&gt;Hibernate早期版本中採用了JCS（Java Caching System －Apache  Turbine項目中的一個子項目）作為默認的第二層Cache實現。由於JCS的發展停頓，以及其內在的一些問題（在某些情況下，可能導致內存洩漏以及 死鎖），新版本的Hibernate已經將JCS去除，並用EHCache作為其默認的第二級Cache實現。相對JCS，EHCache更加穩定，並具 備更好的緩存調度性能，缺陷是目前還無法做到分佈式緩存，如果我們的系統需要在多台設備上部署，並共享同一個數據庫，必須使用支持分佈式緩存的Cache 實現（如JCS、JBossCache）以避免出現不同系統實例之間緩存不一致而導致髒數據的情況。Hibernate對Cache進行了良好封裝，透明 化的Cache機制使得我們在上層結構的實現中無需面對繁瑣的Cache維護細節。&lt;/p&gt;&lt;p&gt;目前Hibernate支持的Cache實現有：&lt;/p&gt;&lt;p&gt;HashTable：net.sf.hibernate.cache.HashtableCacheProvider   支持查詢緩衝。&lt;/p&gt;&lt;p&gt;EHCache：net.sf.ehcache.hibernate.Provider 支持查詢緩衝。&lt;/p&gt;&lt;p&gt;OSCache：net.sf.hibernate.cache.OSCacheProvider  支持查詢緩衝。&lt;/p&gt;&lt;p&gt;SwarmCache：net.sf.hibernate.cache.SwarmCacheProvider  支持集群。&lt;/p&gt;&lt;p&gt;JBossCache：net.sf.hibernate.cache.TreeCacheProvider 支持集群。&lt;/p&gt;&lt;p&gt;其 中SwarmCache 提供的是invalidation  方式的分佈式緩存，即當集群中的某個節點更新了緩存中的數據，即通知集群中的其他節點將此數據廢除，之後各個節點需要用到這個數據的時候，會重新從數據庫 中讀入並填充到緩存中。而JBossCache提供的是Reapplication式的緩衝，即如果集群中某個節點的數據發生改變，此節點會將發生改變的 數據的最新版本複製到集群中的每個節點中以保持所有節點狀態一致。&lt;/p&gt;&lt;p&gt;使用第二層Cache，需要在hibernate的配置文件進行配置（省 略）主要介紹一下cache策略&lt;/p&gt;&lt;p&gt;cache策略可選值有以下幾種：&lt;/p&gt;&lt;p&gt;1． read-only 只讀。&lt;br /&gt;2．  read-write 可讀可寫。&lt;br /&gt;3． nonstrict-read-write   如果程序對並發數據修改要求不是非常嚴格，只是偶爾需要更新數據，可以採用本選項，以減少無謂的檢查，獲得較好的性能。&lt;br /&gt;4．  transactional 事務性cache。在事務性Cache 中，Cache  的相關操作也被添加到事務之中，如果由於某種原因導致事務失敗，我們可以連同緩衝池中的數據一同回滾到事務開始之前的狀態。目前Hibernate  內置的Cache 中，只有JBossCache 支持事務性的Cache實現。&lt;/p&gt;&lt;p&gt;其他參數簡介：&lt;/p&gt;&lt;p&gt;maxElementsInMemory=&quot;10000&quot;      //Cache中最大允許保存的數據數量&lt;br /&gt;eternal=&quot;false&quot;                                       //Cache中數據是否為常量&lt;br /&gt;timeToIdleSeconds=&quot;120&quot;                 //緩存數據鈍化時間&lt;br /&gt;timeToLiveSeconds=&quot;120&quot;                 //緩存數據的生存時間&lt;br /&gt;overflowToDisk=&quot;true&quot;                        //內存不足時，是否啟 用磁盤緩存&lt;/p&gt;&lt;p&gt;需要注意的是Hibernate  的數據庫查詢機制。我們從查詢結果中取出數據的時候，用的最多的是兩個方法：Query.list();Query.iterate();&lt;/p&gt;&lt;p&gt;對 於list方法而言，實際上Hibernate是通過一條Select SQL獲取所有的記錄。並將其讀出，填入到POJO中返回。&lt;/p&gt;&lt;p&gt;而iterate  方法，則是首先通過一條Select SQL 獲取所有符合查詢條件的記錄的id，再對這個id 集合進行循環操作，通過單獨的Select SQL  取出每個id 所對應的記錄，之後填入POJO中返回。&lt;/p&gt;&lt;p&gt;也就是說，對於list 操作，需要一條SQL 完成。而對於iterate  操作，需要n+1條SQL。&lt;/p&gt;&lt;p&gt;看上去iterate方法似乎有些多餘，但在不同的情況下確依然有其獨特的功效，如對海量數據的查詢，如果用 list方法將結果集一次取出，內存的開銷可能無法承受。另一方面，對於我們現在的Cache機制而言，list方法將不會從Cache中讀取數據，它總 是一次性從數據庫中直接讀出所有符合條件的記錄。而iterate  方法因為每次根據id獲取數據，這樣的實現機制也就為從Cache讀取數據提供了可能，hibernate首先會根據這個id 在本地Cache  內尋找對應的數據，如果沒找到，再去數據庫中檢索。&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/7249138645042643111/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/7249138645042643111' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/7249138645042643111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/7249138645042643111'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2010/06/hibernate.html' title='[轉貼記錄] hibernate學習筆記'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-2299780752974086271</id><published>2010-06-08T23:04:00.001+08:00</published><updated>2010-06-08T23:04:55.182+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Language"/><title type='text'>Servlet 3.0 新特性詳解</title><content type='html'>Servlet 3.0 新特性詳解&lt;br /&gt;&lt;br /&gt;張 建平, 架構師, iSoftStone Co., Ltd&lt;br /&gt;張建平，長期從事於 Java 開發的工作，對 Java EE 規範體系有深入研究，最近主要關注高並發的 Web 架構設計以及把既有項目 SOA 化的問題。&lt;br /&gt;&lt;br /&gt;簡介： Servlet 是 Java EE 規範體系的重要組成部分，也是 Java 開發人員必須具備的基礎技能，Servlet 3.0 是 Servlet 規範的最新版本。本文主要介紹了 Servlet 3.0 引入的若干重要新特性，包括異步處理、新增的註解支持、可插性支持等等，為讀者順利向新版本過渡掃清障礙。&lt;br /&gt;&lt;br /&gt;發佈日期： 2010 年 4 月 23 日&lt;br /&gt;級別： 初級&lt;br /&gt;1 star2 stars3 stars4 stars5 stars 平均分 （共 23 個評分 ）&lt;br /&gt;&lt;br /&gt;Servlet 3.0 新特性概述&lt;br /&gt;&lt;br /&gt;Servlet 3.0 作為 Java EE 6 規範體系中一員，隨著 Java EE 6 規範一起發佈。該版本在前一版本（Servlet 2.5）的基礎上提供了若干新特性用於簡化 Web 應用的開發和部署。其中有幾項特性的引入讓開發者感到非常興奮，同時也獲得了 Java 社區的一片讚譽之聲：&lt;br /&gt;&lt;br /&gt;  1. 異步處理支持：有了該特性，Servlet 線程不再需要一直阻塞，直到業務處理完畢才能再輸出響應，最後才結束該 Servlet 線程。在接收到請求之後，Servlet 線程可以將耗時的操作委派給另一個線程來完成，自己在不生成響應的情況下返回至容器。針對業務處理較耗時的情況，這將大大減少服務器資源的佔用，並且提高並發處理速度。&lt;br /&gt;  2. 新增的註解支持：該版本新增了若干註解，用於簡化 Servlet、過濾器（Filter）和監聽器（Listener）的聲明，這使得 web.xml 部署描述文件從該版本開始不再是必選的了。&lt;br /&gt;  3. 可插性支持：熟悉 Struts2 的開發者一定會對其通過插件的方式與包括 Spring 在內的各種常用框架的整合特性記憶猶新。將相應的插件封裝成 JAR 包並放在類路徑下，Struts2 運行時便能自動加載這些插件。現在 Servlet 3.0 提供了類似的特性，開發者可以通過插件的方式很方便的擴充已有 Web 應用的功能，而不需要修改原有的應用。&lt;br /&gt;&lt;br /&gt;下面我們將逐一講解這些新特性，通過下面的學習，讀者將能夠明晰瞭解 Servlet 3.0 的變化，並能夠順利使用它進行日常的開發工作。&lt;br /&gt;&lt;br /&gt;回頁首&lt;br /&gt;&lt;br /&gt;異步處理支持&lt;br /&gt;&lt;br /&gt;Servlet 3.0 之前，一個普通 Servlet 的主要工作流程大致如下：首先，Servlet 接收到請求之後，可能需要對請求攜帶的數據進行一些預處理；接著，調用業務接口的某些方法，以完成業務處理；最後，根據處理的結果提交響應，Servlet 線程結束。其中第二步的業務處理通常是最耗時的，這主要體現在數據庫操作，以及其它的跨網絡調用等，在此過程中，Servlet 線程一直處於阻塞狀態，直到業務方法執行完畢。在處理業務的過程中，Servlet 資源一直被佔用而得不到釋放，對於並發較大的應用，這有可能造成性能的瓶頸。對此，在以前通常是採用私有解決方案來提前結束 Servlet 線程，並及時釋放資源。&lt;br /&gt;&lt;br /&gt;Servlet 3.0 針對這個問題做了開創性的工作，現在通過使用 Servlet 3.0 的異步處理支持，之前的 Servlet 處理流程可以調整為如下的過程：首先，Servlet 接收到請求之後，可能首先需要對請求攜帶的數據進行一些預處理；接著，Servlet 線程將請求轉交給一個異步線程來執行業務處理，線程本身返回至容器，此時 Servlet 還沒有生成響應數據，異步線程處理完業務以後，可以直接生成響應數據（異步線程擁有 ServletRequest 和 ServletResponse 對象的引用），或者將請求繼續轉發給其它 Servlet。如此一來， Servlet 線程不再是一直處於阻塞狀態以等待業務邏輯的處理，而是啟動異步線程之後可以立即返回。&lt;br /&gt;&lt;br /&gt;異步處理特性可以應用於 Servlet 和過濾器兩種組件，由於異步處理的工作模式和普通工作模式在實現上有著本質的區別，因此默認情況下，Servlet 和過濾器並沒有開啟異步處理特性，如果希望使用該特性，則必須按照如下的方式啟用：&lt;br /&gt;&lt;br /&gt;  1. 對於使用傳統的部署描述文件 (web.xml) 配置 Servlet 和過濾器的情況，Servlet 3.0 為 &lt;servlet&gt; 和 &lt;filter&gt; 標籤增加了 &lt;async-supported&gt; 子標籤，該標籤的默認取值為 false，要啟用異步處理支持，則將其設為 true 即可。以 Servlet 為例，其配置方式如下所示：&lt;br /&gt;&lt;br /&gt;     &lt;servlet&gt;&lt;br /&gt;         &lt;servlet-name&gt;DemoServlet&lt;/servlet-name&gt;&lt;br /&gt;         &lt;servlet-class&gt;footmark.servlet.Demo Servlet&lt;/servlet-class&gt;&lt;br /&gt;         &lt;async-supported&gt;true&lt;/async-supported&gt;&lt;br /&gt;     &lt;/servlet&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  2. 對於使用 Servlet 3.0 提供的 @WebServlet 和 @WebFilter 進行 Servlet 或過濾器配置的情況，這兩個註解都提供了 asyncSupported 屬性，默認該屬性的取值為 false，要啟用異步處理支持，只需將該屬性設置為 true 即可。以 @WebFilter 為例，其配置方式如下所示：&lt;br /&gt;&lt;br /&gt;@WebFilter(urlPatterns = &quot;/demo&quot;,asyncSupported = true)&lt;br /&gt;public class DemoFilter implements Filter{...}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;一個簡單的模擬異步處理的 Servlet 示例如下：&lt;br /&gt;&lt;br /&gt;@WebServlet(urlPatterns = &quot;/demo&quot;, asyncSupported = true)&lt;br /&gt;public class AsyncDemoServlet extends HttpServlet {&lt;br /&gt;   @Override&lt;br /&gt;   public void doGet(HttpServletRequest req, HttpServletResponse resp)&lt;br /&gt;   throws IOException, ServletException {&lt;br /&gt;       resp.setContentType(&quot;text/html;charset=UTF-8&quot;);&lt;br /&gt;       PrintWriter out = resp.getWriter();&lt;br /&gt;       out.println(&quot;進入Servlet的時間：&quot; + new Date() + &quot;.&quot;);&lt;br /&gt;       out.flush();&lt;br /&gt;&lt;br /&gt;       //在子線程中執行業務調用，並由其負責輸出響應，主線程退出&lt;br /&gt;       AsyncContext ctx = req.startAsync();&lt;br /&gt;       new Thread(new Executor(ctx)).start();&lt;br /&gt;&lt;br /&gt;       out.println(&quot;結束Servlet的時間：&quot; + new Date() + &quot;.&quot;);&lt;br /&gt;       out.flush();&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class Executor implements Runnable {&lt;br /&gt;   private AsyncContext ctx = null;&lt;br /&gt;   public Executor(AsyncContext ctx){&lt;br /&gt;       this.ctx = ctx;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public void run(){&lt;br /&gt;       try {&lt;br /&gt;           //等待十秒鐘，以模擬業務方法的執行&lt;br /&gt;           Thread.sleep(10000);&lt;br /&gt;           PrintWriter out = ctx.getResponse().getWriter();&lt;br /&gt;           out.println(&quot;業務處理完畢的時間：&quot; + new Date() + &quot;.&quot;);&lt;br /&gt;           out.flush();&lt;br /&gt;           ctx.complete();&lt;br /&gt;       } catch (Exception e) {&lt;br /&gt;           e.printStackTrace();&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;除此之外，Servlet 3.0 還為異步處理提供了一個監聽器，使用 AsyncListener 接口表示。它可以監控如下四種事件：&lt;br /&gt;&lt;br /&gt;  1. 異步線程開始時，調用 AsyncListener 的 onStartAsync(AsyncEvent event) 方法；&lt;br /&gt;  2. 異步線程出錯時，調用 AsyncListener 的 onError(AsyncEvent event) 方法；&lt;br /&gt;  3. 異步線程執行超時，則調用 AsyncListener 的 onTimeout(AsyncEvent event) 方法；&lt;br /&gt;  4. 異步執行完畢時，調用 AsyncListener 的 onComplete(AsyncEvent event) 方法；&lt;br /&gt;&lt;br /&gt;要註冊一個 AsyncListener，只需將準備好的 AsyncListener 對象傳遞給 AsyncContext 對象的 addListener() 方法即可，如下所示：&lt;br /&gt;&lt;br /&gt;AsyncContext ctx = req.startAsync();&lt;br /&gt;ctx.addListener(new AsyncListener() {&lt;br /&gt;   public void onComplete(AsyncEvent asyncEvent) throws IOException {&lt;br /&gt;       // 做一些清理工作或者其他&lt;br /&gt;   }&lt;br /&gt;   ...&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;回頁首&lt;br /&gt;&lt;br /&gt;新增的註解支持&lt;br /&gt;&lt;br /&gt;Servlet 3.0 的部署描述文件 web.xml 的頂層標籤 &lt;web-app&gt; 有一個 metadata-complete 屬性，該屬性指定當前的部署描述文件是否是完全的。如果設置為 true，則容器在部署時將只依賴部署描述文件，忽略所有的註解（同時也會跳過 web-fragment.xml 的掃瞄，亦即禁用可插性支持，具體請看後文關於 可插性支持的講解）；如果不配置該屬性，或者將其設置為 false，則表示啟用註解支持（和可插性支持）。&lt;br /&gt;&lt;br /&gt;@WebServlet&lt;br /&gt;&lt;br /&gt;@WebServlet 用於將一個類聲明為 Servlet，該註解將會在部署時被容器處理，容器將根據具體的屬性配置將相應的類部署為 Servlet。該註解具有下表給出的一些常用屬性（以下所有屬性均為可選屬性，但是 vlaue 或者 urlPatterns 通常是必需的，且二者不能共存，如果同時指定，通常是忽略 value 的取值）：&lt;br /&gt;&lt;br /&gt;表 1. @WebServlet 主要屬性列表&lt;br /&gt;屬性名  類型  描述&lt;br /&gt;name  String  指定 Servlet 的 name 屬性，等價於 &lt;servlet-name&gt;。如果沒有顯式指定，則該 Servlet 的取值即為類的全限定名。&lt;br /&gt;value  String[]  該屬性等價於 urlPatterns 屬性。兩個屬性不能同時使用。&lt;br /&gt;urlPatterns  String[]  指定一組 Servlet 的 URL 匹配模式。等價於 &lt;url-pattern&gt; 標籤。&lt;br /&gt;loadOnStartup  int  指定 Servlet 的加載順序，等價於 &lt;load-on-startup&gt; 標籤。&lt;br /&gt;initParams  WebInitParam[]  指定一組 Servlet 初始化參數，等價於 &lt;init-param&gt; 標籤。&lt;br /&gt;asyncSupported  boolean  聲明 Servlet 是否支持異步操作模式，等價於 &lt;async-supported&gt; 標籤。&lt;br /&gt;description  String  該 Servlet 的描述信息，等價於 &lt;description&gt; 標籤。&lt;br /&gt;displayName  String  該 Servlet 的顯示名，通常配合工具使用，等價於 &lt;display-name&gt; 標籤。&lt;br /&gt;&lt;br /&gt;下面是一個簡單的示例：&lt;br /&gt;&lt;br /&gt;@WebServlet(urlPatterns = {&quot;/simple&quot;}, asyncSupported = true,&lt;br /&gt;loadOnStartup = -1, name = &quot;SimpleServlet&quot;, displayName = &quot;ss&quot;,&lt;br /&gt;initParams = {@WebInitParam(name = &quot;username&quot;, value = &quot;tom&quot;)}&lt;br /&gt;)&lt;br /&gt;public class SimpleServlet extends HttpServlet{ … }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;如此配置之後，就可以不必在 web.xml 中配置相應的 &lt;servlet&gt; 和 &lt;servlet-mapping&gt; 元素了，容器會在部署時根據指定的屬性將該類發佈為 Servlet。它的等價的 web.xml 配置形式如下：&lt;br /&gt;&lt;br /&gt;&lt;servlet&gt;&lt;br /&gt;   &lt;display-name&gt;ss&lt;/display-name&gt;&lt;br /&gt;   &lt;servlet-name&gt;SimpleServlet&lt;/servlet-name&gt;&lt;br /&gt;   &lt;servlet-class&gt;footmark.servlet.SimpleServlet&lt;/servlet-class&gt;&lt;br /&gt;   &lt;load-on-startup&gt;-1&lt;/load-on-startup&gt;&lt;br /&gt;   &lt;async-supported&gt;true&lt;/async-supported&gt;&lt;br /&gt;   &lt;init-param&gt;&lt;br /&gt;       &lt;param-name&gt;username&lt;/param-name&gt;&lt;br /&gt;       &lt;param-value&gt;tom&lt;/param-value&gt;&lt;br /&gt;   &lt;/init-param&gt;&lt;br /&gt;&lt;/servlet&gt;&lt;br /&gt;&lt;servlet-mapping&gt;&lt;br /&gt;   &lt;servlet-name&gt;SimpleServlet&lt;/servlet-name&gt;&lt;br /&gt;   &lt;url-pattern&gt;/simple&lt;/url-pattern&gt;&lt;br /&gt;&lt;/servlet-mapping&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@WebInitParam&lt;br /&gt;&lt;br /&gt;該註解通常不單獨使用，而是配合 @WebServlet 或者 @WebFilter 使用。它的作用是為 Servlet 或者過濾器指定初始化參數，這等價於 web.xml 中 &lt;servlet&gt; 和 &lt;filter&gt; 的 &lt;init-param&gt; 子標籤。@WebInitParam 具有下表給出的一些常用屬性：&lt;br /&gt;&lt;br /&gt;表 2. @WebInitParam 的常用屬性&lt;br /&gt;屬性名  類型  是否可選  描述&lt;br /&gt;name  String  否 指定參數的名字，等價於 &lt;param-name&gt;。&lt;br /&gt;value  String  否 指定參數的值，等價於 &lt;param-value&gt;。&lt;br /&gt;description  String  是 關於參數的描述，等價於 &lt;description&gt;。&lt;br /&gt;&lt;br /&gt;@WebFilter&lt;br /&gt;&lt;br /&gt;@WebFilter 用於將一個類聲明為過濾器，該註解將會在部署時被容器處理，容器將根據具體的屬性配置將相應的類部署為過濾器。該註解具有下表給出的一些常用屬性 ( 以下所有屬性均為可選屬性，但是 value、urlPatterns、servletNames 三者必需至少包含一個，且 value 和 urlPatterns 不能共存，如果同時指定，通常忽略 value 的取值 )：&lt;br /&gt;&lt;br /&gt;表 3. @WebFilter 的常用屬性&lt;br /&gt;屬性名  類型  描述&lt;br /&gt;filterName  String  指定過濾器的 name 屬性，等價於 &lt;filter-name&gt;&lt;br /&gt;value  String[]  該屬性等價於 urlPatterns 屬性。但是兩者不應該同時使用。&lt;br /&gt;urlPatterns  String[]  指定一組過濾器的 URL 匹配模式。等價於 &lt;url-pattern&gt; 標籤。&lt;br /&gt;servletNames  String[]  指定過濾器將應用於哪些 Servlet。取值是 @WebServlet 中的 name 屬性的取值，或者是 web.xml 中 &lt;servlet-name&gt; 的取值。&lt;br /&gt;dispatcherTypes  DispatcherType  指定過濾器的轉發模式。具體取值包括：&lt;br /&gt;ASYNC、ERROR、 FORWARD、INCLUDE、REQUEST。&lt;br /&gt;initParams  WebInitParam[]  指定一組過濾器初始化參數，等價於 &lt;init-param&gt; 標籤。&lt;br /&gt;asyncSupported  boolean  聲明過濾器是否支持異步操作模式，等價於 &lt;async-supported&gt; 標籤。&lt;br /&gt;description  String  該過濾器的描述信息，等價於 &lt;description&gt; 標籤。&lt;br /&gt;displayName  String  該過濾器的顯示名，通常配合工具使用，等價於 &lt;display-name&gt; 標籤。&lt;br /&gt;&lt;br /&gt;下面是一個簡單的示例：&lt;br /&gt;&lt;br /&gt;@WebFilter(servletNames = {&quot;SimpleServlet&quot;},filterName=&quot;SimpleFilter&quot;)&lt;br /&gt;public class LessThanSixFilter implements Filter{...}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;如此配置之後，就可以不必在 web.xml 中配置相應的 &lt;filter&gt; 和 &lt;filter-mapping&gt; 元素了，容器會在部署時根據指定的屬性將該類發佈為過濾器。它等價的 web.xml 中的配置形式為：&lt;br /&gt;&lt;br /&gt;&lt;filter&gt;&lt;br /&gt;   &lt;filter-name&gt;SimpleFilter&lt;/filter-name&gt;&lt;br /&gt;   &lt;filter-class&gt;xxx&lt;/filter-class&gt;&lt;br /&gt;&lt;/filter&gt;&lt;br /&gt;&lt;filter-mapping&gt;&lt;br /&gt;   &lt;filter-name&gt;SimpleFilter&lt;/filter-name&gt;&lt;br /&gt;   &lt;servlet-name&gt;SimpleServlet&lt;/servlet-name&gt;&lt;br /&gt;&lt;/filter-mapping&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@WebListener&lt;br /&gt;&lt;br /&gt;該註解用於將類聲明為監聽器，被 @WebListener 標註的類必須實現以下至少一個接口：&lt;br /&gt;&lt;br /&gt;   * ServletContextListener&lt;br /&gt;   * ServletContextAttributeListener&lt;br /&gt;   * ServletRequestListener&lt;br /&gt;   * ServletRequestAttributeListener&lt;br /&gt;   * HttpSessionListener&lt;br /&gt;   * HttpSessionAttributeListener&lt;br /&gt;&lt;br /&gt;該註解使用非常簡單，其屬性如下：&lt;br /&gt;&lt;br /&gt;表 4. @WebListener 的常用屬性&lt;br /&gt;屬性名  類型  是否可選  描述&lt;br /&gt;value  String  是 該監聽器的描述信息。&lt;br /&gt;&lt;br /&gt;一個簡單示例如下：&lt;br /&gt;&lt;br /&gt;@WebListener(&quot;This is only a demo listener&quot;)&lt;br /&gt;public class SimpleListener implements ServletContextListener{...}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;如此，則不需要在 web.xml 中配置 &lt;listener&gt; 標籤了。它等價的 web.xml 中的配置形式如下：&lt;br /&gt;&lt;br /&gt;&lt;listener&gt;&lt;br /&gt;   &lt;listener-class&gt;footmark.servlet.SimpleListener&lt;/listener-class&gt;&lt;br /&gt;&lt;/listener&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@MultipartConfig&lt;br /&gt;&lt;br /&gt;該註解主要是為了輔助 Servlet 3.0 中 HttpServletRequest 提供的對上傳文件的支持。該註解標註在 Servlet 上面，以表示該 Servlet 希望處理的請求的 MIME 類型是 multipart/form-data。另外，它還提供了若干屬性用於簡化對上傳文件的處理。具體如下：&lt;br /&gt;&lt;br /&gt;表 5. @MultipartConfig 的常用屬性&lt;br /&gt;屬性名 類型 是否可選 描述&lt;br /&gt;fileSizeThreshold  int  是 當數據量大於該值時，內容將被寫入文件。&lt;br /&gt;location  String  是 存放生成的文件地址。&lt;br /&gt;maxFileSize  long  是 允許上傳的文件最大值。默認值為 -1，表示沒有限制。&lt;br /&gt;maxRequestSize  long  是 針對該 multipart/form-data 請求的最大數量，默認值為 -1，表示沒有限制。&lt;br /&gt;&lt;br /&gt;回頁首&lt;br /&gt;&lt;br /&gt;可插性支持&lt;br /&gt;&lt;br /&gt;如果說 3.0 版本新增的註解支持是為了簡化 Servlet/ 過濾器 / 監聽器的聲明，從而使得 web.xml 變為可選配置， 那麼新增的可插性 (pluggability) 支持則將 Servlet 配置的靈活性提升到了新的高度。熟悉 Struts2 的開發者都知道，Struts2 通過插件的形式提供了對包括 Spring 在內的各種開發框架的支持，開發者甚至可以自己為 Struts2 開發插件，而 Servlet 的可插性支持正是基於這樣的理念而產生的。使用該特性，現在我們可以在不修改已有 Web 應用的前提下，只需將按照一定格式打成的 JAR 包放到 WEB-INF/lib 目錄下，即可實現新功能的擴充，不需要額外的配置。&lt;br /&gt;&lt;br /&gt;Servlet 3.0 引入了稱之為「Web 模塊部署描述符片段」的 web-fragment.xml 部署描述文件，該文件必須存放在 JAR 文件的 META-INF 目錄下，該部署描述文件可以包含一切可以在 web.xml 中定義的內容。JAR 包通常放在 WEB-INF/lib 目錄下，除此之外，所有該模塊使用的資源，包括 class 文件、配置文件等，只需要能夠被容器的類加載器鏈加載的路徑上，比如 classes 目錄等。&lt;br /&gt;&lt;br /&gt;現在，為一個 Web 應用增加一個 Servlet 配置有如下三種方式 ( 過濾器、監聽器與 Servlet 三者的配置都是等價的，故在此以 Servlet 配置為例進行講述，過濾器和監聽器具有與之非常類似的特性 )：&lt;br /&gt;&lt;br /&gt;   * 編寫一個類繼承自 HttpServlet，將該類放在 classes 目錄下的對應包結構中，修改 web.xml，在其中增加一個 Servlet 聲明。這是最原始的方式；&lt;br /&gt;   * 編寫一個類繼承自 HttpServlet，並且在該類上使用 @WebServlet 註解將該類聲明為 Servlet，將該類放在 classes 目錄下的對應包結構中，無需修改 web.xml 文件。&lt;br /&gt;   * 編寫一個類繼承自 HttpServlet，將該類打成 JAR 包，並且在 JAR 包的 META-INF 目錄下放置一個 web-fragment.xml 文件，該文件中聲明了相應的 Servlet 配置。web-fragment.xml 文件示例如下：&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;web-fragment xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot; xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; version=&quot;3.0&quot; schemalocation=&quot;http://java.sun.com/xml/ns/javaee     http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd&quot; complete=&quot;true&quot;&gt;&lt;br /&gt;   &lt;servlet&gt;&lt;br /&gt;       &lt;servlet-name&gt;fragment&lt;/servlet-name&gt;&lt;br /&gt;       &lt;servlet-class&gt;footmark.servlet.FragmentServlet&lt;/servlet-class&gt;&lt;br /&gt;   &lt;/servlet&gt;&lt;br /&gt;   &lt;servlet-mapping&gt;&lt;br /&gt;       &lt;servlet-name&gt;fragment&lt;/servlet-name&gt;&lt;br /&gt;       &lt;url-pattern&gt;/fragment&lt;/url-pattern&gt;&lt;br /&gt;   &lt;/servlet-mapping&gt;&lt;br /&gt;&lt;/web-fragment&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;從上面的示例可以看出，web-fragment.xml 與 web.xml 除了在頭部聲明的 XSD 引用不同之外，其主體配置與 web.xml 是完全一致的。&lt;br /&gt;&lt;br /&gt;由於一個 Web 應用中可以出現多個 web-fragment.xml 聲明文件，加上一個 web.xml 文件，加載順序問題便成了不得不面對的問題。Servlet 規範的專家組在設計的時候已經考慮到了這個問題，並定義了加載順序的規則。&lt;br /&gt;&lt;br /&gt;web-fragment.xml 包含了兩個可選的頂層標籤，&lt;name&gt; 和 &lt;ordering&gt;，如果希望為當前的文件指定明確的加載順序，通常需要使用這兩個標籤，&lt;name&gt; 主要用於標識當前的文件，而 &lt;ordering&gt; 則用於指定先後順序。一個簡單的示例如下：&lt;br /&gt;&lt;br /&gt;&lt;web-fragment...&gt;&lt;br /&gt;   &lt;name&gt;FragmentA&lt;/name&gt;&lt;br /&gt;   &lt;ordering&gt;&lt;br /&gt;       &lt;after&gt;&lt;br /&gt;           &lt;name&gt;FragmentB&lt;/name&gt;&lt;br /&gt;           &lt;name&gt;FragmentC&lt;/name&gt;&lt;br /&gt;       &lt;/after&gt;&lt;br /&gt;   &lt;before&gt;&lt;br /&gt;       &lt;others&gt;&lt;br /&gt;   &lt;/others&gt;&lt;br /&gt;   &lt;/before&gt;&lt;br /&gt;   ...&lt;br /&gt;&lt;/ordering&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;如上所示， &lt;name&gt; 標籤的取值通常是被其它 web-fragment.xml 文件在定義先後順序時引用的，在當前文件中一般用不著，它起著標識當前文件的作用。&lt;br /&gt;&lt;br /&gt;在 &lt;ordering&gt; 標籤內部，我們可以定義當前 web-fragment.xml 文件與其他文件的相對位置關係，這主要通過 &lt;ordering&gt; 的 &lt;after&gt; 和 &lt;before&gt; 子標籤來實現的。在這兩個子標籤內部可以通過 &lt;name&gt; 標籤來指定相對應的文件。比如：&lt;br /&gt;&lt;br /&gt;&lt;after&gt;&lt;br /&gt;   &lt;name&gt;FragmentB&lt;/name&gt;&lt;br /&gt;   &lt;name&gt;FragmentC&lt;/name&gt;&lt;br /&gt;&lt;/after&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;以上片段則表示當前文件必須在 FragmentB 和 FragmentC 之後解析。&lt;before&gt; 的使用於此相同，它所表示的是當前文件必須早於 &lt;before&gt; 標籤裡所列出的 web-fragment.xml 文件。&lt;br /&gt;&lt;br /&gt;除了將所比較的文件通過 &lt;name&gt; 在 &lt;after&gt; 和 &lt;begin&gt; 中列出之外，Servlet 還提供了一個簡化的標籤 &lt;others&gt;。它表示除了當前文件之外的其他所有的 web-fragment.xml 文件。該標籤的優先級要低於使用 &lt;name&gt; 明確指定的相對位置關係。&lt;br /&gt;&lt;br /&gt;回頁首&lt;br /&gt;&lt;br /&gt;ServletContext 的性能增強&lt;br /&gt;&lt;br /&gt;除了以上的新特性之外，ServletContext 對象的功能在新版本中也得到了增強。現在，該對象支持在運行時動態部署 Servlet、過濾器、監聽器，以及為 Servlet 和過濾器增加 URL 映射等。以 Servlet 為例，過濾器與監聽器與之類似。ServletContext 為動態配置 Servlet 增加了如下方法：&lt;br /&gt;&lt;br /&gt;   * ServletRegistration.Dynamic addServlet(String servletName,Class servletClass)&lt;br /&gt;   * ServletRegistration.Dynamic addServlet(String servletName, Servlet servlet)&lt;br /&gt;   * ServletRegistration.Dynamic addServlet(String servletName, String className)&lt;br /&gt;   * &lt;t extends=&quot;&quot; servlet=&quot;&quot;&gt; T createServlet(Class&lt;t&gt; clazz)&lt;br /&gt;   * ServletRegistration getServletRegistration(String servletName)&lt;br /&gt;   * Map&lt;string,? extends=&quot;&quot; servletregistration=&quot;&quot;&gt; getServletRegistrations()&lt;br /&gt;&lt;br /&gt;其中前三個方法的作用是相同的，只是參數類型不同而已；通過 createServlet() 方法創建的 Servlet，通常需要做一些自定義的配置，然後使用 addServlet() 方法來將其動態註冊為一個可以用於服務的 Servlet。兩個 getServletRegistration() 方法主要用於動態為 Servlet 增加映射信息，這等價於在 web.xml( 抑或 web-fragment.xml) 中使用 &lt;servlet-mapping&gt; 標籤為存在的 Servlet 增加映射信息。&lt;br /&gt;&lt;br /&gt;以上 ServletContext 新增的方法要麼是在 ServletContextListener 的 contexInitialized 方法中調用，要麼是在 ServletContainerInitializer 的 onStartup() 方法中調用。&lt;br /&gt;&lt;br /&gt;ServletContainerInitializer 也是 Servlet 3.0 新增的一個接口，容器在啟動時使用 JAR 服務 API(JAR Service API) 來發現 ServletContainerInitializer 的實現類，並且容器將 WEB-INF/lib 目錄下 JAR 包中的類都交給該類的 onStartup() 方法處理，我們通常需要在該實現類上使用 @HandlesTypes 註解來指定希望被處理的類，過濾掉不希望給 onStartup() 處理的類。&lt;br /&gt;&lt;br /&gt;回頁首&lt;br /&gt;&lt;br /&gt;HttpServletRequest 對文件上傳的支持&lt;br /&gt;&lt;br /&gt;此前，對於處理上傳文件的操作一直是讓開發者頭疼的問題，因為 Servlet 本身沒有對此提供直接的支持，需要使用第三方框架來實現，而且使用起來也不夠簡單。如今這都成為了歷史，Servlet 3.0 已經提供了這個功能，而且使用也非常簡單。為此，HttpServletRequest 提供了兩個方法用於從請求中解析出上傳的文件：&lt;br /&gt;&lt;br /&gt;   * Part getPart(String name)&lt;br /&gt;   * Collection&lt;part&gt; getParts()&lt;br /&gt;&lt;br /&gt;前者用於獲取請求中給定 name 的文件，後者用於獲取所有的文件。每一個文件用一個 javax.servlet.http.Part 對象來表示。該接口提供了處理文件的簡易方法，比如 write()、delete() 等。至此，結合 HttpServletRequest 和 Part 來保存上傳的文件變得非常簡單，如下所示：&lt;br /&gt;&lt;br /&gt;Part photo = request.getPart(&quot;photo&quot;);&lt;br /&gt;photo.write(&quot;/tmp/photo.jpg&quot;);&lt;br /&gt;// 可以將兩行代碼簡化為 request.getPart(&quot;photo&quot;).write(&quot;/tmp/photo.jpg&quot;) 一行。&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;另外，開發者可以配合前面提到的 @MultipartConfig 註解來對上傳操作進行一些自定義的配置，比如限制上傳文件的大小，以及保存文件的路徑等。其用法非常簡單，故不在此贅述了。&lt;br /&gt;&lt;br /&gt;需要注意的是，如果請求的 MIME 類型不是 multipart/form-data，則不能使用上面的兩個方法，否則將拋異常。&lt;br /&gt;&lt;br /&gt;回頁首&lt;br /&gt;&lt;br /&gt;總結&lt;br /&gt;&lt;br /&gt;Servlet 3.0 的眾多新特性使得 Servlet 開發變得更加簡單，尤其是異步處理特性和可插性支持的出現，必將對現有的 MVC 框架產生深遠影響。雖然我們通常不會自己去用 Servlet 編寫控制層代碼，但是也許在下一個版本的 Struts 中，您就能切實感受到這些新特性帶來的實質性改變。&lt;br /&gt;&lt;br /&gt;參考資料&lt;br /&gt;&lt;br /&gt;學習&lt;br /&gt;&lt;br /&gt;   * JSR-000315 Java Servlet 3.0 規範：這裡除了可以下載 Servlet 3.0 的規範文檔，還可以瞭解關於與該規範相關的一些其他信息。&lt;br /&gt;&lt;br /&gt;   * GlassFish 項目主頁：可以在這裡現在 GlassFish V3 版本，這是 SUN 提供的 Java EE 6 規範的參考實現。&lt;br /&gt;&lt;br /&gt;   * 「Servlet 2.2 的新特徵」（developerWorks，2000 年 12 月）：討論 Servlet 2.2 一些新的比較重要的特徵，並給出了一些簡單的例子來演示這些特徵的用途及用法。&lt;br /&gt;&lt;br /&gt;   * 「Java Servlet 技術簡介」（developerWorks，2004 年 12 月）：本教程包括一個說明 servlet 基本概念的簡單例子，以及一個涉及更多內容的例子，它說明如何在小型的合同管理程序中更複雜地使用 servlet。&lt;br /&gt;&lt;br /&gt;   * 技術書店：瀏覽關於這些和其他技術主題的圖書。&lt;br /&gt;&lt;br /&gt;   * developerWorks Java 技術專區：數百篇關於 Java 編程各個方面的文章。&lt;br /&gt;&lt;br /&gt;討論&lt;br /&gt;&lt;br /&gt;   * 加入 developerWorks 社區。&lt;br /&gt;&lt;br /&gt;   * 查看 developerWorks 博客 的最新信息。&lt;/part&gt;&lt;/servlet-mapping&gt;&lt;/string,?&gt;&lt;/t&gt;&lt;/t&gt;&lt;/name&gt;&lt;/others&gt;&lt;/begin&gt;&lt;/after&gt;&lt;/name&gt;&lt;/before&gt;&lt;/before&gt;&lt;/name&gt;&lt;/before&gt;&lt;/after&gt;&lt;/ordering&gt;&lt;/ordering&gt;&lt;/name&gt;&lt;/web-fragment...&gt;&lt;/ordering&gt;&lt;/name&gt;&lt;/ordering&gt;&lt;/name&gt;&lt;/listener&gt;&lt;/filter-mapping&gt;&lt;/filter&gt;&lt;/display-name&gt;&lt;/description&gt;&lt;/async-supported&gt;&lt;/init-param&gt;&lt;/servlet-name&gt;&lt;/url-pattern&gt;&lt;/filter-name&gt;&lt;/description&gt;&lt;/param-value&gt;&lt;/param-name&gt;&lt;/init-param&gt;&lt;/filter&gt;&lt;/servlet&gt;&lt;/servlet-mapping&gt;&lt;/servlet&gt;&lt;/display-name&gt;&lt;/description&gt;&lt;/async-supported&gt;&lt;/init-param&gt;&lt;/load-on-startup&gt;&lt;/url-pattern&gt;&lt;/servlet-name&gt;&lt;/web-app&gt;&lt;/async-supported&gt;&lt;/filter&gt;&lt;/servlet&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/2299780752974086271/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/2299780752974086271' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/2299780752974086271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/2299780752974086271'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2010/06/servlet-30.html' title='Servlet 3.0 新特性詳解'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6794224713753030932.post-648907748061988597</id><published>2010-03-21T12:06:00.000+08:00</published><updated>2010-03-21T12:41:23.237+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="編寫自己"/><title type='text'>正負2度C的人生</title><content type='html'>曾幾何時我們的世界失去了四季!&lt;div&gt;我依稀記得小時候的四季，那種分明的快樂! 那種分明的感受與享受。&lt;/div&gt;&lt;div&gt;站在一樣的地方，一樣的地點，看著一樣的景色，張開雙手享受到的卻是不一樣的感覺。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;工業革命到現在也不過短短兩百多年! 但是這短短的一小段時間已經將六千多年孕育的地球嚴重的破壞。&lt;/div&gt;&lt;div&gt;不可是忽視的是人類的破壞力，不可忽視的是人類的扼殺力。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;或許該想些甚麼? 或許該做些甚麼?&lt;/div&gt;&lt;div&gt;在今天沙塵暴壟罩著台北市的悲情氣候中不禁想到了小時後的台北市。&lt;/div&gt;&lt;div&gt;在今天失去四季事實裡讓財經新聞與政治新聞更禿顯出了更多的政績!&lt;/div&gt;&lt;div&gt;在工作上的嘴砲與爭鬥中人們流失了他們的價值!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;是否該有些更好的?&lt;/div&gt;&lt;div&gt;是否該做些更棒的?&lt;/div&gt;&lt;div&gt;是否該思考更有價值的?&lt;/div&gt;&lt;div&gt;是否該做些更值得人生的!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;無置可否的! 是的!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://justinspac.blogspot.com/feeds/648907748061988597/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6794224713753030932/648907748061988597' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/648907748061988597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6794224713753030932/posts/default/648907748061988597'/><link rel='alternate' type='text/html' href='http://justinspac.blogspot.com/2010/03/2c.html' title='正負2度C的人生'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/12160134292546650149</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>