<?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: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-3324394531508458364</id><updated>2012-02-15T23:34:56.324-08:00</updated><category term='Windows Server'/><category term='系統相關'/><category term='冷笑話'/><category term='心情故事'/><category term='資料庫'/><category term='Javascript'/><category term='工作'/><category term='軟體工程'/><category term='版本控管'/><category term='國際化'/><category term='Ubuntu'/><category term='Java'/><category term='Android'/><category term='NetBeans'/><category term='文章分享'/><category term='Appfuse'/><title type='text'>Doug 的技術園地</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>88</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-4423824436238316412</id><published>2012-02-05T07:23:00.000-08:00</published><updated>2012-02-05T07:25:31.483-08:00</updated><title type='text'>設計資料庫的注意事項</title><content type='html'>&lt;div class="post-body entry-content" id="post-body-3704612275015839797" style="font-size: 15px; line-height: 1.4; position: relative; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; background-color: rgb(255, 255, 255); "&gt;&lt;div dir="ltr" trbidi="on"&gt;&lt;ol&gt;&lt;li&gt;Use well defined and consistent names for tables and columns (e.g. School, StudentCourse, CourseID ...).&lt;/li&gt;&lt;li&gt;Use singular for table names (i.e. use StudentCourse instead of StudentCourses). Table represents a collection of entities, there is no need for plural names.&lt;/li&gt;&lt;li&gt;Don’t use spaces for table names. Otherwise you will have to use ‘{‘, ‘[‘, ‘“’ etc. characters to define tables (i.e. for accesing table Student Course you'll write “Student Course”. StudentCourse is much better).&lt;br /&gt;&lt;a name="more"&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Don’t use unnecessary prefixes or suffixes for table names (i.e. use School instead of TblSchool, SchoolTable etc.).&lt;/li&gt;&lt;li&gt;Keep passwords as encrypted for security. Decrypt them in application when required.&lt;/li&gt;&lt;li&gt;Use integer id fields for all tables. If id is not required for the time being, it may be required in the future (for association tables, indexing ...).&lt;/li&gt;&lt;li&gt;Choose columns with the integer data type (or its variants) for indexing. varchar column indexing will cause performance problems.&lt;/li&gt;&lt;li&gt;Use bit fields for boolean values. Using integer or varchar is unnecessarily storage consuming. Also start those column names with “Is”.&lt;/li&gt;&lt;li&gt;Provide authentication for database access. Don’t give admin role to each user.&lt;/li&gt;&lt;li&gt;Avoid “select *” queries until it is really needed. Use "select [required_columns_list]" for better performance.&lt;/li&gt;&lt;li&gt;Use an ORM (object relational mapping) framework (i.e. hibernate, iBatis ...) if application code is big enough. Performance issues of ORM frameworks can be handled by detailed configuration parameters.&lt;/li&gt;&lt;li&gt;Partition big and unused/rarely used tables/table parts to different physical storages for better query performance.&lt;/li&gt;&lt;li&gt;For big, sensitive and mission critic database systems, use disaster recovery and security services like failover clustering, auto backups, replication etc.&lt;/li&gt;&lt;li&gt;Use constraints (foreign key, check, not null ...) for data integrity. Don’t give whole control to application code.&lt;/li&gt;&lt;li&gt;Lack of database documentation is evil. Document your database design with ER schemas and instructions. Also write comment lines for your triggers, stored procedures and other scripts.&lt;/li&gt;&lt;li&gt;Use indexes for frequently used queries on big tables. Analyser tools can be used to determine where indexes will be defined. For queries retrieving a range of rows, clustered indexes are usually better. For point queries, non-clustered indexes are usually better.&lt;/li&gt;&lt;li&gt;Database server and the web server must be placed in different machines. This will provide more security (attackers can’t access data directly) and server CPU and memory performance will be better because of reduced request number and process usage.&lt;/li&gt;&lt;li&gt;Image and blob data columns must not be defined in frequently queried tables because of performance issues. These data must be placed in separate tables and their pointer can be used in queried tables.&lt;/li&gt;&lt;li&gt;Normalization must be used as required, to optimize the performance. Under-normalization will cause excessive repetition of data, over-normalization will cause excessive joins across too many tables. Both of them will get worse performance.&lt;/li&gt;&lt;li&gt;Spend time for database modeling and design as much as required. Otherwise saved(!) design time will cause (saved(!) design time) * 10/100/1000 maintenance and re-design time.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style="font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14px; background-color: rgb(255, 255, 255); "&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-4423824436238316412?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/4423824436238316412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=4423824436238316412' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4423824436238316412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4423824436238316412'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2012/02/blog-post.html' title='設計資料庫的注意事項'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-654489974949887468</id><published>2011-08-12T03:03:00.000-07:00</published><updated>2011-08-12T03:04:39.168-07:00</updated><title type='text'>安裝 desktop 到 ubuntu server</title><content type='html'>若要在 ubuntu server 裝 desktop 但不要有的沒的軟體，可以用以下指令安裝&lt;br /&gt;&lt;br /&gt;sudo apt-get  install --no-install-recommends ubuntu-desktop&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-654489974949887468?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/654489974949887468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=654489974949887468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/654489974949887468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/654489974949887468'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2011/08/desktop-ubuntu-server.html' title='安裝 desktop 到 ubuntu server'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-8619420305647853408</id><published>2011-04-20T09:46:00.000-07:00</published><updated>2011-04-20T09:58:08.416-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='軟體工程'/><title type='text'>JRebel 的奇妙用途</title><content type='html'>相信用 eclipse 開發 web 時，每次 compile 完 java 後 tomcat 就需要重新啟動，應該覺得讓人非常的想把電腦丟掉&lt;br /&gt;&lt;br /&gt;最近試了一下 JRebel ，發現他的神奇之處，Java compile 完後馬上就可以試改過後的結果，不用等 1 鐘後 tomcat 重啟然後還要重新 login 到需要的 page 在測試跑完的結果&lt;br /&gt;&lt;br /&gt;以每個工程師去寫 web 而言，平均至少要花約 30~60 次來重啟 tomcat ，每一次重啟 tomcat 後再加上登入到需要的頁面再做測試，每次約要 2-3 分鐘&lt;br /&gt;&lt;br /&gt;30*2 ~ 60*3 = 60 ~ 180 分鐘。若每天可以省下這些時間，相信 programmer 的產出應該會比目前的方式快上 20% ~ 30% 以上，可謂京人啊&lt;br /&gt;&lt;br /&gt;用 Java 寫 Web 的工程師都應該用 JRebel 做為中介去開發，每天省下兩小時，不只可以提高生產率，也可以讓自己有多餘的時間去休息。&lt;br /&gt;&lt;br /&gt;雙贏的事，為何不做呢!!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-8619420305647853408?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/8619420305647853408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=8619420305647853408' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8619420305647853408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8619420305647853408'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2011/04/jrebel.html' title='JRebel 的奇妙用途'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-8766753006156988683</id><published>2010-12-17T17:36:00.001-08:00</published><updated>2010-12-17T17:36:38.206-08:00</updated><title type='text'>Automated License Checks</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: lucida, arial, sans-serif; font-size: 12px; border-collapse: collapse; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "&gt;&lt;h4 style="font-family: lucida, arial, sans-serif; font-size: 13px; color: rgb(0, 0, 0); margin-top: 3px; margin-right: 0px; margin-bottom: 3px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;b&gt;The Full Cycle - From Modules to Automated License Checks&lt;/b&gt;&lt;/h4&gt;&lt;div style="font-family: lucida, arial, sans-serif; font-size: 12px; "&gt;Here is how it all works together to automatically extract and apply licensing information and conduct license violation checks on the fly:&lt;/div&gt;&lt;div style="font-family: lucida, arial, sans-serif; font-size: 12px; "&gt; &lt;/div&gt;&lt;div style="font-family: lucida, arial, sans-serif; font-size: 12px; "&gt;&lt;img alt="" src="http://www.jfrog.org/files/java.net/flow.png" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; " /&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-8766753006156988683?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/8766753006156988683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=8766753006156988683' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8766753006156988683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8766753006156988683'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/12/automated-license-checks.html' title='Automated License Checks'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-8687496523256408324</id><published>2010-12-17T17:23:00.000-08:00</published><updated>2010-12-17T17:24:20.086-08:00</updated><title type='text'>讓企業軟體更具魅力的五大法則</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: 18px; "&gt;&lt;p style="margin-top: 1.2em; margin-right: 10px; margin-bottom: 1.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; line-height: 1.4em; "&gt;&lt;span class="Apple-style-span" &gt;來源 : ZDNet&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 1.2em; margin-right: 10px; margin-bottom: 1.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; line-height: 1.4em; font-family: Arial, MingLiU, PMingLiU; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;雖然企業軟體在現代生活中扮演相當重要的角色，但大部分都是無趣的。因為這些專案通常是大型且容易失敗，無法輕易破解螢幕畫面以及在毫無意義的軟體更新中，供應商已經失去創新的意願。為了讓美好的感覺再回到企業，以下是讓企業軟體更具吸引力的五大法則&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; "&gt;:&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 1.2em; margin-right: 10px; margin-bottom: 1.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; line-height: 1.4em; font-family: Arial, MingLiU, PMingLiU; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; font-weight: normal; "&gt;1. &lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: 新細明體; font-weight: normal; "&gt;具功能性且適用於工作&lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; font-weight: normal; "&gt;: &lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: 新細明體; font-weight: normal; "&gt;在基層工作方面，軟體的基本功能就是讓使用者可以順利完成任務，如果連這點都做不到，那麼軟體就失去存在的意義。&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin-top: 1.2em; margin-right: 10px; margin-bottom: 1.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; line-height: 1.4em; font-family: Arial, MingLiU, PMingLiU; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; font-weight: normal; "&gt;2. &lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: 新細明體; font-weight: normal; "&gt;涵蓋商業流程領域&lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; font-weight: normal; "&gt;: &lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: 新細明體; font-weight: normal; "&gt;企業軟體應可以自動處理特定商業流程，像是&lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; font-weight: normal; "&gt;CRM&lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: 新細明體; font-weight: normal; "&gt;、會計等等。好的企業軟體必須能提供全方位且自動化的流程處理。&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin-top: 1.2em; margin-right: 10px; margin-bottom: 1.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; line-height: 1.4em; font-family: Arial, MingLiU, PMingLiU; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; font-weight: normal; "&gt;3. &lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: 新細明體; font-weight: normal; "&gt;絕佳的使用者介面&lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; font-weight: normal; "&gt;: &lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: 新細明體; font-weight: normal; "&gt;最好的軟體就是讓用戶可以很快了解並上手，並且容易導入。如果無法達到此要求，那麼這個軟體就沒有吸引力了。&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="margin-top: 1.2em; margin-right: 10px; margin-bottom: 1.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; line-height: 1.4em; font-family: Arial, MingLiU, PMingLiU; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; font-weight: normal; "&gt;4.&lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; "&gt; &lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: 新細明體; font-weight: normal; "&gt;感覺良好的魔力&lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; font-weight: normal; "&gt;:&lt;/span&gt;&lt;/strong&gt;&lt;b style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; "&gt; &lt;/span&gt;&lt;/b&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;千萬不要輕忽感覺的影響力，這是另一項評量使用者是否滿意的指標。通常失敗的案子，在感覺良好的得分都是&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; "&gt;0&lt;/span&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;。&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 1.2em; margin-right: 10px; margin-bottom: 1.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; line-height: 1.4em; font-family: Arial, MingLiU, PMingLiU; "&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; font-weight: normal; "&gt;5. &lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: 新細明體; font-weight: normal; "&gt;激烈的競爭&lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span lang="EN-US" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: Arial; font-weight: normal; "&gt;: &lt;/span&gt;&lt;/strong&gt;&lt;strong style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; "&gt;&lt;span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-family: 新細明體; font-weight: normal; "&gt;創新是需要競爭及要求來激發的。如果沒有競爭的壓力，根本無法設計出具吸引力的企業軟體。&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-8687496523256408324?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/8687496523256408324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=8687496523256408324' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8687496523256408324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8687496523256408324'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/12/blog-post.html' title='讓企業軟體更具魅力的五大法則'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1206046720997320822</id><published>2010-11-09T06:58:00.000-08:00</published><updated>2010-11-09T07:02:30.086-08:00</updated><title type='text'>Hudson 一定要裝的 10 個 plugin</title><content type='html'>Hudson 是一個做 build 的工具，提升 code 的 quality 與 code 的除錯效率。除了本身的功能外，還提供 plugin 的 API 讓許多 plugin 可以用&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;在此舉出最多人用的 10 個 plugin&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 12px; line-height: 18px; "&gt;&lt;p&gt;&lt;span class="subTitle" style="font-size: 14px; font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-family: Georgia; "&gt;The Violations plugin&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Violations" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;Violations&lt;/a&gt; plugin is a one-stop-shop for code quality metrics. It supports the principal Java code quality tools: checksytle, pmd, cpd, findbugs, and simian, plus a few others.&lt;/p&gt;&lt;p&gt;Use this plugin to keep track of how your code quality metrics are doing over time, or to review various code quality metrics for a particular build. You can even force a build to fail if there are too many violations. If you do this, just be careful not to interrupt the developer flow too much. For example, you might set up a special QA build (run every night or every hour, for example), that will fail if the QA metrics aren't up to scratch.&lt;/p&gt;&lt;p&gt;The only catch is that you have to integrate the code quality metrics (checkstyle, PMD, Findbugs, or whatever) into your builds. If you are creating new build scripts, you should of course be doing this anyway, but it can be more of a challenge for large legacy code bases.&lt;/p&gt;&lt;img witdh="200px" width="300" height="195" alt="" src="http://wiki.hudson-ci.org/download/attachments/2916418/violation-trend.png?version=1&amp;amp;modificationDate=1186593217000" /&gt;&lt;br /&gt;&lt;span class="subTitle" style="font-size: 14px; font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-family: Georgia; "&gt;The Clover plugin&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://www.atlassian.com/software/clover/" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;Clover&lt;/a&gt; is a kick-ass code coverage tool if there ever was one, and the Hudson &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Clover+Plugin" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;Clover&lt;/a&gt; plugin is an excellent complement to the tool. The Clover plugin is unique: it lets you add code coverage to (most) existing Ant builds without having to change the build file. This is great for legacy projects. It also lets you generate aggregate coverage statistics on multi-module Maven projects.&lt;/p&gt;&lt;p&gt;If you don't have Clover, all is not lost - the &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Cobertura+Plugin" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;Cobertura&lt;/a&gt;and &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Emma+Plugin" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;Emma&lt;/a&gt; plugins do a great job too, though you do have to set up the code quality metrics in your project yourself first.&lt;/p&gt;&lt;span class="subTitle" style="font-size: 14px; font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-family: Georgia; "&gt;The Parameterized Trigger plugin&lt;/span&gt;&lt;br /&gt;&lt;p&gt;The &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Parameterized+Trigger+Plugin" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;Parameterized Trigger&lt;/a&gt; plugin lets you add parameters to your build jobs that users enter when they kick off a build. This comes in handy for release or deployment automation, for example, where you want to enter the version number or label you want to release or deploy. You can also get your build job pass these parameters on to other parameterized build jobs.&lt;/p&gt;&lt;span class="subTitle" style="font-size: 14px; font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-family: Georgia; "&gt;The Sonar plugin&lt;/span&gt;&lt;br /&gt;&lt;p&gt;The &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Sonar+plugin" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;Sonar&lt;/a&gt; plugin makes it trivial to integrate your projects with Sonar. &lt;a href="http://sonar.codehaus.org/" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;Sonar&lt;/a&gt; is a powerful open source code quality metrics reporting tool, which displays code quality metrics for multiple projects in a variety of ways on a web site.&lt;/p&gt;&lt;p&gt;The Sonar Hudson plugin is magic. It lets you integrate your existing Maven projects into Sonar, with no modifications to the projects. It even works for Ant projects, though there is some configuration to do in this case.&lt;/p&gt;&lt;span class="subTitle" style="font-size: 14px; font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-family: Georgia; "&gt;The VMware plugin&lt;/span&gt;&lt;br /&gt;&lt;p&gt;The &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/VMware+plugin" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;VMWare plugin&lt;/a&gt; lets you start up a VMWare virtual machine before a build, and shut it down afterwards. This is excellent for functional or web tests on different platforms.&lt;/p&gt;&lt;span class="subTitle" style="font-size: 14px; font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-family: Georgia; "&gt;The Amazon EC2 plugin&lt;/span&gt;&lt;br /&gt;&lt;p&gt;The &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Amazon+EC2+Plugin" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;Amazon EC2&lt;/a&gt; plugin lets you start up Hudson slaves an EC2 instance on demand, and then shut them down when they are no longer required. Again, this is great for cross-platform tests, but also for load tests, or periods when you need to expand your CI capacity greatly for a short period of time (just before major releases, for example).&lt;/p&gt;&lt;span class="subTitle" style="font-size: 14px; font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-family: Georgia; "&gt;The Setenv plugin&lt;/span&gt;&lt;br /&gt;&lt;p&gt;The &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Setenv+Plugin" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;The Setenv plugin&lt;/a&gt; lets you set environment variables for a particular build job. These environment variables are available to any sort of build job, be it Freestyle, Maven, Shell, or whatever. Many build scripts use environment variables for a variety of purposes, and this plugin makes it much easier to integrate these projects into Hudson.&lt;/p&gt;&lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Setenv+Plugin" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;&lt;span class="subTitle" style="font-size: 14px; font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-family: Georgia; "&gt;Sectioned View plugin&lt;/span&gt;&lt;br /&gt;&lt;/a&gt;&lt;p&gt;&lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Setenv+Plugin" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;The &lt;/a&gt;&lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Sectioned+View+Plugin" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;Sectioned View Plugin&lt;/a&gt; lets you break your job views into sections, such as 'Test Results' and 'Job Graphs'.&lt;/p&gt;&lt;img witdh="300px" alt="" width="300px" src="http://wiki.hudson-ci.org//download/attachments/37324356/sectioned-view_layout.png" /&gt;&lt;br /&gt;&lt;span class="subTitle" style="font-size: 14px; font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-family: Georgia; "&gt;The Radiator View plugin&lt;/span&gt;&lt;br /&gt;&lt;p&gt;The &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Radiator+View+Plugin" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;Radiator View Plugin&lt;/a&gt; lets you display the build status for your projects in a format that is easy to see from a distance. Set this up on a large LCD screen visible to all.&lt;/p&gt;&lt;img alt="" src="http://wiki.hudson-ci.org/download/thumbnails/37323554/radiatorviewplugin.png" /&gt;&lt;br /&gt;&lt;span class="subTitle" style="font-size: 14px; font-weight: bold; color: rgb(0, 0, 0); font-style: normal; font-family: Georgia; "&gt;The Hudson Helper iPhone app&lt;/span&gt;&lt;br /&gt;&lt;p&gt;And finally, the &lt;a href="http://wiki.hudson-ci.org/display/HUDSON/Hudson+Helper+iPhone+and+iPod+Touch+App" style="color: rgb(128, 0, 0); text-decoration: underline; font-weight: normal; "&gt;Hudson Helper iPhone app&lt;/a&gt;. This is a neat little iPhone app that lets you monitor your builds via your iPhone. Don't leave home without it!&lt;/p&gt;&lt;img alt="" src="http://wiki.hudson-ci.org/download/attachments/37748911/screenshot-main.png?version=1&amp;amp;modificationDate=1243543956000" /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1206046720997320822?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1206046720997320822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1206046720997320822' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1206046720997320822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1206046720997320822'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/11/hudson-10-plugin.html' title='Hudson 一定要裝的 10 個 plugin'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-8856806486926182415</id><published>2010-10-31T07:21:00.000-07:00</published><updated>2010-10-31T07:32:50.480-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>如何取得經過 Apache 2 Proxy   處理過的 real IP</title><content type='html'>IP 不夠用已經是一個當前公司要面對的問題，但其實是可以透過 domain name + proxy 的方式，讓server 將 http request 送給相對應的 server 做處理。這個方式統稱叫 Proxy，其中最有名又免費的就是 Apache Proxy&lt;br /&gt;&lt;br /&gt;若要安裝此 Apache Proxy , 可以用下列指令先安裝&lt;br /&gt;&lt;pre&gt;sudo apt-get install apache2&lt;br /&gt;sudo a2enmod proxy&lt;br /&gt;sudo a2enmod proxy_http&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;然後再指定 module 的內容如下&lt;br /&gt;&lt;pre&gt;ProxyPass         /hudson  http://localhost:8081/hudson&lt;br /&gt;ProxyPassReverse  /hudson  http://localhost:8081/hudson&lt;br /&gt;ProxyRequests     Off&lt;br /&gt;&lt;br /&gt;# Local reverse proxy authorization override&lt;br /&gt;# Most unix distribution deny proxy by default (ie /etc/apache2/mods-enabled/proxy.conf in Ubuntu)&lt;br /&gt;&lt;proxy&gt;&lt;br /&gt; Order deny,allow&lt;br /&gt; Allow from all&lt;br /&gt;&lt;/proxy&gt;&lt;br /&gt;&lt;/pre&gt;但此時內部 server 透過 api 拿到的 ip 都會是此 proxy server 的 IP 。若要拿到 real IP 則需要透過 http header 拿，這些 header 如下&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;X-Forwarded-For&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;   &lt;i&gt;The IP address of the client.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;X-Forwarded-Host&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;   &lt;i&gt;The original host requested by the client in the Host HTTP request header.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;X-Forwarded-Server&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;   &lt;i&gt;The hostname of the proxy server.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;不過這個要 server 端的 code 必須偵測並加上這些 API 才能取得&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-8856806486926182415?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/8856806486926182415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=8856806486926182415' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8856806486926182415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8856806486926182415'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/10/apache-2-proxy-real-ip.html' title='如何取得經過 Apache 2 Proxy   處理過的 real IP'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6759168719974231873</id><published>2010-10-30T21:52:00.000-07:00</published><updated>2010-10-30T21:56:41.617-07:00</updated><title type='text'>Disable X-server in Ubuntu 10.10</title><content type='html'>若要 Ubuntu Server 安裝完 Desktop 後開機還是進入 commnad line ，必須用以下步驟做更改，無法用設定的方式&lt;br /&gt;&lt;br /&gt;1. 更改 &lt;tt&gt;/etc/default/grub 將 &lt;/tt&gt;&lt;tt&gt;GRUB_CMDLINE_LINUX=""&lt;/tt&gt; 改成  &lt;tt&gt;GRUB_CMDLINE_LINUX="text"&lt;br /&gt;2. sudo update-grub&lt;br /&gt;3. sudo reboot&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;這樣就可以讓 Ubuntu Server 進入 command line, 需要的時候再用 startx 進入 desktop&lt;br /&gt;&lt;/tt&gt;&lt;tt&gt;&lt;/tt&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6759168719974231873?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6759168719974231873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6759168719974231873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6759168719974231873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6759168719974231873'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/10/disable-x-server-in-ubuntu-1010.html' title='Disable X-server in Ubuntu 10.10'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-3607148041052128088</id><published>2010-10-30T09:41:00.000-07:00</published><updated>2010-10-30T10:02:16.074-07:00</updated><title type='text'>Install Sun JDK into Ubuntu 10.10</title><content type='html'>自從 Sun 被 Oracle 買走後，JDK 就開始弱掉了，連 Ubuntu 都以 Open JDK 取代 Sun 的 JDK.&lt;br /&gt;若要安裝 Sun 的 JDK，則要有另外的步驟安裝&lt;br /&gt;&lt;br /&gt;1. 先增加 partner 的 repository&lt;br /&gt;sudo apt-get install python-software-properties&lt;br /&gt;sudo add-apt-repository "deb http://archive.canonical.com/ubuntu maverick partner"&lt;span class="content"&gt;&lt;span class="block" style="margin-left: 0px;"&gt;&lt;code class="plain"&gt;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. 安裝 jdk&lt;br /&gt;&lt;span style="font-family:arial;"&gt;sudo apt-get update&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt; sudo apt-get install sun-java6-jdk sun-java6-plugin&lt;/span&gt;&lt;br /&gt;&lt;span class="content"&gt;&lt;span class="block" style="margin-left: 0px;"&gt;&lt;code class="plain"&gt;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;若要將預設的 jdk 換成 sun 的，就用&lt;br /&gt;sudo update-java-alternatives -s java-6-sun&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-3607148041052128088?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/3607148041052128088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=3607148041052128088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/3607148041052128088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/3607148041052128088'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/10/install-sun-jdk-into-ubuntu-1010.html' title='Install Sun JDK into Ubuntu 10.10'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-4488888004348666283</id><published>2010-10-05T18:02:00.000-07:00</published><updated>2010-10-05T18:11:36.264-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='軟體工程'/><title type='text'>Java Build Server</title><content type='html'>今天在 theserverside 發現一篇有去的 article&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.zenbi.nl/en/blog_how_to_build_a_java_buildserver.php"&gt;http://www.zenbi.nl/en/blog_how_to_build_a_java_buildserver.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;這份 article 在講解如何去建立一個 build server ，讓程式開發可以自動化做 build 與 Test ，減少人工的浪費。&lt;br /&gt;&lt;br /&gt;目前 build tool 中比較 popular 的有 luntbuild, hudson, apache continuum ，此 article 建議用 luntbuild ，個人用過 luntbuild ，比較起來 luntbuild 太基本，必須用 professional 才能滿足比較大的需求。hudson 最近研究過，發現此 build tool 可以支援 plugin 功能，大大的增加其運用彈性，在此建議此 build tool 。continuum 也是比較基本的 build tool&lt;br /&gt;&lt;br /&gt;build tool 已經漸漸的變成軟體開發的一環，須要建立起來才能有效控管軟體的 productivity and Quality&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-4488888004348666283?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/4488888004348666283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=4488888004348666283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4488888004348666283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4488888004348666283'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/10/java-build-server.html' title='Java Build Server'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1581746398927804029</id><published>2010-09-17T09:03:00.000-07:00</published><updated>2010-09-17T09:10:46.322-07:00</updated><title type='text'>GWT 開始發威了</title><content type='html'>Google 之所以為 Google ，不只是搜尋而已，其他的產品也像是 Google 的搜尋精神，用滲透的方式繼續的往各處串&lt;br /&gt;&lt;br /&gt;剛剛看到你一個 Article ，&lt;a href="http://www.theserverside.com/discussions/thread.tss?thread_id=60929"&gt;Google Makes Instantiations Available for Free&lt;/a&gt; 這個工具讓不太會 GWT 的人也可以上手，並且還含測試工具。&lt;br /&gt;&lt;br /&gt;以這樣的腳步繼續下去，我想其他的 Web Framework 應該會漸漸的式微，因為除了 Free 以外，有可以創造 Google 產品的生產力，讓全世界向 Google 看齊，實在很猛&lt;br /&gt;&lt;br /&gt;該是學一下 GWT 的時候了，GWT + Spring + Hibernate  的統一時代應該不遠了&lt;br /&gt;&lt;br /&gt;說真的，有錢好辦事，真是一點都不假 ..................&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1581746398927804029?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1581746398927804029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1581746398927804029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1581746398927804029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1581746398927804029'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/09/gwt.html' title='GWT 開始發威了'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-7962607375526424816</id><published>2010-07-24T19:31:00.000-07:00</published><updated>2010-07-24T19:39:57.136-07:00</updated><title type='text'>好看的 Web Chart</title><content type='html'>最近找到一個用 Flash 做，可以在 Web 上展現圖表 (Chart) 功能的網站。&lt;br /&gt;去試了一下 live demo ，感覺對一般在 Web 做 Chart 的已經夠用。&lt;br /&gt;目前此網站提供 Free 版本，可以讓有興趣的人先試用&lt;br /&gt;&lt;br /&gt;http://www.fusioncharts.com/free/Overview.asp&lt;br /&gt;&lt;br /&gt;跟 Jfreechart 比起來，這個算是在 User Interface 上有滿大的差異，功能上能夠做到比較 Fancy 的圖表。這個版本目前也支援 JQuery Plugin 的方式讓 developer 使用&lt;br /&gt;&lt;br /&gt;看一下 demo site ，&lt;br /&gt;&lt;a href="http://www.fusioncharts.com/free/demos/Blueprint/"&gt;http://www.fusioncharts.com/free/demos/Blueprint/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;這個是屬於進階的功能，若時間允許，再加入此功能。但若是比較急，直接用 Jfreechart 會比較快&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-7962607375526424816?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/7962607375526424816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=7962607375526424816' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7962607375526424816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7962607375526424816'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/07/web-chart.html' title='好看的 Web Chart'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1030425188083267703</id><published>2010-07-18T07:17:00.000-07:00</published><updated>2010-07-18T07:25:47.613-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Javascript'/><title type='text'>JQuery Plugin 的妙用</title><content type='html'>前幾天因為 project 的關係，用了一個 plugin 做動畫&lt;br /&gt;http://www.professorcloud.com/mainsite/carousel.htm&lt;br /&gt;&lt;br /&gt;這個可以用很簡單的幾個指令就可以將圖片 3D 化，但這個還是需要一些美工的修飾才能perfect&lt;br /&gt;&lt;br /&gt;透過 JQuery ，可以將一些需要花大量人力的 javascript 變成一個 library 並可以很快的 apply 到任何的 html 上，這個才真的是 JQuery 真正的用處&lt;br /&gt;&lt;br /&gt;下次再介紹幾個好用的 JQuery 分享&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1030425188083267703?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1030425188083267703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1030425188083267703' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1030425188083267703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1030425188083267703'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/07/jquery-plugin.html' title='JQuery Plugin 的妙用'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6159162393903546133</id><published>2010-07-04T02:02:00.000-07:00</published><updated>2010-07-04T02:13:00.671-07:00</updated><title type='text'>如何裝完 Ubuntu 後再裝 Windows 7</title><content type='html'>當你裝完 Windows 7 後，一開機會發現以錢裝的 Ubuntu 系統不見了，boot 的選單不知所去&lt;div&gt;那是因為 Windows 7 會蓋掉 Grub 的設定。要恢復 Ubuntu 之前的設定必須手動修改 boot 的設定以便恢復 boot 選單&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;恢復的步驟如下&lt;/div&gt;&lt;div&gt;1. 用 Ubuntu 10.04 CD 開機&lt;/div&gt;&lt;div&gt;2. 輸入 fdisk -l 以確認每個分區的分配情況&lt;/div&gt;&lt;div&gt;3. sudo -i &lt;/div&gt;&lt;div&gt;4. mount /dev/sda3 /mnt   (mount 根目錄)&lt;/div&gt;&lt;div&gt;5. mount /dev/sda2 /mnt/boot (mount boot 目錄)&lt;/div&gt;&lt;div&gt;6. grub-install -root-directory=/mnt/ /dev/sda&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;重開機後便會看到原來 grub 2 的選單了&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6159162393903546133?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6159162393903546133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6159162393903546133' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6159162393903546133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6159162393903546133'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/07/ubuntu-windows-7.html' title='如何裝完 Ubuntu 後再裝 Windows 7'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6385224826018482622</id><published>2010-06-23T09:32:00.000-07:00</published><updated>2010-06-23T09:47:24.405-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='軟體工程'/><title type='text'>邁向高品質程式碼的12個步驟</title><content type='html'>軟體工程師永遠追求高品質的系統，但如何達到，參考一下下列文章吧&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;&lt;span class="Apple-style-span" style="line-height: 26px;font-family:新細明體,Arial,Helvetica,sans-serif;font-size:15px;"  &gt;&lt;strong&gt;1. 你有使用原始碼控制系統嗎？&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;我使用過一些商用原始檔控制系統（source control packages），也用過免費的CVS，所以我可以告訴你CVS相當不錯！如果你沒有原始碼控制系統，一旦需要與程式設計人員合作就相當麻煩了。因為程式設計人員無法知道其他人做了什麼，也無法輕易回復成出錯前的狀態。而且原始碼控制系統還有另一個優點，就是原始碼會被簽出（check out）到每位程式設計人員的硬碟裡。我還沒看過哪個用了原始碼控制的專案會遺失大量程式的。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. 你能用一個步驟建出所有結果嗎？&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;我的意思是：從最新的原始碼快照開始，要花多少步驟才能建立出貨用的軟體？好的團隊會有單一個腳本檔，只要執行這個腳本，就會從頭簽出所有檔案、編譯每一行程式、建立執行檔（包含所有不同版本、語言以及#ifdef組合）、製作安裝程式，並且產生最後要用的媒體格式：光碟片、網站下載或是其他各種格式。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;如果這個程序不是只有一個步驟，就會容易出錯。另外，當出貨時程緊迫時，修正「最後一個」問題、製作最終執行檔等過程必須要快速完成。如果程式編譯和安裝檔製作等動作需要20個步驟才能完成，你一定會急瘋了，然後做出一些蠢事。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;就是為了這一點，我的前一家公司把原本使用的WISE換成InstallShield。因為我們必須透過NT工作排程器，在夜間用腳本自動製作出安裝程式，由於WISE無法透過工作排程器半夜執行，因此就把它丟掉了（親切的WISE員工跟我保證，他們的最新版一定會支援夜間執行）。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. 你有進行每日編譯嗎？&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;在使用原始碼控制工具時，有時程式設計人員會不慎提交（check in）某些內容而導致編譯失敗。舉例來說，某人新增了一個原始檔，整個程式在他的機器上都能正常編譯，可是卻忘記把新增的原始檔加到原始碼控制程式庫中。結果這位仁兄非常健忘且愉快地鎖上機器回家了，導致其他人無法做事，也只好很不爽地回家。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;導致編譯失敗是非常糟糕的事情（又經常發生），這時每日編譯就很有幫助了，它能保證不會有漏網之魚。在大型的團隊中，要確保能立即修正編譯失敗的最佳方法就是每天下午（像是午餐時間）重新編譯。大家在午餐前盡可能的提交檔案，等大家用餐完畢編譯也已經完成。若結果顯示正常，很好！大家可以簽出最新版的原始碼繼續工作；如果有問題就將它搞定，而其他人還可以用前一版沒問題的程式繼續幹活。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Excel團隊有個規定，導致編譯失敗的人必須從此負責重新編譯的動作當作處罰，直到有其他人出錯為止。這能讓大家盡量避免造成編譯失敗，同時也是個讓大家輪流熟悉重新編譯的好方法。在我的文章：「每日編譯是你的好朋友」裡有更多每日編譯的資料。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. 你有沒有問題（bug）資料庫？&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;無論如何，只要你在寫程式時（只有一個人寫也是一樣），沒有一套良好的資料庫列出程式中所有的問題，就一定會產生出品質低劣的程式碼。很多程式設計人員自認能把問題清單記在腦子裡，才怪！我從來沒辦法一次記住超過二或三個問題，而且會在第二天早上，或是趕著出貨時把它們全部忘掉。你一定要正式地記錄問題。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;問題資料庫可大可小。一個最簡單有用的問題資料庫必須包含每個問題的下列資料：&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;● 重現問題的完整步驟。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;● 應該看到的行為。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;● 實際看到的（有問題的）行為。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;● 被指派的負責人。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;● 是否已修正。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;如果你是因為覺得問題追蹤軟體太複雜才不追蹤問題，請建立五欄的簡單表格，填入上述資料，然後開始使用吧！想要深入瞭解問題追蹤，請參閱「無痛錯誤追蹤」一文。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5. 你會先把問題都修好之後，才寫新的程式嗎？&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;古早第一版的Microsoft Word for Windows被視為「死亡行軍」型的專案。進度一直處在落後的情況。整個團隊的工作時間長得離譜，專案卻一延再延三延，大家都承受無比的壓力。拖了幾年後，那個鬼東西終於上市了，微軟就把整個團隊送到Cancun（墨西哥著名海灘）渡假，然後再坐下來做深度反省。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;他們發現產品經理過度堅持要維持「進度」，而程式設計人員只能匆匆經過編碼階段。而且正式的時程並未包含錯誤修正這個階段，於是寫出的程式碼非常糟糕。此外，也沒有人試圖要減少問題數量，而事實剛好相反！有位程式設計人員要寫支程式以計算一行文字的高度，結果他只寫了「return 12;」，並等問題報告出爐指出這個函數功能不對。於是，時程表變成一份等著被轉換成問題的功能列表，事後檢討時則稱之為「無窮錯誤法（Infinite defects methodology）」。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;為了修正這個問題，微軟全面採用所謂的「零錯誤作法（Zero defects methodology）」。公司裡很多程式設計人員聽了都不禁竊笑，因為感覺就像是管理階層認為能用行政命令降低錯誤數量一樣。實際上，「零錯誤」是指無論何時都要先修正錯誤才能寫新程式。原因如下：&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;一般來說，愈晚修正錯誤，修正時所付出的成本（時間及金錢）愈高。舉例來說，當你打錯字或出現編譯器會發現的語法錯誤，就修正只是小事一樁。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;若你的程式第一次執行出錯時，應該也能立即改正，因為整個程式還在你腦海裡。如果要為幾天前寫的程式除錯，應該需要回想一陣子吧！不過，當你重讀所寫的程式後，就會記起所有細節，並在適當時間內把問題修好。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;若是要為幾個月前寫的程式除錯，那很有可能已經忘掉一大半，要修正簡直難上加難！或許，你正在替別人的程式除錯，而當事人遠在阿盧巴渡假，這時除錯的任務就像科學一樣：你得條理分明、小心翼翼地慢慢來，也無法確定要多久時間才能解決。另外，如果要為已出貨的程式除錯，修正問題的代價就更難以估算了！&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;這就是要立即修正問題的理由之一，因為這樣做能少花點時間。另一個理由是，寫新程式的時間遠比修正現有錯誤的時間容易估計。舉例來說，如果要你估計寫串列排序的程式需時多久，你應該能估算得相當準確；但假如你的程式在裝了Internet Explorer 5.5之後有問題，要估計需要多久才能修好，恐怕用猜的都猜不出來，因為你不知道（當然不知道）問題點在哪裡。要找出問題可能就要花上三天，但也可能兩分鐘內解決。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;如果時程裡包含很多有待修正的問題，那麼這種時程是不可靠的。假如把已知的錯誤都修好了，剩下的就只有新程式了，那麼時程就會變得非常準確。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;把錯誤數量維持在零還有另外一項優點，就是面對競爭時反應可以更快。有些程式設計人員認為這樣做可讓產品隨時推出。一旦競爭者推出某個殺手級新功能來搶客戶時，只要把該功能加上去，即可立即出貨，不必修正累積下來的大量問題。&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;&lt;span class="Apple-style-span" style="line-height: 26px;font-family:新細明體,Arial,Helvetica,sans-serif;font-size:15px;"  &gt;&lt;strong&gt;6. 你有一份最新的時程表嗎？&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;在此要好好的談時程表。如果你的程式對公司非常重要，有太多理由可以說明，預知程式完成時間點有多麼重要。但程式設計人員是出了名的不愛訂定時程，他們會對著業務部門大吼：「該完成的時候就會完成了阿！」&lt;br /&gt;&lt;br /&gt;但是問題不可能就這樣算了。業務人員有太多的規劃決策必須遠在程式出貨之前就做好決定，如：功能展示、商展、廣告等，而做決定的唯一方法就是定出時程，並且隨時更新。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;擁有時程的另一個重點是，可以強迫自己決定要製作哪些功能，並剔除最不重要的功能，以避免功能過度膨脹（featuritis，又名scope creep）。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;7. 你有寫規格嗎？&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;寫規格就像是使用牙線：大家都同意這是好事，卻沒有人真的這麼做。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;我不知道原因，或許是大多數程式設計人員都討厭寫文件吧！所以當全是程式設計人員的團隊面對問題時，自然傾向用程式碼而非文件來表示。他們寧願跳進去寫程式，死也不願先寫規格。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;在設計階段發現問題時，只要改幾行文字就能輕易修正。但等到程式寫出來之後，修正的代價就高多了，代價包含了情感（人們討厭拋棄程式碼）和時間，所以會抗拒修正問題。通常未依據規格製作的軟體，到最後的設計都很糟，而且進度完全無法控制。這似乎就是Netscape所發生的問題。它的前四版一團亂，結果管理階層還愚蠢地決定把程式丟掉重新開始。然後在Mozilla上又重蹈覆轍，製造出一個無法控制的怪物，耗了好幾年才進入alpha測試階段。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;我的小秘方是把程式設計人員送去上密集的寫作課程，讓他們變得不那麼排斥寫作，就可以解決這個問題。另一個方法是雇用聰明的產品經理來寫規格。不管用哪一種方法，你都應該強制執行「沒有規格就不寫程式」這個簡單的規則。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;8. 程式設計人員有沒有安靜的工作環境？&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;有大量的文件記載，為知識工作者提供空間安靜及隱私可以提昇產能。軟體管理經典著作《Peopleware》也詳盡地記載了這種產能上的增益。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;其中的原理如下。我們都知道知識工作者進入「沉浸狀態」（flow，也稱作in the zone）時，工作效果是最佳的。這時他們會完全與環境脫離，全心專注在工作上。他們忘記時間並絕對專注地產出極佳成果。他們所有豐富的產出也都是在這個時候完成的。作家、程式設計人員、科學家，甚至是籃球員都會告訴你進入「沉浸」的情形。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;問題是要進入沉浸並不是那麼容易。你可以試著計時，平均大概要15分鐘才能開始全速工作。一旦碰到累了或是那一天已經有很多創造性的成果，會根本無法進入沉浸，然後就只能看看網頁、玩玩俄羅斯方塊打混過完一天。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;另一個問題就是沉浸不容易維持。噪音、電話、同事的中斷（特別是這一點）都會讓你脫離沉浸。假設有個同事問了一個問題只讓你中斷了一分鐘，實際上，卻會讓你完全脫離沉浸，必須再等半個小時才能回復生產力，導致整體產能都出問題了。如果你身在一個喧鬧的開放辦公環境中（就像某些網路公司最愛的類型），行銷部門在程式設計人員旁一直對著電話大喊，那麼你的產能就像一直被中斷的知識工作者一樣顛簸，永遠無法進入理想的「沉浸」。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;這對程式設計人員來說是非常嚴重的事情。生產力的多寡在於能否於短期記憶體中處理大量的細節，而任何一種中斷都會讓這些細節完全消失。等你轉回來工作時，就會完全不記得任何細節（例如，正在使用的區域變數名稱，或是搜尋演算法寫到哪了），必須把剛才寫的東西找出來，於是速度就這樣放慢下來，直到你回復為止。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;以下做個簡單的計算。就用剛才的說法：打斷程式設計人員的一分鐘，事實上是耗費了15分鐘的產能。假設有兩個程式設計人員Jeff和Mutt，把他們安排在一個標準呆伯特式牛棚相鄰的開放隔間中。Mutt忘了strcpy函數的Unicode版本拼法，他可以花30秒自己查出來，也可以花15秒問Jeff。由於對方就坐在旁邊，所以選擇問Jeff，於是Jeff就分心並損失了15分鐘的產能（但替Mutt省了15秒）。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;現在把他們搬到兩間有牆有門的獨立房間裡。如果Mutt忘記那個函數的拼法，他可以花30秒查出來，也可以花45秒過去問Jeff（以典型程式設計人員的身材來說，要離開位置並不輕鬆），結果他就自己查了。於是Mutt損失30秒的產能，不過，卻替Jeff省下15分鐘！&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;9. 你有沒有用市面上最好的工具？&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;用編譯式語言撰寫程式得花一些時間進行編譯，可說是一般家用電腦還無法瞬間完成的事情之一。如果你的編譯過程超過幾秒，去找台最新、最棒的電腦可以替你省點時間；如果編譯需要超過15 秒，程式設計人員覺得無聊就會跑去看線上新聞 The Onion，然後陷在裡面耗掉幾個鐘頭的產能。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;在單螢幕系統上替 GUI程式除錯並非絕不可能，但用起來很痛苦。當你在撰寫GUI程式時，或許使用兩台螢幕會讓你輕鬆許多。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;大部分程式設計人員到最後都必須修飾圖示或工具列所用的圖，可是大部分的人都沒有一個好用的圖形編輯器。雖然用微軟的小畫家修圖實在令人不可思議，不過，卻是多數程式設計人員不得不做的事。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;在我的前一家公司，系統管理員會一直傳送自動發送的垃圾信給我，抱怨我在伺服器上使用了超過「 220 MB」的硬碟空間。依據現在硬碟的價格，這點空間的費用還遠不及我所用的衛生紙。即使只花10分鐘清理目錄，也是產能的極大浪費。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;一流的開發團隊並不會虐待他們的程式設計人員。工具不佳所引起的挫折感雖然很小，累積起來還是會讓程式設計人員心情超級不爽、外加脾氣暴躁。而心情不爽就等於是無生產力。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;不過，程式設計人員也是很容易被酷炫、新潮的東西所賄賂，這比用加薪叫他們工作要便宜得多了！&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;10. 你有沒有測試人員？&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;如果你的團隊沒有專門的測試人員（至少每兩到三個程式設計人員要配一名），就可能會推出問題很多的產品，不然就是浪費錢，像是讓時薪 100美元的程式設計人員去做測試員（時薪 30美元）做的事。省下測試員的錢並不是真正的節省，這是非常明顯的道理，但我實在很驚訝很多人卻還認不清這一點。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;11. 是否在面試時要求面試的對象試寫程式？&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;你會不請魔術師先表演幾招就直接雇用嗎？當然不會。你會不先試菜就決定自己婚宴的餐廳嗎？我很懷疑。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;儘管如此，現在程式設計人員能否被錄用，都必須要看履歷是否與眾不同？是否與主考官相談甚歡？或是回答出只要查查文件就能知道的瑣碎問題（例如，CreateDialog()和DialogBox()間的差異是什麼？）。你根本不會管他們能否背得出幾百條有關程式設計的瑣事，你真正在意的是他們能否寫出程式。更糟的情況是問那種「啊！我懂了！」的腦筋急轉彎問題；就是那種知道答案時理所當然，可是光看題目時卻覺得莫名其妙。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;拜託別再這樣做了！隨便你想怎麼面試都行，不過請記得一定要讓面試者寫些程式。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;12. 是否進行走廊使用性測試？&lt;/strong&gt;&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;「走廊使用性測試（Hallway usability）」是指在走廊攔住下一位經過的人，然後逼他試用你剛寫好的程式。如果能攔下五個人並且試用完成，就可以發現程式中95%應注意的使用性問題。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;設計出良好的使用者介面並沒有想像中那麼困難，但是必須要能夠吸引客戶並購買產品，才是最重要的。你可以參閱我所寫的免費線上使用介面設計書，這是針對程式設計人員的入門書籍。&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;不過，處理使用者介面有一點最重要：如果你把程式展示給少數幾個人看（事實上，只要五或六個就夠了），就能快速地發現一般人會遇到的主要問題。在Jakob Nielsen的文章中有解釋原因。即使你的UI設計技巧不足，只要強硬逼自己實行不花太多時間的走廊使用性測試，就會讓你的UI水準大幅提昇。（摘錄整理自第三章）&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; line-height: 26px;font-family:新細明體,Arial,Helvetica,sans-serif;font-size:15px;"  &gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;&lt;span class="Apple-style-span" style="line-height: 26px;font-family:新細明體,Arial,Helvetica,sans-serif;font-size:15px;"  &gt;&lt;strong&gt;後記&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;font-family:Arial;font-size:medium;"  &gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; line-height: 26px;font-family:新細明體,Arial,Helvetica,sans-serif;font-size:15px;"  &gt;&lt;span style="font-size:100%;"&gt;從2000年8月約耳測試問世以來，世界各地的開發人員寄了很多電子郵件來告知他們組織的分數。雖然測試結果的分佈相當平均，但大部分的回覆分數都 介約2或3之間。&lt;br /&gt;　&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;聽說有很多開發人員受夠了無組織的「槍手（Gunslinger）」軟體開發實務，假如公司的約耳測試分數太低，便會拒絕到該公司工作。也曾聽過團體經理把約耳測試作為逐步改善團隊改善的程序，並且一路向上的好消息。&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;在這段期間，很多開發組織似乎走太遠了，已遠遠超過約耳測試所及，而進入了高級官僚動脈硬化的陣痛期。出現這種狀況時你一定會發現，因為人們花在會議準備上的時間遠比開發軟體還多，即使在約耳測試中拿到滿分12分，還是可能會因過多的政治問題和固定負擔而搞砸。以下這一段可別透露是我說的！早自1990年代我還在微軟工作時，所有證據都顯示，該公司因為組織過於龐大、內部政治鬥爭、官僚浪費等原因，幾乎已陷入停頓狀態。證據何在？就拿平板電腦來說，平板電腦只是個某個微軟中階經理會愛的玩意，它的設計似乎讓華盛頓Redmond的產品經理花一整天開會討論，卻是在會議室裡做自己的事，根本沒有參與。但這並不是微軟才有的現象。&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;如果你發現自己花太多時間在安裝及設置龐大的軟體方法系統、或命名「視覺化XXXX企業架構師」的軟體、甚至是在極致軟體製程開發和UML間反覆來回對團隊進行再教育，直到他們在開發軟體時，只會一直把頭轉來轉去不知所措 ，即使這份約耳測試成績再好，終究還是問題纏身。（摘錄整理自第三章）&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6385224826018482622?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6385224826018482622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6385224826018482622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6385224826018482622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6385224826018482622'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/06/12.html' title='邁向高品質程式碼的12個步驟'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-2157763912517236421</id><published>2010-06-19T07:48:00.000-07:00</published><updated>2010-06-19T07:57:43.222-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java performance Issue</title><content type='html'>今天在 TheServeside 看一到一篇文章，剛好是我的專長，也讓我多知道一些有關 Java Performance 的偵測方式&lt;br /&gt;&lt;br /&gt;其中最常發生的應該是 Database Call。我常常看到 Developer 寫 code 時，因為沒經驗的關係，把兩個 table 的資料放在 Loop 裡面寫，造成多餘的 Database Call&lt;br /&gt;&lt;br /&gt;舉例而言， 要找出 product 的 vendor ，有經驗的 Developer 會用 join 的方式一次 Query 就將 Data 一次取出，但沒經驗的就會先取出所有 Product 後再 loop product 再取出 vendor。這個是所有沒經驗的 Developer 會做的事。所以只要出個類似的題目給 Developer 就可以看出程度如何了。&lt;br /&gt;&lt;br /&gt;以下是從 TheServerSide 貼過來了，供大家參考&lt;br /&gt;&lt;br /&gt;&lt;div class="title"&gt;           &lt;h2&gt;Top 10 Performance Problems taken from Zappos, Monster, Thomson  and Co          &lt;/h2&gt;     &lt;div class="author"&gt;by Andreas Grabner, Jun 15, 10&lt;/div&gt;           &lt;/div&gt;&lt;!-- end title --&gt;                        &lt;p&gt;For a recent edition of the &lt;a href="http://www.computerworld.ch/aktuell/news/51377/index.html" target="_blank"&gt;Swiss Computerworld Magazine&lt;/a&gt; we listed our Top 10  Performance Problems as we have seen them over the years when working  with our clients. I hope this list is enlightening – and I’ve included  follow-up links to the blogs to help better understand how to solve  these problems:&lt;/p&gt; &lt;h3&gt;#1: Too Many Database Calls&lt;/h3&gt; &lt;p&gt;The problem we see the most are too many database query per  request/transaction. There are 3 specific phenomena to witness&lt;/p&gt; &lt;ol&gt;&lt;li&gt;More data is requested is than actually required in the context of  the current transaction, e.g.: requesting all account information  instead of those that we need to display on the current screen.&lt;/li&gt;&lt;li&gt;The same data is requested multiple times. This usually happens when  different components involved in the same transaction act independently  from one another and each requests the same set of data. It is unknown  what type of data has already been loaded in the current context so we  end up with the same queries multiple times.&lt;/li&gt;&lt;li&gt;Multiple queries are executed to retrieve a certain set of data.  This is often a result of not taken full advantage of complex SQL  statements or stored procedures to retrieve the data in one batch.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Further Reading: &lt;a href="http://blog.dynatrace.com/2009/04/30/linq2sql-prevent-performance-issues-when-operating-on-multiple-rows-with-stored-procedures" target="_blank"&gt;Blog on Linq2Sql Performance Issues on Database&lt;/a&gt;,  &lt;a href="http://blog.dynatrace.com/2009/10/16/video-on-common-performance-antipatterns-online/" target="_blank"&gt;Video on Performance Anti-Patterns&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;#2: Synchronized  to Death&lt;/h3&gt; &lt;p&gt;There is no question that synchronization is necessary to protect  shared data in an application. Too often developers make the mistake to  over-synchronize, e.g.: excessively-large code sequences are  synchronized. Under low load (on the local developers workstation)  performance won’t be a problem. In a high-load or production environment  over-synchronization results in severe performance and scalability  problems.&lt;/p&gt; &lt;p&gt;Further Reading: &lt;a href="http://blog.dynatrace.com/2009/04/02/performance-analysis-how-to-identify-synchronization-issues-under-load/" target="_blank"&gt;How to identify synchronization problems under load&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;#3: Too chatty on the remoting channels&lt;/h3&gt; &lt;p&gt;Many libraries out there make remote communication seem like a piece  of cake. There is hardly any difference for the developer to call a  local vs. remote method. The lack of understanding of what is really  going on under the remoting-hood makes people forget about things like  latency, serialization, network traffic and memory usage that come with  every remoting call. The easy way of using these technologies results in  too many calls across these remoting boundaries and in the end causes  performance and scalability problems.&lt;/p&gt; &lt;p&gt;Further Reading: &lt;a href="http://blog.dynatrace.com/2009/09/28/performance-considerations-in-distributed-applications/" target="_blank"&gt;Performance Considerations in Distributed Applications&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;#4: Wrong usage of O/R-Mappers&lt;/h3&gt; &lt;p&gt;Object-Relational Mappers take a big burden off developers’ shoulders  – loading and persisting objects in the database. As with any framework  there usually are many configuration options to optimize the usage of  the O/R Mapper for current application use cases. Faulty settings and  incorrect usage of the framework itself too often results in unexpected  performance and scalability problems within these frameworks. Make sure  you make yourself familiar with all options and learn about the  internals of these libraries that you rely on.&lt;/p&gt; &lt;p&gt;Further Reads: &lt;a href="http://blog.dynatrace.com/2009/02/16/understanding-caching-in-hibernate-part-one-the-session-cache/" target="_blank"&gt;Understanding Hibernate Session Cache&lt;/a&gt;, &lt;a href="http://blog.dynatrace.com/2009/02/16/understanding-caching-in-hibernate-part-two-the-query-cache/" target="_blank"&gt;Understanding the Query Cache&lt;/a&gt;, &lt;a href="http://blog.dynatrace.com/2009/03/24/understanding-caching-in-hibernate-part-three-the-second-level-cache/" target="_blank"&gt;Understanding the Second Level Cache&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;#5: Memory Leaks&lt;/h3&gt; &lt;p&gt;Managed  runtime environments such as Java and .NET have the  advantage of helping with memory management by offering Garbage  Collectors. A GC, however, does not prevent memory leaks. Objects that  are “forgotten” will stick around in memory and ultimately lead to a  memory leak that may cause an OutOfMemoryException. It is important to  release object references as soon as they are no longer needed.&lt;/p&gt; &lt;p&gt;Further Read: &lt;a href="http://blog.dynatrace.com/2010/03/03/week-5-hunting-lost-treasures-understanding-and-finding-memory-leaks/" target="_blank"&gt;Understanding and finding Memory Leaks&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;#6: Problematic 3rd Party  Code/Components&lt;/h3&gt; &lt;p&gt;Nobody is writing all of the functionality of a new application on  their own. We use existing 3rd party libraries to speed up our  development process. Not only do we speed up our output – but we also  increase performance risks introduced by these components. Even though  most frameworks are well documented and have been thoroughly tested,  there is no guarantee that these frameworks run as expected in every use  case they are included. 3rd party code is often used incorrectly or in  ways that have not been tested. It is therefore important to make an  in-depth check of every framework before introducing it into your code.&lt;/p&gt; &lt;p&gt;Further Read: &lt;a href="http://blog.dynatrace.com/2010/03/18/how-to-avoid-the-top-5-sharepoint-performance-mistakes/" target="_blank"&gt;Top SharePoint Performance Mistakes&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;#7: Wasteful handling of scarce resources&lt;/h3&gt; &lt;p&gt;Resources such as memory, CPU, I/O or the database are scarce.  Wasteful handling of these resources results in lack of access to these  resources by others and ultimately leads to performance and scalability  issues. A good example: database connections that are kept open for too  long. Connections must only be used for the time period they are really  needed, e.g.: for a query – and then returned to the connection pool. We  often see that connections are requested early on in the request  handler and are not released until the very end which leads to a classic  bottleneck situation.&lt;/p&gt; &lt;p&gt;Further Read: &lt;a href="http://blog.dynatrace.com/2009/02/25/resource-leak-detection-in-net-applications/" target="_blank"&gt;Resource Leak detection in .NET Applications&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;#8: Bloated web frontends&lt;/h3&gt; &lt;p&gt;Thanks to high-speed web access many users have a better end-user  experience in the World Wide Web. The downside of this trend is that  many applications get packed with too much stuff – they become bloated –  which ultimately leads to bad browsing behavior. Particularly  users  that do not yet have high-speed internet access suffer the most. Too  many images that are too large; failure to use or incorrect usage of the  browser cache; or overly-aggressive usage of JavaScript/AJAX – all  result in performance problems in the browser. Following the existing  Best Practices on Web Site Performance Optimization can solve most of  these problems:&lt;/p&gt; &lt;p&gt;Further Read: &lt;a href="http://blog.dynatrace.com/2010/04/21/how-better-caching-helps-frankfurts-airport-website-to-handle-additional-load-caused-by-the-volcano/" target="_blank"&gt;How Better Caching would help speed up Frankfurt  Airport Web Site&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;#9: Wrong Cache Strategy leads to excessive Garbage Collection&lt;/h3&gt; &lt;p&gt;Caching objects in memory to avoid constant roundtrips to the  database is one way to boost performance. Caching too many objects – or  objects that are hardly ever used quickly changes the advantage of  caching into a disadvantage due to higher memory usage and increased GC  activity. Before implementing a caching strategy you have to figure out  which objects to cache and which objects not to cache in order to avoid  these types of performance and scalability problems:&lt;/p&gt; &lt;p&gt;Further Reads: &lt;a href="http://blog.dynatrace.com/2009/08/13/java-memory-problems/" target="_blank"&gt;Java Memory Problems&lt;/a&gt;, &lt;a href="http://blog.dynatrace.com/2009/04/08/performance-analysis-identify-gc-bottlenecks-in-distributed-heterogeneous-environments/" target="_blank"&gt;Identify GC Bottlenecks in Distributed Applications&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;#10: Intermittent Problems&lt;/h3&gt; &lt;p&gt;Intermittent problems are hard to find. These are usually problems  that occur with specific input parameters or only happen under certain  load conditions. Full test coverage – functional as well as load and  performance coverage – will uncover most of these problems early on  before they become real problems for real users.&lt;/p&gt; &lt;p&gt;Further Reads: &lt;a href="http://blog.dynatrace.com/2009/12/02/tracing-intermittent-errors-guest-blog-by-lucy-monahan-from-novell/" target="_blank"&gt;Tracing Intermittent Errors by Lucy Monahan from Novell&lt;/a&gt;,  &lt;a href="http://blog.dynatrace.com/2009/01/07/how-to-find-invisible-performance-problems/" target="_blank"&gt;How to find invisible performance problems&lt;/a&gt;&lt;/p&gt; &lt;h3&gt;(Bonus Problem) #11: Expensive Serialization&lt;/h3&gt; &lt;p&gt;With remoting communication – such as Web Services, RMI or WCF –  objects need to serialized by the caller in order to be transferred over  the network. The callee on the other side needs to de-serialize the  object before it can be used. Transformation therefore happens on both  sides of the call resulting in some overhead while doing so. It is  important to understand what type of serialization is required by both  ends and what the optimal choice of serialization and transport type is.  Different types of serialization have a different impact on  performance, scalability, memory usage and network traffic.&lt;/p&gt; &lt;p&gt;Further Read: &lt;a href="http://blog.dynatrace.com/2009/09/28/performance-considerations-in-distributed-applications/" target="_blank"&gt;Performance Considerations in Distributed Applications&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-2157763912517236421?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/2157763912517236421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=2157763912517236421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2157763912517236421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2157763912517236421'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/06/java-performance-issue.html' title='Java performance Issue'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-5988746602163904224</id><published>2010-06-14T07:51:00.000-07:00</published><updated>2010-06-14T07:56:43.540-07:00</updated><title type='text'>Blogger 被 China 封鎖</title><content type='html'>這個 Blogger Server 是屬於 Google 的，但不幸的，當你在 China 工作時，此 Blogger 是被封鎖住的。唯有透過 VPN 的方式連到其他國家才能將自己的心得寫到此 Blogger 上&lt;br /&gt;&lt;br /&gt;Well，不管如何，就像病毒一樣，有人寫就一定有人解，自己想辦法克服，再寫上自己的心得，只要有空並且有料就行了&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-5988746602163904224?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/5988746602163904224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=5988746602163904224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5988746602163904224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5988746602163904224'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/06/blogger-china.html' title='Blogger 被 China 封鎖'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-240310450645026955</id><published>2010-02-18T22:36:00.000-08:00</published><updated>2010-02-18T22:43:02.947-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>HTTP Session Monitor</title><content type='html'>開發 web application 時，若要管控所有的 session ，自己寫可能要花一段時間，不如試試看 &lt;br /&gt;&lt;a href="http://messadmin.sourceforge.net/"&gt;messadmin&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;這個工具可以監控目前有多少人 login ，session 的狀況。目前我試過後，此版本可以&lt;br /&gt;&lt;br /&gt;1. 送 message 給所有人，立即提醒 User 系統將會做甚麼事&lt;br /&gt;2. 將特定 User 的 session 斷掉，讓此 user 重新 login&lt;br /&gt;3. 直接整合到 J2EE 的環境，整合程度好&lt;br /&gt;&lt;br /&gt;若需要這個 package 的可以試試看，因為用的是 BSD license ，所以可以用在 commercial 上&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-240310450645026955?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/240310450645026955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=240310450645026955' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/240310450645026955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/240310450645026955'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/02/http-session-monitor.html' title='HTTP Session Monitor'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-5626690715385974437</id><published>2010-02-18T19:45:00.000-08:00</published><updated>2010-02-18T19:49:51.123-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>FreeNX, 好用的 Linux 遠端遙控軟體</title><content type='html'>以前常常用 StarWin 去連 Linux 或用 VNC 去連 Linux ，但總是覺得不順，透過以下的 URL 找到一個 solution ，看起來實在方便&lt;br /&gt;&lt;br /&gt;http://www.kenming.idv.tw/ubuntu-server_windows-os_remote-desktop-control_by-freenx&lt;br /&gt;&lt;br /&gt;經測試後，的確方便很多。利用 window client 就可以連到 Linux 開啟 X-Session ，執行一些需要 GUI 才能執行的東西。最重要的是，只需要透過 SSH 就可以用，不用開一堆 port，而且中間還有加密功能，在安全性也做得很好，推薦各位使用&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-5626690715385974437?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/5626690715385974437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=5626690715385974437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5626690715385974437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5626690715385974437'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/02/freenx-linux.html' title='FreeNX, 好用的 Linux 遠端遙控軟體'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-699210944140985763</id><published>2010-02-11T17:03:00.000-08:00</published><updated>2010-02-11T17:06:23.862-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='心情故事'/><title type='text'>過年是花錢的季節</title><content type='html'>過年真是個花錢的時段&lt;br /&gt;&lt;br /&gt;1. 要準備紅包&lt;br /&gt;2. 要購買新的家具或生活用品&lt;br /&gt;3. 總是要在牌桌上廝殺一番，還是需要錢&lt;br /&gt;&lt;br /&gt;零零總總，一堆錢啦&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-699210944140985763?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/699210944140985763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=699210944140985763' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/699210944140985763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/699210944140985763'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/02/blog-post.html' title='過年是花錢的季節'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1883863561642966730</id><published>2010-02-06T19:12:00.000-08:00</published><updated>2010-02-06T19:14:53.366-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Oracle + Sun = ?</title><content type='html'>經過了一番坡折，Sun 賣給了 Oracle，但這代表著，Sun 不見了，Oracle 是否會持續對 Java 投資呢，這個可要憂慮了。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1883863561642966730?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1883863561642966730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1883863561642966730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1883863561642966730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1883863561642966730'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/02/oracle-sun.html' title='Oracle + Sun = ?'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-2037013240283497739</id><published>2010-01-23T18:24:00.000-08:00</published><updated>2010-01-23T18:25:40.713-08:00</updated><title type='text'>Ubuntu 上的 email server 與 antivirus</title><content type='html'>這篇是從別處參考過來，對於小型企業，幫助比較大，又省成本，所以貼在此處&lt;br /&gt;&lt;br /&gt;在 Ubuntu 910 安裝 Postfix (as gateway) + MailScanner + ClamAV + Spamassassin&lt;br /&gt;&lt;br /&gt;環境&lt;br /&gt;&lt;br /&gt;OS: Ubuntu 910&lt;br /&gt;&lt;br /&gt;Mail Gateway: Postfix + MailScanner + ClamAV + Spamassassin&lt;br /&gt;&lt;br /&gt;Internal Mail Server: Exchange Server, 內部 IP 為: 192.168.1.1&lt;br /&gt;&lt;br /&gt;postfix 2.6.5&lt;br /&gt;&lt;br /&gt;MailScanner 4.74&lt;br /&gt;&lt;br /&gt;Spamassassin 3.2.5&lt;br /&gt;&lt;br /&gt;ClamAV 0.95.3&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Primary MX: domain.com IN MX mail.domain.com. (MX 記錄指向 Mail Gateway)&lt;br /&gt;&lt;br /&gt;安裝好Ubuntu 9.10，測試網路正常後進行安裝。&lt;br /&gt;&lt;br /&gt;開啟一個終端機命令視窗。(以下粗體的部分是輸入指令)&lt;br /&gt;&lt;br /&gt;先更新套件庫&lt;br /&gt;&lt;br /&gt;sudo apt-get update&lt;br /&gt;&lt;br /&gt;安裝 Postfix, Procmail並將 Postfix 設定成 Mail Gateway&lt;br /&gt;&lt;br /&gt;sudo apt-get install postfix procmail&lt;br /&gt;&lt;br /&gt;安裝postfix的時候會問你用途，選internet那一個選項，會幫你把相關設定做好。&lt;br /&gt;&lt;br /&gt;安裝完postfix之後先將postfix 服務停止。&lt;br /&gt;&lt;br /&gt;sudo /etc/init.d/postfix stop&lt;br /&gt;&lt;br /&gt;編輯postfix設定檔&lt;br /&gt;&lt;br /&gt;sudo gedit /etc/postfix/main.cf&lt;br /&gt;&lt;br /&gt;-----設定檔內容---------------------------------------&lt;br /&gt;&lt;br /&gt;smtpd_banner = $myhostname ESMTP $mail_name&lt;br /&gt;&lt;br /&gt;biff = no&lt;br /&gt;&lt;br /&gt;append_dot_mydomain = no&lt;br /&gt;&lt;br /&gt;# TLS parameters&lt;br /&gt;&lt;br /&gt;smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem&lt;br /&gt;&lt;br /&gt;smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key&lt;br /&gt;&lt;br /&gt;smtpd_use_tls = yes&lt;br /&gt;&lt;br /&gt;smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache&lt;br /&gt;&lt;br /&gt;smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache&lt;br /&gt;&lt;br /&gt;myhostname = smtp.domain.com&lt;br /&gt;&lt;br /&gt;mydomain = domain.com&lt;br /&gt;&lt;br /&gt;myorigin = $mydomain&lt;br /&gt;&lt;br /&gt;mydestination = $mydomain, localhost.$mydomain, localhost,&lt;br /&gt;&lt;br /&gt;local_recipient_maps =(空白)&lt;br /&gt;&lt;br /&gt;networks_style = host&lt;br /&gt;&lt;br /&gt;relay_domain = domain.com&lt;br /&gt;&lt;br /&gt;mailbox_command = procmail -a "$EXTENSION"&lt;br /&gt;&lt;br /&gt;transport_maps = hash:/etc/postfix/transport&lt;br /&gt;&lt;br /&gt;append_at_myorigin = no&lt;br /&gt;&lt;br /&gt;header_checks = regexp:/etc/postfix/header_checks&lt;br /&gt;&lt;br /&gt;message_size_limit = 25240000&lt;br /&gt;&lt;br /&gt;bounce_size_limit = 100000&lt;br /&gt;&lt;br /&gt;smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination&lt;br /&gt;&lt;br /&gt;mynetworks = 172.16.101.0/25&lt;br /&gt;&lt;br /&gt;default_process_limit = 30&lt;br /&gt;&lt;br /&gt;daemon_timeout = 1800s&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;sudo gedit /etc/postfix/transport&lt;br /&gt;&lt;br /&gt;----設定檔內容-----------------------------------------------------&lt;br /&gt;&lt;br /&gt;Icon7inc.com    smtp:[192.168.1.1]&lt;br /&gt;&lt;br /&gt;        ----------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;sudo postmap /etc/postfix/transport&lt;br /&gt;&lt;br /&gt;sudo /etc/init.d/postfix start&lt;br /&gt;&lt;br /&gt;修改 NAT 配置, 將 tcp 25 指向 postfix_host:25。&lt;br /&gt;&lt;br /&gt;從外部寄郵件到 someone@domain.com, 觀察 postfix 是否能 forward 給真正的 mail server (192.168.1.1)。&lt;br /&gt;&lt;br /&gt;telnet 到 mail gateway 進行測試&lt;br /&gt;&lt;br /&gt;安裝 MailScanner, ClamAV、Spamassassin，在這邊以往要安裝三個套件，現在只要安裝MailScanner就會自動安裝ClamAV及Spamassassin.&lt;br /&gt;&lt;br /&gt;sudo apt-get install mailscanner  à下完這個命令要檢查是否有安裝ClamAV及Spamassassin&lt;br /&gt;&lt;br /&gt;如果沒有命令要這樣下&lt;br /&gt;&lt;br /&gt;sudo apt-get install mailscanner clamav spamassassin&lt;br /&gt;&lt;br /&gt;ClamAV 不需要設定就會正常工作。&lt;br /&gt;&lt;br /&gt;設定MailScanner，這個設定檔很大，要修改的項目如下&lt;br /&gt;&lt;br /&gt;sudo gedit /etc/MailScanner/MailScanner.conf&lt;br /&gt;&lt;br /&gt;-----設定檔內容--------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Run As User = postfix&lt;br /&gt;Run As Group = postfix&lt;br /&gt;Incoming Queue Dir = /var/spool/postfix/hold&lt;br /&gt;Outgoing Queue Dir = /var/spool/postfix/incoming&lt;br /&gt;MTA = postfix&lt;br /&gt;&lt;br /&gt;Virus Scanning = yes&lt;br /&gt;Virus Scanners = clamav&lt;br /&gt;Use SpamAssassin = yes&lt;br /&gt;SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin&lt;br /&gt;&lt;br /&gt;Sign Clean Message = no (不要在每一封有掃過的信件加註 “This message has been scanned…”)&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;新增一個目錄spamassassin在 /var/spool/MailScanner/之下&lt;br /&gt;&lt;br /&gt;sudo mkdir /var/spool/MailScanner/spamassassin&lt;br /&gt;&lt;br /&gt;新增一個目錄smtp_sccache在 /var/spool/postfix/之下&lt;br /&gt;&lt;br /&gt;sudo mkdir /var/spool/postfix/smtp_sccache&lt;br /&gt;&lt;br /&gt;把上面兩個新增的目錄設定成postfix這個user可以存取&lt;br /&gt;&lt;br /&gt;sudo chown postfix:postfix /var/spool/MailScanner/*&lt;br /&gt;&lt;br /&gt;sudo chown postfix:postfix /var/spool/ postfix/smtp_sccache&lt;br /&gt;&lt;br /&gt;在/etc/postfix/ 下新增一個檔案 header_checks&lt;br /&gt;&lt;br /&gt;sudo gedit /etc/postfix/header_checks&lt;br /&gt;&lt;br /&gt;---------設定檔內容-------------------------------------------------------&lt;br /&gt;&lt;br /&gt;/^Received:/ HOLD&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;打開/etc/default/mailscanner修改內容&lt;br /&gt;&lt;br /&gt;sudo gedit /etc/default/mailscanner&lt;br /&gt;&lt;br /&gt;---------設定檔內容-------------------------------------------------------&lt;br /&gt;&lt;br /&gt;run_mailscanner=1 (=0要改成=1)&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;打開/etc/default/spamassassin修改內容&lt;br /&gt;&lt;br /&gt;sudo gedit /etc/default/pamassassin&lt;br /&gt;&lt;br /&gt;---------設定檔內容-------------------------------------------------------&lt;br /&gt;&lt;br /&gt;ENABLED=1 (=0要改成=1)&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;上面兩個設定一定要做，要不然MailScanner 和 Spamassassin會無法啟動&lt;br /&gt;&lt;br /&gt;檢查/var/spool/postfix/etc下是否有service這個檔案，如果沒有複製一個過來。&lt;br /&gt;&lt;br /&gt;sudo cp /etc/service /var/spool/postfix/etc&lt;br /&gt;&lt;br /&gt;將service 啟動&lt;br /&gt;&lt;br /&gt;sudo /etc/init.d/clamav-deamon start&lt;br /&gt;&lt;br /&gt;sudo /etc/init.d/clamav-freshclam start&lt;br /&gt;&lt;br /&gt;sudo /etc/init.d/spamassassin start&lt;br /&gt;&lt;br /&gt;sudo /etc/init.d/mailscanner start&lt;br /&gt;&lt;br /&gt;sudo postmap /etc/postfix/transport&lt;br /&gt;&lt;br /&gt;sudo /etc/init.d/postfix start&lt;br /&gt;&lt;br /&gt;修改 NAT 配置, 將 tcp 25 指向 postfix_host:25。&lt;br /&gt;&lt;br /&gt;從外部寄郵件到 someone@domain.com, 觀察 postfix 是否能 forward 給真正的 mail server (192.168.1.1)。&lt;br /&gt;&lt;br /&gt;telnet 到 mail gateway 進行測試&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-2037013240283497739?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/2037013240283497739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=2037013240283497739' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2037013240283497739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2037013240283497739'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2010/01/ubuntu-email-server-antivirus.html' title='Ubuntu 上的 email server 與 antivirus'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6141348508384096599</id><published>2009-12-31T22:46:00.000-08:00</published><updated>2009-12-31T23:03:09.483-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><title type='text'>VMWare v.s. VirtualBox</title><content type='html'>最近使用 VM 的情形越來越普遍，讓我得評估如何有效率的使用 VM ，要選擇哪一個 VM 軟體&lt;br /&gt;&lt;br /&gt;目前大概使用的方式上分為兩種&lt;br /&gt;1. 若這一台 VM 是共用的，個人認為使用 VMWare 比較方便，由其是 VMWare Server 版，目前已經可以透過 Web 去控制 VM 的內容，也可以利用 IE 或 Firefox 的 Plugin 去遠端遙控實體 VM，實在非常方便。&lt;br /&gt;但是若裝在個人使用的 PC 或 Notebook 上，那就不太方便。因為得啟動好幾個 service 才能啟動 VM，但並不是每天都會用到 VM，所以平常要用時再去啟動這些 service 比較不會浪費記憶體。但使用頻繁時又得手動去啟動這些 Service ，真的是不方便&lt;br /&gt;&lt;br /&gt;2. 若這些 VM 是自己測試用的且裝在自己的機器上，那建議用 Virtual Box ，因為快速，簡便，不佔記憶體，比 VMWare 在操作上便利許多。目前還支援 snapshot 的功能，可以測試完後馬上還原成原始狀態，方便許多。尤其有時候要下載一些軟體又怕此軟體有木馬時，可以用這種方式先檢驗此軟體是否有破壞性。執行完此軟體時若系統遭破壞，可以利用 snapshot 的功能馬上恢復系統，不用再重新灌系統，實在方便許多&lt;br /&gt;&lt;br /&gt;這裡並不是評估哪一個 VM software 比較好，而是就效益上再不同場合有不同的利用方式，可以達到最有效果的功能，這樣做事的效率才是最高的&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6141348508384096599?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6141348508384096599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6141348508384096599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6141348508384096599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6141348508384096599'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/12/vmware-vs-virtualbox.html' title='VMWare v.s. VirtualBox'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-8200460828680499435</id><published>2009-12-08T06:54:00.000-08:00</published><updated>2009-12-08T06:55:55.991-08:00</updated><title type='text'>Android 正式進入戰國時代</title><content type='html'>眼看著 Android 漸漸侵蝕手機市場，何時才能在上面開發好玩的東西呢!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-8200460828680499435?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/8200460828680499435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=8200460828680499435' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8200460828680499435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8200460828680499435'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/12/android.html' title='Android 正式進入戰國時代'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6384097884007469447</id><published>2009-11-01T03:32:00.000-08:00</published><updated>2009-11-01T06:59:40.795-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Upgrade Ubuntu 9.10，結果中文輸入法會掛</title><content type='html'>今天試了 Ubuntun 9.10，用起來還滿順的，但用 IM 時 (empathy) ，突然滑鼠就擋掉了，無法選擇 Windows 做動作，只好重新開機&lt;br /&gt;&lt;br /&gt;這是怎麼回事呢，得好好查查看&lt;br /&gt;&lt;br /&gt;PS:查過 forum 後，發現是 bug ，尤其是從 pgdign 匯入帳號比較會發生此情況。問題已經提到 Ubuntu 的清單上，只是尚未有結果。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6384097884007469447?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6384097884007469447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6384097884007469447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6384097884007469447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6384097884007469447'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/11/upgrade-ubuntu-910.html' title='Upgrade Ubuntu 9.10，結果中文輸入法會掛'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1697987181675580585</id><published>2009-10-26T06:37:00.000-07:00</published><updated>2009-10-26T06:43:02.054-07:00</updated><title type='text'>如何解決 jQuery 與 Prototype 的衝突</title><content type='html'>在 import javascript 用以下的方式解決&lt;br /&gt;&lt;br /&gt;&lt;pre&gt; &lt;br /&gt;&amp;lt;script src="jquery.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;  jQuery.noConflict()&lt;br /&gt;&amp;lt;/script&gt;&lt;br /&gt;&amp;lt;script src="prototype.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1697987181675580585?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1697987181675580585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1697987181675580585' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1697987181675580585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1697987181675580585'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/10/jquery-prototype.html' title='如何解決 jQuery 與 Prototype 的衝突'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6976568742712804937</id><published>2009-10-26T05:19:00.000-07:00</published><updated>2009-10-26T05:26:50.600-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android 2.0</title><content type='html'>今天看新聞，不小心看到了 Motorola 的 Droid 是用 Android 2.0 的版本&lt;br /&gt;&lt;br /&gt;哇靠，SDK 都才 1.6 ，Motorola 竟然已經跑到 2.0 的版本了&lt;br /&gt;&lt;br /&gt;話說去年 8 月發表 1.0 時，就想試試看，但因為工作關係，一直沒機會朝這方面發展，但一下子，已到了百發齊放的地步了。一堆 Android 機漸漸出籠，Windows Mobile 與 iPhone 必須小心 Android 的發展，畢竟有 Google 這家老店把關，系統上不會差到哪邊去，而且會越來越強&lt;br /&gt;&lt;br /&gt;找時間試試看寫一個應用程式，畢竟 Java 摸了 10 幾年，應該試試看這個新玩意&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6976568742712804937?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6976568742712804937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6976568742712804937' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6976568742712804937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6976568742712804937'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/10/android-20.html' title='Android 2.0'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-2493866652493434856</id><published>2009-10-24T02:52:00.000-07:00</published><updated>2009-10-24T03:11:41.648-07:00</updated><title type='text'>Virtual Box 3.0.8</title><content type='html'>最近改用 Virtual Box 裝 VM，感覺比 VMWare Server 快滿多的。也許是因為用 Server 的關係吧，還要跑一堆 Service 才能用。&lt;br /&gt;&lt;br /&gt;最近聽說 VM Player 出 3.0 版，可以 create vm。有了這個功能，就不用再安裝 Server 版，因為 Server 版實在 loading 太重了。若是在 notebook 要跑 VM ，建議用 Virtual Box 或 VM Player. 若有 PC 或 Server 可以用的話，倒是可以裝 VMWare Server ，因為可以用 Service 跑，啟動時會順便把 VM 啟動，對 Web server 與 DB 是比較好的方式&lt;br /&gt;&lt;br /&gt;Virtual Box 可以在以下 download&lt;br /&gt;http://www.virtualbox.org/&lt;br /&gt;&lt;br /&gt;VM Player 可以在以下 download&lt;br /&gt;http://downloads.vmware.com/d/&lt;br /&gt;PS : 官方目前只有 2.5 版， 3.0 版可能還要等一下&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-2493866652493434856?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/2493866652493434856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=2493866652493434856' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2493866652493434856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2493866652493434856'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/10/virtual-box-308.html' title='Virtual Box 3.0.8'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-4316687390356637263</id><published>2009-08-27T11:23:00.000-07:00</published><updated>2009-08-27T11:28:40.903-07:00</updated><title type='text'>Subversion 的 trunk, branches 與 tags (part 1)</title><content type='html'>又因為工作的關係，接觸到 Subversion 做版本控管，上一次文章談了有關如何建立 &lt;a href="http://chen7768.blogspot.com/2008/12/create-svn-repository-with-ssl.html"&gt;Subversion Server under SSL&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;這次來談談如何做 branches 與 tags ，並且如何做 merge 的動作&lt;br /&gt;&lt;br /&gt;(待續 ....)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-4316687390356637263?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/4316687390356637263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=4316687390356637263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4316687390356637263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4316687390356637263'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/08/subversion-trunk-branches-tags-part-1.html' title='Subversion 的 trunk, branches 與 tags (part 1)'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-2843793021708112745</id><published>2009-08-26T09:32:00.000-07:00</published><updated>2009-08-26T09:35:24.377-07:00</updated><title type='text'>解決 Ubuntu 的 flash 的中文亂碼</title><content type='html'>Steps like the following&lt;br /&gt;&lt;br /&gt;1. gedit /etc/fonts/conf.d/49-sansserif.conf&lt;br /&gt;2. change "sans-serif" to "sans serif" and save.&lt;br /&gt;3. restart firefox.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That should works great.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-2843793021708112745?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/2843793021708112745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=2843793021708112745' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2843793021708112745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2843793021708112745'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/08/ubuntu-flash.html' title='解決 Ubuntu 的 flash 的中文亂碼'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-5246522536775443366</id><published>2009-06-29T08:25:00.000-07:00</published><updated>2009-06-29T08:30:17.026-07:00</updated><title type='text'>New release for Java IDE NetBeans and Eclipse</title><content type='html'>也許是時間湊巧，Eclipse 與 NetBeans 都在同時 release 新的版本&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.eclipse.org/downloads/"&gt;Eclipse 3.5 &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.netbeans.org/downloads/index.html"&gt;NetBeans 6.7 &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Download 下來看看是否值的 upgrade.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-5246522536775443366?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/5246522536775443366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=5246522536775443366' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5246522536775443366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5246522536775443366'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/06/new-release-for-java-ide-netbeans-and.html' title='New release for Java IDE NetBeans and Eclipse'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-8341968967944120970</id><published>2009-06-07T09:05:00.000-07:00</published><updated>2009-06-07T09:12:26.608-07:00</updated><title type='text'>解決 AppFuse 2.0.2 的 menu 會消失的問題</title><content type='html'>在測試 AppFuse 時，發現當將游標從主 Menu 移動到 Submenu，Submenu 會立即消失，後來在 mailing list 找到答案，原來是 css 的問題&lt;br /&gt;&lt;br /&gt;將 styles/simplicity/nav-horizontal.css 的&lt;br /&gt;&lt;br /&gt;ul#primary-nav ul {&lt;br /&gt;    position: absolute;&lt;br /&gt;    display: none;&lt;br /&gt;    left: 0px; /* Set 1px less than menu width */&lt;br /&gt;    top: 22px;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;改成&lt;br /&gt;&lt;br /&gt;ul#primary-nav ul {&lt;br /&gt;    position: absolute;&lt;br /&gt;    display: none;&lt;br /&gt;    left: 0px; /* Set 1px less than menu width */&lt;br /&gt;    top: 21px;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Submenu 便不會消失了。這個應該要 check 到 AppFuse 的 release 才對&lt;br /&gt;看來只能等 Appfuse 2.1 才會改了&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-8341968967944120970?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/8341968967944120970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=8341968967944120970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8341968967944120970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8341968967944120970'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/06/appfuse-202-menu.html' title='解決 AppFuse 2.0.2 的 menu 會消失的問題'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-4450742553495553200</id><published>2009-05-16T06:13:00.000-07:00</published><updated>2009-05-16T06:18:08.720-07:00</updated><title type='text'>將 Ubuntu 9.04 的字體變清楚</title><content type='html'>&lt;p&gt;Ubuntu 的中文字型做了 antialias 導致中文字型都會有毛邊。&lt;/p&gt;&lt;p&gt;經 google 後, 發現可以用以下方式修改,將毛邊去掉&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1.打開終端機&lt;/p&gt;&lt;p&gt;~$ sudo gedit /etc/fonts/conf.avail/66-wqy-zenhei-sharp.conf&lt;/p&gt; &lt;p&gt;將　&lt;test compare="”less”" name="”pixelsize”"&gt;&lt;double&gt;16&lt;/double&gt;&lt;/test&gt;&lt;br /&gt;改為&lt;test compare="”less”" name="”pixelsize”"&gt;&lt;double&gt;17&lt;/double&gt;&lt;/test&gt;&lt;/p&gt; &lt;p&gt;將　&lt;edit name="”antialias”" mode="”assign”"&gt;&lt;bool&gt;true&lt;/bool&gt;&lt;/edit&gt;&lt;br /&gt;改為&lt;edit name="”antialias”" mode="”assign”"&gt;&lt;bool&gt;false&lt;/bool&gt;&lt;/edit&gt;&lt;/p&gt; &lt;p&gt;存檔離開&lt;/p&gt; &lt;p&gt;2.在終端機輸入&lt;br /&gt;~$ sudo ln -s /etc/fonts/conf.avail/66-wqy-zenhei-sharp.conf  /etc/fonts/conf.d&lt;/p&gt;&lt;p&gt;如此便可以去掉毛邊,比較清析&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-4450742553495553200?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/4450742553495553200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=4450742553495553200' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4450742553495553200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4450742553495553200'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/05/ubuntu-904.html' title='將 Ubuntu 9.04 的字體變清楚'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-5892491195026979740</id><published>2009-05-10T02:22:00.000-07:00</published><updated>2009-05-10T06:38:51.108-07:00</updated><title type='text'>在 Netbeans 下安裝 Android 1.5 R1 SDK</title><content type='html'>目前 Android 的 NetBeans Plugin 並不支援 1.5 R1 SDK，但經 google 後，發現已經有人找出方法可以將 1.5 R1 整合到 NetBeans 6.5.1 的環境中。經過我測試後，目前是可以用的，所以寫在此 Blog 中提供參考使用&lt;br /&gt;&lt;br /&gt;1. 先下載 &lt;a href="http://dl.google.com/android/android-sdk-windows-1.5_r1.zip"&gt;Android SDK 1.5 R1&lt;/a&gt; ，然後解壓縮到 d:\java&lt;br /&gt;&lt;br /&gt;2. 複製 D:\java\android-sdk-windows-1.5_r1\platforms\android-1.5\ 的內容到 D:\java\android-sdk-windows-1.5_r1 ，因為 1.5 的 Layout 已經修改，在 plugin 尚未出新版前，只能先以這種方式解決。&lt;br /&gt;&lt;br /&gt;3. 執行以下命令建立新的模擬器&lt;br /&gt;d:\&gt;cd D:\java\android-sdk-windows-1.5_r1\tools&lt;br /&gt;d:\&gt;android create avd -n avd_1.5_1 -t 2&lt;br /&gt;&lt;br /&gt;這個會建立一個模擬器叫做 avd_1.5_1 ，target 為 2 (2 是 1.5 版的代號)&lt;br /&gt;&lt;br /&gt;4. 加入 Android 1.5 版到 NetBeans 中&lt;br /&gt;4.1 打開 Tools &gt; Java Platforms &gt; Android&lt;br /&gt;4.2 按 "Add Platform"&lt;br /&gt;4.3 選擇 Google Android Open Handheld Platform&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/SgbXlgJnX2I/AAAAAAAAAME/GuKuvD100lA/s1600-h/android_1.5.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 384px; height: 400px;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/SgbXlgJnX2I/AAAAAAAAAME/GuKuvD100lA/s400/android_1.5.png" alt="" id="BLOGGER_PHOTO_ID_5334187847952326498" border="0" /&gt;&lt;/a&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;&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;&lt;br /&gt;&lt;br /&gt; 4.4 指定 SDK 1.5 的目錄&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/SgbX9tosyiI/AAAAAAAAAMM/VOkUWmFesgw/s1600-h/android_1.5_1.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 394px; height: 400px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/SgbX9tosyiI/AAAAAAAAAMM/VOkUWmFesgw/s400/android_1.5_1.png" alt="" id="BLOGGER_PHOTO_ID_5334188263889226274" border="0" /&gt;&lt;/a&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;&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;&lt;br /&gt;&lt;br /&gt;  4.5 在指定 Platform 的 Name, 便可以建立 Android 1.5 的 platform.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5. 更改 android 的 project file  "buld.xml"&lt;br /&gt;打開之前的 HelloWorld project 在 build.xml 中加入以下內容 &lt;&gt; 用 [] 取代&lt;br /&gt;&lt;br /&gt;[target name="-pre-init"]&lt;br /&gt;      [property name="emulator.options" value="-avd avd_1.5_1"/]&lt;br /&gt;[/target]&lt;br /&gt;&lt;br /&gt;6. 重新 build 並 run 便可以執行此專案了.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;後記 : 目前 Android 還是只支援 Eclipse. 至於是否會支援 NetBeans ，變數可能加大，因為 Oracle 將 Sun 買下來後，是否會放棄 NetBeans，還是未知數。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-5892491195026979740?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/5892491195026979740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=5892491195026979740' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5892491195026979740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5892491195026979740'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/05/netbeans-android-15-r1-sdk.html' title='在 Netbeans 下安裝 Android 1.5 R1 SDK'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_i9YOUbw9_84/SgbXlgJnX2I/AAAAAAAAAME/GuKuvD100lA/s72-c/android_1.5.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-7131545202092093401</id><published>2009-04-20T08:34:00.000-07:00</published><updated>2009-04-20T08:37:41.545-07:00</updated><title type='text'>Oracle acquire Sun</title><content type='html'>剛剛收到消息，Oracle 買下了 Sun.&lt;br /&gt;人生就是這樣，起起落落，誰都不能確定下一步會變成什麼樣。&lt;br /&gt;今天是很成功的人，下一秒有可能淪落。&lt;br /&gt;誰能預料，也許 Microsoft 會被 Google 買走也不一定啊!!&lt;br /&gt;&lt;br /&gt;還是腳踏實地的做事，別好高鶩遠了&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-7131545202092093401?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/7131545202092093401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=7131545202092093401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7131545202092093401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7131545202092093401'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/04/oracle-acquire-sun.html' title='Oracle acquire Sun'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1144445160523549015</id><published>2009-04-11T19:11:00.000-07:00</published><updated>2009-04-11T19:15:53.426-07:00</updated><title type='text'>jQuery plugin 大集合</title><content type='html'>研究了 jQuery ，發現他的 plugin 實在方便，透過幾行簡短的 javascript 便可以做出很好的效果&lt;br /&gt;以下是幾個 jQuery 的 plugin, 節錄自 http://www.wowbox.com.tw/blog/article.asp?id=3250&lt;br /&gt;若需要更新，請自行去此網站取得&lt;br /&gt;&lt;br /&gt;最近試用了 &lt;a onfocus="undefined" href="http://leandrovieira.com/projects/jquery/lightbox/"&gt;jQuery lightBox plugin&lt;/a&gt; ，讚!!&lt;br /&gt;&lt;h5&gt;File upload-文件上傳&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://www.phpletter.com/Demo/AjaxFileUpload-Demo/"&gt;Ajax File Upload &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.pixeline.be/experiments/jqUploader/"&gt;jQUploader &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.fyneworks.com/jquery/multiple-file-upload/"&gt;Multiple File Upload plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.appelsiini.net/projects/filestyle"&gt;jQuery File Style &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.com/plugins/project/InputFileCSS"&gt;Styling an input type file &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://digitalbush.com/projects/progress-bar-plugin"&gt;Progress Bar Plugin &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Form Validation-表單驗證&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/"&gt;jQuery Validation &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.dyve.net/jquery/?autohelp"&gt;Auto Help &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.willjessup.com/sandbox/jquery/form_validator/form_validate.html"&gt;Simple jQuery form validation &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://letmehaveblog.blogspot.com/2007/08/easy-client-side-web-forms-validations.html"&gt;jQuery XAV - form validations &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://itgroup.com.ph/alphanumeric/"&gt;jQuery AlphaNumeric &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://digitalbush.com/projects/masked-input-plugin"&gt;Masked Input &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.dennydotnet.com/post/TypeWatch-jQuery-Plugin.aspx"&gt;TypeWatch Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.com/plugins/project/TextLimiter"&gt;Text limiter for form fields &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.shawngo.com/gafyd/index.html"&gt;Ajax Username Check with jQuery &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Form - Select Box stuff-表單－選取框&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://jquery.sanchezsalvador.com/page/jquerycombobox.aspx"&gt;jQuery Combobox &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.ajaxray.com/blog/2007/11/08/jquery-controlled-dependent-or-cascading-select-list-2/"&gt;jQuery controlled dependent (or Cascadign) Select List &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://code.google.com/p/jqmultiselects/"&gt;Multiple Selects &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.texotela.co.uk/code/jquery/select/"&gt;Select box manipulation &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://code.google.com/p/jqueryselectcombo/"&gt;Select Combo Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.msxhost.com/jquery/linked-selects/json/%20target="&gt;jQuery - LinkedSelect &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://remysharp.com/2007/09/18/auto-populate-multiple-select-boxes/"&gt;Auto-populate multiple select boxes &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.sitespotting.it/esempi/002/"&gt;Choose Plugin (Select Replacement) &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Form Basics, Input Fields, Checkboxes etc.-表單的基本輸入框，選擇框等&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://www.malsup.com/jquery/form/"&gt;jQuery Form Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://code.handlino.com/wiki/jquery-form"&gt;jQuery-Form &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://envero.org/jlook/"&gt;jLook Nice Forms &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.whitespace-creative.com/jquery/jNice/"&gt;jNice &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.brainfault.com/2007/07/07/pin-plugin-reloaded/"&gt;Ping Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://grzegorz.frydrychowicz.net/jquery_toggleformtext/"&gt;Toggle Form Text &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://thoughts.kuzemchak.net/entry/toggleval-for-jquery/"&gt;ToggleVal &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.pengoworks.com/workshop/jquery/field.plugin.htm"&gt;jQuery Field Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://code.befruit.com/"&gt;jQuery Form’n Field plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.texotela.co.uk/code/jquery/checkboxes/"&gt;jQuery Checkbox manipulation &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.alcoholwang.cn/jquery/jTaggingDemo.htm"&gt;jTagging &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://code.google.com/p/labelcheck/"&gt;jQuery labelcheck &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://scott.sauyet.com/thoughts/archives/2007/03/31/overlabel-with-jquery/"&gt;Overlabel &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://blog.amicoimmaginario.it/2007/08/28/jquery-plugin-3-state-radio-buttons/"&gt;3 state radio buttons &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://sanisoft-demo.com/jquery/plugins/shiftcheckbox/"&gt;ShiftCheckbox jQuery Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://digitalbush.com/projects/watermark-input-plugin"&gt;Watermark Input &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://kawika.org/jquery/checkbox/"&gt;jQuery Checkbox (checkboxes with imags) &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.softwareunity.com/sandbox/jqueryspinbtn/"&gt;jQuery SpinButton Control &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.phpletter.com/form_builder/demo.html"&gt;jQuery Ajax Form Builder &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.texotela.co.uk/code/jquery/focusfields/"&gt;jQuery Focus Fields &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://home.iprimus.com.au/kbwood/jquery/timeEntry.html"&gt;jQuery Time Entry &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Time, Date and Color Picker-時間、日期和顏色選取&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://marcgrabanski.com/code/ui-datepicker/"&gt;jQuery UI Datepicker &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://kelvinluck.com/assets/jquery/datePicker/"&gt;jQuery date picker plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://code.google.com/p/jquery-timepicker/"&gt;jQuery Time Picker &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.texotela.co.uk/code/jquery/timepicker/"&gt;Time Picker &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.oakcitygraphics.com/jquery/clockpick/ClockPick.cfm"&gt;ClickPick &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://labs.perifer.se/timedatepicker/"&gt;TimePicker &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://acko.net/dev/farbtastic"&gt;Farbtastic jQuery Color Picker Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.intelliance.fr/jquery/color_picker/"&gt;Color Picker by intelliance.fr &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Rating Plugins-投票插件&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://www.phpletter.com/Demo/Jquery-Star-Rating-Plugin/#"&gt;jQuery Star Rating Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.m3nt0r.de/devel/raterDemo/"&gt;jQuery Star Rater &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://riderdesign.com/articles/displayarticle.aspx?articleid=21"&gt;Content rater with asp.net, ajax and jQuery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.learningjquery.com/2007/05/half-star-rating-plugin"&gt;Half-Star Rating Plugin &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Search Plugins-搜索插件&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://www.vulgarisoip.com/2007/08/06/jquerysuggest-11/"&gt;jQuery Suggest &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/"&gt;jQuery Autocomplete &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.pengoworks.com/workshop/jquery/autocomplete.htm"&gt;jQuery Autocomplete Mod &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.ajaxdaddy.com/demo-jquery-autocomplete.html"&gt;jQuery Autocomplete by AjaxDaddy &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://dev.reach1to1.net/saurabh/jplugins/autocomplete/"&gt;jQuery Autocomplete Plugin with HTML formatting &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://interface.eyecon.ro/docs/autocomplete"&gt;jQuery Autocompleter &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://nodstrum.com/2007/09/19/autocompleter/"&gt;AutoCompleter (Tutorial with PHP&amp;amp;MySQL) &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://rikrikrik.com/jquery/quicksearch/"&gt;quick Search jQuery Plugin &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Inline Edit &amp;amp; Editors-嵌入的編輯器，所見即所得的編輯器&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://www.jaysalvat.com/jquery/jtageditor/"&gt;jTagEditor &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://demo.wymeditor.org/demo.html"&gt;WYMeditor &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://garage.pimentech.net/scripts_doc_jquery_jframe/"&gt;jQuery jFrame &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.appelsiini.net/projects/jeditable"&gt;Jeditable - edit in place plugin for jQuery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.dyve.net/jquery/?editable"&gt;jQuery editable &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.jdempster.com/category/jquery/disableTextSelect/"&gt;jQuery Disable Text Select Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://15daysofjquery.com/edit-in-place-with-ajax-using-jquery-javascript-library/15/"&gt;Edit in Place with Ajax using jQuery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://davehauenstein.com/blog/archives/28"&gt;jQuery Plugin - Another In-Place Editor &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://dev.iceburg.net/jquery/tableEditor/demo.php"&gt;TableEditor &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://joshhundley.com/teditable-in-place-editing-for-tables/"&gt;tEditable - in place table editing for jQuery &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Audio, Video, Flash, SVG, etc-音頻，視頻，flash，svg等&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://www.contentwithstructure.com/extras/jmedia"&gt;jMedia - accessible multi-media embedding &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://sourceforge.net/projects/jbedit/"&gt;JBEdit - Ajax online Video Editor &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.sean-o.com/jquery/jmp3/"&gt;jQuery MP3 Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://malsup.com/jquery/media/"&gt;jQuery Media Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.lukelutman.com/plugins/flash/index.html"&gt;jQuery Flash Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.solitude.dk/archives/embedquicktime/"&gt;Embed QuickTime &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://keith-wood.name/svg.html"&gt;SVG Integration &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.openstudio.fr/jQuery-Multimedia-Portfolio.html"&gt;jQuery Multimedia Portfolio &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://bijon.rightbrainsolution.com/youtube/"&gt;jQuery YouTube Plugin &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Photos/Images/Galleries-照片，圖像，相冊等&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://jquery.com/demo/thickbox/"&gt;ThickBox &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://leandrovieira.com/projects/jquery/lightbox/"&gt;jQuery lightBox plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.openstudio.fr/jQuery-Multimedia-Portfolio.html"&gt;jQuery Multimedia Portfolio &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://blog.joshuaeichorn.com/archives/2007/01/11/jquery-image-strip/"&gt;jQuery Image Strip &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html"&gt;jQuery slideViewer &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://benjaminsterling.com/2007/09/09/jquery-jqgalscroll-photo-gallery/"&gt;jQuery jqGalScroll 2.0 &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://benjaminsterling.com/2007/10/02/jquery-jqgalviewii-photo-gallery/"&gt;jQuery - jqGalViewII &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://benjaminsterling.com/2007/10/21/jqgalviewiii-proof-of-concept/"&gt;jQuery - jqGalViewIII &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://opiefoto.com/articles/photoslider"&gt;jQuery Photo Slider &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://joanpiedra.com/jquery/thumbs/"&gt;jQuery Thumbs - easily create thumbnails &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.texotela.co.uk/code/jquery/jQIR/"&gt;jQuery jQIR Image Replacement &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.gmarwaha.com/jquery/jcarousellite/index.php#what"&gt;jCarousel Lite &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://projects.sevir.org/storage/jpanview/index.html"&gt;jQPanView &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://sorgalla.com/projects/jcarousel/#Examples"&gt;jCarousel &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.intelliance.fr/jquery/imagebox/"&gt;Interface Imagebox &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.getintothis.com/blog/2006/10/12/image-gallery-using-jquery-interface-reflections/"&gt;Image Gallery using jQuery, Interface &amp;amp; Reflactions &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://realazy.org/lab/jquery/j-gallery/"&gt;simple jQuery Gallery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://chicagosocial.com/gallery/"&gt;jQuery Gallery Module &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.eogallery.com/"&gt;EO Gallery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://flesler.blogspot.com/search/label/jQuery.ScrollShow"&gt;jQuery ScrollShow &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.malsup.com/jquery/cycle/"&gt;jQuery Cycle Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.projectatomic.com/en/flickr.htm"&gt;jQuery Flickr &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.appelsiini.net/2007/9/lazy-load-images-jquery-plugin"&gt;jQuery Lazy Load Images Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.sunsean.com/zoomi/"&gt;Zoomi - Zoomable Thumbnails &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://remysharp.com/2007/03/19/a-few-more-jquery-plugins-crop-labelover-and-pluck/#crop"&gt;jQuery Crop - crop any image on the fly &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.com/plugins/project/reflection"&gt;Image Reflection &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Google Map-google地圖&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://www.dyve.net/jquery/?googlemaps"&gt;jQuery Plugin googlemaps &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://code.google.com/p/jmaps/"&gt;jMaps jQuery Maps Framework &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://projects.sevir.org/storage/jqmaps/index.html"&gt;jQmaps &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://olbertz.de/jquery/googlemap.html#"&gt;jQuery &amp;amp; Google Maps &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://snippets.dzone.com/posts/show/4361"&gt;jQuery Maps Interface forr Google and Yahoo maps &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://webrocket.ulmb.com/jmaps/"&gt;jQuery J Maps - by Tane Piper &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Games-遊戲&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://fmarcia.info/jquery/tetris/tetris.html"&gt;Tetris with jQuery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://64squar.es/"&gt;jQuery Chess &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.bennadel.com/blog/623-jQuery-Demo-Mad-Libs-Word-Game.htm"&gt;Mad Libs Word Game &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.alexatnet.com/node/68"&gt;jQuery Puzzle &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.willjessup.com/sandbox/jquery/solar_system/rotator.html"&gt;jQuery Solar System (not a game but awesome jQuery Stuff) &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Tables, Grids etc.-表格，格子等&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://docs.jquery.com/Plugins/Tablesorter"&gt;UI/Tablesorter &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.reconstrukt.com/ingrid/"&gt;jQuery ingrid &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.trirand.com/blog/?p=13"&gt;jQuery Grid Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://ideamill.synaptrixgroup.com/jquery/tablefilter/tabletest.htm"&gt;Table Filter - awesome! &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://dev.iceburg.net/jquery/tableEditor/demo.php"&gt;TableEditor &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.hanpau.com/jquery/unobtrusivetreetable.php"&gt;jQuery Tree Tables &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.javascripttoolbox.com/jquery/#expandablerows"&gt;Expandable “Detail” Table Rows &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.remotesynthesis.com/blog/index.cfm/2007/9/25/Sortable-Table-ColdFusion-Custom-Tag-with-jQueryUI"&gt;Sortable Table ColdFusion Costum Tag with jQuery UI &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://flesler.blogspot.com/2007/10/jquerybubble.html"&gt;jQuery Bubble &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://tablesorter.com/docs/"&gt;TableSorter &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.webtoolkit.info/demo/jquery/scrollable/demo.html"&gt;Scrollable HTML Table &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://p.sohei.org/stuff/jquery/columnmanager/demo/demo.html"&gt;jQuery column Manager Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://p.sohei.org/stuff/jquery/tablehover/demo/demo.html"&gt;jQuery tableHover Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://p.sohei.org/stuff/jquery/columnhover/demo/demo.html"&gt;jQuery columnHover Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://makoomba.altervista.org/grid/"&gt;jQuery Grid &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://motherrussia.polyester.se/jquery-plugins/tablesorter/"&gt;TableSorter plugin for jQuery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://joshhundley.com/teditable-in-place-editing-for-tables/"&gt;tEditable - in place table editing for jQuery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.hovinne.com/dev/jquery/chartotable/"&gt;jQuery charToTable Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.ita.es/jquery/jquery.grid.columnSizing.htm"&gt;jQuery Grid Column Sizing &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.ita.es/jquery/jquery.grid.rowSizing.htm"&gt;jQuery Grid Row Sizing &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Charts, Presentation etc.-圖表&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://code.google.com/p/flot/"&gt;Flot &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://worcesterwideweb.com/2007/06/04/jquery-wizard-plugin/"&gt;jQuery Wizard Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.reach1to1.com/sandbox/jquery/jqchart/"&gt;jQuery Chart Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://ejohn.org/apps/speed/"&gt;Bar Chart &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Border, Corners, Background-邊，角，背景&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://www.malsup.com/jquery/corner/"&gt;jQuery Corner &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://blue-anvil.com/archives/anti-aliased-rounded-corners-with-jquery"&gt;jQuery Curvy Corner &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://dev.jquery.com/%7Epaul/plugins/nifty/example.html"&gt;Nifty jQuery Corner &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://illandril.net/jQuery/transparentCorners/"&gt;Transparent Corners &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.methvin.com/jquery/jq-corner.html"&gt;jQuery Corner Gallery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://blog.brandonaaron.net/my-jquery-plugins/gradient/"&gt;Gradient Plugin &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Text and Links-文本和鏈接&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://wanderinghorse.net/computing/javascript/jquery/spoilers/demo.html"&gt;jQuery Spoiler plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html"&gt;Text Highlighting &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.jdempster.com/category/jquery/disableTextSelect/"&gt;Disable Text Select Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.texotela.co.uk/code/jquery/newsticker/"&gt;jQuery Newsticker &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.ollicle.com/2007/jun/03/jquery_lineheight_flexible.html"&gt;Auto line-height Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://agencenp.net/textgrad/textgrad.html"&gt;Textgrad - a text gradient plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://kawika.org/jquery/linklook/"&gt;LinkLook - a link thumbnail preview &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://rikrikrik.com/jquery/pager/#examples"&gt;pager jQuery Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://rikrikrik.com/jquery/shortkeys/"&gt;shortKeys jQuery Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.ollicle.com/eg/jquery/biggerlink"&gt;jQuery Biggerlink &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://troy.dyle.net/linkchecker/"&gt;jQuery Ajax Link Checker &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://noteslog.com/chili/"&gt;Chili jQuery code highlighter plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jscroller.markusbordihn.de/example/left/"&gt;jScroller &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Tooltips-提示&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/"&gt;jQuery Plugin - Tooltip &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.codylindley.com/blogstuff/js/jtip/"&gt;jTip - The jQuery Tool Tip &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://examples.learningjquery.com/62/demo/index.html#examplesection"&gt;clueTip &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://edgarverle.com/BetterTip/default.cfm"&gt;BetterTip &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://ioreader.com/2007/05/15/flash-tooltips-using-jquery/"&gt;Flash Tooltips using jQuery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.texotela.co.uk/code/jquery/tooltipdemo/"&gt;ToolTip &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Menus, Navigations-菜單，導航&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://stilbuero.de/jquery/tabs_3/"&gt;jQuery Tabs Plugin - awesome! &lt;/a&gt;[&lt;a onfocus="undefined" href="http://stilbuero.de/jquery/tabs_3/nested.html"&gt; demo nested tabs &lt;/a&gt;]&lt;br /&gt;&lt;a onfocus="undefined" href="http://blog.cutterscrossing.com/index.cfm/2007/6/15/Updated-JQuery-Nested-Tab-Set-with-Demo"&gt;another jQuery nested Tab Set example (based on jQuery Tabs Plugin) &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.sunsean.com/idTabs/"&gt;jQuery idTabs &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jdsharp.us/jQuery/plugins/jdMenu/"&gt;jdMenu - Hierarchical Menu Plugin for jQuery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://be.twixt.us/jquery/suckerFish.php"&gt;jQuery SuckerFish Style &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://bassistance.de/jquery-plugins/jquery-plugin-treeview/"&gt;jQuery Plugin Treeview &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://be.twixt.us/jquery/treeView.php"&gt;treeView Basic &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://labs.activespotlight.net/jQuery/menu_demo.html"&gt;FastFind Menu &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.getintothis.com/blog/2006/09/26/my-first-jquery-plugin-a-sliding-menu/"&gt;Sliding Menu &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://gmarwaha.com/blog/?p=7"&gt;Lava Lamp jQuery Menu &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://icon.cat/wiki/IconDock_En#iconDock_jQuery_Plugin"&gt;jQuery iconDock &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://cherne.net/brian/resources/jquery.variations.html"&gt;jVariations Control Panel &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.trendskitchens.co.nz/jquery/contextmenu/"&gt;ContextMenu plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://p.sohei.org/jquery-plugins/clickmenu/"&gt;clickMenu &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.ndesign-studio.com/blog/mac/css-dock-menu"&gt;CSS Dock Menu &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://webexpose.org/2006/12/28/jquery-pop-up-menu-tutorial/"&gt;jQuery Pop-up Menu Tutorial &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.getintothis.com/blog/2006/09/26/my-first-jquery-plugin-a-sliding-menu/"&gt;Sliding Menu &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Accordions, Slide and Toggle stuff-幻燈、翻轉&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://bassistance.de/jquery-plugins/jquery-plugin-accordion/"&gt;jQuery Plugin Accordion &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://fmarcia.info/jquery/accordion.html"&gt;jQuery Accordion Plugin Horizontal Way &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://letmehaveblog.blogspot.com/2007/10/haccordion-simple-horizontal-accordion.html"&gt;haccordion - a simple horizontal accordion plugin for jQuery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://dev.portalzine.de/index?/Horizontal_Accordion--print"&gt;Horizontal Accordion by portalzine.de &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://berndmatzner.de/jquery/hoveraccordion/"&gt;HoverAccordion &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://fmarcia.info/jquery/accordion.html"&gt;Accordion Example from fmarcia.info &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://blog.evaria.com/wp-content/themes/blogvaria/jquery/index.php"&gt;jQuery Accordion Example &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.com/files/demo/dl-done.html"&gt;jQuery Demo - Expandable Sidebar Menu &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.andreacfm.com/examples/jQpanels/"&gt;Sliding Panels for jQuery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.andreaseberhard.de/toggleElements/"&gt;jQuery ToggleElements &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.ndoherty.com/demos/coda-slider/"&gt;Coda Slider &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://sorgalla.com/projects/jcarousel/#Examples"&gt;jCarousel &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.reindel.com/accessible_news_slider/"&gt;Accesible News Slider Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://icant.co.uk/sandbox/jquerycodeview/"&gt;Showing and Hiding code Examples &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://gsgd.co.uk/sandbox/jquery/easing/"&gt;jQuery Easing Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://sonspring.com/journal/jquery-portlets"&gt;jQuery Portlets &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jdsharp.us/jQuery/plugins/AutoScroll/"&gt;AutoScroll &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://medienfreunde.com/lab/innerfade/"&gt;Innerfade &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Drag and Drop-拖拽&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://docs.jquery.com/UI/Draggables"&gt;UI/Draggables &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://fromvega.com/wordpress/2007/07/14/easydrag-jquery-plugin/"&gt;EasyDrag jQuery Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://sonspring.com/journal/jquery-portlets"&gt;jQuery Portlets &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://dev.iceburg.net/jquery/jqDnR/"&gt;jqDnR - drag, drop resize &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://interface.eyecon.ro/demos/drag.html"&gt;Drag Demos &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;XML XSL JSON Feeds&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://www.jongma.org/webtools/jquery/xslt/"&gt;XSLT Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://cgaskell.wordpress.com/2006/11/02/jquery-ajax-call-and-result-xml-parsing/"&gt;jQuery Ajax call and result XML parsing &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.com/plugins/project/xmlObjectifier"&gt;xmlObjectifier - Converts XML DOM to JSON &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.glyphix.com/"&gt;jQuery XSL Transform &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://malsup.com/jquery/taconite/"&gt;jQuery Taconite - multiple Dom updates &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.hovinne.com/blog/index.php/2007/07/15/132-jfeed-jquery-rss-atom-feed-parser-plugin"&gt;RSS/ATOM Feed Parser Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.malsup.com/jquery/gfeed/"&gt;jQuery Google Feed Plugin &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Browserstuff-瀏覽器相關&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://noteslog.com/post/how-to-fix-the-resize-event-in-ie/"&gt;Wresize - IE Resize event Fix Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.khurshid.com/ifixpng.php"&gt;jQuery ifixpng &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.andreaseberhard.de/pngFix/"&gt;jQuery pngFix &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.crismancich.de/jquery/plugins/linkscrubber/"&gt;Link Scrubber - removes the dotted line onfocus from links &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.matthewjrichards.co.uk/articles/2007/06/25/jquery-perciformes-the-entire-suckerfish-familly-under-one-roof"&gt;jQuery Perciformes - the entire suckerfish familly under one roof &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://blog.brandonaaron.net/my-jquery-plugins/background-iframe/"&gt;Background Iframe &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.com/plugins/project/QinIE"&gt;QinIE - for proper display of Q tags in IE &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://webrocket.ulmb.com/ability/"&gt;jQuery Accessibility Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.ogonek.net/mousewheel/jquery-demo.html"&gt;jQuery MouseWheel Plugin &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;Alert, Prompt, Confirm Windows-警告，提示，確認框&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://trentrichardson.com/Impromptu/"&gt;jQuery Impromptu &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://nadiaspot.com/jquery/confirm"&gt;jQuery Confirm Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://dev.iceburg.net/jquery/jqModal/"&gt;jqModal &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.ericmmartin.com/projects/simplemodal/"&gt;SimpleModal &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;CSS-樣式表單&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://www.kelvinluck.com/article/switch-stylesheets-with-jquery"&gt;jQuery Style Switcher &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://andykent.bingodisk.com/bingo/public/jss/"&gt;JSS - Javascript StyleSheets &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://flesler.blogspot.com/2007/11/jqueryrule.html"&gt;jQuery Rule - creation/manipulation of CSS Rules &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.designerkamal.com/jPrintArea/"&gt;jPrintArea &lt;/a&gt;&lt;/p&gt; &lt;h5&gt;DOM, Ajax and other jQuery plugins-DOm,ajax以及其他&lt;/h5&gt; &lt;p&gt;&lt;a onfocus="undefined" href="http://flydom.socianet.com/"&gt;FlyDOM &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://brandonaaron.net/docs/dimensions/#getting-started"&gt;jQuery Dimenion Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://happygiraffe.net/blog/articles/2007/09/26/jquery-logging"&gt;jQuery Loggin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.com/plugins/project/metadata"&gt;Metadata - extract metadata from classes, attributes, elements &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://johannburkard.de/blog/programming/javascript/inc-a-super-tiny-client-side-include-javascript-jquery-plugin.html"&gt;Super-tiny Client-Side Include Javascript jQuery Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://humanized.com/weblog/2007/09/14/undo-made-easy-with-ajax-part-1/"&gt;Undo Made Easy with Ajax &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.jasons-toolbox.com/JHeartbeat/"&gt;JHeartbeat - periodically poll the server &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.appelsiini.net/projects/lazyload"&gt;Lazy Load Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://blog.brandonaaron.net/2007/08/19/new-plugin-live-query/"&gt;Live Query &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquery.offput.ca/every/"&gt;jQuery Timers &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.joanpiedra.com/jquery/shareit/"&gt;jQuery Share it - display social bookmarking icons &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.jdempster.com/category/code/jquery/cookiejar/"&gt;jQuery serverCookieJar &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://ideamill.synaptrixgroup.com/?p=3"&gt;jQuery autoSave &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.semicomplete.com/blog/geekery/jquery-interface-puffer.html"&gt;jQuery Puffer &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://33rockers.com/jquery/iframe-demo/"&gt;jQuery iFrame Plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.stilbuero.de/2006/09/17/cookie-plugin-for-jquery/"&gt;Cookie Plugin for jQuery &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://leftlogic.com/lounge/articles/jquery_spy2"&gt;jQuery Spy - awesome plugin &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.learningjquery.com/2007/01/effect-delay-trick"&gt;Effect Delay Trick &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://jquick.sullof.com/jquick/"&gt;jQuick - a quick tag creator for jQuery &lt;/a&gt;&lt;a onfocus="undefined" href="http://noteslog.com/post/metaobjects-11-released-today/"&gt;&lt;br /&gt;Metaobjects &lt;/a&gt;&lt;br /&gt;&lt;a onfocus="undefined" href="http://www.thunderguy.com/semicolon/2007/08/14/elementready-jquery-plugin/"&gt;elementReady &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1144445160523549015?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1144445160523549015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1144445160523549015' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1144445160523549015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1144445160523549015'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/04/jquery-plugin.html' title='jQuery plugin 大集合'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-3766911606929550316</id><published>2009-04-03T21:14:00.000-07:00</published><updated>2009-04-03T21:59:54.314-07:00</updated><title type='text'>jQuery 似乎很好用，來學習一下吧</title><content type='html'>&lt;h2&gt;&lt;span style="font-weight: normal;font-size:100%;" &gt;底下這篇是從  jQuery 的官網上抓下來的，可以作為學習 jQuery 的基礎，但發現另外一個 package 叫做  jQuery UI，我想這才是將  jQuery 發揮到淋漓盡致的使用方式吧&lt;br /&gt;&lt;/span&gt;&lt;/h2&gt;jQuery 的官網為&lt;a href="http://jquery.com/"&gt; http://jquery.com/&lt;/a&gt;&lt;br /&gt;jQuiery UI 的官網為 &lt;a href="http://jqueryui.com/home"&gt;http://jqueryui.com/home&lt;/a&gt;&lt;br /&gt;jQuery UI 的測試網址可以到 &lt;a href="http://jqueryui.com/demos"&gt;http://jqueryui.com/demos&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;教學網址可以參考 &lt;a href="http://jsgears.com/thread-63-1-1.html"&gt;http://jsgears.com/thread-63-1-1.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-3766911606929550316?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/3766911606929550316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=3766911606929550316' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/3766911606929550316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/3766911606929550316'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/04/jquery.html' title='jQuery 似乎很好用，來學習一下吧'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-2555065136226492506</id><published>2009-03-28T02:56:00.000-07:00</published><updated>2009-03-28T06:55:53.273-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>在 Web 上套用統計圖表 Jfreechart + cewolf</title><content type='html'>在開發 Web Page 時若要將統計圖表放到 Web 上，可以使用 &lt;a href="http://www.jfree.org/jfreechart/"&gt;JFreeChart&lt;/a&gt; 將數據轉換成圖形後，再以檔案的方式存起來，當 WebPage 顯示時再利用 URL 的方式將 image 從檔案中讀取出來並顯示在 Web Page 上&lt;br /&gt;&lt;br /&gt;這個方式雖然可以解決統計圖顯示在 Web Page 上問題，但彈性太小，無法透過參數的方式指定圖形型態，大小，資料等，而 &lt;a href="http://cewolf.sourceforge.net/new/index.html"&gt;cewolf &lt;/a&gt;這個 open source 便提供了此彈性的解決方案&lt;br /&gt;&lt;br /&gt;Cewolf 在實作上是一個 JFreeChart 的 Wrapper 並提供 Tag Library 讓 Developer 可以方便的在 JSP 上套用統計圖表。要在 JSP 下顯示圖表可以參考以下步驟&lt;br /&gt;&lt;br /&gt;1. Setup Libarary of JFreeChart and Cewolf&lt;br /&gt;從 JFreeChart 與 Cewolf 下載 library 後，必須在 web.xml 中設定 servlet 與 servlet mapping 讓圖形可以透過此 mappng 讓 Browser 下載圖表&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/Sc4m8QZEF_I/AAAAAAAAAL0/YNNzTKHGeI0/s1600-h/cewolf-1.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 119px;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/Sc4m8QZEF_I/AAAAAAAAAL0/YNNzTKHGeI0/s400/cewolf-1.png" alt="" id="BLOGGER_PHOTO_ID_5318231026605234162" border="0" /&gt;&lt;/a&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;2. Add Chart into JSP&lt;br /&gt;在 JSP 中若要加 JFreeChart 的圖表，需要加上 tag 如下 ([] 取代 &lt;&gt;)&lt;br /&gt;[%@ taglib uri="/WEB-INF/cewolf.tld" prefix="cewolf" %]&lt;br /&gt;[cewolf:chart id="line" title="EPS"   type="verticalbar" xaxislabel="category" axislabel="value"]&lt;br /&gt; [cewolf:data]&lt;br /&gt;     [cewolf:producer id="datasetProducer" /]&lt;br /&gt; [/cewolf:data]&lt;br /&gt; [cewolf:chartpostprocessor id="dataColor"/]&lt;br /&gt;[/cewolf:chart]&lt;br /&gt;[cewolf:img chartid="line" renderer="/cewolf" width="600" height="300" /]&lt;br /&gt;&lt;br /&gt;3. Assign data to id associated to chart&lt;br /&gt;這邊是用 struts 2 的方式，所以在 action 中加上 API 就可以當 id 用&lt;br /&gt;&lt;br /&gt;public DatasetProducer getDatasetProducer() {&lt;br /&gt;     DatasetProducer producer = new DatasetProducer() {&lt;br /&gt;         /**&lt;br /&gt;          * Produces some random data.&lt;br /&gt;          */&lt;br /&gt;         public Object produceDataset(Map params) throws DatasetProduceException {&lt;br /&gt;             log.info("producing data.");&lt;br /&gt;&lt;br /&gt;             // create the dataset...&lt;br /&gt;             DefaultCategoryDataset dataset = new DefaultCategoryDataset();&lt;br /&gt;&lt;br /&gt;             dataset.addValue(100, "serial1", "category1");&lt;br /&gt;             dataset.addValue(120, "serial2", "category1");&lt;br /&gt;             dataset.addValue(120, "serial3", "category1");&lt;br /&gt;&lt;br /&gt;             dataset.addValue(130, "serial1", "category2");&lt;br /&gt;             dataset.addValue(140, "serial2", "category2");&lt;br /&gt;             dataset.addValue(140, "serial3", "category2");&lt;br /&gt;&lt;br /&gt;             return dataset;&lt;br /&gt;         }&lt;br /&gt;&lt;br /&gt;         /**&lt;br /&gt;          * This producer's data is invalidated after 5 seconds. By this method the&lt;br /&gt;          * producer can influence Cewolf's caching behaviour the way it wants to.&lt;br /&gt;          */&lt;br /&gt;         public boolean hasExpired(Map params, Date since) {&lt;br /&gt;             log.debug(getClass().getName() + "hasExpired()");&lt;br /&gt;             //return (System.currentTimeMillis() - since.getTime()) &gt; 5000;&lt;br /&gt;             return true;&lt;br /&gt;         }&lt;br /&gt;&lt;br /&gt;         /**&lt;br /&gt;          * Returns a unique ID for this DatasetProducer&lt;br /&gt;          */&lt;br /&gt;         public String getProducerId() {&lt;br /&gt;             return "PageViewCountData DatasetProducer";&lt;br /&gt;         }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;         /**&lt;br /&gt;          * @see java.lang.Object#finalize()&lt;br /&gt;          */&lt;br /&gt;         protected void finalize() throws Throwable {&lt;br /&gt;             super.finalize();&lt;br /&gt;             log.debug(this + " finalized.");&lt;br /&gt;         }&lt;br /&gt;     };&lt;br /&gt;     return producer;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public ChartPostProcessor getDataColor() {&lt;br /&gt;     ChartPostProcessor dataColor = new ChartPostProcessor() {&lt;br /&gt;         public void processChart(Object chart, Map params) {&lt;br /&gt;             CategoryPlot categoryplot = (CategoryPlot) ((JFreeChart) chart)    .getPlot();&lt;br /&gt;             categoryplot.setDomainGridlinesVisible(true);&lt;br /&gt;             categoryplot.setRangeCrosshairVisible(true);&lt;br /&gt;             categoryplot.setRangeCrosshairPaint(Color.blue);&lt;br /&gt;             NumberAxis numberaxis = (NumberAxis)categoryplot.getRangeAxis();&lt;br /&gt;             numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());&lt;br /&gt;             BarRenderer barrenderer = (BarRenderer)categoryplot.getRenderer();&lt;br /&gt;             barrenderer.setDrawBarOutline(false);&lt;br /&gt;             GradientPaint gradientpaint = new GradientPaint(0.0F, 0.0F, Color.blue, 0.0F, 0.0F, new Color(0, 0, 64));&lt;br /&gt;             GradientPaint gradientpaint1 = new GradientPaint(0.0F, 0.0F, Color.green, 0.0F, 0.0F, new Color(0, 64, 0));&lt;br /&gt;             GradientPaint gradientpaint2 = new GradientPaint(0.0F, 0.0F, Color.red, 0.0F, 0.0F, new Color(64, 0, 0));&lt;br /&gt;             barrenderer.setSeriesPaint(0, gradientpaint);&lt;br /&gt;             barrenderer.setSeriesPaint(1, gradientpaint1);&lt;br /&gt;             barrenderer.setSeriesPaint(2, gradientpaint2);&lt;br /&gt;             barrenderer.setLegendItemToolTipGenerator(new StandardCategorySeriesLabelGenerator("Tooltip: {0}"));&lt;br /&gt;             CategoryAxis categoryaxis = categoryplot.getDomainAxis();&lt;br /&gt;             categoryaxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(0.52359877559829882D));&lt;br /&gt;&lt;br /&gt;         }&lt;br /&gt;     };&lt;br /&gt;     return dataColor;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;如此就可以在畫面上顯示&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_i9YOUbw9_84/Sc4p5BGb-ZI/AAAAAAAAAL8/USj2p6sVY6g/s1600-h/cewolf-2.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 207px;" src="http://4.bp.blogspot.com/_i9YOUbw9_84/Sc4p5BGb-ZI/AAAAAAAAAL8/USj2p6sVY6g/s400/cewolf-2.png" alt="" id="BLOGGER_PHOTO_ID_5318234269495851410" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PS:&lt;br /&gt;1. 在 cewolf:img chartid="line" renderer="/cewolf" width="600" height="300"中的 renderer 需要加上 "/" 因為 servlet 的 mapping 設定是以 "/" 為主&lt;br /&gt;2. 這個 cewolf package 在 resin 下若顯示兩個圖表以上會有 bug&lt;br /&gt;&lt;br /&gt;這邊提供一個範例 &lt;a href="https://sites.google.com/site/chen7768/sample-code/webchart.zip?attredirects=0"&gt;webchart&lt;/a&gt; ，提供給需要實作的人可以快速上手&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-2555065136226492506?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/2555065136226492506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=2555065136226492506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2555065136226492506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2555065136226492506'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/03/web-jfreechart-cewolf.html' title='在 Web 上套用統計圖表 Jfreechart + cewolf'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_i9YOUbw9_84/Sc4m8QZEF_I/AAAAAAAAAL0/YNNzTKHGeI0/s72-c/cewolf-1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1868542696337861945</id><published>2009-03-27T08:55:00.000-07:00</published><updated>2009-03-27T09:03:11.058-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='心情故事'/><title type='text'>學如逆水行舟，不進則退</title><content type='html'>因為工作的關係，最近接觸了 WebWork，與之前的 struts 1.x 比起來，實在方便許多，開發上實在大大的簡化了許多步驟，一個基本的 CRUD 可以在 1 個小時之內完成，若再配合 code-gen 的方式，開發的速度可謂神奇&lt;br /&gt;&lt;br /&gt;從 struts 1.x 跳到 WebWork 可能無法接受，但跳到 struts 2.x 就滿容易的，設定檔其實差不多，只是在觀念上要改變，把 action 也當作 bean 看待便行了&lt;br /&gt;&lt;br /&gt;說實在的，要進步，就要動起來。只守在原本的模式而不創新只會帶來退步而失去商機&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1868542696337861945?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1868542696337861945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1868542696337861945' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1868542696337861945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1868542696337861945'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/03/blog-post.html' title='學如逆水行舟，不進則退'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-3751890165115977278</id><published>2009-03-25T07:57:00.000-07:00</published><updated>2009-03-25T08:02:24.671-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='軟體工程'/><title type='text'>Maven 使用技巧</title><content type='html'>&lt;div class="post hentry uncustomized-post-template"&gt; &lt;a name="4439601120640617587"&gt;&lt;/a&gt; &lt;h3 class="post-title entry-title"&gt;最近看到一篇文章敘述如何成功的使用 Maven 作為 build tool ，每家公司都應該使用此 tool 作為軟體開發時的共同程式庫，減少要 start a new project 時所需要的時間，同時也可以將開發過的東西做成 Plugin ，隨時都可以引用&lt;br /&gt;&lt;/h3&gt;&lt;h3 class="post-title entry-title"&gt; &lt;a href="http://peterbacklund.blogspot.com/2009/03/five-tips-for-successfully-deploying.html"&gt;Five tips for successfully deploying Maven&lt;/a&gt; &lt;/h3&gt;  &lt;div class="post-body entry-content"&gt; Maven is one of those things that people seem to &lt;a href="http://www.google.com/search?q=i+hate+maven"&gt;hate&lt;/a&gt; rather intensely, but nevertheless adoption is steadily rising in the Java community. I've worked with Maven almost daily since the 1.0 betas, and here are five things that I think could help your team working more efficiently with Maven.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Use a repository manager&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A repository manager is basically an on-demand mirroring repository cache that you set up inside your IT infrastructure and use as primary repository for your builds. They basically work like this: if you build a project that depends on, for example, commons-lang-2.4.jar, the repository manager will download the artifact from the main Maven repository on the web, cache it locally and return it to the build client that asked for it. All subsequent builds that use the same managed repository will get the commons-lang jar delivered from the cache, not from the web.&lt;br /&gt;&lt;br /&gt;This has many advantages. First of all, it's fast. All project members, except the first one, will download any given dependency at LAN speed, which is especially nice when you're setting up a build environment from scratch (new project member, staging a clean build, etc). And of course it saves external bandwidth for other purposes and to lower costs.&lt;br /&gt;&lt;br /&gt;Second, it's safer. It allows you to run centralized and incremental backups on all external dependencies that you projects use, and you reduce your dependency on the availability of public repositories.&lt;br /&gt;&lt;br /&gt;Third, it's convenient. From time to time you will need a library that's not (yet) available in any public repository, so you have to publish it somewhere. A repository manager makes that really easy. And if you're sharing internal libraries or interfaces between projects, it's extremely handy to deploy to the managed repository. You can even set up your continuous integration build to automatically deploy snapshots.&lt;br /&gt;&lt;br /&gt;I've had a pleasant experience working with &lt;a href="http://nexus.sonatype.org/"&gt;Nexus&lt;/a&gt;, but there are others. A repository manager should be as natural a part of you infrastructure as SCM and CI if you're using Maven.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt; &lt;span style="font-weight: bold;"&gt;Specify plugin versions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;By default, Maven will automatically download a new version of any given plugin whenever there is one available. Given that Maven is 99% made up of plugins (there's even a &lt;a href="http://maven.apache.org/plugins/maven-plugin-plugin/"&gt;plugin plugin&lt;/a&gt;!), this is a potential point of breakage over time and in my opinion a design mistake.&lt;br /&gt;&lt;br /&gt;As of version 2.0.9, the default behaviour &lt;a href="http://maven.apache.org/release-notes-older.html"&gt;is improved&lt;/a&gt; by locking down the versions of the core plugins (where "core" is defined by &lt;a href="http://maven.apache.org/plugins/index.html"&gt;this list&lt;/a&gt;). However, you still need to explicitly define versions for all non-core plugins, and that can be done at the top level pom.xml in a hierarchial project using the &lt;a href="http://maven.apache.org/pom.html#Plugin_Management"&gt;pluginManagement section.&lt;/a&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;pluginmanagement&gt;&lt;br /&gt;  &lt;plugins&gt;&lt;br /&gt;      &lt;plugin&gt;&lt;br /&gt;          &lt;artifactid&gt;maven-assembly-plugin&lt;/artifactid&gt;&lt;br /&gt;          &lt;version&gt;2.2-beta-2&lt;/version&gt;&lt;br /&gt;      &lt;/plugin&gt;&lt;br /&gt;      &lt;plugin&gt;&lt;br /&gt;          &lt;artifactid&gt;maven-antrun-plugin&lt;/artifactid&gt;&lt;br /&gt;          &lt;version&gt;1.2&lt;/version&gt;&lt;br /&gt;      &lt;/plugin&gt;&lt;br /&gt;  &lt;/plugins&gt;&lt;br /&gt;&lt;/pluginmanagement&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Do this for the plugins that you actually use. Note that for plugins with group id org.apache.maven.plugin, you can omit the groupId element.&lt;br /&gt;&lt;br /&gt;This will make your builds more stable and eliminate a fairly rare but very annoying and confusing set of problems.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Learn how to use the dependency plugin&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Maven introduced the concept of transitive depedencies to the Java community, and has been a source of confusion ever since. The &lt;a href="http://maven.apache.org/plugins/maven-dependency-plugin/"&gt;dependency plugin&lt;/a&gt; is an invaluable tool for analyzing the results of the dependency algorithm, and to handle dependencies in various ways. Here are a couple of things you can do with it:&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;pre&gt;dependency:tree&lt;/pre&gt;shows (you guessed it) the dependency tree for the project, what dependencies are being pulled in and why. It's a nice overview and can help you tweak the dependency structure by excluding artifacts or override versions and so on. Example output:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[INFO] +- org.apache.activemq:activemq-core:jar:5.2.0:compile&lt;br /&gt;[INFO] |  +- org.apache.camel:camel-core:jar:1.5.0:compile&lt;br /&gt;[INFO] |  +- org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1:compile&lt;br /&gt;[INFO] |  +- org.apache.activemq:activeio-core:jar:3.1.0:compile&lt;br /&gt;[INFO] |  |  \- backport-util-concurrent:backport-util-concurrent:jar:2.1:compile&lt;br /&gt;[INFO] |  \- org.apache.geronimo.specs:geronimo-j2ee-management_1.0_spec:jar:1.0:compile&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;pre&gt;dependency:go-offline&lt;/pre&gt;Downloads all project dependencies and plugins, transitively. It's a good command to run both if you want to work offline for a while and if you want to get as many of the external dependencies in place in a single shot with no manual intervention while you go grab a cup of coffee and/or read another item in &lt;a href="http://java.sun.com/docs/books/effective/"&gt;Effective Java&lt;/a&gt; ;-)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;pre&gt;dependency:copy&lt;br /&gt;dependency:copy-dependencies&lt;/pre&gt;If you ever need to handle artifacts as files, copying all or some of them to a custom location for whatever reason, this is a good approach.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;There are many more things you can do with it, and mastering it will help you get on top of the transitive dependency situation.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Use the documentation&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Well, duh. But a weak point of Maven in the eyes of many people is the lack of documentation and the sometimes poorly organized information. There are a few good points of reference though, that you can spread around you team by setting up links on the Wiki for example:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.sonatype.com/books/maven-book/reference/"&gt;The Definitive Guide to Maven&lt;/a&gt;: a free book from Sonatype, available both as HTML and PDF. Good for the beginner, and sometimes as a reference. If you don't know where to start, start here.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The &lt;a href="http://maven.apache.org/plugins/index.html"&gt;plugin list&lt;/a&gt;: a comprehensive list to the official plugins, with links to each project page and JIRA subsection. Most of the core functionality is actually performed by one of these plugins, and you can learn a lot by studying things like the &lt;a href="http://maven.apache.org/plugins/maven-resources-plugin/"&gt;resources plugin&lt;/a&gt; documentation.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The &lt;a href="http://maven.apache.org/pom.html"&gt;POM reference&lt;/a&gt;: for the slightly more advanced user. Every element in the POM is explained. Don't forget to specify the XSD information in your POM file to get the most help from your XML editor.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Understand the conventions&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Maven is a conventions-based tool, relieving you from scripting common task like compiling source code, running tests or packaging a web application into a war file. Learning the conventions - directory structure, build phases - and working along them will make your life easier a lot of the time.&lt;br /&gt;&lt;br /&gt;There are definitely situations even in moderately sized projects to customize the build however, and Maven can sometimes be quite cumbersome to work with when you need to break the conventions. But by understanding the conventions and having the mindset that there is a good chance what you're trying to do can be accomplished within the realms of the conventions, you might be able to find a different approach than you otherwise might have.&lt;br /&gt;&lt;br /&gt;Perhaps that ugly jar-splitting, file-copying, token-replacing &lt;a href="http://maven.apache.org/plugins/maven-antrun-plugin/"&gt;antrun&lt;/a&gt; hack that you spent an agonizing week writing could be replaced by extracting part of the project into a separate module and included as a dependency instead? It's a lot easier to swim downstream than upstream.&lt;br /&gt;&lt;br /&gt;Maven &lt;a href="http://maven.apache.org/release-notes.html"&gt;just released&lt;/a&gt; version 2.1.0 with many improvements. Another build tool that shows great promise is &lt;a href="http://www.gradle.org/"&gt;Gradle&lt;/a&gt;, which combines transitive dependencies and conventions à la Maven, the Ant task library and the scripting abilities of Groovy.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-3751890165115977278?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/3751890165115977278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=3751890165115977278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/3751890165115977278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/3751890165115977278'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/03/maven.html' title='Maven 使用技巧'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-3449026078365040124</id><published>2009-01-31T17:27:00.000-08:00</published><updated>2009-01-31T23:55:44.081-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Essential Java Resources(必備 Java 資源)</title><content type='html'>最近看到一篇文章，裡面提到重要的 Java 必備資源，所以就把這些資源 blog 下來，日後在做 research 時可以參考&lt;br /&gt;&lt;br /&gt;&lt;a name="N10082"&gt;&lt;span class="atitle"&gt;&lt;span style="font-weight: bold;"&gt;Web sites and developer Web portals&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://java.sun.com/"&gt;java.sun.com&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.java.net/"&gt;java.net&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.infoq.com/"&gt;InfoQ&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.theserverside.com/"&gt;TheServerSide&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.dzone.com/"&gt;DZone&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.ibm.com/developerworks/"&gt;IBM® developerWorks&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.alphaworks.ibm.com/"&gt;IBM alphaWorks&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.onjava.com/"&gt;OnJava&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.artima.com/"&gt;Artima&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a name="N10104"&gt;&lt;span class="atitle"&gt;&lt;span style="font-weight: bold;"&gt;Weblogs&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://feeds.feedburner.com/javaposse"&gt;The Java Posse&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://www.javaspecialists.eu/archive/tjsn.rss"&gt;The Java Specialists' Newsletter&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://martinfowler.com/bliki/bliki.rss"&gt;Martin Fowler's Bliki&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a name="N10137"&gt;&lt;span class="atitle"&gt;&lt;span style="font-weight: bold;"&gt;Packages and/or libraries&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/reflect/package-summary.html"&gt;java.lang.reflect&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://java.sun.com/javase/6/docs/api/javax/script/package-summary.html"&gt;javax.script&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/management/package-summary.html"&gt;javax.management&lt;/a&gt;&lt;/b&gt; and &lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/package-summary.html"&gt;java.lang.management&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/package-summary.html"&gt;java.util.concurrent.*&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/package-summary.html"&gt;java.util&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/beans/package-summary.html"&gt;java.beans&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/logging/package-summary.html"&gt;java.util.logging&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/security/package-summary.html"&gt;java.security.*&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/package-summary.html"&gt;javax.xml.parsers.*&lt;/a&gt;&lt;/b&gt;, &lt;b&gt;&lt;a href="http://java.sun.com/webservices/docs/1.6/api/javax/xml/bind/package-tree.html"&gt;javax.xml.bind&lt;/a&gt;&lt;/b&gt;, and &lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/package-summary.html"&gt;javax.xml.transform.*&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/sound/midi/package-summary.html"&gt;javax.sound.*&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a name="N10240"&gt;&lt;span class="atitle"&gt;&lt;span style="font-weight: bold;"&gt;Books&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;Effective Java&lt;/i&gt; (2nd Ed)&lt;/b&gt; by Joshua Bloch&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;Java Concurrency in Practice&lt;/i&gt;&lt;/b&gt; by Brian Goetz&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;Better, Faster, Lighter Java&lt;/i&gt;&lt;/b&gt; by Justin Gehtland and Bruce Tate&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;Effective Enterprise Java&lt;/i&gt;&lt;/b&gt; by Ted Neward (me)&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;Release It!&lt;/i&gt;&lt;/b&gt; by Michael Nygard&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Either &lt;b&gt;&lt;i&gt;Inside the Java 2 Virtual Machine&lt;/i&gt;&lt;/b&gt; by Bill Venners or       &lt;b&gt;&lt;i&gt;Component Development for the Java Platform&lt;/i&gt;&lt;/b&gt; by Stuart Halloway&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;Patterns of Enterprise Application Architecture&lt;/i&gt;&lt;/b&gt; by Martin        Fowler and &lt;b&gt;&lt;i&gt;Enterprise Integration Patterns&lt;/i&gt;&lt;/b&gt; by Gregor Hohpe and        Bobby Woolf&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;Java Power Tools&lt;/i&gt;&lt;/b&gt; by John Smart&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;The Pragmatic Programmer&lt;/i&gt;&lt;/b&gt; by Andy Hunt and Dave Thomas&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;The Productive Programmer&lt;/i&gt;&lt;/b&gt; by Neal Ford&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;The Pragmatic Starter Kit&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;Ant in Action&lt;/i&gt; (2nd Ed)&lt;/b&gt; by Erik Hatcher and Steve Loughran&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a name="N10300"&gt;&lt;span class="atitle"&gt;&lt;span style="font-weight: bold;"&gt;Tools&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;The IDE&lt;/b&gt;&lt;br /&gt;Of course, the tools discussion begins with the IDE. In an effort to steer clear of commercial endorsements, both Eclipse and NetBeans are open source and free and thus       offer an attractive "first steps" option.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Unit testing&lt;/b&gt;&lt;br /&gt;The perennial favorite here is the original that        started the unit testing revolution, &lt;a href="http://www.junit.org/"&gt;JUnit&lt;/a&gt;, but a few others have crept        into popular usage, including &lt;a href="http://www.testng.org/"&gt;TestNG&lt;/a&gt;, and not           surprisingly &lt;a href="http://clarkware.com/software/JUnitPerf.html"&gt;JUnitPerf&lt;/a&gt;, among others.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Continuous Integration&lt;/b&gt;&lt;br /&gt;A Continuous Integration server constantly        checks the code out of source control, builds it, runs the unit tests        against it, and reports any build failures to the developers, usually        via e-mail. Several open-source versions are available, but one that        has gathered a lot of attention is Hudson, a Continuous Integration server        with a lot of plug-ins and high extensibility. The original is &lt;a href="http://cruisecontrol.sourceforge.net/"&gt;CruiseControl&lt;/a&gt; and for that reason alone     commands respect.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Static analysis&lt;/b&gt;&lt;br /&gt;&lt;a href="http://findbugs.sourceforge.net/"&gt;FindBugs&lt;/a&gt; is an open-source static analysis tool that        runs over Java code, performs deep &lt;i&gt;n&lt;/i&gt;-way analysis to figure out        all the possible code paths, and reports all sorts of errors and warnings        it finds, based on a set of extensible rules. Developed by William Pugh        (the same William Pugh who discovered a bug in the Java memory model),        FindBugs' biggest claim to fame is its ability to analyze Java code for        concurrency bugs, something that every programmer can appreciate.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Network packet tracing&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.wireshark.org/"&gt;WireShark&lt;/a&gt;       (which formerly used to be called Ethereal) gives programmers a view of        what's traveling across the network, giving them an opportunity to verify        that what's moving across the wire is what's supposed to be moving across        the wire, and that what's &lt;i&gt;not&lt;/i&gt; supposed to be there (such as sensitive        information or passwords in clear text), isn't.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Virtualization&lt;/b&gt;&lt;br /&gt;A virtualization tool (or perhaps it is more accurate        to call it a platform) like VMWare, Xen, VirtualBox, or VirtualPC offers        programmers the ability to create an environment identical to the one the        production machine will be running without losing the productivity of the        environment of the host PC. It also provides a convenient way to have a        home for trying "experimental" software without risking the machine that        has to stay productive. Most of these have some kind of free option if        they're not outright open-source projects.&lt;/li&gt;&lt;/ul&gt;&lt;a name="N10300"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a name="N10240"&gt;&lt;/a&gt;&lt;a name="N10137"&gt;&lt;/a&gt;&lt;a name="N10104"&gt;&lt;span class="atitle"&gt;以上都是在使用 Java 寫系統時最好先須具備的 Resource ，這樣才能隨時參考到資料並做最有效的運用&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;a name="N10082"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-3449026078365040124?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/3449026078365040124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=3449026078365040124' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/3449026078365040124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/3449026078365040124'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/01/essential-java-resources-java.html' title='Essential Java Resources(必備 Java 資源)'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-5433544262272923186</id><published>2009-01-29T19:34:00.000-08:00</published><updated>2009-01-29T20:21:48.176-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='資料庫'/><title type='text'>如何清除 Microsoft SQL2000, SQL2005 的 log 檔</title><content type='html'>使用 MSSQL Server 的人一定會發現，雖然資料很少，但由於 MSSQL 機制的關係，會將 transaction log 保留作為後面 recovery 用，導致 transaction 的 log file 變成非常的大，尤其是很多人用的時候，transaction log 更是大的誇張&lt;br /&gt;&lt;br /&gt;若平常有做備份，其實這些 transaction log 是可以不要的。要去除這些 log ，可以利用 MSSQL 內建的指令去除，可以參考以下步驟&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. 找出 log file 目錄&lt;/span&gt;&lt;br /&gt;要縮小這些 log ，必須先找出 log 到底有多大。這個 log file 普通都會跟資料檔放在同一個目錄，在 MSSQL 2005 的系統裡面，預設放資料檔的目錄為&lt;br /&gt;C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/SYJ71wXdRqI/AAAAAAAAALk/_lsdbECAs7g/s1600-h/mssql2005_directory.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 167px;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/SYJ71wXdRqI/AAAAAAAAALk/_lsdbECAs7g/s400/mssql2005_directory.png" alt="" id="BLOGGER_PHOTO_ID_5296932275187697314" border="0" /&gt;&lt;/a&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;副檔名為 mdf 的為資料檔， 副檔名為 ldf 的為 transaction log 檔&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. 縮小 log file&lt;/span&gt;&lt;br /&gt;打開 SQL2005 的 Server Management Studio 或 SQL2000 的 Analyzer，然後執行以下指令&lt;br /&gt;&lt;br /&gt;=======================================&lt;br /&gt;USE [master]&lt;br /&gt;ALTER DATABASE [master]&lt;br /&gt;SET RECOVERY SIMPLE;&lt;br /&gt;GO&lt;br /&gt;-- Shrink the truncated log file to 1 MB.&lt;br /&gt;DBCC SHRINKFILE (mastlog, 1);&lt;br /&gt;GO&lt;br /&gt;-- Reset the database recovery model.&lt;br /&gt;ALTER DATABASE [master]&lt;br /&gt;SET RECOVERY FULL;&lt;br /&gt;GO&lt;br /&gt;=========================================&lt;br /&gt;&lt;br /&gt;這邊需注意的是，[master] 與 [mastlog] 是邏輯名稱 (logical name)，不是資料檔名稱&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/SYJ9vrqwBZI/AAAAAAAAALs/JSfhZnxKQ78/s1600-h/sql2005_logicalname.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 340px; height: 98px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/SYJ9vrqwBZI/AAAAAAAAALs/JSfhZnxKQ78/s400/sql2005_logicalname.png" alt="" id="BLOGGER_PHOTO_ID_5296934369870480786" border="0" /&gt;&lt;/a&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;1. 一但將這些 log file 清除，就無法做 transaction 的 recovery。&lt;br /&gt;何謂 transaction 的 recovery ，就是可以利用之前的備份，將資料 recover 到特定日期。如今天是 2009/1/30，若要將資料庫還原到 1/27 的狀態，則需有 2009/1/25 的 full backup，便可以配合 1/26, 1/27 的 transaction backup ，將資料庫 recover 到 1/27 的狀態。&lt;br /&gt;&lt;br /&gt;2. 做清除 transaction log 前最好先做 full backup ，以防萬一。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-5433544262272923186?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/5433544262272923186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=5433544262272923186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5433544262272923186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5433544262272923186'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/01/microsoft-sql2000-sql2005-log.html' title='如何清除 Microsoft SQL2000, SQL2005 的 log 檔'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_i9YOUbw9_84/SYJ71wXdRqI/AAAAAAAAALk/_lsdbECAs7g/s72-c/mssql2005_directory.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6975975626442301116</id><published>2009-01-08T07:08:00.000-08:00</published><updated>2009-01-08T07:11:49.397-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Appfuse'/><title type='text'>如何用 appfuse 2.0.2 透過 gmail 發信</title><content type='html'>若需要發信但又沒有 SMTP servr 時，可以利用 gmail 的帳號發信&lt;br /&gt;因為 gmail 用的 SMTP 走的是 SSL 機制，所以設定上比較麻煩一點&lt;br /&gt;&lt;br /&gt;以下是用 gmail 發信的 mail.properties 範例&lt;br /&gt;&lt;br /&gt;mail.default.from=Name &lt;&lt;a href="mailto:xyz@gmail.com"&gt;xyz@gmail.com&lt;/a&gt;&gt;&lt;br /&gt;mail.debug=true&lt;br /&gt;mail.transport.protocol=smtp&lt;br /&gt;&lt;div class="Ih2E3d"&gt;mail.smtp.starttls.enable=true&lt;br /&gt;&lt;/div&gt;mail.host=&lt;a href="http://smtp.gmail.com/" target="_blank"&gt;smtp.gmail.com&lt;/a&gt;&lt;br /&gt;mail.username=&lt;a href="mailto:xyz@gmail.com"&gt;xyz@gmail.com&lt;/a&gt;&lt;br /&gt;mail.password=secret&lt;br /&gt;mail.port=587&lt;br /&gt;&lt;br /&gt;mail.mime.address.strict=false&lt;br /&gt;mail.mime.charset=UTF-8&lt;br /&gt;&lt;br /&gt;雖然有點 tricky, but it works&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6975975626442301116?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6975975626442301116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6975975626442301116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6975975626442301116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6975975626442301116'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2009/01/appfuse-202-gmail.html' title='如何用 appfuse 2.0.2 透過 gmail 發信'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-984018479343969082</id><published>2008-12-30T00:25:00.000-08:00</published><updated>2008-12-30T00:51:13.573-08:00</updated><title type='text'>如何手動殺 USB 病毒</title><content type='html'>最近有一位朋友，硬碟及USB 都是病毒，至於是何種毒，我就不便多說，用 Ad-Aware 及 Norton 掃了都沒用，於是就手動解毒&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. &lt;/span&gt;以 "開始" &gt; "執行" &gt; 打入 "regedit" &gt; "確定" ，這時候會彈出 registry 的視窗&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2.&lt;/span&gt; 到以下兩個位置&lt;br /&gt;[HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Run] 及&lt;br /&gt;[HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run]&lt;br /&gt;看看裡面是否有 xxxxx.exe 檔但 xxxxx 的命名方式是不規則，不是你唸的出來的&lt;br /&gt;假如有，就殺掉這個 registry，然後&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;重開機&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3.&lt;/span&gt; 開機完再以 "開始" &gt; "執行" &gt; 打入 "regedit" &gt; "確定"，這時候會出現 Dos 的命令列，請用下列方式執行命令&lt;br /&gt;&lt;br /&gt;C:\&gt; cd \&lt;br /&gt;C:\&gt;dir *.* /a/p&lt;br /&gt;&lt;br /&gt;若此時可以看到 autorun.inf 檔，表示可能已經中毒了。若還有看到 xxxxx.exe 檔，那就真的中毒了。這時候要手動刪除病毒，必須執行下列命令&lt;br /&gt;&lt;br /&gt;C:\&gt; attrib -s -h -r autorun.inf&lt;br /&gt;C:\&gt; del autorun.inf&lt;br /&gt;C:\&gt; attrib -s -h -r xxxxx.exe (可能不只一個檔案)&lt;br /&gt;C:\&gt; del xxxxx.exe&lt;br /&gt;&lt;br /&gt;若你有 C: D: E: ，必須用相同步驟刪除 D: 與 E: 上的 USB 病毒&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. &lt;/span&gt;若你有 USB 碟，按住 "Shift" 然後插入 USB 碟，等 5 秒後再放開。假設 USB 碟為 F:，用以下命令偵測病毒&lt;br /&gt;C:\&gt; F:&lt;br /&gt;F:\&gt; dir /a/p&lt;br /&gt;&lt;br /&gt;要刪除病毒，用以下命令刪除&lt;br /&gt;F:\&gt; attrib -s -h -r autorun.inf&lt;br /&gt;F:\&gt; del autorun.inf&lt;br /&gt;F:\&gt; attrib -s -h -r xxxxx.exe (可能不只一個檔案)&lt;br /&gt;F:\&gt; del xxxxx.exe&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. &lt;/span&gt;刪除完後&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;重開機&lt;/span&gt;，再用 step 2,3 去偵測是否有 USB 病毒，若沒有，表示 USB 病毒已刪除。若還有，則需要找專家幫忙了，因為有可能是變種 USB 病毒了&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-984018479343969082?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/984018479343969082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=984018479343969082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/984018479343969082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/984018479343969082'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/12/usb.html' title='如何手動殺 USB 病毒'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-4077272325831631152</id><published>2008-12-22T05:19:00.000-08:00</published><updated>2008-12-22T05:42:49.582-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Change DHCP IP to static IP in Ubuntu 8.10</title><content type='html'>若要將 Ubuntu 8.10 中的 DHCP IP 改成 static IP，必須手動用以下步驟改，因為 Ubuntu 8.10 的 NetworkManager 有 bug&lt;br /&gt;&lt;br /&gt;$ sudo update-rc.d –f NetworkManager remove       &lt;br /&gt;$ sudo reboot&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;編輯 /etc/network/interfaces&lt;br /&gt;$ sudo nano /etc/network/interfaces        &lt;br /&gt;&lt;br /&gt;auto lo eth0&lt;br /&gt; iface lo inet loopback&lt;br /&gt; iface eth0 inet static&lt;br /&gt;  address xxx.xxx.xxx.xxx(enter your ip here)&lt;br /&gt;  netmask xxx.xxx.xxx.xxx&lt;br /&gt;  gateway xxx.xxx.xxx.xxx(enter gateway ip here)       &lt;br /&gt;&lt;br /&gt;編輯 /etc/resolv.conf&lt;br /&gt;$ sudo nano /etc/resolv.conf       &lt;br /&gt;&lt;br /&gt;# Generated by NetworkManager&lt;br /&gt; nameserver xxx.xxx.xxx.xxx(enter your dns server ip)&lt;br /&gt; nameserver xxx.xxx.xxx.xxx(enter your alt dns server ip)       &lt;br /&gt;&lt;br /&gt;$ sudo /etc/init.d/networking restart&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-4077272325831631152?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/4077272325831631152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=4077272325831631152' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4077272325831631152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4077272325831631152'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/12/change-dhcp-ip-to-static-ip-in-ubuntu.html' title='Change DHCP IP to static IP in Ubuntu 8.10'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-5538828227766415453</id><published>2008-12-21T17:56:00.000-08:00</published><updated>2008-12-23T00:39:42.634-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='版本控管'/><category scheme='http://www.blogger.com/atom/ns#' term='軟體工程'/><title type='text'>Create SVN repository with SSL</title><content type='html'>軟體工程中關於程式碼的部份，最重要的可能就是版本控管。版本控管做的好，若程式上有任何問題，隨時可以把舊的拿出來對照與修正，而不用擔心被覆蓋掉的危險。在整合上也比較容易針對版本做不同的控制，以符合 delivery 時的期望。&lt;br /&gt;&lt;br /&gt;版本控制的軟體有很多，目前較流行的是 Subversion (如 Apache 用的)，但上星期看了一篇文章， Linux 教父 Linus Torvalds 偏好用 git，這個改天再研究介紹 ，這次僅介紹 Subversion 的安裝、權限控制與 Apache HTTP Server (SSL) 的整合。&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;環境上為了與自己的機器隔離，用的是 VMware Server 上裝的模擬機 Ubuntu 8.10，機器名稱為 svn.xxxx.com&lt;/span&gt;&lt;br /&gt;關於 Apache HTTP Server (SSL) 的安裝，請先參考&lt;br /&gt;&lt;h3 class="post-title entry-title"&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://chen7768.blogspot.com/2008/12/load-balance-and-clustering-with-apache.html"&gt;Load balance and clustering with Apache HTTP Server 2.2.x and Tomcat 6.0.x&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;中的 1, 2 節，因為是安裝 Linux 版的 Apache HTTP Server ，這邊只有簡單介紹 apache2 的安裝方式&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. 安裝 Apache HTTP Server 與 Subversion&lt;/span&gt;&lt;br /&gt;$ sudo apt-get install apache2 subversion libapache2-svn&lt;br /&gt;&lt;br /&gt;這時會安裝 Apache2 2.2.9 與 subversion 1.5.1 版 (寫此文章的版本)&lt;br /&gt;libapache2-svn 是給 svn 用的 apache plugin ，需另外裝&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. 建立 Subversion 的 repositoy&lt;/span&gt;&lt;br /&gt;這部份算是簡單的，只要幾行指令就可以完成&lt;br /&gt;&lt;br /&gt;$ sudo mkdir /var/svn&lt;br /&gt;$ cd /var/svn&lt;br /&gt;$ sudo svnadmin create repos&lt;br /&gt;$ cd repos&lt;br /&gt;$ sudo chmod -R 777 *&lt;br /&gt;&lt;br /&gt;若權限沒設定為 777 ，真正使用時會有權限上的 error.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. 設定 /repos 的 URL 給 svn 用&lt;/span&gt;&lt;br /&gt;$ cd /etc/apache2/mods-enabled&lt;br /&gt;$ sudo ln -s ../mods-available/dav.load dav.load&lt;br /&gt;&lt;br /&gt;編輯 /etc/apache2/sites-available/default-ssl&lt;br /&gt;將 SVN 的 location 加入如下&lt;br /&gt;&lt;virtualhost 443=""&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;        &lt;location repos=""&gt;&lt;/location&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;          DAV svn&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;          SVNPath /var/svn/repos&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;          AuthType Basic&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;          AuthName "Subversion repository"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;       AuthUserFile /var/svn/svn-auth-file&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;       Require valid-user&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;          AuthzSVNAccessFile /var/svn/authz&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;        &lt;/span&gt;&lt;/virtualhost&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;若要與 AD 認證，可以將&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;AuthUserFile &lt;/span&gt;&lt;br /&gt;改為&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;AuthLDAPEnabled on&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;AuthLDAPBindDN "CN=xxx,OU=xxx,OU=xxx,OU=xxx,OU=xxx,DC=xxx,DC=com"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;AuthLDAPBindPassword xxx&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;     &lt;br /&gt;&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;AuthLDAPURL "ldap://xxx:389/OU=xxx,OU=xxx,DC=xxx,DC=com?sAMAccountName?sub?(objectClass=*)"&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;&lt;br /&gt;AuthLDAPAuthoritative on&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;記得 ldap 的 module 要 enable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;4. 設定 SVN 的權限&lt;/span&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;/span&gt;$ sudo htpasswd -cm /var/svn/svn-auth-file doug&lt;br /&gt;&lt;br /&gt;利用編輯 htpasswd 建立認證的檔案並建立 doug 帳號&lt;br /&gt;&lt;br /&gt;$ sudo pico /var/svn/authz&lt;br /&gt;然後將以下內容加入&lt;br /&gt;[/]&lt;br /&gt;* = rw&lt;br /&gt;&lt;br /&gt;此段表示所以認證過的人都可以 讀、寫 SVN。若要針對單獨目錄作控管，可以加入如下內容&lt;br /&gt;&lt;pre class="screen"&gt;[calc:/branches/calc/bug-142]&lt;br /&gt;harry = rw&lt;br /&gt;sally = r&lt;br /&gt;&lt;/pre&gt;表示 /branches/calc/bug-142 的目錄 harry 可以讀寫，但 sally 只能讀&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. 重新啟動 Apache HTTP Server&lt;/span&gt;&lt;br /&gt;$ sudo /etc/init.d/apache2 restart&lt;br /&gt;&lt;br /&gt;這時候便可以透過 https://svn.xxx.com/repos 使用 subversion 了&lt;br /&gt;以下是使用 &lt;a href="http://tortoisesvn.net/"&gt;TortoiseSVN&lt;/a&gt; 的畫面&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_i9YOUbw9_84/SVCi_BYJjrI/AAAAAAAAALc/b8Om-KhcJHI/s1600-h/apache-https-svn.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 249px;" src="http://4.bp.blogspot.com/_i9YOUbw9_84/SVCi_BYJjrI/AAAAAAAAALc/b8Om-KhcJHI/s400/apache-https-svn.png" alt="" id="BLOGGER_PHOTO_ID_5282901566490775218" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-5538828227766415453?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/5538828227766415453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=5538828227766415453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5538828227766415453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5538828227766415453'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/12/create-svn-repository-with-ssl.html' title='Create SVN repository with SSL'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_i9YOUbw9_84/SVCi_BYJjrI/AAAAAAAAALc/b8Om-KhcJHI/s72-c/apache-https-svn.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-4991258451167265560</id><published>2008-12-17T18:34:00.000-08:00</published><updated>2008-12-19T19:09:09.773-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Load balance and clustering with Apache HTTP Server 2.2.x and Tomcat 6.0.x</title><content type='html'>HA 在網路的世界不可或缺，尤其客戶是屬於 C 端 (customer,個人) 時，更要在 AP 端配置 HA 的架構，讓系統不斷線，客戶可以持續的交易不造成中斷。&lt;br /&gt;&lt;br /&gt;HA 涉及的議題包含了&lt;span style="font-weight: bold;"&gt;軟體端&lt;/span&gt;的 Load Balance, Clustering 建置，&lt;span style="font-weight: bold;"&gt;硬體端&lt;/span&gt;的網路連線，磁碟空間配置。就硬體端而言，除了至少要有兩條網路線互相備援外，磁碟空間也必須做 replication 與備援才能有效的支援因外在因素而產生的影響。硬體端的 HA 可以有很多架構，但需要 $$ 去建置，這裡就不多講。&lt;br /&gt;&lt;br /&gt;在軟體端方面，因為熟悉 J2EE 的架構，所以就選了非常 light weight 的 Apache HTTP Server 2.2.x 與 Tomcat 6.0.x 作為 load balance and clustering 的 instance.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Load Balance 設定&lt;/span&gt;&lt;br /&gt;此部份用 Apache HTTP Server 就可做的到，這裡舉一個範例&lt;br /&gt;&lt;br /&gt;Apache HTTP Server (HTTPs)&lt;br /&gt;　　　　　　　|&lt;br /&gt;　　　　　　/　　\&lt;br /&gt;　　　　　/　　　　      \&lt;br /&gt;　　　　/　　　　　　            \&lt;br /&gt;Tomcat 6.0.x(T1)　     Tomcat 6.0.x(T2)&lt;br /&gt;&lt;br /&gt;這是最簡單的架構，透過 Apache HTTP Server ，便可以存取 T1 與 T2，然後可以在 T1 與 T2 的相同 JSP 放入不同的內容，以測試 Load Balance 的正確性&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. 下載 Apache HTTP Server 與 Tomcat 6.0.x (Windows version)&lt;/span&gt;&lt;br /&gt;1.1 下載 &lt;a href="http://ftp.stut.edu.tw/var/ftp/pub/OpenSource/apache/httpd/binaries/win32/apache_2.2.11-win32-x86-openssl-0.9.8i.msi"&gt;Apache HTTP Server 2.2.x&lt;/a&gt; 並裝至 d:\Program Files。此版本含有 openssl ，用來產生 key 與 certificate for HTTPS 用&lt;br /&gt;1.2 下載 &lt;a href="http://apache.ntu.edu.tw/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.zip"&gt;Tomcat 6.0.x&lt;/a&gt; 並解壓縮到 d:\java 中。解壓縮時需解到兩個目錄，一個是&lt;br /&gt;d:\java\apache-tomcat-6.0.16-t1，另一個是 d:\java\apache-tomcat-6.0.16-t2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. 安裝 SSL&lt;/span&gt;&lt;br /&gt;這個部份對大部分的人應該都滿陌生的，因為 SSL 有點小 tricky，除非你正式做過需 HTTPS 的案子，不然可能會搞糊塗。 這邊的 SSL 是針對 Apache HTTP Server 上的 SSL，不是 Tomcat 上的 SSL。Tomcat 的作法與 Apche HTTP Server 不同，用的工具也不同，但其 Certificate 是可以共用的，會在後面 Tomcat with SSL 時說明&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2.1 去除 D:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf 中有關 SSL 的 #&lt;/span&gt;&lt;br /&gt;#LoadModule ssl_module modules/mod_ssl.so&lt;br /&gt;#Include conf/extra/httpd-ssl.conf&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2.2 建立 CA Root Certificate 及 Server Certificate&lt;/span&gt;&lt;br /&gt;什麼是 CA Root Certificate ，基本上就是老大發的通行證，若網站是經由此老大認證過，IE 或 Firefox 就會認得此憑證是老大發的，就不用懷疑其效力。這些老大通常都會審核申請憑證的公司的合法性，一般 User 也比較能放心去這些網站使用或消費。&lt;br /&gt;&lt;br /&gt;但為何要建立 CA Root Certificate 呢，因為若要公司每台 Server 都需要 Certificate ，則每個 Certificate 都需要跟老大申請認證，這些都需要費用。若這些 Server 只是內部用，則可以自己當老大做一個 CA Root Certificate 然後認證自己發的 Server Certificate，這樣可以減少許多成本，也比較方便。用的時候只需要將老大的 CA Root Certificate 安裝到公司內部的 IE 或 Fixfox 就行了，凡經由 CA Root Certificate 認證過的 Server Certificate 都不會被詢問其 SSL的安全性問題，因為老大說了算 (不知道是否已經有人昏倒了)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;建立 CA Root Certificate&lt;/span&gt;&lt;br /&gt;d:\&gt;cd D:\Program Files\Apache Software Foundation\Apache2.2\bin&lt;br /&gt;d:&gt;openssl genrsa -des3 -out ..\conf\caroot.key 2048&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Loading 'screen' into random state - done&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;Generating RSA private key, 2048 bit long modulus&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;...........+++&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;.+++&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;e is 65537 (0x10001)&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;Enter pass phrase for ..\conf\caroot.key:&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;Verifying - Enter pass phrase for ..\conf\caroot.key:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;用 RSA 演算法+Triple Des Encryption (des3) &lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;span class="std nobr"&gt;&lt;/span&gt;建立 CA root 的 key，強度為 2048bit。密碼請輸入 暫時輸入 changeit&lt;br /&gt;&lt;br /&gt;d:&gt;openssl req -config ..\conf\openssl.cnf -new -key ..\conf\caroot.key -out ..\conf\caroot.csr&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Enter pass phrase for ..\conf\caroot.key:&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;Loading 'screen' into random state - done&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;You are about to be asked to enter information that will be incorporated&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;into your certificate request.&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;What you are about to enter is what is called a Distinguished Name or a DN.&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;There are quite a few fields but you can leave some blank&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;For some fields there will be a default value,&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;If you enter '.', the field will be left blank.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;-----&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;Country Name (2 letter code) [AU]:TW&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;State or Province Name (full name) [Some-State]:Taiwan&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Locality Name (eg, city) []:Taipei&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Company Inc.&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Organizational Unit Name (eg, section) []:My Company Dept&lt;br /&gt;Service Provider&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;Common Name (eg, YOUR name) []:My Company Trust&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Email Address []:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Please enter the following 'extra' attributes&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;to be sent with your certificate request&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;A challenge password []:&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;An optional company name []:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;這裡是產生 CSR (Certificate Service Request)，用以讓別的 CA 簽發憑證。因為是自己要用的 Root，所以等一下會自己簽自己。基本上所以有 CA Root 都是自己簽自己。&lt;br /&gt;&lt;br /&gt;d:&gt;openssl x509 -req -days 7305 -sha1 -extensions v3_ca -signkey ..\conf\caroot.key -in ..\conf\caroot.csr -out ..\conf\caroot.crt&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Loading 'screen' into random state - done&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;Signature ok&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;subject=/C=TW/ST=Taiwan/L=Taipei/O=My Company/OU=My Company Dept/CN=My Company Trust&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;/emailAddress=&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Getting Private key&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Enter pass phrase for ..\conf\caroot.key:&lt;/span&gt;&lt;br /&gt;這裡就是自己簽自己的簽發憑證。若 double click ..\conf\caroot.crt 並安裝此憑證，可以打開 &lt;span style="font-style: italic;"&gt;IE &gt; 網際網路選項 &gt; 內容 &gt; 憑證&lt;/span&gt; 看到此憑證被放到根憑證的目錄中&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/SUo2OUk3CgI/AAAAAAAAAKM/6hn2v35ANlQ/s1600-h/caroot-crt.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 364px;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/SUo2OUk3CgI/AAAAAAAAAKM/6hn2v35ANlQ/s400/caroot-crt.png" alt="" id="BLOGGER_PHOTO_ID_5281093132714707458" border="0" /&gt;&lt;/a&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;&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;PS : caroot.key 一定要保存好並記住密碼，不然掉了，所以憑證全部要重新簽發，很費時間。&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;建立 Server Certificate&lt;/span&gt;&lt;br /&gt;當建立完 CA Root Certificate 後，再來就是要建立 Server Certificate 再用 CA Root Certificate 對 Server Certitificate 做簽發 (Sign)&lt;br /&gt;d:&gt;openssl genrsa -out ..\conf\server.key 2048&lt;br /&gt;&lt;br /&gt;建立 Server 用的 key&lt;br /&gt;d:&gt;openssl req -config ..\conf\openssl.cnf -new -key ..\conf\server.key -out ..\conf\server.csr&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Loading 'screen' into random state - done&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;You are about to be asked to enter information that will be incorporated&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;into your certificate request.&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;What you are about to enter is what is called a Distinguished Name or a DN.&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;There are quite a few fields but you can leave some blank&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;For some fields there will be a default value,&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;If you enter '.', the field will be left blank.&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;-----&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Country Name (2 letter code) [AU]:TW&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;State or Province Name (full name) [Some-State]:Taiwan&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Locality Name (eg, city) []:Taipei&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Company Ltd&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Organizational Unit Name (eg, section) []:RD Dept&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Common Name (eg, YOUR name) []:www.mycompnay.com&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Email Address []:&lt;/span&gt;  &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;&lt;br /&gt;Please enter the following 'extra' attributes&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;to be sent with your certificate request&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;A challenge password []:&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;An optional company name []:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;以上會建立申請簽章的檔案 server.csr，這裡需記得 Common Name 必須與 server 的 url domain name 一樣如 www.mycompany.com，這樣才能通過 IE 或 Firefox 的認證，否則會出現 warning。&lt;br /&gt;&lt;br /&gt;d:&gt;openssl x509 -req -days 3650 -sha1 -extensions v3_req -CA ..\conf\caroot.crt -CAkey ..\conf\caroot.key -CAcreateserial -in ..\conf\server.csr -out ..\conf\server.crt&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Loading 'screen' into random state - done&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;Signature ok&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;&lt;br /&gt;subject=/C=TW/ST=Taiwan/L=Taipei/O=My Company Ltd/OU=RD Dept/CN=www.mycompnay.co&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;m&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Getting CA Private Key&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Enter pass phrase for ..\conf\caroot.key:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;這裡會用 caroot 簽發 server.csr 並產生 server.crt。double click server.crt 可得畫面如下&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/SUo6AgT-XRI/AAAAAAAAAKU/npjvfKE1yZ0/s1600-h/server-crt.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 347px; height: 400px;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/SUo6AgT-XRI/AAAAAAAAAKU/npjvfKE1yZ0/s400/server-crt.png" alt="" id="BLOGGER_PHOTO_ID_5281097293393452306" border="0" /&gt;&lt;/a&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;&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;這裡可以發現，沒有 warning, 發行者是 CA Root ，有效是 10 年&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2.3 重新啟動 Apache HTTP Server&lt;/span&gt;&lt;br /&gt;因為產生 Server 的 certificate 檔名已經同步 conf/extra/httpd-ssl.conf 裡面所定義的命名方式，所以直接啟動 Apache HTTP Server 便可以使用 HTTPS (SSL)&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_i9YOUbw9_84/SUo74PIz96I/AAAAAAAAAKc/9EP-Psq4ohE/s1600-h/apache-https-localhost.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 304px; height: 400px;" src="http://4.bp.blogspot.com/_i9YOUbw9_84/SUo74PIz96I/AAAAAAAAAKc/9EP-Psq4ohE/s400/apache-https-localhost.png" alt="" id="BLOGGER_PHOTO_ID_5281099350367532962" border="0" /&gt;&lt;/a&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;&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. 設定 load balance&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3.1 下載 &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://www.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/win32/jk-1.2.27/mod_jk-1.2.27-httpd-2.2.10.so"&gt;mod_jk&lt;/a&gt;&lt;span style="font-weight: bold;"&gt; (Tomcat 6.0.x for win32 版)&lt;/span&gt;。&lt;br /&gt;下載完 mod_jk 後 請將檔名改為 mod_jk.so 並放到 D:\Program Files\Apache Software Foundation\Apache2.2\modules 中&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3.2 在 D:\Program Files\Apache Software Foundation\Apache2.2\conf\extra 中新增一個檔案 httpd-load-balance.conf&lt;/span&gt;&lt;br /&gt;內容如下&lt;br /&gt;================================&lt;br /&gt;#(httpd.conf)&lt;br /&gt;#載入 mod_jk 模組&lt;br /&gt;LoadModule jk_module modules/mod_jk.so&lt;br /&gt;&lt;br /&gt;#&lt;br /&gt;# Configure mod_jk&lt;br /&gt;#&lt;br /&gt;JkWorkersFile conf/workers.properties&lt;br /&gt;JkMountFile conf/uriworkermap.properties&lt;br /&gt;JkLogFile logs/mod_jk.log&lt;br /&gt;JkLogLevel info&lt;br /&gt;&lt;br /&gt;&lt;location jkmanager=""&gt;&lt;br /&gt;JkMount jkstatus&lt;br /&gt;Order deny,allow&lt;br /&gt;Deny from all&lt;br /&gt;Allow from 127.0.0.1&lt;br /&gt;&lt;/location&gt;&lt;br /&gt;===============================&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3.3 在 D:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf 的最後新增一行&lt;/span&gt;&lt;br /&gt;內容為&lt;br /&gt;Include conf/extra/httpd-load-balance.conf&lt;br /&gt;&lt;br /&gt;如此重新啟動 Apache HTTP Server 時才會把 load balance 的 module 放到 kernel 中執行&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3.4 在 D:\Program Files\Apache Software Foundation\Apache2.2\conf 中新增一個檔案 workers.properties&lt;/span&gt;&lt;br /&gt;內容為&lt;br /&gt;=====================================&lt;br /&gt;# The advanced router LB worker&lt;br /&gt;worker.list=router,jkstatus&lt;br /&gt;&lt;br /&gt;# Define a worker using ajp13&lt;br /&gt;worker.worker1.port=8009&lt;br /&gt;worker.worker1.host=localhost&lt;br /&gt;worker.worker1.type=ajp13&lt;br /&gt;worker.worker1.lbfactor=1&lt;br /&gt;# Define prefered failover node for worker1&lt;br /&gt;#worker.worker1.redirect=worker2&lt;br /&gt;&lt;br /&gt;# Define another worker using ajp13&lt;br /&gt;worker.worker2.port=9009&lt;br /&gt;worker.worker2.host=localhost&lt;br /&gt;worker.worker2.type=ajp13&lt;br /&gt;worker.worker2.lbfactor=1&lt;br /&gt;# Disable worker2 for all requests except failover&lt;br /&gt;#worker.worker2.activation=disabled&lt;br /&gt;&lt;br /&gt;# Define the LB worker&lt;br /&gt;worker.router.type=lb&lt;br /&gt;worker.router.balance_workers=worker1,worker2&lt;br /&gt;&lt;br /&gt;# Define a 'jkstatus' worker using status&lt;br /&gt;worker.jkstatus.type=status&lt;br /&gt;====================================&lt;br /&gt;&lt;br /&gt;這裡指定 worker1 為 T1, 用的 port 為 8009，worker2 為 T2，用的 port 為 9009&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3.5 在 D:\Program Files\Apache Software Foundation\Apache2.2\conf 中新增一個檔案 uriworkermap.properties&lt;/span&gt;&lt;br /&gt;內容為&lt;br /&gt;===============================&lt;br /&gt;/*=router&lt;br /&gt;===============================&lt;br /&gt;&lt;br /&gt;這裡會將 URI 為  /* 的 mapping 全部轉向 T1 或 T2&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3.6 更改 T2 的設定檔&lt;/span&gt;&lt;br /&gt;因為 T2 用的 port 還是 8009，需改為 9009 以配合 workers.properties 中的設定&lt;br /&gt;修改 D:\java\apache-tomcat-6.0.16-t2\conf\server.xml 中的&lt;br /&gt;&lt;br /&gt;line 22 &lt;span style="color: rgb(255, 0, 0);"&gt;port="8005" 改為 port="9005"&lt;/span&gt;&lt;br /&gt;line 67 &lt;span style="color: rgb(255, 0, 0);"&gt;port="8080" 改為 port="9090"&lt;/span&gt;&lt;br /&gt;line 89 &lt;span style="color: rgb(255, 0, 0);"&gt;port="8009" 改為 port="9009"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;port 改成如此是因為要避免與 T1 衝突。&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3.7 重新啟動 Apache HTTP Server 與 T1, T2&lt;/span&gt;&lt;br /&gt;重新啟動 Apache HTTP Server 後再啟動 T1, T2，接下來打開 IE 將 URL 指向 http://localhost 可以得到&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/SUsIh1TwynI/AAAAAAAAAKk/A707EfnY_uo/s1600-h/apache-http-load-balance.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 286px;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/SUsIh1TwynI/AAAAAAAAAKk/A707EfnY_uo/s400/apache-http-load-balance.png" alt="" id="BLOGGER_PHOTO_ID_5281324365360712306" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;這裡可以看到跑的是 Apache Tomcat T2 (webapps\ROOT\index.html 有修改過)，證明 Load Balance 已經開始作用中&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3.8 啟動 SSL 的 Load Balance&lt;/span&gt;&lt;br /&gt;這時候當 URL 指向 https://localhost 時，Tomcat 的畫面並不會跑出來，需要在&lt;br /&gt;D:\Program Files\Apache Software Foundation\Apache2.2\conf\extra\httpd-ssl.conf&lt;br /&gt;的 VirtualHost 裡面加上這一行&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;JkMountFile conf/uriworkermap.properties &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;然後重新啟動 Apache HTTP Server ，SSL 便可以做到 Load Balance 了&lt;br /&gt;以下畫面是把 T2 Shutdown 後，Refresh IE 則會 Forward 到 T1 上&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/SUsNVXXo6wI/AAAAAAAAAK0/oP5GeRE2icQ/s1600-h/apache-http-load-balance-t1.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 285px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/SUsNVXXo6wI/AAAAAAAAAK0/oP5GeRE2icQ/s400/apache-http-load-balance-t1.png" alt="" id="BLOGGER_PHOTO_ID_5281329648723618562" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. 設定 Tomcat 的 Clustering&lt;/span&gt;&lt;br /&gt;若有人要OOXX，現在是一個好時機，因為在 Windows XP 上無法做 Clustering。花了幾乎快一個下午的時間試，也無法試出來用 2 個 Tomcat instance 跑在同一台機器，後來用 VMWare 跑 Ubuntu 8.10 然後在上面跑 2 個 Tomcat ，一切搞定。所以，Linux 實在非常適合做 Server。&lt;br /&gt;&lt;br /&gt;話不多說，把 Ubuntu 8.10 跑起來後，利用 SSH 將兩個 tomcat 複製到 /opt 下&lt;br /&gt;/$ cd /&lt;br /&gt;/$ sudo mkdir /opt&lt;br /&gt;/$ sudo chmod o+w opt&lt;br /&gt;這樣才能在非 root 的使用者下將 tomcat 複製到 /opt&lt;br /&gt;/opt$ ls -l&lt;br /&gt;apache-tomcat-6.0.16-t1&lt;br /&gt;apache-tomcat-6.0.16-t2&lt;br /&gt;/opt$ chmod +x apache-tomcat-6.0.16-t1/bin/*.sh&lt;br /&gt;/opt$ chmod +x apache-tomcat-6.0.16-t2/bin/*.sh&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4.1 設定 Tomcat Cluster in server.xml&lt;/span&gt;&lt;br /&gt;更改 /opt/apache-tomcat-6.0.16-t1/conf/server.xml&lt;br /&gt;在 line 100 的 Engine 中加入 jvmRoute="worker1"&lt;br /&gt;在 line 106 將 Cluster 的上下 comment !-- -- 拿掉&lt;br /&gt;&lt;br /&gt;更改 /opt/apache-tomcat-6.0.16-t2/conf/server.xml&lt;br /&gt;在 line 100 的 Engine 中加入 jvmRoute="worker2"&lt;br /&gt;在 line 106 將 Cluster 的上下 comment !-- -- 拿掉&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4.2 設定 web application&lt;/span&gt;&lt;br /&gt;因之前有發表過 &lt;a href="http://chen7768.blogspot.com/2008/12/run-appfuse-202-with-jpa.html"&gt;appfuse 2.0.2 for JPA&lt;/a&gt; ，所以就直接把 war 檔放到 t1 與 t2 的 webapps 下，也修改了 WEB-INF/classes/jdbc.properties 中的 localhost 為原本的 XP 上&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4.3 啟動 Tomcat t1, t2&lt;/span&gt;&lt;br /&gt;打開一個 xterm (應用程式 &gt; 附屬應用程式 &gt; 終端機 )&lt;br /&gt;$ cd /opt/apache-tomat-6.0.16-t1/bin&lt;br /&gt;/bin$ export JAVA_HOME=/usr/lib/jvm/java-6-sun&lt;br /&gt;/bin$ ./catalina.sh run&lt;br /&gt;&lt;br /&gt;打開另一個 xterm (應用程式 &gt; 附屬應用程式 &gt; 終端機 )&lt;br /&gt;$ cd /opt/apache-tomat-6.0.16-t2/bin&lt;br /&gt;/bin$ export JAVA_HOME=/usr/lib/jvm/java-6-sun&lt;br /&gt;/bin$ ./catalina.sh run&lt;br /&gt;&lt;br /&gt;這時候應該可以看到 t1, t2 會互相 talk 如下畫面&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/SUxcVBYImiI/AAAAAAAAAK8/eaBTLME19qY/s1600-h/apache-tomcat-cluster-t1-t2.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 275px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/SUxcVBYImiI/AAAAAAAAAK8/eaBTLME19qY/s400/apache-tomcat-cluster-t1-t2.png" alt="" id="BLOGGER_PHOTO_ID_5281697979215419938" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4.4 修改 Apache HTTP Server&lt;/span&gt;&lt;br /&gt;因之前的 load balance 設定用的 tomcat 是 localhost ，但因 XP 無法支援，所以要將 &lt;span&gt;D:\Program Files\Apache Software Foundation\Apache2.2\conf\workers.properties 中的&lt;/span&gt;&lt;br /&gt;worker.worker1.host=localhost&lt;br /&gt;worker.worker2.host=localhost&lt;br /&gt;改為&lt;br /&gt;worker.worker1.host=svn&lt;br /&gt;worker.worker2.host=svn&lt;br /&gt;&lt;br /&gt;PS : 此 svn 是 Ubuntu VM 上的 hostname&lt;br /&gt;&lt;br /&gt;然後重新啟動 Apache HTTP Server&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4.5 測試 Cluster &lt;/span&gt;&lt;br /&gt;打開一個 IE 網址為 https://localhost/myprojectjpa-1.0-SNAPSHOT/然後用 admin/admin login，再進入 系統管理 &gt; 訪問紀錄 可以看到用的是 worker1 的 tomat t1&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_i9YOUbw9_84/SUxebWkQvLI/AAAAAAAAALE/prhJg7wB-_E/s1600-h/apache-http-worker1.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 126px;" src="http://4.bp.blogspot.com/_i9YOUbw9_84/SUxebWkQvLI/AAAAAAAAALE/prhJg7wB-_E/s400/apache-http-worker1.png" alt="" id="BLOGGER_PHOTO_ID_5281700287005899954" border="0" /&gt;&lt;/a&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;再打開另一個 IE 網址為 https://localhost/myprojectjpa-1.0-SNAPSHOT/ 然後用 admin/admin login，再進入 系統管理 &gt; 訪問紀錄 可以看到有兩個 Stream ，點進去看可以看到分別是 worker1 與 worker2&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/SUxfRgjMhHI/AAAAAAAAALM/ajDhG217UUs/s1600-h/apache-http-worker1-2.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 122px;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/SUxfRgjMhHI/AAAAAAAAALM/ajDhG217UUs/s400/apache-http-worker1-2.png" alt="" id="BLOGGER_PHOTO_ID_5281701217398719602" border="0" /&gt;&lt;/a&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;經由此測試可以發現 Cluster 試驗成功，因為 worker1 上或 worker2 上的 tomcat 都有兩個 session 在&lt;br /&gt;&lt;br /&gt;接下來將 t1 shutdown ，然後在按 worker1 上的 IE 的訪問紀錄，可發現 session 已轉到 worker2 了。因為此 session 是由 worker1 複製過來的，所以 Name 被改為 127.0.0.1 了&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/SUxgWRF2irI/AAAAAAAAALU/ALYS7fNChxI/s1600-h/apache-http-worker2-replace.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 173px;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/SUxgWRF2irI/AAAAAAAAALU/ALYS7fNChxI/s400/apache-http-worker2-replace.png" alt="" id="BLOGGER_PHOTO_ID_5281702398660086450" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;後記 :&lt;br /&gt;1. 經由此測試發現在 Windows XP 上無法模擬 Cluster (也許要改設定)，有興趣的人可以試試在 Windows 2003 server 上試，但建議用 VMware 跑 Ubuntu，因為省錢又方便&lt;br /&gt;2. Tomcat 6 的設定比 Tomcat 5 簡單多了，因為預設值都被 Tomcat container 處理掉了&lt;br /&gt;3. Load Balance 除了用 mod_jk 外，好像也可以用 ProxyPass 的方式，改天再來試試看&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-4991258451167265560?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/4991258451167265560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=4991258451167265560' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4991258451167265560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4991258451167265560'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/12/load-balance-and-clustering-with-apache.html' title='Load balance and clustering with Apache HTTP Server 2.2.x and Tomcat 6.0.x'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_i9YOUbw9_84/SUo2OUk3CgI/AAAAAAAAAKM/6hn2v35ANlQ/s72-c/caroot-crt.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-7480272808943717939</id><published>2008-12-13T15:53:00.000-08:00</published><updated>2008-12-13T22:10:17.473-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>讓 HP CQ20 的聲音重現在 Ubuntu 8.10 上</title><content type='html'>裝了 Ubuntu 8.10 後, CQ20 上得喇叭聲音就不見了, 但經過以下步驟, 終於讓聲音恢復&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);" class="fullpost"&gt;&lt;code&gt;&lt;br /&gt;1. 先用 sudo apt-get install build-essential 將 kernel 模組下載到本機&lt;br /&gt;2. 到 http://www.alsa-project.org/main/index.php/Main_Page 下載最新的驅動程式. 我下載的是 alsa-driver-1.0.18a &lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);" class="fullpost"&gt;&lt;code&gt;3. ./configure --with-cards=hda-intel&lt;br /&gt;4. make&lt;br /&gt;5. sudo make install&lt;br /&gt;6. sudo gedit /etc/modprobe.d/alsa-base，最後一行加入：options snd-hda-intel model=laptop&lt;br /&gt;7. reboot&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;看來 linux driver 總是會比 Windows 慢半拍&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-7480272808943717939?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/7480272808943717939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=7480272808943717939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7480272808943717939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7480272808943717939'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/12/hp-cq20.html' title='讓 HP CQ20 的聲音重現在 Ubuntu 8.10 上'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6144349150931049270</id><published>2008-12-09T21:57:00.000-08:00</published><updated>2008-12-09T22:31:33.772-08:00</updated><title type='text'>Bug in appfuse 2.0.2 DaoTest</title><content type='html'>今天試著照著 appfuse 的 tutorial 上走一次，以了解 2.0 與 1.9 版的差異，當用 JPA 做完 PersonDaoTest 後，發現了兩個 bug&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. 若測試 PersonDaoTest 時假資料是用 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;person = (Person) populate(person);&lt;br /&gt;&lt;br /&gt;的方式且是用 PersonDaoTest.properties 做假資料，因 test-compile 會漏掉將 PersonDaoTest.properties 複製到 classpath 中，以致於測試 PersonDaoTest 會失敗，因為無法取得假資料。&lt;br /&gt;&lt;br /&gt;解法 : 在 pom.xml 上補上複製 properties 的敘述&lt;br /&gt;line 293&lt;br /&gt;＜testResources＞&lt;br /&gt;            ＜!-- copy test property file in test class path --＞&lt;br /&gt;            ＜testResource＞&lt;br /&gt;                ＜directory＞src/test/java＜/directory＞&lt;br /&gt;                ＜filtering＞true＜/filtering＞&lt;br /&gt;                ＜includes＞&lt;br /&gt;                    ＜include＞**/*.properties＜/include＞&lt;br /&gt;                ＜/includes＞&lt;br /&gt;            ＜/testResource＞&lt;br /&gt;&lt;br /&gt;這樣就可以將 PersonDaoTest.properties 複製到 test-classes 中了&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. 這個 bug 較嚴重&lt;/span&gt;&lt;br /&gt;在 BaseDaoTestCase 中，line 74&lt;br /&gt;&lt;br /&gt;BeanUtils.copyProperties(map, obj);&lt;br /&gt;&lt;br /&gt;跑測試的時候發現假資料無法複製到 obj (person instance) 中，後來查 API 才發現應該是&lt;br /&gt;&lt;br /&gt;BeanUtils.copyProperties(obj, map);&lt;br /&gt;&lt;br /&gt;才對，因為 API 為&lt;br /&gt;&lt;code style="color: rgb(255, 0, 0);"&gt;&lt;b&gt;&lt;a href="http://commons.apache.org/beanutils/apidocs/org/apache/commons/beanutils/BeanUtils.html#copyProperties%28java.lang.Object,%20java.lang.Object%29"&gt;copyProperties&lt;/a&gt;&lt;/b&gt;(&lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang"&gt;Object&lt;/a&gt; dest,                              &lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang"&gt;Object&lt;/a&gt; orig)&lt;/code&gt;  &lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;           Copy property values from the origin bean to the destination bean  for all cases where the property names are the same.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;這個 bug 對於使用 populate 的人而言算滿嚴重的，可能會讓試用 appfuse 的人卻步，所以在此提供大家做參考&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6144349150931049270?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6144349150931049270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6144349150931049270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6144349150931049270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6144349150931049270'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/12/bug-in-appfuse-202-daotest.html' title='Bug in appfuse 2.0.2 DaoTest'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6727533348893115867</id><published>2008-12-09T05:43:00.000-08:00</published><updated>2008-12-09T05:55:13.359-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Appfuse'/><title type='text'>Appfuse 2.0.2 的 displaytag 繁體中文檔</title><content type='html'>最近在試 Appfuse 2.0.2 發現沒有 displaytag 繁體中文檔，於是把簡體檔轉成繁體中文再改語意，可以從 &lt;a href="http://sites.google.com/site/chen7768/Home/blog-fu-dang/displaytag_zh_TW.properties?attredirects=0"&gt;這邊&lt;/a&gt; 下載，記得放到 src/main/resources 下就可以了&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6727533348893115867?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6727533348893115867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6727533348893115867' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6727533348893115867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6727533348893115867'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/12/appfuse-202-displaytag.html' title='Appfuse 2.0.2 的 displaytag 繁體中文檔'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-7292958521810449049</id><published>2008-12-09T01:10:00.000-08:00</published><updated>2008-12-17T18:25:38.056-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Appfuse'/><title type='text'>Run appfuse 2.0.2 with JPA</title><content type='html'>最近發現一件事，似乎越來越多的軟體公司，若是用 J2EE + MVC 架構，以 JPA 取代 Hibernate 的情況越來越多。說實在的，看了一下 JPA 的 spec，跟以往 EJB 一樣，他是一個空殼子，真正的 implementation 可以是任何 framework。&lt;br /&gt;&lt;br /&gt;目前看到的 JPA implementation 有 Hibernate 、TopLink 及 OpenJPA，在 appfuse 2.0.2 中用的是 Hibernate 最新版 3.3.0 GA 版，但在試 appfuse 2.0.2 with JPA 中發現一些問題，讓我摸索好久才試出來，提供那些卡住的人一些解法。試之前請先參考&lt;br /&gt;&lt;a href="http://chen7768.blogspot.com/2008/12/appfuse-202-steps-for-appfuse-202.html"&gt;Appfuse 2.0.2 安裝步驟(steps for appfuse 2.0.2 installation)&lt;/a&gt; 中的&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. 安裝 maven-2.0.9 及設定環境變數&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;1.  建立 appfuse 2.0.2 的 archetype&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; 到 d:\projects 中&lt;/span&gt;&lt;br /&gt;d:\projects&gt; mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myprojectjpa&lt;br /&gt;&lt;br /&gt;PS : 有別於之前的範例，這裡用 struts 2.0 作為 MVC 的 framework，artifactId 也改為 myprojectjpa，避免與之前的範例衝到&lt;br /&gt;&lt;br /&gt;&lt;user&gt;&lt;span style="font-weight: bold;"&gt;2. 安裝 mysql (若尚未安裝)&lt;/span&gt;&lt;br /&gt;到 &lt;a href="http://dev.mysql.com/downloads/mysql/5.1.html"&gt;mysql&lt;/a&gt;  的網站下載 mysql for Windows 並安裝 (此時裝的是 v5.0.x )。root 的密碼暫定為 root&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. 修改 root 的密碼&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;及更改 dao framework 為 jpa&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;  3.1 因 預設在 myproject 中的 pom.xml 的 mysql 密碼為 "空白"，所以必須將此部份的空白填入真正的 root 密碼，在做 install 時才能將 table 及 測試資料放到 mysql 的資料庫中。編輯 pom.xml 並在 line 975 修改&lt;br /&gt;＜jdbc.password＞&lt;/user&gt;＜/jdbc.password＞ 為&lt;br /&gt;＜jdbc.password＞root＜/jdbc.password＞ (假設 mysql root 的密碼為 root)&lt;br /&gt;&lt;br /&gt;3.2 修改 line 938 將 hibernate 改成 jpa&lt;br /&gt;&lt;br /&gt;3.3 修改 line 142 將 annotationconfiguration 改成 jpaconfiguration&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;3.4&lt;/span&gt; 這時候別急著跑 mvn jetty:run-war ，因為你一跑，會出現&lt;br /&gt;javax.persistence.PersistenceException: No name provided and several persistence&lt;br /&gt;units found&lt;br /&gt;我因為這個 error 卡了 2,3 個小時，後來 google 後才知道要&lt;br /&gt;&lt;br /&gt;  3.4.1 remove D:\projects\myprojectjpa\src\main\resources\hibernate.cfg.xml&lt;br /&gt;  3.4.2 remove D:\projects\myprojectjpa\src\test\resources\hibernate.cfg.xml&lt;br /&gt;  &lt;span style="color: rgb(255, 0, 0);"&gt;3.4.3&lt;/span&gt; remove D:\projects\myprojectjpa\src\main\resources\META-INF\persistence.xml&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. 取得 appfuse 的 source code 以便日後 debug 用&lt;/span&gt;&lt;br /&gt;d:\projects&gt; cd myproject&lt;br /&gt;d:\projects\myproject&gt; mvn appfuse:full-source&lt;br /&gt;&lt;br /&gt;&lt;user&gt;&lt;span style="font-weight: bold;"&gt;5. 利用 command line 啟動 appfuse&lt;/span&gt;&lt;br /&gt;&lt;/user&gt;d:\projects\myproject&gt; mvn &lt;span style="color: rgb(255, 0, 0);"&gt;clean&lt;/span&gt; jetty:run-war&lt;br /&gt;執行 clean 的目的是要把 war 中的 hibernate.cfg.xml 清除掉，不然會造成 error&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;org.hibernate.DuplicateMappingException: Duplicate collection role mapping com.m&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;ycompany.app.model.User.roles&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;一旦執行此 mvn jetty:run-war，appfuse 就會直接啟動在 port 8080。此時可以用 firefox 檢測 appfuse 是否啟動成功。將 url 指向 http://localhost:8080 可以得到此畫面&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/STXvABTfkjI/AAAAAAAAAIs/kO8o6XSAhXc/s1600-h/appfuse-login.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 309px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/STXvABTfkjI/AAAAAAAAAIs/kO8o6XSAhXc/s400/appfuse-login.png" alt="" id="BLOGGER_PHOTO_ID_5275385322163638834" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-7292958521810449049?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/7292958521810449049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=7292958521810449049' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7292958521810449049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7292958521810449049'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/12/run-appfuse-202-with-jpa.html' title='Run appfuse 2.0.2 with JPA'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_i9YOUbw9_84/STXvABTfkjI/AAAAAAAAAIs/kO8o6XSAhXc/s72-c/appfuse-login.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1519306263609639719</id><published>2008-12-06T15:30:00.000-08:00</published><updated>2008-12-06T23:17:07.113-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Appfuse'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>Run appfuse 2.0.2 in NetBeans 6.5</title><content type='html'>在 NetBeans 6.1 跑 appfuse 2.0.2 幾乎是不可能，試了半天總是碰壁，但到了 NetBeans 6.5，就像變魔術一般，跑的特別順，尤其是改 jsp 時，不用像 eclipse 需要改 snapshot 裡面的 jsp。在 NetBeans 6.5 可以直接修改 jsp 後在 firefox 中按 F5 就會立即反應改過的結果，對於開發者而言，實在助益不少。以下就 NetBeans 6.5 跑 appfuse 2.0.2 的步驟做一說明&lt;br /&gt;&lt;br /&gt;使用 NetBeans 6.5 前，必須先把 appfuse 2.0.2 先安裝好。安裝的步驟可參考&lt;br /&gt;&lt;a href="http://chen7768.blogspot.com/2008/12/appfuse-202-steps-for-appfuse-202.html"&gt;Appfuse 2.0.2 安裝步驟(steps for appfuse 2.0.2 installation)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. 安裝 NetBeans 6.5 &lt;/span&gt;&lt;br /&gt;下載 &lt;a href="http://services.netbeans.org/bouncer/index.php?product=netbeans-6.5&amp;amp;os=windows"&gt;NetBeans 6.5&lt;/a&gt; 後安裝到 d:\Java\NetBeans 6.5 下。安裝時須確認裝的元件含 Java Web and EE，及 Run time server Tomcat 6.0.x ，如此跑 appfuse 2.0.2 時才能指定 Tomcat server 為其 Rune time server。&lt;br /&gt;&lt;br /&gt;PS : 若你是用 JDK 6.0 Update 10 以上的版本，可以更改 d:\Java\NetBeans 6.5\etc\netbeans.conf 中的 netbeans_default_options (line 6) 在最後加上&lt;br /&gt;--laf com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel&lt;br /&gt;可以將 NetBeans 的外觀換成新的介面如下&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_i9YOUbw9_84/STsPUEdy_3I/AAAAAAAAAJU/F1FWVi-hVQo/s1600-h/netbeans-nimbus.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 347px;" src="http://4.bp.blogspot.com/_i9YOUbw9_84/STsPUEdy_3I/AAAAAAAAAJU/F1FWVi-hVQo/s400/netbeans-nimbus.png" alt="" id="BLOGGER_PHOTO_ID_5276828225865187186" border="0" /&gt;&lt;/a&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;&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;此介面比舊的 Windows 好看多了&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. 安裝 maven plugin&lt;/span&gt;&lt;br /&gt;安裝完 NetBeans 6.5 後，可透過 Tools &gt; Plugins &gt; Available Plugins 安裝 maven plugin。安裝完可得以下畫面&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/STsNq7NiuYI/AAAAAAAAAJM/5YwQ6JY9wTw/s1600-h/netbeans-maven-plugin.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 262px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/STsNq7NiuYI/AAAAAAAAAJM/5YwQ6JY9wTw/s400/netbeans-maven-plugin.png" alt="" id="BLOGGER_PHOTO_ID_5276826419494828418" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. 匯入 myproject 到 NetBeans 6.5 中&lt;/span&gt;&lt;br /&gt;基本上這也不是匯入，因為已經裝了 maven plugin 的關係，可以透過 File &gt; Open Project 的方式就可以直接打開 myproject 了&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/STsQVUBrcFI/AAAAAAAAAJc/t12E0Wip3bg/s1600-h/netbeans-maven-myproject.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 227px;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/STsQVUBrcFI/AAAAAAAAAJc/t12E0Wip3bg/s400/netbeans-maven-myproject.png" alt="" id="BLOGGER_PHOTO_ID_5276829346733715538" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. 設定 Rumtime Server&lt;/span&gt;&lt;br /&gt;把 myproject 匯入到 NetBeans 後，預設並不會指定 Runtime Server ，這時候需透過 &lt;span style="font-style: italic;"&gt;右鍵按&lt;/span&gt;Appfuse JSF Application &gt; Properties &gt; Run 去指定 Server。這邊請先設定為 Tomcat 6.0&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/STshDYp4YDI/AAAAAAAAAJk/rY181sgGlKg/s1600-h/netbeans-maven-server.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 166px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/STshDYp4YDI/AAAAAAAAAJk/rY181sgGlKg/s400/netbeans-maven-server.png" alt="" id="BLOGGER_PHOTO_ID_5276847730436104242" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. 啟動 Appfuse web application&lt;/span&gt;&lt;br /&gt;當 1-4 設定完成後，可以按 F6 ，Appfuse 就會立即 compile 並 deploy 到 Tomcat 6.0 上且直接帶出 Firefox (或 IE) 顯示 Appfuse 的完整功能&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/STsiTM7rIZI/AAAAAAAAAJs/qBNk8FSKbKc/s1600-h/netbeans-maven-appfuse-run.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 234px;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/STsiTM7rIZI/AAAAAAAAAJs/qBNk8FSKbKc/s400/netbeans-maven-appfuse-run.png" alt="" id="BLOGGER_PHOTO_ID_5276849101679042962" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tips&lt;/span&gt;&lt;br /&gt;1. 每次按 F6 時，maven 都會先跑 testcase 後再 deploy 到 tomcat 上，若要跳過 testcase ，可以透過 &lt;span style="font-style: italic;"&gt;右鍵按&lt;/span&gt;Appfuse JSF Application &gt; Properties &gt; Action &gt; Run project &gt; Set Properties 加入 &lt;span style="font-weight: bold;"&gt;maven.test.skip=true&lt;/span&gt; 即可以跳過 testcase&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/STtdEiAbwxI/AAAAAAAAAJ0/RYT6qpttFuM/s1600-h/appfuse-maven-test-skip.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 287px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/STtdEiAbwxI/AAAAAAAAAJ0/RYT6qpttFuM/s400/appfuse-maven-test-skip.png" alt="" id="BLOGGER_PHOTO_ID_5276913720824152850" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. 當修改 java code 後按 F6 重新 deploy appfuse 到 tomcat ，會發現 2 次後便會發生&lt;br /&gt;&lt;span class="postbody"&gt;java.lang.OutOfMemoryError: PermGen space&lt;/span&gt;&lt;br /&gt;的錯誤訊息，此時便無法重新 deploy appfuse ，必須透過 Task Manager 將手動 Tomcat 除掉後再重新 deploy 一次，造成很大的不便。這個問題可以透過 Tools &gt; Servers &gt; Apache Tomcat 6.0.18 &gt; Platform(tab) &gt; VM options 加入 &lt;span style="font-weight: bold;"&gt;-XX:MaxPermSize=256m&lt;/span&gt; 便可以至少 redeploy appfuse 至少 10 次以上，減少除掉 Tomcat 所需花費的時間。&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/STteQjXv2oI/AAAAAAAAAJ8/FDNUITK_dZA/s1600-h/appfuse-tomcat-maxpermsize.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 317px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/STteQjXv2oI/AAAAAAAAAJ8/FDNUITK_dZA/s400/appfuse-tomcat-maxpermsize.png" alt="" id="BLOGGER_PHOTO_ID_5276915026860432002" border="0" /&gt;&lt;/a&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;&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;運用這兩個 Tips ，應該可以減少一下開發時的麻煩，把時間花在功能的開發上。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1519306263609639719?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1519306263609639719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1519306263609639719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1519306263609639719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1519306263609639719'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/12/run-appfuse-202-in-netbeans-65.html' title='Run appfuse 2.0.2 in NetBeans 6.5'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_i9YOUbw9_84/STsPUEdy_3I/AAAAAAAAAJU/F1FWVi-hVQo/s72-c/netbeans-nimbus.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-8400549140555542668</id><published>2008-12-06T05:25:00.000-08:00</published><updated>2008-12-06T07:53:27.530-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Appfuse'/><title type='text'>Appfuse 2.0.2 安裝步驟(steps for appfuse 2.0.2 installation)</title><content type='html'>Appfuse 2.0.2 理論上不是一個 framework，而是一個已經 ready to go 的 project prototype。它集合了最穩定與先進的 framework 再加上最基本的 ACL，Menu ，讓 developer 不用從頭開始建構一個 project 的基礎架構。它的 build tool 用的是 Maven，所以無論在做 demo、test、ContinuousIntegration 都不用在額外撰寫新的，直接使用或就現有的架構再做擴充便可以上手。&lt;br /&gt;&lt;br /&gt;以下為安裝 appfuse 2.0.2 的簡單步驟，不用十分鐘(除了喝 coffee 的時間)，你就有一個可以 login 、manage user 、 upload file 基本功能的 web application 出現在你的電腦上。&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. 安裝 maven-2.0.9 及設定環境變數&lt;/span&gt;&lt;br /&gt;下載 &lt;a href="http://apache.cdpa.nsysu.edu.tw/maven/binaries/apache-maven-2.0.9-bin.zip"&gt;maven-2.0.9&lt;/a&gt; 到 d:\Java (目錄為 d:\Java\apache-maven-2.0.9)&lt;br /&gt;set M2=D:\Java\apache-maven-2.0.9\bin&lt;br /&gt;set M2_HOME=D:\Java\apache-maven-2.0.9&lt;br /&gt;set MAVEN_OPTS=-Xms256m -Xmx512m&lt;br /&gt;set PATH=%M2%;%PATH%&lt;br /&gt;&lt;br /&gt;編輯 d:\Java\apache-maven-2.0.9\conf\settting.xml&lt;br /&gt;line 49 將 localrepository 的內容改成 D:\Java\apache-maven-2.0.9\repository&lt;br /&gt;&lt;br /&gt;PS:因 maven 預設值會將 repository 放到 c:\Document2 and Settings\&lt;user&gt;.m2 中，這樣用不同的人 login ，其 repository 就需要跟著異動。放到 d:\Java\apache2-maven-2.0.9\repository 的好處在於將來 team 可以用同樣的設定作業，避免因環境的不同而需要花額外的時間做環境設定&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. 建立 appfuse 2.0.2 的 archetype&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; 到 d:\projects 中&lt;/span&gt;&lt;br /&gt;d:\projects&gt; mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-jsf -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject&lt;br /&gt;&lt;br /&gt;PS : 此時可以去喝一杯咖啡了，因為要很久。若要節省時間，可以下載 &lt;a href="https://appfuse.dev.java.net/files/documents/1397/96443/appfuse-dependencies-2.0.2.zip"&gt;dependency&lt;/a&gt; 並解壓縮到 d:\Java\apache-maven-2.0.9\repository&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. 取得 appfuse 的 source code 以便日後 debug 用&lt;/span&gt;&lt;br /&gt;&lt;/user&gt;d:\projects&gt; &lt;user&gt;cd myproject&lt;br /&gt;d:\projects\myproject&gt; mvn appfuse:full-source&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. 安裝 mysql &lt;/span&gt;&lt;br /&gt;到 &lt;a href="http://dev.mysql.com/downloads/mysql/5.1.html"&gt;mysql&lt;/a&gt;  的網站下載 mysql for Windows 並安裝 (此時裝的是 v5.0.x )。root 的密碼暫定為 root&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. 修改 root 的密碼&lt;/span&gt;&lt;br /&gt;因 預設在 myproject 中的 pom.xml 的 mysql 密碼為 "空白"，所以必須將此部份的空白填入真正的 root 密碼，在做 install 時才能將 table 及 測試資料放到 mysql 的資料庫中。編輯 pom.xml 並在 line 982 修改 ＜jdbc.password＞&lt;/user&gt;＜/jdbc.password＞ 為 ＜jdbc.password＞root＜/jdbc.password＞ (假設 mysql root 的密碼為 root)&lt;br /&gt;&lt;user&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6. 利用 command line 啟動 appfuse&lt;/span&gt;&lt;br /&gt;&lt;/user&gt;d:\projects\myproject&gt; mvn jetty:run-war&lt;br /&gt;一旦執行此 mvn jetty:run-war，appfuse 就會直接啟動在 port 8080。此時可以用 firefox 檢測 appfuse 是否啟動成功。將 url 指向 http://localhost:8080 可以得到此畫面&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/STXvABTfkjI/AAAAAAAAAIs/kO8o6XSAhXc/s1600-h/appfuse-login.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 309px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/STXvABTfkjI/AAAAAAAAAIs/kO8o6XSAhXc/s400/appfuse-login.png" alt="" id="BLOGGER_PHOTO_ID_5275385322163638834" border="0" /&gt;&lt;/a&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;&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;簡單的 6 個步驟，你就有一個功能陽春的 prototype 可以使用，但是若要真的用在 project 上，建議需要有至少 1 年以上的 web 開發功力再使用這一套，因為裡面用的是 MVC + ACEGI + AJAX ，光摸熟這一套就需要花約 2 星期的工夫，但一旦摸熟，則無往不利，因為要加新的功能，除了 domain 的 knowledge 以外，用套的就可以了。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-8400549140555542668?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/8400549140555542668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=8400549140555542668' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8400549140555542668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8400549140555542668'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/12/appfuse-202-steps-for-appfuse-202.html' title='Appfuse 2.0.2 安裝步驟(steps for appfuse 2.0.2 installation)'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_i9YOUbw9_84/STXvABTfkjI/AAAAAAAAAIs/kO8o6XSAhXc/s72-c/appfuse-login.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1177594386702001699</id><published>2008-12-02T20:10:00.000-08:00</published><updated>2008-12-02T20:11:56.685-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Appfuse'/><title type='text'>如何在 eclipse 3.4 下跑 appfuse 2.0.2</title><content type='html'>因為工作性質的關係(一堆同時進行的專案)，在系統的開發上需要有效率的執行，不能每次都從頭來，但已做過的專案又會因其特性的不同而造成 reuse 的機會降低，所以當時找了一個不是 framework 的 framework 當作開發的 initial startup ，裡面含有當下最新的技術，不用在自行組裝要用的 package，以降低開發時所需的時間與精力&lt;br /&gt;&lt;br /&gt;Appfuse 目前最新版的是 2.0.2 ，用的整合工具是 maven 2.0.x ，但只能用 command line 做 build 及 run ，無法直接用在 IDE 的環境上。說實在的，借由 IDE 的輔助，可以省掉一些 coding 的時間，尤其是在 gen getxx 與 setxx 的 java code 時，助益不少&lt;br /&gt;&lt;br /&gt;經我測試過，Appfuse 2.0.2 在 Netbeans 6.5 下完全沒有問題，可見 Netbeans 越來越成熟了，但在 eclipse 3.4 下則必須還要做些微修正才能符合 eclipse 的環境，做到 hot deployment 及減少修改 code 後還要重新 deployment 所浪費的時間&lt;br /&gt;&lt;br /&gt;以下為修改步驟以便讓 appfuse 2.0.2 適用於 eclipse 3.4&lt;br /&gt;PS : 請先安裝 JDK1.6,  eclipse 3.4 JEE, maven 2.0.9, m2eclipse, mysql&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. 安裝 eclipse 3.4&lt;/span&gt;&lt;br /&gt;下載 &lt;a href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/SR1/eclipse-jee-ganymede-SR1-win32.zip&amp;amp;url=http://eclipse.stu.edu.tw/technology/epp/downloads/release/ganymede/SR1/eclipse-jee-ganymede-SR1-win32.zip&amp;amp;mirror_id=448"&gt;eclipse 3.4&lt;/a&gt; 並解壓縮到 d:\Java (目錄為 d:\Java\eclipse)&lt;br /&gt;利用 eclipse 的 Help &gt; Software Update &gt; Available Software &gt; Add site 安裝 m2eclipse plugin。&lt;br /&gt;此 plugin 的 url 為 http://m2eclipse.sonatype.org/update/&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. 安裝 maven-2.0.9 及設定環境變數&lt;/span&gt;&lt;br /&gt;下載 &lt;a href="http://apache.cdpa.nsysu.edu.tw/maven/binaries/apache-maven-2.0.9-bin.zip"&gt;maven-2.0.9&lt;/a&gt; 到 d:\Java (目錄為 d:\Java\apache-maven-2.0.9)&lt;br /&gt;set M2=D:\Java\apache-maven-2.0.9\bin&lt;br /&gt;set M2_HOME=D:\Java\apache-maven-2.0.9&lt;br /&gt;set MAVEN_OPTS=-Xms256m -Xmx512m&lt;br /&gt;set PATH=%M2%;%PATH%&lt;br /&gt;&lt;br /&gt;編輯 d:\Java\apache-maven-2.0.9\conf\settting.xml&lt;br /&gt;line 49 將 localrepository 的內容改成 D:\Java\apache-maven-2.0.9\repository&lt;br /&gt;&lt;br /&gt;PS:因 maven 預設值會將 repository 放到 c:\Document2 and Settings\&lt;user&gt;.m2 中，這樣用不同的人 login ，其 repository 就需要跟著異動。放到 d:\Java\apache2-maven-2.0.9\repository 的好處在於將來 team 可以用同樣的設定作業，避免因環境的不同而需要花額外的時間做環境設定&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. 建立 appfuse 2.0.2 的 archetype&lt;/span&gt;&lt;br /&gt;d:\projects&gt; mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-jsf -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject&lt;br /&gt;&lt;br /&gt;PS : 此時可以去喝一杯咖啡了，因為要很久。若要節省時間，可以下載 &lt;a href="https://appfuse.dev.java.net/files/documents/1397/96443/appfuse-dependencies-2.0.2.zip"&gt;dependency&lt;/a&gt; 並解壓縮到 d:\Java\apache-maven-2.0.9\repository&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. 取得 appfuse 的 source code 以便日後 debug 用&lt;/span&gt;&lt;br /&gt;&lt;/user&gt;d:\projects&gt; &lt;user&gt;cd myproject&lt;br /&gt;d:\projects\myproject&gt; mvn appfuse:full-source&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. 修改 root 的密碼&lt;/span&gt;&lt;br /&gt;因 預設在 myproject 中的 pom.xml 的 mysql 密碼為 "空白"，所以必須將此部份的空白填入真正的 root 密碼，在做 install 時才能將 table 及 測試資料放到 mysql 的資料庫中。編輯 pom.xml 並在 line 982 修改 ＜jdbc.password＞&lt;/user&gt;＜/jdbc.password＞ 為 ＜jdbc.password＞root＜/jdbc.password＞ (假設 mysql root 的密碼為 root)&lt;br /&gt;&lt;user&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6. 利用 command line 啟動 appfuse&lt;/span&gt;&lt;br /&gt;&lt;/user&gt;d:\projects\myproject&gt; mvn jetty:run-war&lt;br /&gt;一旦執行此 mvn jetty:run，appfuse 就會直接啟動在 port 8080。此時可以用 firefox 檢測 appfuse 是否啟動成功。將 url 指向 http://localhost:8080 可以得到此畫面&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/STXvABTfkjI/AAAAAAAAAIs/kO8o6XSAhXc/s1600-h/appfuse-login.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 309px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/STXvABTfkjI/AAAAAAAAAIs/kO8o6XSAhXc/s400/appfuse-login.png" alt="" id="BLOGGER_PHOTO_ID_5275385322163638834" border="0" /&gt;&lt;/a&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;&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;span style="font-weight: bold;"&gt;7. 匯入 myproject 到 eclipse 中&lt;/span&gt;&lt;br /&gt;確認 appfuse 執行無誤後， 請執行&lt;br /&gt;d:\projects\myproject&gt; mvn eclipse:eclipse&lt;br /&gt;這時候會在 d:\projects\myproject 目錄下產生 .settings 目錄及 .project, .classpath 檔&lt;br /&gt;&lt;br /&gt;然後打開 eclipse ，利用 File &gt; Import &gt; General &gt; Maven Projects 再將 Root Directory 指到 d:\projects\myproject 再按 Finish&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/STX2Zl5kbjI/AAAAAAAAAI0/9WURx_olZ9Q/s1600-h/appfuse-import.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 383px; height: 400px;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/STX2Zl5kbjI/AAAAAAAAAI0/9WURx_olZ9Q/s400/appfuse-import.png" alt="" id="BLOGGER_PHOTO_ID_5275393458065141298" border="0" /&gt;&lt;/a&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;&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;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/STX40MP3frI/AAAAAAAAAI8/PxlKYBADT2I/s1600-h/appfuse-importok.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 185px; height: 94px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/STX40MP3frI/AAAAAAAAAI8/PxlKYBADT2I/s400/appfuse-importok.png" alt="" id="BLOGGER_PHOTO_ID_5275396114059067058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;這裡可看到 myproject 已經被匯入到 eclipse 中了&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8. 修改 eclipse WTP 專用的設定檔&lt;/span&gt;&lt;br /&gt;若要讓 appfuse 可以在 eclipse WTP 上執行，必須做稍微的修正，才能直接在 eclipse 上啟動 tomcat 並 deploy appfuse&lt;br /&gt;&lt;user&gt;&lt;br /&gt;修改 .setting\org.eclipse.wst.common.component&lt;br /&gt;刪除 ＜wb-resource deploy-path="/" source-path="src/main/webapp"/＞&lt;br /&gt;刪除 ＜wb-resource deploy-path="/" source-path="src/main/resource"/＞&lt;br /&gt;增加 &lt;/user&gt;＜wb-resource deploy-path="/" source-path="target/myproject-1.0-SNAPSHOT"/＞&lt;br /&gt;&lt;user&gt;&lt;/user&gt;&lt;br /&gt;&lt;user&gt;修改 .classpath&lt;br /&gt;刪 除 ＜classpathentry kind="src" path="src/main/resources" excluding="ApplicationResources_de.properties|ApplicationResources_fr.properties|ApplicationResources_ko.properties|ApplicationResources_nl.properties|ApplicationResources_no.properties|ApplicationResources_pt*.properties|ApplicationResources_tr.properties|ApplicationResources_zh*.properties|applicationContext- resources.xml|**/*.java"/＞&lt;br /&gt;&lt;wb-resource path="/WEB-INF/classes"&gt;&lt;wb-resource path="/"&gt;增 加 ＜classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0"/＞&lt;br /&gt;&lt;/wb-resource&gt;&lt;/wb-resource&gt;&lt;/user&gt;增加 ＜classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/＞&lt;br /&gt;&lt;user&gt;&lt;wb-resource path="/WEB-INF/classes"&gt;&lt;wb-resource path="/"&gt;&lt;br /&gt;&lt;/wb-resource&gt;&lt;/wb-resource&gt;&lt;/user&gt;&lt;span style="color: rgb(0, 0, 0);font-family:標楷體;font-size:12;"  &gt;&lt;span style=";font-family:標楷體;font-size:12;"  &gt;&lt;span style=";font-family:Georgia;font-size:85%;"  &gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;然 後按 F5 做 refresh 後，接著在 myproject 按右鍵 &gt; Run As &gt; Run on Server &gt; 選 Tomcat v6.0 &gt; Finish 。在畫面可以看到 myproject 直接執行在 eclipse 上&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/STX7flMYHhI/AAAAAAAAAJE/MiCF3DRFHqA/s1600-h/appfuse-wtp-run.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 334px;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/STX7flMYHhI/AAAAAAAAAJE/MiCF3DRFHqA/s400/appfuse-wtp-run.png" alt="" id="BLOGGER_PHOTO_ID_5275399058512944658" border="0" /&gt;&lt;/a&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;&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;span style="font-weight: bold;"&gt;9. 注意事項&lt;/span&gt;&lt;br /&gt;9.1 若要改 jsp ，必須改 target/myproject-1.0-SNAPSHOT 下面的 jsp 檔，測試完後再 copy 回 src\main\webapp 下，因為修改後的 WTP 只吃 target/myproject-1.0-SNAPSHOT 下的 jsp。&lt;br /&gt;9.2 若改 jsp 後 refresh browser 無法立即呈現修改後的狀態，需要 close myproject 在 open myrpoejct。這是因為手動改 wtp 設定檔，需 reopen myproject 才行&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1177594386702001699?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1177594386702001699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1177594386702001699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1177594386702001699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1177594386702001699'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/12/eclipse-34-appfuse-202.html' title='如何在 eclipse 3.4 下跑 appfuse 2.0.2'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_i9YOUbw9_84/STXvABTfkjI/AAAAAAAAAIs/kO8o6XSAhXc/s72-c/appfuse-login.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1210224597378510563</id><published>2008-11-27T02:22:00.001-08:00</published><updated>2008-11-27T19:50:36.508-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Android'/><title type='text'>Android Plugin in Netbeans 6.5</title><content type='html'>Android for Netbeans 的 plugin 終於出現了，雖然 Android 官方網站只推出支援 eclipse 的 plugin ，但畢竟 Netbeans 也越來越多人使用，Google 應該也推出 Netbeans 的 plugin 才對，可能是 resource 不夠吧。&lt;br /&gt;&lt;br /&gt;目前的 release 版本只能算是 beta 版，因為在 Linux 此 plugin 運作沒有問題，但在 Windows 上還要做些微的修改才能順利的使用此 plugin。以下為使用此 plugin 的步驟&lt;br /&gt;&lt;br /&gt;1. 安裝 IDE 與 Android SDK 軟體&lt;br /&gt;下載 &lt;a href="http://services.netbeans.org/bouncer/index.php?product=netbeans-6.5&amp;amp;os=windows"&gt;NetBeans 6.5&lt;/a&gt; 並安裝到 d:\Java\NetBeans 6.5&lt;br /&gt;下載 &lt;a href="http://dl.google.com/android/android-sdk-windows-1.0_r1.zip"&gt;Android Windows SDK&lt;/a&gt; 並安裝到 d:\Java\android-sdk-windows-1.0_r1&lt;br /&gt;&lt;br /&gt;2. 安裝 Android plugin&lt;br /&gt;啟動 NetBeans 6.5，點選 Tools &gt; Plugins &gt; Settings &gt; Add&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/SS6Lm2iKNRI/AAAAAAAAAGs/rPBOYeVwiUQ/s1600-h/nb-add-settings.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/SS6Lm2iKNRI/AAAAAAAAAGs/rPBOYeVwiUQ/s400/nb-add-settings.png" alt="" id="BLOGGER_PHOTO_ID_5273305713287509266" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;然後在 dialog 加入 nbandroid 的 URL &lt;a class="external" href="http://kenai.com/downloads/nbandroid/updates.xml"&gt;http://kenai.com/downloads/nbandroid/updates.xml&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/SS6M1Wavc6I/AAAAAAAAAG8/KQu9MBq94tk/s1600-h/nb-add-android.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 140px;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/SS6M1Wavc6I/AAAAAAAAAG8/KQu9MBq94tk/s400/nb-add-android.png" alt="" id="BLOGGER_PHOTO_ID_5273307061876126626" border="0" /&gt;&lt;/a&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;這時候可以在 Available-plugin 中找到 Android 的 plugin 並按 Install 安裝&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/SS6S9Sj55UI/AAAAAAAAAHE/QQ1QPjnWDYs/s1600-h/nb-android-plugin.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 259px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/SS6S9Sj55UI/AAAAAAAAAHE/QQ1QPjnWDYs/s400/nb-android-plugin.png" alt="" id="BLOGGER_PHOTO_ID_5273313795349538114" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Hello Word, Android&lt;br /&gt;既然 plugin 裝好了，就順便寫一個初學者最常用的程式 Hello World。在 NetBeans 中按&lt;br /&gt;File &gt; New Project &gt; Android &gt; Android Application&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/SS6bjyYy5pI/AAAAAAAAAHM/Zfsnp2_Olko/s1600-h/nb-android-helloword.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/SS6bjyYy5pI/AAAAAAAAAHM/Zfsnp2_Olko/s400/nb-android-helloword.png" alt="" id="BLOGGER_PHOTO_ID_5273323252820928146" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;按 Next 會出現 New Android Application 的畫面，在此畫面，請填入如下畫面&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/SS6gJBYBJeI/AAAAAAAAAHU/aL_fjlBwIwY/s1600-h/nb-android-newap.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 273px;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/SS6gJBYBJeI/AAAAAAAAAHU/aL_fjlBwIwY/s400/nb-android-newap.png" alt="" id="BLOGGER_PHOTO_ID_5273328290545870306" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;在畫面下面可以看見紅字部份，此部份是因為尚未設定 Android Platform 的關係，此時可以按 Manage Platforms &gt; Add Platform... 來新增 Android Platform&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/SS6henmoANI/AAAAAAAAAHc/Wd19gJpqPSE/s1600-h/nb-android-add-platform.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 291px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/SS6henmoANI/AAAAAAAAAHc/Wd19gJpqPSE/s400/nb-android-add-platform.png" alt="" id="BLOGGER_PHOTO_ID_5273329761096564946" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;點選 Google Android Open Handheld Platform 按 Next，&lt;br /&gt;在 Platform folder 選擇 d:\Java\android-sdk-windows-1.0_r1 後按 Next&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/SS6iGkZrEmI/AAAAAAAAAHk/AO8aJDp6d-g/s1600-h/nb-android-platform-folder.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 240px;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/SS6iGkZrEmI/AAAAAAAAAHk/AO8aJDp6d-g/s400/nb-android-platform-folder.png" alt="" id="BLOGGER_PHOTO_ID_5273330447431701090" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;按 Next 後，出現 Platform 的命名，在 Name 上用預設值按 Finish，Android Platform 便可新增完成&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_i9YOUbw9_84/SS6jJVBeb1I/AAAAAAAAAHs/56NyC89Wsv4/s1600-h/nb-android-platform-ok.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 278px;" src="http://4.bp.blogspot.com/_i9YOUbw9_84/SS6jJVBeb1I/AAAAAAAAAHs/56NyC89Wsv4/s400/nb-android-platform-ok.png" alt="" id="BLOGGER_PHOTO_ID_5273331594354913106" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;按 Close 後，返回 New Android Application 後，Android Platform 會自動選擇&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/SS6jvBm898I/AAAAAAAAAH0/2OK3MjpSNhE/s1600-h/nb-android-newap2.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 273px;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/SS6jvBm898I/AAAAAAAAAH0/2OK3MjpSNhE/s400/nb-android-newap2.png" alt="" id="BLOGGER_PHOTO_ID_5273332241978423234" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;按 Finish 後，就可以開始寫 Android 的 Hello World 程式了&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_i9YOUbw9_84/SS6kTia130I/AAAAAAAAAH8/cax_ihZ3STU/s1600-h/nb-android-main.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 238px;" src="http://4.bp.blogspot.com/_i9YOUbw9_84/SS6kTia130I/AAAAAAAAAH8/cax_ihZ3STU/s400/nb-android-main.png" alt="" id="BLOGGER_PHOTO_ID_5273332869261287234" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;將 Todo 那一行換成以下三行&lt;br /&gt;TextView tv = new TextView(this);&lt;br /&gt;tv.setText("Hello World, Android");&lt;br /&gt;setContentView(tv);&lt;br /&gt;&lt;br /&gt;PS : 請記得 import android.widget.TextView;&lt;br /&gt;&lt;br /&gt;此時按 Run 會發現模擬器雖然跑出來了，但並不會將 Hello World deploy 到模擬器中&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/SS6morDiuCI/AAAAAAAAAIE/g9gDRzw7T6A/s1600-h/nb-android-run.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 255px; height: 400px;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/SS6morDiuCI/AAAAAAAAAIE/g9gDRzw7T6A/s400/nb-android-run.png" alt="" id="BLOGGER_PHOTO_ID_5273335431379990562" border="0" /&gt;&lt;/a&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;&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;這是因為此 plug in 有一個 bug，要修正此 bug ，可以手動修改 D:\projects\HelloAndroid\nbproject\build-impl.xml 檔將  line 466~468 換成以下內容&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_i9YOUbw9_84/SS6rJVKtH8I/AAAAAAAAAIU/qwfOQiEJxUc/s1600-h/nb-android-buildimpl.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 59px;" src="http://3.bp.blogspot.com/_i9YOUbw9_84/SS6rJVKtH8I/AAAAAAAAAIU/qwfOQiEJxUc/s400/nb-android-buildimpl.png" alt="" id="BLOGGER_PHOTO_ID_5273340390486646722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;arg value="${basedir}/${dist.apk}"&gt;&lt;/arg&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;然後再按 Run ，便可以出現剛剛寫的 Hellow World, Android 畫面&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/SS6ofcIosiI/AAAAAAAAAIM/Rlam4rrCbpY/s1600-h/nb-android-helloword2.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 233px; height: 400px;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/SS6ofcIosiI/AAAAAAAAAIM/Rlam4rrCbpY/s400/nb-android-helloword2.png" alt="" id="BLOGGER_PHOTO_ID_5273337471779254818" border="0" /&gt;&lt;/a&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;&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;&lt;br /&gt;&lt;br /&gt;4. 更改 skin&lt;br /&gt;若想試試不同的 Android skin ，可以在 D:\projects\HelloAndroid\build.xml 中增加一個 property 去設定要用的 screen.skin 為何，在此我用的 skin 為 &lt;code&gt;QVGA-P&lt;br /&gt;&lt;/code&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/SS6spZwYgZI/AAAAAAAAAIc/KT2X4-BWXYM/s1600-h/nb-android-skin.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 31px;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/SS6spZwYgZI/AAAAAAAAAIc/KT2X4-BWXYM/s400/nb-android-skin.png" alt="" id="BLOGGER_PHOTO_ID_5273342040985862546" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;則模擬器會出現 QVGA-L 型號的畫面&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/SS6tP6hJ0OI/AAAAAAAAAIk/4OZufIR9x1k/s1600-h/nb-android-QVGA-L.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 223px; height: 400px;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/SS6tP6hJ0OI/AAAAAAAAAIk/4OZufIR9x1k/s400/nb-android-QVGA-L.png" alt="" id="BLOGGER_PHOTO_ID_5273342702615384290" border="0" /&gt;&lt;/a&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;&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;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PS : 寫此 blog 時，此 plug in 的修正尚未 publish&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1210224597378510563?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1210224597378510563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1210224597378510563' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1210224597378510563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1210224597378510563'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/11/android-plugin-in-netbeans-65.html' title='Android Plugin in Netbeans 6.5'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_i9YOUbw9_84/SS6Lm2iKNRI/AAAAAAAAAGs/rPBOYeVwiUQ/s72-c/nb-add-settings.png' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1190267957779351388</id><published>2008-11-24T05:36:00.000-08:00</published><updated>2008-11-29T03:23:13.406-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>在 Ubuntu 8.10  安裝 apache 2.2 + ssl</title><content type='html'># apt-get install apache2 openssl ssl-cert&lt;br /&gt;# openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem&lt;br /&gt;－－－－－－－－－－－&lt;br /&gt;Country Name (2 letter code) [AU]:GB&lt;br /&gt;State or Province Name (full name) [Some-State]:&lt;br /&gt;Locality Name (eg, city) []:London&lt;br /&gt;Organization Name (eg, company) [Internet Widgits Pty Ltd]:Debian&lt;br /&gt;Organizational Unit Name (eg, section) []:&lt;br /&gt;Common Name (eg, YOUR name) []:&lt;br /&gt;Email Address []:&lt;br /&gt;－－－－－－－－－－－&lt;br /&gt;&lt;br /&gt;# chmod 600 /etc/apache2/apache.pem&lt;br /&gt;&lt;br /&gt;# cd /etc/apache2/mods-enabled/&lt;br /&gt;# ln -s ../mods-available/ssl.* .&lt;br /&gt;# cd /etc/apache2/site-enabled/&lt;br /&gt;# ln -s ../site-available/default-ssl .&lt;br /&gt;&lt;br /&gt;modify ports.conf and add&lt;br /&gt;LISTEN 443&lt;br /&gt;&lt;br /&gt;NameVirtualHost *:443&lt;br /&gt;&lt;br /&gt;# /etc/init.d/apache2 restart&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1190267957779351388?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1190267957779351388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1190267957779351388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1190267957779351388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1190267957779351388'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/11/ubuntu-810-apache-22-ssl.html' title='在 Ubuntu 8.10  安裝 apache 2.2 + ssl'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-7315318568909822390</id><published>2008-11-23T09:02:00.000-08:00</published><updated>2008-11-23T09:05:59.000-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>修理 nm-applet 在 ubuntu 8.10 無法顯示</title><content type='html'>安裝完 ubuntu 8.10 desktop 後，右上角的 network icon 不見了，經搜尋後，需經下列步驟的修正才能解決問題&lt;br /&gt;&lt;br /&gt;1. 修改 /etc/dbus-1/system.d/NetworkManager.conf 和 /etc/dbus-1/system.d/nm-applet.conf 將 deny，改allow&lt;br /&gt;&lt;policy context=default&gt;&lt;br /&gt;  &lt;allow own="org.freedesktop.NetworkManager"/&gt;&lt;br /&gt;  &lt;allow send_destination="org.freedesktop.NetworkManager"/&gt;&lt;br /&gt;  &lt;allow send_interface="org.freedesktop.NetworkManager"/&gt;&lt;br /&gt;&lt;/policy&gt;&lt;br /&gt;&lt;br /&gt;2. 重新啟動 dbus&lt;br /&gt;sudo /etc/init.d/dbus restart&lt;br /&gt;&lt;br /&gt;3. 停止 NetworkManager&lt;br /&gt;sudo /etc/init.d/NetworkManager stop&lt;br /&gt;&lt;br /&gt;4. 刪除 /etc/network/interfaces 或是更名(rename)&lt;br /&gt;sudo rm /etc/network/interfaces&lt;br /&gt;&lt;br /&gt;5. 重新啟動 NetworkManager&lt;br /&gt;sudo /etc/init.d/NetworkManager start&lt;br /&gt;&lt;br /&gt;6. 重新登入&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-7315318568909822390?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/7315318568909822390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=7315318568909822390' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7315318568909822390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7315318568909822390'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/11/nm-applet-ubuntu-810.html' title='修理 nm-applet 在 ubuntu 8.10 無法顯示'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-4042238397401667145</id><published>2008-11-20T21:30:00.000-08:00</published><updated>2008-11-20T21:33:49.249-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='文章分享'/><title type='text'>黑鴉鴉的庫存 (工程師的思維)</title><content type='html'>身為一個工程師，並不容易了解庫存有多麼恐怖，因為我們看不到庫存數字與庫存價格，但我們往往是庫存的始作俑者，而一旦有了庫存，可以用來營運週轉的現金就會被咬住，如果沒有警覺，公司可能就快速進入慘澹狀況。&lt;br /&gt;&lt;br /&gt;電影《當幸福來敲門》中，主角花光所有的積蓄買了「骨質疏鬆掃描儀」，然而機器賣得並不理想，幾乎一臺也賣不出去，後來主角甚至淪落到老婆跑了，付不出房租，只能帶著兒子在地鐵的廁所洗澡的困境。&lt;br /&gt;看著這樣真人實事改編的電影，劇情可能很感人，但是主角一開始的悲慘命運卻很嚇人，不知道觀眾是否能深刻體會賣不出去的庫存所帶來的壓力，現實業界卻每天都上演著這樣嚇人的事情。常常聽人家說，神仙也賣不掉的是庫存，當公司開始堆積庫存，代表的是現金被積壓了，而且，也常常是惡夢的開始。&lt;br /&gt;&lt;br /&gt;身為一個工程師，並不容易了解庫存有多麼恐怖，因為我們看不到庫存數字與庫存價格，但我們往往是庫存的始作俑者。有很多公司，研發單位做了產品，還沒有好好驗證，就開始出貨銷售，結果賣不出去變成庫存。也有的狀況是，研發出的東西沒有競爭力，或者一邊量產一邊修改，導致很多料件堆放在倉庫裡面也沒有人想起來，這筆錢就算是損失了。我曾經請教過一個學長，該怎樣教育研發人員降低庫存、減少呆料？學長說，首先要建立正確的庫存編碼方式，讓工程人員在設計的剛開始就查詢共用的零件，同時設計的產品中，能讓零件統一、共用，盡量讓每個研發人員使用的零件都相同，而不要各有各的習慣，這些講起來都是細節，我個人覺得總歸一句話──「就是要讓複雜的零件種類簡化」。&lt;br /&gt;&lt;br /&gt;很多事情，在研發人員一個起心動念之下就會完全不一樣。有個朋友在一家以成本超低著名的公司上班，有一次剛好遇見他正在跟工程師討論新產品的電路設計，他很得意地跟我說，原本的設計需要用到70項零件種類，在他詳細比對，並且將該設計裡面可以使用統一規格的零件，都用同一規格取代之後，零件種類降低為50種。&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;&lt;br /&gt;「誰想要這樣？還不都是被騙的！」雖然說被人家騙，買了貨客戶卻取消訂單，但是如果這個產品夠好，其實也不愁賣不掉吧？如果當初有考慮到公司的體質，不好的交易條件無法接受，也就不用硬吞吧？我們都想讓公司上市上櫃賺很多錢，但是在這之前需要思考公司的口袋有多深？各個環節是否能認真思考把事情變簡單？&lt;br /&gt;&lt;br /&gt;一旦有了庫存，可以用來營運週轉的現金就會被咬住，如果沒有警覺，難免就落入惡性循環直到財務出現狀況。只是看報表是不會有感覺的，有空常去倉庫走走，翻翻那些塵封的零件，心理一定會有感觸的。&lt;br /&gt;&lt;br /&gt;要體驗庫存的壓力很簡單，去五分埔買一些衣服到網路上去賣，殺價競爭與賣不出去的焦急感很快就來到，即使對你而言衣服可能只是不到1, 000元的投資。但是倉庫那些黑鴉鴉的庫存，至少都是百萬千萬的損失呢！ &lt;br /&gt;&lt;br /&gt;參考連結&lt;br /&gt;http://www.ithome.com.tw/itadm/article.php?c=52063&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-4042238397401667145?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/4042238397401667145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=4042238397401667145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4042238397401667145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4042238397401667145'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/11/blog-post.html' title='黑鴉鴉的庫存 (工程師的思維)'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1472828138185380838</id><published>2008-11-20T09:05:00.000-08:00</published><updated>2008-11-20T09:07:22.606-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><title type='text'>Tips for Ubuntu Server Configuration</title><content type='html'>1. Change computer name&lt;br /&gt;  step 1. modify /etc/hostname&lt;br /&gt;  step 2. modify /etc/hosts&lt;br /&gt;&lt;br /&gt;  PS : If /etc/hosts is not modified, X windows will have trouble.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1472828138185380838?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1472828138185380838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1472828138185380838' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1472828138185380838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1472828138185380838'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/11/tips-for-ubuntu-server-configuration.html' title='Tips for Ubuntu Server Configuration'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6321744943972204711</id><published>2008-11-19T22:38:00.000-08:00</published><updated>2008-11-20T07:50:11.976-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><title type='text'>讓裝過 desktop 的 Ubuntu Server 啟動進入 console mode</title><content type='html'>1. 新增一個檔案 /etc/inittab 內容如下&lt;br /&gt;id:3:initdefault:&lt;br /&gt;&lt;br /&gt;2. 更改啟動服務&lt;br /&gt;$ mv /etc/rc2.d/S30gdm /etc/rc2.d/K30gdm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6321744943972204711?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6321744943972204711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6321744943972204711' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6321744943972204711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6321744943972204711'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/11/desktop-ubuntu-server-console-mode.html' title='讓裝過 desktop 的 Ubuntu Server 啟動進入 console mode'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-7645891188730691044</id><published>2008-11-18T09:02:00.000-08:00</published><updated>2008-11-20T11:15:48.735-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='資料庫'/><title type='text'>在 Ubuntu 8.10 安裝 Oracle 11g</title><content type='html'>最近因買了一台 Core Duo 2 的 notebook, 於是就分割了一塊硬碟區域裝 Ubuntu 8.10 版本,至於為何會裝 8.10 版, 因為它的 kernel 支援我的無限網卡, 完全不用再安裝其他軟體&lt;br /&gt;&lt;br /&gt;在台灣, 最常用的 database 就是 mssql, oracle, mysql。 在 linux 下安裝 mssql 是不可能的事,除非用 VM 去模擬 Windows 環境。 看了一下 Oracle 的安裝手冊，全部都是英文的，於是想在安裝的時候順便把過程用中文寫下來，便於日後參考。安裝步驟如下&lt;br /&gt;&lt;br /&gt;1. 下載 oracle 11g 版本 (安裝版本為 linux_11gR1_database_1013.zip)，這裡需提醒你必須要註冊成為 oracle 的使用者才能下載，註冊是免費的&lt;br /&gt;&lt;br /&gt;2. 用 root 進入&lt;br /&gt;$ sudo su -&lt;br /&gt;&lt;br /&gt;2. 安裝額外的 package 給 oracle 用&lt;br /&gt;# apt-get install gcc make binutils gawk x11-utils rpm alien ksh lsb-rpm&lt;br /&gt;&lt;br /&gt;3. 因為 Ubuntu 的預設 shell 是 sh，需改成 bash&lt;br /&gt;# ln -sf /bin/bash /bin/sh&lt;br /&gt;# ls -l /bin/sh&lt;br /&gt;&lt;br /&gt;3. 建立群組與使用者&lt;br /&gt;# addgroup oinstall&lt;br /&gt;# addgroup dba&lt;br /&gt;# addgroup nobody&lt;br /&gt;# usermod -g nobody nobody&lt;br /&gt;# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle&lt;br /&gt;# mkdir /home/oracle&lt;br /&gt;# chown -R oracle:dba /home/oracle&lt;br /&gt;# ln -s /usr/bin/awk /bin/awk&lt;br /&gt;# ln -s /usr/bin/rpm /bin/rpm&lt;br /&gt;# ln -s /usr/bin/basename /bin/basename&lt;br /&gt;# mkdir /etc/rc.d&lt;br /&gt;# for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done&lt;br /&gt;&lt;br /&gt;4. 建立 Oracle 專用目錄&lt;br /&gt;# mkdir -p /u01/app/oracle&lt;br /&gt;# chown -R oracle:dba /u01&lt;br /&gt;&lt;br /&gt;. 解壓縮 linux_11gR1_database_1013.zip 到 /u01 下&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6. 加入以下參數到 /etc/sysctl.conf&lt;br /&gt;fs.file-max = 65535&lt;br /&gt;kernel.shmall = 2097152&lt;br /&gt;kernel.shmmax = 2147483648&lt;br /&gt;kernel.shmmni = 4096&lt;br /&gt;kernel.sem = 250 32000 100 128&lt;br /&gt;net.ipv4.ip_local_port_range = 1024 65535&lt;br /&gt;net.core.rmem_default = 4194304&lt;br /&gt;net.core.rmem_max = 4194304&lt;br /&gt;net.core.wmem_default = 262144&lt;br /&gt;net.core.wmem_max = 262144&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. 將下列參數加到 /etc/security/limits.conf&lt;br /&gt;oracle soft nproc 2047&lt;br /&gt;oracle hard nproc 16383&lt;br /&gt;oracle soft nofile 1023&lt;br /&gt;oracle hard nofile 65535&lt;br /&gt;&lt;br /&gt;8. 將下列參數加到 /etc/pam.d/login&lt;br /&gt;session required /lib/security/pam_limits.so&lt;br /&gt;session required pam_limits.so&lt;br /&gt;&lt;br /&gt;9. 重新啟動 Ubuntu Server 開機&lt;br /&gt;&lt;br /&gt;10. 先用 oracle 登入後，執行以下命令以安裝 11g。因不支援 zh_TW:UTF-8 的語系，必需先改成 zh_TW:Big5 在執行安裝程式&lt;br /&gt;$ cd /u01/database&lt;br /&gt;$ export LANG=zh_TW:Big5&lt;br /&gt;$ ./runInstaller -ignoreSysPrereqs&lt;br /&gt;&lt;br /&gt;11. 這時候英文版的安裝畫面會出現，繼續執行安裝&lt;br /&gt;Next &gt;&gt; Operating System group name = dba &gt;&gt; Standard Edtion &gt;&gt; &lt;br /&gt;Name=oraubuntu, Location /u01/app/oracle/product/11.1.0/oraubuntu &lt;br /&gt;&lt;br /&gt;12. 畫面跳到檢查系統需求，這時候將所有的 check box 勾選成 user verified.&lt;br /&gt;&lt;br /&gt;13. 按 Next 繼續，然後選擇 "Install Software Only"&lt;br /&gt;&lt;br /&gt;14. 按 Next 繼續，將所有 group 選 "dba"&lt;br /&gt;&lt;br /&gt;15. 按 Next 繼續，再按 Install 開始正式安裝&lt;br /&gt;&lt;br /&gt;16. 經過兩杯 coffee 時間，終於出現下一個畫面，安裝程式需要你用 root 執行兩個 script 分別為 &lt;br /&gt;/u01/app/orsInventory/orainstRoot.sh&lt;br /&gt;/u01/app/oracle/product/11.1.0/oraubuntu/root.sh&lt;br /&gt;&lt;br /&gt;17. 用 root 執行完這兩個 script 後按 OK，整個安裝就算完成了&lt;br /&gt;&lt;br /&gt;18. 此時只有安裝完 oracle ，但尚未建立資料庫，在建立資料庫之前，必須先安裝幾個 package 再建立資料庫&lt;br /&gt;# apt-get install libaio1 lesstif2 libmotif3&lt;br /&gt;&lt;br /&gt;19. 用 root 建立 script 以便在開機時啟動 oracle 資料庫&lt;br /&gt;# cat /etc/init.d/oracledb&lt;br /&gt;===============================================================&lt;br /&gt;#!/bin/bash&lt;br /&gt;#&lt;br /&gt;# /etc/init.d/oracledb&lt;br /&gt;#&lt;br /&gt;# Run-level Startup script for the Oracle Listener and Instances&lt;br /&gt;# It relies on the information on /etc/oratab&lt;br /&gt;&lt;br /&gt;export ORACLE_BASE=/u01/app/oracle&lt;br /&gt;export ORACLE_HOME=/u01/app/oracle/product/11.1.0/oraubuntu&lt;br /&gt;export ORACLE_OWNR=oracle&lt;br /&gt;export PATH=$PATH:$ORACLE_HOME/bin&lt;br /&gt;&lt;br /&gt;if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]&lt;br /&gt;then&lt;br /&gt;    echo "Oracle startup: cannot start"&lt;br /&gt;    exit 1&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;case "$1" in&lt;br /&gt;    start)&lt;br /&gt;        # Oracle listener and instance startup&lt;br /&gt;        echo -n "Starting Oracle: "&lt;br /&gt;        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"&lt;br /&gt;        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"&lt;br /&gt;        touch /var/lock/oracle&lt;br /&gt;        echo "OK"&lt;br /&gt;        ;;&lt;br /&gt;    stop)&lt;br /&gt;        # Oracle listener and instance shutdown&lt;br /&gt;        echo -n "Shutdown Oracle: "&lt;br /&gt;        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"&lt;br /&gt;        su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"&lt;br /&gt;        rm -f /var/lock/oracle&lt;br /&gt;        echo "OK"&lt;br /&gt;        ;;&lt;br /&gt;    reload|restart)&lt;br /&gt;        $0 stop&lt;br /&gt;        $0 start&lt;br /&gt;        ;;&lt;br /&gt;    *)&lt;br /&gt;        echo "Usage: `basename $0` start|stop|restart|reload"&lt;br /&gt;        exit 1&lt;br /&gt;esac&lt;br /&gt;&lt;br /&gt;exit 0&lt;br /&gt;=======================================================================&lt;br /&gt;# chmod a+x /etc/init.d/oracledb&lt;br /&gt;# update-rc.d oracledb defaults 99&lt;br /&gt;&lt;br /&gt;20. 用 oracle 開始建立資料庫&lt;br /&gt;$ export ORACLE_HOME=/u01/app/oracle/product/11.1.0/oraibex&lt;br /&gt;$ export PATH=$PATH:/u01/app/oracle/product/11.1.0/oraibex/bin&lt;br /&gt;$ dbca&lt;br /&gt;&lt;br /&gt;21. 接下來按 Next &gt;&gt; "Create Database", Next &gt;&gt; Next &lt;br /&gt;&lt;br /&gt;22. Global Database Name : vmid ， SID : vmid&lt;br /&gt;&lt;br /&gt;23. 不要選擇 "Configure Enterprise Manager" 再按 Next&lt;br /&gt;&lt;br /&gt;24. password 統一用 "oracle" ，再按 Next&lt;br /&gt;&lt;br /&gt;25. 選 File System ，再按 Next&lt;br /&gt;&lt;br /&gt;26. 選第一個，"Use Databaes File Location from Template" 再按 Next&lt;br /&gt;&lt;br /&gt;27. 將 archive 功能 disable 再按 Next&lt;br /&gt;&lt;br /&gt;28. 選擇 "Sample Schema" 再按 Next&lt;br /&gt;&lt;br /&gt;29. 在 "Character Sets" 選 "Unicode" 再按 Next&lt;br /&gt;&lt;br /&gt;30. 選 "Keep default security settings" ，再按 Next&lt;br /&gt;&lt;br /&gt;31. 將 "Enable automatic maintenance tasks" disable 後，再按 Next&lt;br /&gt;&lt;br /&gt;32. 再按 "Next" &gt;&gt; "Finish" &gt;&gt; "ok" 後 vmid 的資料庫開始建立&lt;br /&gt;&lt;br /&gt;33. 建立完成後按 "exit" 離開，此時資料庫建立完成&lt;br /&gt;&lt;br /&gt;34. 測試資料庫連接&lt;br /&gt;$ export ORACLE_ID=vmid&lt;br /&gt;$ sqlplus system/oracle &lt;br /&gt;&lt;br /&gt;若可以連進去，便是成功&lt;br /&gt;&lt;br /&gt;35. 開機時啟動 oracle 並可連接，需編輯 /etc/oratab&lt;br /&gt;intrepid:/u01/app/oracle/product/11.1.0/oraibex:N&lt;br /&gt;並將 N 改為 Y&lt;br /&gt;&lt;br /&gt;36. 重新啟動 server ，如此才能從外部連接 oracle&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-7645891188730691044?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/7645891188730691044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=7645891188730691044' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7645891188730691044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7645891188730691044'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/11/ubuntu-810-oracle-11g.html' title='在 Ubuntu 8.10 安裝 Oracle 11g'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-5804252460153978589</id><published>2008-10-22T04:19:00.000-07:00</published><updated>2008-10-22T04:23:07.518-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><title type='text'>Google機房的省電妙招</title><content type='html'>&lt;table style="width: 681px; height: 1367px;" class="Bpadd" border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt; &lt;td class="text13b"&gt; &lt;!-- NO MAIN PHOTO --&gt; 根據Google資料顯示，其資料中心PUE值平均僅為1.21，他們是透過建立冷熱通道、提高電源供應器的使用效率、使用蒸發式的冷卻水塔等，來降低資料中心的耗電量。&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td class="text15"&gt; 說到Google，或許你曾使用過Google的Gmail、搜尋引擎等服務，但你一定不知道，當使用Google搜尋時，使用者個人電腦所耗費的電力比起Google系統回應使用者需求所使用的能源還多。&lt;br /&gt;&lt;br /&gt;根據Google的資料，Google六座資料中心平均PUE值為1.21，目前臺灣企業資料中心的PUE值平均為2.5，歐美國家的PUE值平均則為 2，PUE值越低，代表著機房空調冷卻所需的電力就會更少，Google幾乎做到最高標準的資料中心節能目標。Google日前發布一個專屬網站，告訴大 家Google如何透過4種方法打造出高能源使用效率的資料中心。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;第一步：降低伺服器的用電量&lt;/strong&gt;&lt;br /&gt;對於Google來說，最大宗的IT設備莫過於伺服器。Google從2000年就開始強化伺服器的節能，目前Google所用的伺服器都是自行設計，將設計好的伺服器委由代工廠製造。Google的目的就是要打造一臺相當節能的伺服器，而重點就是要提升能源轉換的效率。&lt;br /&gt;&lt;br /&gt;在挑選伺服器的電源供應器上，Google採用高轉換效率的電源供應器。此外，Google還注意到電力供應從主機板到各零組件的電力浪 費，Google透過有效率的電壓調節模組（efficient voltage regulator modules）來避免電力從主機板至各零組件在轉換的過程中所造成的浪費。不只如此，由於Google的應用屬性，伺服器並不需要繪圖處理器，因此拿掉 不需要的零組件，不但減少電力的浪費，由於零組件數量降低，風扇的使用數目也可減少，提升整體伺服器的用電效率。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;第二步：冷卻水塔盡量使用蒸發冷卻&lt;/strong&gt;&lt;br /&gt;傳統資料中心空調冷卻的費用約占整體電費的30％至70％，Google除了建立冷熱通道來提升空調使用效率，並提高冷通道的溫度設定來減少空調冷卻的支出，比方來說，如果冷通道溫度設定為21度可調高至26度，透過提高冷通道的溫度，減少空調使用。&lt;br /&gt;&lt;br /&gt;此外，Google還透過「蒸發冷卻」的方式來降低空調冷卻的費用。&lt;br /&gt;Google目前位在俄勒岡州的資料中心，其冷卻水塔就是採用蒸發冷卻的方式。&lt;br /&gt;&lt;br /&gt;先將資料中心所產生的熱透過冷卻水來降溫，所製造的熱水就是透過冷卻水塔，與外界的冷空氣進行熱交換，來達到冷卻的目的，這麼一來就不需要額外負擔電費將熱水降溫，透過「免費的冷卻模式」來降低資料中心空調的電費。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;第三步：充分利用水資源&lt;/strong&gt;&lt;br /&gt;Google不只省電，也想節省用水量，Google計畫在今年底，有兩座資料中心的冷卻水塔將全部採用再生水，並預計在2010年有8成的用水 量是來自再生水。目前在比利時的資料中心就在建置水過濾系統，所使用的水資源主要來自城市的汙水或雨水，雖然淨化後的水質還不足以當作飲用水，但透過過濾 系統淨化雜質，還是可以供給冷卻水塔使用，降低Google的用水量。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;第四步：重複利用伺服器&lt;/strong&gt;&lt;br /&gt;當伺服器走入汰換年限，Google並非丟棄淘汰的伺服器，而是透過回收機制，讓老舊的伺服器還能發揮最大的作用。Google的理想是希望每一臺伺服器的零組件都能重複使用，把回收的零組件繼續用在新伺服器上。&lt;br /&gt;&lt;br /&gt;目前Google有6成8的老舊零組件使用在新的伺服器上，至於Google自身無法繼續使用的零組件，Google則是透過出售或捐贈的方式，來延續老舊零組件的壽命。文⊙林文彬&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.ithome.com.tw/img/103/51515_1_1_l.jpg" /&gt;&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-5804252460153978589?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/5804252460153978589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=5804252460153978589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5804252460153978589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5804252460153978589'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/10/google.html' title='Google機房的省電妙招'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-4551265482801616075</id><published>2008-10-03T21:41:00.001-07:00</published><updated>2008-10-03T21:41:55.933-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='軟體工程'/><title type='text'>十年磨一劍，開發功力需要實戰累積</title><content type='html'>&lt;table class="Bpadd" border="0" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="text13b"&gt;程式人的養成並非一朝一夕。若以為「熟讀唐詩三百首，不會作詩也會吟」，絕對難成大器。&lt;br /&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;   &lt;tr&gt; &lt;td class="text20"&gt; &lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td class="text15"&gt; 一篇名為《Teach Yourself Programming in Ten Years（花十年的時間學習程式設計）》” 文章，作者Peter Norvig點出了許多程式人急於速成程式設計的現象。相信許多人看到這篇文章的標題，都會露出會心的一笑，因為相較於坊間許多標榜在幾天甚至幾小時之 內，可以學成某一程式語言或特定軟體技術的書籍而言，這篇文章標題中的「十年」，無疑突顯出極大的對比。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;程式開發可快速上手，是開發工具給的錯覺&lt;/strong&gt;&lt;br /&gt;已經記不得究竟是那本書籍開此風氣之先，但根據這篇文章的作者，在文章中表示，他在Amazon上搜尋具有此種形式的書名，在搜尋結果的前兩百筆中，高達96%的書是和電腦技術相關。&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;strong&gt;教育訓練中心的培訓方式，也使人們以為速成不難&lt;/strong&gt;&lt;br /&gt;除此之外，「軟體工程師」或「程式設計師」這樣子的職務，在現今的職場中，即使稱不上薪資優沃，卻也是一份需求大過於供給的工作。這吸引了許多原先在校園中並不是修讀資訊相關科系的人們，競向轉職投入這一個領域之中。&lt;br /&gt;&lt;br /&gt;於是，許多教育訓練單位及機構，便推出各種滿足此種就職需求的課程，有的甚至是以取得各式證照為目標。而這類的課程，也促使了許多人意外地成為了 程式人，而且對他們來說，能在越短的時間內完成投入職場的準備，越快找到合適的工作，是不可動搖的第一目標。在這樣的前提下，能夠「速成」，何樂而不為？&lt;br /&gt;&lt;br /&gt;上述的兩個例子，所呈現的便是社會上對於程式設計的某種觀感，有許多人甚至認為，程式設計是小道，而且速成不難。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;用「十年磨一劍」來形容程式人的養成，才是貼切的&lt;/strong&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;&lt;br /&gt;例如，在書本裡頭、在課堂上，多半是教導你如何達成你想要的功能。對於各種可能會遭遇到的異常情況，該如何處理，以及程式撰寫時可能會意外犯下的錯誤，與這些錯誤可能會有的癥兆，只能透過實戰經驗一一磨練。&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;從錯誤中學到教訓是程式人最大的資產之一&lt;/strong&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;&lt;br /&gt;&lt;strong&gt;程式設計素養與能力的訓練，一定需要長期且大量的實戰&lt;/strong&gt;&lt;br /&gt;十年磨一劍，並非指程式人必須訓練十年之久方能派上用場，而是想強調：程式人的養成並非一朝一夕之功。對於自我的要求及訓練，必須放到更長的時間軸上來看，而不能從速成的眼光限制了自己不斷成長的可能性。&lt;br /&gt;&lt;br /&gt;另外一方面，我更想強調：程式設計的訓練，絕對是需要以長期且大量的實戰為基礎的。倘若只是紙上談兵，或者以為「熟讀唐詩三百首，不會作詩也會吟」，只需要大量的閱讀書籍，程式設計功力自然有所提升，那麼絕對難以有所大成。&lt;br /&gt;&lt;br /&gt;賈島的〈劍客〉，說的是「十年磨一劍，霜刃未曾試」，磨劍磨了十年，卻未曾真正的於實戰中試過。程式人的十年磨一劍，卻是要天天試劍，才能讓劍的鋒芒越用越利。 &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-4551265482801616075?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/4551265482801616075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=4551265482801616075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4551265482801616075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/4551265482801616075'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/10/blog-post.html' title='十年磨一劍，開發功力需要實戰累積'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-5615814229045651906</id><published>2008-10-03T08:13:00.000-07:00</published><updated>2008-10-03T08:15:51.334-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><title type='text'>Turn Your Ubuntu Hardy to Mac OSX Leopard</title><content type='html'>如何將 Ubuntu Hardy 轉成 Mac OSX Leopard Theme&lt;br /&gt;You can’t really turn a Linux system to a Mac, but you definitely can make your Ubuntu Hardy looks like a Mac OSX Leopard. &lt;p&gt;If you want to change this&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/ubuntu-desktop-original.jpg" alt="ubuntu-desktop-original" border="0" height="227" width="304" /&gt; into&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/ubuntu-leopard-screenshot.jpg" alt="ubuntu-leopard-screenshot" border="0" height="192" width="304" /&gt; , follow the steps below.&lt;/p&gt; &lt;p&gt;&lt;span id="more-631"&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;Before we start…&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;First, create a folder in your Home and name it &lt;em&gt;Mac_files.&lt;/em&gt; Download the following files to the Mac_files folder.&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;a href="http://maketecheasier.com/a/Mac4Lin_modified_theme/" target="_blank"&gt;Modified Mac4Lin theme&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://maketecheasier.com/a/Mac4Lin_Icons_modified/" target="_blank"&gt;Mac4Lin icon set&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://downloads.sourceforge.net/mac4lin/Mac4Lin_Wallpapers_Part3_v0.4.tar.gz?modtime=1198007584&amp;amp;big_mirror=0&amp;amp;filesize=12555519" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/downloads.sourceforge.net');"&gt;Mac4Lin wallpaper&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://gnome-look.org/CONTENT/content-files/66381-Elegant_glass.tgz" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/gnome-look.org');"&gt;Avant Windows Manager elegant glass theme&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Using Archive manager, extract the &lt;del datetime="2008-07-29T03:09:17+00:00"&gt;three Mac4Lin zip files&lt;/del&gt; &lt;em&gt;Modified Mac4Lin theme&lt;/em&gt; and &lt;em&gt;Mac4Lin wallpaper&lt;/em&gt; to the &lt;em&gt;Mac_files&lt;/em&gt; folder.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Apply Mac OSX Leopard Theme&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Go to &lt;em&gt;System-&gt;Preferences-&gt;Appearance&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/appearance.jpg" alt="appearance" border="0" height="403" width="454" /&gt;&lt;/p&gt; &lt;p&gt;Select &lt;em&gt;Install&lt;/em&gt; and select the &lt;em&gt;Mac4Lin GTK theme&lt;/em&gt; &lt;em&gt;(/home/username/Mac_files/Mac4Lin_v0.4/GTK Metacity Theme/Mac4Lin_GTK_v0.4.tar.gz&lt;/em&gt;).&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/appearance-select-gtk-theme.jpg" alt="appearance-select-gtk-theme" border="0" height="316" width="454" /&gt;&lt;/p&gt; &lt;p&gt;Next, click &lt;em&gt;Install&lt;/em&gt; again and select the &lt;em&gt;Mac4Lin icon theme&lt;/em&gt;. &lt;em&gt;(&lt;del datetime="2008-07-29T03:09:17+00:00"&gt;/home/username/Mac_files/Mac4Lin_Icons_Part2_v0.4.tar.gz&lt;/del&gt; /home/username/Mac_files/Mac4Lin_Icons_modified.tar.gz)&lt;/em&gt;. When prompted, select “&lt;em&gt;Apply new themes&lt;/em&gt;“.&lt;/p&gt; &lt;p&gt;Click &lt;em&gt;Install&lt;/em&gt; again and select the &lt;em&gt;Mac4Lin mouse cursor theme&lt;/em&gt;. &lt;em&gt;(/home/username/Mac_files/Mac4Lin_v0.4/GTK Cursor Theme/Mac4Lin_Cursors_v0.4.tar.gz&lt;/em&gt;). Select “&lt;em&gt;Apply new themes&lt;/em&gt;” when prompted.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/appearance-cursor-apply-theme.jpg" alt="appearance-cursor-apply-theme" border="0" height="169" width="404" /&gt;&lt;/p&gt; &lt;p&gt;Click ‘&lt;em&gt;customize’&lt;/em&gt; and choose &lt;em&gt;Mac4Lin_GTK_v0.4&lt;/em&gt;. Go to the “&lt;em&gt;Window border”&lt;/em&gt; tab, choose &lt;em&gt;Mac4Lin_GTK_v0.4&lt;/em&gt;. Click Close.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/appearance-customize.jpg" alt="appearance-customize" border="0" height="440" width="335" /&gt;&lt;/p&gt; &lt;p&gt;On the top, go to the &lt;em&gt;Background&lt;/em&gt; tab. Click &lt;em&gt;Add&lt;/em&gt; and select the Leopard wallpaper. &lt;em&gt;(/home/username/Mac_files/Wallpapers/Leopard.jpg&lt;/em&gt;). Click &lt;em&gt;Close&lt;/em&gt; to terminate the Appearance window&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/appearance-select-wallpaper.jpg" alt="appearance-select-wallpaper" border="0" height="397" width="454" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Install the Dock (Avant Window Navigator)&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Open a terminal (&lt;em&gt;Applications-&gt;Accessories-&gt;Terminal&lt;/em&gt;) and type&lt;/p&gt; &lt;p class="codeblock"&gt;gksu gedit /etc/apt/sources.list&lt;/p&gt; &lt;p&gt;and add the following lines to the end of the file:&lt;/p&gt; &lt;p class="codeblock"&gt;deb http://ppa.launchpad.net/awn-testing/ubuntu hardy main&lt;br /&gt;deb-src http://ppa.launchpad.net/awn-testing/ubuntu hardy main&lt;/p&gt; &lt;p&gt;Save and close the file. In your terminal, type&lt;/p&gt; &lt;p class="codeblock"&gt;sudo apt-get update&lt;br /&gt;sudo apt-get install avant-window-navigator-trunk awn-manager-trunk awn-extras-applets-trunk&lt;/p&gt; &lt;p&gt;Go to &lt;em&gt;System-&gt;Preferences-&gt;AWN manager&lt;/em&gt;. On the left, click on the &lt;em&gt;Theme&lt;/em&gt;. On the right, click &lt;em&gt;Add&lt;/em&gt; and navigate to the &lt;em&gt;Mac_files&lt;/em&gt; folder. Select the &lt;em&gt;Elegant_glass.tgz file&lt;/em&gt;. Check the bullet beside the Elegant glass theme and click &lt;em&gt;Apply&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/awn-select-theme.jpg" alt="awn-select-theme" border="0" height="361" width="454" /&gt;&lt;/p&gt; &lt;p&gt;Next on the left, click on the &lt;em&gt;Applet&lt;/em&gt; icon. On the right, scroll down to the stack Applet. Highlight it, then click Activate. This will add the Mac Leopard stack to your dock.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/awn-select-applet.jpg" alt="awn-select-applet" border="0" height="362" width="454" /&gt;&lt;/p&gt; &lt;p&gt;Before you launch the AWN, remove the bottom panel from the desktop first. Right click on the bottom panel and select “&lt;em&gt;delete this panel”&lt;/em&gt;. Open AWN via &lt;em&gt;Applications-&gt;Accessories-&gt;Avant Window Navigator&lt;/em&gt;. Once it is activated, you can simply drag and drop the applications into the dock.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Install OSX Fonts&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Open a terminal and type the following:&lt;/p&gt; &lt;p class="codeblock"&gt;sudo apt-get install msttcorefonts&lt;/p&gt; &lt;p&gt;This will Install the Microsoft core fonts.&lt;/p&gt; &lt;p&gt;Next, copy the OSX fonts to the fonts folder&lt;/p&gt; &lt;p class="codeblock"&gt;cd /usr/share/fonts&lt;br /&gt;sudo tar xvzf /home/username/Mac_files/Mac4Lin_v0.4/Fonts/OSX_Fonts.tar.gz&lt;/p&gt; &lt;p&gt;Configure the fonts:&lt;/p&gt; &lt;p class="codeblock"&gt;cd/&lt;br /&gt;sudo tar xvjpf /home/username/Mac_files/Mac4Lin_v0.4/Fonts/fontconfig.tbz -C /etc/fonts&lt;/p&gt; &lt;p&gt;Open the Appearance window (&lt;em&gt;System-&gt;Preferences-&gt;Appearance&lt;/em&gt;) and select &lt;em&gt;Fonts&lt;/em&gt; tab. Select the following fonts according to the image below. Click Close.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/appearance-configure-fonts.jpg" alt="appearance-configure-fonts" border="0" height="368" width="454" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Change the traffic light window control to the left&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;In the terminal, type&lt;/p&gt; &lt;p class="codeblock"&gt;gconf-editor&lt;/p&gt; &lt;p&gt;This will bring up the gconf-editor window. Scroll down to &lt;em&gt;App-&gt;Metacity-&gt;general&lt;/em&gt;. On the right, double click on the button_layout and change the content to &lt;em&gt;‘close,minimize,maximize:menu’&lt;/em&gt; (without the quote). Click &lt;em&gt;Ok&lt;/em&gt; and close the gconf-editor.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/gconf-editor.jpg" alt="gconf-editor" border="0" height="440" width="548" /&gt;&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/gconf-editor2.jpg" alt="gconf-editor2" border="0" height="192" width="337" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Change the menubar&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Remove all the icon and applications on the left side of the top panel. Right-click on the icon and select &lt;em&gt;‘Remove from panel&lt;/em&gt;‘. You will left with something like this:&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/menubar-remove-icon.jpg" alt="menubar-remove-icon" border="0" height="18" width="554" /&gt;&lt;/p&gt; &lt;p&gt;On the right of the top panel, remove the logout icon. Still on the right hand side of the top panel, right click and select &lt;em&gt;‘Add to panel&lt;/em&gt;‘. Scroll down the list and add &lt;em&gt;‘Search for files&lt;/em&gt;‘. This will add the spotlight icon to the panel.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/menubar-add-search.jpg" alt="menubar-add-search" border="0" height="423" width="454" /&gt;&lt;/p&gt; &lt;p&gt;On the extreme left, right-click and select &lt;em&gt;‘Add to panel&lt;/em&gt;‘. Scroll down the list and add &lt;em&gt;‘Main Menu&lt;/em&gt;‘. This will add the apple icon on the left. You can now log out and shut down from the Apple dropdown menu (same as Mac OSX).&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/menubar-add-mainmenu.jpg" alt="menubar-add-mainmenu" border="0" height="423" width="454" /&gt;&lt;/p&gt; &lt;p&gt;Next, we are going to install &lt;em&gt;globalmenu&lt;/em&gt; so as to display the menubar for each application. In your terminal,&lt;/p&gt; &lt;p class="codeblock"&gt;cd Mac_files&lt;br /&gt;wget http://gnome2-globalmenu.googlecode.com/files/gnome-globalmenu-0.4-svn964.tar.gz&lt;br /&gt;tar zxvf gnome-globalmenu-0.4-svn964.tar.gz&lt;br /&gt;cd globalmenu&lt;br /&gt;sudo dpkg -i *.deb&lt;/p&gt; &lt;p&gt;If you have any errors when installing the package, try&lt;/p&gt; &lt;p class="codeblock"&gt;sudo dpkg -i –force-overwrite *.deb&lt;/p&gt; &lt;p&gt;If you are having some installation problems with the &lt;em&gt;gnome-globalmenu-applet&lt;/em&gt;, try&lt;/p&gt; &lt;p class="codeblock"&gt;sudo apt-get install -f&lt;/p&gt; &lt;p&gt;Once finished, right click on the top panel and select &lt;em&gt;‘Add to panel&lt;/em&gt;‘. Scroll down the list and add &lt;em&gt;‘Global Menu Applet&lt;/em&gt;‘.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/menubar-add-globalmenu.jpg" alt="menubar-add-globalmenu" border="0" height="420" width="454" /&gt;&lt;/p&gt; &lt;p&gt;You might not see anything initially. Log out and log in again, you should now see the menubar for each application showing on the panel.&lt;/p&gt; &lt;p&gt;If your &lt;em&gt;globalmenu&lt;/em&gt; is of a different shade of grey from the rest of the panel (as shown in the image below), right click on any empty space on the panel and select ‘&lt;em&gt;Properties&lt;/em&gt;‘. Go to Background tab and select &lt;em&gt;‘Background image’&lt;/em&gt;. Under the selection, go to &lt;em&gt;/home/username/.themes/Mac4Lin_GTK_v0.4/gtk-2.0/Panel&lt;/em&gt; and select &lt;em&gt;panel-bg.png&lt;/em&gt;. Click OK. (&lt;strong&gt;Updated&lt;/strong&gt;: If you can’t find the &lt;em&gt;.themes &lt;/em&gt;folder, right-click and select ‘&lt;em&gt;show hidden files&lt;/em&gt;‘.)&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/globalmenu-w-darkbg.jpg" alt="globalmenu-w-darkbg" border="0" height="19" width="554" /&gt;&lt;/p&gt; &lt;p&gt;Drag the &lt;em&gt;globalmenu&lt;/em&gt; to the left just beside the Apple icon. Right click on the globalmenu and select &lt;em&gt;‘Preferences’&lt;/em&gt;. Tick the box beside &lt;em&gt;‘Display the title of the current application&lt;/em&gt;‘ and put maximum width 100. Select the font to be &lt;em&gt;Lucida Grande Bold&lt;/em&gt;. Click &lt;em&gt;Apply&lt;/em&gt; and &lt;em&gt;OK&lt;/em&gt;. You should now have a desktop that resemble Mac Leopard.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/globalmenu-preferences.jpg" alt="globalmenu-preferences" border="0" height="188" width="341" /&gt;&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/menubar-with-globalmenu.jpg" alt="menubar-with-globalmenu" border="0" height="19" width="554" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Configuring the Login screen&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Click on the Apple icon, go to &lt;em&gt;System-&gt;Administration-&gt;Login Window&lt;/em&gt;. On the &lt;em&gt;Local&lt;/em&gt; tab, click &lt;em&gt;Add&lt;/em&gt;. Navigate to the path &lt;em&gt;/filesystem/home/username/Mac_files/Mac4Lin_v0.4/GDM Theme&lt;/em&gt; and select the file &lt;em&gt;Mac4Lin_GDM_v0.4.tar.gz&lt;/em&gt;. Check the box beside the newly installed theme to activate it.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/install-login-screen.jpg" alt="install-login-screen" border="0" height="440" width="343" /&gt;&lt;/p&gt; &lt;p&gt;Underneath, there is a color selection field, select it and key in the number &lt;em&gt;E5E5E5&lt;/em&gt; into the &lt;a id="KonaLink0" target="_new" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://maketecheasier.com/turn-your-ubuntu-hardy-to-mac-osx-leopard/2008/07/23/#"&gt;&lt;span style="color: rgb(59, 120, 169) ! important; font-weight: 400; position: static;font-family:Arial,Verdana,Tahoma,Helvetica,sans-serif;font-size:14;"  &gt;&lt;span class="kLink" style="color: rgb(59, 120, 169) ! important; font-weight: 400; position: static;font-family:Arial,Verdana,Tahoma,Helvetica,sans-serif;font-size:14;"  &gt;color &lt;/span&gt;&lt;span class="kLink" style="color: rgb(59, 120, 169) ! important; font-weight: 400; position: static;font-family:Arial,Verdana,Tahoma,Helvetica,sans-serif;font-size:14;"  &gt;code&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; field.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/login-screen-color.jpg" alt="login-screen-color" border="0" height="263" width="454" /&gt;&lt;/p&gt; &lt;p&gt;Click &lt;em&gt;Ok&lt;/em&gt;. Log out. You should see the login screen as the diagram below.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/login-screen.jpg" alt="login-screen" border="0" height="307" width="554" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Configure usplash screen&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;usplash is the screen that you see when your computer is booting up. We are going to change it to show the white apple screen. In your terminal,&lt;/p&gt; &lt;p class="codeblock"&gt;sudo apt-get install startupmanager&lt;/p&gt; &lt;p&gt;Go to &lt;em&gt;System-&gt;Administration-&gt;Start-Up Manager&lt;/em&gt; Go to &lt;em&gt;Appearance&lt;/em&gt; tab. Click on the &lt;em&gt;‘Manage bootloader theme&lt;/em&gt;‘. Click &lt;em&gt;Add&lt;/em&gt; and navigate to the file &lt;em&gt;/filesystem/home/username/Mac_files/Mac4Lin_v0.4/GRUB Splash/appleblack.xpm.gz&lt;/em&gt;. Check the box “&lt;em&gt;Use background image for bootloader menu&lt;/em&gt;” and select &lt;em&gt;‘appleblack&lt;/em&gt;”.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/startupmanager-configuration.jpg" alt="startupmanager-configuration" border="0" height="419" width="454" /&gt;&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/startupmanager-addtheme.jpg" alt="startupmanager-addtheme" border="0" height="328" width="303" /&gt;&lt;/p&gt; &lt;p&gt;Next, click “&lt;em&gt;Manage usplash theme&lt;/em&gt;”. Click &lt;em&gt;Add&lt;/em&gt; and add the file &lt;em&gt;/filesystem/home/username/Mac_files/Mac4Lin_v0.4/USplash Theme/osx-splash.so&lt;/em&gt;. Click &lt;em&gt;OK&lt;/em&gt;. Select &lt;em&gt;OSX-splash&lt;/em&gt; from the dropdown box.&lt;/p&gt; &lt;p&gt;Now reboot. You should see the following images:&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/bootloader.jpg" alt="bootloader" border="0" height="342" width="454" /&gt;&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/usplash.jpg" alt="usplash" border="0" height="342" width="454" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Creating Dashboard effect&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;We will use a combination of &lt;a href="http://www.screenlets.org/" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.screenlets.org');"&gt;screenlets&lt;/a&gt; and Compiz widget plugin to achieve the dashboard effect.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Install Screenlets&lt;/strong&gt;&lt;/p&gt; &lt;p class="codeblock"&gt;sudo apt-get install screenlets compizconfig-settings-manager&lt;/p&gt; &lt;p&gt;Go to &lt;em&gt;System-&gt;Preferences-&gt;Advanced Desktop Effect Setting&lt;/em&gt;. On the Left, click on &lt;em&gt;Desktop&lt;/em&gt;. On the right, put a check beside &lt;em&gt;‘Widget layer’&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/ccsm-widget-setting.jpg" alt="ccsm-widget-setting" border="0" height="342" width="554" /&gt;&lt;/p&gt; &lt;p&gt;Go to &lt;em&gt;Accessories-&gt;Screenlets&lt;/em&gt;. Activate the widgets that you want to display. Right click on the widget and select &lt;em&gt;‘Properties’&lt;/em&gt;. Go to Options tab and select &lt;em&gt;‘Treat as widget’&lt;/em&gt;. Do this for all the widgets that you have activated.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/screenlets-as-widget.jpg" alt="screenlets-as-widget" border="0" height="118" width="400" /&gt;&lt;/p&gt; &lt;p&gt;You can now see your dashboard in action by pressing F9.&lt;/p&gt; &lt;p&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/dashboard-effect.jpg" alt="dashboard-effect" border="0" height="348" width="554" /&gt;&lt;/p&gt; &lt;p&gt;Done. You have completed the transformation of your Ubuntu desktop to Mac OSX Leopard.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Some screenshots:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://maketecheasier.com/wp-content/uploads/2008/07/ubuntu-leopard-screenshot-big.jpg"&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/ubuntu-leopard-screenshot-big-thumb.jpg" alt="ubuntu-leopard-screenshot-big" border="0" height="373" width="594" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://maketecheasier.com/wp-content/uploads/2008/07/screenshot-w-stack.jpg"&gt;&lt;img style="border-width: 0px;" src="http://maketecheasier.com/wp-content/uploads/2008/07/screenshot-w-stack-thumb.jpg" alt="screenshot-w-stack" border="0" height="373" width="594" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-5615814229045651906?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/5615814229045651906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=5615814229045651906' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5615814229045651906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5615814229045651906'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/10/turn-your-ubuntu-hardy-to-mac-osx.html' title='Turn Your Ubuntu Hardy to Mac OSX Leopard'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6789319277174823323</id><published>2008-09-29T19:38:00.000-07:00</published><updated>2008-09-29T19:40:55.736-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='國際化'/><title type='text'>國際舞台簡報七大必勝心法</title><content type='html'>＊國際舞台簡報七大必勝心法&lt;br /&gt;&lt;br /&gt;未來，所有人都有機會到國際舞台上做簡報。以下是「Demo」秀總結多年來的制勝簡報心法。&lt;br /&gt;&lt;br /&gt;心法一：人只會記得三件新的事情。 這是經過統計的，一次簡報要試圖傳達超過三件以上事情的結果，最後是，觀眾一件都不記得。&lt;br /&gt;&lt;br /&gt;心法二：永遠別插入與主題無關的事情。就連你公司的成立背景也不需要，他若對你有興趣，自然會來問。&lt;br /&gt;&lt;br /&gt;心法三：主題是公司產品，不是CEO（執行長）。CEO很有權威沒錯，但不會做簡報，就別上台。&lt;br /&gt;&lt;br /&gt;心法四：別隨便表達幽默感。除非你的笑話真的非常好笑，否則在文化隔閡下，笑話常常會不靈光。&lt;br /&gt;&lt;br /&gt;心法五：大量練習。台上六分鐘，台下至少練習六十天。&lt;br /&gt;&lt;br /&gt;心法六：準備出錯時的方案。人跟電腦都會出錯，一定要有Plan B（B計畫）。&lt;br /&gt;&lt;br /&gt;心法七：祈禱。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6789319277174823323?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6789319277174823323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6789319277174823323' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6789319277174823323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6789319277174823323'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/09/blog-post.html' title='國際舞台簡報七大必勝心法'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-5845386063547925740</id><published>2008-09-28T01:46:00.000-07:00</published><updated>2008-09-28T01:47:49.166-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><title type='text'>Install VMWare in Ubuntu 8.04</title><content type='html'>&lt;span style="font-family:Times New Roman;"&gt;&lt;span style="font-size:130%;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;This update has been updated to VMWare server version 1.0.6 and 2.0 RC1. Installation of VMWAre Server 2.0 RC1 is very similar to 1.0.6 (scroll down a little).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;Anyone wishing to use the "old" method using the any-any-update see&lt;/span&gt; &lt;a href="http://ubuntuforums.org/showthread.php?t=826624" target="_blank"&gt;This thread&lt;/a&gt;.&lt;blockquote&gt;&lt;span style="color:blue;"&gt;Thanks ~ &lt;/span&gt;&lt;a href="http://ubuntuforums.org/member.php?u=364412" target="_blank"&gt;gtdaqua&lt;/a&gt;&lt;/blockquote&gt;There have been a number of threads on the forums and hopefully this (brief) how to will help make the process as easy as possible.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;If you need a more detailed description please see this thread&lt;/i&gt; :&lt;blockquote&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=183209" target="_blank"&gt;HowTo: Windows (XP) on Ubuntu with VMWare Server&lt;/a&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt; ~ Thanks&lt;/span&gt;&lt;a href="http://ubuntuforums.org/member.php?u=48310" target="_blank"&gt; Peturrr&lt;/a&gt;&lt;/blockquote&gt;OttifantSir has made a copy of this how-to available for download as a pdf &lt;a href="http://www.megaupload.com/?d=MF9U2ZZN" target="_blank"&gt;Here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;~ Thanks&lt;/span&gt; &lt;/span&gt;&lt;a href="http://ubuntuforums.org/member.php?u=170483" target="_blank"&gt;OttifantSir&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color:navy;"&gt;VMWare Server 1.0.6&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol style="list-style-type: decimal;"&gt;&lt;li&gt;If you have any problems installing 1.0.6, see the link at the bottom of this post under "trouble shooting" (or read through this thread for similar problems).&lt;/li&gt;&lt;li&gt;Prep ~ Install the needed tools.&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;"&gt;sudo apt-get install build-essential linux-headers-`uname -r` xinetd&lt;/pre&gt; &lt;/div&gt;&lt;b&gt;*64 bit users only*&lt;/b&gt;&lt;br /&gt;In addition install ia32-libs (ia32-libs is in universe so you may need to enable the repository) :&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;"&gt;sudo apt-get install ia32-libs&lt;/pre&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;Download vmware server (be sure to obtain a serial number) Place in an instalation directory ( I use ~/src/VMWare).&lt;br /&gt;&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;"&gt;mkdir -p ~/src/VMWare #Download VMWare files here&lt;/pre&gt; &lt;/div&gt;&lt;ul&gt;&lt;li&gt;VMWare server : &lt;a href="http://www.vmware.com/download/server/" target="_blank"&gt;http://www.vmware.com/download/server/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;VMWare serial number : &lt;a href="http://register.vmware.com/content/registration.html" target="_blank"&gt;http://register.vmware.com/content/registration.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Extract and uinstall VMWare Server.&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 98px; text-align: left;"&gt;cd ~/src/VMWare&lt;br /&gt;tar xzf VMware-server-1.0.6-91891.tar.gz&lt;br /&gt;&lt;br /&gt;cd ~/src/VMWare/vmware-server-distrib&lt;br /&gt;sudo ./vmware-install.pl&lt;/pre&gt; &lt;/div&gt;Select defaults.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;Enter your serial # during the installation.&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;&lt;li&gt;Post-install configuration. Last, before running vmware :&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 50px; text-align: left;"&gt;sudo cp /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1&lt;br /&gt;sudo cp /usr/lib/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0&lt;/pre&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;In addition, for &lt;b&gt;*64 bit users only*&lt;/b&gt;.&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 66px; text-align: left;"&gt;sudo ln -s /usr/lib32 /usr/l32&lt;br /&gt;sudo sed -i -e 's:usr/lib/:usr/l32/:g'  /usr/lib32/gtk-2.0/2.10.0/loader-files.d/libgtk2.0-0.loaders&lt;br /&gt;sudo sed -i -e 's:usr/lib/:usr/l32/:g' /usr/lib32/libgdk_pixbuf-2.0.so.0.1200.9&lt;/pre&gt; &lt;/div&gt;~ Thanks &lt;a href="http://ubuntuforums.org/member.php?u=236865" target="_blank"&gt;fjgaude&lt;/a&gt; and &lt;a href="http://ubuntuforums.org/member.php?u=109055" target="_blank"&gt;Kokopelli&lt;/a&gt; for the 64 bit information.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;That is all there is to it. VMWare should now be up and running.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color:darkred;"&gt;VMWare Server 2.0 RC1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:darkred;"&gt;&lt;u&gt;Warning&lt;/u&gt; : I find VMWare Server 2.0 RC1 to be buggy, more then I would expect for a RC.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Advantages of Server 2.0&lt;ul&gt;&lt;li&gt;Web interface ~ this is a double edged sword. I would assume it may conflict with apache or lighttpd. It adds the convenience of remote admin over a web interface, but there is then a security risk.&lt;/li&gt;&lt;li&gt;The web interface is a change, but I think I like it.&lt;/li&gt;&lt;li&gt;It is easier to install.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Limitations:&lt;ul&gt;&lt;li&gt;The web interface is new, and takes some adjustment.&lt;/li&gt;&lt;li&gt;Connecting to the web interface and allowing an exception for ssl and a plugin for firefox was a little strange.&lt;/li&gt;&lt;li&gt;I could not give my virtual machines more then 2 CPU.&lt;/li&gt;&lt;li&gt;Although I installed the 64 bit edition on a 64 bit system / cpu, and despite VMWare claiming support for 64 bit virtual machines, &lt;b&gt;&lt;i&gt;I could only emulate 32 bit guests&lt;/i&gt;&lt;/b&gt;.&lt;/li&gt;&lt;li&gt;You can NOT run VMWare and KVM (and likely Xen) at the same time. VMWare will install, but virtual machines will not start. &lt;i&gt;I had to disable KVM in my BIOS to enable VMWare&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;&lt;u&gt;Security&lt;/u&gt;. &lt;b&gt;VMWare server 2.0 installs a web server and uses ports 80 and 443 by default&lt;/b&gt;. I would advise you change these ports, especially if you are already running a web server. I would firewall the non-ssl connection (port 80 by default) to ALL remote connections. I would limit the connections to the ssl port (443 by default) as much as possible, or even tunnel over ssh.&lt;/li&gt;&lt;/ul&gt;&lt;ol style="list-style-type: decimal;"&gt;&lt;li&gt;Download VMWare Server 2.0 from here :&lt;blockquote&gt;&lt;a href="http://www.vmware.com/beta/server/index.html" target="_blank"&gt;http://www.vmware.com/beta/server/index.html&lt;/a&gt;&lt;/blockquote&gt;Download &lt;i&gt;Both&lt;/i&gt;VMware-server-2.0.0-101586.x86_64.tar.gz and VMware-vix-e.x.p-101586.x86_64.tar.gz (if you desire vix).&lt;br /&gt;&lt;br /&gt;Again, I saved it in ~/src/VMWare&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Be sure to write down the serial number&lt;/b&gt;&lt;/li&gt;&lt;li&gt;Install build-essential&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;"&gt;sudo apt-get install build-essential&lt;/pre&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;Extract and install VMWare Server.&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 98px; text-align: left;"&gt;cd ~/src/VMWare&lt;br /&gt;tar xzf VMware-server-2.0.0-101586.x86_64.tar.gz&lt;br /&gt;&lt;br /&gt;cd ~/src/VMWare/vmware-server-distrib&lt;br /&gt;sudo ./vmware-install.pl&lt;/pre&gt; &lt;/div&gt;&lt;b&gt;&lt;span style="color:blue;"&gt;Select defaults.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;Enter your serial # during the installation.&lt;/b&gt;&lt;/i&gt;&lt;/li&gt;&lt;li&gt;Set a root password.&lt;br /&gt;&lt;br /&gt;VMWare Server 2.0 uses a WEB INTERFACE. By default, the web interface is configured to allow root login, thus we need a root password. We will undo this later.&lt;br /&gt;&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;"&gt;sudo passwd&lt;/pre&gt; &lt;/div&gt;Enter your desired root password twice (second time to confirm). You will not see anything in the terminal as you type.&lt;/li&gt;&lt;li&gt;Configure VMWare to allow users to log in.&lt;br /&gt;&lt;br /&gt;Start vmware (as a user, not root):&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;"&gt;vmware&lt;/pre&gt; &lt;/div&gt;VMWare runs in FireFox at &lt;b&gt;&lt;a href="https://localhost/ui" target="_blank"&gt;https://localhost/ui&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The first time you load the page, firefox will give you a warning. Go ahead and add an exception.&lt;br /&gt;&lt;br /&gt;You will get a log in screen, log in as root.&lt;br /&gt;&lt;br /&gt;Go to the "Permissions tab" -&gt; click "New Permission"&lt;br /&gt;&lt;br /&gt;From the pull down menus, add your user as an "Administrator"&lt;br /&gt;&lt;br /&gt;Log out and back in as your user (rather then root).&lt;br /&gt;&lt;br /&gt;Assuming that is working, lock the root account&lt;br /&gt;&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;"&gt;sudo passwd root -l&lt;/pre&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;To get the web interface working (console tab), first create a Virtual machine. Once you start your first VM you need to allow firefox to install an addon. To do this, start your new VM, then click on the "Console" tab. You will see a black window with a text message &lt;span style="color:red;"&gt;"The VMWare Remote Console Plug-in is not installed ..."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Click on the yellow "Install plugin". You will get a "warning" from firefox "Firefox prevented this site (127.0.0.1) from asking you to install software on your computer". &lt;b&gt;Click the "Allow" button on the upper Left&lt;/b&gt; and install the plugin.&lt;br /&gt;&lt;br /&gt;You will the need to re-start firefox, again log in and start your virtual machine. This time you will get notice that the VMWare Remote Console Plug-in has been installed. Again click the Console tab. You will now see a black screen with the VMWare logo. Click anywhere in this screen to start the VMWare graphical screen (in a separate window).&lt;br /&gt;&lt;br /&gt;From the VMWare console you have some limited options for admin of the VM (stop / reboot and access to removable devices).&lt;br /&gt;&lt;br /&gt;&lt;i&gt;You can close Firefox and your Virtual Machine will continue to run. You can close the VMWare window or even log off and the virtual machine will continue to run&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately, there is not a menu option to re-start the console, you have to re-start firefox, log in, and again start the console.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;&lt;span style="font-size:130%;"&gt;Additional Options&lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;VMWare server mui&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;- VMware ESX-style web-access for configuration of your server&lt;ul&gt;&lt;li&gt;Download &lt;a href="http://download3.vmware.com/software/vmserver/VMware-mui-1.0.6-91891.tar.gz" target="_blank"&gt;VMware-mui-1.0.6-91891.tar.gz&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Prep : &lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;"&gt;apt-get install libxi6 xfsprogs&lt;/pre&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;Install : &lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 82px; text-align: left;"&gt;tar -xvzf VMware-mui-1.0.6-91891.tar.gz&lt;br /&gt;cd cd vmware-mui-distrib&lt;br /&gt;sudo ln -s -f /bin/bash /bin/sh # This may not be required&lt;br /&gt;sudo ./vmware-install.pl&lt;/pre&gt; &lt;/div&gt;&lt;/li&gt;&lt;li&gt;Access &lt;a href="https://localhost:8333/" target="_blank"&gt;https://localhost:8333/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;VMWare tools&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;- Quite easy : &lt;a href="https://help.ubuntu.com/community/VMware/Tools" target="_blank"&gt;https://help.ubuntu.com/community/VMware/Tools&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Directory (Folder) Sharing&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;This works by mounting a directory on the host onto the guest.&lt;br /&gt;You need a patch, see this link :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=846691" target="_blank"&gt;VMware Tools for VMware Workstation 6.0.4 build 93057 on Ubuntu 8.04 guest&lt;/a&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;~ Thanks&lt;/span&gt; &lt;/span&gt;&lt;a href="http://ubuntuforums.org/member.php?u=191275" target="_blank"&gt;Keithel&lt;/a&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;File Sharing&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;- Samba is by far the easiest way to file share. It works out of the box with minimal end user configuration. See this page : &lt;a href="https://help.ubuntu.com/community/SettingUpSamba" target="_blank"&gt;https://help.ubuntu.com/community/SettingUpSamba&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;This link is specific to samba on VMWare&lt;/i&gt;&lt;br /&gt;&lt;a href="http://2tap.com/2007/04/22/sharing-files-between-a-windows-guest-and-ubuntu-host-using-vmware-and-samba/" target="_blank"&gt;Sharing files between a Windows guest and Ubuntu host using VMware and Samba&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;~ Thanks &lt;/span&gt;&lt;a href="http://ubuntuforums.org/member.php?u=609282" target="_blank"&gt;gerula&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Do not let the size of that page distract you, follow the sections on graphical configuration. Samba also allows sharing of printers. &lt;b&gt;&lt;i&gt;The only caveat with Ubuntu 8.04 is that after installing the samba server you need to log out and back in before your shares can be configured.&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;Alternates to Samba - &lt;a href="https://help.ubuntu.com/community/SSHFS" target="_blank"&gt;sshfs&lt;/a&gt;, &lt;a href="https://help.ubuntu.com/community/NFSv4Howto" target="_blank"&gt;NFS&lt;/a&gt;, ftp, http, or other network protocols. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt; Enable USB devices&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;- USB devices work out of the box with minimal (gui) configuration.&lt;br /&gt;- Enable USB device sharing : Using any editor (gksu gedit /etc/fstab), add this line to /etc/fstab (works with VirtualBox as well) &lt;img src="http://ubuntuforums.org/images/smilies/icon_twisted.gif" alt="" title="Twisted Evil" class="inlineimg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 50px; text-align: left;"&gt;# USB for vmware/vbox&lt;br /&gt;none /proc/bus/usb usbfs devgid=46,devmode=664 0 0&lt;/pre&gt; &lt;/div&gt;Reboot and re-start VMWare Server.&lt;br /&gt;&lt;br /&gt;- With your guest turned off : In the server window click "Edit virtual machine settings" -&gt; Click "Add" in the lower left -&gt; Select usb controller -&gt; click finish.&lt;br /&gt;&lt;br /&gt;Start your guest ...&lt;br /&gt;&lt;br /&gt;- With your guest turned on : In the VMWare menu , at the top select "VM" -&gt; Removable devices -&gt; USB devices -&gt; Select the USB device to share with your guest.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Kernel Upgrades&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;- After kernel upgrades you will need to re-run vmware-config-pl. Open a terminal and :&lt;br /&gt;&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;"&gt;sudo vmware-config.pl&lt;/pre&gt; &lt;/div&gt;Hope that helps. &lt;img src="http://ubuntuforums.org/images/smilies/icon_smile.gif" alt="" title="Smile" class="inlineimg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;b&gt;&lt;u&gt;Trouble Shooting&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Times New Roman;"&gt;- Problem installing ?&lt;br /&gt;See this thread : &lt;a href="http://ubuntuforums.org/showthread.php?t=337040" target="_blank"&gt;http://ubuntuforums.org/showthread.php?t=337040&lt;/a&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;~ Thanks &lt;/span&gt;&lt;/span&gt;&lt;a href="http://ubuntuforums.org/member.php?u=205929" target="_blank"&gt;Illuvator&lt;/a&gt;&lt;span style="font-family:Times New Roman;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;&lt;span style="font-size:130%;"&gt;Remove (uninstall) VMWare&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt; If you want to remove vmware, run :&lt;br /&gt;&lt;div style="margin: 5px 20px 20px;"&gt;  &lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;/div&gt;  &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 34px; text-align: left;"&gt;sudo vmware-uninstall.pl&lt;/pre&gt; &lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-5845386063547925740?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/5845386063547925740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=5845386063547925740' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5845386063547925740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/5845386063547925740'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/09/install-vmware-in-ubuntu-804.html' title='Install VMWare in Ubuntu 8.04'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-2919140907719067767</id><published>2008-09-28T01:40:00.001-07:00</published><updated>2008-09-28T01:41:20.505-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><title type='text'>How To Install VMware Tools on Ubuntu 8.04 Guests</title><content type='html'>&lt;p&gt;Installing VMware Tools on virtualized guests gives you a much more enjoyable experience within your virtual environment.  Screen resolution, mouse behaviour, etc will be improved for your virtual sessions after installing these additional tools.  Installing these tools within Ubuntu 8.04 virtualized guests is fairly simple, just follow along below.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Installing VMware Tools&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The first requirement, of course, is that you have Ubuntu 8.04 installed within VMware Server and that Ubuntu 8.04 is running.&lt;/p&gt; &lt;p&gt;Once you’ve got your Ubuntu 8.04 guest logged in, navigate to the “VM” menu option (File, Edit, View… VM) and select “Install VMware Tools”.  This will notify you once again that your guest must be logged in.  If that is the case, click “Install”.&lt;/p&gt; &lt;p&gt;note: The next step in the process may be simpler if you make sure any other CD images are unmounted before continuing.&lt;/p&gt; &lt;p&gt;This part of the process mounts a virtual CD image with the VMware Tools contained on it.  To find these tools for installation navigate to Places &gt; Computer &gt; CD Drive.  You should find these two files listed there:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;&lt;code&gt;VMwareTools-*.rpm&lt;br /&gt;VMwareTools-.tar.gz&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;For Ubuntu guest installations we’ll want to use the .tar.gz file.  Now we have access to the needed file, the next part of the process is opening the archive and installing the tools.&lt;/p&gt; &lt;p&gt;Below I’ve put together a copy-paste list of commands you should be able to use to unpack and setup VMware Tools on your Ubuntu 8.04 guest.  All of these commands happen within the Ubuntu 8.04 Guest machine:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;&lt;code&gt;sudo aptitude install &lt;a title="build-essential" href="apt://build-essential"&gt;build-essential&lt;/a&gt; &lt;a title="linux-headers-generic" href="apt://linux-headers-generic"&gt;linux-headers-generic&lt;/a&gt;&lt;br /&gt;cp /media/cdrom/VMwareTools-*.tar.gz /tmp/&lt;br /&gt;cd /tmp/&lt;br /&gt;tar xf VMwareTools-*.tar.gz&lt;br /&gt;cd vmware-tools-distrib/&lt;br /&gt;sudo ./vmware-install.pl&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt; You should be able to safely select the defaults for most of the questions.  You might want to pay attention at the step where it asks for your preferred available resolution and set that properly.  For the new VMware Tools to be available once this process is done you’ll need to reboot your Ubuntu 8.04 guest.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-2919140907719067767?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/2919140907719067767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=2919140907719067767' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2919140907719067767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2919140907719067767'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/09/how-to-install-vmware-tools-on-ubuntu.html' title='How To Install VMware Tools on Ubuntu 8.04 Guests'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-3890228770412785445</id><published>2008-09-27T12:13:00.000-07:00</published><updated>2008-09-27T12:14:01.559-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Server'/><title type='text'>修復Windows XP和2003在每次開機後都被提示要啟動的錯誤</title><content type='html'>&lt;div class="entry"&gt; &lt;!-- Insert Large Rectangle Ad code 336x280 here --&gt;  &lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-4635617100868199"; /* 336x280, 已建立 2008/4/30 */ google_ad_slot = "2134219626"; google_ad_width = 336; google_ad_height = 280; //--&gt; &lt;/script&gt; &lt;script style="display: none;" type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt; &lt;/script&gt; &lt;/div&gt;         &lt;p&gt;在&lt;a href="http://www.590103.idv.tw/blog/archives/tag/windows-xp" class="st_tag internal_tag" rel="tag" title="Posts tagged with Windows XP"&gt;Windows XP&lt;/a&gt; 家庭版、專業版和Windows Server 2003中，全部的標準版，企業版，Web 版，使用者可能遇到一個奇怪的錯誤， 每當使用者開啟電腦的時候，Windows系統將要求使用者啟用 &lt;a href="http://www.590103.idv.tw/blog/archives/tag/windows-xp" class="st_tag internal_tag" rel="tag" title="Posts tagged with Windows XP"&gt;Windows XP&lt;/a&gt;或者 Windows Server 2003， 以前即使系統已經成功啟用。更糟糕的是， 如果為了再次啟用Windows而使用者回答『是』的話，系統就會顯示說Windows或者Server 已經被啟用，然後登出使用者的訊息。&lt;br /&gt;&lt;span id="more-6163"&gt;&lt;br /&gt;這 個問題發生原因，因為有個程式或者它的相關檔案(例如reset5.exe、reset5.dll、reset5.dat、reset5.dt *、reset5.bat、resetserver、resetpath、srvany.exe)去干擾 Windows啟用在這台電腦。 (備註︰Reset5是終端機服務重置工具) .&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span id="more-439"&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;以下的內容是微軟 &lt;a href="http://support.microsoft.com/kb/312295/en-us" target="_blank"&gt;KB312295&lt;/a&gt; 的說明，可依照指示進行修復的工作： .&lt;/p&gt; &lt;p&gt;&lt;strong&gt;步驟&lt;/strong&gt; &lt;strong&gt;1&lt;/strong&gt;&lt;strong&gt;：以安全模式開啟電腦&lt;/strong&gt;&lt;/p&gt; &lt;table border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top"&gt;1.&lt;/td&gt; &lt;td&gt;開啟電腦。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;2.&lt;/td&gt; &lt;td&gt;電腦執行了開機自我檢查 (POST) 後，重複按 F8，打開『&lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; 進階選項』功能表。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;3.&lt;/td&gt; &lt;td&gt;在『&lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; 進階選項』功能表上，用箭頭鍵選擇『安全模式』，然後按 Enter。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;4.&lt;/td&gt; &lt;td&gt;用箭頭鍵選擇要啟動的 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; 作業系統，然後按 Enter。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;5.&lt;/td&gt; &lt;td&gt;在電腦以安全模式執行時，用具備Administrator權限的帳號登入。然後，在指示 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; 正以安全模式執行的訊息方塊中按『是』。&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;strong&gt;步驟&lt;/strong&gt; &lt;strong&gt;2&lt;/strong&gt;&lt;strong&gt;：啟動註冊表編輯器&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;依次按『開始』和『執行』，輸入 regedit，然後按『確定』。&lt;/p&gt; &lt;p&gt;&lt;strong&gt;步驟&lt;/strong&gt; &lt;strong&gt;3&lt;/strong&gt;&lt;strong&gt;：刪除&lt;/strong&gt; &lt;strong&gt;RESETS&lt;/strong&gt; &lt;strong&gt;註冊表子項&lt;/strong&gt;&lt;/p&gt; &lt;table border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top"&gt;1.&lt;/td&gt; &lt;td&gt;在註冊表編輯器中，展開『我的電腦』，然後展開『HKEY_LOCAL_MACHINE』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;2.&lt;/td&gt; &lt;td&gt;展開『SOFTWARE』，然後展開『&lt;a href="http://www.590103.idv.tw/blog/archives/tag/microsoft" class="st_tag internal_tag" rel="tag" title="Posts tagged with Microsoft"&gt;Microsoft&lt;/a&gt;』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;3.&lt;/td&gt; &lt;td&gt;展開『&lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; NT』，然後展開『CurrentVersion』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;4.&lt;/td&gt; &lt;td&gt;展開『Winlogon』，然後展開『Notify』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;5.&lt;/td&gt; &lt;td&gt;在『Notify』下，右鍵按『RESETS』，然後按『刪除』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;6.&lt;/td&gt; &lt;td&gt;按『是』，確認刪除 RESETS 子項。 &lt;p&gt;&lt;strong&gt;注意&lt;/strong&gt;：不要退出註冊表編輯器。在『步驟 4：修改註冊表以停用 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt;』中必須使用註冊表編輯器。&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;strong&gt;步驟&lt;/strong&gt; &lt;strong&gt;4&lt;/strong&gt;&lt;strong&gt;：修改註冊表以停用&lt;/strong&gt; &lt;strong&gt;&lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt; &lt;table border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top"&gt;1.&lt;/td&gt; &lt;td&gt;在註冊表編輯器中，展開『我的電腦』，然後展開『HKEY_LOCAL_MACHINE』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;2.&lt;/td&gt; &lt;td&gt;展開『SOFTWARE』，然後展開『&lt;a href="http://www.590103.idv.tw/blog/archives/tag/microsoft" class="st_tag internal_tag" rel="tag" title="Posts tagged with Microsoft"&gt;Microsoft&lt;/a&gt;』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;3.&lt;/td&gt; &lt;td&gt;展開『&lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; NT』，然後展開『CurrentVersion』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;4.&lt;/td&gt; &lt;td&gt;在『CurrentVersion』下，按『WPAEvents』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;5.&lt;/td&gt; &lt;td&gt;在註冊表編輯器的右邊（主題區域）中，右鍵按『OOBETimer』，然後按『修改』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;6.&lt;/td&gt; &lt;td&gt;按並將指標置於『數值資料』框中。然後，修改『數值資料』框中顯示的任何字元。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;7.&lt;/td&gt; &lt;td&gt;按『確定』。 &lt;p&gt;&lt;strong&gt;注意&lt;/strong&gt;：此步驟將停用 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt;。&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;8.&lt;/td&gt; &lt;td&gt;退出註冊表編輯器。&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;strong&gt;步驟&lt;/strong&gt; &lt;strong&gt;5&lt;/strong&gt;&lt;strong&gt;：重命名受損的&lt;/strong&gt; &lt;strong&gt;&lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt;&lt;/strong&gt; &lt;strong&gt;啟動檔案&lt;/strong&gt;&lt;/p&gt; &lt;table border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top"&gt;1.&lt;/td&gt; &lt;td&gt;依次按『開始』和『執行』，輸入 cmd，然後按『確定』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;2.&lt;/td&gt; &lt;td&gt;在命令提示處，輸入以下命令並按 Enter：&lt;br /&gt;ren %windir%\system32\WPA.dbl wpa.old&lt;br /&gt;此命令將 WPA.dbl 檔重命名為 WPA.old。&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;strong&gt;步驟&lt;/strong&gt; &lt;strong&gt;6&lt;/strong&gt;&lt;strong&gt;：確定&lt;/strong&gt; &lt;strong&gt;CD&lt;/strong&gt; &lt;strong&gt;或&lt;/strong&gt; &lt;strong&gt;DVD&lt;/strong&gt; &lt;strong&gt;光碟機路徑&lt;/strong&gt;&lt;/p&gt; &lt;table border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top"&gt;1.&lt;/td&gt; &lt;td&gt;插入 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; CD。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;2.&lt;/td&gt; &lt;td&gt;按『開始』，然後按『我的電腦』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;3.&lt;/td&gt; &lt;td&gt;請注意出現在『有可移動存儲的設備』下的 CD 光碟機路徑或 DVD 光碟機路徑。在下一步中必須使用此光碟機路徑。&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;strong&gt;步驟&lt;/strong&gt; &lt;strong&gt;7&lt;/strong&gt;&lt;strong&gt;：取代受損的&lt;/strong&gt; &lt;strong&gt;&lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt;&lt;/strong&gt; &lt;strong&gt;啟動檔案&lt;/strong&gt;&lt;/p&gt; &lt;table border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top"&gt;1.&lt;/td&gt; &lt;td&gt;依次按『開始』和『執行』，輸入 cmd，然後按『確定』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;2.&lt;/td&gt; &lt;td&gt;在命令提示處，輸入以下命令並按 Enter：&lt;br /&gt;expand &lt;em&gt;drive&lt;/em&gt;:\i386\wpa.db_ %windir%\system32\wpa.dbl&lt;br /&gt;在此命令中，需用包含 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; CD 的光碟機的光碟機路徑取代 &lt;em&gt;drive&lt;/em&gt;。 &lt;p&gt;例如，如果 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; CD 位於光碟機 D 中，那麼該命令將如下所示：&lt;br /&gt;&lt;strong&gt;expand d:\i386\wpa.db_ %windir%\system32\wpa.dbl&lt;/strong&gt;&lt;br /&gt;此命令從 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; CD 中提取 Wpa.dbl 檔的副本。然後，將其置於 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; 安裝的 System32 資料夾中。&lt;/p&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;3.&lt;/td&gt; &lt;td&gt;檢查命令提示處出現的輸出結果。如果命令成功執行，則會顯示類似於以下內容的資訊：&lt;br /&gt;&lt;a href="http://www.590103.idv.tw/blog/archives/tag/microsoft" class="st_tag internal_tag" rel="tag" title="Posts tagged with Microsoft"&gt;Microsoft&lt;/a&gt; (R) File Expansion Utility Version 5.1.2600.0 Copyright (C) &lt;a href="http://www.590103.idv.tw/blog/archives/tag/microsoft" class="st_tag internal_tag" rel="tag" title="Posts tagged with Microsoft"&gt;Microsoft&lt;/a&gt; Corp 1990-1999. All rights reserved. Expanding d:\i386\wpa.db_ to c:\windows\system32\wpa.dbl. d:\i386\wpa.db_: 2222 bytes expanded to 2126 bytes, -5% increase.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;4.&lt;/td&gt; &lt;td&gt;輸入 exit，然後按 Enter 退出命令提示。&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;strong&gt;步驟&lt;/strong&gt; &lt;strong&gt;8&lt;/strong&gt;&lt;strong&gt;：刪除與程式相關的檔案&lt;/strong&gt;&lt;/p&gt; &lt;table border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top"&gt;1.&lt;/td&gt; &lt;td&gt;按『開始』，然後按『搜尋』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;2.&lt;/td&gt; &lt;td&gt;在『您要搜尋什麼』下，按『所有檔案和資料夾』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;3.&lt;/td&gt; &lt;td&gt;在『全部或部分檔案名稱』框中，輸入以下內容，然後按『搜尋』：&lt;br /&gt;reset5.exe; reset5.dll; reset5.dat; reset5.dt*; srvany.exe&lt;br /&gt;此操作將對以下所有檔案進行搜尋：&lt;br /&gt;&lt;table border="0" cellpadding="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;•&lt;/td&gt; &lt;td&gt;Reset5.exe&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;•&lt;/td&gt; &lt;td&gt;Reset5.dll&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;•&lt;/td&gt; &lt;td&gt;Reset5.dat&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;•&lt;/td&gt; &lt;td&gt;Reset5.dt*&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;•&lt;/td&gt; &lt;td&gt;Srvany.exe&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;strong&gt;請注意&lt;/strong&gt;：如果您使用其他搜尋工具，如 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; Desktop Search，則可以使用此工具來搜尋其中的各個檔案。&lt;/p&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;4.&lt;/td&gt; &lt;td&gt;在『搜尋結果』對話方塊的結果視窗中，右鍵按每個檔案，然後按『刪除』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;5.&lt;/td&gt; &lt;td&gt;按『是』，確認刪除檔。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;6.&lt;/td&gt; &lt;td&gt;在完成對這些檔的刪除後，退出『搜尋結果』對話方塊。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;7.&lt;/td&gt; &lt;td&gt;重新啟動電腦，並讓 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; 以正常模式重新啟動。&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;&lt;strong&gt;步驟&lt;/strong&gt; &lt;strong&gt;9&lt;/strong&gt;&lt;strong&gt;：重新啟動&lt;/strong&gt; &lt;strong&gt;&lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;   &lt;table border="0" cellpadding="0"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;td valign="top"&gt;1.&lt;/td&gt; &lt;td&gt;按『開始』，依次指向『所有程式』、『附屬應用程式』和『系統工具』，然後按『啟動 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt;』。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;2.&lt;/td&gt; &lt;td&gt;如果『&lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; 產品啟動精靈』提示啟動 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt;，則按精靈中的說明啟動 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt;。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;3.&lt;/td&gt; &lt;td&gt;重新啟動電腦，然後重複『步驟 9：重新啟動 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt;』的步驟 1，再次啟動『&lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; 產品啟動精靈』。執行此步驟，以確認精靈不會再提示啟動 &lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt;。&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;4.&lt;/td&gt; &lt;td&gt;如果『&lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; 產品啟動精靈』顯示『&lt;a href="http://www.590103.idv.tw/blog/" target="_blank"&gt;Windows&lt;/a&gt; 已啟動』訊息，則按『確定』退出精靈。&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-3890228770412785445?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/3890228770412785445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=3890228770412785445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/3890228770412785445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/3890228770412785445'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/09/windows-xp2003.html' title='修復Windows XP和2003在每次開機後都被提示要啟動的錯誤'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-8128477588041166658</id><published>2008-09-22T09:08:00.001-07:00</published><updated>2008-09-22T09:10:04.109-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='版本控管'/><category scheme='http://www.blogger.com/atom/ns#' term='軟體工程'/><title type='text'>Apache + Subversion + Trac 安裝配置設定三合一 (Ubuntu)</title><content type='html'>安裝 install apache&lt;br /&gt;=======================&lt;br /&gt;&lt;br /&gt;$ sudo apt-get install apache2&lt;br /&gt;&lt;br /&gt;安裝 install subversion&lt;br /&gt;=======================&lt;br /&gt;&lt;br /&gt;$ sudo apt-get install subversion&lt;br /&gt;&lt;br /&gt;$ sudo apt-get install libapache2-svn&lt;br /&gt;&lt;br /&gt;設定 Confiigure subversion&lt;br /&gt;--------------------------&lt;br /&gt;&lt;br /&gt;Enter menu system/management/user_and_group&lt;br /&gt;&lt;br /&gt;change to group tab, add atwo new group named "www-data"(apache) and "subversion"&lt;br /&gt;then add user [your account] and "www-data" to "subversion"'s group members.&lt;br /&gt;&lt;br /&gt;or use command instead::&lt;br /&gt;&lt;br /&gt;$ sudo adduser www-data subversion&lt;br /&gt;$ sudo adduser [your account] subversion&lt;br /&gt;&lt;br /&gt;Then we could create svn repository::&lt;br /&gt;&lt;br /&gt;$ sudo svnadmin create /home/svn  (or $ sudo svnadmin /usr/local/svn)&lt;br /&gt;&lt;br /&gt;Then Change the folder owner&lt;br /&gt;&lt;br /&gt;$ sudo chown -R www-data:www-data /home/svn&lt;br /&gt;$ sudo chmod -R g+ws /home/svn&lt;br /&gt;&lt;br /&gt;Setup apache host site&lt;br /&gt;$ sudo gedit /etc/apache2/mods-enabled/dav_svn.conf&lt;br /&gt;&lt;br /&gt;uncomment following lines:&lt;br /&gt;&lt;pre&gt;[Location /svn]&lt;br /&gt;DAV svn&lt;br /&gt;SVNPath /home/svn&lt;br /&gt;AuthType Basic&lt;br /&gt;AuthName "Subversion Repository"&lt;br /&gt;AuthUserFile /etc/subversion/passwd&lt;br /&gt;[/Location]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;or add following just above the /location:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  [LimitExcept GET PROPFIND OPTIONS REPORT]&lt;br /&gt;  Require valid-user&lt;br /&gt;  [/LimitExcept]&lt;br /&gt;&lt;/pre&gt;為 subversion 存取加上密碼:&lt;br /&gt;&lt;br /&gt;sudo htpasswd -c /etc/subversion/passwd user_name&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;重開 apache:&lt;br /&gt;&lt;br /&gt;sudo /etc/init.d/apache2 restart&lt;br /&gt;&lt;br /&gt;驗證能取得 svn 檔案:&lt;br /&gt;&lt;br /&gt;$ svn co http://hostname/svn/myproject myproject --username user_name&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;安裝 Install Trac&lt;br /&gt;================&lt;br /&gt;&lt;br /&gt;$ sudo apt-get install trac&lt;br /&gt;&lt;br /&gt;$ sudo mkdir /home/trac&lt;br /&gt;$ sudo chown www-data:www-data /home/trac&lt;br /&gt;&lt;br /&gt;To add a virtual host to host trac:&lt;br /&gt;&lt;br /&gt;$ sudo gedit /etc/apache2/sites-available/trac&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;/span&gt;[VirtualHost *]&lt;br /&gt;   ServerAdmin webmaster@localhost&lt;br /&gt;   ServerName trac.example.com&lt;br /&gt;   DocumentRoot /usr/share/trac/cgi-bin/&lt;br /&gt;   [Directory /usr/share/trac/cgi-bin/]&lt;br /&gt;           Options Indexes FollowSymLinks MultiViews ExecCGI&lt;br /&gt;           AllowOverride All&lt;br /&gt;           Order allow,deny&lt;br /&gt;           allow from all&lt;br /&gt;   [/Directory]&lt;br /&gt;   Alias /trac "/usr/share/trac/htdocs"&lt;br /&gt;&lt;br /&gt;   [Location /]&lt;br /&gt;           SetHandler mod_python&lt;br /&gt;           PythonHandler trac.web.modpython_frontend&lt;br /&gt;           PythonOption TracEnvParentDir /home/trac&lt;br /&gt;           #PythonOption TracEnv /home/trac/singletrac&lt;br /&gt;           PythonOption TracUriRoot /&lt;br /&gt;   [/Location]&lt;br /&gt;&lt;br /&gt;   DirectoryIndex trac.cgi&lt;br /&gt;   ErrorLog /var/log/apache2/error.trac.log&lt;br /&gt;   CustomLog /var/log/apache2/access.trac.log combined&lt;br /&gt;&lt;br /&gt;[/VirtualHost]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Uncomment the AddHandler line in /etc/apache2/apache2.conf so that the Trac CGI program will be executed:&lt;br /&gt;&lt;br /&gt;# To use CGI scripts outside /cgi-bin/:&lt;br /&gt;#&lt;br /&gt;AddHandler cgi-script .cgi&lt;br /&gt;&lt;br /&gt;Disable the default virtualhost, enable the Trac virtualhost, and restart Apache2:&lt;br /&gt;&lt;br /&gt;sudo a2dissite default&lt;br /&gt;sudo a2ensite trac&lt;br /&gt;sudo  /etc/init.d/apache2 reload&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Make New Trac Project expose to web&lt;br /&gt;===================================&lt;br /&gt;&lt;br /&gt;sudo trac-admin /home/trac/YourProjectNameHere initenv&lt;br /&gt;&lt;br /&gt;Then the interactive interface was prompt:&lt;br /&gt;[specify the repository to /home/svn/YourProjectNameHere]&lt;br /&gt;&lt;br /&gt;sudo chown -R www-data /home/trac/YourProjectNameHere&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Refer to&lt;br /&gt;http://trac.edgewall.org/wiki/TracOnUbuntu&lt;br /&gt;http://trac.edgewall.org/wiki/TracModPython&lt;br /&gt;http://www.blendedtechnologies.com/setting-up-subversion-on-ubuntu/11&lt;br /&gt;http://philipatswarchy.wordpress.com/2006/11/27/apachesslsubversionpam/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-8128477588041166658?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/8128477588041166658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=8128477588041166658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8128477588041166658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8128477588041166658'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/09/apache-subversion-trac-ubuntu.html' title='Apache + Subversion + Trac 安裝配置設定三合一 (Ubuntu)'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-8046690052152972800</id><published>2008-09-20T19:55:00.000-07:00</published><updated>2008-11-09T05:51:50.108-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><title type='text'>用VMWare開雙視窗玩3D遊戲</title><content type='html'>這個設定只適用在 VMWare Workstation 版本&lt;br /&gt;&lt;br /&gt;1.切換到存放XP虛擬電腦檔案的資料夾，然後找到「Windows XP Professional.vmx」個檔案，這時用記事本或其他純文字編輯程式來開啟它。&lt;br /&gt;&lt;br /&gt;2.開啟後捲動頁面到最下方，輸入「mks.enable3d = TRUE」、「svga.vramSize = 67108864」、「vmmouse.present = FALSE」三行，輸入完畢就可以存檔關閉。&lt;br /&gt;&lt;br /&gt;3.回到VMWare，按下功能表上的【Edit】→【Preferences】叫出設定對話盒，再點選〔Input〕分頁標籤，取消勾選「Ungrab when cursor leaves window」，然後按下〔OK〕關閉對話盒。&lt;br /&gt;&lt;br /&gt;4.接下來啟動虛擬XP，啟動完畢後按下鍵盤上「Ctrl」+「Alt」鍵回到VMWare主畫面，然後按下功能表上的【VM】→【Install VMware Tools】再按下〔Install〕安裝VMWare工具組，安裝完畢後讓虛擬XP重新開機。&lt;br /&gt;&lt;br /&gt;5.最後用虛擬XP連線到「 http://tinyurl.com/5xosf 」下載DirectX回來安裝，然後按下「開始」→「執行」並輸入「DXDiag」，切換到〔顯示〕標籤分頁，看見「Direct3D加速」部份顯示「已 啟用」，就表示虛擬3D顯示卡已經設定成功了。&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-8046690052152972800?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/8046690052152972800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=8046690052152972800' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8046690052152972800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/8046690052152972800'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/09/vmware3d.html' title='用VMWare開雙視窗玩3D遊戲'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-7820040192018091984</id><published>2008-09-14T10:21:00.001-07:00</published><updated>2008-09-14T10:21:56.563-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='資料庫'/><title type='text'>在 linux (ubuntu) 裝 oracle xe</title><content type='html'>First modify /etc/apt/sources.list file:&lt;br /&gt;&lt;code&gt;$ sudo vi /etc/apt/sources.list&lt;/code&gt;&lt;br /&gt;Append following line:&lt;br /&gt;&lt;code&gt;deb http://oss.oracle.com/debian unstable main non-free&lt;/code&gt;&lt;br /&gt;Save and close the file.  Next import GPG key:&lt;br /&gt;&lt;code&gt;$ wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O- | sudo apt-key add - &lt;/code&gt;&lt;br /&gt;Update package database:&lt;br /&gt;&lt;code&gt;$ sudo apt-get update&lt;/code&gt;&lt;br /&gt;Finally install Oracle:&lt;br /&gt;&lt;code&gt;$ sudo apt-get install oracle-xe&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;You must configure Oracle TCP/IP port and other parameters. Simply type the following command:&lt;br /&gt;&lt;code&gt;$ sudo /etc/init.d/oracle-xe configure&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;p&gt;To access the Database Home Page go to http://127.0.0.1:8080/apex. Open a web browser and type url (you need to use username 「&lt;span style="color: rgb(153, 102, 51);"&gt;system&lt;/span&gt;」 and password setup earlier)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-7820040192018091984?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/7820040192018091984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=7820040192018091984' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7820040192018091984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/7820040192018091984'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/09/linux-ubuntu-oracle-xe.html' title='在 linux (ubuntu) 裝 oracle xe'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6429839571819717060</id><published>2008-08-27T10:07:00.000-07:00</published><updated>2008-08-27T10:18:04.672-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='軟體工程'/><title type='text'>如何寫 Beautiful code</title><content type='html'>剛剛讀了一篇文章，發現跟我的想法不謀而合，因此抓下來供自己或參觀我的 blog 參考&lt;br /&gt;所謂 beautiful code 並不是要證明寫的 code 很厲害確難懂，而是清楚易懂又有效率&lt;br /&gt;不易懂的 code 讓自己或別人無法輕易理解及重複使用&lt;br /&gt;&lt;br /&gt;Class.forName for Methos.invoke 等是我最不建議使用，因為用了 System level 的呼叫方式&lt;br /&gt;這些方式通常屬於較底層的寫法，用在平常開發 Web Application 則顯得格格不入&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Beautiful Coding - The way to life.&lt;/h2&gt;           &lt;div class="snap_preview"&gt;&lt;p&gt;I often have to fix other people’s code. You can tell coders who have been coding for years simply by the feel of their code.&lt;/p&gt; &lt;p&gt;One of the problems with java is the simple fact that you can end up with a spaghetti-junction of objects all calling, calling back, implementing, sub classing, overriding, running ejb’s etc etc and it can be a bit of a nightmare to find your way through.&lt;/p&gt; &lt;p&gt;The key here (although you can reverse engineer into a UML Model with Netbeans) is really in the way that the code is written.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Things I do to make code more readable&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;- Initials of variables&lt;/p&gt; &lt;p&gt;All my strings for instance start with s - sName, sUsername&lt;br /&gt;integers I , iCount, iGold&lt;br /&gt;doubles d&lt;/p&gt; &lt;p&gt;and so on for different types of variables or objects.&lt;/p&gt; &lt;p&gt;Components on forms I use a 3 letter start up.&lt;/p&gt; &lt;p&gt;txtTEXTBOX&lt;br /&gt;lblLABEL&lt;br /&gt;stcSTATICTEXT&lt;br /&gt;cmbCOMBOBOX&lt;/p&gt; &lt;p&gt;Also in the code using the java doc function, within Netbeans if you type /** enter it will auto document the next function and you just “fill in the blanks”, javaDoc is fantastic and well worth looking into. If you have “java doced” your code, not only does Netbeans pick up the documentation when you are typing or using your own functions but also you can generate a website that documents your classes!!! How Call&lt;/p&gt; &lt;p&gt;ALT-SHIFT-F - auto format your code, very useful.&lt;/p&gt; &lt;p&gt;Comment long bracketed loops. I always put // from  next to a bracketed loop  that is too long to see in one screen. e.g.&lt;/p&gt; &lt;pre&gt;for (int iCount=0;iCount&lt;10;++icount)&gt; &lt;p&gt;Also comment all calls to EJB’s to say what they do -&lt;/p&gt; &lt;p&gt;// Get this job’s History&lt;br /&gt;JobManagerBean.getHistory(sJobNumber);&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Beautiful Code!&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Lisp programmers write beautiuful code, why? Because you have to, it becomes unreadable otherwise. In a way I wish all programmers would learn Lisp - because it makes you think in a different way and see software development from an almost etherial height. When I get some further research time I want to work on a lisp implementation for netbeans.&lt;/p&gt; &lt;p&gt;Remember that you will not be around forever, don’t punish the next poor programmer who has to work on your code. I like my code to be really easy to read and understand.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Code Rewriting&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;You know that sometimes I will rewrite a whole subroutine if I’m not happy with it. Programmers are artists, the difference is that the result of our art is a system for people to use or some form of output. Well written, neat, fast, efficient code means happy users and that is the caling of a programmer, to make the lives of the users easier.&lt;/p&gt; &lt;p&gt;If your software makes it harder. It needs rewriting, or maybe replacing with a pen and paper.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Be passionate about your coding and your users will be passionate about your software.&lt;/strong&gt;&lt;/p&gt; &lt;div style="margin-top: 1em;" class="possibly-related"&gt;&lt;hr /&gt;&lt;p&gt;&lt;strong&gt;Possibly related posts: (automatically generated)&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a rel="related" href="http://abepralle.wordpress.com/2008/06/25/on-reinventing-the-wheel/"&gt;On reinventing the wheel&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a rel="related" href="http://oohbegitu.wordpress.com/2007/08/09/simple-logic-of-setting-true-or-false-from-a-boolean-value/"&gt;simple logic of setting true or false from a boolean value&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a rel="related" href="http://aurolive.wordpress.com/2007/10/25/the-programming-paradigm-needs-an-update/"&gt;The programming paradigm needs an update&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;出處 :&lt;span style="font-size:100%;"&gt;&lt;a href="http://netbeansboy.com/2008/08/27/beautiful-coding-the-way-to-life/" rel="bookmark" title="Permanent Link: Beautiful Coding - The way to life."&gt; Beautiful Coding - The way to life.&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6429839571819717060?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6429839571819717060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6429839571819717060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6429839571819717060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6429839571819717060'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/08/beautiful-code.html' title='如何寫 Beautiful code'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-2350506890836380126</id><published>2008-08-21T07:45:00.000-07:00</published><updated>2008-08-21T07:47:29.094-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='軟體工程'/><title type='text'>每個 team 都該裝個 Wiki</title><content type='html'>&lt;p&gt;自從裡裝了個 JSPWiki 之後，開始把一些日常的資源往上面丟，做些小整理。試用一陣子之後，發現用 Wiki 整理文件真的超快，語法簡單，資料的相互連結打幾個字就搞定。也不用怕寫的不好，有問題直接改就行了。完全無痛 !! 總算是讓我這個 "死也不寫文件" 的人寫文件寫的心甘情願~~&lt;/p&gt; &lt;p&gt;喔... 我們不是拿來寫軟體規格書，還是啥 SA/SD 文件。主要是收集如何安裝、如何 deploy、或是一些開發的設定、像是 eclipse、資料庫... 等等資料。這些東西並不是每天在做，偶而才做一次而已 (例如新人報到，或是重灌電腦)，因此很容易忘記，常常翻箱倒櫃亂找，找的滿頭大汗還不見得找得回來... 用 wiki 來整理這些資料再適合不過了，真恨自己以前不懂的用這個工具~~&lt;/p&gt; &lt;h4&gt;一些我們 wiki 的截圖：&lt;/h4&gt;  &lt;p&gt;首頁設計成提供快速的常用連結&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div&gt; &lt;a href="http://www.flickr.com/photos/xexex/126254511/" title="Photo Sharing"&gt;&lt;img src="http://static.flickr.com/51/126254511_709ce380d4_o.png" alt="home" width="772" height="429" /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;Eclipse 的相關設定&lt;/p&gt; &lt;div&gt;&lt;a href="http://www.flickr.com/photos/xexex/126256526/" title="Photo Sharing"&gt;&lt;img src="http://static.flickr.com/54/126256526_f119a0ad2a_o.png" alt="eclipse" width="741" height="516" /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;常用的 API 連結&lt;/p&gt; &lt;div&gt; &lt;a href="http://www.flickr.com/photos/xexex/126254514/" title="Photo Sharing"&gt;&lt;img src="http://static.flickr.com/50/126254514_fd6888078a_o.png" alt="api" width="726" height="526" /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;Project 的資料&lt;/p&gt; &lt;div&gt; &lt;a href="http://www.flickr.com/photos/xexex/126254513/" title="Photo Sharing"&gt;&lt;img src="http://static.flickr.com/51/126254513_0fc8fc79c8_o.png" alt="project" width="654" height="556" /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;收集一些對開發有益的文件&lt;/p&gt; &lt;div&gt;&lt;a href="http://www.flickr.com/photos/xexex/126254512/" title="Photo Sharing"&gt;&lt;img src="http://static.flickr.com/52/126254512_f6401fa8fe_o.png" alt="howto" width="777" height="532" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;source : &lt;a href="http://www.javaworld.com.tw/roller/ingramchen/entry/2006_4_10_WikiForEveryTeam"&gt;每個 team 都該裝個 Wiki&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-2350506890836380126?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/2350506890836380126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=2350506890836380126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2350506890836380126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2350506890836380126'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/08/team-wiki.html' title='每個 team 都該裝個 Wiki'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6268007249372703853</id><published>2008-08-20T18:49:00.000-07:00</published><updated>2008-08-20T19:26:15.263-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='軟體工程'/><title type='text'>有關軟體開發流程</title><content type='html'>&lt;a name="4186308528639573237"&gt;&lt;/a&gt;最近發現 Netbeans 的內部人員發表了在 Netbeans IDE 開發時的流程，這也是我一直想要推動及執行的。&lt;br /&gt;唯有如此做，在台灣的軟體開發才能漸漸的上軌道。&lt;br /&gt;&lt;br /&gt;I have worked on a lot of large software projects in the 17+ years I have been in the industry, and I don't say it lightly that I think NetBeans has one of the best development processes I've ever seen.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;I've been on (and seen) projects that were so overburdened with processes and documents that it was like walking through a lake of molasses.&lt;br /&gt;&lt;br /&gt;I've also been on (and seen) projects where there was so little process that life was exciting, interesting, crazy, but basically one chaotic scramble after another.&lt;br /&gt;&lt;br /&gt;NetBeans follow a beautiful middle path - not too much process, but not too little. I'm sure I'm missing a lot of important points and aspects that make this all fall together, but these are the ones that stand out to me:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Planning&lt;/span&gt;&lt;br /&gt;The planning phase is fast and lightweight. Each release is given a release boss, and the release boss works to define a theme for the release. The release boss also decides on the dates for milestones and the final release. Then each team is asked to decide what features they feel best meet the theme, and for what milestones those features will be delivered.&lt;br /&gt;&lt;br /&gt;Normally the feature list is &lt;a href="http://wiki.netbeans.org/DatabaseFeaturesForNB65"&gt;written up quickly on a Wiki page&lt;/a&gt;.  Each feature is given an issue number in Issuezilla and is assigned a person who owns it and a milestone date.&lt;br /&gt;&lt;br /&gt;The release boss uses reporting features in Issuezilla to track all of the features committed for a given milestone, and you have the plan. Pretty simple. We all know what to do, and when we have to do it by, and we get to work.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Specification and Design&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You are expected to specify the user experience and interface for your features. But it's in a very lightweight manner, on a Wiki page. &lt;a href="http://wiki.netbeans.org/NewConnectionDialogSpec"&gt;Here is an example UI Spec that I wrote&lt;/a&gt;.  Pretty simple, but it gets the point across.&lt;br /&gt;&lt;br /&gt;Certain defining features get a lot of attention and are reviewed carefully by our User Experience team, but for most smaller features you just need to write up a quick spec, have it reviewed by your team, and you are done.&lt;br /&gt;&lt;span class="zemanta-img" style="margin: 1em; float: right; display: block; font-weight: bold;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Image:Mile_Stone_Horsham_St_Faiths_25th_Oct_2007.JPG"&gt;&lt;img src="http://upload.wikimedia.org/wikipedia/en/thumb/b/b5/Mile_Stone_Horsham_St_Faiths_25th_Oct_2007.JPG/202px-Mile_Stone_Horsham_St_Faiths_25th_Oct_2007.JPG" alt="A milestone on the A140 in Horsham St." style="border: medium none ; display: block;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://wiki.netbeans.org/NB65Milestones"&gt;&lt;span style="font-weight: bold;"&gt;Milestones&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;I love milestones. I think every large team should have milestones. Basically these are a mini-release, where everyone has to get features in by a certain date, there is a stabilization period with extended QA and bugs are fixed, and then it gets &lt;a href="http://bits.netbeans.org/download/6.5/m1/"&gt;published on the NetBeans site&lt;/a&gt;.  Milestones normally happen about once every 4-6 weeks.&lt;br /&gt;&lt;br /&gt;The main reason why I like these as a developer is because it keeps me focused. A six month development cycle tends to make you be lazy early on in the cycle. With milestones coming at you once a month, you get very focused, and you are working hard all the way through the release, instead of working insanely at the end. This also means that it is much more likely that we deliver on time, or if we're late, we know sooner rather than later. And what I have seen is that NetBeans has consistently delivered what we say we deliver, when we say we're going to deliver it. There is a lot behind this, but milestones are a key part of this.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Simple, Strong Quality Criteria&lt;/span&gt;&lt;br /&gt;Every release has &lt;a href="http://wiki.netbeans.org/NB65QualityCriteria"&gt;quality criteria&lt;/a&gt;. These are soft and hard goals in terms of the number of P1, P2 and P3 bugs. There is a total overall goal, and each team is also assigned specific goals. For some reason a lot of projects I have been on have not been that strict about this, and it has affected the quality of their product&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bits.netbeans.org/dev/nightly/latest/"&gt;&lt;span style="font-weight: bold;"&gt;Nightly Builds Available to the Community&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;What this means is everybody is using our stuff all the time, all the way through the release process, and we hear from them. I think this is great. More and more projects are doing this, and I really can't recommend it highly enough. And if you don't know about &lt;a href="https://hudson.dev.java.net/"&gt;Hudson&lt;/a&gt;, you really should check it out.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Team&lt;/span&gt;&lt;br /&gt;This is a lot harder to reproduce, but as usual is a key part of it.&lt;br /&gt;&lt;br /&gt;The theme running through this all of this and a thousand more details and steps, is a dedication to quality and predictability, without overburdening the teams with process and busywork. It's a difficult balance, and it's executed quite well here.&lt;br /&gt;&lt;br /&gt;So I think that is probably the underpinning of why NetBeans development process rock: the team. From developers to management to QE to release engineering, I have never seen such a smart, dedicated, hardworking group of folks. I am really honored to work with them.&lt;/p&gt;&lt;p&gt;Source : &lt;span style="font-size:100%;"&gt;&lt;a href="http://davidvancouvering.blogspot.com/2008/08/netbeans-development-process-rocks.html"&gt;NetBeans development process rocks!&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-6268007249372703853?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/6268007249372703853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=6268007249372703853' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6268007249372703853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/6268007249372703853'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/08/netbeans-development-process-rocks.html' title='有關軟體開發流程'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-634530570721679593</id><published>2008-08-19T11:31:00.001-07:00</published><updated>2008-08-19T11:31:58.876-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='冷笑話'/><title type='text'>全國墊紙 救甘興?</title><content type='html'>在「赤壁」這部片中，還有一個人物也很特別，&lt;div dir="ltr"&gt;&lt;wbr&gt;是由日本人中村獅童所飾演的「甘興」，&lt;br /&gt;不過根據史書記載，吳國有甘寧這個猛將，但卻查不到甘興這個人…&lt;br /&gt;&lt;br /&gt;後來網友展現了可怕的情報能力，&lt;wbr&gt;才讓我們知道甘興到底是何許人物，而且還是&lt;br /&gt;我們早就熟悉的人物，故事是這樣的…資料來源－－&lt;wbr&gt;網路路透社消息）&lt;br /&gt;&lt;br /&gt;甘興是孫權旁邊一個侍衛，平時盡忠職守，也深得周瑜的喜愛，&lt;wbr&gt;有一天，甘興在&lt;br /&gt;孫權的桌子上割東西時，因為沒有墊東西，所以刀子力透紙背，&lt;wbr&gt;割壞了孫權的愛&lt;br /&gt; 桌，孫權非常的生氣，正當要將甘興拖出去斬了的時候…&lt;br /&gt;&lt;br /&gt;周瑜特別為甘興求情，他向孫權深明大義，&lt;wbr&gt;叫孫權不可為了區區一張桌子而殺害&lt;br /&gt;一位忠臣，孫權最後接受了周瑜的求情，但還是憤恨難平。&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;周瑜為了讓孫權消消火氣，便向全國宣告，日後在桌子上割東西，&lt;wbr&gt;都要先墊紙保&lt;br /&gt;護桌子，才不會造成像孫權愛桌被割的憾事，&lt;wbr&gt;而這個佈告獲得全國的響應，也使&lt;br /&gt;得孫權最後心情平緩，原諒了甘興…&lt;br /&gt;&lt;br /&gt; 這就是…&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:6;"&gt;「全國墊紙 救甘興」&lt;/span&gt;&lt;br /&gt;(全國電子...就感心~~~ =.=|| ) 快被冷死了啦... &lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-634530570721679593?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/634530570721679593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=634530570721679593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/634530570721679593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/634530570721679593'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/08/blog-post_19.html' title='全國墊紙 救甘興?'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-3013121910657005920</id><published>2008-08-19T11:15:00.000-07:00</published><updated>2008-08-19T11:20:25.015-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='文章分享'/><title type='text'>對別人好 就是快樂</title><content type='html'>來源 :&lt;span style="font-size:85%;"&gt;&lt;a href="http://www.ithome.com.tw/plog/index.php?op=ViewArticle&amp;amp;articleId=19141&amp;amp;blogId=1035"&gt;對別人好 就是快樂&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt; &lt;p&gt;對別人好.就是快樂 &lt;/p&gt;&lt;p&gt;要看完ㄛ..&lt;/p&gt;&lt;p&gt;有意思的文章!&lt;/p&gt;對別人好.就是快樂&lt;br /&gt;&lt;p&gt;&lt;br /&gt;某天，小張要去相親，因為沒有看過對方，擔心她長得太醜，&lt;br /&gt;於是交代朋友，十分鐘後 call他的手機，這樣他就可以藉機遁逃。&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;主人說：&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;『我是想做味道更香更可口的菜給您吃，&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;自食惡果的事說都說不完，讓我們再聽下面的故事：&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;我聽說從前有個人，他很不喜歡喝咖啡，&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;有一天，她的太太認識了另一個男人，&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;套句詩人奧登（ W.H.Auden）的話：&lt;br /&gt;『人受惡意之作弄，必作惡以回報。』&lt;br /&gt;如果你陷害別人，哪天你也會遭人陷害。&lt;br /&gt;&lt;/p&gt;&lt;p&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;&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;　&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;《凡你對別人所做的，就是對自己所做的。》&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;『我對別人好，其實是為自己好。&lt;br /&gt;風吹著花粉四處飛散，如果鄰家播種的是次等的種籽，&lt;br /&gt;在傳粉的過程中，自然會影響我的玉米品質。&lt;br /&gt;因此，我很樂意其他農友都播種同一優良品種。』&lt;br /&gt;&lt;br /&gt;他的話看似簡單卻深富哲理，凡你對別人所做的，就是對自己所做的。&lt;br /&gt;所以，&lt;strong&gt;&lt;span style="font-size:130%;"&gt;凡事你希望自己得到的，你必須先讓別人得到&lt;/span&gt;&lt;/strong&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;&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;《己所欲，施於人。》&lt;br /&gt;凡你想給予自己的經驗，就給予別人；&lt;br /&gt;想別人怎麼對你，就怎麼對待別人。&lt;br /&gt;感恩過去… 把握當下… 創造未來… &lt;/p&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-3013121910657005920?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/3013121910657005920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=3013121910657005920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/3013121910657005920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/3013121910657005920'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/08/blog-post.html' title='對別人好 就是快樂'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-1948474547817166400</id><published>2008-08-14T10:10:00.000-07:00</published><updated>2008-08-15T07:00:27.784-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><title type='text'>如何擴充 VMware 虛擬磁碟及作業系統容量</title><content type='html'>企業為了節省成本及空間，在內部系統的規劃上漸漸的都以虛擬機器(VM)取代&lt;br /&gt;在一部裝滿 8G RAM 的 PC 上，可以規劃出 5-6 VM 使用，的確可以替企業省不少成本&lt;br /&gt;&lt;br /&gt;在 VM 的領域上，又以 &lt;a href="http://www.vmware.com/"&gt;VMWare&lt;/a&gt; 最為有名。而其下的 VMWare Server 因是免費的，許多企業便運用 VMWare Server 的免費及便利性，規劃內部系統的建置及測試。&lt;br /&gt;&lt;br /&gt;尤其是在測試方面，因可以規劃成獨立的空間作測試，將來在備份及還原時只要一個檔便可解決不用作 Ghost 或是重新安裝的繁雜動作&lt;br /&gt;&lt;br /&gt;在建立一個 VM 時，VMWare 預設的空間是 8GB，所以一般建立時都會直接用此預設值但在特殊情況下 (如模擬正式環境的機器)，8GB 的空間就顯得不足&lt;br /&gt;&lt;br /&gt;在此情況下，有兩種作法&lt;br /&gt;1. 再加上一個虛擬硬碟，但此方法無法避免原來的虛擬硬碟爆掉&lt;br /&gt;2. 將原來的虛擬硬碟容量加大&lt;br /&gt;&lt;br /&gt;在此就介紹如何加大原來的虛擬硬碟及作業系統的容量 (以 Windows 2003 server 為例 )&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;step 1. &lt;/span&gt;&lt;/span&gt;複製原來的虛擬硬碟成為第二顆硬碟，並掛到原來的 VM 中。複製的檔名如下&lt;br /&gt;c:\Virtual Machines\Windows Server 2003 Standard Edition\Windows Server 2003 Standard Edition_1.vmdk&lt;br /&gt;PS : 檔名不能有中文名稱，因為 VMWare 不支援&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);font-size:180%;" &gt;step 2.&lt;/span&gt; 利用 VMWare 提供的工具先將第二顆虛擬硬碟加大&lt;br /&gt;以下為原來 VM 的 size 為 8GB&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/SKRs8fduUuI/AAAAAAAAAC0/fjXu8q7mX4A/s1600-h/1.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/SKRs8fduUuI/AAAAAAAAAC0/fjXu8q7mX4A/s320/1.gif" alt="" id="BLOGGER_PHOTO_ID_5234428453405479650" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;執行以下指令後 (以我的環境為例)&lt;br /&gt;C:\Program Files\VMware\VMware Server&gt;vmware-vdiskmanager.exe -x 16Gb "c:\Virtual Machines\Windows Server 2003 Standard Edition\Windows Server 2003 Standard Edition_1.vmdk"&lt;br /&gt;&lt;br /&gt;可以透過 DOS box 看見虛擬硬碟容量逐漸加大中&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_i9YOUbw9_84/SKWA8cCr7rI/AAAAAAAAAD8/6NPaoUjehU4/s1600-h/2-1.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://4.bp.blogspot.com/_i9YOUbw9_84/SKWA8cCr7rI/AAAAAAAAAD8/6NPaoUjehU4/s400/2-1.gif" alt="" id="BLOGGER_PHOTO_ID_5234731917696036530" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;執行完後，可以發現虛擬硬碟容量已經變大了&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/SKUy_0_-gXI/AAAAAAAAADU/eFUQ-x4MIDg/s1600-h/2-1.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/SKUy_0_-gXI/AAAAAAAAADU/eFUQ-x4MIDg/s400/2-1.gif" alt="" id="BLOGGER_PHOTO_ID_5234646214028198258" border="0" /&gt;&lt;/a&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;要如此做的原因是因為若要將硬碟上的作業系統容量作擴充但還要保留原來的內容，則必須將此硬碟掛為 D 磁碟，因為 C 磁碟是開機磁碟，作業系統會鎖住無法作立即擴充&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);font-size:180%;" &gt;step 3.&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;/span&gt;將 VM 開機並將原來的 D 碟 8GB 容量擴充為 16GB 容量&lt;br /&gt;因為掛上 VM 後，D碟 (我的虛擬硬碟為 F) 的邏輯磁碟只有 8 GB，若要擴充為 16GB，則可以藉由 Windows 2003 內建的工具 Diskpart 完成。原來邏輯的只有 8GB&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_i9YOUbw9_84/SKU1m8tFjcI/AAAAAAAAADc/AMpPM34CfVY/s1600-h/3-1.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://4.bp.blogspot.com/_i9YOUbw9_84/SKU1m8tFjcI/AAAAAAAAADc/AMpPM34CfVY/s400/3-1.gif" alt="" id="BLOGGER_PHOTO_ID_5234649085134605762" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;進入 VM 後，透過 dos command 指令將 D 碟擴充為 16GB&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_i9YOUbw9_84/SKU3nbZx-OI/AAAAAAAAADk/loi8PxxFwko/s1600-h/3-2.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_i9YOUbw9_84/SKU3nbZx-OI/AAAAAAAAADk/loi8PxxFwko/s400/3-2.gif" alt="" id="BLOGGER_PHOTO_ID_5234651292398385378" border="0" /&gt;&lt;/a&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;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/SKU38SXwlHI/AAAAAAAAADs/yAH6J8I0pjM/s1600-h/3-3.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/SKU38SXwlHI/AAAAAAAAADs/yAH6J8I0pjM/s400/3-3.gif" alt="" id="BLOGGER_PHOTO_ID_5234651650751239282" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);font-size:180%;" &gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;step 4. &lt;/span&gt;接下來就需要一點小技巧。為了將原來的 C 碟系統擴充為 16GB，又因為 D 碟是複製 C 碟又可以開機，那要如何做呢? 沒錯，將 VM 關機後，移除原來的虛擬磁碟，再將 _1.vmdk 改為原來虛擬磁碟的檔名，然後再將 VM 重新開機後，可以看到，C 碟可開機且容量變為 16GB&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_i9YOUbw9_84/SKWCboWPaxI/AAAAAAAAAEE/8cdZEiOcRuc/s1600-h/4-1.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_i9YOUbw9_84/SKWCboWPaxI/AAAAAAAAAEE/8cdZEiOcRuc/s400/4-1.gif" alt="" id="BLOGGER_PHOTO_ID_5234733553086851858" border="0" /&gt;&lt;/a&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;要把虛擬硬碟容量改為多少，端看實際運用。一般而言，8GB 應該足夠，若需加大便可以用此技巧加大虛擬硬碟容量並無需再重新安裝 Windows 2003&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-1948474547817166400?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/1948474547817166400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=1948474547817166400' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1948474547817166400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/1948474547817166400'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/08/vmware.html' title='如何擴充 VMware 虛擬磁碟及作業系統容量'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_i9YOUbw9_84/SKRs8fduUuI/AAAAAAAAAC0/fjXu8q7mX4A/s72-c/1.gif' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-2315739223282913927</id><published>2008-06-22T06:44:00.000-07:00</published><updated>2008-08-15T06:47:00.355-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='系統相關'/><title type='text'>網頁 Usability</title><content type='html'>網頁應用程式 Usability 筆記&lt;br /&gt;&lt;br /&gt;原則一：思考服務的對象&lt;br /&gt;&lt;br /&gt;首先要先了解你的用戶是哪一種類型：若按用戶功力可分為 end user 和 power user。若按網頁使用頻率來分，可分為例行性作業和一次性作業。用例子說明好了，比方說大家熟悉的購物網站，包含產品瀏覽、購物車、下單等等功能。首先，這類網站的使用者功力大多屬於 end user，因此介面上越簡單越好 (即使你有很好的創意，也要小心發揮，因為 end user 可能會看不懂你新穎的介面)。若從使用頻率來看，產品瀏覽屬於例行性作業，下單則屬於一次性作業 (因為久久才下單一次)。因此產品瀏覽的網頁不能拖泥帶水，步驟要越少越好，不然用戶逛了老半天找不到想買的東西就跑掉了。另一方面，下單的網頁到是不怕步驟多，就怕使用者不會用，或是抗拒使用 (要付錢的地方總是會小心翼翼的)。所以一般下單都會設計成 wizard 的方式，一步一步導引使用者完成下單。&lt;br /&gt;&lt;br /&gt;那如果是購物網站的後台呢？後台的使用者屬於 power user (可能一開始就是，或是之後會被訓練)。他每天的工作就是產品上架，處理訂單...等等例行性的作業。這樣的網頁以快速為最優先考量：可以運用 減少 popup、不用 wizard、多功能客製化元件、一頁內放多一點資訊、增設 hotkey... 等等技巧。總之讓用戶可以在最少的點擊、最少的思考完成他的工作就是了。&lt;br /&gt;&lt;br /&gt;購物網站是大家熟悉的例子，大家都見多了。但是如果換個 domain 就要多花心思去了解了。比方說我的工作是服務醫院醫學相關的研究，涉及到的人員有護士、醫生、研究員、實驗室、計畫負責人...等等。服務內容則有病人收樣管理、實驗管理、秏材進銷存、問卷調查...等等。遇到這類不熟悉的 domain 時，記得談需求時要多尋問：分辨他在這個功能上屬於 end user 還是 power user？他多久用一次這個功能？每天用還是一個月用一次？先替這些用戶簡單歸個類，大方向捉對了，未來做出的網站用戶用的就順手。&lt;br /&gt;原則二：第一頁要放用戶最想做，最常做的事&lt;br /&gt;&lt;br /&gt;這個原則乍聽之下很自然、也很直覺... 但我們 team 的大多數成員 (包含我自己) 就是沒有辦法做到這一點。我們的專案多屬內部使用，而開發部門並沒有設立專人設計網頁，所以從網頁設計到後端資料全都工程師自己來。工程師拿到案子，頭腦就開始直覺思考後端流程怎麼設計，然後由後端往前端推，網頁的流程就會和後端呈現一比一的關係。比方說要做一個管理稽核案的功能，有新增修改查詢等等功能。依典型的工程師思維，第一頁就做了個查詢案子的表單和新增案子的連結，下了查詢條件後再列出相關案子的網頁。這種 "第一頁" 也不能說工程師沒按需求來做... 只是剛進去時除了表單，就是一片空白，什麼都沒有。使用者一進來就得去想、得去回憶要下什麼查詢條件，才能找到他要的東西。這樣還真有點難用...&lt;br /&gt;&lt;br /&gt;要提升 usability，就是去思考用戶最想做或是最常做的事，比方說，第一頁除了查詢表單之外，還列出他最近處理過的10個案子；或者，用戶比較關心那些稽核不過的案子，那一開始就先列出這些有問題的案子；或者，可以提供查詢條件 history 的功能，讓用戶可以調出最近下的查詢條件... 等等。決定要做那方面的事，要透過談需求時了解。而且，要注意很少有使用者會自覺得想到這一塊，必需由開發者主動尋問和了解使用者的作業才行。&lt;br /&gt;原則三：重要的內容放在 1024x768 內&lt;br /&gt;&lt;br /&gt;這個原則很基本，許多人都了解 (還不知道的人要打屁屁！)。問題是出在難遵守.... 開發人員通常都用很大的營幕、開高解析度、然後字型用的小小的，希望一次看多點資訊，方便開發。這樣的習慣長期下來，一不小心就會發生設計的網頁常常需要 scroll (甚至是左右 scroll)。除非你的網頁是設計給 power user，而且是配備比較好的營幕。不然開發時建議固定開個 1024x748 的 browser 來檢視網頁的呈現，比較符合一般使用者的畫面大小。(安裝 firefox 的 web developer plugin，然後大小設 1024x748 (不是 768，因為要扣掉 toobar和 menu 的高度)) 瀏覽器的大小有了，接下來就是將重要的內容、用戶最關心的事情，盡量放在網頁上半段，一般來說，左上角是人瀏覽的起點，從那裡開始最好。目的就是讓用戶最少的力氣找到他要的東西，而不是 scroll 老半天才看的到。&lt;br /&gt;原則四：改變資料狀態用按鈕，瀏覽資料用連結&lt;br /&gt;&lt;br /&gt;當你做的功能是 改變資料狀態時，網頁上要用按鈕來呈現。如果是資料間瀏覽，則用連結來呈現。什麼是改變資料狀態？比方說刪除資料、送出表單、移動位置、切換...等等功能。這些功能用按鈕比較洽當，因為按鈕有 "動作" 的感覺 (按下後再彈上)、有視覺上的 feedback。當然在 ajax 的風潮之下，按鈕漸漸越用越少了，不少地方開始用連結來替代。不過重點還是一樣，要有視覺上的 feedback，例如加些 animation, yellow fade out之類的都可以。&lt;br /&gt;&lt;br /&gt;另一方面，瀏覽資料則一定是用連結，千萬不要用按鈕替代。這聽起來很白吃吧？但就是有新手會犯這種錯 (三年前我自個兒也常犯...)&lt;br /&gt;原則五：慎防預覽頁面&lt;br /&gt;&lt;br /&gt;當設計多步驟網頁時，例如結帳的功能，中間多半會夾一個預覽的頁面。預覽的網頁原本是好意，讓使用者可以再完成前，再確認、考慮一番。但偏偏很多用戶會把他當做 "已完成" 的網頁，造成常會有客戶來電，抱怨明明已經完成了，卻沒成交。為避免這類常犯的錯誤，建議預覽的畫面正上方要加上大剌剌的 "完成按鈕" (可用顏色/大小/字型來醒目) 提醒使用者，要按了才會生效。如果版面許可，可以再加上 process train (另一說法是 process funnel) 就是常見的按順序導引：(1) -&gt; (2) -&gt; (3) -&gt; done，這樣就更穩了。現在 Ajax 技術發達，也可以考慮用 "即時預覽" 取代掉舊的換頁預覽，這樣既方便又不會出錯。&lt;br /&gt;最後，我們來看一個客製元件提升 usability 的實際例子&lt;br /&gt;&lt;br /&gt;需求：用戶需替病人的樣本做稽核 (有無漏收或誤收)，一個稽核案約含 100 個病人。每個病人的稽核狀態分別為 未稽核、已稽核、稽核不過。&lt;br /&gt;&lt;br /&gt;用戶 profile：用戶為稽核員，是內部的使用者，可以被訓練。因此屬 power user&lt;br /&gt;&lt;br /&gt;使用頻率：約每週使用，一次約稽核數十人，屬例行性作業。&lt;br /&gt;&lt;br /&gt;按上面的需求，如果用傳統的 html 元件設計，我們會得到：&lt;br /&gt;&lt;br /&gt;上圖用表格的方式呈現 100 個病人資料。而最右邊稽核的狀態則採下拉式選單表示 (當然這裡也能用 Radio Button，但是三個選項會太寬，版面擠不下)。在下拉式選單中挑選欲變更的狀態時，背後會用 ajax 的方式直接更新後端的資料。一般來說寫到這樣已經算很方便了，最少用戶不用為了切換狀態而 submit 一個個的 html form。&lt;br /&gt;&lt;br /&gt;雖然不錯，但是還有兩個缺點：第一，每次切換下拉式選單都需要兩次的 click。第二，當 100 個 病人直直排下來，狀態用文字表示時，要分辨出 未稽核、已稽核 等狀態其實還蠻花的。&lt;br /&gt;&lt;br /&gt;由於稽核員屬 power user，因此我們不一定要使用簡單的 html 基本元件，我們可以客製元件：&lt;br /&gt;&lt;br /&gt;上圖稽核的狀態改用兩個圖示表示，兩個都是灰的表示尚未稽核，綠色表示已稽核，紅色則表示稽核不過。這樣一來，即使 table 上排滿滿了 100 個病人，也可以很快看出哪些病人還沒稽核，哪些是稽核有問題的。要切換狀態，只要在欲切換的圖示上點擊一次就行了 (有點類似常見的評比星星)，而背後也是直接用 ajax 更新後端的資料。&lt;br /&gt;&lt;br /&gt;當然，這樣的元件用戶第一次看到會傻眼... 無從下手，不過只要稍微 demo 一下，之後作業就很順暢囉。&lt;br /&gt;&lt;br /&gt;至於要製作這樣的客製元件... 呃... 要看各位用什麼技術寫了... 用 Wicket 的話，一個幾十行的 .java 就搞定了，也不用寫什麼 javascript 或是 xml。其他的技術就得慢慢磨了吧... 採用容易寫客製元件的 framework 真的好處很多，寫元件不僅快又簡單，也讓你有更多的時間和精力花在構思更好的 usability 上。&lt;br /&gt;&lt;br /&gt;來源&lt;br /&gt;&lt;a href="http://www.javaworld.com.tw/roller/ingramchen/entry/2007_11_18_WebAppUsabilityNotes"&gt;http://www.javaworld.com.tw/roller/ingramchen/entry/2007_11_18_WebAppUsabilityNotes&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3324394531508458364-2315739223282913927?l=chen7768.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chen7768.blogspot.com/feeds/2315739223282913927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3324394531508458364&amp;postID=2315739223282913927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2315739223282913927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3324394531508458364/posts/default/2315739223282913927'/><link rel='alternate' type='text/html' href='http://chen7768.blogspot.com/2008/06/usability.html' title='網頁 Usability'/><author><name>Doug</name><uri>http://www.blogger.com/profile/17792515039963126151</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3324394531508458364.post-6233554821770357416</id><published>2007-12-22T21:50:00.001-08:00</published><updated>2007-12-22T21:50:53.071-08:00</updated><title type='text'>ldap connect AD</title><content type='html'>開始:&lt;br /&gt;1. 建立 IIS SSL&lt;br /&gt;2. 將 CA Certificate 加入至 jre keystore 裡&lt;br /&gt;3. JNDI 連 AD&lt;br /&gt;&lt;br /&gt;1. 建立 IIS SSL:&lt;br /&gt;Install Windows 2003 Server:&lt;br /&gt;&lt;br /&gt;Install AD:&lt;br /&gt;Start -&gt; Run -&gt; dcpromote&lt;br /&gt;domain name : joeyta-DOT-local&lt;br /&gt;NT domain name : joeytaserver&lt;br /&gt;即 Fully Qualified Domain Name (FQDN) 為 joeytaserver.joeyta-DOT-local&lt;br /&gt;&lt;br /&gt;先安裝 IIS , 再安裝 CA.&lt;br /&gt;&lt;br /&gt;Install IIS:&lt;br /&gt;Start -&gt; Programs -&gt; Administrative Tools -&gt; Configure Your Server Wizard&lt;br /&gt;-&gt;&gt; Next -&gt; Next -&gt; Application server (IIS, ASP.NET) -&gt; Next&lt;br /&gt;&lt;br /&gt;進入 http://joeyserver.joeyta.local/postinfo.html 表示安裝成功.&lt;br /&gt;&lt;br /&gt;Install CA:&lt;br /&gt;Start -&gt; Settings -&gt; Control Panel -&gt; Add or Remove Programs&lt;br /&gt;-&gt;&gt; Add/Remove Windows Components&lt;br /&gt;選擇 Certificate Services -&gt; Next&lt;br /&gt;選擇 Enterprise root CA -&gt; Next&lt;br /&gt;Common name for this CA: testca -&gt; Next&lt;br /&gt;&lt;br /&gt;進入 http://joeyserver.joeyta.local/CertSrv 表示安裝成功.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Generating a Certificate Signing Request:&lt;br /&gt;Start -&gt; Programs -&gt; Administrative Tools -&gt; Internet Information Services (IIS) Manager&lt;br /&gt;-&gt;&gt; Internet Information Services -&gt; (local computer) -&gt; Web Sites&lt;br /&gt;-&gt; &gt; 右鍵點選 Default Web Site -&gt; Properties&lt;br /&gt;選擇 "Directory Security" -&gt; Server Certificate&lt;br /&gt;-&gt;&gt; Create a new certificate -&gt; Prepare the request now, but send it later&lt;br /&gt;一直按 Next , 需要注意的是 Common name 必須為 joeyserver.joeyta.local, 這是給使用者連 ssl 的 website.&lt;br /&gt;最後產生 certificate request file , 預設為 c:\certreq.txt&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Request a certificate on CA:&lt;br /&gt;進入 http://joeyserver.joeyta.local/CertSrv&lt;br /&gt;按 Request a certificate -&gt; advanced certificate request&lt;br /&gt;-&gt; Submit a certificate request by using a base-64-encoded CMC or PKCS#10 file, or submit a renewal request by using a base-64-encoded PKCS#7 file&lt;br /&gt;使用 notepad 打開 c:\certreq.txt , copy c:\certreq.txt 內容貼至 Saved Request:&lt;br /&gt;Certificate Template 選擇 Web Server, 按 Submit&lt;br /&gt;然後點選 Download certificate , 將 certnew.cer 儲存至 c:\certnew.cer&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Installing a Certificate:&lt;br /&gt;Start -&gt; Programs -&gt; Administrative Tools -&gt; Internet Information Services (IIS) Manager&lt;br /&gt;-&gt;&gt; Internet Information Services -&gt; (local computer) -&gt; Web Sites&lt;br /&gt;-&gt; &gt; 右鍵點選 Default Web Site -&gt; Properties&lt;br /&gt;選擇 "Directory Security" -&gt; Server Certificate&lt;br /&gt;-&gt;&gt; Process the pending request and install the certificate -&gt; Next&lt;br /&gt;Path and file name: c:\certnew.cer -&gt; Next&lt;br /&gt;SSL port this web site should use: 443 -&gt; Next -&gt; Next -&gt; Finish&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. 將 CA Certificate 加入至 jre keystore 裡:&lt;br /&gt;進入 http://joeyserver.joeyta.local/CertSrv&lt;br /&gt;點選 Download a CA certificate, certificate chain, or CRL&lt;br /&gt;點選 Download CA certificate , 然後下載並改名為 c:\testca_cert.cer&lt;br /&gt;&lt;br /&gt;然後執行 command:&lt;br /&gt;c:\temp&gt;keytool -import -alias testca_cert -file "/testca_cert.cer" -keystore "/jdk1.5.0_09/jre/lib/security/cacerts" -storepass "changeit"&lt;br /&gt;&lt;br /&gt;出現 Trusted this certificate? 按 "y" 即新增成功.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. JNDI 連 AD:&lt;br /&gt;&lt;br /&gt;/***************************** LDAPFastBind.java *****************/&lt;br /&gt;package test.ldap;&lt;br /&gt;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.io.UnsupportedEncodingException;&lt;br /&gt;import java.util.Hashtable;&lt;br /&gt;&lt;br /&gt;import javax.naming.AuthenticationException;&lt;br /&gt;import javax.naming.Context;&lt;br /&gt;import javax.naming.NamingEnumeration;&lt;br /&gt;import javax.naming.NamingException;&lt;br /&gt;import javax.naming.directory.Attribute;&lt;br /&gt;import javax.naming.directory.Attributes;&lt;br /&gt;import javax.naming.directory.BasicAttribute;&lt;br /&gt;import javax.naming.directory.BasicAttributes;&lt;br /&gt;import javax.naming.directory.DirContext;&lt;br /&gt;import javax.naming.directory.ModificationItem;&lt;br /&gt;import javax.naming.directory.SearchControls;&lt;br /&gt;import javax.naming.directory.SearchResult;&lt;br /&gt;import javax.naming.ldap.Control;&lt;br /&gt;import javax.naming.ldap.InitialLdapContext;&lt;br /&gt;import javax.naming.ldap.LdapContext;&lt;br /&gt;import javax.naming.ldap.StartTlsRequest;&lt;br /&gt;import javax.naming.ldap.StartTlsResponse;&lt;br /&gt;&lt;br /&gt;class FastBindConnectionControl implements Control {&lt;br /&gt;    public byte[] getEncodedValue() {&lt;br /&gt;        return null;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getID() {&lt;br /&gt;        return "1.2.840.113556.1.4.1781";&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public boolean isCritical() {&lt;br /&gt;        return true;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class LDAPFastBind {&lt;br /&gt;    public Hashtable env = null;&lt;br /&gt;&lt;br /&gt;    public LdapContext ctx = null;&lt;br /&gt;&lt;br /&gt;    public Control[] connCtls = null;&lt;br /&gt;&lt;br /&gt;    public LDAPFastBind(String ldapurl) {&lt;br /&gt;        env = new Hashtable();&lt;br /&gt;        env.put(Context.INITIAL_CONTEXT_FACTORY,&lt;br /&gt;                "com.sun.jndi.ldap.LdapCtxFactory");&lt;br /&gt;        env.put(Context.SECURITY_AUTHENTICATION, "simple");&lt;br /&gt;        env.put(Context.PROVIDER_URL, ldapurl);&lt;br /&gt;        &lt;br /&gt;        env.put(Context.SECURITY_PROTOCOL,"ssl");&lt;br /&gt;&lt;br /&gt;        String keystore = "/jdk1.5.0_09/jre/lib/security/cacerts";&lt;br /&gt;        System.setProperty("javax.net.ssl.trustStore",keystore);&lt;br /&gt;        &lt;br /&gt;     
