<?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-8880329</id><updated>2011-07-08T09:37:21.203+08:00</updated><category term='url'/><category term='dom'/><category term='javascript'/><category term='spec'/><category term='swing'/><category term='web'/><category term='web hosting'/><category term='localization'/><category term='aosd'/><category term='methodology'/><category term='rex'/><category term='jdt'/><category term='open source'/><category term='api'/><category term='conference'/><category term='component oriented'/><category term='GUI'/><category term='delphi'/><category term='internationalization'/><category term='css'/><category term='exception handling'/><category term='plugin'/><category term='best practice'/><category term='tips'/><category term='unicode'/><category term='sax'/><category term='character set'/><category term='eclipse'/><category term='linux'/><category term='OO design'/><category term='xml'/><category term='feed'/><category term='OSGi'/><category term='workshop'/><category term='research'/><category term='java'/><category term='xsd'/><category term='ajax'/><category term='programming'/><category term='aop'/><category term='dedicated server'/><category term='xslt'/><category term='2007'/><category term='aspectj'/><category term='regular expression'/><category term='font'/><category term='blog'/><category term='interpretation'/><category term='quiz'/><category term='utf'/><category term='config'/><category term='kde'/><category term='awt'/><category term='iteration developement'/><category term='report'/><category term='JFace'/><category term='cdt'/><category term='keyborad event'/><category term='html'/><category term='design by contract'/><category term='web browser'/><category term='architecture'/><category term='cpp'/><category term='shellscript'/><category term='uri'/><category term='prototype'/><category term='compiler'/><category term='SWT'/><title type='text'>Blog On Tech By Kenyth</title><subtitle type='html'>A little bit more...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>47</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8880329.post-3551050967912723950</id><published>2007-09-03T15:13:00.001+08:00</published><updated>2007-09-03T15:13:54.632+08:00</updated><title type='text'>Common sense: difference between application database and data warehouse</title><content type='html'>(This post is a collection of information found available on line)&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br&gt;&lt;/span&gt;Introduction&lt;br&gt;&lt;/span&gt;&lt;br&gt;I&amp;#39;m a beginner in this aspect. Basically, an app database and a data warehouse have in common is that they&amp;#39;re both databases. However they serve for different purposes.  &lt;br&gt;&lt;br&gt;&lt;span style="font-weight: bold;"&gt;Diff&lt;br&gt;&lt;br&gt;&lt;/span&gt;cite from resource 1:&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br&gt;&lt;/span&gt;The primary difference betwen you application database and a data warehouse is that while the former is designed (and optimized) to record , the latter has to be designed (and optimized) to respond to analysis questions that are critical for your business. &lt;/span&gt;&lt;br style="font-weight: bold;"&gt;&lt;br&gt;&lt;span id="intelliTXT"&gt;Application databases are &lt;span style="font-weight: bold;"&gt;OLTP (On-Line Transaction Processing) &lt;/span&gt;systems where every transaction has to be recorded, and super-fast at that. An application database system is designed to &lt;/span&gt;&lt;span&gt;make sure that every transaction gets recorded within the time users are served. &lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span&gt;Data warehouses are designed as  &lt;span style="font-weight: bold;"&gt;OLAP (On-Line Analytical Processing)&lt;/span&gt; systems, these databases contain read-only data that can be queried and analyzed far more efficiently as compared to your regular OLTP application databases. &lt;br&gt;&lt;br&gt; &lt;/span&gt;cite from resource 3 (read this resource linked below for a thorough understanding):&lt;br&gt;&lt;p class="BP"&gt;A common way of introducing data warehousing is to refer to the characteristics of a data warehouse as set forth by William Inmon:&lt;/p&gt;  &lt;ul class="LB1"&gt;&lt;li class="LB1" type="disc"&gt;&lt;a name="50146"&gt;&lt;/a&gt;&lt;a href="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96520/concept.htm#49840"&gt;Subject Oriented&lt;/a&gt;&lt;/li&gt;&lt;li class="LB1" type="disc"&gt;&lt;a name="50153"&gt; &lt;/a&gt;&lt;a href="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96520/concept.htm#49842"&gt;Integrated&lt;/a&gt;&lt;/li&gt;&lt;li class="LB1" type="disc"&gt;&lt;a name="50160"&gt;&lt;/a&gt;&lt;a href="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96520/concept.htm#49871"&gt; Nonvolatile&lt;/a&gt;&lt;/li&gt;&lt;li class="LB1" type="disc"&gt;&lt;a name="49836"&gt;&lt;/a&gt;&lt;a href="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96520/concept.htm#49853"&gt;Time Variant&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br&gt;&lt;h4 class="FT"&gt;&lt;font face="Arial, Helvetica, sans-serif"&gt; &lt;em&gt;Figure 1-1 Contrasting OLTP and Data Warehousing Environments&lt;/em&gt;&lt;/font&gt;&lt;/h4&gt;  &lt;a name="43693"&gt;&lt;img src="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96520/dwhsg005.gif" alt="Text description of dwhsg005.gif follows"&gt;&lt;/a&gt;&lt;a href="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96520/img_text/dwhsg005.htm"&gt; &lt;br&gt; Text description of the illustration dwhsg005.gif&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;span style="font-weight: bold;"&gt;More words on either one&lt;/span&gt;&lt;br&gt;&lt;br&gt;An application database mainly serve for processing real time business data. It shows the whole picture of the business objects world. Every application should normally have an application database to gain any feature concerning persistence. However, a data warehouse is not a must for every business application. It is mainly for analysis of historical (or accumulated) data, and sometimes for real time. Because it is for analysis, it is normally configured as read only for the analysis that is based on it (that is, the end user). In data warehouses there&amp;#39;re not only data directly reflecting the status of business objects of some time, but also (and mainly this kind) data derived from business objects data. &lt;br&gt;&lt;br&gt;data in data warehouse:&lt;br&gt;Raw data: mappings of business object data&lt;br&gt;Summary data: monthly statistics&lt;br&gt;Meta data: day, month, year, etc&lt;br&gt;&lt;br&gt;Further reading:&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;br&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.dmreview.com/article_sub.cfm?articleId=2582"&gt; &lt;span&gt;Business Intelligence: What is Data Mining?&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cmis.csiro.au/bi/what-is-BI.htm"&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://www.cmis.csiro.au/bi/what-is-BI.htm"&gt;&lt;span&gt;Business Intelligence - What is it? &lt;/span&gt;&lt;/a&gt;&lt;br style="font-weight: bold;"&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-weight: bold;"&gt;Resources&lt;/span&gt;&lt;a href="http://blogs.ittoolbox.com/bi/opensource/archives/database-vs-data-warehouse-8286"&gt;&lt;br&gt;&lt;/a&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://blogs.ittoolbox.com/bi/opensource/archives/database-vs-data-warehouse-8286"&gt; &lt;span&gt;Database vs. Data Warehouse&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;&lt;/span&gt;&lt;a href="http://www.geekinterview.com/question_details/22523"&gt;&lt;span&gt;GeekInterview.com&amp;nbsp; &amp;gt;&amp;nbsp; Interview Questions &amp;nbsp;&amp;gt;&amp;nbsp; Data Warehousing&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt; &lt;a href="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96520/concept.htm"&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96520/concept.htm"&gt;&lt;span&gt;Oracle9i Data Warehousing Guide Release 2 (9.2) &lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-3551050967912723950?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/3551050967912723950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=3551050967912723950' title='39 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/3551050967912723950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/3551050967912723950'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/09/common-sense-difference-between.html' title='Common sense: difference between application database and data warehouse'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>39</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-2635312227593332948</id><published>2007-08-05T23:29:00.001+08:00</published><updated>2007-08-05T23:29:18.128+08:00</updated><title type='text'>Smartly load your properties</title><content type='html'>&lt;table style="clear: both;" border="0" cellpadding="5" cellspacing="1"&gt;&lt;tbody&gt;&lt;tr bgcolor="#990033"&gt;&lt;td&gt;&lt;font color="#ffffff"&gt;Method&lt;/font&gt;&lt;/td&gt;                                     &lt;td&gt;&lt;font color="#ffffff"&gt;Parameter format&lt;/font&gt;&lt;/td&gt;                                     &lt;td&gt;&lt;font color="#ffffff"&gt;Lookup failure behavior&lt;/font&gt;&lt;/td&gt;                                     &lt;td&gt;&lt;font color="#ffffff"&gt;Usage example&lt;/font&gt;&lt;/td&gt;                                  &lt;/tr&gt;                                  &lt;tr bgcolor="#cccccc"&gt;                                     &lt;td&gt;&lt;code&gt;ClassLoader.&lt;br&gt;getResourceAsStream()&lt;/code&gt;&lt;/td&gt;                                     &lt;td&gt;&amp;quot;/&amp;quot;-separated names; no leading &amp;quot;/&amp;quot; (all names are absolute)&lt;/td&gt;                                     &lt;td&gt;Silent (returns &lt;code&gt;null&lt;/code&gt;)                                     &lt;/td&gt;                                     &lt;td&gt;&lt;code&gt;this.getClass().getClassLoader()&lt;br&gt;.getResourceAsStream&lt;br&gt;(&amp;quot;some/pkg/resource.properties&amp;quot;)&lt;/code&gt;&lt;/td&gt;                                  &lt;/tr&gt;                                  &lt;tr bgcolor="#ffffff"&gt;                                     &lt;td&gt;&lt;code&gt;Class.&lt;br&gt;getResourceAsStream()&lt;/code&gt;&lt;/td&gt;                                     &lt;td&gt;&amp;quot;/&amp;quot;-separated names; leading &amp;quot;/&amp;quot; indicates absolute names; all other names are relative to the class&amp;#39;s package&lt;/td&gt;                                     &lt;td&gt;Silent (returns &lt;code&gt;null&lt;/code&gt;)                                     &lt;/td&gt;                                     &lt;td&gt;&lt;code&gt;this.getClass()&lt;br&gt;.getResourceAsStream&lt;br&gt;(&amp;quot;resource.properties&amp;quot;)&lt;/code&gt;&lt;/td&gt;                                  &lt;/tr&gt;                                  &lt;tr bgcolor="#cccccc"&gt;                                     &lt;td&gt;&lt;code&gt;ResourceBundle.&lt;br&gt;getBundle()&lt;/code&gt;&lt;/td&gt;                                     &lt;td&gt;&amp;quot;.&amp;quot;-separated names; all names are absolute; &lt;code&gt;.properties&lt;/code&gt; suffix is implied                                     &lt;/td&gt;                                     &lt;td&gt;Throws unchecked&lt;br&gt; &lt;code&gt;java.util.MissingResourceException&lt;/code&gt;&lt;/td&gt;                                     &lt;td&gt;&lt;code&gt;ResourceBundle.getBundle&lt;br&gt;(&amp;quot;some.pkg.resource&amp;quot;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;and there&amp;#39;re more tips in the linked resource below.&lt;br&gt;&lt;br&gt;&lt;span style="font-weight: bold;"&gt; Resources&lt;/span&gt;&lt;br&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html?page=1"&gt;Smartly load your properties&lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;/ol&gt; &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-2635312227593332948?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/2635312227593332948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=2635312227593332948' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/2635312227593332948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/2635312227593332948'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/08/smartly-load-your-properties.html' title='Smartly load your properties'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-3798726509286785303</id><published>2007-08-05T18:40:00.001+08:00</published><updated>2007-08-05T18:40:46.010+08:00</updated><title type='text'>Difference Between ResourceBundle and Properties Classes in Java</title><content type='html'>&lt;blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"&gt; GMHK wrote:&lt;br&gt;&lt;font color="blue"&gt; &amp;gt; Can anyone tell me the whats the difference between the resource bundle&lt;/font&gt;&lt;br&gt;&lt;font color="blue"&gt; &amp;gt; and Properties classes in java.&lt;/font&gt;&lt;br&gt;&lt;font color="blue"&gt; &amp;gt; As both uses the .properties file  to get the string constants.&lt;/font&gt;&lt;br&gt;&lt;br&gt; No, they don&amp;#39;t necessarily. A resource bundly does not have to be&lt;br&gt; file-based. The common implementation, however is. And that common&lt;br&gt; implementation (PropertyResourceBundle) indeed uses properties files and&lt;br&gt; thr Properties class.&lt;br&gt;&lt;br&gt; However, resource bundles also come with a particular lookup-schema to&lt;br&gt; select a particular bundle according to the Locale. Something which you&lt;br&gt; don&amp;#39;t get with Properties, but which is important when you do some&lt;br&gt; actual localization.&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt; &amp;gt; At what point of time would the programmer decide to choose which of&lt;/font&gt;&lt;br&gt;&lt;font color="blue"&gt; &amp;gt; the either classes.&lt;/font&gt;&lt;br&gt;&lt;br&gt; A resource bundle (properties file based or otherwise) when in need for&lt;br&gt; the lookup of locale-specific data. A naked properties file when in need&lt;br&gt; for keeping some small (FSWO) set of data persistent (e.g. application&lt;br&gt; configuration data), which is not supposed to be translated.&lt;br&gt;&lt;br&gt; You didn&amp;#39;t mention Preferences. I still preferen Properties over&lt;br&gt; Preferences because of the easy-to-work-with text file format, but they&lt;br&gt; can be used for the same purpose as Properties, without the need of&lt;br&gt; having to deal with files.&lt;br&gt;&lt;br&gt;&lt;font color="blue"&gt; &amp;gt; What i understood so far is resourcebundle makes uses of String manager&lt;/font&gt;&lt;br&gt;&lt;font color="blue"&gt; &amp;gt; to get the string.&lt;/font&gt;&lt;br&gt;&lt;font color="blue"&gt; &amp;gt; where as the Properties tries to read the properties directly.&lt;/font&gt;&lt;br&gt;&lt;br&gt; Both map keys to values. The biggest difference is how they get that&lt;br&gt; mapping. ResourceBundles follow a build-in lookup schema taking a locale&lt;br&gt; into account. Properties need to be provided with some InputStream,&lt;br&gt; which the programmer has to handle explicitely. Properties have an easy&lt;br&gt; way to be written to an OutputStream, while ResourceBundles are ment to&lt;br&gt; be read-only.&lt;br&gt;&lt;br&gt; /Thomas&lt;br&gt;&lt;/blockquote&gt;        &lt;span style="font-weight: bold;"&gt;Resources&lt;/span&gt;&lt;br&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.velocityreviews.com/forums/t144423-difference-between-resourcebundle-and-properties-classes-in-java.html"&gt;Difference Between ResourceBundle and Properties Classes in Java &lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;/ol&gt; &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-3798726509286785303?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/3798726509286785303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=3798726509286785303' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/3798726509286785303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/3798726509286785303'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/08/difference-between-resourcebundle-and.html' title='Difference Between ResourceBundle and Properties Classes in Java'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-8483094346006090105</id><published>2007-08-01T12:00:00.001+08:00</published><updated>2007-08-01T12:00:48.366+08:00</updated><title type='text'>Multiple Eclipse Installation Management</title><content type='html'>Resources&lt;br&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://blog.exis.com/colin/archives/2004/12/23/managing-plugins-in-eclipse/"&gt;Managing plugins in eclipse&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://http://blog.exis.com/colin/archives/2004/12/23/managing-plugins-in-eclipse/"&gt; Eclipse: Managing Multiple Eclipse Installation&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href="http://simplygenius.com/geekblog/2005/04/08/setting-up-eclipse-for-painless-upgrades/"&gt;Setting up eclipse for painless upgrades&lt;/a&gt;.&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-8483094346006090105?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/8483094346006090105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=8483094346006090105' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8483094346006090105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8483094346006090105'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/08/multiple-eclipse-installation.html' title='Multiple Eclipse Installation Management'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-6634372235973558325</id><published>2007-07-27T15:17:00.001+08:00</published><updated>2007-07-27T15:17:37.281+08:00</updated><title type='text'>Regular expression and CharSequence in Java</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;&lt;br&gt;Regular expression, specified as a string, is first compiled into an instance of Pattern. The regular expression constructs supported by Pattern are almost the same (see comparison to Perl 5 in javadoc of class pattern) as that supported by Perl 5.  &lt;span style="font-weight: bold;"&gt;The Pattern engine performs traditional NFA-based (Nondeterministic Finite Automate) matching&lt;/span&gt; with ordered alternation as occurs in Perl 5.&lt;br&gt;&lt;br&gt;&lt;span style="font-weight: bold;"&gt;The regex Package &lt;/span&gt;&lt;br&gt;Two major class Pattern and Matcher, both of which have non-public constructor which means&amp;nbsp; the client can&amp;#39;t new instances of them directly. A Pattern instance is the compiled intermediate representation, plus some helper methods, of the string form regular expression. Instances of Pattern are immutable which means they&amp;#39;re thread-safe. And each instance of Matcher, produced by factory method of Pattern, corresponds to each matching between the bound regular expression of the target string (  i.e., the string to be matched). Further information about how to use this package in a program can be found in the resources section.&lt;br&gt;&lt;br&gt;&lt;span style="font-weight: bold;"&gt;regex matching in CharSequence&lt;/span&gt;&lt;br&gt;Despite being as part of the java library, the regex package is also used by other parts of the library. These usages are listed below: &lt;br&gt;boolean String.matches( String regex );&lt;br&gt;String String.replaceAll( String regex, String replacement )&lt;br&gt;String String.replaceFirst( String regex, String replacement )&lt;br&gt;String[] split( String regex )&lt;br&gt;&lt;br&gt;Note that rather than class String or some other concrete representation of CharSequence, interface CharSequence is widely depended upon both in Pattern and String. Classes implementing CharSequence mainly include String, StringBuffer and StringBuilder. And the implemented methods include such methods that we usually use with String as charAt(int), length(), and subSequence(int, int). &lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;span style="font-weight: bold;"&gt;Resources&lt;/span&gt;&lt;br&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://java.sun.com/javase/6/docs/api/java/lang/CharSequence.html"&gt;Interface java.lang.CharSequence&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://java.sun.com/javase/6/docs/api/java/util/regex/package-summary.html"&gt; Package java.util.regex&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://java.sun.com/docs/books/tutorial/essential/regex/index.html"&gt;Lesson: Regular Expressions&lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;/ol&gt; &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-6634372235973558325?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/6634372235973558325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=6634372235973558325' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/6634372235973558325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/6634372235973558325'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/07/regular-expression-and-charsequence-in.html' title='Regular expression and CharSequence in Java'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-8081869758256824366</id><published>2007-07-25T10:25:00.001+08:00</published><updated>2007-07-25T10:25:45.450+08:00</updated><title type='text'>Tips of Using Escape Characters</title><content type='html'>First, what is the differences between &amp;#39;\n&amp;#39; and &amp;#39;\r\n&amp;#39;?&lt;br&gt;&lt;br&gt;Cite &lt;a href="http://www.thescripts.com/forum/post877332-7.html"&gt;here&lt;/a&gt;: )&lt;br&gt;&lt;br&gt;&lt;blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"&gt;  It goes back to mechanical teletypes; if you issued a line feed followed by carriage return you got a few characters printed backwards in a diagonal stripe because there was insufficient time for the carriage to move back to the left before it started printing.  To overcome this, the carriage return is issued first to give the carriage enough time to return, whilst line feeding, before printing started.  It has stuck as a standard ever since. &lt;br&gt;&lt;/blockquote&gt;&amp;nbsp;&lt;br&gt;and &lt;a href="http://www.codeguru.com/forum/showthread.php?t=253826"&gt;here&lt;/a&gt;: &lt;br&gt;&lt;br&gt;&lt;blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"&gt;  Different Operating Systems handle newlines in a different way.  Here is a short list of the most common ones:&lt;ul&gt;&lt;li&gt;DOS and Windows&lt;br&gt;   &lt;br&gt; They expect a newline to be the combination of two characters, namely &amp;#39;\r\n&amp;#39; (or 13 followed by 10).&lt;br&gt; &lt;br&gt;&lt;/li&gt;&lt;li&gt;Unix (and hence Linux as well)&lt;br&gt;   &lt;br&gt; Unix uses a single &amp;#39;\n&amp;#39; to indicate a new line.&lt;br&gt; &lt;br&gt;&lt;/li&gt;&lt;li&gt;Mac&lt;br&gt;   &lt;br&gt; Macs use a single &amp;#39;\r&amp;#39;.&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;When string are read from user input, escape character can&amp;#39;t be explicitly input. For example, in case which string are read from the command line argument, when the user give argument &amp;quot;hello\nworld&amp;quot;, the string read in and stored will be &amp;quot;hello\\nworld&amp;quot;. This is because escape characters usually are parsed as format presentation rather than literal&amp;nbsp; occurrence  (actually, this is the &amp;quot;unescapted&amp;quot; meaning). For the same reason, in the programming codes escape characters, the literal form of format presentation, are used instead of draw a format presentation that the compiler could understand, which is obviously of non-sense. &lt;br&gt;&lt;br&gt;Note that using escape characters to specify the format presentation is not the definition of escape character, though in many cases they&amp;#39;re used in this way.&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-8081869758256824366?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/8081869758256824366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=8081869758256824366' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8081869758256824366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8081869758256824366'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/07/tips-of-using-escape-characters.html' title='Tips of Using Escape Characters'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-5981447387951640593</id><published>2007-07-24T16:34:00.001+08:00</published><updated>2007-07-24T16:34:47.787+08:00</updated><title type='text'>Tips on XML Spec</title><content type='html'>Which set of characters and their combinations can be used as literals of attribute value?&lt;br&gt;&lt;table class="scrap" summary="Scrap"&gt;&lt;tbody&gt;&lt;tr valign="baseline"&gt;&lt;td&gt;&lt;a name="NT-AttValue" id="NT-AttValue"&gt;[10]&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/a&gt;&lt;/td&gt;&lt;td&gt; &lt;code&gt;AttValue&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;::=&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;#39;&amp;quot;&amp;#39; ([^&amp;lt;&amp;amp;&amp;quot;] | &lt;a href="http://www.w3.org/TR/xml/#NT-Reference"&gt;Reference&lt;/a&gt;)* &amp;#39;&amp;quot;&amp;#39; &lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt;&lt;td&gt;&lt;br&gt;&lt;/td&gt;&lt;td&gt;&lt;br&gt;&lt;/td&gt;&lt;td&gt;&lt;br&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;|&amp;nbsp; &amp;quot;&amp;#39;&amp;quot; ([^&amp;lt;&amp;amp;&amp;#39;] | &lt;a href="http://www.w3.org/TR/xml/#NT-Reference"&gt;Reference&lt;/a&gt;)* &amp;quot;&amp;#39;&amp;quot;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;If double quotes (single quotes) are used to quote the string then the same quotation mark (single-quote character or double-quote character), in addition to the other two characters specified in the above production, can&amp;#39;t appear in the enclosed string. But what if one wants to&amp;nbsp; use the same quotation mark as the enclosing ones inside the enclosed string? In this case, &amp;quot;&amp;amp;quot;&amp;quot; and &amp;quot;&amp;amp;apos;&amp;quot; can be used instead. &lt;br&gt;&lt;br&gt;e.g., &amp;lt;xxx yyy=&amp;quot;...&amp;quot;...&amp;quot;&amp;gt; incurs errors because of the extra double-quote character, instead, &amp;lt;xxx yyy=&amp;quot;...&amp;amp;quot;...&amp;quot;&amp;gt; can be used.&lt;br&gt;&lt;br&gt;&lt;span style="font-weight: bold;"&gt; Resources:&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.w3.org/TR/xml/#NT-Name"&gt;xml spec 1.0&lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-5981447387951640593?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/5981447387951640593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=5981447387951640593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/5981447387951640593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/5981447387951640593'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/07/tips-on-xml-spec.html' title='Tips on XML Spec'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-1692874797918382770</id><published>2007-07-05T13:26:00.001+08:00</published><updated>2007-07-05T13:26:18.385+08:00</updated><title type='text'>TDS: Tabular Data Stream Protocol</title><content type='html'>Below cites &lt;a href="http://www.freetds.org/userguide/what.htm#TDSPROTOCOLHIST"&gt;here&lt;/a&gt;:&lt;br&gt;&lt;blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"&gt; &lt;p&gt;&lt;acronym class="ACRONYM"&gt;TDS&lt;/acronym&gt; is a &lt;i class="FIRSTTERM"&gt;protocol&lt;/i&gt;, a set of rules describing how to transmit data between two computers. Like any protocol, it defines the types of messages that can be sent, and the order in which they may be sent. Protocols describe the &lt;span class="QUOTE"&gt;&amp;quot;bits on the wire&amp;quot;&lt;/span&gt;, how data flow.   			&lt;/p&gt;&lt;p&gt;In reading this manual, it may be helpful to keep in mind that a protocol is not an &lt;acronym class="ACRONYM"&gt;API&lt;/acronym&gt;, although the two are related. The server recognizes and speaks a protocol; anything that can send it the correct combination of bytes in the right order can communicate with it. But programmers aren&amp;#39;t generally in the business of sending bytes; that&amp;#39;s the job of a library. Over the years, there have been a few libraries — each with its own &lt;acronym class="ACRONYM"&gt;API&lt;/acronym&gt; — that do the work of moving SQL through a &lt;acronym class="ACRONYM"&gt;TDS&lt;/acronym&gt; pipe.  &lt;span class="SYSTEMITEM"&gt;ODBC&lt;/span&gt;, &lt;span class="SYSTEMITEM"&gt;db-lib&lt;/span&gt;, &lt;span class="SYSTEMITEM"&gt; ct-lib&lt;/span&gt;, and  &lt;acronym class="ACRONYM"&gt;JDBC&lt;/acronym&gt; have very different &lt;acronym class="ACRONYM"&gt;API&lt;/acronym&gt;s, but they&amp;#39;re all one to the server, because on the wire they speak &lt;acronym class="ACRONYM"&gt;TDS&lt;/acronym&gt; .   			&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;"&gt;The &lt;/span&gt;&lt;acronym style="font-weight: bold;" class="ACRONYM"&gt;TDS&lt;/acronym&gt;&lt;span style="font-weight: bold;"&gt; protocol was designed and developed by Sybase Inc. &lt;/span&gt;for their Sybase  &lt;span class="PRODUCTNAME"&gt;SQL Server&lt;/span&gt; relational database engine in 1984. The problem Sybase faced then still exists: There was no commonly accepted application-level protocol to transfer data between a database server and its client. To encourage the use of their product, Sybase came up with a flexible pair of products called &lt;span class="PRODUCTNAME"&gt;netlib&lt;/span&gt; and &lt;span class="SYSTEMITEM"&gt;db-lib&lt;/span&gt;.   			&lt;/p&gt;&lt;p&gt;&lt;span class="PRODUCTNAME"&gt;netlib&lt;/span&gt;&amp;#39;s job was to ferry data between the two computers. To do that, it had to deal with the underlying network protocol. Remember, in those days &lt;acronym class="ACRONYM"&gt;TCP/IP&lt;/acronym&gt; was not the ubiquitous thing it is today.  Besides &lt;acronym class="ACRONYM"&gt;TCP/IP&lt;/acronym&gt;, &lt;span class="PRODUCTNAME"&gt; netlib&lt;/span&gt; ran on &lt;acronym class="ACRONYM"&gt;DECnet&lt;/acronym&gt;, &lt;acronym class="ACRONYM"&gt;IPX/SPX&lt;/acronym&gt;, &lt;acronym class="ACRONYM"&gt;NetBEUI&lt;/acronym&gt; and the like.    			&lt;/p&gt;&lt;p&gt;&lt;span class="SYSTEMITEM"&gt;db-lib&lt;/span&gt; provided an &lt;acronym class="ACRONYM"&gt;API&lt;/acronym&gt; to the client program, and communicated with the server via &lt;span class="PRODUCTNAME"&gt;netlib&lt;/span&gt;.  What &lt;span class="SYSTEMITEM"&gt; db-lib&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;sent to the server took the form of a stream of bytes, a structured stream of bytes meant for tables of data, a &lt;span style="text-decoration: underline;"&gt;Tabular Data Stream&lt;/span&gt;&lt;/span&gt;. &lt;/p&gt;&lt;p&gt;In 1990 Sybase entered into a technology sharing agreement with Microsoft which resulted in Microsoft marketing its own  &lt;span class="PRODUCTNAME"&gt;SQL Server&lt;/span&gt;. Microsoft kept the &lt;span class="SYSTEMITEM"&gt;db-lib&lt;/span&gt; &lt;acronym class="ACRONYM"&gt;API&lt;/acronym&gt; and added &lt;span class="SYSTEMITEM"&gt;ODBC&lt;/span&gt;.  (Microsoft has since added other  &lt;acronym class="ACRONYM"&gt;API&lt;/acronym&gt;s, too.)  At about the same time, Sybase introduced a more powerful &lt;span class="QUOTE"&gt;&amp;quot;successor&amp;quot;&lt;/span&gt; to &lt;span class="SYSTEMITEM"&gt;db-lib&lt;/span&gt;, called &lt;span class="SYSTEMITEM"&gt;ct-lib&lt;/span&gt;, and called the pair &lt;span class="PRODUCTNAME"&gt; &lt;i class="FIRSTTERM"&gt;OpenClient&lt;/i&gt;&lt;/span&gt;.   			&lt;/p&gt;&lt;p&gt; &lt;span class="SYSTEMITEM"&gt;ct-lib&lt;/span&gt;, &lt;span class="SYSTEMITEM"&gt;db-lib&lt;/span&gt;, and &lt;span class="SYSTEMITEM"&gt;ODBC&lt;/span&gt; are &lt;acronym class="ACRONYM"&gt;API&lt;/acronym&gt;s that — however different their programming style may be — all use  &lt;span class="PRODUCTNAME"&gt;netlib&lt;/span&gt; to communicate to the server.  The language they use is &lt;acronym class="ACRONYM"&gt;TDS&lt;/acronym&gt;.   			&lt;/p&gt;&lt;p&gt;The &lt;acronym class="ACRONYM"&gt;TDS&lt;/acronym&gt; protocol comes in several flavors, most of which have never been openly documented. If anything, it&amp;#39;s probably considered to be something like a trade secret, or at least proprietary technology. The exception is TDS 5.0, used exclusively by Sybase, for which documentation is available &lt;a href="http://crm.sybase.com/sybase/www/ESD/tds_spec_download.jsp" target="_top"&gt;from Sybase&lt;/a&gt;. 			&lt;/p&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Resources:&lt;/span&gt;&lt;br&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.freetds.org/userguide/"&gt;FreeTDS User Guide&lt;/a&gt;.&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br&gt; &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-1692874797918382770?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/1692874797918382770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=1692874797918382770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/1692874797918382770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/1692874797918382770'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/07/tds-tabular-data-stream-protocol.html' title='TDS: Tabular Data Stream Protocol'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-5607282606927402540</id><published>2007-07-05T09:52:00.001+08:00</published><updated>2007-07-05T09:52:47.596+08:00</updated><title type='text'>Test publishing from email</title><content type='html'>&lt;span class="gmail_quote"&gt;&lt;/span&gt;Test publishing from email&lt;br&gt;&lt;div&gt;&lt;span class="q" id="q_11394137d4a146a6_0"&gt;Test publishing from email&lt;br&gt;Test publishing from email&lt;br&gt;Test publishing from email&lt;br&gt;Test publishing from email &lt;br&gt;Test publishing from email&lt;br&gt;Test publishing from email&lt;br&gt; &lt;/span&gt;&lt;/div&gt; &lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-5607282606927402540?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/5607282606927402540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=5607282606927402540' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/5607282606927402540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/5607282606927402540'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/07/test-publishing-from-email.html' title='Test publishing from email'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-8507312618033855463</id><published>2007-05-07T00:48:00.001+08:00</published><updated>2007-05-07T00:53:05.547+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='SWT'/><category scheme='http://www.blogger.com/atom/ns#' term='swing'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='awt'/><category scheme='http://www.blogger.com/atom/ns#' term='GUI'/><category scheme='http://www.blogger.com/atom/ns#' term='JFace'/><title type='text'>Difference among Swing, AWT, SWT and JFace</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Introduction&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I know questions like telling the differences among Swing, awt, SWT and JFace or some of them are frequently asked in an interview for Java programmers. I don't use them very often and extensively, nor do I know too much about those four things, especially from the implementation perspective or the guru's best practice perspective. But I do read some materials and figure out some conceptual difference between those four things that I think would suffice answering such questions in an interview.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;AWT and Swing&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;-AWT&lt;/p&gt; &lt;p&gt;AWT stands for abastract window toolkit which comes with an early release of the Java Programming Language ( about 1.1 ). AWT components are  referred to as &lt;strong&gt;heavyweight components&lt;/strong&gt;. It is implemented as having "peer" native code for every widget you create. Most of the &lt;strong&gt;significant logics (including the core event handling logic) of the toolkit are written in C/C++&lt;/strong&gt;, for which via JNI (Java Native Interface) your GUI program may directly calls those "peer" native code. It means all of the drawings of your GUI are done directly by the graphic API of the underlying operating system. This implementation underlies several limitations:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Not all the operating system support the same set of native widgets, so a "least common denominator" philosophy is used when shipping the AWT library, that is only a basic set of components are provided as library via which you write your GUI. So no complex components such as slider, tree and table can be found in AWT components, which you have to build yourself either through directly writing native code as AWT is implemented, or through writing Java codes which wraps AWT ( this is the way Swing is implemented).  &lt;/li&gt;&lt;li&gt;Because the core logic are hided from you in the native code, debugging your GUI program can be annoying.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;This kind of implementation also results in your GUI implemented with AWT always having the same look and feel as the underlying OS.&lt;/p&gt; &lt;p&gt;-Swing&lt;/p&gt; &lt;p&gt;In contrast,  Swing components are known as &lt;strong&gt;lightweight components&lt;/strong&gt;, because Swing doesn't implement &lt;strong&gt;the underlying drawing and event handling logic which are delegated to the toolkit in this case AWT, on which it is built on&lt;/strong&gt;. As mentioned above, Swing is implemented by pure Java codes. So it is conceivable that Swing has the portability that AWT doesn't have, and that Swing has almost all the nontrivial complex components. Swing can also have the same look and feel on all OS, and can also be switched to another style of look and feel at runtime regardless of the underlying OS. It is said that Swing has a better performance than AWT, however, from the implementation logic so far I've known, I can't tell why. Swing seems well known for its good design and architecture.&lt;/p&gt; &lt;p&gt;-Never intermix AWT and Swing&lt;/p&gt; &lt;p&gt;I know a lot has been said and written about this subject. The first item in the resources section is a good example of that.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;SWT and JFace&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;-SWT&lt;/p&gt; &lt;p&gt;SWT, short for standard widget tookit, is originally introduced by IBM, as a substitute of AWT. SWT now is as part of the eclipse platform based on which the eclipse GUIs are implemented. &lt;strong&gt;SWT is very similar to AWT conceptually&lt;/strong&gt;, however, the underlying implementation is a little different. Different from implementing all the core logic in "peer" logic in native code, SWT bears a thin JNI layer which is used for directly call the GUI API of each underlying platform. All the significant logics are written in pure Java codes in which the thin JNI layer is used. So &lt;strong&gt;almost all the limitations AWT has are elimintated in SWT&lt;/strong&gt;. Other than this, better performance are gained, for which I don't know the specific reason. As of AWT, SWT has a consisten look and feel as the underlying OS.&lt;/p&gt; &lt;p&gt;Disadvantages of using SWT:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Reuire a native library (This also holds true for AWT).  &lt;/li&gt;&lt;li&gt;Low level of abstraction (This also holds true for AWT).&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;-JFace&lt;/p&gt; &lt;p&gt;&lt;strong&gt;JFace is conceputally similar to Swing&lt;/strong&gt;. The relationship between JFace and SWT is very similar to the relationship between Swing and AWT. It works above the level of raw widgets, in this case, SWT. JFace has a rich set of complex widgets.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Resources&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="http://www.devx.com/tips/Tip/14718"&gt;Why You Shouldn't  Mix AWT and Swing&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.jguru.com/faq/view.jsp?EID=507891"&gt;What is the difference between AWT and SWT&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://forum.java.sun.com/thread.jspa?threadID=271579&amp;messageID=1044844"&gt;what is difference between swing and awt&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:143bd0aa-af95-427b-b265-ddb39d7eee1b" contenteditable="false" style="margin: 0px; padding: 0px; display: inline;"&gt;Technorati tags: &lt;a href="http://technorati.com/tags/GUI" rel="tag"&gt;GUI&lt;/a&gt;, &lt;a href="http://technorati.com/tags/SWT" rel="tag"&gt;SWT&lt;/a&gt;, &lt;a href="http://technorati.com/tags/JFace" rel="tag"&gt;JFace&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Swing" rel="tag"&gt;Swing&lt;/a&gt;, &lt;a href="http://technorati.com/tags/AWT" rel="tag"&gt;AWT&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Java" rel="tag"&gt;Java&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Eclipse" rel="tag"&gt;Eclipse&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-8507312618033855463?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/05/07/difference-among-swing-awt-swt-and-jface/' title='Difference among Swing, AWT, SWT and JFace'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/8507312618033855463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=8507312618033855463' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8507312618033855463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8507312618033855463'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/difference-among-swing-awt-swt-and.html' title='Difference among Swing, AWT, SWT and JFace'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-8042905756458177625</id><published>2007-05-03T18:31:00.000+08:00</published><updated>2007-05-03T18:33:00.997+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='design by contract'/><category scheme='http://www.blogger.com/atom/ns#' term='exception handling'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='OO design'/><title type='text'>Exception as Non-Exception</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;u&gt;Introduction&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Quotes: One of the unexpected benefits of exception handling is better performance because many errors can be processed centrally instead of after each function call&lt;strong&gt;.&lt;/strong&gt; - by Bruce Eckel, the author of Thinking in Java.&lt;/p&gt; &lt;p&gt;-First, what is exception? &lt;/p&gt; &lt;p&gt;In JVM SPEC, an exception is defined to be an error that JVM would signal to a program if a program &lt;strong&gt;violates the semantic constrains&lt;/strong&gt; of the Java programming language. But that’s not the complete fact, more generally, causing an exception is considered to be an exceptional condition or abnormal state that a program is in. So besides violating the semantic constrains of a programming language, which may be a critical and unrecoverable condition, breaking the assumption on the logic functionality of a program can also be considered to be exceptions. From a more formal perspective, every statement, method or generally, module are expected to fullfill some implicit or explicit contract, and an exception indicates the inability to fullfill the contract. Regardeless of the context of the specific programming languge (such as Java) exception handling mechanism, exception and error are interchangeablely used.&lt;/p&gt; &lt;p&gt;-Second, what is exception handling?&lt;/p&gt; &lt;p&gt;Informally speaking, exception handling is what you do about the exceptional condition. However, though an agreement on the defintion of exception are generally achieved, exception handling mechanisms are from time to time debated on. Generally, &lt;strong&gt;three techinques / mechanisms / notions are concerning with exception handling&lt;/strong&gt;. &lt;strong&gt;First&lt;/strong&gt;, exceptions can be identified by returning distinguished error values and handling exceptions is immediately done based on the error values. This is the most conventional way of identifying and handling exceptions. Many large system written in C or most conventional procedure languages utilize this way. &lt;strong&gt;Second&lt;/strong&gt;, exceptions identifying and handling are distinguished from other features that a porgramming language provides. This can be found in many modern OO language such as C++ and Java. An Exception class (or method ?) is  and can be designated for each kind of exceptional condition, and special satements with special keywords are introduced to notify ( or throw ) the condition and then handle the condition, usually at different places in your program. &lt;strong&gt;Third&lt;/strong&gt;, exceptions are covered or at least not emphasized based on the assumption that a module and the client of a module take clearly divided responsiblities. This is mainly concerning an OO design principle called &lt;strong&gt;design by contract&lt;/strong&gt;, DBC for short.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Old-fashioned style by returning distinguished error values&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;When encountering an error, return distinguished error values that are not considered normal return values. For example, a method that is to calculate the square root of a number doesn’t consider a negative number as a normal return value, so returning -1 / -2 / -3 indicates an error. &lt;strong&gt;The client code can distinguish a normal return value from error return values&lt;/strong&gt;, so the client programmer can write code to cope with each exceptional condition according to returned error values, each of which indicate a kind of exceptional condition. E.g., &lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;int sqrt( int num )&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;{&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;   if ( .. ) return -1;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;   else if ( … )&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;   {&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;       …&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;       return -2;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;    }&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;…&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;}&lt;/span&gt;&lt;/p&gt; &lt;p&gt;-&lt;strong&gt;pros and cons&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;pros:  Both notifying and handling exceptions are light weight. 1) &lt;strong&gt;No extra mechanisms are needed&lt;/strong&gt; to notify and handle exceptional condition, which means codes notifying and handling exceptional conditions are executed in exactly the same way other codes that solving the core problems runs. 2) This &lt;strong&gt;will not introduce any extra runtime overhead&lt;/strong&gt; for exception handling.&lt;/p&gt; &lt;p&gt;cons: 1) This idiom tend to &lt;strong&gt;cause spaghetti codes&lt;/strong&gt;. It will complexicate your method codes by having to place many error checking codes. 2) &lt;strong&gt;Agreements on what each error value means must be established&lt;/strong&gt; between the author and the user of the method. And if the same meaning of an error value must be used among more than one method, the global agreement is hard to be established. For instance:&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;return -1, if the passed in argument &lt;&gt;&lt;/p&gt; &lt;p&gt;3) For the client code, &lt;strong&gt;it is not enforced to handle any exceptional conditions&lt;/strong&gt;. In other words, it’s completely up to the client programmer whether or not to handle any exceptional conditions. 4) In addition, even exceptional conditions are to be handled, &lt;strong&gt;duplicate codes must be written for each call of the mehod&lt;/strong&gt;, that is, several calls to the same method requires several times of handling several same kind of exceptional conditions which means codes for handing exceptional conditions can’t be centralized and thus be reused. 5) More worse, handling exceptions must usually be followed immediately after recieving the error values, regardless of whether or not the then’s current context can provide enough information to handle the exceptions. That is, i&lt;strong&gt;t is hard to propagate the exception to the right level of abstraction only on which such exceptions can be properly handled&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Exception handling style&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Utilize dedicated constructs, such as Exception types, to represent the exceptions and collect information about the exceptional conditions, and handle exceptions based on information wrapped in such constructs. &lt;/p&gt; &lt;p&gt;-&lt;strong&gt;pros and cons&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;pros: 1) &lt;strong&gt;Exceptions and their handling are standardized&lt;/strong&gt; as part of the features of a programming language that are distinguished from other features of that language. Handling some kinds of exceptions are enforced by the compiler, which means the learning curve are to some degree flattened. It less depends on the experiences, but are forced to be done. 2) &lt;strong&gt;Agreements on what exception means are easily established by the kind of dedicated constructs&lt;/strong&gt;. And global reuse of these agreements needs no extra effort. 3) Though, it will stil cause spaghetti codes, it is alleviated by exception handling mechanism enabling that some exceptional conditions (such as access members on a null reference) are automatically notified in the standard way which means &lt;strong&gt;less error checking codes are needed&lt;/strong&gt;. 4) Exceptions notifying and handling are loosely coupled, that is, identifying exceptions and handling them can be at two point far away from each othe in the control flow. This also means it is easy to propagate exceptions to the right level of abstraction on which such exceptions can be properly handled. 5) Due to easily propagating exceptions, &lt;strong&gt;handling the same kind of exceptions can be centralized&lt;/strong&gt;, for which someone argues that unexpected performance benefits will be get as opposed to old-fashioned error values way.&lt;/p&gt; &lt;p&gt;cons: 1) Extra runtime overhead are needed to notify and handle exceptions for which at the implementation level,&lt;strong&gt; extra transfer of control is needed&lt;/strong&gt;.  2) &lt;strong&gt;Client codes are complicated by exceptions handler codes&lt;/strong&gt; which are more obvious if exceptions notifying are misued and/or overused.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Design by contract&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;A contract is established, explicitly or implicitly, between a module and the user (client code) of the module. Any side must comform to the contract at any time, under any circumstance. The contract consists of precondition, invariant and postcondition. Whenever wherever the module is called (used) the precondition must be met, and after executing the module, the postcondition must be met. In the whole process the invariant must always be met. &lt;strong&gt;Obligations and benefits for both parties are specified&lt;/strong&gt;. It is the obligation of the client to ensure the precondition is met before calling the module, and that of the module to ensure the invariant and postcondition are met. So any party is committed to its obligation regardless of the other party’s obligation.&lt;/p&gt; &lt;p&gt;More specificly, the client will check and ensure the precondition is met before it calling the module, so on most occassions, no exception mechanism is needed.  &lt;strong&gt;Because if the contract is always conformed to, no exceptions are foreseen&lt;/strong&gt;. But, usually, &lt;strong&gt;extra mechanism, such as assertion, is needed to help tell and/or check whether or not the contract is conformed to&lt;/strong&gt;. However, even no such extra mechanism is provided, &lt;strong&gt;the idea behind DBC can also be used to prevent from overusing exceptions&lt;/strong&gt; which may be caused by defensive programming. In general, DBC is sometimes considered to be a formal method.&lt;/p&gt; &lt;p&gt;p.s., the DBC community considers returning error values and exception handling two rivals &lt;img src="http://my.donews.com/kenyth/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Defensive programming&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The philosophy of defensive programming can be summed up as: Better to check too much, or check redundantly, than to check little. This is in contrast to DBC which advocates guaranteeing more by checking less. It is conceivable that defensive programming is caused because the contract in DBC is not established at all. Actually, defensive programming goes to another extreme. It assumes that the other party never burden its obligation, such as ensuring the precondition, so the module will itself burden others’ obligations, such as checking for the precondition. This is mainly responsible for complexity and obscureness of codes. For instances, we have a module:&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;int sqrt( int num )&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;{&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;   if &lt;strong&gt;precondition is met&lt;/strong&gt; then&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;    solve the problem; return …&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;    else return …&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;}&lt;/span&gt;&lt;/p&gt; &lt;p&gt;and we have a snippet of client codes to call that module:&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;if &lt;strong&gt;preondition for sqrt( .. ) is met&lt;/strong&gt; then&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="color:#8000ff;"&gt;call sqrt( .. );&lt;/span&gt;&lt;/p&gt; &lt;p&gt;Pseudocodes in bold are caused by defensive programming. This way of programming are extensively common.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Exception handling in Java&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;When an exception is thrown, the JVM will transfer the control from the point where the exception occur to the point that can be specified by the programmer. During the process, the JVM abruptly completes, one by one, any expressions, statements, method and constructor invocations, static initializers, and field initialization expressions that have begun but not yet completed the execution in the current thread. The process continues until a handler for the thrown exception is found. If no such handler is found, then the method &lt;strong&gt;uncaughtException&lt;/strong&gt; is invoked for the &lt;strong&gt;ThreadGroup&lt;/strong&gt; that is the parent of the current thread.&lt;/p&gt; &lt;p&gt;If a &lt;code&gt;finally&lt;/code&gt; clause is executed because of abrupt completion of a &lt;code&gt;try&lt;/code&gt; block and the &lt;code&gt;finally&lt;/code&gt; clause itself completes abruptly, then &lt;strong&gt;the reason for the abrupt completion of the &lt;code&gt;try&lt;/code&gt; block is discarded and the new reason for abrupt completion is propagated from there&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;If a method throws an exception, it must assume that exception is “caught” and dealt with. One of the advantages of Java exception handling is that it allows you to concentrate on the problem you’re trying to solve in one place, and then deal with errors from that code in another place.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Goal of exception handling&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Make your program more reliable, robust and error-tolerant. Usually, it provides measures for you to be notified of the exceptional condition and recover from that condition.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Best practices in Exception handling&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Below are some best practices in exception handling citing from the book “Effective Java”.&lt;/p&gt; &lt;p&gt;-Use exceptions only for exceptional condition&lt;/p&gt; &lt;p&gt;Prevent from overusing exception.&lt;/p&gt; &lt;p&gt;-Use checked exceptions for recoverable conditions and runtime exceptons for programming errors&lt;/p&gt; &lt;p&gt;Three kinds of exceptions: checked exception, unchecked exception and errors. By convention, errors must be used only by JVM. &lt;strong&gt;Programming errors may be considered to fail to fullfill the contract&lt;/strong&gt; and are generally unrecoverable.&lt;/p&gt; &lt;p&gt;-Avoid unnecessary use of checked exceptions&lt;/p&gt; &lt;p&gt;Two reasons: first, exceptions handling needs extra runtime overhead; second, checked exceptions are forced to be caught which would complexicate your client code. This to some degree conforms to DBC by advocating the client code calls state-testing methods which actually is to ensure the precondition.&lt;/p&gt; &lt;p&gt;-Prefer standard exceptions over user-defined exceptions&lt;/p&gt; &lt;p&gt;For learning curve about your codes,  understanability and portability of your codes.&lt;/p&gt; &lt;p&gt;-Throw exceptions appropriate to the abstraction&lt;/p&gt; &lt;p&gt;Exception translation, Exception chain.&lt;/p&gt; &lt;p&gt;-Document all exceptions thrown by each method&lt;/p&gt; &lt;p&gt;Javadoc style, or declaration using the keyword throws which is also called the exception specification.&lt;/p&gt; &lt;p&gt;Exceptions as a part of the specification of a method.&lt;/p&gt; &lt;p&gt;-Include failure-capture information in detail message&lt;/p&gt; &lt;p&gt;Refers to the goal of exception handling&lt;/p&gt; &lt;p&gt;-Strive for failure atomicity&lt;/p&gt; &lt;p&gt;Refers to the goal of exception handling&lt;/p&gt; &lt;p&gt;-Don’t ignore exceptions&lt;/p&gt; &lt;p&gt;No empty catch block.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Other guidelines&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;-User visible error message should not be the same as the failure message wrapped in the exception object (&lt;strong&gt;needs further investigation&lt;/strong&gt;). The latter are only for programmer to debug the program.&lt;/p&gt; &lt;p&gt;-Don’t assume the way which the client codes burden their obligation and/or the degree to which they burden their obligations. However, unfortunately, defensive programming is often needed, though you should try your best to avoid.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;u&gt;Resources&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;Chapter 8 Exceptions, Effective Java.  &lt;/li&gt;&lt;li&gt;2.16 Exceptions, Java Virtual Machine Spec.  &lt;/li&gt;&lt;li&gt;Chapter 10 Error Handling with Exceptions, Thinking in Java 2nd version.  &lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://archive.eiffel.com/doc/manuals/technology/contract/"&gt;Building bug-free O-O software: An introduction to Design by Contract(TM)&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.computing.dcu.ie/research/papers/1999/3099.html"&gt;Design By Contract&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.csc.calpoly.edu/%7Edstearns/SeniorProjectsWWW/Rideg/dbc.html"&gt;Design By Contract (DBC)&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-8042905756458177625?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/05/03/exception-as-non-exception/' title='Exception as Non-Exception'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/8042905756458177625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=8042905756458177625' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8042905756458177625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8042905756458177625'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/exception-as-non-exception.html' title='Exception as Non-Exception'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-7499498593233482744</id><published>2007-04-30T18:30:00.000+08:00</published><updated>2007-05-03T18:31:14.701+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Java基础复习</title><content type='html'>&lt;span class="ztagspace"&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/span&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;基本上是按照网上流传甚广的一套Java的面试题目来的，一个一个问题回答。&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;strong&gt;谈谈final、finally、finalize的区别&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;/span&gt; 其实除了名字类似，是不沾边的三个东西。&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;final&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Final is a keyword that can be used for classes, methods and data ( field / arguments ). It means what it modifies can’t be changed anymore. For final classes, they can’t be extended or derived; for final methods, the method’s behavior can’t be changed by overridden; for final data, they can only be initialized once and not be assigned values any more. But remember there’re two reasons for preventing change: design or efficiency.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&gt; final methods&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;There’re two reasons why you make a method final: 1) quite small final method can be inlined when they’re called which is more efficiently; 2) you don’t want a method to be explicitly overridden.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Private methods are considered to be implicitly final, because in whatever cases, you can’t access or override a private method.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&gt; final data&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;A misconception ( maybe it’s only mine : ) is that declaring data to be final doesn’t necessarily mean that its value is known at compile-time. The value can be run-time determinable. And data can also be declared to be final without any initialization value. In this case the final datum is called blank final field which has to be initialized in constructor or static initializer, or somewhere before use.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&gt; final classes&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Defining classes as final simply prevents inheritance — nothing more. Since a class declared to be final can’t be inherited, all its methods are implicitly final and the complier can opt to bring efficiency for you as with other explicitly final methods.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;finally&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Finally is to do with Exception handling which can introduce a piece of code that you want to execute whether or not an exception is thrown within a try blok or catched in a catch block.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;finalize&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Finalize which is the name of a method of Object is to do with garbage collection, that is to do with memory release. Garbage collection in java is a two-pass process. In the first pass in which case the object is eligible for garbage-collected, garbage collector will call finalize(), and in the second pass in which case the running programm may reach the point of runing out memory, garbage collector may physically release memeory of eligible objects. So the storage of a finalized object isn’t necessarily get released.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;Anonymous Inner Class （匿名内部类） 是否可以extends（继承）其它类，是否可以implements（实现）interface（接口）&lt;/strong&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;The answer is yes for both cases.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Inner class &lt;strong&gt;constructors get passed a hidden parameter&lt;/strong&gt;, a reference to the outer class object that created them. static nested classes don’t have this hidden parameter. This is analogous to the way instance methods have hidden this parameter, where static methods do not.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;b&gt;Inner classes are not permitted to have static methods or fields.&lt;/b&gt; That is not quite true. They are allowed static final compile time constants, which are treated as if there were literals. If inner classes need statics, they have to get the outer class to hold them, or you have to use static nested classes or you have to inherit the static fields. Oddly, inner classes are permitted to extend classes that do have static methods and fields.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Anonymous inner class can’t define constructors. An anonymous inner class implements an interface, say, ITest, by:&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;new ITest() { .. }&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;and extends a class, say, Test, by:&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;new Test( name) { .. }&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;where Test( String name ) is an &lt;strong&gt;non-default constructor&lt;/strong&gt; of Test, and default constructor can’t be used here!&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;For which kind of classes an anonymous class can extend / implement, refer to &lt;a set="yes" href="http://mindprod.com/jgloss/nestedclasses.html"&gt;nested classes : Java Glossary&lt;/a&gt;.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;Static Nested Class 和 Inner Class的不同&lt;/strong&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Differs in creating instance of them, and linking with the outter class /instance.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;&amp;和&amp;amp;&amp;的区别&lt;/strong&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&amp;amp; is bitwise AND ( 位与) operator,  while &amp;&amp;amp; is logical AND (逻辑与) operator.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;Shift operators&lt;/strong&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;The left-shift operator( &lt;&lt; ) produces the operand to the left of the operator shifted to the left by the number of bits specified after the operator( inserting zeroes at the lower-order bits ). The signed right-shift operator( &gt;&gt; ) produces the operand to the left of the operator shifted to the right by the number of bits specified after the operator( inserting zeroes / ones at the higher-order bits ). There’s an unsigned right-shift operator( &gt;&gt;&gt; ) will produces results inserting zeroes at the higher-order bits regardless of the sign. &lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Shift operators can be combined with equl sign, such as, &lt;&lt;=, &gt;&gt;=, and &gt;&gt;&gt;=.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;Talk about collection framwork in Java 2&lt;/strong&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Main interfaces: Collection, List, Set, Map. There’re actually &lt;strong&gt;only three collections List, Set and Map&lt;/strong&gt;, and only two or three implementations of each one. And &lt;strong&gt;Map is not derived from Collection&lt;/strong&gt;. The reason putting it the collection framwork is because a Map can produce collections from its key set and value list. Refer to chaper 9 of Thinking in Java 2nd version and Sun’s Java library for full details.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;All collection implementation requires type checking ( especially with generic feature in Java 5 ) or bounds checking, or both.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Vector is synchronized, which means it’s thread-safe.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;ArrayList is much like an array except it is variant-sized which brings extra run-time overhead.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;The &lt;strong&gt;List interface&lt;/strong&gt; provides four methods for positional (indexed) access to list elements. Note that these operations may execute in time proportional to the index value for some implementations (the LinkedList class, for example). Thus, &lt;strong&gt;iterating over the elements in a list is typically preferable to indexing through it if the caller does not know the implementation&lt;/strong&gt;.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;For the &lt;strong&gt;Set interface&lt;/strong&gt;, a speicial case of prohibition is that it is not permissible for a set to contain itself as an element.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt; &lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;Diff between Collection and Collections&lt;/strong&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;First Collections is the name of a&lt;strong&gt; conceptual framework&lt;/strong&gt; coined by the designers of Java to represent a collection of interfaces and / or classes that enables an object holding a group of objects and variaous operations on it. It is generally called the &lt;strong&gt;collections framework ( or container classes before Java 2 )&lt;/strong&gt;.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Collection as a type name is the name of an interface which is &lt;strong&gt;the root of the collecitons framework hierarchy&lt;/strong&gt; and is located at package &lt;strong&gt;java.util&lt;/strong&gt;. While it is the root of the collection hierarchy, there’re some collection classes that aren’t rooted from it, such as Map.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;While Collections is a class also located in the package java.util which consists of a variety of static methods that operate on or return collections. This is common technique used to &lt;strong&gt;organize a bunch of related PO paradigm interfaces*&lt;/strong&gt; ( may be not types, but methods ) into one module supported by OOP paradigm to improve the modularity and/or accessability of such interfaces*. In some cases, this is called the &lt;strong&gt;facade design pattern&lt;/strong&gt;. Similar classes examplifying this techinque are Arrays, Math, etc.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;Diff between HashMap and HashTable&lt;/strong&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;String, StringBuffer, and StringBuilder&lt;/strong&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;String&lt;/strong&gt; class represents character strings. All string literals ( e.g., “Kenyth” ) in Java program are implemented as instances of String class. &lt;strong&gt;Strings are constant, namely immutable&lt;/strong&gt;, as opposed to mutable StringBuffers. Their values can’t be changed after they’re created, which makes they can be shared ( refer to a compiler theory book about handling of constants ). And any modification to a String will produce a new instance of String, explicitly or implicitly. Concatenation of String is implemented as operations on StringBuffer( see the class file bytecode ), and conversions from an object to String is facilitated by the toString() method defined in Object class.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;StringBuffer&lt;/strong&gt; class represents a sequence of characters. It is &lt;strong&gt;mutable&lt;/strong&gt;. It allows for data being appended to and inserted into it. It is thread-safe.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;StringBuilder&lt;/strong&gt; is like StringBuffer, but is not intended to be used by multi threads, that is not synchronized, or not thread-safe. It is &lt;strong&gt;introduced as of Java 5&lt;/strong&gt;.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;When to use assert&lt;/strong&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;( Actually I’ve never used this keyword in my programming ) For the full details refer to Sun’s official document &lt;a href="http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html"&gt;Programming With Assertions&lt;/a&gt;.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Simply speaking, assert in Java provides you a debugging facility similar to macros in C/C++. You can enable/disable your assertions when starting your program by passing in JVM command-line arguments ea/da. However, by default assertions are disabled at run-time.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;There’s one guideline for deciding where/when to use assert that you &lt;strong&gt;should never use it for what your programming code do, such as method contract enforcement&lt;/strong&gt;. Because since it is just a helper tool for debugging / observing your program and can be disabled, you must not depend the functionalities of your program on it.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#c0c0c0;"&gt;more are coming soon…&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;Thinking in java version 2.  &lt;/li&gt;&lt;li&gt;&lt;a href="http://dev.cbw.com/java/j2ee/20056305404_4107281.shtml"&gt;JAVA面试题目（去了两家公司，都是这样的题目）&lt;/a&gt; ：一个很好的问题导向的复习提纲。  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.frontfree.net/articles/services/view.asp?id=704&amp;page=1"&gt;初识Java内部类&lt;/a&gt;：关于内部类的好处，静态内部类以及非静态内部类。   &lt;/li&gt;&lt;li&gt;&lt;a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4351453"&gt;`final’ variables and inner classes&lt;/a&gt;: explains why access from anonymous inner class to non-final outter variables is not allowed.   &lt;/li&gt;&lt;li&gt;&lt;a href="http://mindprod.com/jgloss/nestedclasses.html"&gt;nested classes : Java Glossary&lt;/a&gt;: contains very detailed explanation of the terms nested  / inner class and their usages.  &lt;/li&gt;&lt;li&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html"&gt;Programming With Assertions&lt;/a&gt; &lt;div class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;/span&gt; &lt;/div&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;Technorati&lt;/span&gt; : &lt;a class="ztag" href="http://technorati.com/tag/basics" rel="tag"&gt;basics&lt;/a&gt;, &lt;a class="ztag" href="http://technorati.com/tag/java" rel="tag"&gt;java&lt;/a&gt;, &lt;a class="ztag" href="http://technorati.com/tag/programming" rel="tag"&gt;programming&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Del.icio.us&lt;/span&gt; : &lt;a class="ztag" href="http://del.icio.us/tag/basics" rel="tag"&gt;basics&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/java" rel="tag"&gt;java&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/programming" rel="tag"&gt;programming&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-7499498593233482744?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/04/30/java%e5%9f%ba%e7%a1%80%e5%a4%8d%e4%b9%a0-2/' title='Java基础复习'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/7499498593233482744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=7499498593233482744' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/7499498593233482744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/7499498593233482744'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/04/java.html' title='Java基础复习'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-4417781077286089218</id><published>2007-04-20T18:26:00.000+08:00</published><updated>2007-05-03T18:29:46.058+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='OSGi'/><category scheme='http://www.blogger.com/atom/ns#' term='component oriented'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><title type='text'>The Architecture of Eclipse</title><content type='html'>&lt;span class="ztagspace"&gt;&lt;strong&gt;&lt;em&gt;Introduction&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;If explaining every bit in detail, you must be missed in the details and can’t see the architecture from a global perspective, nor will you be benifited in your practise. So I’m trying to &lt;strong&gt;explain the architecture based on senarios&lt;/strong&gt; such as what will happen when you startup elipse, what will happen when an action that you contribute is fired, etc. I hope in such a way it will do help in your practice with Eclipse.&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;And, it is worthy to point out this is &lt;strong&gt;not an overview on the architecture of Eclipse&lt;/strong&gt; for which there are tons of articles written about.&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;strong&gt;&lt;em&gt;Startup of Eclipse&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;What will happen when the file eclipse.exe is executed.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;Startup of Eclilpse begins by running a system specific executable binary file called eclilpse.exe which is located under the root directory of the eclipse installation. This executable will then lauches the &lt;strong&gt;org.eclipse.core.launcher.Main&lt;/strong&gt;, located in startup.jar. After that the entry point of Main, that is static main method of Main is invoked. Below we will illustrate the calling path of important methods to demonstrate the post startup process of Eclipse.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;Main.run( args )&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;Main.basicRun( args )&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;Main.getBootPath( .. ) : locate boot plugin ( in “plugin” directory of your eclispe installation ), within which Main.getDevPath( .. ) is called, within which Main.addBaseJars( .. ) is called, within which Main.readFrameworkExtensions( .. ) is called; invokeFramework( .. ): &lt;strong&gt;invoke EclipseStarter&lt;/strong&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;the class &lt;strong&gt;EclipseStarter&lt;/strong&gt; ( indicated by STARTER field ) is loaded by a URLClassLoader defined as an inner class with Main; EclipseStarter.run( .. ) is invoked in a reflective way&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;EclipseStarter.startup( .. ) : starts the platform and sets it up to run a single application&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;OSGi.new( .. ) : an instance of OSGi service platform is created&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;OSGi.launch() : &lt;strong&gt;start the OSGi framework&lt;/strong&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;Framework.launch()&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;SystemBundle.resume() : &lt;strong&gt;SystemBundle&lt;/strong&gt; subclasses Bundle to provide a system Bundle so that the framework can be represented as bundle&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;StartLevelManager.launch( .. ) : StartLevelManager is the startLevel service implementation for the OSGi spec&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;StartLevelManager.doSetStartLevel( .. )&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;StartLevelManager.incFWSL( .. )&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;StartLevelManager.getInstalledBundles( .. ) : Build an array of all installed bundles to be launch; StartLevelManager.loadInstalledBundles( .. ) : Load all bundles; StartLevelManager.resumeBundles( .. )&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;Framework.systemBundle.context.start() : Framework. :SystemBundle. :&lt;strong&gt;BundleContextImpl&lt;/strong&gt;.start(), start the system bundle, BundleContextImpl.start() calls bundle’s BundleActivator.start()&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;BundleHost.loadBundleActivator() : Load and instantiate bundle’s BundleActivator class&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;BundleContextImpl.startActivator( .. ) : &lt;strong&gt;calls the start method of a BundleActivator which you have to extend when you create a plug-in&lt;/strong&gt;.&lt;/u&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;strong&gt;Eclispe can also be started from with a client &lt;/strong&gt;( which is not part of the current Eclipse platform ), say, written in java, by using the &lt;strong&gt;EclispeStarter&lt;/strong&gt; class located in org.eclipse.core.runtime.adaptor.&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;strong&gt;&lt;em&gt;Action delegate and proxy&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;What will happen when your contributed action is fired.&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;strong&gt;Adding an action in a programatic way is different from adding it via contribution to an action extension point&lt;/strong&gt;. For the former case, you have to implement some special API to create an action directly, while for the latter case you will have to only implement IActionDelegate+ which enables the lazy loading of the action.&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;At startup the registry is read and a &lt;strong&gt;PluginAction&lt;/strong&gt;( extends Action, implements *Selection*Listener, IPluginContribution ) is created for each action extension point. The instance of PluginAction is an &lt;strong&gt;action proxy&lt;/strong&gt; which directly represent an action in run time but doesn’t do the job a real action does. When the action that the action proxy represents is fired, the real action( the &lt;strong&gt;action delegate&lt;/strong&gt; ) is created by the action proxy. After that point the action proxy delegate everything that is requested to the real action, the action delegate. This mechanism makes it possible to load the action extension lazily which is called &lt;strong&gt;lazy loading&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;Following depicts the flow of action proxy and delegate:&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;span style="color:#8000ff;"&gt;&lt;u&gt;read from registry ( IExtensionRegistry ) -&gt; a PluginAction created for each action extension point ( while the action is fired -&gt; an action delegate created -&gt; action is delegated )&lt;/u&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;strong&gt;&lt;em&gt;Contribute an Extension&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;span style="color:#c0c0c0;"&gt;to be continued…&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;strong&gt;&lt;em&gt;Extension Pattern&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;Adapter pattern is extensively used in Eclipse to contribute extensions ( different from extensions to extension point ) to type or instance. This mechanism is enabled mainly by implementing &lt;strong&gt;IAdaptable&lt;/strong&gt; and IAdapterFactory. For the detailed explanation with examples, please refer to Chapter 31 of the book &lt;a href="http://www.amazon.com/exec/obidos/ASIN/0321205758/qid%3D1101827580/sr%3D11-1/ref%3Dsr%5F11%5F1"&gt;Contributing to Eclipse: Principles, Patterns, and Plugins (Paperback)&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;strong&gt;&lt;em&gt;Resources&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;a href="http://www.manageability.org/blog/stuff/the-architecture-of-eclipse/view"&gt;The Architecture of Eclipse&lt;/a&gt;. This article refers to and linked to a lot of valuable resources.  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.developer.com/java/other/article.php/10936_3316241_1"&gt;A First Look at Eclipse Plug-In Programming&lt;/a&gt;. Contains a very detailed comparsion between Sun’s awt and swing and Eclipse’s SWT and JFace and anatomy of the process of Eclispe startup. &lt;div class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;/span&gt;&lt;/div&gt; &lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://www.osgi.org/documents/collateral/TechnicalWhitePaper2005osgi-sp-overview.pdf"&gt;About the OSGi Service Platform - Technical Whitepaper Revision 4.0&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;org.eclipse.osgi_3.2.2.R32X_v20070118.jar : org.eclipse.core.runtime.adaptor.EclipseStarter.class source code, org.eclipse.osgi.framework.internal.core.AbstractBundle.class source code, org.eclipse.osgi.framework.internal.core.BundleContextImpl.class source code, org.eclipse.osgi.framework.internal.core.BundleHost.class source code, org.eclipse.osgi.framework.internal.core.Framework.class source code, org.eclipse.osgi.framework.internal.core.OSGi.class source code, org.eclipse.osgi.framework.internal.core.StartLevelManager.class source code, org.eclipse.osgi.framework.internal.core.SystemBundle.class source code, org.osgi.framework.BundleActivator.class source code. &lt;/li&gt;&lt;li&gt;org.eclipse.ui.workbench_3.2.2.M20070119-0800.jar source code.  &lt;/li&gt;&lt;li&gt;eclipse 3.2.2 startup.jar : org.eclilpse.core.launcher.Main.class source code.  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/exec/obidos/ASIN/0321205758/qid%3D1101827580/sr%3D11-1/ref%3Dsr%5F11%5F1"&gt;Contributing to Eclipse: Principles, Patterns, and Plugins (Paperback)&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;Eclipse Help&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;span style="color:#c0c0c0;"&gt;to be continued…&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;Technorati&lt;/span&gt; : &lt;a class="ztag" href="http://technorati.com/tag/Architectrue" rel="tag"&gt;Architectrue&lt;/a&gt;, &lt;a class="ztag" href="http://technorati.com/tag/OSGi" rel="tag"&gt;OSGi&lt;/a&gt;, &lt;a class="ztag" href="http://technorati.com/tag/component%20oriented" rel="tag"&gt;component oriented&lt;/a&gt;, &lt;a class="ztag" href="http://technorati.com/tag/eclipse" rel="tag"&gt;eclipse&lt;/a&gt;, &lt;a class="ztag" href="http://technorati.com/tag/java" rel="tag"&gt;java&lt;/a&gt;, &lt;a class="ztag" href="http://technorati.com/tag/open%20source" rel="tag"&gt;open source&lt;/a&gt;, &lt;a class="ztag" href="http://technorati.com/tag/plug-in" rel="tag"&gt;plug-in&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Del.icio.us&lt;/span&gt; : &lt;a class="ztag" href="http://del.icio.us/tag/Architectrue" rel="tag"&gt;Architectrue&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/OSGi" rel="tag"&gt;OSGi&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/component+oriented" rel="tag"&gt;component oriented&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/eclipse" rel="tag"&gt;eclipse&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/java" rel="tag"&gt;java&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/open+source" rel="tag"&gt;open source&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/plug-in" rel="tag"&gt;plug-in&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-4417781077286089218?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/04/20/the-architecture-of-eclipse/' title='The Architecture of Eclipse'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/4417781077286089218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=4417781077286089218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/4417781077286089218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/4417781077286089218'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/04/architecture-of-eclipse.html' title='The Architecture of Eclipse'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-6844258440638342110</id><published>2007-04-19T18:24:00.000+08:00</published><updated>2007-05-03T19:47:22.510+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='font'/><category scheme='http://www.blogger.com/atom/ns#' term='web browser'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Knowledge on font size</title><content type='html'>&lt;span class="ztagspace"&gt;&lt;strong&gt;声明：全部摘抄自网络资源，准确性和完整性不能保证，请读者自己辨别。&lt;/strong&gt;&lt;/span&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;一种字体（font）是一组字形（glyph）的集合，每一个字形代表了特定字样（typeface）的字符集（character set）里面的一个字符。&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;A &lt;a href="http://www.proxyhub.co.uk/index.php?q=uggc%3A%2F%2Fra.jvxvcrqvn.bet%2Fjvxv%2FSbag_%2528glcbtencuvp_grez%2529"&gt;font&lt;/a&gt; is a set of glyphs (images) representing the characters from a particular &lt;a href="http://www.proxyhub.co.uk/index.php?q=uggc%3A%2F%2Fra.jvxvcrqvn.bet%2Fjvxv%2FPunenpgre_frg"&gt;character set&lt;/a&gt; in a particular typeface. In professional typography the term &lt;i&gt;typeface&lt;/i&gt; is not interchangeable with the word &lt;i&gt;font&lt;/i&gt;, which is defined as a given alphabet and its associated characters in a &lt;i&gt;single&lt;/i&gt; size. For example, 8-point Caslon is one font, and 10-point Caslon is another. Historically, fonts came in specific sizes determining the size of characters, and in quantities of &lt;i&gt;sorts&lt;/i&gt; or number of each letter provided. The design of characters in a font took into account all these factors.&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;strong&gt;Measurement of font size&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;Point (pt, 磅)&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;在排版印刷中1pt是最小的测量单位， 12pt是1pica，具体是多长视情况而定。传统的排版印刷中1pt可能在0.18到0.4mm之间，这依赖于对foot的定义，现代的桌面出版中 （Desktop Publishing Point）1pt是1/72inch，也就是约0.3527mm，所以6pica是1inch。&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;Pixel（像素）&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;Inch（英寸）&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;millimeter（毫米）&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;strong&gt;Commonly used font size&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;9pt = 12px = 小五号&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;1pt = 4/3px&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;MS WORD中最大能定义1638pt大小的字体！&lt;/span&gt;&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;下表是字号与磅以及毫米之间的对应关系，并附以字样，以供大家在排版或调整布局时使用。&lt;br /&gt;&lt;img src="http://image2.sina.com.cn/IT/c/2003-01-02/1_2-68-897-8_20030102103153.jpg" /&gt;  &lt;/p&gt; &lt;p&gt;&lt;strong&gt;HTML和CSS中用的font size属性&lt;/strong&gt;  &lt;/p&gt; &lt;p&gt;Syntax: font-size: &lt;absolute-size&gt; | &lt;relative-size&gt; | &lt;length&gt; | &lt;percentage&gt;&lt;br /&gt;Possible Values:  &lt;/percentage&gt;&lt;/length&gt;&lt;/relative-size&gt;&lt;/absolute-size&gt;&lt;/p&gt; &lt;p&gt;* &lt;absolute-size&gt;&lt;br /&gt;o xx-small | x-small | small | medium | large | x-large | xx-large&lt;br /&gt;* &lt;relative-size&gt;&lt;br /&gt;o larger | smaller&lt;br /&gt;* &lt;length&gt;&lt;br /&gt;* &lt;percentage&gt; (in relation to parent element)  &lt;/percentage&gt;&lt;/length&gt;&lt;/relative-size&gt;&lt;/absolute-size&gt;&lt;/p&gt; &lt;p&gt;Both &lt;em&gt;relative&lt;/em&gt; and &lt;em&gt;absolute&lt;/em&gt; length units are supported in CSS1. Relative units give a length relative to another length property, and are preferred since they will better adjust to different media. The following relative units are available: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;em&lt;/strong&gt; (ems, the height of the element’s font)  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;ex&lt;/strong&gt; (x-height, the height of the letter “x”)  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;px&lt;/strong&gt; (pixels, relative to the canvas resolution) &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Absolute length units are highly dependent on the output medium, and so are less useful than relative units. The following absolute units are available: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;in&lt;/strong&gt; (inches; 1in=2.54cm)  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;cm&lt;/strong&gt; (centimeters; 1cm=10mm)  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;mm&lt;/strong&gt; (millimeters)  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;pt&lt;/strong&gt; (points; 1pt=1/72in)  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;pc&lt;/strong&gt; (picas; 1pc=12pt) &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;要注意的是，相同大小的字体在不同的具体环境下显示出来的字体的真实大小可能不一样，差别比较小的可能是用px度量的大小。&lt;/p&gt; &lt;p&gt;关于x-height的定义可以看&lt;a href="http://www.proxyhub.co.uk/index.php?hl=0011110001&amp;q=uggc%3A%2F%2Fra.jvxvcrqvn.bet%2Fjvxv%2FFcrpvny%3AFrnepu%3Ffrnepu%3Dsbag%26fbheprvq%3Dzbmvyyn-frnepu#Font.2C_typeface_and_type_family"&gt;Typeface&lt;/a&gt;中的解释，简要的说是，对每一个字体都有一个假想的水平线叫baseline（想想小时候练习写英文字母的时候每一行都有三条或者四条横线那种作业本），x-height就是从baseline到字体最高处的高度。&lt;/p&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;a href="http://htmlhelp.com/reference/css/font/font-size.html"&gt;Font Size&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.proxyhub.co.uk/index.php?hl=0011110001&amp;amp;q=uggc%3A%2F%2Fra.jvxvcrqvn.bet%2Fjvxv%2FFcrpvny%3AFrnepu%3Ffrnepu%3Dsbag%2Bfvmr%2B%26fbheprvq%3Dzbmvyyn-frnepu"&gt;Point (typography)&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.proxyhub.co.uk/index.php?hl=0011110001&amp;q=uggc%3A%2F%2Fra.jvxvcrqvn.bet%2Fjvxv%2FFcrpvny%3AFrnepu%3Ffrnepu%3Dsbag%26fbheprvq%3Dzbmvyyn-frnepu#Font.2C_typeface_and_type_family"&gt;Typeface&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://webdesign.chinaitlab.com/css/376665.html"&gt;CSS改变字体大小而不影响网页&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://bbs.5qzone.net/read.php?tid=412349&amp;amp;keyword="&gt;【知识】字体中“号”“磅”及“毫米”的关系&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://htmlhelp.com/reference/css/units.html#length"&gt;Length Units&lt;/a&gt; &lt;div class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;&lt;/span&gt; &lt;/div&gt; &lt;/li&gt;&lt;/ol&gt; &lt;p class="zoundry_bw_tags"&gt;&lt;span class="ztagspace"&gt;Technorati&lt;/span&gt; : &lt;a class="ztag" href="http://technorati.com/tag/CSS" rel="tag"&gt;CSS&lt;/a&gt;, &lt;a class="ztag" href="http://technorati.com/tag/HTML" rel="tag"&gt;HTML&lt;/a&gt;, &lt;a class="ztag" href="http://technorati.com/tag/Web%20Browser" rel="tag"&gt;Web Browser&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Del.icio.us&lt;/span&gt; : &lt;a class="ztag" href="http://del.icio.us/tag/CSS" rel="tag"&gt;CSS&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/HTML" rel="tag"&gt;HTML&lt;/a&gt;, &lt;a class="ztag" href="http://del.icio.us/tag/Web+Browser" rel="tag"&gt;Web Browser&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Ice Rocket&lt;/span&gt; : &lt;a class="ztag" href="http://blogs.icerocket.com/tag/CSS" rel="tag"&gt;CSS&lt;/a&gt;, &lt;a class="ztag" href="http://blogs.icerocket.com/tag/HTML" rel="tag"&gt;HTML&lt;/a&gt;, &lt;a class="ztag" href="http://blogs.icerocket.com/tag/Web+Browser" rel="tag"&gt;Web Browser&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Flickr&lt;/span&gt; : &lt;a class="ztag" href="http://www.flickr.com/photos/tags/CSS" rel="tag"&gt;CSS&lt;/a&gt;, &lt;a class="ztag" href="http://www.flickr.com/photos/tags/HTML" rel="tag"&gt;HTML&lt;/a&gt;, &lt;a class="ztag" href="http://www.flickr.com/photos/tags/Web+Browser" rel="tag"&gt;Web Browser&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Zooomr&lt;/span&gt; : &lt;a class="ztag" href="http://beta.zooomr.com/photos/tags/CSS" rel="tag"&gt;CSS&lt;/a&gt;, &lt;a class="ztag" href="http://beta.zooomr.com/photos/tags/HTML" rel="tag"&gt;HTML&lt;/a&gt;, &lt;a class="ztag" href="http://beta.zooomr.com/photos/tags/Web%20Browser" rel="tag"&gt;Web Browser&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Buzznet&lt;/span&gt; : &lt;a class="ztag" href="http://www.buzznet.com/buzzwords/CSS" rel="tag"&gt;CSS&lt;/a&gt;, &lt;a class="ztag" href="http://www.buzznet.com/buzzwords/HTML" rel="tag"&gt;HTML&lt;/a&gt;, &lt;a class="ztag" href="http://www.buzznet.com/buzzwords/Web%20Browser" rel="tag"&gt;Web Browser&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-6844258440638342110?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/04/19/knowledge-on-font-size/' title='Knowledge on font size'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/6844258440638342110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=6844258440638342110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/6844258440638342110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/6844258440638342110'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/knowledge-on-font-size.html' title='Knowledge on font size'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-8977000610212821467</id><published>2007-03-21T18:23:00.000+08:00</published><updated>2007-05-03T19:46:48.174+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='jdt'/><title type='text'>newClasspathContainerEntry</title><content type='html'>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Setting Java project build path involves setting classpaths of the project which are different from the Java runtime classpath. In JDT classpaths are represented with classpath entries which roughly fall into five kinds: source folder entries, binary library entries, prerequisite project entries, classpath variables, and classpath containers.&lt;/p&gt; &lt;p&gt;Start you eclipse JDT, open a Java project and launch the build path configuration window, and you’ll find all the options enabling you to add/remove all kinds of classpath entries. The frequently used JAVA_HOME system variable (under Windows) can be considered as a classpath variable here. And for a classpath container, hereafter comes more.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Classpath Container&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Conceptually it is a data structure which represents a set of tupes with each in the form of &lt;ajavaproject,&gt;. An instance of this data structure can be referenced as an instance of IClasspathEntry which wrapped a unique path of type IPath called a container path. It is noteworthy that all kinds of classpath entries mentioned above are represented by instances of IClasspathEntry within which there is a field called kind identifying the kind of entries. And also, it is noteworthy that an instance of ClasspathContainer is not an instance of IClasspathEntry of kind container. Simply speaking, each instance of IClasspathEntry of kind container references as its member field a container path which uniquely identifies an instance of the data structure mentioned above which contains (or references) a set of instances of ClasspathContainer. Actually, it’s still a little complicated. But that’s it. Below is sketched the relationship.&lt;/ajavaproject,&gt;&lt;/p&gt; &lt;p&gt;IClasspathEntry(kind: container)-aContainerPath –&gt; &lt;acontainerpath,&gt;, …}&gt;.&lt;/acontainerpath,&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Ways of Creating Classpath Container Entries&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The implementation details are more complicated. Class or interfaces involved in include JavaModelManager, JavaCore, IClasspathEntry, ClassContainer, IClassContainerInitializer, and other Java Model classes. The set of tupes of the form of &lt;ajavaproject,&gt; are maintained in JavaModelManager.&lt;/ajavaproject,&gt;&lt;/p&gt; &lt;p&gt;Generally, there’re two ways of creating a classpath container entry. The 1st way is to hard code creating instances of ClasspathContainer, and the 2nd way is to create instances of ClasspathContainer via the lazily invoked classpath container initializer which you may define onto the extension point org.eclipse.jdt.core.classpathContainerInitializer.&lt;/p&gt; &lt;p&gt;&lt;em&gt;The hard code way:&lt;/em&gt;&lt;/p&gt; &lt;p&gt;// create an instance of IClasspathEntry of kind CPE_CONTAINER&lt;br /&gt;// but ClasspathContainer associated to this entry are not yet defined.&lt;br /&gt;JavaCore.newContainerEntry(..);&lt;br /&gt;…&lt;br /&gt;// Create and set the classpath container&lt;br /&gt;JavaCore.setClasspathContainer(..);&lt;br /&gt;…&lt;br /&gt;// Put container path, containers and projects into hashmaps.&lt;br /&gt;// Invoked in JavaCore.setClasspathContainer(..).&lt;br /&gt;JavaModelManager.containerPut(..)&lt;/p&gt; &lt;p&gt;&lt;em&gt;The initializer way:&lt;/em&gt;&lt;/p&gt; &lt;p&gt;// Contribute an extension to the initializer extension point.&lt;/p&gt; &lt;p&gt;When classpath entries contained in containers get resolved, the execution process is:&lt;/p&gt; &lt;p&gt;// Methods resolving classpath entries will get method getClasspathContainer(..) invoked.&lt;br /&gt;JavaCore.getClasspathContainer(..);&lt;br /&gt;…&lt;br /&gt;JavaModelManager.getClasspathContainer(..);&lt;br /&gt;…&lt;br /&gt;// Both ways would get this method invoked.&lt;br /&gt;JavaModelManager.containerGet(..);&lt;br /&gt;…&lt;br /&gt;// The initializer way would get this method invoked,&lt;br /&gt;// within which initializer extension(s) will be lazily invoked.&lt;br /&gt;JavaModelManager.initializeAllContainers(..);&lt;br /&gt;or JavaModelManager.initializeContainer(..);&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;a href="http://help.eclipse.org/help32/topic/org.eclipse.jdt.doc.isv/guide/jdt_api_classpath.htm"&gt;Setting the Java build path&lt;/a&gt;&lt;/li&gt;&lt;li&gt;JDT 3.2 Source Codes.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="zoundry_bw_tags"&gt;   &lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Technorati&lt;/span&gt; : &lt;a href="http://technorati.com/tag/Eclipse" class="ztag" rel="tag"&gt;Eclipse&lt;/a&gt;, &lt;a href="http://technorati.com/tag/JDT" class="ztag" rel="tag"&gt;JDT&lt;/a&gt;, &lt;a href="http://technorati.com/tag/classpath" class="ztag" rel="tag"&gt;classpath&lt;/a&gt;, &lt;a href="http://technorati.com/tag/java" class="ztag" rel="tag"&gt;java&lt;/a&gt;, &lt;a href="http://technorati.com/tag/plugin" class="ztag" rel="tag"&gt;plugin&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-8977000610212821467?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/03/21/newclasspathcontainerentry/' title='newClasspathContainerEntry'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/8977000610212821467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=8977000610212821467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8977000610212821467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8977000610212821467'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/newclasspathcontainerentry.html' title='newClasspathContainerEntry'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-5807227011886695025</id><published>2007-03-21T18:22:00.000+08:00</published><updated>2007-05-03T19:46:01.510+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='cdt'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='cpp'/><title type='text'>Eclipse CDT CPU Usage 100% Solution</title><content type='html'>&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;总的来说是把你的Eclipse使用的JRE换成6.0（早就download在机器上居然没有发现，2006.12.12就final release了，改成open source之后发布的速度快多了，现在都build100+了）的或者IBM的5.0实现，看别人的blog说是Sun的实现6.0以下有bug和 CDT不兼容，我试了BEA的Jrockit5，也是有问题。&lt;/p&gt; &lt;p&gt;换成6.0后，Indexer和Content Assist都没有问题了，不会CPU100%了。&lt;/p&gt; &lt;p&gt;另外，不像[1]里面说的CDT3.0才有问题，最新的CDT3.1.2也还是有这个问题。&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Bonus Knowledge&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Use something like “-vmargs -Xmx256M” when launching eclipse to use more memory.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;a set="yes" href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=108242"&gt;Bugzilla Bug 108242 Full Indexer in CDT3.0 extremely slow or does not work&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://www.javatang.com/archives/2007/01/28/202192.html"&gt;Eclipse3.2.1中使用CDT经常CPU100%问题的解决方法&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ykaiyan.blogchina.com/blog/5105624.html" target="_blank"&gt;Eclipse CDT开发C++速度慢的解决方法&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.sina.com.cn/u/493db3a4010007x0" target="_blank"&gt;CDT Indexer导致CPU 100%的解决办法&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.javaworld.com.tw/jute/post/view?bid=10&amp;id=138616&amp;amp;amp;tpg=1&amp;ppg=1&amp;amp;sty=1&amp;amp;age=0#138616"&gt;Eclipse+cdt+MinGW 建立C++工程問題&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p class="zoundry_bw_tags"&gt;   &lt;!-- Tag links generated by Zoundry Blog Writer. Do not manually edit. http://www.zoundry.com --&gt;&lt;br /&gt; &lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Technorati&lt;/span&gt; : &lt;a href="http://technorati.com/tag/Eclipse%20CDT" class="ztag" rel="tag"&gt;Eclipse CDT&lt;/a&gt;, &lt;a href="http://technorati.com/tag/JRE6" class="ztag" rel="tag"&gt;JRE6&lt;/a&gt;, &lt;a href="http://technorati.com/tag/Java" class="ztag" rel="tag"&gt;Java&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Del.icio.us&lt;/span&gt; : &lt;a href="http://del.icio.us/tag/Eclipse+CDT" class="ztag" rel="tag"&gt;Eclipse CDT&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/JRE6" class="ztag" rel="tag"&gt;JRE6&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/Java" class="ztag" rel="tag"&gt;Java&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Ice Rocket&lt;/span&gt; : &lt;a set="yes" href="http://blogs.icerocket.com/tag/Eclipse+CDT" class="ztag" rel="tag"&gt;Eclipse CDT&lt;/a&gt;, &lt;a href="http://blogs.icerocket.com/tag/JRE6" class="ztag" rel="tag"&gt;JRE6&lt;/a&gt;, &lt;a href="http://blogs.icerocket.com/tag/Java" class="ztag" rel="tag"&gt;Java&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Flickr&lt;/span&gt; : &lt;a set="yes" href="http://www.flickr.com/photos/tags/Eclipse+CDT" class="ztag" rel="tag"&gt;Eclipse CDT&lt;/a&gt;, &lt;a href="http://www.flickr.com/photos/tags/JRE6" class="ztag" rel="tag"&gt;JRE6&lt;/a&gt;, &lt;a href="http://www.flickr.com/photos/tags/Java" class="ztag" rel="tag"&gt;Java&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Zooomr&lt;/span&gt; : &lt;a set="yes" href="http://beta.zooomr.com/photos/tags/Eclipse%20CDT" class="ztag" rel="tag"&gt;Eclipse CDT&lt;/a&gt;, &lt;a set="yes" href="http://beta.zooomr.com/photos/tags/JRE6" class="ztag" rel="tag"&gt;JRE6&lt;/a&gt;, &lt;a set="yes" href="http://beta.zooomr.com/photos/tags/Java" class="ztag" rel="tag"&gt;Java&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Buzznet&lt;/span&gt; : &lt;a set="yes" href="http://www.buzznet.com/buzzwords/Eclipse%20CDT" class="ztag" rel="tag"&gt;Eclipse CDT&lt;/a&gt;, &lt;a href="http://www.buzznet.com/buzzwords/JRE6" class="ztag" rel="tag"&gt;JRE6&lt;/a&gt;, &lt;a set="yes" href="http://www.buzznet.com/buzzwords/Java" class="ztag" rel="tag"&gt;Java&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-5807227011886695025?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/03/21/eclipse-cdt-cpu-usage-100-solution/' title='Eclipse CDT CPU Usage 100% Solution'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/5807227011886695025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=5807227011886695025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/5807227011886695025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/5807227011886695025'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/eclipse-cdt-cpu-usage-100-solution.html' title='Eclipse CDT CPU Usage 100% Solution'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-1822200389700201302</id><published>2007-03-16T17:06:00.001+08:00</published><updated>2007-03-16T17:12:47.192+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='conference'/><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='aosd'/><category scheme='http://www.blogger.com/atom/ns#' term='aop'/><category scheme='http://www.blogger.com/atom/ns#' term='workshop'/><title type='text'>Workshops of AOSD'07</title><content type='html'>&lt;p&gt;Refer to &lt;a href="http://www.aosd.net/2007/program/workshops.php" target="_blank"&gt;here&lt;/a&gt; for all the workshops held at AOSD'07.&lt;/p&gt; &lt;p&gt;Below are the ones that I'm sepecially interested in:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;a href="http://aosd.net/workshops/asat/2007/" target="_blank"&gt;Workshop on of  Asessment of Aspect-Oriented Technologies&lt;/a&gt;: The subject are really  interesting and worth being noticed by all the researchers and developers.  There's a researcher from mainland China in the organization committee. No  papers/slides available on-line abouth the workshop.&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.aosd.net/workshops/splat/2007/" target="_blank"&gt;Software  Engineering Properties of Languages and Aspect Technologies&lt;/a&gt;: Evaluation of  AO tools and technologies, serving as important criteria for improving existing  ones and designing/developing new ones.  &lt;/li&gt;&lt;li&gt;&lt;a href="http://aosd.net/workshops/bpaosd" target="_blank"&gt;Workshop on Best  Practices in Applying Aspect-Oriented Software Development&lt;/a&gt;: No one will not  be interested in this.  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cs.iastate.edu/%7Eleavens/FOAL/index-2007.shtml" target="_blank"&gt;Foundations Of Aspect-Oriented Languages&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.aosd.net/workshops/aotest/2007/WTAOP07.html" target="_blank"&gt;Workshop on Testing Aspect-Oriented Programs&lt;/a&gt;: This field is  led by an overseas Chinese researcher Dr. Xu. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The workshop I'm intersted the most, but not appearing at AOSD'07 is &lt;a href="http://www.cs.mcgill.ca/%7Emartin/macs2005/"&gt;Modeling and Analysis of  Concerns in Software&lt;/a&gt; .&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-1822200389700201302?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.aosd.net/2007/program/workshops.php' title='Workshops of AOSD&apos;07'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/1822200389700201302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=1822200389700201302' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/1822200389700201302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/1822200389700201302'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/03/workshops-of-aosd07.html' title='Workshops of AOSD&apos;07'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-97246592819449783</id><published>2007-03-15T21:18:00.000+08:00</published><updated>2007-03-22T01:17:58.169+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='conference'/><category scheme='http://www.blogger.com/atom/ns#' term='aosd'/><category scheme='http://www.blogger.com/atom/ns#' term='aop'/><category scheme='http://www.blogger.com/atom/ns#' term='2007'/><category scheme='http://www.blogger.com/atom/ns#' term='report'/><title type='text'>AOSD'07 "Report" - By others</title><content type='html'>&lt;p&gt;&lt;strong&gt;Blog Posts About AOSD'07:&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://lintonye.blogspot.com/"&gt;AOSD Demo a success&lt;/a&gt;:Can't figure out what exactly the demo is from this post. I guess it is a eclipse plug-in facilitating jps indicating.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://yuenyandaily.blogspot.com/2007/03/aosd-conference-day-1.html"&gt;AOSD Conference Day 1&lt;/a&gt;:About &lt;a href="http://www.glassbox.net/" set="yes"&gt;Glassbox&lt;/a&gt;, overhead of load-time weaving, possible usage of AOP for run-time verification/debugging, comment on the keynote "Building Robust System", etc.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://yuenyandaily.blogspot.com/index.html"&gt;Arriving at AOSD&lt;/a&gt;:Inside story about the author attending the conference.&lt;/li&gt;&lt;/ul&gt;update (22/03/2007）：&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blog.objectmentor.com/articles/2007/03/21/aosd-2007-conference"&gt;AOSD 2007 Conference&lt;/a&gt;: Blog from &lt;a href="http://objectmentor.com/"&gt;Object Mentor&lt;/a&gt;. The author gave a tutorial on Industry Track.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="margin-right: 0px;" dir="ltr"&gt;&lt;strong&gt;No more...&lt;/strong&gt;&lt;/p&gt;It seems the academic people are too busy to blog. There are few posts about the conference.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-97246592819449783?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blogsearch.google.com/blogsearch?hl=en&amp;q=aosd+2007&amp;ie=UTF-8&amp;as_maxm=&amp;as_miny=2007&amp;as_maxy=&amp;as_minm=3&amp;as_mind=13&amp;as_maxd=&amp;as_drrb=b&amp;ctz=-480&amp;c1cr=3%2F13%2F2007&amp;c2cr=&amp;btnD=Go' title='AOSD&apos;07 &quot;Report&quot; - By others'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/97246592819449783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=97246592819449783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/97246592819449783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/97246592819449783'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/03/aosd07-report-by-others.html' title='AOSD&apos;07 &quot;Report&quot; - By others'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-42622754342381464</id><published>2007-03-15T18:21:00.000+08:00</published><updated>2007-05-03T19:45:25.505+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><category scheme='http://www.blogger.com/atom/ns#' term='api'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Blog APIs</title><content type='html'>&lt;p&gt;Resources:&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;a set="yes" href="http://msdn2.microsoft.com/en-us/library/bb259698.aspx"&gt;Getting Started with the MetaWeblog API for Windows Live Spaces&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://code.google.com/apis/blogger/gdata.html#list_blogs"&gt;Blogger Data API Developer’s Guide&lt;/a&gt;&lt;/li&gt;&lt;li&gt;More…&lt;/li&gt;&lt;/ol&gt; &lt;p class="zoundry_bw_tags"&gt;   &lt;!-- Tag links generated by Zoundry Blog Writer. Do not manually edit. http://www.zoundry.com --&gt;&lt;br /&gt; &lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Technorati&lt;/span&gt; : &lt;a href="http://technorati.com/tag/Blog" class="ztag" rel="tag"&gt;Blog&lt;/a&gt;, &lt;a set="yes" href="http://technorati.com/tag/blogger" class="ztag" rel="tag"&gt;blogger&lt;/a&gt;, &lt;a href="http://technorati.com/tag/live%20space" class="ztag" rel="tag"&gt;live space&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Del.icio.us&lt;/span&gt; : &lt;a href="http://del.icio.us/tag/Blog" class="ztag" rel="tag"&gt;Blog&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/blogger" class="ztag" rel="tag"&gt;blogger&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/live+space" class="ztag" rel="tag"&gt;live space&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Ice Rocket&lt;/span&gt; : &lt;a href="http://blogs.icerocket.com/tag/Blog" class="ztag" rel="tag"&gt;Blog&lt;/a&gt;, &lt;a href="http://blogs.icerocket.com/tag/blogger" class="ztag" rel="tag"&gt;blogger&lt;/a&gt;, &lt;a href="http://blogs.icerocket.com/tag/live+space" class="ztag" rel="tag"&gt;live space&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Flickr&lt;/span&gt; : &lt;a href="http://www.flickr.com/photos/tags/Blog" class="ztag" rel="tag"&gt;Blog&lt;/a&gt;, &lt;a href="http://www.flickr.com/photos/tags/blogger" class="ztag" rel="tag"&gt;blogger&lt;/a&gt;, &lt;a href="http://www.flickr.com/photos/tags/live+space" class="ztag" rel="tag"&gt;live space&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Zooomr&lt;/span&gt; : &lt;a set="yes" href="http://beta.zooomr.com/photos/tags/Blog" class="ztag" rel="tag"&gt;Blog&lt;/a&gt;, &lt;a href="http://beta.zooomr.com/photos/tags/blogger" class="ztag" rel="tag"&gt;blogger&lt;/a&gt;, &lt;a set="yes" href="http://beta.zooomr.com/photos/tags/live%20space" class="ztag" rel="tag"&gt;live space&lt;/a&gt;&lt;br /&gt;&lt;span class="ztags"&gt;&lt;/span&gt;&lt;span class="ztagspace"&gt;Buzznet&lt;/span&gt; : &lt;a href="http://www.buzznet.com/buzzwords/Blog" class="ztag" rel="tag"&gt;Blog&lt;/a&gt;, &lt;a href="http://www.buzznet.com/buzzwords/blogger" class="ztag" rel="tag"&gt;blogger&lt;/a&gt;, &lt;a set="yes" href="http://www.buzznet.com/buzzwords/live%20space" class="ztag" rel="tag"&gt;live space&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-42622754342381464?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/03/15/blog-apis/' title='Blog APIs'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/42622754342381464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=42622754342381464' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/42622754342381464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/42622754342381464'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/blog-apis.html' title='Blog APIs'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-1212558064243539489</id><published>2007-03-14T18:10:00.000+08:00</published><updated>2007-05-03T19:43:01.278+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='api'/><category scheme='http://www.blogger.com/atom/ns#' term='url'/><category scheme='http://www.blogger.com/atom/ns#' term='uri'/><title type='text'>URI, URL and Java</title><content type='html'>This post basically is a collection of resources.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1. What're URI, URN and URL?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;A URI is a uniform resources &lt;em&gt;identifier&lt;/em&gt; reference. A URL is a uniform resource &lt;em&gt;locator&lt;/em&gt;. URNs name resources but do not specify how to locate them. The &lt;tt&gt;mailto&lt;/tt&gt;, &lt;tt&gt;news&lt;/tt&gt;, and &lt;tt&gt;isbn&lt;/tt&gt; URIs shown above are examples of URNs. URLs and URNs both fall into URIs. But normally URNs and URLs doesn't interset. Refer to &lt;a href="http://www.ietf.org/rfc/rfc2396.txt"&gt;&lt;em&gt;RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax&lt;/em&gt;&lt;/a&gt; for the syntax of a URI instance. And the &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html" target="_blank"&gt;java class description of URI&lt;/a&gt; gives a very good summary of URI, besides providing some useful resources.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Syntax&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Below is a little breakdown on the syntax of URI, which is directly taken from the priviously mentioned JAVA API spec.&lt;br /&gt;&lt;br /&gt;At the highest level a URI reference (hereinafter simply "URI") in string form has the syntax:&lt;br /&gt;&lt;br /&gt;[&lt;em&gt;scheme&lt;/em&gt;&lt;tt&gt;&lt;strong&gt;:&lt;/strong&gt;&lt;/tt&gt;] &lt;em&gt;scheme-specific-part&lt;/em&gt; [&lt;tt&gt;&lt;strong&gt;#&lt;/strong&gt;&lt;/tt&gt;&lt;em&gt;fragment&lt;/em&gt;]&lt;br /&gt;&lt;br /&gt;where square brackets [...] delineate optional components and the characters &lt;tt&gt;&lt;strong&gt;:&lt;/strong&gt;&lt;/tt&gt; and &lt;tt&gt;&lt;strong&gt;#&lt;/strong&gt;&lt;/tt&gt; stand for themselves. With a further breakdown on &lt;em&gt;scheme-specific-part&lt;/em&gt; we can get a URI in the string form:&lt;br /&gt;&lt;br /&gt;[&lt;em&gt;scheme&lt;/em&gt;&lt;tt&gt;&lt;strong&gt;:&lt;/strong&gt;&lt;/tt&gt;] &lt;strong&gt;[&lt;tt&gt;//&lt;/tt&gt;&lt;em&gt;authority&lt;/em&gt;][&lt;em&gt;path&lt;/em&gt;][&lt;tt&gt;?&lt;/tt&gt;&lt;em&gt;query&lt;/em&gt;]&lt;/strong&gt; [&lt;tt&gt;&lt;strong&gt;#&lt;/strong&gt;&lt;/tt&gt;&lt;em&gt;fragment&lt;/em&gt;]&lt;br /&gt;&lt;br /&gt;where the characters &lt;tt&gt;&lt;strong&gt;:&lt;/strong&gt;&lt;/tt&gt;, &lt;tt&gt;&lt;strong&gt;/&lt;/strong&gt;&lt;/tt&gt;, &lt;tt&gt;&lt;strong&gt;?&lt;/strong&gt;&lt;/tt&gt;, and &lt;tt&gt;&lt;strong&gt;#&lt;/strong&gt;&lt;/tt&gt; stand for themselves. With a further breakdown on authority we can get a more general form:&lt;br /&gt;&lt;br /&gt;[&lt;em&gt;scheme&lt;/em&gt;&lt;tt&gt;&lt;strong&gt;:&lt;/strong&gt;&lt;/tt&gt;] &lt;strong&gt;[&lt;tt&gt;//&lt;/tt&gt;&lt;/strong&gt; [&lt;em&gt;user-info&lt;/em&gt;&lt;tt&gt;@&lt;/tt&gt;]&lt;em&gt;host&lt;/em&gt;[&lt;tt&gt;:&lt;/tt&gt;&lt;em&gt;port&lt;/em&gt;] &lt;strong&gt;] [&lt;em&gt;path&lt;/em&gt;] [&lt;tt&gt;?&lt;/tt&gt;&lt;em&gt;query&lt;/em&gt;]&lt;/strong&gt; [&lt;tt&gt;&lt;strong&gt;#&lt;/strong&gt;&lt;/tt&gt;&lt;em&gt;fragment&lt;/em&gt;]&lt;br /&gt;&lt;br /&gt;where the characters &lt;tt&gt;&lt;strong&gt;@&lt;/strong&gt;&lt;/tt&gt; and &lt;tt&gt;&lt;strong&gt;:&lt;/strong&gt;&lt;/tt&gt; stand for themselves.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Note&lt;/em&gt;: a scheme of a URL is called a protocol, such as "http" and "ftp".&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3. Examples&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;An &lt;em&gt;opaque&lt;/em&gt; URI is an absolute URI whose scheme-specific part does not begin with a slash character (&lt;tt&gt;'/'&lt;/tt&gt;). Opaque URIs are not subject to further parsing. Some examples of opaque URIs are:&lt;br /&gt;&lt;br /&gt;mailto:java-net@java.sun.com /*URN*/&lt;br /&gt;news:comp.lang.java /*URN*/&lt;br /&gt;urn:isbn:096139210x /*URN*/&lt;br /&gt;&lt;br /&gt;A &lt;em&gt;hierarchical&lt;/em&gt; URI is either an absolute URI whose scheme-specific part begins with a slash character, or a relative URI, that is, a URI that does not specify a scheme. Some examples of hierarchical URIs are:&lt;br /&gt;&lt;br /&gt;http://java.sun.com/j2se/1.3/ /*URL*/&lt;br /&gt;docs/guide/collections/designfaq.html#28&lt;br /&gt;../../../demo/jfc/SwingSet2/src/SwingSet2.java&lt;br /&gt;file:///~/calendar&lt;br /&gt;&lt;br /&gt;Also URIs are categorized as absolute URIs and relative URIs. An &lt;em&gt;absolute&lt;/em&gt; URI specifies a scheme, and a URI that is not absolute is called a &lt;em&gt;relative&lt;/em&gt; URI.&lt;br /&gt;&lt;br /&gt;Among above examples comments in the form of "/*...*/" tell which are URLs and which are URNs.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4. Character categories&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;As specified in resources accessible, we quote some that matters:&lt;br /&gt;&lt;br /&gt;RFC 2396 specifies precisely which characters are permitted in the various components of a URI reference. The following categories, most of which are taken from that specification, are used below to describe these constraints:&lt;br /&gt;&lt;table summary="Describes categories alpha,digit,alphanum,unreserved,punct,reserved,escaped,and other" cellspacing="2"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th valign="top"&gt;&lt;em&gt;alpha&lt;/em&gt;&lt;/th&gt;&lt;td&gt;The US-ASCII alphabetic characters, &lt;tt&gt;'A'&lt;/tt&gt; through &lt;tt&gt;'Z'&lt;/tt&gt; and &lt;tt&gt;'a'&lt;/tt&gt; through &lt;tt&gt;'z'&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th valign="top"&gt;&lt;em&gt;digit&lt;/em&gt;&lt;/th&gt;&lt;td&gt;The US-ASCII decimal digit characters, &lt;tt&gt;'0'&lt;/tt&gt; through &lt;tt&gt;'9'&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th valign="top"&gt;&lt;em&gt;alphanum&lt;/em&gt;&lt;/th&gt;&lt;td&gt;All &lt;em&gt;alpha&lt;/em&gt; and &lt;em&gt;digit&lt;/em&gt; characters&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th valign="top"&gt;&lt;em&gt;unreserved&lt;/em&gt;&lt;/th&gt;&lt;td&gt;All &lt;em&gt;alphanum&lt;/em&gt; characters together with those in the string &lt;tt&gt;"_-!.~'()*"&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th valign="top"&gt;&lt;em&gt;punct&lt;/em&gt;&lt;/th&gt;&lt;td&gt;The characters in the string &lt;tt&gt;",;:$&amp;amp;+="&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th valign="top"&gt;&lt;em&gt;reserved&lt;/em&gt;&lt;/th&gt;&lt;td&gt;All &lt;em&gt;punct&lt;/em&gt; characters together with those in the string &lt;tt&gt;"?/[]@"&lt;/tt&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th valign="top"&gt;&lt;em&gt;escaped&lt;/em&gt;&lt;/th&gt;&lt;td&gt;Escaped octets, that is, triplets consisting of the percent character (&lt;tt&gt;'%'&lt;/tt&gt;) followed by two hexadecimal digits (&lt;tt&gt;'0'&lt;/tt&gt;-&lt;tt&gt;'9'&lt;/tt&gt;, &lt;tt&gt;'A'&lt;/tt&gt;-&lt;tt&gt;'F'&lt;/tt&gt;, and &lt;tt&gt;'a'&lt;/tt&gt;-&lt;tt&gt;'f'&lt;/tt&gt;)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th valign="top"&gt;&lt;em&gt;other&lt;/em&gt;&lt;/th&gt;&lt;td&gt;The Unicode characters that are not in the US-ASCII character set, are not control characters (according to the &lt;a href="http://www2.blogger.com/@MSITStore:I:/E_book/PL/J2SE/jdk150.chm::/jdk150/api/java/lang/Character.html#isISOControl%28char%29#ggc://jjj2.oybttre.pbz/@ZFVGFgber:V:/R_obbx/CY/W2FR/wqx150.puz::/wqx150/ncv/wnin/ynat/Punenpgre.ugzy#vfVFBPbageby%28pune%29"&gt;&lt;code&gt;Character.isISOControl&lt;/code&gt;&lt;/a&gt; method), and are not space characters (according to the &lt;a href="http://www2.blogger.com/@MSITStore:I:/E_book/PL/J2SE/jdk150.chm::/jdk150/api/java/lang/Character.html#isSpaceChar%28char%29#ggc://jjj2.oybttre.pbz/@ZFVGFgber:V:/R_obbx/CY/W2FR/wqx150.puz::/wqx150/ncv/wnin/ynat/Punenpgre.ugzy#vfFcnprPune%28pune%29"&gt;&lt;code&gt;Character.isSpaceChar&lt;/code&gt;&lt;/a&gt; method) &lt;em&gt;(&lt;strong&gt;Deviation from RFC 2396&lt;/strong&gt;, which is limited to US-ASCII)&lt;/em&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;a title="HTML_TO_HH_28390" name="HTML_TO_HH_28390"&gt;&lt;/a&gt;&lt;a title="legal-chars" name="legal-chars"&gt;&lt;/a&gt;The set of all legal URI characters consists of the &lt;em&gt;unreserved&lt;/em&gt;, &lt;em&gt;reserved&lt;/em&gt;, &lt;em&gt;escaped&lt;/em&gt;, and &lt;em&gt;other&lt;/em&gt; characters.&lt;br /&gt;&lt;h4&gt;Escaped octets, quotation, encoding, and decoding&lt;/h4&gt;&lt;br /&gt;RFC 2396 allows escaped octets to appear in the user-info, path, query, and fragment components. Escaping serves two purposes in URIs:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;To &lt;strong&gt;&lt;em&gt;encode&lt;/em&gt; non-US-ASCII characters&lt;/strong&gt; when a URI is required to conform strictly to RFC 2396 by not containing any &lt;em&gt;other&lt;/em&gt; characters.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;To &lt;em&gt;quote&lt;/em&gt; characters that are otherwise illegal in a component. The user-info, path, query, and fragment components differ slightly in terms of which characters are considered legal and illegal.&lt;/li&gt;&lt;/ul&gt;These purposes are served in this class by three related operations:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a title="HTML_TO_HH_28391" name="HTML_TO_HH_28391"&gt;&lt;/a&gt;&lt;a title="encode" name="encode"&gt;&lt;/a&gt;A character is &lt;em&gt;encoded&lt;/em&gt; by replacing it with the sequence of escaped octets that represent that character in the UTF-8 character set. The Euro currency symbol (&lt;tt&gt;'\u20AC'&lt;/tt&gt;), for example, is encoded as &lt;tt&gt;"%E2%82%AC"&lt;/tt&gt;. &lt;em&gt;(&lt;strong&gt;Deviation from RFC 2396&lt;/strong&gt;, which does not specify any particular character set.)&lt;/em&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a title="HTML_TO_HH_28392" name="HTML_TO_HH_28392"&gt;&lt;/a&gt;&lt;a title="quote" name="quote"&gt;&lt;/a&gt;An illegal character is &lt;em&gt;quoted&lt;/em&gt; simply by encoding it. The space character, for example, is quoted by replacing it with &lt;tt&gt;"%20"&lt;/tt&gt;. UTF-8 contains US-ASCII, hence for US-ASCII characters this transformation has exactly the effect required by RFC 2396.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a title="HTML_TO_HH_28393" name="HTML_TO_HH_28393"&gt;&lt;/a&gt;&lt;a title="decode" name="decode"&gt;&lt;/a&gt;A sequence of escaped octets is &lt;em&gt;decoded&lt;/em&gt; by replacing it with the sequence of characters that it represents in the UTF-8 character set. UTF-8 contains US-ASCII, hence decoding has the effect of de-quoting any quoted US-ASCII characters as well as that of decoding any encoded non-US-ASCII characters. If a &lt;a href="http://www2.blogger.com/@MSITStore:I:/E_book/PL/J2SE/jdk150.chm::/jdk150/api/java/nio/charset/CharsetDecoder.html#ce"&gt;decoding error&lt;/a&gt; occurs when decoding the escaped octets then the erroneous octets are replaced by &lt;tt&gt;'\uFFFD'&lt;/tt&gt;, the Unicode replacement character.&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;5. Java Impl.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html" title="class in java.net"&gt;&lt;strong&gt;URI&lt;/strong&gt;&lt;/a&gt;, &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/URL.html" title="class in java.net"&gt;&lt;strong&gt;URL&lt;/strong&gt;&lt;/a&gt;, &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLClassLoader.html" title="class in java.net"&gt;&lt;strong&gt;URLClassLoader&lt;/strong&gt;&lt;/a&gt;, &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLConnection.html" title="class in java.net"&gt;&lt;strong&gt;URLConnection&lt;/strong&gt;&lt;/a&gt;, &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLDecoder.html" title="class in java.net"&gt;&lt;strong&gt;URLDecoder&lt;/strong&gt;&lt;/a&gt;, &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLEncoder.html" title="class in java.net"&gt;&lt;strong&gt;URLEncoder&lt;/strong&gt;&lt;/a&gt; and &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLStreamHandler.html" title="class in java.net"&gt;&lt;strong&gt;URLStreamHandler&lt;/strong&gt;&lt;/a&gt;, which are all located in package &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/java/net/package-summary.html"&gt;&lt;strong&gt;java.net&lt;/strong&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Resources:&lt;/strong&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.ietf.org/rfc/rfc2396.txt"&gt;Uniform Resource Identifiers (URI): Generic Syntax&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.ietf.org/rfc/rfc2732.txt"&gt;Format for Literal IPv6 Addresses in URL's&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/overview-summary.html"&gt;JavaTM 2 Platform Standard Edition 5.0 API Specification&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;Technorati : &lt;a href="http://technorati.com/tag/Java" class="ztag" rel="tag"&gt;Java&lt;/a&gt;, &lt;a href="http://technorati.com/tag/URI" class="ztag" rel="tag"&gt;URI&lt;/a&gt;, &lt;a href="http://technorati.com/tag/URL" class="ztag" rel="tag"&gt;URL&lt;/a&gt;, &lt;a href="http://technorati.com/tag/URN" class="ztag" rel="tag"&gt;URN&lt;/a&gt;&lt;br /&gt;Del.icio.us : &lt;a href="http://del.icio.us/tag/Java" class="ztag" rel="tag"&gt;Java&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/URI" class="ztag" rel="tag"&gt;URI&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/URL" class="ztag" rel="tag"&gt;URL&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/URN" class="ztag" rel="tag"&gt;URN&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-1212558064243539489?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/01/14/lYJFCGZIAgkbIHrnilMCiyfbylpzDMcOLMun/' title='URI, URL and Java'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/1212558064243539489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=1212558064243539489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/1212558064243539489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/1212558064243539489'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/uri-url-and-java.html' title='URI, URL and Java'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-3307258335906133731</id><published>2007-03-04T18:19:00.000+08:00</published><updated>2007-05-03T19:44:43.719+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dedicated server'/><category scheme='http://www.blogger.com/atom/ns#' term='web hosting'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>服务器租借与托管资料收集</title><content type='html'>&lt;p&gt;（本文仅仅为资料收集，不存在原创内容）&lt;/p&gt; &lt;p&gt;1. 名词解释&lt;/p&gt; &lt;p&gt;1U-4U：  &lt;/p&gt; &lt;p&gt;U（英文中的Unit？不知道）代表架式服务器的高度，1U=1.75英寸=4.45厘米。同样的2U=4*1.75英寸=4*4.45厘米，以此类推。  &lt;/p&gt; &lt;p&gt;机柜：  &lt;/p&gt; &lt;p&gt;一般多个机架服务器安装在一个机柜内，一个普通机柜的高度是42U。  &lt;/p&gt; &lt;p&gt;ICP：  &lt;/p&gt; &lt;p&gt;ICP（Internet Content Provider）证的全称:《中华人民共和国电信与信息服务业务经营许可证》即ICP证，通过互联网向上网用户提供有偿信息、网上广告、代制作网页、电 子商务及其它网上应用服务的公司必须办理的网络经营许可证。国家对经营性网站实行ICP证制度，注册资金应在100万或者100万以上的公司才能办理 ICP证，一经办理一般能在该省的通信管理局的网站查询到。同时对从事非经营性活动的网站要进行ICP备案，简称为ICP备。 &lt;/p&gt; &lt;p&gt;2. 服务器的种类  &lt;/p&gt; &lt;p&gt;首先,我们必需了解何谓PC服务器?所谓PC服务器（下文讨论的多为PC服务器）,即是Intel架构服务器,与一些大型服务器如 Mainframe, Unix架构服务器等不同,前者大多运行Windows或Linux等操作系统,使用较为普遍,后者多为专业用途,如银行,大型制造业,物流业,证券…等 行业使用,一般人较少有机会接触到. &lt;/p&gt; &lt;p&gt;可以按照各种标准进行分类，按应用层次分为：入门级服务器、工作组级服务器、部门级服务器和企业级服务器；按处理器架构分为：CISC （Complex Instruction Set Computer）架构服务器、RISC（Reduced Instruction Set Computing）架构服务器和VLIW（Very Long Instruction Word超长指令集架构）架构服务器；按用途分为：通用型服务器和专用型服务器，或者WEB服务器、E-mail服务器、数据服务器、DNS服务器等等； 按机箱结构分为：台式（塔式）服务器、机架服务器、机柜服务器和刀片式（bladed）服务器。 &lt;/p&gt; &lt;p&gt;2.1 塔式服务器  &lt;/p&gt; &lt;p&gt;优点：服务器的主板扩展性较强、插槽也多，可以进行硬盘和电源的冗余扩展，对环境要求较低，原则上不用和机柜搭配使用，价格也相对较低，集多种常见的服务和应用于一身。  &lt;/p&gt; &lt;p&gt;缺点：塔式服务器长得跟我们平时用的台式机一样，占用空间比较大，适合小型企业自己维护，不适合放在服务器托管商那里托管，独立性太强，协同工作在空间占用和系统管理上都不方便，在一些应用要求较高的企业中，这种单机服务器无法满足要求。  &lt;/p&gt; &lt;p&gt;2.2 机架服务器  &lt;/p&gt; &lt;p&gt;机架式（RACK）服务器长得像卧着的台式机，可以一台一台地放到固定机架上，因此而得名。机架服务器一般采用标准19英寸的宽度设计，其高度按照一定的单位高度的设计，其单位为U，约为4.54cm。  &lt;/p&gt; &lt;p&gt;优点：机架是服务器的机箱宽度都是相同的，可以在标准的机柜中存放服务器，减少服务器产品对空间的要求，易于服务器的集中管理。所以机架服务器便于放在服务器托管商那里托管。  &lt;/p&gt; &lt;p&gt;缺点： 购买价格相对较高，比同等配置的塔式服务器价格要高20%-30%，1U以上服务器服务器托管费用较高。由于在空间上非常紧凑，所以在扩展性和散热方面上具有一定限制，一般无法实现太完整的设备扩展，所以单机性能相对比较有限。  &lt;/p&gt; &lt;p&gt;2.3 刀片式服务器  &lt;/p&gt; &lt;p&gt;略  &lt;/p&gt; &lt;p&gt;3. 服务器的购买和租借  &lt;/p&gt; &lt;p&gt;一般服务器或者自行购买然后放到IDC（Internet Data Center）服务提供商的机房托管，或者租借IDC服务商的。租借的服务器一般IDC服务提供商都会负责托管，租借又分为送产权和不送产权两种，送产权 的即租用一定时间（如1年或者2年）后服务器的产权归用户。需要指出的是租用的服务器大多数不是新的服务器，而是旧的组装服务器，当然也有宣称租用品牌服 务器的IDC服务商。 &lt;/p&gt; &lt;p&gt;下面主要说说PC服务器的基本硬件配置常识。主要的服务器国际生产商有：IBM，HP，Dell，Sun（最近也推出X86服务器产品），超微等； 国内生产商主要有：曙光、联想、浪潮、方正、清华同方、华硕等；服务器芯片生产商主要是：Intel和AMD；服务器芯片主要有：Pentium 4（单路）、Itanium（安腾，64位，Dual-Core）Xeon（至强，双路）、XeonMP（Multi Processing Platform，四路）、AthlonMP（速龙MP）、Opteron（皓龙，64位，100系列是单路，200系列是双路，800系列是四路和八 路）。 &lt;/p&gt; &lt;p&gt;4. 托管服务器的流程  &lt;/p&gt; &lt;p&gt;4.1 选择托管服务器的类型 &lt;/p&gt; &lt;p&gt;购买全新服务器，或向服务器托管商租借。 &lt;/p&gt; &lt;p&gt;4.2 选择服务器托管商 &lt;/p&gt; &lt;p&gt;考察服务商、机房，最好能去现场考察，以检查其设施是否齐全。 &lt;/p&gt; &lt;p&gt;4.3 签订托管合同 &lt;/p&gt; &lt;p&gt;如果是自己购买的服务器，则需要运送服务器到托管商指定的机房，最后签订详细的托管合同。 &lt;/p&gt; &lt;p&gt;5. 经验  &lt;/p&gt; &lt;p&gt;5.1 最好不要异地托管 &lt;/p&gt; &lt;p&gt;如果是自己购买的服务器最好不要找异地托管，因为时候要对服务器进行本地维护。 &lt;/p&gt; &lt;p&gt;5.2 带宽保证 &lt;/p&gt; &lt;p&gt;不管是独享带宽还是共享带宽，实际使用的带宽一般不会超过10M，甚至5M甚至更低，各地的IDC都会有限制。 &lt;/p&gt; &lt;p&gt;5.3 ICP证 &lt;/p&gt; &lt;p&gt;一定要检查托管商是否有ICP证。 &lt;/p&gt; &lt;p&gt;6. 业界案例  &lt;/p&gt; &lt;p&gt;豆瓣网，土豆网，劲舞团等等。 &lt;/p&gt; &lt;p&gt;7. 上海的服务商简介 &lt;/p&gt; &lt;p&gt;&lt;a href="http://www.edong.com/" target="_blank"&gt;中国E动网&lt;/a&gt;：&lt;a href="http://www.edong.com/"&gt;www.edong.com&lt;/a&gt;  &lt;/p&gt; &lt;p&gt;8. 其他  &lt;/p&gt; &lt;p&gt;www.linkwan.com/vr ，用来测试机房速度和当前连接的路由节点。 &lt;/p&gt; &lt;p&gt;参考资料： &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://zhidao.baidu.com/question/827808.html?si=8"&gt;首次托管服务器经验&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://zhidao.baidu.com/question/1578763.html?fr=qrl3"&gt;服务器结构中的1U 2U 3U是什么意思?&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://zhidao.baidu.com/question/16415086.html?si=5"&gt;机架式服务器和塔式服务器的区别&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://ks.cn.yahoo.com/question/?qid=1307020809071"&gt;服务器有哪些种类？&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.edong.com/v8/delicatedserver/example.php" target="_blank"&gt;典型用户案例&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cbinews.com/inc/showcontentc.jsp?articleid=27184"&gt;什么是机架式服务器？&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.bananaskin.cn/" target="_blank"&gt;BananaSkin&lt;/a&gt;（持续关注IDC方面的博客）  &lt;/li&gt;&lt;li&gt;服务器有关的Post（&lt;a href="http://blog.douban.com/douban/2006/01/16/55/" target="_blank"&gt;1&lt;/a&gt;，&lt;a href="http://blog.douban.com/douban/2006/02/11/58/" target="_blank"&gt;2&lt;/a&gt;，&lt;a href="http://blog.douban.com/douban/2005/11/03/43/" target="_blank"&gt;3&lt;/a&gt;）（&lt;a href="http://blog.douban.com/" target="_blank"&gt;豆瓣blog&lt;/a&gt;）  &lt;/li&gt;&lt;li&gt;&lt;a href="http://ks.cn.yahoo.com/question/?qid=1407011515638&amp;r=w"&gt;如何挑选服务器？哪个牌子的最好？（1万元以下的）&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://magicalg.blogspot.com/2007/02/blog-post_06.html"&gt;关于”个人网站申请备案”经验&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.xuchao.cn/?id=1745"&gt;业内人士教您如何选择IDC&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.20t.net/user/yunfei7/index.php?langtype=cn&amp;amp;amp;pageid=cn_14&amp;add=view&amp;amp;id=1"&gt;服务器托管—你会选1U还是2U服务器？&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://www.miibeian.org.cn/icpbeian.html"&gt;ICP专栏：介绍ICP相关知识，ICP申请、ICP备案流程及所须资料等&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://jmh1982.spaces.live.com/Blog/cns%21978B6811B7A62F94%211640.entry"&gt;【转载】教你如何租服务器和选择机房&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.linuxmine.com/15024.html"&gt;差价缩小：现在你考虑1U还是2U？&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.idcquan.com/top1.htm"&gt;中国IDC产业发展调查暨年度大典官方网站&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://bbs.zhaoxiaoshuo.com/viewthread.php?tid=154"&gt;找小说网正式拥有属于自己的服务器&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-3307258335906133731?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/03/04/%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%a7%9f%e5%80%9f%e4%b8%8e%e6%89%98%e7%ae%a1%e8%b5%84%e6%96%99%e6%94%b6%e9%9b%86/' title='服务器租借与托管资料收集'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/3307258335906133731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=3307258335906133731' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/3307258335906133731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/3307258335906133731'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/blog-post_03.html' title='服务器租借与托管资料收集'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-140218275310581299</id><published>2007-01-30T18:18:00.000+08:00</published><updated>2007-05-03T19:44:08.530+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aop'/><category scheme='http://www.blogger.com/atom/ns#' term='aspectj'/><title type='text'>AspectJ Syntax Notes and More…</title><content type='html'>&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Some of the following items, especially items in red, are based on my experience with aspectj 1.5.3.200611221118 (AJDT 1.4.1.200611230655) , JVM 1.5.0-b64, and JDT 3.2.0.v20060609m-F7snq1fxia-Z4XP.&lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;div&gt;[Nested/Inner Aspect] Nested aspects must be static. An inner aspect has to be static, in order to get rid of &lt;strong&gt;the implicit “&amp;&amp;amp; this()”&lt;/strong&gt; which you get on a perthis-Aspect.&lt;/div&gt; &lt;/li&gt;&lt;li&gt;[Aspect Extension] aspects may only extend abstract aspects. It is an error for a concrete aspect to extend another concrete aspect. &lt;/li&gt;&lt;li&gt;[Aspect Instantiation] Because advice only runs in the context of an aspect instance, aspect instantiation indirectly controls when advice runs. &lt;/li&gt;&lt;li&gt;[Aspect Instantiation] The criteria used to determine how an aspect is instantiated is inherited from its parent aspect. If the aspect has no parent aspect, then by default the aspect is a singleton aspect. &lt;/li&gt;&lt;li&gt;[Aspect Instantiation] Static initialization occurs when the type is loaded (i.e., the Java VM&lt;br /&gt;loads the resulting class file for Lolo). At that point, the implementation of the before calls the static method aspectOf to access the singleton instance of Lolo. &lt;/li&gt;&lt;li&gt;[Aspect Instantiation] You can get a NoAspectBoundException when there is a cycle in aspect initialization or static initialization (within one aspect, or between a chain of several aspects), most commonly when an aspect advises its own initializer. &lt;/li&gt;&lt;li&gt;[Aspect Instantiation] During the constructor of an aspect, calling aspectOf() on that aspect would fail. Because at that moment, no aspect instance has been bound. It is the same reason why in an after() :(execution(AspectA.new())) advice, calling AspectA.aspectOf() would fail. In this case, instead, target can be used to expose the instance of AspectA. &lt;/li&gt;&lt;li&gt;[Aspect Instantiation] ! &lt;span style="color: rgb(255, 0, 0);"&gt;Do not advise join points in cflowbelow(execution(AspectA.new())), there are bugs or flaws with aspectj&lt;/span&gt; which your advice may reproduce, especially when dynamically determined variable are involved in your advice body. Or don’t define your own aspect constructor, but just use the default aspect constructor, which would make your aspectj code more robust. &lt;/li&gt;&lt;li&gt;[Advice Execution] ! &lt;span style="color: rgb(255, 0, 0);"&gt;Exception or Error thrown in advice “before(String[] args) : execution(public static void *.main(String[]))” can’t be captured!&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;[Declaration] ! &lt;span style="color: rgb(255, 0, 0);"&gt;How to declare an error if some join points that are supposed to be captured are actually not captured?&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;[PCD] A named pointcut may be defined in either a class or aspect, and is treated as a member of the class or aspect where it is found. As a member, it may have an access modifier such as &lt;tt&gt;public&lt;/tt&gt; or &lt;tt&gt;private&lt;/tt&gt;. Abstract pointcuts may only be declared within abstract aspects. For completeness, a pointcut with a declaration may be declared &lt;tt&gt;final&lt;/tt&gt;. Though named pointcut declarations appear somewhat like method declarations, and can be overridden in subaspects, they cannot be overloaded. &lt;/li&gt;&lt;li&gt;[PCD] call(Foo.new(..))  can’t be used together with target(*). &lt;/li&gt;&lt;li&gt;[PCD] Rather than cflow, use lexical-structure based pointcuts, within or withincode, preferablely. It will make the cross-reference view of the AJDT more accurate and less time consuming.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;em&gt;&lt;span style="color: rgb(192, 192, 192);"&gt; to be continued…&lt;/span&gt;&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Resources:&lt;/strong&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;aspectj doc  &lt;/li&gt;&lt;li&gt;aspectj-user-request mailing list&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-140218275310581299?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/01/30/lgcagohvejtgttjwxbjxwykfbcalrmedshey/' title='AspectJ Syntax Notes and More…'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/140218275310581299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=140218275310581299' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/140218275310581299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/140218275310581299'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/aspectj-syntax-notes-and-more.html' title='AspectJ Syntax Notes and More…'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-4095720872781613416</id><published>2007-01-20T18:16:00.000+08:00</published><updated>2007-05-03T19:43:41.500+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dom'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>DOM Level 3 Load and Save</title><content type='html'>&lt;p&gt;&lt;strong&gt; 1. Introduction&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Defined by w3 consortium, just as its name indicates, it serves as interfaces to objects that dealing with loading and saving DOM objects.&lt;/p&gt; &lt;p&gt;It’s noteworthy that various specific implementations doesn’t always fully support.&lt;/p&gt; &lt;p&gt;With java, it is well supported, though, some optional specifications are not supported (at least not always workabe from my experience). However, &lt;strong&gt;for web developers&lt;/strong&gt;, there’s a quote from a book for you:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;&lt;a set="yes" href="http://www.macavon.org/webdesignbook/Book/Chapters/Examples/7.html"&gt;Now that XMLHttpRequest is being standardized, it seems likely that LSParser will never be supported by most browsers.&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;In addition, with java, you can also selectively use &lt;a set="yes" href="http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/package-summary.html"&gt;&lt;strong&gt;javax.xml.transform&lt;/strong&gt;&lt;/a&gt; to deal with loading and saving DOM objects.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2. Breakdown&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;Cite from &lt;/em&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/package-summary.html"&gt;&lt;em&gt;org.w3c.dom.ls&lt;/em&gt;&lt;/a&gt;&lt;em&gt;:&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/DOMImplementationLS.html"&gt;DOMImplementationLS&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;code&gt;DOMImplementationLS&lt;/code&gt; contains the factory methods for creating Load and Save objects.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/LSInput.html"&gt;LSInput&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;This interface represents an input source for data.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/LSLoadEvent.html"&gt;LSLoadEvent&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;This interface represents a load event object that signals the completion of a document load.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/LSOutput.html"&gt;LSOutput&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;This interface represents an output destination for data.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/LSParser.html"&gt;LSParser&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;An interface to an object that is able to build, or augment, a DOM tree from various input sources.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/LSParserFilter.html"&gt;LSParserFilter&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;code&gt;LSParserFilter&lt;/code&gt;s provide applications the ability to examine nodes as they are being constructed while parsing.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/LSProgressEvent.html"&gt;LSProgressEvent&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;This interface represents a progress event object that notifies the application about progress as a document is parsed.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/LSResourceResolver.html"&gt;LSResourceResolver&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;code&gt;LSResourceResolver&lt;/code&gt; provides a way for applications to redirect references to external resources.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/LSSerializer.html"&gt;LSSerializer&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;A &lt;code&gt;LSSerializer&lt;/code&gt; provides an API for serializing (writing) a DOM document out into XML.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/LSSerializerFilter.html"&gt;LSSerializerFilter&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;code&gt;LSSerializerFilter&lt;/code&gt;s provide applications the ability to examine nodes as they are being serialized and decide what nodes should be serialized or not.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;3. Examples&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;a. Write an instance of &lt;strong&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/Document.html"&gt;Document&lt;/a&gt;&lt;/strong&gt; to a file with &lt;a set="yes" href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/package-summary.html"&gt;&lt;em&gt;org.w3c.dom.ls&lt;/em&gt;&lt;/a&gt;: &lt;/em&gt;&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;&lt;span style="color: rgb(64, 128, 128);"&gt;DOMImplementationLS domImpl = (DOMImplementationLS)doc&lt;br /&gt;.getImplementation();&lt;br /&gt;LSSerializer serializer = domImpl.createLSSerializer();&lt;br /&gt;LSOutput output = domImpl.createLSOutput();&lt;br /&gt;output.setCharacterStream(new PrintWriter(fileName));&lt;br /&gt;serializer.write(doc, output);&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;em&gt;b. Write an instance of &lt;strong&gt;&lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/Document.html"&gt;Document&lt;/a&gt;&lt;/strong&gt; to a file with &lt;/em&gt;&lt;a set="yes" href="http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/package-summary.html"&gt;&lt;em&gt;javax.xml.transform&lt;/em&gt;&lt;/a&gt;&lt;em&gt;: &lt;/em&gt;&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;&lt;span style="color: rgb(64, 128, 128);"&gt;StreamResult sr = new StreamResult(new File(fileName));&lt;br /&gt;Transformer t = TransformerFactory.newInstance().newTransformer();&lt;br /&gt;t.transform(new DOMSource(doc), sr);&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;Note: &lt;/strong&gt;it seems, from my experience, that example b can’t preserve the print friendly presentation.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Resources:&lt;/strong&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;a set="yes" href="http://www.w3.org/TR/DOM-Level-3-Core/"&gt;Document Object Model (DOM) Level 3 Core Specification Version 1.0&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://www.w3.org/TR/DOM-Level-3-LS/Overview.html#contents"&gt;Document Object Model (DOM) Level 3 Load and Save Specification Version 1.0&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.idealliance.org/papers/dx_xml03/papers/04-01-03/04-01-03.html"&gt;DOM Level 3&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Java Impl. Package org.w3c.dom.ls (&lt;a href="http://www.google.com/codesearch?hl=en&amp;q=show:ssoYJPQ2kVI:DGC3IOM0LEU&amp;amp;sa=N&amp;ct=rdp&amp;amp;cs_p=ftp://ftp.gnu.org/gnu/classpath/classpath-0.19-generics.tar.gz&amp;amp;cs_f=classpath-0.19-generics/external/w3c_dom/org/w3c/dom/ls"&gt;src&lt;/a&gt;, &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/org/w3c/dom/ls/package-summary.html"&gt;api spec&lt;/a&gt;)&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-4095720872781613416?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/01/20/xoicmzzsqjannmmikngdosllufvzlvljktlw/' title='DOM Level 3 Load and Save'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/4095720872781613416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=4095720872781613416' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/4095720872781613416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/4095720872781613416'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/dom-level-3-load-and-save.html' title='DOM Level 3 Load and Save'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-5777363270523527814</id><published>2007-01-13T18:04:00.000+08:00</published><updated>2007-05-03T19:42:10.811+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spec'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><category scheme='http://www.blogger.com/atom/ns#' term='feed'/><title type='text'>Feed Format — The Programmable Web</title><content type='html'>&lt;p&gt;&lt;strong&gt;Resources:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;Spec. Intro.&lt;/em&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;a href="http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html"&gt;What Is RSS&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://www-128.ibm.com/developerworks/xml/library/x-rss20/#resources"&gt;Content feeds with RSS 2.0&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://blogs.law.harvard.edu/tech/rss"&gt;RSS 2.0 Specification&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://tools.ietf.org/html/rfc4287"&gt;The Atom Syndication Format&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.opml.org/spec"&gt;OPML 1.0 Specification&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.opml.org/"&gt;OPML 2.0 draft spec&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;em&gt;Feed Reader Impl.&lt;/em&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;a href="http://www.rssowl.org/"&gt;A Java pen source reader: RSSOwl&lt;/a&gt;(&lt;a href="http://mesh.dl.sourceforge.net/sourceforge/rssowl/rssowl_1_2_3_win32_bin.zip"&gt;bin&lt;/a&gt;, &lt;a href="http://my.donews.com/kenyth/category/%e5%ad%a6%e4%b9%a0/page/3/URL%20http://www.prensacadiz.org/blogs/downloads/rssowl_1_2_src.tar.gz"&gt;src&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://my.donews.com/kenyth/2006/11/10/eaoowdpwkfgndhglaxdfmyaljfwezejefytb/"&gt;XML Processing With Java Overview&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://my.donews.com/kenyth/2006/11/13/hvloltpcmpqyuafimiuabfkdbcwxkixrdjgp/"&gt;Three ways of validating a xml document with Java&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://my.donews.com/kenyth/2006/11/11/naubsdgowyfbnujxlnamcfzyytvkwydjyykr/"&gt;Comment on W3C DOM and various implmentations in defferent PL&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://my.donews.com/kenyth/2006/11/10/pjvtqxvxjnehjyuxscfamlayfhesmhucrqvi/"&gt;Unicode, UTF等字符编码摘记&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://my.donews.com/kenyth/2007/01/13/zwOhpVvzzDWTZoUKdcqYacusyptsCqWcNLjd/"&gt;Control a Web Browser From Within a Java Programm&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;   Technorati : &lt;a href="http://technorati.com/tag/RDF" class="ztag" rel="tag"&gt;RDF&lt;/a&gt;, &lt;a href="http://technorati.com/tag/RSS" class="ztag" rel="tag"&gt;RSS&lt;/a&gt;, &lt;a href="http://technorati.com/tag/feed" class="ztag" rel="tag"&gt;feed&lt;/a&gt;, &lt;a href="http://technorati.com/tag/feed%20reader" class="ztag" rel="tag"&gt;feed reader&lt;/a&gt;, &lt;a href="http://technorati.com/tag/programmable%20web" class="ztag" rel="tag"&gt;programmable web&lt;/a&gt;, &lt;a href="http://technorati.com/tag/xml" class="ztag" rel="tag"&gt;xml&lt;/a&gt;&lt;br /&gt;Del.icio.us : &lt;a href="http://del.icio.us/tag/RDF" class="ztag" rel="tag"&gt;RDF&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/RSS" class="ztag" rel="tag"&gt;RSS&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/feed" class="ztag" rel="tag"&gt;feed&lt;/a&gt;, &lt;a set="yes" href="http://del.icio.us/tag/feed+reader" class="ztag" rel="tag"&gt;feed reader&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/programmable+web" class="ztag" rel="tag"&gt;programmable web&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/xml" class="ztag" rel="tag"&gt;xml&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-5777363270523527814?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/01/13/tgeuuhgmydlmoyqfhuxzwqislhsbxxjrdnly/' title='Feed Format — The Programmable Web'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/5777363270523527814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=5777363270523527814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/5777363270523527814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/5777363270523527814'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/feed-format-programmable-web.html' title='Feed Format — The Programmable Web'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-2701995534831763304</id><published>2007-01-13T18:02:00.000+08:00</published><updated>2007-05-03T19:41:29.849+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='api'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='web browser'/><title type='text'>Control a Web Browser From Within a Java Programm</title><content type='html'>&lt;p&gt;Noramlly, more than two way you can use a web browser with your Java programm.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1.Fire commands to invoke a web browser with Java runtime support.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;// cmd = ‘rundll32 url.dll,FileProtocolHandler &lt;a set="yes" href="http://...%27/"&gt;http://…’&lt;/a&gt;&lt;br /&gt;cmd = WIN_PATH + ” ” + WIN_FLAG + ” ” + url;&lt;br /&gt;Process p = Runtime.getRuntime().exec(cmd);&lt;/p&gt; &lt;p&gt;See the &lt;a set="yes" href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Process.html" target="_blank"&gt;API Spec of Java for Process&lt;/a&gt;, and Java Tip 66 of the Resources section for more information.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;2. Use a wrapped browser control&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;2.1 Use Jacob, the open source COM wrapper. e.g.,&lt;/em&gt;&lt;/p&gt; &lt;p&gt;protected void openIExplorer(){&lt;br /&gt;comp = new ActiveXComponent( “InternetExplorer.Application” );&lt;br /&gt;comp.setProperty( “Visible”, new Variant(true) );&lt;br /&gt;comp.invoke( “Navigate”, new Variant[]{ new Variant((String)comboFilename.getSelectedItem()) } );&lt;/p&gt; &lt;p&gt;&lt;em&gt;2.2 Use browser wrapper provided by SWT.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;import org.eclipse.swt.browser.Browser;&lt;br /&gt;import org.eclipse.swt.browser.CloseWindowListener;&lt;br /&gt;import org.eclipse.swt.browser.LocationAdapter;&lt;br /&gt;import org.eclipse.swt.browser.LocationEvent;&lt;br /&gt;import org.eclipse.swt.browser.OpenWindowListener;&lt;br /&gt;import org.eclipse.swt.browser.ProgressEvent;&lt;br /&gt;import org.eclipse.swt.browser.ProgressListener;&lt;br /&gt;import org.eclipse.swt.browser.StatusTextEvent;&lt;br /&gt;import org.eclipse.swt.browser.StatusTextListener;&lt;br /&gt;import org.eclipse.swt.browser.VisibilityWindowAdapter;&lt;br /&gt;import org.eclipse.swt.browser.WindowEvent;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;3. or any other ways I havn’t figured out…&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Resources:&lt;/strong&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;a href="http://www.javaworld.com/javaworld/javatips/jw-javatip66.html"&gt;Java Tip 66: Control browsers from your Java application&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://java.sun.com/j2se/1.5.0/docs/api/overview-summary.html"&gt;JavaTM 2 Platform Standard Edition 5.0 API Specification&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://danadler.com/jacob/"&gt;The JACOB Project: A JAva-COM Bridge&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.java2s.com/ExampleCode/SWT-JFace-Eclipse/SWTBrowser.htm"&gt;SWT Browser&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://help.eclipse.org/help32/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/browser/package-summary.html"&gt;Package org.eclipse.swt.browser&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://forum.java.sun.com/thread.jspa?threadID=287471&amp;amp;messageID=1126745"&gt;Developer Forums java to invoke IExplore?&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;   Technorati : &lt;a href="http://technorati.com/tag/firefox" class="ztag" rel="tag"&gt;firefox&lt;/a&gt;, &lt;a href="http://technorati.com/tag/ie" class="ztag" rel="tag"&gt;ie&lt;/a&gt;, &lt;a href="http://technorati.com/tag/java" class="ztag" rel="tag"&gt;java&lt;/a&gt;, &lt;a href="http://technorati.com/tag/linux" class="ztag" rel="tag"&gt;linux&lt;/a&gt;, &lt;a href="http://technorati.com/tag/netscape" class="ztag" rel="tag"&gt;netscape&lt;/a&gt;, &lt;a href="http://technorati.com/tag/safri" class="ztag" rel="tag"&gt;safri&lt;/a&gt;, &lt;a href="http://technorati.com/tag/web%20browser" class="ztag" rel="tag"&gt;web browser&lt;/a&gt;, &lt;a set="yes" href="http://technorati.com/tag/windows" class="ztag" rel="tag"&gt;windows&lt;/a&gt;&lt;br /&gt;Del.icio.us : &lt;a href="http://del.icio.us/tag/firefox" class="ztag" rel="tag"&gt;firefox&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/ie" class="ztag" rel="tag"&gt;ie&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/java" class="ztag" rel="tag"&gt;java&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/linux" class="ztag" rel="tag"&gt;linux&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/netscape" class="ztag" rel="tag"&gt;netscape&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/safri" class="ztag" rel="tag"&gt;safri&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/web+browser" class="ztag" rel="tag"&gt;web browser&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/windows" class="ztag" rel="tag"&gt;windows&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-2701995534831763304?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2007/01/13/zwOhpVvzzDWTZoUKdcqYacusyptsCqWcNLjd/' title='Control a Web Browser From Within a Java Programm'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/2701995534831763304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=2701995534831763304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/2701995534831763304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/2701995534831763304'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/control-web-browser-from-within-java.html' title='Control a Web Browser From Within a Java Programm'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-5624335174371624629</id><published>2006-12-26T18:00:00.000+08:00</published><updated>2007-05-03T19:40:45.682+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='interpretation'/><category scheme='http://www.blogger.com/atom/ns#' term='compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='cpp'/><title type='text'>对编译原理的一点总结(Beta)</title><content type='html'>&lt;p&gt;编译原理本人学的很差，虽然这是比较专业的课程。像大多数很多课程一样，考试的话虽然我都拿不到优秀，但是我对这些课程的内容都有浓厚兴趣（估计没 人信，有兴趣还学的差？谁信啊？！）。所以，我时常会看一看，总结一下思路（只总结一部分，其他以后看到再补充），记下来，下次看的时候进入状态快一点， 有错误欢迎指正，这个写的东西类似于学习笔记。&lt;/p&gt; &lt;p&gt;1. 概念、基础&lt;/p&gt; &lt;p&gt;首先编程语言分为编译型语言（或者静态（static）、半静态，半动态语言，如c/c++）和解释型语言（或动态（dynamic）语言，如 c#/java/大多数脚本语言），对这两种语言来说”编译”所做的工作是有所不同的。高层次的语言解释执行是一种趋势，现代的面向对象语言一般都是或者 将会设计成解释型语言，因为动态性虽然带来的性能的损失，但是随着计算机性能的提高我们通常会愿意用性能会换取动态语言的灵活性。下面我将会尝试说明两种 语言的编译过程，并在必要的时候指出某个过程是针对哪种语言的。&lt;/p&gt; &lt;p&gt;说一件趣事，会对你立即编译有帮助，编译在英文里面是compile，这个单词不仅用在计算机方面，还用在书籍出版方面，编译汇总一本书籍然后出 版，所以compile基本上是把分散的东西（你自己的多个程序源码文件、程序语言库等）汇总起来（一个目标代码程序）使之有秩序并能为之所用。&lt;/p&gt; &lt;p&gt;编译的流程一般分为以下几个过程。预处理（preprocess，有时候包括在词法分析中）；词法分析（lexical analysis or scanner)；语法分析（syntax analysis）；语义分析（semantic analysis）；代码优化（code optimatization）；目标代码生产（code generation）。通常有两个数据结构与所有这些过程交互，符号表（symbol table）和出错管理器。这些过程一般都以相应模块出现在编译器中。与编译有关的过程还有链接（linking）和加载（loading）。但是对于解 释型语言上面的过程可以归于编译阶段最多到语法分析，其他的过程都是在解释执行时完成的，包括链接、加载、和符号表和出错管理器的交互。&lt;/p&gt; &lt;p&gt;编译器的架构一般采用管道模式（pipe line design pattern），可以想想bash命令行的使用中的管道模式，但是区别是编译器里面有”遍（pass）”的概念。&lt;/p&gt; &lt;p&gt;编译技术为了重用和方便建造，把编译阶段分为前端和后端，有一套理论（如自展）来指导如何用一种语言来生成另一种语言的编译程序，例如如何用同一种语言来生成自身语言的编译程序。&lt;/p&gt; &lt;p&gt;2. 预处理、词法分析&lt;/p&gt; &lt;p&gt;对于编译型语言和解释型语言来说，这两个过程大体相似。&lt;/p&gt; &lt;p&gt;预处理完成的基本上是清洁、整理源代码的作用，包括删除注释，替换宏（或者等价的inline结构）等等。现代的程序语言有一种趋势，把越来越多的 工作尽可能提到编译的前阶段来处理（只要是理论上允许，不对整个编译架构产生影响），如预处理程序能检查保留字的拼写，简单的语法错误等等。&lt;/p&gt; &lt;p&gt;对于注释，现代的程序语言越来越倾向于采取可识别语义的注释，如Java中的javadoc格式和annotation。这些注释本身就是另一种语言，并有可能（如annotation）对它注释的语义有补充、限制的作用。&lt;/p&gt; &lt;p&gt;词法分析完成的工作主要是把程序源代码中出现关键字、标识符、常量等用一种中间表示替代，在这一过程中主要涉及到符号表和出错管理器就会被建立。&lt;/p&gt; &lt;p&gt;3. 语法分析&lt;/p&gt; &lt;p&gt;4. 语义分析&lt;/p&gt; &lt;p&gt;5. 代码优化&lt;/p&gt; &lt;p&gt;6. 目标代码生成&lt;/p&gt; &lt;p&gt;7. 加载&lt;/p&gt; &lt;p&gt;8. 解释型语言的编译、加载、执行过程&lt;/p&gt; &lt;p&gt;下面大体以Java为代表说一下解释型语言的编译过程。&lt;/p&gt; &lt;p&gt;调用Javac把程序源代码java文件处理成二进制的class文件，这就是Java全部的所谓的编译过程，class文件可以理解为一种中间表示，JVM规范中定义了其格式，在class文件里面会建立常量表。&lt;/p&gt; &lt;p&gt;当用Java命令运行java程序（class 文件）时，JVM会接管从class文件到能够使你的程序运行起来、接受用户输入的全部过程。&lt;/p&gt; &lt;p&gt;JVM首先会用内建的bootstrap class loader加载一些必须的核心类（如rt.jar, i18n.jar等），这个加载过程对于运行任何java程序都是一样的。接着会使用Extension loader（不确定是属于bootstrap class loader范畴还是属于System class loader范畴）加载JAVA_HOME\LIB\EXT目录下的类，最后按照一定顺序和需要加载位于CLASSPATH上的类。可以在运行java程 序时使用下面的参数看详细的加载过程。&lt;/p&gt; &lt;p&gt;Setting the parameter &lt;code&gt;-verbose:class&lt;/code&gt; on the &lt;code&gt;java&lt;/code&gt; command line prints a trace of the class loading process.&lt;/p&gt; &lt;p&gt;关于加载器的整个层次架构可以看资源里面的相应的文章。加载后的每一个类会用一个Class类的实例表示，这些Class实例就是JVM内部可以识 别的关于类的所有信息。一个类加载器加载的类对这个加载器和他所有的子加载器可见，对其他的类加载器不可见，也就是说如果这些不可见的类加载器也加载了同 样的类，那么这两个类实例在JVM内部会被识别成两个类。&lt;/p&gt; &lt;p&gt;加载后进行的一个过程是链接（linking），包括验证（verification，验证加载的class是否是well-formed），准备 （preparation，为静态存储和JVM中内部使用的数据结构如method talbe（类比C++中的VTABLE）分配空间），解析（Resolution，解析一个类中引用到的所有类，这可能又包括一个递归的加载、链接过 程）。&lt;/p&gt; &lt;p&gt;之后进行的是一个初始化过程，包括静态变量的初始器（initializer）和静态结构（如static {}）的初始器。接下来进行新的类实例的创建并进入程序的运行状态。&lt;/p&gt; &lt;p&gt;下面把这个过程和编译型语言的编译过程进行一个非常不严格的类比，以方便理解。&lt;/p&gt; &lt;p&gt;类加载创建Class实例和分配空间的初始化过程可能有点像编译型语言的代码生成过程，生成可以运行的二进制程序，但是生成的二进制程序不会进行固 化存储。链接过程中的验证执行的是一部分的语法分析和全部的语义分析，这可能和编译型语言的编译过程倒过来了。最后的类实例的创建过程可能和编译型语言的 加载二进制程序文件（类比Class的实例）并运行的过程有点类似，包括JVM也会类似于活动记录（Activation Record）的Method Frame结构，包括动态链、静态链，这些结构JVM也都会创建。&lt;/p&gt; &lt;p&gt;&lt;strong&gt;（临时发布草稿，还会不断更新补充）&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Resources:&lt;/p&gt; &lt;ol&gt;&lt;li&gt;侯文永，张冬茉，《编译原理》，电子工业出版社&lt;/li&gt;&lt;li&gt;&lt;a href="http://java.sun.com/docs/books/vmspec/2nd-edition/html/VMSpecTOC.doc.html"&gt;The JavaTM Virtual Machine Specification Second Edition&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html"&gt;The Java Language Specification, Third Edition&lt;/a&gt;&lt;/li&gt;&lt;li&gt;金山词霸&lt;/li&gt;&lt;li&gt;&lt;a set="yes" href="http://www-128.ibm.com/developerworks/java/library/j-dyn0429/"&gt;Java programming dynamics, Part 1: Classes and class loading&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://java.sun.com/docs/books/tutorial/ext/basics/load.html"&gt;Understanding Extension Class Loading&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://forum.java.sun.com/thread.jspa?threadID=462014&amp;amp;messageID=2133359"&gt;Bootstrap class loader&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;   Technorati : &lt;a href="http://technorati.com/tag/compiler" class="ztag" rel="tag"&gt;compiler&lt;/a&gt;, &lt;a href="http://technorati.com/tag/compiler%20construction" class="ztag" rel="tag"&gt;compiler construction&lt;/a&gt;, &lt;a href="http://technorati.com/tag/compiler%20theory" class="ztag" rel="tag"&gt;compiler theory&lt;/a&gt;, &lt;a href="http://technorati.com/tag/java" class="ztag" rel="tag"&gt;java&lt;/a&gt;, &lt;a href="http://technorati.com/tag/programming%20language" class="ztag" rel="tag"&gt;programming language&lt;/a&gt;&lt;br /&gt;Del.icio.us : &lt;a set="yes" href="http://del.icio.us/tag/compiler" class="ztag" rel="tag"&gt;compiler&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/compiler+construction" class="ztag" rel="tag"&gt;compiler construction&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/compiler+theory" class="ztag" rel="tag"&gt;compiler theory&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/java" class="ztag" rel="tag"&gt;java&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/programming+language" class="ztag" rel="tag"&gt;programming language&lt;/a&gt;&lt;br /&gt;Zooomr : &lt;a href="http://beta.zooomr.com/photos/tags/compiler" class="ztag" rel="tag"&gt;compiler&lt;/a&gt;, &lt;a set="yes" href="http://beta.zooomr.com/photos/tags/compiler%20construction" class="ztag" rel="tag"&gt;compiler construction&lt;/a&gt;, &lt;a href="http://beta.zooomr.com/photos/tags/compiler%20theory" class="ztag" rel="tag"&gt;compiler theory&lt;/a&gt;, &lt;a href="http://beta.zooomr.com/photos/tags/java" class="ztag" rel="tag"&gt;java&lt;/a&gt;, &lt;a set="yes" href="http://beta.zooomr.com/photos/tags/programming%20language" class="ztag" rel="tag"&gt;programming language&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-5624335174371624629?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2006/12/26/qqwxthjgpwgzvhxhxhbnprarizjqhdaxuxuo/' title='对编译原理的一点总结(Beta)'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/5624335174371624629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=5624335174371624629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/5624335174371624629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/5624335174371624629'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/beta.html' title='对编译原理的一点总结(Beta)'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-7902569682193750371</id><published>2006-12-21T17:54:00.000+08:00</published><updated>2007-05-03T19:40:05.025+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rex'/><category scheme='http://www.blogger.com/atom/ns#' term='regular expression'/><title type='text'>关于正则表达式</title><content type='html'>&lt;strong&gt;说明：作者放弃本文的所有权力，本文摘录自其他资料，仅作自己学习之用，请尊重摘录源的作者的版权。&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. 基本概念&lt;br /&gt;&lt;br /&gt;正则表达式最早是由数学家Stephen Kleene于1956年提出，正则表达式并非一门专用语言，但它可用于在一个文件或字符里查找和替代文本的一种标准。正则表达式经过几个时期的发展，现在的标准已经被ISO(国际标准组织)批准和被Open Group组织认定。&lt;br /&gt;&lt;br /&gt;2. 正则表达式基础&lt;br /&gt;&lt;br /&gt;正则表达式由一些普通字符和一些&lt;em&gt;元字符（metacharacters）&lt;/em&gt;组成。普通字符包括大小写的字母和数字，而元字符则具有特殊的含义。&lt;br /&gt;&lt;table cellpadding="2" cellspacing="2"&gt;&lt;tbody&gt;&lt;tr valign="baseline"&gt;&lt;th align="left"&gt;&lt;strong&gt;&lt;em&gt;元字符&lt;/em&gt;&lt;/strong&gt;&lt;/th&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;th align="left"&gt;&lt;strong&gt;&lt;em&gt;描述&lt;/em&gt;&lt;/strong&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;hr /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;hr /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align="center" valign="top"&gt;&lt;strong&gt;&lt;tt&gt;.&lt;/tt&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;匹配任何单个字符。例如正则表达式&lt;strong&gt;&lt;tt&gt;r.t&lt;/tt&gt;&lt;/strong&gt;匹配这些字符串：&lt;em&gt;rat&lt;/em&gt;、&lt;em&gt;rut&lt;/em&gt;、&lt;em&gt;r t&lt;/em&gt;，但是不匹配&lt;em&gt;root&lt;/em&gt;。&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;&lt;strong&gt;&lt;tt&gt;$&lt;/tt&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;匹配行结束符。例如正则表达式&lt;strong&gt;&lt;tt&gt;weasel$&lt;/tt&gt;&lt;/strong&gt; 能够匹配字符串"&lt;em&gt;He's a weasel&lt;/em&gt;"的末尾，但是不能匹配字符串"&lt;em&gt;They are a bunch of weasels.&lt;/em&gt;"。&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;&lt;strong&gt;^&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;匹配一行的开始。例如正则表达式&lt;strong&gt;&lt;tt&gt;^When in&lt;/tt&gt;&lt;/strong&gt;能够匹配字符串"&lt;em&gt;When in the course of human events&lt;/em&gt;"的开始，但是不能匹配"&lt;em&gt;What and When in the"。&lt;/em&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;&lt;strong&gt;&lt;tt&gt;*&lt;/tt&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;匹配0或多个正好在它之前的那个字符。例如正则表达式&lt;strong&gt;&lt;tt&gt;.*&lt;/tt&gt;&lt;/strong&gt;意味着能够匹配任意数量的任何字符。&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;&lt;strong&gt;&lt;tt&gt;\&lt;/tt&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;这是引用府，用来将这里列出的这些元字符当作普通的字符来进行匹配。例如正则表达式&lt;strong&gt;&lt;tt&gt;\$&lt;/tt&gt;&lt;/strong&gt;被用来匹配美元符号，而不是行尾，类似的，正则表达式&lt;tt&gt;&lt;strong&gt;\.&lt;/strong&gt;&lt;/tt&gt;用来匹配点字符，而不是任何字符的通配符。&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;&lt;strong&gt;&lt;tt&gt;[ ]&lt;/tt&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;tt&gt;[c1-c2]&lt;/tt&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;tt&gt;[^c1-c2]&lt;/tt&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;匹配括号中的任何一个字符。例如正则表达式&lt;strong&gt;&lt;tt&gt;r[aou]t&lt;/tt&gt;&lt;/strong&gt;匹配&lt;em&gt;rat&lt;/em&gt;、&lt;em&gt;rot&lt;/em&gt;和&lt;em&gt;rut&lt;/em&gt;，但是不匹配&lt;em&gt;ret&lt;/em&gt;。可以在括号中使用连字符-来指定字符的区间，例如正则表达式 &lt;strong&gt;&lt;tt&gt;[0-9]&lt;/tt&gt;&lt;/strong&gt;可以匹配任何数字字符；还可以制定多个区间，例如正则表达式&lt;strong&gt;&lt;tt&gt;[A-Za-z]&lt;/tt&gt;&lt;/strong&gt;可以匹配任何大小写字母。另一个重要的用法是"排除"，要想匹配 &lt;em&gt;除了&lt;/em&gt;指定区间之外的字符--也就是所谓的补集--在左边的括号和第一个字符之间使用^字符，例如正则表达式&lt;strong&gt;&lt;tt&gt;[^269A-Z]&lt;/tt&gt;&lt;/strong&gt; 将匹配除了2、6、9和所有大写字母之外的任何字符。&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;&lt;strong&gt;&lt;tt&gt;\&lt; \&gt;&lt;/tt&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;匹配词（&lt;em&gt;word&lt;/em&gt;）的开始（\&lt;）和结束（\&gt;）。例如正则表达式&lt;strong&gt;&lt;tt&gt;\&lt;the&gt;&lt;/the&gt;&lt;/tt&gt;&lt;/strong&gt;能够匹配字符串"&lt;em&gt;for the wise&lt;/em&gt;"中的"the"，但是不能匹配字符串"&lt;em&gt;otherwise&lt;/em&gt;"中的"the"。&lt;strong&gt;注意&lt;/strong&gt;：这个元字符不是所有的软件都支持的。&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top"&gt;&lt;strong&gt;&lt;tt&gt;\( \)&lt;/tt&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;将 \( 和 \) 之间的表达式定义为"组"（&lt;em&gt;group&lt;/em&gt;），并且将匹配这个表达式的字符保存到一个临时区域（一个正则表达式中最多可以保存9个），它们可以用 &lt;strong&gt;&lt;tt&gt;\1&lt;/tt&gt;&lt;/strong&gt; 到&lt;strong&gt;&lt;tt&gt;\9&lt;/tt&gt;&lt;/strong&gt; 的符号来引用。&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="baseline"&gt;&lt;strong&gt;&lt;tt&gt;|&lt;/tt&gt;&lt;/strong&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;td&gt;将两个匹配条件进行逻辑"或"（&lt;em&gt;Or&lt;/em&gt;）运算。例如正则表达式&lt;strong&gt;&lt;tt&gt;(him|her)&lt;/tt&gt;&lt;/strong&gt; 匹配"&lt;em&gt;it belongs to him&lt;/em&gt;"和"&lt;em&gt;it belongs to her&lt;/em&gt;"，但是不能匹配"&lt;em&gt;it belongs to them.&lt;/em&gt;"。&lt;strong&gt;注意&lt;/strong&gt;：这个元字符不是所有的软件都支持的。&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;hr /&gt;3. 程序语言或环境的支持&lt;br /&gt;&lt;br /&gt;4. 实例&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;临时发布，待续&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Resources：&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a set="yes" href="http://www.zdnet.com.cn/developer/tech/story/0,2000081602,39077620,00.htm"&gt;揭开正则表达式语法的神秘面纱&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://net.pku.edu.cn/%7Eyhf/tao_regexps_zh.html"&gt;正则表达式之道&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;!-- Tag links generated by Zoundry Blog Writer. Do not manually edit. http://www.zoundry.com --&gt;&lt;br /&gt;Technorati : &lt;a href="http://technorati.com/tag/re" class="ztag" rel="tag"&gt;re&lt;/a&gt;, &lt;a set="yes" href="http://technorati.com/tag/regular%20expression" class="ztag" rel="tag"&gt;regular expression&lt;/a&gt;, &lt;a set="yes" href="http://technorati.com/tag/%E5%AD%97%E7%AC%A6%E5%8C%B9%E9%85%8D" class="ztag" rel="tag"&gt;字符匹配&lt;/a&gt;, &lt;a href="http://technorati.com/tag/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F" class="ztag" rel="tag"&gt;正则表达式&lt;/a&gt;&lt;br /&gt;Del.icio.us : &lt;a href="http://del.icio.us/tag/re" class="ztag" rel="tag"&gt;re&lt;/a&gt;, &lt;a set="yes" href="http://del.icio.us/tag/regular+expression" class="ztag" rel="tag"&gt;regular expression&lt;/a&gt;, &lt;a href="http://del.icio.us/tag/%E5%AD%97%E7%AC%A6%E5%8C%B9%E9%85%8D" class="ztag" rel="tag"&gt;字符匹配&lt;/a&gt;, &lt;a set="yes" href="http://del.icio.us/tag/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F" class="ztag" rel="tag"&gt;正则表达式&lt;/a&gt;&lt;a href="http://del.icio.us/tag/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F" class="ztag" rel="tag"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-7902569682193750371?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2006/12/21/utyaqnugflpzuqjgsujmhowzndfhotnjnmjd/' title='关于正则表达式'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/7902569682193750371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=7902569682193750371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/7902569682193750371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/7902569682193750371'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/blog-post.html' title='关于正则表达式'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-966517575923551992</id><published>2006-11-20T19:39:00.000+08:00</published><updated>2007-05-03T19:51:40.824+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='dom'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Basics of Javascript</title><content type='html'>&lt;span style="color: rgb(192, 192, 192);"&gt;&lt;strong&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Note&lt;/span&gt;&lt;/strong&gt;:&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128);"&gt;My recent posts about basics or overview of something&lt;br /&gt;mostly cite select matirials of sources listed in the Resources section of every&lt;br /&gt;post. It only serves for personal study and learning. And if you like, you can&lt;br /&gt;take any part or all of them as desired. It would be my pleasure.&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;/h3&gt;Javascript is an html scripting language. In the official specification it is&lt;br /&gt;called ECMAScript.&lt;br /&gt;&lt;h3&gt;&lt;strong&gt;Built-in Features&lt;/strong&gt;&lt;/h3&gt;&lt;h4&gt;&lt;strong&gt;Datatypes and Values&lt;/strong&gt;&lt;/h4&gt;All numbers in JavaScript are represented as 64-bit floating-point values&lt;br /&gt;(i.e., similar to double in java and C++).&lt;br /&gt;&lt;br /&gt;Conversion between Strings and Numbers can be done in several ways in both&lt;br /&gt;direction. Numbers are automatically converted to strings when needed, so are&lt;br /&gt;strings converted to numbers.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Numbers to strings&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;var n = 100;&lt;br /&gt;var s = n + " bottles of beer.";&lt;br /&gt;&lt;br /&gt;var n_as_string = n + "";&lt;br /&gt;&lt;br /&gt;var string_value = String(number);&lt;br /&gt;&lt;br /&gt;string_value = number.toString();&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Strings to numbers&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;var product = "21" * "2"; // get number 42&lt;br /&gt;&lt;br /&gt;var number = string_value - 0;&lt;br /&gt;(Note: adding zero to a string value&lt;br /&gt;results in string concatenation)&lt;br /&gt;&lt;br /&gt;var number = Number(string_value);&lt;br /&gt;&lt;br /&gt;// And parseInt(), parseFloat.&lt;br /&gt;&lt;br /&gt;In JavaScript, &lt;strong&gt;functions are values&lt;/strong&gt; that can be manipulated&lt;br /&gt;by JavaScript code. It means that functions can be stored in variables, arrays,&lt;br /&gt;and objects, and it means that functions can be passed as arguments to other&lt;br /&gt;functions.&lt;br /&gt;&lt;br /&gt;Functions can be defined in three ways:&lt;br /&gt;&lt;br /&gt;function square(x) { return x*x;}&lt;br /&gt;&lt;br /&gt;var square = function(x) { return x*x; }&lt;br /&gt;// function name here is&lt;br /&gt;optional.&lt;br /&gt;&lt;br /&gt;var square = new Function("x", "return x*x");&lt;br /&gt;// awkward, less useful and&lt;br /&gt;less efficient.&lt;br /&gt;&lt;br /&gt;An object is a collection of named values. These named values are usually&lt;br /&gt;referred to as properties of the object. Properties of objects are, in&lt;br /&gt;many ways, just like JavaScript variables; they can contain any type of data,&lt;br /&gt;including arrays, functions, and other objects. Objects in JavaScript can serve&lt;br /&gt;as associative arrays (recall the same concept in Delphi/Pascal, if you&lt;br /&gt;know that language); that is, they can associate arbitrary data values with&lt;br /&gt;arbitrary strings.&lt;br /&gt;&lt;br /&gt;image.width&lt;br /&gt;image.height&lt;br /&gt;&lt;br /&gt;image["width"]&lt;br /&gt;image["height"]&lt;br /&gt;&lt;br /&gt;Arrays may contain any type of JavaScript data, including references to other&lt;br /&gt;arrays or to objects or functions. Also note that&lt;br /&gt;&lt;strong&gt;JavaScript does not support multidimensional arrays&lt;/strong&gt;,&lt;br /&gt;except as arrays of arrays. Finally, because JavaScript is an untyped language,&lt;br /&gt;&lt;strong&gt;the elements of an array&lt;/strong&gt;&lt;strong&gt; do not all need to be&lt;br /&gt;of the same type&lt;/strong&gt;, as they do in typed languages like Java.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;A corresponding object class is defined for each of the three key&lt;br /&gt;primitive datatypes&lt;/strong&gt;. That is, besides supporting the number, string,&lt;br /&gt;and boolean datatypes, JavaScript also supports Number, String, and Boolean&lt;br /&gt;classes. JavaScript can flexibly convert values from one type to another. When&lt;br /&gt;you use a string in an object contexti.e., when you try to access a property or&lt;br /&gt;method of the string,&lt;strong&gt; JavaScript internally creates a String wrapper&lt;br /&gt;object for the string value&lt;/strong&gt;. Note that the String object created when&lt;br /&gt;you use a string in an object context is a transient one.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Primitive types are manipulated by value, and reference types, as the&lt;br /&gt;name suggests, are manipulated by reference&lt;/strong&gt;. Numbers and booleans are&lt;br /&gt;easily manipulated at the low levels of the JavaScript interpreter. Objects, on&lt;br /&gt;the other hand, are reference types. Arrays and functions, which are specialized&lt;br /&gt;types of objects, are therefore also reference types.&lt;br /&gt;&lt;br /&gt;Since strings (primitive type, not the wrapper) are immutable in JavaScript,&lt;br /&gt;there is no way to tell whether strings are passed by value or by reference.&lt;br /&gt;&lt;h4&gt;&lt;strong&gt;Variables&lt;/strong&gt;&lt;/h4&gt;There's &lt;strong&gt;no fundamental difference in JavaScript between variables and&lt;br /&gt;the properties of objects&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;When the JavaScript interpreter starts up, &lt;strong&gt;one of the first things it&lt;br /&gt;does, before executing any JavaScript code, is create a global&lt;br /&gt;object&lt;/strong&gt;. The properties of this object are the&lt;br /&gt;global variables of JavaScript programs. When you declare a global JavaScript&lt;br /&gt;variable, what you are actually doing is defining a property of the global&lt;br /&gt;object.&lt;br /&gt;&lt;br /&gt;The JavaScript interpreter initializes the global object with a number of&lt;br /&gt;properties that refer to predefined values and functions. For example, the&lt;br /&gt;&lt;tt&gt;Infinity&lt;/tt&gt;, &lt;tt&gt;parseInt&lt;/tt&gt;, and &lt;tt&gt;Math&lt;/tt&gt; properties refer to the&lt;br /&gt;number infinity, the predefined &lt;tt&gt;parseInt( )&lt;/tt&gt; function, and the&lt;br /&gt;predefined Math object, respectively.&lt;br /&gt;&lt;br /&gt;In top-level code (i.e., JavaScript code that is not part of a function), you&lt;br /&gt;can &lt;strong&gt;use the JavaScript keyword &lt;tt&gt;this&lt;/tt&gt; to refer to the global&lt;br /&gt;object&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;In client-side JavaScript, the Window object&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;serves as the global object&lt;/strong&gt; for all JavaScript code contained in the&lt;br /&gt;browser window it represents. This global Window object has a self-referential&lt;br /&gt;&lt;tt&gt;window&lt;/tt&gt; property that can be used instead of &lt;tt&gt;this&lt;/tt&gt; to refer to&lt;br /&gt;the global object. The Window object defines the core global properties, such as&lt;br /&gt;&lt;tt&gt;parseInt&lt;/tt&gt; and &lt;tt&gt;Math&lt;/tt&gt;, and also global client-side properties,&lt;br /&gt;such as &lt;tt&gt;navigator&lt;/tt&gt; and &lt;tt&gt;screen&lt;/tt&gt;.&lt;br /&gt;&lt;br /&gt;For local variables, while the body of a function is executing, the function&lt;br /&gt;arguments and local variables are stored as properties of another special&lt;br /&gt;object. This object is known as the &lt;strong&gt;call object&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;Each time the JavaScript interpreter begins to execute a function, it creates&lt;br /&gt;a new &lt;strong&gt;execution context&lt;/strong&gt; for that function. Thus,&lt;br /&gt;JavaScript code that is not part of any function runs in an execution context&lt;br /&gt;that uses the global object for variable definitions. &lt;strong&gt;A JavaScript&lt;br /&gt;implementation may allow multiple "global" execution contexts&lt;/strong&gt;. The&lt;br /&gt;obvious example is client-side JavaScript, in which each separate browser&lt;br /&gt;window, or each frame within a window, defines a separate global execution&lt;br /&gt;context.&lt;br /&gt;&lt;h4&gt;&lt;strong&gt;Object Support&lt;/strong&gt;&lt;/h4&gt;ECMAScript does not contain proper classes such as those in C++, Smalltalk,&lt;br /&gt;or Java. An ECMAScript object is an unordered collection of properties each with&lt;br /&gt;zero or more attributes.&lt;br /&gt;&lt;br /&gt;It turns out that every JavaScript object&lt;strong&gt; includes an internal&lt;br /&gt;reference to another object, known as its prototype&lt;/strong&gt; object. All&lt;br /&gt;functions have a &lt;tt&gt;prototype&lt;/tt&gt; property that is automatically created and&lt;br /&gt;initialized when the function is defined. The initial value of the&lt;br /&gt;&lt;tt&gt;prototype&lt;/tt&gt; property is an object with a single property. This property&lt;br /&gt;is named &lt;tt&gt;constructor&lt;/tt&gt; and refers back to the constructor function with&lt;br /&gt;which the prototype is associated.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Property inheritance occurs only when you read property values, not&lt;br /&gt;when you write them&lt;/strong&gt;. If you set the property &lt;tt&gt;&lt;em&gt;p&lt;/em&gt;&lt;/tt&gt; in an&lt;br /&gt;object &lt;tt&gt;&lt;em&gt;o&lt;/em&gt;&lt;/tt&gt; that inherits that property from its prototype, what&lt;br /&gt;happens is that you create a new property &lt;tt&gt;&lt;em&gt;p&lt;/em&gt;&lt;/tt&gt; directly in&lt;br /&gt;&lt;tt&gt;&lt;em&gt;o&lt;/em&gt;&lt;/tt&gt;. Now that &lt;tt&gt;&lt;em&gt;o&lt;/em&gt;&lt;/tt&gt; has its own property named&lt;br /&gt;&lt;tt&gt;&lt;em&gt;p&lt;/em&gt;&lt;/tt&gt;, it no longer inherits the value of &lt;tt&gt;&lt;em&gt;p&lt;/em&gt;&lt;/tt&gt; from&lt;br /&gt;its prototype.&lt;br /&gt;&lt;h3&gt;Navigator Object&lt;/h3&gt;The &lt;a href="http://www.comptechdoc.org/independent/web/cgi/javamanual/javanavigator.html"&gt;JavaScript&lt;br /&gt;navigator object&lt;/a&gt; is the object representation of the client internet browser&lt;br /&gt;or web navigator program that is being used. This object is the top level object&lt;br /&gt;to all others.&lt;br /&gt;&lt;h3&gt;DOM Object&lt;/h3&gt;&lt;h4&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;/h4&gt;The goal of the DOM group is to define a programmatic interface for XML and&lt;br /&gt;HTML. It is platform- and language-neutral interface. The DOM is separated into&lt;br /&gt;three parts: Core, HTML, and XML. The Core DOM provides a low-level set of&lt;br /&gt;objects that can represent &lt;strong&gt;any structured document&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;DOM is being designed at several levels:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;"Level 1. This concentrates on the actual core, HTML, and XML document&lt;br /&gt;models. It contains functionality for document navigation and manipulation.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Level 2. Includes a style sheet object model, and defines functionality for&lt;br /&gt;manipulating the style information attached to a document. It also enables&lt;br /&gt;traversals on the document, defines an event model and provides support for XML&lt;br /&gt;namespaces.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Level 3. Will address document loading and saving, as well as content models&lt;br /&gt;(such as DTDs and schemas) with document validation support. In addition, it&lt;br /&gt;will also address document views and formatting, key events and event groups.&lt;br /&gt;First public working drafts are available.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Further Levels. These may specify some interface with the possibly&lt;br /&gt;underlying window system, including some ways to prompt the user. They may also&lt;br /&gt;contain a query language interface, and address multithreading and&lt;br /&gt;synchronization, security, and repository."&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;br /&gt;&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.ecma-international.org/publications/standards/ECMA-262.htm"&gt;ECMAScript&lt;br /&gt;Language Specification 3rd edition&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/Ajax-in-Action-Dave-Crane/dp/1932394613"&gt;Ajax&lt;br /&gt;in Action&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.comptechdoc.org/independent/web/cgi/javamanual/"&gt;The&lt;br /&gt;CTDP JavaScript Manual Version 0.6.0, December 31, 2000&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://xml.coverpages.org/dom.html"&gt;W3C Document Object Model&lt;br /&gt;(DOM)&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.howtocreate.co.uk/tutorials/javascript/domstructure"&gt;DOM&lt;br /&gt;objects and methods&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;JavaScript - The Definitive Guide, 5th Edition&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p align="right"&gt;This is a rough draft and published temporarily.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-966517575923551992?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2006/11/20/vnwsgiqxoppjuknilnuehivqqeapwqrrdnjj/' title='Basics of Javascript'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/966517575923551992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=966517575923551992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/966517575923551992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/966517575923551992'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/basics-of-javascript.html' title='Basics of Javascript'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-4841880319558863386</id><published>2006-11-15T18:06:00.000+08:00</published><updated>2007-05-03T19:52:11.340+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='xslt'/><title type='text'>Study XSLT Tutorial</title><content type='html'>&lt;strong&gt;Overview&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;XSL = XML Style Sheets&lt;br /&gt;&lt;br /&gt;XSL consists of three parts:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;XSLT - a language for transforming XML documents&lt;/li&gt;&lt;br /&gt;&lt;li&gt;XPath - a language for navigating in XML documents&lt;/li&gt;&lt;br /&gt;&lt;li&gt;XSL-FO - a language for formatting XML documents&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;The root element that declares the document to be an XSL style sheet is &amp;lt;xsl:stylesheet&amp;gt; or &amp;lt;xsl:transform&amp;gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; &amp;lt;xsl:stylesheet&amp;gt; and &amp;lt;xsl:transform&amp;gt; are completely synonymous and either can be used!&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;More Color On The Overview&lt;/strong&gt;&lt;br /&gt;&lt;blockquote&gt;An XSLT style sheet consists of a set of template rules, each of which takes the form "&lt;strong&gt;if this condition is encountered in the input, then generate the following output&lt;/strong&gt;." &lt;strong&gt;The order of the rules is immaterial&lt;/strong&gt;, and there is a conflict-resolution algorithm applied when several rules match the same input. One respect in which XSLT differs from serial text processing languages, however, is that the input is not processed sequentially line by line. Rather, the input XML document is treated as a tree structure, and each template rule is applied to a node in the tree. The template rule itself can decide which nodes to process next, so the input is not necessarily scanned in its original document order. [&lt;a href="http://www-128.ibm.com/developerworks/library/x-xslt/"&gt;via&lt;/a&gt;]&lt;/blockquote&gt;&lt;br /&gt;&lt;strong&gt;Use XSL To Transform a XML Document&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;First declare the a xsl document and then define templates:&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-1"?&amp;gt;&lt;br /&gt;&amp;lt;xsl:stylesheet version="1.0"&lt;br /&gt;xmlns:xsl="&lt;a href="http://www.w3.org/1999/XSL/Transform"&gt;http://www.w3.org/1999/XSL/Transform"&lt;/a&gt;&amp;gt;&lt;br /&gt;&lt;blockquote&gt;&amp;lt;xsl:template match="/"&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h2&amp;gt;My CD Collection&amp;lt;/h2&amp;gt;&lt;br /&gt;&amp;lt;table border="1"&amp;gt;&lt;br /&gt;&amp;lt;tr bgcolor="#9acd32"&amp;gt;&lt;br /&gt;&amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;th&amp;gt;Artist&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;xsl:for-each select="catalog/cd"&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;xsl:value-of select="title"/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;xsl:value-of select="artist"/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/xsl:for-each&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;Then specify the stylesheet in your xml source document, simply like this: &lt;strong&gt;&amp;lt;?xml-stylesheet type="text/xsl" href="cdcat.xsl"?&amp;gt;&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;The match attribute is used to associate a template with an XML element. But &lt;strong&gt;match="/" defines the whole document by associating the template with the root of the xml source document&lt;/strong&gt;, in which the value of the match attribute is &lt;strong&gt;an XPath expression&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;In the element &amp;lt;&lt;strong&gt;xsl:for-each&lt;/strong&gt; select="catalog/cd"&amp;gt;, "catalog/cd" matches (&lt;strong&gt;case-sensitive match, after all an xsl instance is an xml document.&lt;/strong&gt;) the data structure in the xml document, i.e., the value of the select attribute (a little bit like "select" in SQL) is an XPath expression.&lt;br /&gt;&lt;br /&gt;We can also filter the output from the XML file by adding some criterions to the select attribute in the &amp;lt;xsl:for-each&amp;gt; element.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&amp;lt;xsl:for-each select="catalog/cd[artist='Bob Dylan']"&amp;gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Legal filter operators are:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;=  (equal)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;!= (not equal)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&amp;lt; less than&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&amp;gt; greater than&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;Note&lt;/strong&gt;: 'Bob Dylan' should match exactly what is between the &amp;lt;artist&amp;gt; and &amp;lt;/artist&amp;gt;, including white spaces and line breaker.&lt;br /&gt;&lt;br /&gt;We can use an &lt;strong&gt;&amp;lt;xsl:sort&amp;gt;&lt;/strong&gt; element inside the &amp;lt;xsl:for-each&amp;gt; to sort the output.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.w3schools.com/xsl/xsl_if.asp"&gt;To add an if statement&lt;/a&gt; use the syntax below:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;xsl:if test="&lt;em&gt;expression&lt;/em&gt;"&amp;gt;&lt;br /&gt;...&lt;br /&gt;...some output if the expression is true...&lt;br /&gt;...&lt;br /&gt;&amp;lt;/xsl:if&amp;gt;&lt;/blockquote&gt;For example:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;xsl:for-each select="catalog/cd"&amp;gt;&lt;br /&gt;&amp;lt;xsl:if test="price &amp;gt; 10"&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;xsl:value-of select="title"/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;xsl:value-of select="artist"/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/xsl:if&amp;gt;&lt;br /&gt;&amp;lt;/xsl:for-each&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;See &lt;a href="http://www.w3schools.com/xsl/xsl_choose.asp"&gt;here&lt;/a&gt; for more conditional tests to filter the output by using &lt;strong&gt;&amp;lt;xsl:choose&amp;gt;&lt;/strong&gt; and &lt;strong&gt;&amp;lt;xsl:when&amp;gt;&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;Without its &lt;em&gt;select&lt;/em&gt; attribute specified, &lt;strong&gt;&amp;lt;xsl:apply-templates&amp;gt;&lt;/strong&gt; is used to apply any relevant template(s) to the matched node(s)'s children. While using this element's &lt;em&gt;select&lt;/em&gt; attribute, you can be pickier about exactly which children of a node should be processed and in what order.&lt;br /&gt;&lt;br /&gt;Referring to the xsl file directly in an xml docuemt requires that there be a XSLT aware browser.Actually, we could have alternatives for the transformation. First, we can &lt;strong&gt;&lt;a href="http://www.w3schools.com/xsl/xsl_client.asp"&gt;use javascript on the client side&lt;/a&gt;&lt;/strong&gt; to invoke a stand alone xml parser, such as MS XML Parser, to do the transformation. Second, we can also &lt;a href="http://www.w3schools.com/xsl/xsl_server.asp"&gt;use server side scripting language&lt;/a&gt; (e.g., asp, jsp, python, etc) to do the transformation, which meets the cross browser needs.&lt;br /&gt;&lt;br /&gt;The &lt;code&gt;&lt;/code&gt;&lt;a href="http://www.w3schools.com/xsl/xsl_editxml.asp"&gt;&lt;strong&gt;xsl:attribute element&lt;/strong&gt;&lt;/a&gt; can be used to &lt;strong&gt;add attributes to result elements&lt;/strong&gt; whether created by literal result elements in the stylesheet or by instructions such as &lt;code&gt;xsl:element&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Little Tricks&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. Use &amp;lt;...select="@width"&amp;gt; to identify the attribute of an element, in which case width is the attribute name. The XPath expression &lt;code&gt;../@title&lt;/code&gt; selects the title attribute of the element that is the parent of the current node.&lt;br /&gt;&lt;br /&gt;2. Use &lt;strong&gt;curly braces ({})&lt;/strong&gt; surrounding an expression to specifiy an &lt;a href="http://www.w3.org/TR/xslt#attribute-value-templates"&gt;&lt;strong&gt;attribute value template&lt;/strong&gt;&lt;/a&gt;. e.g., ＜h1＞＜a href="{../link}"＞＜xsl:apply-templates/＞＜/a＞＜/h1＞ (".." may be meant to go to parent node of the current node). And see the following example for more details:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;The following example creates an img result element from a photograph element in the source; the value of the src attribute of the img element is computed from the value of the image-dir variable and the string-value of the href child of the photograph element; the value of the width attribute of the img element is computed from the value of the width attribute of the size child of the photograph element: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;&amp;lt;xsl:variable name="image-dir"&amp;gt;/images&amp;lt;/xsl:variable&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;&amp;lt;xsl:template match="photograph"&amp;gt;&lt;br /&gt;&amp;lt;img src="{$image-dir}/{href}" width="{size/@width}"/&amp;gt;&lt;br /&gt;&amp;lt;/xsl:template&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;With this source &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;&amp;lt;photograph&amp;gt;&lt;br /&gt;&amp;lt;href&amp;gt;headquarters.jpg&amp;lt;/href&amp;gt;&lt;br /&gt;&amp;lt;size width="300"/&amp;gt;&lt;br /&gt;&amp;lt;/photograph&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;the result would be &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 255);"&gt;&amp;lt;img src="/images/headquarters.jpg" width="300"/&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;3.  &lt;strong&gt;The order&lt;/strong&gt; in which various template rules appears in the stylesheet &lt;strong&gt;mean nothing&lt;/strong&gt; to the XSLT processor.&lt;br /&gt;&lt;br /&gt;4. The &lt;strong&gt;XSLT processor uses the most specific template it can find to process each node of the source tree&lt;/strong&gt;. So template: &amp;lt;xsl: template match="*|@*|text()"&amp;gt; might do nothing if any other templates are defined, since it just matches any element, attribute and text nodes. And &lt;a href="http://www.7dspace.com/doc/44/0605/20065506211596082.htm"&gt;another example&lt;/a&gt;, in the existence of &amp;lt;xsl:template match="channel/title"&amp;gt;, &amp;lt;xsl:template match="title"&amp;gt; might do nothing also.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Conceptually (the fact is almost the same most of the time), you can think of the transformation process with XSLT like this: the input xml source document is parsed as a &lt;strong&gt;source tree structure&lt;/strong&gt; (DOM?), and another input, the style sheet is also parsed as a tree stucture, then it's the XSLT Processor's job to write the source tree as the &lt;strong&gt;result tree&lt;/strong&gt; according to the stylesheet (mostly, template rules). Figure 1 illustrates the process.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www-128.ibm.com/developerworks/library/x-xslt/"&gt;&lt;strong&gt;Figure 1. Operation of an XSLT Processor&lt;/strong&gt;&lt;/a&gt;&lt;img src="http://www-128.ibm.com/developerworks/library/x-xslt/xsltproc.jpg" alt="Operation of an XSLT Processor" height="244" width="496" /&gt;&lt;br /&gt;&lt;br /&gt;Resources:&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://www.w3schools.com/xsl/default.asp"&gt;XSLT Tutorial&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. &lt;a href="http://www.w3.org/TR/xslt"&gt;XSL Transformations (XSLT) Version 1.0&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. &lt;a href="http://www.7dspace.com/doc/44/0605/20065506211596082.htm"&gt;使用XML: XSLT 2.0和XQuery对比&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4. &lt;a href="http://www-128.ibm.com/developerworks/library/x-xslt/"&gt;What kind of language is XSLT?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5. Book: &lt;a href="http://www.amazon.com/XSLT-Quickly-Bob-DuCharme/dp/1930110111"&gt;XSLT Quickly&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;6. &lt;a href="http://www-128.ibm.com/developerworks/xml/library/x-xslt2/index.html"&gt;Saxon: Anatomy of an XSLT processor&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-4841880319558863386?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/4841880319558863386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=4841880319558863386' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/4841880319558863386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/4841880319558863386'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/study-xslt-tutorial.html' title='Study XSLT Tutorial'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-8095846762114523369</id><published>2006-11-14T17:48:00.000+08:00</published><updated>2007-05-03T19:38:08.200+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>A Little Trick: XML Data Embedded in HTML</title><content type='html'>You can embed xml which contained data you want to display in a html document. The line of code does this embeding thing is like this:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;xml id="cdcat" src="cd_catalog.xml"&amp;gt;&amp;lt;/xml&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;But there's a little trick. &lt;strong&gt;It requires that the xml source document's name reflect the structure of the xml document&lt;/strong&gt;. For example, below is a fragment of the source document:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;?xml ...?&amp;gt;&lt;br /&gt;&amp;lt;CATALOG&amp;gt;&lt;br /&gt;&amp;lt;CD&amp;gt;&lt;br /&gt;&amp;lt;...&lt;br /&gt;&lt;pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;For the xml document containing this fragment of codes should be &lt;strong&gt;referred as "cd_catalog.xml"&lt;/strong&gt; in the embeding html document. So below is the whole example.&lt;br /&gt;&lt;br /&gt;The XML document containing the data:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-1"?&amp;gt;&lt;br /&gt;&amp;lt;CATALOG&amp;gt;&lt;br /&gt;&amp;lt;CD&amp;gt;&lt;br /&gt;&amp;lt;TITLE&amp;gt;Empire Burlesque&amp;lt;/TITLE&amp;gt;&lt;br /&gt;&amp;lt;ARTIST&amp;gt;Bob Dylan&amp;lt;/ARTIST&amp;gt;&lt;br /&gt;&amp;lt;COUNTRY&amp;gt;USA&amp;lt;/COUNTRY&amp;gt;&lt;br /&gt;&amp;lt;COMPANY&amp;gt;Columbia&amp;lt;/COMPANY&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;lt;PRICE&amp;gt;10.90&amp;lt;/PRICE&amp;gt;&lt;br /&gt;&amp;lt;YEAR&amp;gt;1985&amp;lt;/YEAR&amp;gt;&lt;br /&gt;&amp;lt;/CD&amp;gt;&lt;br /&gt;&amp;lt;CD&amp;gt;&lt;br /&gt;&amp;lt;TITLE&amp;gt;Hide your heart&amp;lt;/TITLE&amp;gt;&lt;br /&gt;&amp;lt;ARTIST&amp;gt;Bonnie Tyler&amp;lt;/ARTIST&amp;gt;&lt;br /&gt;&amp;lt;COUNTRY&amp;gt;UK&amp;lt;/COUNTRY&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;COMPANY&amp;gt;CBS Records&amp;lt;/COMPANY&amp;gt;&lt;br /&gt;&amp;lt;PRICE&amp;gt;9.90&amp;lt;/PRICE&amp;gt;&lt;br /&gt;&amp;lt;YEAR&amp;gt;1988&amp;lt;/YEAR&amp;gt;&lt;br /&gt;&amp;lt;/CD&amp;gt; ... &amp;lt;/CATALOG&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;The HTML document embeding the xml data:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;xml id="cdcat" src="cd_catalog.xml"&amp;gt;&amp;lt;/xml&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;table border="3" datasrc="#cdcat"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;span datafld="ARTIST"&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;span datafld="TITLE"&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;Click &lt;a href="http://www.w3schools.com/xml/tryit.asp?filename=cd_catalog_island"&gt;this link&lt;/a&gt; to see the live example. And as the tutorial mentioned, it seems it only functions on IE 5.0 or later version, but not functions on Firefox.&lt;br /&gt;&lt;br /&gt;Resourses:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.w3schools.com/xml/xml_data_island.asp"&gt;XML Data Island&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-8095846762114523369?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2006/11/14/olwrnhpgcddeuhjmsaibrsmxzrqdxhhmsedg/' title='A Little Trick: XML Data Embedded in HTML'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/8095846762114523369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=8095846762114523369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8095846762114523369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8095846762114523369'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/little-trick-xml-data-embedded-in-html.html' title='A Little Trick: XML Data Embedded in HTML'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-3795916030268561461</id><published>2006-11-13T17:47:00.000+08:00</published><updated>2007-05-03T19:37:25.730+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='api'/><category scheme='http://www.blogger.com/atom/ns#' term='quiz'/><category scheme='http://www.blogger.com/atom/ns#' term='unicode'/><title type='text'>The Java SE 6 Platform Quiz</title><content type='html'>&lt;p&gt;The following quiz answers cites &lt;a set="yes" href="http://java.sun.com/javase/6/launchquiz_answers.jsp"&gt;The Java SE 6&lt;br /&gt;Platform Quiz&lt;/a&gt;:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;1. What scripting language can you use in the Java SE 6 platform?&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;Answer (E): The &lt;a href="http://www.mozilla.org/rhino/"&gt;Mozilla&lt;br /&gt;Rhino&lt;/a&gt; engine implements the &lt;a set="yes" href="http://java.sun.com/javascript/index.jsp"&gt;JavaScript&lt;/a&gt; technology&lt;br /&gt;scripting language and is available in the core Java Runtime Environment (JRE).&lt;br /&gt;However, the scripting API allows you to use any scripting engine that conforms&lt;br /&gt;with &lt;a href="http://jcp.org/en/jsr/detail?id=223"&gt;JSR 223&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;2. What is the normalization of Unicode text?&lt;/strong&gt;&lt;br /&gt;Answer (C):&lt;br /&gt;The Java SE 6 platform provides the public &lt;a set="yes" href="http://download.java.net/jdk6/docs/api/java/text/Normalizer.html"&gt;&lt;code&gt;java.text.Normalizer&lt;/code&gt;&lt;/a&gt;&lt;br /&gt;class, which allows you to convert text data to common composed or decomposed&lt;br /&gt;forms, allowing for accurate comparisons and searches on text. Before the Java&lt;br /&gt;SE 6 platform release, the &lt;code&gt;Normalizer&lt;/code&gt; class had been hidden in the&lt;br /&gt;Java platform. The class is now a public API. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;3. How do you launch your host’s default browser to view a specific&lt;br /&gt;URL?&lt;/strong&gt;&lt;br /&gt;Answer (B): The &lt;a href="http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/desktop_api/"&gt;Desktop&lt;br /&gt;API&lt;/a&gt; allows your program to launch applications associated with certain file&lt;br /&gt;types on the host platform. The current implementation can launch a web browser,&lt;br /&gt;text editor, and email application. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;4. How can I sort &lt;code&gt;JTable&lt;/code&gt; content?&lt;/strong&gt;&lt;br /&gt;Answer&lt;br /&gt;(D): A &lt;code&gt;javax.swing.table.TableRowSorter&lt;/code&gt; wraps your existing&lt;br /&gt;&lt;code&gt;TableModel&lt;/code&gt;. You can configure it to filter or sort your&lt;br /&gt;&lt;code&gt;JTable&lt;/code&gt; contents. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;5. What is the correct annotation to use to export a method as a web&lt;br /&gt;service operation using Java API for XML Web Services (JAX-WS), version&lt;br /&gt;2.0?&lt;/strong&gt;&lt;br /&gt;Answer (B): The &lt;code&gt;@WebMethod&lt;/code&gt; annotation is used to&lt;br /&gt;mark a method that is exposed as a web service operation. Note that the&lt;br /&gt;&lt;code&gt;@WebService&lt;/code&gt; annotation is used to specify that the class is a web&lt;br /&gt;service or that the interface defines a web service. The programmer will likely&lt;br /&gt;use the &lt;code&gt;@WebService&lt;/code&gt; annotation in conjunction with the&lt;br /&gt;&lt;code&gt;@WebMethod&lt;/code&gt; annotation. See the article “&lt;a href="http://java.sun.com/developer/technicalArticles/J2SE/jax_ws_2/"&gt;Introducing&lt;br /&gt;JAX-WS 2.0 With the Java SE 6 Platform, Part 1&lt;/a&gt;” for more information. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;6. In JDK 6, the JMX Monitor API now uses a thread pool to increase&lt;br /&gt;performance. What is the purpose of the JMX Monitor API?&lt;/strong&gt;&lt;br /&gt;Answer (D):&lt;br /&gt;The &lt;a href="http://download.java.net/jdk6/docs/api/javax/management/monitor/package-summary.html"&gt;JMX&lt;br /&gt;Monitor API&lt;/a&gt; allows an application to sample an attribute property of an&lt;br /&gt;MBean periodically and send a notification event if it passes a given threshold.&lt;br /&gt;It now uses a thread pool instead of creating a thread for each monitor. Another&lt;br /&gt;improvement is the ability to monitor a value within a complex type. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;7. JDK 6 incorporates an advanced version of the&lt;br /&gt;&lt;code&gt;SwingWorker&lt;/code&gt; class into core Java technology. What is the purpose of&lt;br /&gt;the &lt;code&gt;SwingWorker&lt;/code&gt; class?&lt;/strong&gt;&lt;br /&gt;Answer (D): Since the 1998&lt;br /&gt;publication of &lt;code&gt;SwingWorker&lt;/code&gt; in the article “&lt;a href="http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html"&gt;Threads&lt;br /&gt;and Swing&lt;/a&gt;,” developers have continuously requested that it be moved into&lt;br /&gt;core. At the 2004 JavaOne conference, the Desktop team presented a new version&lt;br /&gt;of &lt;code&gt;SwingWorker&lt;/code&gt; that included generification, use of the concurrency&lt;br /&gt;package, and &lt;code&gt;PropertyChangeListener&lt;/code&gt; support. Much of this&lt;br /&gt;functionality assists with interthread communication. The Java SE 6 platform&lt;br /&gt;release incorporates a similar version of &lt;a href="http://download.java.net/jdk6/docs/api/javax/swing/SwingWorker.html"&gt;&lt;code&gt;SwingWorker&lt;/code&gt;&lt;/a&gt;&lt;br /&gt;that greatly assists developers in processing GUI-driven functionality off the&lt;br /&gt;event-dispatching thread, indicating status and progress and aggregating the&lt;br /&gt;results. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;8. What is the best Java platform to use with the upcoming release of&lt;br /&gt;the Microsoft Windows Vista operating system?&lt;br /&gt;&lt;/strong&gt;Answer (A): The Java&lt;br /&gt;SE 6 platform release works best with the latest user interface (UI)&lt;br /&gt;enhancements of Windows Vista. According to a recent &lt;a href="http://weblogs.java.net/blog/chet/"&gt;blog entry by Chet Haase&lt;/a&gt;: “The&lt;br /&gt;primary delivery of Java for Vista is Java SE 6; that release has received most&lt;br /&gt;of our focus during the Vista beta release timeframe.” Go to the &lt;a set="yes" href="https://jdk6.dev.java.net/"&gt;JDK 6 Project site&lt;/a&gt; to download the most&lt;br /&gt;recent version. The release is pretty close to final, so it is working very well&lt;br /&gt;at this point. All of the serious Windows Vista problems have been fixed in this&lt;br /&gt;release for months, so it is a particularly good test vehicle for Java&lt;br /&gt;technology on Vista. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;9. In the Java SE 6 platform, what key tuning option(s) are needed to&lt;br /&gt;achieve high performance?&lt;/strong&gt;&lt;br /&gt;Answer (D): See the blog entry “&lt;a href="http://blogs.sun.com/dagastine/entry/no_tuning_required_java_se"&gt;No Tuning&lt;br /&gt;Required: Java SE Out-of-Box Vs. Tuned Performance&lt;/a&gt;” for a comparison of&lt;br /&gt;out-of-box and hand-tuned performance. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;10. The Java SE 6 platform delivers a technology that can greatly&lt;br /&gt;improve performance by reducing unnecessary synchronization overhead. It allows&lt;br /&gt;a thread to lock and unlock an object with minimal use of atomic operations.&lt;br /&gt;What is this technology called?&lt;/strong&gt;&lt;br /&gt;Answer (B): The technique called&lt;br /&gt;store-free biased locking eliminates all synchronization-related atomic&lt;br /&gt;operations on uncontended object monitors. The technique supports the bulk&lt;br /&gt;transfer of object ownership from one thread to another, and the selective&lt;br /&gt;disabling of the optimization where unprofitable, using epoch-based bulk&lt;br /&gt;rebiasing and revocation. It has been implemented in the production version of&lt;br /&gt;the Java HotSpot virtual machine (VM) and has yielded significant performance&lt;br /&gt;improvements on a range of benchmarks and applications. &lt;/p&gt; &lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-3795916030268561461?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2006/11/13/jglfegahdlrdalojfpbwawflgorodncmunry/' title='The Java SE 6 Platform Quiz'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/3795916030268561461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=3795916030268561461' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/3795916030268561461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/3795916030268561461'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/java-se-6-platform-quiz.html' title='The Java SE 6 Platform Quiz'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-8161542725712509830</id><published>2006-11-13T17:44:00.000+08:00</published><updated>2007-05-03T19:36:42.482+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='xsd'/><category scheme='http://www.blogger.com/atom/ns#' term='dom'/><category scheme='http://www.blogger.com/atom/ns#' term='sax'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>Three ways of validating a xml document with Java</title><content type='html'>With the rollout of Java 5.0 last year, JAXP 1.3 was in place for use. And one of the new features provided by JAXP 1.3 is a brand new Schema Validation Framework.&lt;br /&gt;&lt;br /&gt;The newly provided framework decouples the validation of an instance document as a process independent of parsing.  &lt;strong&gt;The Validation APIs are in the new package javax.xml.validation&lt;/strong&gt; and let developers obtain from a compiled schema a Validator or/and a Validator Handler which are used  to validate xml against the given schema. Alternatively, a compiled schema instance could also be passed to any Reader/Parser to validate xml. So there're roughly two ways provided by the new Schema Validation Framework. And besides these two, setting the uncomplied schema source on Reader/Parser is also available due to the issue of backward compatibility. As we can see in the first article and the accompanying example codes listed in the Resources section, the newly introduced Validation Frame improves the performance, effiency and flexibility.&lt;br /&gt;&lt;br /&gt;Below are simple code snippets to respectively illustrate how validating xml documents is done in these three ways.&lt;br /&gt;&lt;br /&gt;1. Set uncompiled schema (since JAXP 1.2):&lt;br /&gt;&lt;blockquote&gt;private static void saxParseJAXP1_2(String xmlFile, DefaultHandler dh,&lt;br /&gt;String schemaFile) {&lt;br /&gt;try {&lt;br /&gt;SAXParserFactory spf = SAXParserFactory.newInstance();&lt;br /&gt;spf.setNamespaceAware(true);&lt;br /&gt;spf.setValidating(true);&lt;br /&gt;SAXParser sp = spf.newSAXParser();&lt;br /&gt;&lt;strong&gt;sp.setProperty(&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;http://java.sun.com/xml/jaxp/properties/schemaLanguage&lt;/strong&gt;&lt;strong&gt;,&lt;br /&gt;XMLConstants.W3C_XML_SCHEMA_NS_URI);&lt;br /&gt;sp.setProperty(&lt;br /&gt;"&lt;/strong&gt;&lt;strong&gt;http://java.sun.com/xml/jaxp/properties/schemaSource"&lt;/strong&gt;&lt;strong&gt;,&lt;br /&gt;schemaFile);&lt;/strong&gt;&lt;br /&gt;sp.parse(new File(xmlFile), dh);&lt;br /&gt;} catch (ParserConfigurationException e) {&lt;br /&gt;e.printStackTrace();&lt;br /&gt;} catch (SAXException e) {&lt;br /&gt;e.printStackTrace();&lt;br /&gt;} catch (IOException e) {&lt;br /&gt;e.printStackTrace();&lt;br /&gt;}&lt;br /&gt;}&lt;/blockquote&gt;&lt;br /&gt;2. Set compiled schema instance (since JAXP 1.3, FIX ME HERE)&lt;br /&gt;&lt;blockquote&gt;private static void saxParseSetSchemaJAXP1_3(String xmlFile, DefaultHandler dh,&lt;br /&gt;String schemaFile) {&lt;br /&gt;try {&lt;br /&gt;SchemaFactory sf = SchemaFactory.newInstance(&lt;br /&gt;XMLConstants.W3C_XML_SCHEMA_NS_URI);&lt;br /&gt;Schema schema = sf.newSchema(new File(schemaFile));&lt;br /&gt;SAXParserFactory spf = SAXParserFactory.newInstance();&lt;br /&gt;spf.setNamespaceAware(true);&lt;br /&gt;&lt;strong&gt;spf.setSchema(schema);&lt;/strong&gt;&lt;br /&gt;SAXParser sp = spf.newSAXParser();&lt;br /&gt;sp.parse(new File(xmlFile), dh);&lt;br /&gt;} catch (ParserConfigurationException e) {&lt;br /&gt;e.printStackTrace();&lt;br /&gt;} catch (SAXException e) {&lt;br /&gt;e.printStackTrace();&lt;br /&gt;} catch (Exception e) {&lt;br /&gt;e.printStackTrace();&lt;br /&gt;}&lt;br /&gt;}&lt;/blockquote&gt;&lt;br /&gt;3. Validator (since JAXP1.3)&lt;br /&gt;&lt;blockquote&gt;private static void saxParseValidateJAXP1_3(String xmlFile,&lt;br /&gt;ErrorHandler dh, String schemaFile) {&lt;br /&gt;try {&lt;br /&gt;SchemaFactory sf = SchemaFactory.newInstance(&lt;br /&gt;XMLConstants.W3C_XML_SCHEMA_NS_URI);&lt;br /&gt;&lt;strong&gt;Validator validator = sf.newSchema(&lt;br /&gt;new File(schemaFile)).newValidator();&lt;/strong&gt;&lt;br /&gt;validator.setErrorHandler(dh);&lt;br /&gt;validator.validate(new StreamSource(xmlFile));&lt;br /&gt;} catch (Exception e) {&lt;br /&gt;e.printStackTrace();&lt;br /&gt;}&lt;/blockquote&gt;&lt;br /&gt;It's noteworthy that the first way and the second way can apply for both DOM source and SAX source, while the third way is usually only used to validate a SAX stream (FIX ME HERE).&lt;br /&gt;&lt;br /&gt;Update (20061113):&lt;br /&gt;&lt;br /&gt;Basics of using Schema&lt;br /&gt;&lt;br /&gt;Be aware of the concept of  xml target namespace and "source namespaces". The name defined in a schema are said to belong to its target namespace. Definitions and declarations in a schema can refer to names that may belong to other namespaces. In the fourth article those namespaces are referred to as "source namespaces". And here follows a little colour as to simple type and complex type. An element that doesn't contain attributes or other elements can be defined to be of a simple type, predefined or user-defined, such as string, integer, decimal, time, etc. Elements with attributes and embeded elements must have a complex type. There're a huge amount of details about XML Schema definition that are not covered here but can be found &lt;a href="http://www.w3.org/TR/xmlschema-0/" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Simple example&lt;br /&gt;&lt;br /&gt;A xml instance document:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;?xml version = "1.0" encoding = "utf-8"?&amp;gt;&lt;br /&gt;&amp;lt;SONGS xmlns:xsi='&lt;a href="http://www.w3.org/2001/XMLSchema-instance%27"&gt;http://www.w3.org/2001/XMLSchema-instance'&lt;/a&gt;&lt;br /&gt;xsi:noNamespaceSchemaLocation='mySong.xsd'&amp;gt;&lt;br /&gt;&amp;lt;SONG genre = "pop"&amp;gt;&lt;br /&gt;&amp;lt;TITLE &amp;gt; Hot Cop &amp;lt;/TITLE&amp;gt;&lt;br /&gt;&amp;lt;COMPOSER &amp;gt; Jacques Morali&lt;br /&gt;&amp;lt;/COMPOSER&amp;gt;&lt;br /&gt;&amp;lt;COMPOSER&amp;gt;Henri Belolo&amp;lt;/COMPOSER&amp;gt;&lt;br /&gt;&amp;lt;COMPOSER&amp;gt;Victor Willis&amp;lt;/COMPOSER&amp;gt;&lt;br /&gt;&amp;lt;PRODUCER&amp;gt;Jacques Morali&amp;lt;/PRODUCER&amp;gt;&lt;br /&gt;&amp;lt;PUBLISHER&amp;gt;PolyGram Records&amp;lt;/PUBLISHER&amp;gt;&lt;br /&gt;&amp;lt;LENGTH&amp;gt;6:20&amp;lt;/LENGTH&amp;gt;&lt;br /&gt;&amp;lt;YEAR&amp;gt;1978&amp;lt;/YEAR&amp;gt;&lt;br /&gt;&amp;lt;ARTIST&amp;gt;Village People&amp;lt;/ARTIST&amp;gt;&lt;br /&gt;&amp;lt;/SONG&amp;gt;&lt;br /&gt;&amp;lt;/SONGS&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;The corresponding schema definition:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" ?&amp;gt;&lt;br /&gt;&amp;lt;xsd:schema xmlns:xsd='&lt;a href="http://www.w3.org/2001/XMLSchema%27"&gt;http://www.w3.org/2001/XMLSchema'&lt;/a&gt;&amp;gt;&lt;br /&gt;&amp;lt;xsd:element name="SONGS"&amp;gt;&lt;br /&gt;&amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;&amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;&amp;lt;xsd:element ref="SONG" minOccurs='1' maxOccurs='unbounded' /&amp;gt;&lt;br /&gt;&amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;&amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;&amp;lt;/xsd:element&amp;gt;&lt;br /&gt;&amp;lt;xsd:element name="SONG"&amp;gt;&lt;br /&gt;&amp;lt;xsd:complexType&amp;gt;&lt;br /&gt;&amp;lt;xsd:sequence&amp;gt;&lt;br /&gt;&amp;lt;xsd:element name="TITLE" type="xsd:string" /&amp;gt;&lt;br /&gt;&amp;lt;xsd:element name="COMPOSER" type="xsd:string" maxOccurs='unbounded' /&amp;gt;&lt;br /&gt;&amp;lt;xsd:element name="PRODUCER" type="xsd:string" maxOccurs='unbounded' /&amp;gt;&lt;br /&gt;&amp;lt;xsd:element name="PUBLISHER" type="xsd:string" maxOccurs='unbounded' /&amp;gt;&lt;br /&gt;&amp;lt;xsd:element name="LENGTH" type="xsd:string" /&amp;gt;&lt;br /&gt;&amp;lt;xsd:element name="YEAR" type="xsd:gYear" /&amp;gt;&lt;br /&gt;&amp;lt;xsd:element name="ARTIST" type="xsd:string" maxOccurs='unbounded' /&amp;gt;&lt;br /&gt;&amp;lt;/xsd:sequence&amp;gt;&lt;br /&gt;&amp;lt;xsd:attribute name="genre" type="xsd:string" /&amp;gt;&lt;br /&gt;&amp;lt;/xsd:complexType&amp;gt;&lt;br /&gt;&amp;lt;/xsd:element&amp;gt;&lt;br /&gt;&amp;lt;/xsd:schema&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;Resources:&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://java.sun.com/developer/technicalArticles/xml/jaxp1-3/#Schema_Validation_Framework"&gt;Easy and Efficient XML Processing: Upgrade to JAXP 1.3&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. &lt;a href="http://java.sun.com/j2se/1.5.0/docs/api/" target="_blank"&gt;Java 2 Platform Standard Edition 5.0 API Specification&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3. &lt;a href="http://java.sun.com/j2se/1.4.2/docs/api/"&gt;Java 2 Platform Standard Edition 1.4.2 API Specification&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4. &lt;a href="http://i/My_doc/FFSavedPages/data/20061113163240/index.html"&gt;The basics of using XML Schema to define elements&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;5. &lt;a href="http://www.w3.org/TR/xmlschema-0/#schemaLocation"&gt;XML Schema Part 0: Primer Second Edition&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-8161542725712509830?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2006/11/13/hvloltpcmpqyuafimiuabfkdbcwxkixrdjgp/' title='Three ways of validating a xml document with Java'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/8161542725712509830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=8161542725712509830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8161542725712509830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8161542725712509830'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/three-ways-of-validating-xml-document.html' title='Three ways of validating a xml document with Java'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-5974398624370978734</id><published>2006-11-11T17:35:00.000+08:00</published><updated>2007-05-03T19:35:54.590+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='dom'/><category scheme='http://www.blogger.com/atom/ns#' term='delphi'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>Comment on W3C DOM and various implementations in different PL</title><content type='html'>First I have to confess I'm quite unfamiliar with xml processing. I've only done it once extensively in Delphi due to a project I was involved in.&lt;br /&gt;&lt;br /&gt;These days I'm studying tricks and technologies as to xml processing with java. So as I mentioned in a previous post I wrote about the overview on it. In particular, I mentioned the DOM way which is based on DOM, Document Object Model, a standard Object Model of XML maintained by the W3C Consortium. Here I first give some simple details about DOM itself.&lt;br /&gt;&lt;br /&gt;For a simple xml document shown below:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" ?&amp;gt;&lt;br /&gt;&amp;lt;song genre="rock"&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;My December&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;singer&amp;gt;Linkin Park&amp;lt;/singer&amp;gt;&lt;br /&gt;&amp;lt;/song&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;The DOM tree-like structure should be like this (E indicates a element node and T indicates a text node):&lt;br /&gt;&lt;blockquote&gt;E:song&lt;br /&gt;|--T:characters(whitespace)&lt;br /&gt;|--E:name---T:characters(My December)&lt;br /&gt;|--T:characters(whitespace)&lt;br /&gt;|--E:singer---T:characters( Linkin Park)&lt;br /&gt;|--T:characters(whitespace)&lt;/blockquote&gt;&lt;br /&gt;As depicted above, the root node song has five child nodes among wich two have their child nodes. I wanna emphasize the text node here. Before I start going deep into xml processing these days, I even don't know the existence of so-called text nodes. Because in Delphi, they're just ignored. So the DOM tree-like structure  is like this:&lt;br /&gt;&lt;blockquote&gt;E:song---E:name&lt;br /&gt;|--E:singer&lt;/blockquote&gt;&lt;br /&gt;Only an element is called a node. I think this is quite intuitive, though definitely the official DOM structure is more theoretically complete. But with the white space and other text nodes the process of xml parsing is complicated. The example is worth a thousand words. Let's see how the simple xml document is parsed defferently in Java and Delphi:&lt;br /&gt;&lt;br /&gt;In Java (exceptions are left unhandled):&lt;br /&gt;&lt;blockquote&gt;Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(&amp;lt;xml file name&amp;gt;);&lt;br /&gt;Element root = doc.getDocumentElement();&lt;br /&gt;NodeList list = root.getChildNodes();&lt;br /&gt;// A simple helper method&lt;br /&gt;printStr("name: " + list.item(1).getFirstChild().getNodeValue());&lt;br /&gt;printStr("singer: " + list.item(3).getFirstChild().getNodeValue());&lt;/blockquote&gt;&lt;br /&gt;In Delphi:&lt;br /&gt;&lt;blockquote&gt;var&lt;br /&gt;XMLDoc: IXMLDocument;&lt;br /&gt;XMLNode, CtlNode: IXMLNode;&lt;br /&gt;i, index: integer;&lt;br /&gt;str: string;&lt;br /&gt;begin&lt;br /&gt;str = '';&lt;br /&gt;XMLDoc := TXMLDocument.Create(nil);&lt;br /&gt;XMLNode = XMLDoc.ChildNodes.Nodes['song'];&lt;br /&gt;for i := 0 to XMLNode.ChildNodes.Count  - 1 do&lt;br /&gt;begin&lt;br /&gt;str := str + XMLNode.ChildNodes.Nodes[i].NodeValue;&lt;br /&gt;end;&lt;br /&gt;end;&lt;/blockquote&gt;&lt;br /&gt;Apparently, the Java version is more awkward and will be more complicated provided the xml document is very long. This is because the element nodes can't be sequentially accessed due to the existence of white space text nodes. In contrast, with text nodes ignored, the Delphi version is quite clear and adaptive to document of any size. As I know, besides Java many implementations (at least Javascript, as I know) of DOM are aware of the text nodes, especially the white space text nodes.&lt;br /&gt;&lt;br /&gt;So various kinds of helper method are used by developers to improve this awkward situation.&lt;br /&gt;&lt;a href="http://www.google.com/codesearch?q=+lang:java+documentbuilder+getChildnodes+show:oh_SuMAjshM:2fuacqk2bII:eZkKLbXt0n8&amp;sa=N&amp;amp;amp;amp;cd=1&amp;ct=rc&amp;amp;cs_p=http://www.cio.gv.at/it-infrastructure/payment/ez/ezca.zip&amp;cs_f=EZCA/development/WEB-INF/classes/at/ezustellung/client/kopf/ZustellkopfResponseParser.java#a0"&gt;Method 1&lt;/a&gt;:&lt;br /&gt;&lt;pre&gt;private Node getNodeByName(final NodeList list, final String name) {&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;for (int i = 0; i &amp;lt; list.getLength(); i++) {&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;final Node node = list.item(i);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;// to pass the white space node&lt;/strong&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;if (name.equals(node.getNodeName())) {&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;return node;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;}&lt;a title="a15" name="a15"&gt;&lt;/a&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;return null; // not found&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;}&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.google.com/codesearch?q=+lang:java+documentbuilder+getChildnodes+show:5IrjAeG-TdA:nLmpZRzdii4:e6QgRDoHmHs&amp;sa=N&amp;amp;amp;amp;cd=9&amp;ct=rc&amp;amp;cs_p=http://sahara.cs.berkeley.edu/downloads/Secure_WLAN_Roaming.tgz&amp;cs_f=Server/web_portal/ipl-0.1/impl/src/com/sun/liberty/XMLUtils.java#a0"&gt;Method 2&lt;/a&gt;:&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;...&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;NodeList list = e.&lt;strong&gt;getChildNodes&lt;/strong&gt;();&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;for (int i = 0; i &amp;lt; list.getLength(); i++) {&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;Node n = list.item(i);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;strong&gt;  // to pass the white space node&lt;/strong&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;if (!(n instanceof Element)) { continue; }&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;nsFixup((Element) n, map, false);&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;}&lt;/pre&gt;&lt;br /&gt;And I believe there must be more.&lt;br /&gt;&lt;br /&gt;I really don't see any benifits of keeping the awareness of text nodes until now. But If you know, tell me please.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-5974398624370978734?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2006/11/11/naubsdgowyfbnujxlnamcfzyytvkwydjyykr/' title='Comment on W3C DOM and various implementations in different PL'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/5974398624370978734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=5974398624370978734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/5974398624370978734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/5974398624370978734'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/comment-on-w3c-dom-and-various.html' title='Comment on W3C DOM and various implementations in different PL'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-3170993196529798049</id><published>2006-11-10T17:33:00.000+08:00</published><updated>2007-05-03T19:35:00.930+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='internationalization'/><category scheme='http://www.blogger.com/atom/ns#' term='utf'/><category scheme='http://www.blogger.com/atom/ns#' term='unicode'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='localization'/><category scheme='http://www.blogger.com/atom/ns#' term='character set'/><title type='text'>Unicode, UTF等字符编码摘记</title><content type='html'>&lt;p&gt;两个遵守相同规范的编码标准&lt;br /&gt;unicode 3.0（最新版本&lt;a set="yes" href="http://www.unicode.org/versions/Unicode5.0.0/"&gt;5.0&lt;/a&gt;）和ISO-10646。从Unicode2.0开始，unicode采用了与ISO 10646-1相同的字库和字码。ISO-10646也叫做UCS (Universal Character Set)。&lt;/p&gt; &lt;p&gt;几个术语：&lt;br /&gt;UTF: Unicode/UCS Transformation Format&lt;/p&gt; &lt;p&gt;UTF-16: 16位编码。基本上是Unicode的双字节编码，额外附加空间用于非常用字符和未来扩充需要（一般很少用到），常用字符在0-0xFFFF，包括扩充空 间的范围是0-0×10FFFF，所以最长编码位数是21位。关于扩充空间，在ISO-10646有相对应的定义。由于它是一个变长码，与CPU字序有关 （例如“汉”字的Unicode编码是6C49。那么写到文件里时，究竟是将6C写在前面，还是将49写在前面？如果将6C写在前面，就是big endian。如果将49写在前面，就是little endian。），最节省空间，所以常作为网络传输的外码。UTF-16是Unicode的preferred encoding。&lt;/p&gt; &lt;p&gt;UTF-8: 由于UTF-16直接就是Unicode编码，没有变换，包含了0×00在编码内，这个在操作系统内（C语言）中有特殊意义（和ASCII不兼容？），会 引起问题，所以有时候需要采用UTF-8编码对Unicode的直接编码做一些变换。UTF-8对ASCII不作变换，进行8位编码，其他字符做变长编 码，每个字符1-3个字节。与CPU字序无关，可以在不同平台之间交流。&lt;/p&gt; &lt;p&gt;UCS-2: 与UTF-16基本一样。&lt;/p&gt; &lt;p&gt;UCS-4: 4字节编码，目前是在UCS-2前加上2个全零的byte。&lt;/p&gt; &lt;p&gt;内码：内码是指操作系统内部的字符编码。早期操作系统的内码是与语言相关的.现在的Windows在内部统一使 用Unicode，然后用代码页适应各种语言,“内码”的概念就比较模糊了。微软一般将缺省代码页指定的编码说成是内码，在特殊的场合也会说自己的内码是 Unicode，例如在GB18030问题的处理上。&lt;/p&gt; &lt;p&gt;字符集：charcterset 字符的集合，例如Unicode是一种字符集。&lt;/p&gt; &lt;p&gt;字符编码：Encoding 如何将二进制数据识别为字符的编码，一种编码表示的字符是有限的，常常一种编码设计为表示一种字符集。例如UTF-8，UTF-16是两种字符编码，它们能够表示Unicode字符集的所有字符。&lt;/p&gt; &lt;p&gt;中国国标编码:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;GB 13000: 完全等同于ISO 10646-1/Unicode 2.1, 今后也将随ISO 10646/Unicode的标准更改而同步更改.&lt;/p&gt; &lt;p&gt;GBK: 对GB2312的扩充, 以容纳GB2312字符集范围以外的Unicode 2.1的统一汉字部分, 并且增加了部分unicode中没有的字符. &lt;/p&gt; &lt;p&gt;GB&lt;br /&gt;18030-2000: 基于GB 13000, 作为Unicode 3.0的GBK扩展版本, 覆盖了所有unicode编码,&lt;br /&gt;地位等同于UTF-8, UTF-16, 是一种unicode编码形式. 变长编码, 用单字节/双字节/4字节对字符编码.&lt;br /&gt;GB18030向下兼容GB2312/GBK.&lt;br /&gt;GB 18030是中国所有非手持/嵌入式计算机系统的强制实施标准. &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Update (20061114): ISO 8859-1:&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;b&gt;ISO/IEC 8859-1&lt;/b&gt;，又称&lt;b&gt;Latin-1&lt;/b&gt;或“西欧语言”，是&lt;a set="yes" href="http://zh.wikipedia.org/w/index.php?title=%E5%9C%8B%E9%9A%9B%E6%A8%99%E6%BA%96%E5%8C%96%E7%B5%84%E7%B9%94&amp;variant=zh-cn" title="國際標準化組織"&gt;国际标准化组织&lt;/a&gt;内&lt;a href="http://zh.wikipedia.org/w/index.php?title=ISO_8859&amp;amp;variant=zh-cn" title="ISO 8859"&gt;ISO/IEC 8859&lt;/a&gt;的第一个8位字符集。它以&lt;a href="http://zh.wikipedia.org/w/index.php?title=ASCII&amp;variant=zh-cn" title="ASCII"&gt;ASCII&lt;/a&gt;为基础，在空置的0xA0-0xFF的范围内，加入192个字母及符号，借以供使用&lt;a href="http://zh.wikipedia.org/w/index.php?title=%E5%8F%98%E9%9F%B3%E7%AC%A6%E5%8F%B7&amp;amp;variant=zh-cn" title="变音符号"&gt;变音符号&lt;/a&gt;的&lt;a set="yes" href="http://zh.wikipedia.org/w/index.php?title=%E6%8B%89%E4%B8%81%E5%AD%97%E6%AF%8D&amp;amp;variant=zh-cn" title="拉丁字母"&gt;拉丁字母&lt;/a&gt;语言使用。&lt;/blockquote&gt; &lt;p&gt;其他：&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;UCS只是规定如何编码，并没有规定如何传输、保存这个编码。例如“汉”字的UCS编码是6C49，我可&lt;br /&gt;以用4个ascii数字来传输、保存这个编码；也可以用utf-8编码:3个连续的字节E6 B1&lt;br /&gt;89来表示它。关键在于通信双方都要认可。UTF-8、UTF-7、UTF-16都是被广泛接受的方案。UTF-8的一个特别的好处是它与ISO-&lt;br /&gt;8859-1完全兼容。UTF是“UCS Transformation Format”的缩写。&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt; &lt;/p&gt;&lt;blockquote&gt;所谓代码页(code page)就是针对一种语言文字的字符编码。例如GBK的code page是CP936，BIG5的code page是CP950，GB2312的code page是CP20936。 &lt;p&gt;　　Windows中有缺省代码页的概念，即缺省用什么编码来解释字符。例如Windows的记事本打开了一个文本文件，里面的内容是字节流：BA、BA、D7、D6。Windows应该去怎么解释它呢？&lt;/p&gt; &lt;p&gt;　&lt;br /&gt;　是按照Unicode编码解释、还是按照GBK解释、还是按照BIG5解释，还是按照ISO8859-1去解释？如果按GBK去解释，就会得到“汉字”&lt;br /&gt;两个字。按照其它编码解释，可能找不到对应的字符，也可能找到错误的字符。所谓“错误”是指与文本作者的本意不符，这时就产生了乱码。&lt;/p&gt; &lt;p&gt;　　答案是Windows按照当前的缺省代码页去解释文本文件里的字节流。缺省代码页可以通过控制面板的区域选项设置。记事本的另存为中有一项ANSI，其实就是按照缺省代码页的编码方法保存。&lt;/p&gt; &lt;p&gt;　　Windows的内码是Unicode，它在技术上可以同时支持多个代码页。只要文件能说明自己使用什么编码，用户又安装了对应的代码页，Windows就能正确显示，例如在HTML文件中就可以指定charset。&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;趣事：&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;a set="yes" href="http://www.windsn.com/article/viewmore.asp?id=227"&gt;　　“endian”这个词出自《格列佛游记》。小人国的内战就源于吃鸡蛋时是究竟从大头(Big-Endian)敲开还是从小头(Little-Endian)敲开，由此曾发生过六次叛乱，一个皇帝送了命，另一个丢了王位。 &lt;/a&gt;&lt;p&gt;&lt;a set="yes" href="http://www.windsn.com/article/viewmore.asp?id=227"&gt;　　我们一般将endian翻译成“字节序”，将big endian和little endian称作“大尾”和“小尾”。&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Resources:&lt;br /&gt;1. &lt;a set="yes" href="http://www.sinoprise.com/simple/index.php?t925.html"&gt;对字符编码与Unicode,ISO 10646,UCS,UTF8,UTF16,GBK,GB2312的理解 国际化支持 USENIX.CN - powered by Sinoprise Technology Lab&lt;/a&gt; （有比较详细的介绍）&lt;/p&gt; &lt;p&gt;2. 无废话XML&lt;/p&gt; &lt;p&gt;3. &lt;a href="http://www.windsn.com/article/viewmore.asp?id=227"&gt;简要解释UCS、UTF、BMP、BOM等名词&lt;/a&gt;&lt;/p&gt; &lt;p&gt;4. &lt;a href="http://onebird.nklog.org/post/2006/08/24/accc1_ii_ccace"&gt;中文编码处理(1) －－ 编码与字符集&lt;/a&gt;&lt;/p&gt; &lt;p&gt;5. &lt;a href="http://zh.wikipedia.org/wiki/ISO-8859-1"&gt;ISO 8859-1&lt;/a&gt;&lt;/p&gt; &lt;p&gt;注：文中参考的不全是官方或权威资料，难免有错误，仅作学习用，本人对文中错误不负任何责任，并欢迎改正错误。&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-3170993196529798049?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2006/11/10/pjvtqxvxjnehjyuxscfamlayfhesmhucrqvi/' title='Unicode, UTF等字符编码摘记'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/3170993196529798049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=3170993196529798049' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/3170993196529798049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/3170993196529798049'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/unicode-utf.html' title='Unicode, UTF等字符编码摘记'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-2461659908268316868</id><published>2006-11-10T17:31:00.000+08:00</published><updated>2007-05-03T19:34:04.673+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='dom'/><category scheme='http://www.blogger.com/atom/ns#' term='sax'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>XML Processing With Java Overview</title><content type='html'>&lt;p&gt;There’re basically two ways of processing xml with Java. One is the DOM way, that is tree-structure based way, and the other way is the SAX way that is event-driven stream based way. However, the bad thing is that  there’re pros and cons for both ways, and the good thing is that we can use one of them in different situation to meet different needs.&lt;/p&gt; &lt;p&gt;&lt;b&gt;The DOM way&lt;/b&gt;&lt;br /&gt;DOM, Document Object Model, is the standard specification released by w3c consortium. It is a tree like structure which represents the structure of a XML document and is what what we often first parse a XML document into before we do any manipulation to it. It is quite intuitive for most programmers to manipulate. With it we can easily get what we want from a XML document, element names, attributes, values of elements, etc. But the price to pay is that before any manipulation we have to &lt;b&gt;read the entire xml document and parse it into a DOM object during which everything must be stored in memory&lt;/b&gt;. This is inefficient and sometimes impossible, especially for extremely large documents. By the way, besides DOM, there’re some unofficially object models in use, such as JDOM, XOM, DOM4J and so on.&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;The SAX way&lt;/b&gt;&lt;br /&gt;It is a stream like and event-based way. &lt;b&gt;We can processing a document while we’re reading it.&lt;/b&gt; It is a very flexible but more complicated way than the DOM way. It is flexible because the SAX stream can be redirected to other process or document.  It is complicated because the event handler (usually the DefaultHandler or ContentHandler) must be first written and then registered with the Parser (alternatively reader, or something like that). And there’re other disadvantages. Because it is processed like a stream, it is impossible to make changes to it or move backward to the data stream. But it is possilbe to make some simple structure (not the data itself) changes by using xsl transformation. In general, the SAX way is much faster than the DOM way.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;What make up the “XML Processing”&lt;/b&gt;&lt;br /&gt;So-called XML processing or sometimes called parsing consists of several aspects or procedures.&lt;br /&gt;Validation&lt;br /&gt;Data Modification and Retrieve&lt;br /&gt;Transformation&lt;br /&gt;Data Query&lt;/p&gt; &lt;p&gt;&lt;b&gt;Examples&lt;/b&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;Higher Level Application&lt;/b&gt;&lt;br /&gt;What are mentioned  above are only those basic aspects about xml processing. Seen from a more global perspective, there’re many other higher level application of xml or xml processing.&lt;/p&gt; &lt;div align="right"&gt;&lt;b&gt;Published temporarily and remains further refinement.&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-2461659908268316868?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2006/11/10/eaoowdpwkfgndhglaxdfmyaljfwezejefytb/' title='XML Processing With Java Overview'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/2461659908268316868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=2461659908268316868' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/2461659908268316868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/2461659908268316868'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/xml-processing-with-java-overview.html' title='XML Processing With Java Overview'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-6076575966110330289</id><published>2006-07-26T17:29:00.000+08:00</published><updated>2007-05-03T19:32:32.919+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iteration developement'/><category scheme='http://www.blogger.com/atom/ns#' term='methodology'/><category scheme='http://www.blogger.com/atom/ns#' term='prototype'/><category scheme='http://www.blogger.com/atom/ns#' term='best practice'/><title type='text'>Always prototyping your new features that are to be added</title><content type='html'>&lt;p&gt;Wow, this new feature is awesome. It’s super cool!. I woner if we could add it our product. Ok, I’m gonna do it right now.&lt;/p&gt; &lt;p&gt;But wait…&lt;/p&gt; &lt;p&gt;&lt;strong&gt;First develop a prototype with this new feature added. Then see how this feature functions within your product, how it collaborate with other features. If these all are just fine then change your artifacts to add it to your product extensively and “aggressively”. This would be safer.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Never do so-called feasibility analysis just in your mind or just on a paper with your pen. You’re cheating yourself. In this way you would be very excited with your analysis results at most time and say to your colleagues those words written in the first paragraph of this post.&lt;/p&gt; &lt;p&gt;We experienced this cheating-ourself process. And it turns out to be that this new feature actually doesn’t function as we expected but meantime we have to keep those codes modified during adding this new feature for not wasting more time removing them and bringing new risks even though we know they’re useless. This may be a lesson you can learn from.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;It is noteworthy that the beta policy of most web2.0 applications goes to extremes in prototyping new features and that developping iteratively is the essence of contemporary software development.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;One post of my development diary series…to be continued.&lt;/p&gt; &lt;p&gt;&lt;!-- Tag links generated by Zoundry Blog Writer. Do not manually edit. http://www.zoundry.com --&gt;&lt;br /&gt;Technorati : &lt;a rel="tag" class="ztag" href="http://technorati.com/tag/beta"&gt;beta&lt;/a&gt;, &lt;a rel="tag" class="ztag" href="http://technorati.com/tag/programming"&gt;programming&lt;/a&gt;, &lt;a rel="tag" class="ztag" href="http://technorati.com/tag/software%20development"&gt;software development&lt;/a&gt;, &lt;a set="yes" rel="tag" class="ztag" href="http://technorati.com/tag/software%20engineering"&gt;software engineering&lt;/a&gt;, &lt;a set="yes" rel="tag" class="ztag" href="http://technorati.com/tag/tech"&gt;tech&lt;/a&gt;&lt;br /&gt;Del.icio.us : &lt;a rel="tag" class="ztag" href="http://del.icio.us/tag/beta"&gt;beta&lt;/a&gt;, &lt;a rel="tag" class="ztag" href="http://del.icio.us/tag/programming"&gt;programming&lt;/a&gt;, &lt;a rel="tag" class="ztag" href="http://del.icio.us/tag/software+development"&gt;software development&lt;/a&gt;, &lt;a rel="tag" class="ztag" href="http://del.icio.us/tag/software+engineering"&gt;software engineering&lt;/a&gt;, &lt;a rel="tag" class="ztag" href="http://del.icio.us/tag/tech"&gt;tech&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-6076575966110330289?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2006/07/26/pgbcycabfnpezsejdqgjkrabzzvrmcffsbso/' title='Always prototyping your new features that are to be added'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/6076575966110330289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=6076575966110330289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/6076575966110330289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/6076575966110330289'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/always-prototyping-your-new-features.html' title='Always prototyping your new features that are to be added'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-7832759848615266262</id><published>2006-07-26T17:27:00.000+08:00</published><updated>2007-05-03T18:35:54.467+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='shellscript'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='config'/><title type='text'>Help me with automating KDE environment settings</title><content type='html'>&lt;p&gt;I have pasted this on some tech forums, but no one seems to be willing to help me. So I would like to also paste it here. Any help or even any response making no sence would be very appreciated.&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;我刚接触Linux不久，现在碰到要做这个，请各位高手支支招。&lt;/p&gt; &lt;p&gt;主要分为几个部分：&lt;br /&gt;1. Desktop shortcut, background, etc;&lt;br /&gt;2. Kicker (Panel), start menu, custom menu, etc; and&lt;br /&gt;3. Konqueror, Konsole, etc.&lt;/p&gt; &lt;p&gt;由于KDE采用 Cascading Configuration Files的结构 （至少KDE3.1+是这样），有针对所有用户的设置和用户自定义设置，主要的配置文件分别在/usr/share/config， ~/.kde/share/config。我现在采取的策略主要是写了一个脚本用定制的标准桌面环境的配置文件去覆盖 ~/.kde/share/config下面的配置文件（其实我把整个share文件夹都覆盖了）。&lt;/p&gt; &lt;p&gt;现在问题是其他的都似乎没有什么大问题，但是覆盖的kickerrc（配置上文提到的第二个部分中的kicker）文件没有作用，无论是在 /usr/share/config还是在~/.kde/share/config下面，kickerrc里面的设置没法被应用，而且通过手动去修改 Panel（比如增减Applet）后relog in kde session会用修改的配置覆盖掉~/.kde/share/config/kickerrc。似乎kickerrc只是反映当前的panel的设置而 不是系统根据kickerrc去配置当前的panel。&lt;/p&gt; &lt;p&gt;我在网上查了很多资料没找到原因，不知道这里有没有人知道。&lt;/p&gt; &lt;p&gt;更新：我用的是Redhat 3企业版（update几忘了，等查到再来更新：）。&lt;/p&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-7832759848615266262?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2006/07/26/qhIhbPVOloGnkbySEoMuJowauCKhuNwsaKdG/' title='Help me with automating KDE environment settings'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/7832759848615266262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/7832759848615266262'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/help-me-with-automating-kde-environment.html' title='Help me with automating KDE environment settings'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-8966538963931517806</id><published>2006-07-26T17:23:00.000+08:00</published><updated>2007-05-03T18:34:49.223+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='swing'/><category scheme='http://www.blogger.com/atom/ns#' term='awt'/><category scheme='http://www.blogger.com/atom/ns#' term='keyborad event'/><title type='text'>How to capture key combination press in java</title><content type='html'>&lt;p&gt;Though it may appear extremely easy to someone who has mastered it, I wanna paste some useful code here both for myself to keep a note and for those who haven’t ever addressed this problem to use as a guideline.&lt;/p&gt; &lt;p&gt;Code snippet (catch “ctrl+shift+`”):&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt;public final static int CTRL_SHIFT_MASK =&lt;br /&gt;KeyEvent.SHIFT_MASK | KeyEvent.CTRL_MASK;&lt;/p&gt; &lt;p&gt;if ((evt.getModifiers() &amp; CTRL_SHIFT_MASK) != 0) {&lt;br /&gt;if (inputEnabled) holdInput(true);&lt;/p&gt; &lt;p&gt;// Press “Ctrl+Shift+`” to toggle view only option.&lt;br /&gt;if ((evt.getModifiers() &amp; CTRL_SHIFT_MASK) == CTRL_SHIFT_MASK &amp;amp;&amp;&lt;br /&gt;keyCode == KeyEvent.VK_BACK_QUOTE) {&lt;br /&gt;boolean viewOnly = !_vc.getConfigManager().isViewOnly();&lt;br /&gt;_vc.getConfigManager().setViewOnly(viewOnly);&lt;br /&gt;if (!viewOnly) {&lt;br /&gt;inputRecorder.setPaused(false);&lt;br /&gt;inputRecorder.setLastLogTime(System.currentTimeMillis());&lt;br /&gt;} else {&lt;br /&gt;inputRecorder.setPaused(true);&lt;br /&gt;}&lt;br /&gt;clearInput();&lt;br /&gt;return;&lt;br /&gt;}&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Here key combination restricts to the pattern of modifier key(s) (ctrl, shift, alt) plus ordinary character key or only combination of modifier keys themselves.&lt;/p&gt; &lt;p&gt;The end.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-8966538963931517806?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://my.donews.com/kenyth/2006/07/26/gfiryoavqyznyvzvahvjknhgeeplgclcrfeb/' title='How to capture key combination press in java'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/8966538963931517806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=8966538963931517806' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8966538963931517806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/8966538963931517806'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2007/05/how-to-capture-key-combination-press-in.html' title='How to capture key combination press in java'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-113032681734540308</id><published>2005-10-26T19:38:00.000+08:00</published><updated>2005-10-26T19:50:49.163+08:00</updated><title type='text'>Thoughts after Ivar Jacobson's speech. Is Agile Process really Agile?</title><content type='html'>25th Oct. Shanghai China, I heard Ivar Jacobson's speech about his understanding about the next generation of software process. IMHO, his key point is to make UP(Unified process) more agile than agile process, which he called "smart". Then I wasn't much convined, because I thought his understanding dpend too much on a intellegent product called "WayPointer" developed by one of his own company. But later when I went home and used WayPointer trial edition accompanied with the provided CD to work with Rational's product, I understand everything. It really can make RUP more agile. It's a intellegent agent acts as pair programmer, telling you when and what parts of RUP document to read.&lt;br /&gt;And, another of his point supporting the key point is UP use explicit knowledge rather than tacit knowledge, which make ailge seem to be agile, used by agile process. With explicit knowledge you can learn and you can search for what to do next in the knowledge library. However, tacit knowlege is never documented and hard to be learned and harder to be searched. So the most experienced programmer have the most tacit knowledge, which make success of project primarily rely on key individuals. So, is Agile process really agile?（Anyone wants a PPT of his speech, email me at i.am.blogger at gmail dot com).&lt;br /&gt;What a pity, Dr. Ivar didn't talk much about doing use case with aop, which he proposed in his latest papers and later turned out a book about AOSD(I got the book for free at the speech : ). So the following part of my blog will cover this aspect.&lt;br /&gt;The report was received with complacency:" This is the nature of software--use case cross component--and there's nothing to be done about it."In RUP, use case play a very important role, elicitating requirements, coordinating stakeholder requests, measuring the grain of iteration. According to RUP, use cases are finded out, refined and then usually implemented in several components, that is, simply speaking, a use case is often devided into parts assigning to components(Classes, to simplify the matter) according to each component's reponsibility. However, that's not the end. In RUP test cases are derived from use cases, which means testing is usually conducted in terms of use case to verify every use case is correctly implemented. All we see is that it's really a use case driven way, but traditional components stands in the way, breaking down use cases. It seems if we are royal enough to use case technology, traditional component-centric development contribute negatively to the whole development process.And interestingly enough, in an AOP view, it's typically crosscutting, with every use case almost always cross cutting components. Dr. Ivar has his own way of solving this problem, which he proposed in &lt;a href="http://www.ivarjacobson.com/publications/aosd/Use%20Cases%20and%20Aspects.pdf"&gt;this paper&lt;/a&gt;.&lt;br /&gt;&lt;strong&gt;But I wonder if a use case driven method is widely adopted, otherwise it isn't worth much effort on this issue.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;So here I wanna conduct a survey, how many companies use USE CASE technology and to what degree use case technology is adopted (only used to handle requirement issue or as a use case driven development way)?&lt;/strong&gt;&lt;br /&gt;Any comment about either my ideas or this survey would be very appreciated.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-113032681734540308?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://jroller.com/page/Kenyth' title='Thoughts after Ivar Jacobson&apos;s speech. Is Agile Process really Agile?'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/113032681734540308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=113032681734540308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/113032681734540308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/113032681734540308'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2005/10/thoughts-after-ivar-jacobsons-speech.html' title='Thoughts after Ivar Jacobson&apos;s speech. Is Agile Process really Agile?'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-112991526702303034</id><published>2005-10-22T01:21:00.000+08:00</published><updated>2007-05-03T19:54:34.026+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aop'/><title type='text'>Is AOP a Programming paradigm</title><content type='html'>&lt;span style="font-size:85%;"&gt;Edited by: I.Am.Blogger at gmail dot com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Prerequisite:&lt;/span&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;“A programming paradigm is a &lt;/span&gt;&lt;/em&gt;&lt;a href="http://en.wikipedia.org/wiki/Paradigm"&gt;paradigmatic&lt;/a&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt; style of &lt;/span&gt;&lt;/em&gt;&lt;a href="http://en.wikipedia.org/wiki/Programming"&gt;programming&lt;/a&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt; (compare with a &lt;/span&gt;&lt;/em&gt;&lt;a href="http://en.wikipedia.org/wiki/Methodology_(software_engineering)"&gt;methodology&lt;/a&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt; which is a paradigmatic style of doing &lt;/span&gt;&lt;/em&gt;&lt;a href="http://en.wikipedia.org/wiki/Software_engineering"&gt;software engineering&lt;/a&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;). A programming paradigm provides (and determines) the view that the &lt;/span&gt;&lt;/em&gt;&lt;a href="http://en.wikipedia.org/wiki/Programmer"&gt;programmer&lt;/a&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt; has of the execution of the &lt;/span&gt;&lt;/em&gt;&lt;a href="http://en.wikipedia.org/wiki/Computer_program"&gt;program&lt;/a&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;.”&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;(&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Programming_paradigm"&gt;http://en.wikipedia.org/wiki/Programming_paradigm&lt;/a&gt;&lt;span style="font-size:85%;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Yes:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;“I would argue that by any reasonable definition of paradigm, AOP is one. You can "think aspects" starting from fairly early in the design process (probably requirements too); you can design and develop those aspects; you can make the code look like the design; the aspects can be treated as independent units, with independently assessable properties and value. All the things that I at least thought made OO a paradigm seem to apply...”&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;By Gregor Kiczalse(&lt;/span&gt;&lt;a href="http://aosd.net/pipermail/discuss_aosd.net/2004-July/001001.html"&gt;http://aosd.net/pipermail/discuss_aosd.net/2004-July/001001.html&lt;/a&gt;&lt;span style="font-size:85%;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;“&lt;/span&gt;…&lt;span style="font-size:85%;"&gt;Note that the original meaning of "paradigm" entails the notion that two different paradigms are incompatible, which means that the  qualification as paradigms does not depend on whether you can use them  independently but rather that you _cannot_ use them together. From this  perspective, none of the programming paradigms in computer science are  really paradigms, because it's certainly possible to mix them  altogether…The analogy that I'd propose is that AOP relates to OOP as OOP relates to imperative programming, and if you describe the move from imperative programming to OOP as a paradigm shift, you also have to describe the move from OOP to AOP as a paradigm shift to the same degree.”&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;By Pascal Costanza (&lt;/span&gt;&lt;a href="http://aosd.net/pipermail/discuss_aosd.net/2004-July/001004.html"&gt;http://aosd.net/pipermail/discuss_aosd.net/2004-July/001004.html&lt;/a&gt;&lt;span style="font-size:85%;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;No:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;“Mathematically, aspects form a second-order extension of any programming paradigm: while usual programming paradigms allow reasoning about single functions, messages and so forth by a function/message signature, AOP enables reasoning about entire sets of those entities by using pointcuts with wildcards in their signature. Thus one could view AOP as a powerful, logical extension, rather than as an independent paradigm. Friedrich Steimann, for example, has proposed such a view.”&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Wikipedia(&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming"&gt;http://en.wikipedia.org/wiki/Aspect-oriented_programming&lt;/a&gt;&lt;span style="font-size:85%;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;“..In OOP you have communicating objects with encapsulated state. In FP you have the notion of encapsulated functionality and side-effect-freeness, however no explicit notion of state…that all the paradigms noted above can exists "on its own". You can use FP without OOP…AOP, however as I see it, always (correct me, if I am wrong here) makes use of a kind of "host paradigm", that provides basic expressiveness and then kind of provides a way for second-order reasoning on that "host paradigm"…”&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;(&lt;/span&gt;&lt;a href="http://aosd.net/pipermail/discuss_aosd.net/2004-July/001003.html"&gt;http://aosd.net/pipermail/discuss_aosd.net/2004-July/001003.html&lt;/a&gt;&lt;span style="font-size:85%;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-size:85%;"&gt;“…when moving from IP to OOP,one gains the new concept of encapsulated state together with the notion of messages. This changes the whole universe of reasoning: Instead of reasoning about loops or sequences of commands executed on a machine (IP) one now certainly talks about objects that are communicating via messages.…I see the difference in the fact that when moving from IP to OOP, we change the entities we are reasoning about (objects rather than commands) while with AOP we don't really. Of course AOP claims an aspect as the additional entity of reasoning. But can one really see an aspect as a single entity ,that is without any coupling of the outer world? Objects in OOP do so, also do functions in FP (due to side-effect-freeness), aspects however don't, since in all AOP languages you will always at some point have to conrecretize when and where your aspect synchronizes with the rest of the world…An object in OOP is fully compositional without exposing any of its subunits to the outer world. For functions in FP, the same holds. However, does that also hold for aspects?....”&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;(&lt;/span&gt;&lt;a href="http://aosd.net/pipermail/discuss_aosd.net/2004-July/001005.html"&gt;http://aosd.net/pipermail/discuss_aosd.net/2004-July/001005.html&lt;/a&gt;&lt;span style="font-size:85%;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Two citations above By Eric Bodden&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Note: FP=Functional Programming, IP=Imperative Programming.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-112991526702303034?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.jroller.com/page/Kenyth?entry=is_aop_a_programming_paradigm' title='Is AOP a Programming paradigm'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/112991526702303034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=112991526702303034' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/112991526702303034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/112991526702303034'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2005/10/is-aop-programming-paradigm.html' title='Is AOP a Programming paradigm'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-111349708090263870</id><published>2005-04-15T00:37:00.000+08:00</published><updated>2007-05-03T19:57:38.186+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>XMLBeans Practice--Automate Exchanging data between XML's &amp; Java (1)</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;Installation of XMLBEANS&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;I hope this section can help solve your problems, if not all, encountered when installing XMLBEANS. XMLBEANS installation is hard to deal with and I think most of people will encounter problems when installing it and I'm not an exception.&lt;br /&gt;The XMLBEANS(here it's 2.0.0-beta1) binary archive package, by convention, contains directories, bin, docs, lib, etc. And you'll have to set your path and classpath just like installing other java tools. But after that I think 90% people can't run XMLBEANS correctly. There're some points to notice and I hope your encountering problems are listed below (OS:WIN XP SP2) : &lt;/p&gt;&lt;ul&gt;&lt;li&gt;About your jdk directory. My jdk directory is under the "Program Files" directory. And when I run XMLBEANS with "scomp...." in the command line prompt, errors saying roughly like this(on my PC erro message is in Chinese): "'E:\program' is not a internal or external command, neither is it a executable or a batch file." This error message reminded me of the caution information I read when I was installing Weblogic 8.1. The information said "Don't leave a white space in your weblogic path, for it may cause severe problems". Since both of XMLBEANS and Weblogic are produced by BEA. So I move my "JAVA_HOME" to the root directory of one of my partition. &lt;/li&gt;&lt;li style="text-align: left;"&gt;About your "PATH". When I thought I would make it. The fact again let me down. When I run "scomp...", XMLBEANS threw IOException saying "'javac' is required on the path.java.io.IOException : CreateProcess: c:\xmlbeans-1.0.2\schemas\javac @c:\DOCUME~1\alex\LOCALS~1\Temp\javac20992 error=2nulljava.io.IOException: CreateProcess: c:\xmlbeans-1.0.2\schemas\javac @c:\DOCUME~1\alex\LOCALS~1\Temp\javac20992 error=2 ", something like this. And this time I checked FAQ at &lt;a style="font-weight: bold;" href="http://wiki.apache.org/xmlbeans/XmlBeansV1Faq#scompFindingJavac"&gt;&lt;span style="text-decoration: underline;"&gt;here&lt;/span&gt;&lt;/a&gt; .I followed its advice but I couldn't find JAVA_HOME in my scomp script(in the bin folder). I think it's for old version of XMLBEANS and the information was not timely refreshed. And another piece of information solved my problem. There is a precedence among your JRE and JDK when java program finds java path. The former would be first located by default. So I put my JDK directory at the left most of my PATH variable.&lt;/li&gt;   &lt;li style="text-align: left;"&gt;About your "XMLBEANS_LIB". The official installation guide doesn't mention this. I found it in the scomp script. So I add a new environment variable called XMLBEANS_LIB pointing to my lib folder.&lt;/li&gt; &lt;/ul&gt;&lt;p&gt;After the three steps I'm processing my XML Schema files with XMLBEANS. In addition, I wonder why BEA don't make it easier to install it just as install other java tools. Do they want to test our patience of using their tools?&lt;/p&gt; &lt;p style="font-style: italic;"&gt;Coming soon: XMLBeans Practice--Automate Exchanging data between XML's &amp;amp; Java (2): Working With XMLBeans&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-111349708090263870?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/111349708090263870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=111349708090263870' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/111349708090263870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/111349708090263870'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2005/04/xmlbeans-practice-automate-exchanging.html' title='XMLBeans Practice--Automate Exchanging data between XML&apos;s &amp; Java (1)'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-111333180539093025</id><published>2005-04-13T02:45:00.000+08:00</published><updated>2005-04-13T03:00:36.376+08:00</updated><title type='text'>The origin of foo &amp; bar which almost everywhere in the demonstrating codes</title><content type='html'>The etymology of hackish `foo' is obscure. When used in connection with `bar' it is generally traced to the WWII-era Army slang acronym FUBAR (`Fucked Up Beyond All Repair'), later bowdlerized to &lt;a href="http://www.outpost9.com/reference/jargon/jargon_21.html#TAG671"&gt;foobar&lt;/a&gt;. (See also &lt;a href="http://www.outpost9.com/reference/jargon/jargon_21.html#TAG710"&gt;FUBAR&lt;/a&gt;.)&lt;br /&gt;...It has been suggested that this might be related to &lt;strong&gt;the Chinese word `fu' (sometimes transliterated `foo'), which can mean "happiness" when spoken with the proper tone (the lion-dog guardians flanking the steps of many Chinese restaurants are properly called "fu dogs").&lt;/strong&gt;&lt;br /&gt;...&lt;br /&gt;Other sources confirm that `FOO' was a semi-legendary subject of WWII British-army graffiti more-or-less equivalent to the American Kilroy. ...&lt;br /&gt;Earlier versions of this entry suggested the possibility that hacker usage actually sprang from "FOO, Lampoons and Parody", the title of a comic book first issued in September 1958, a joint project of Charles and Robert Crumb.&lt;br /&gt;...&lt;br /&gt;An old-time member reports that in the 1959 "Dictionary of the TMRC Language", compiled at &lt;a href="http://www.outpost9.com/reference/jargon/jargon_35.html#TAG1806"&gt;TMRC&lt;/a&gt;, there was an entry that went something like this:&lt;br /&gt;FOO: The first syllable of the sacred chant phrase "FOO MANE PADME HUM." Our first obligation is to keep the foo counters turning.&lt;br /&gt;For more about the legendary foo counters, see &lt;a href="http://www.outpost9.com/reference/jargon/jargon_35.html#TAG1806"&gt;TMRC&lt;/a&gt;. Almost the entire staff of what later became the MIT AI Lab was involved with TMRC, and probably picked the word up there.&lt;br /&gt;Very probably, hackish `foo' had no single origin and derives through all these channels from Yiddish `feh' and/or English `fooey'.&lt;br /&gt;&lt;em&gt;Complete explanation can be found &lt;a href="http://www.outpost9.com/reference/jargon/jargon_21.html#TAG670"&gt;&lt;strong&gt;&lt;span style="font-size:130%;"&gt;here&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;.&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-111333180539093025?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.outpost9.com/reference/jargon/jargon_21.html#TAG670' title='The origin of foo &amp; bar which almost everywhere in the demonstrating codes'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/111333180539093025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=111333180539093025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/111333180539093025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/111333180539093025'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2005/04/origin-of-foo-bar-which-almost.html' title='The origin of foo &amp; bar which almost everywhere in the demonstrating codes'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-111316076899981389</id><published>2005-04-10T03:16:00.000+08:00</published><updated>2007-05-03T19:57:03.677+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>How about writing your GUI as XML files?</title><content type='html'>I've got an idea from the previous project our lab is involved in. We can store all the information of a GUI, including both its layout appearance and logics behind it, in a bunch of  XML files, from which then we can restore the GUI  with both the same behavior and the same appearance.&lt;br /&gt;As I said in my &lt;a href="http://kenyth.blog.com/"&gt;previous article&lt;/a&gt;, in VC++ environment we can't make it because of widely used user customed Controls in addition to lack of implementation of meta data protocol (in Java it's the reflection mechanism). But on JVM we can get every control's properties, if not all, through Java's reflection mechanism. So it is likely that we can replicate, of course not through copying binary files, a given control written in java.&lt;br /&gt;However, technology is just technology and is useless if it is not practical. Now I just don't know where it can come into play. I know in MS's next generation OS Longhorn there will be a new graphical architecture, &lt;a href="http://msdn.microsoft.com/Longhorn/"&gt;Avalon&lt;/a&gt;, which allows writing GUIs just like writing HTML files , and which, I wanna mention, uses XML files as the intermediate representation of GUI. That's very similar to my idea. But MS sets up an environment, a some kind of parser or engine, for use of these XML files. But in a common system not as large as a OS, I can't figure out what this technology can be used for, although I think it's not a bad idea and I subconsciously feel that it will be useful.&lt;br /&gt;So I have to further think about it. And if anyone got idea on how to use this technology, please leave a comment. You'll be very appreciated.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-111316076899981389?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/111316076899981389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=111316076899981389' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/111316076899981389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/111316076899981389'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2005/04/how-about-writing-your-gui-as-xml.html' title='How about writing your GUI as XML files?'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-111316058358771654</id><published>2005-04-09T03:13:00.000+08:00</published><updated>2005-04-11T03:16:23.590+08:00</updated><title type='text'>Spending Hours Writing a Testing GUI.</title><content type='html'>It's a part of our lab's arrangements. It's supposed to be finished this morning. But as I said in the last post I put off it till now.&lt;br /&gt;Wirting here, I wanna talk about the project our lab recently involved in, which  now proved to be infeasible. The project is to provide a very vivid environment for the user to practise or test their mastering of operating large scale Windows based ERP software. Simply speaking, what we supposed to do is to emulate the targeted ERP software, not only the user interfaces, but also some logic, which the users are interested in, behinde them.&lt;br /&gt;It is not easy to write a software like that. We do a lot of experiments in which we capture as much information of kinds of control as we can from a third party software which will be finally targeted on SAP's ERP. We identify the type of a control according to its internal class name which, if not by default, arbitrary. Obviously,  It's a mission impossible. Because user customed controls are everywhere, even in MS's software. So considering this, the type of a control can't be automatically identified.&lt;br /&gt;My advisor has decided to turn down the project. To clarify that we really made a lot efforts and to tell our customer that this project is not feasible we have to integrate what we've done into one prototype to demonstrate our judgement.&lt;br /&gt;And that's why I write the GUI. It's sort of WIN32 programming. I don't use MFC.&lt;br /&gt;ps: If someone know how to work out problems I mentioned above please contact me. Thanks for any reply in advance.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-111316058358771654?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/111316058358771654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=111316058358771654' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/111316058358771654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/111316058358771654'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2005/04/spending-hours-writing-testing-gui.html' title='Spending Hours Writing a Testing GUI.'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-111315482467966685</id><published>2005-03-21T02:37:00.000+08:00</published><updated>2007-05-03T19:54:34.026+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aop'/><title type='text'>AOSD'05 - A great conference.</title><content type='html'>In the middle of March &lt;a href="http://aosd.net/2005/index.php"&gt;the Annual Aspect Oriented Software Development Conference 2005&lt;/a&gt;(also the fourth conference) was hosted in Chicago.&lt;br /&gt;Almost all the important experts, practitioners and company in this field joined this conference and it also came with many reports online and offline.&lt;br /&gt;I'm really excited about this conferece for seeing the rapid development of AO. Although I can't attend this conference I read news and blogs reporting the conferece. And I have strong confidence in AOP being more and more accepted by the industry.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-111315482467966685?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://kenyth.blog.com/163745/' title='AOSD&apos;05 - A great conference.'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/111315482467966685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=111315482467966685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/111315482467966685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/111315482467966685'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2005/03/aosd05-great-conference.html' title='AOSD&apos;05 - A great conference.'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-111315459023020449</id><published>2004-04-11T01:21:00.000+08:00</published><updated>2007-05-03T19:58:12.465+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='aop'/><title type='text'>The Aspect-Oriented Software Association</title><content type='html'>&lt;span style="font-family:georgia;"&gt;The Aspect-Oriented Software Association is a non-profit organization whose mission is to be the primary sponsor for the annual Conference on Aspect-Oriented Software Development.&lt;br /&gt;The AOSA Steering Committee members are:&lt;br /&gt;&lt;/span&gt;&lt;a href="http://trese.cs.utwente.nl/staff/staff.php?action=showDetails&amp;u_id=2"&gt;&lt;span style="font-family:georgia;"&gt;Mehmet Aksit&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.mitacs.ca/main.php?mid=10000184&amp;amp;pid=144&amp;amp;pplid=70"&gt;&lt;span style="font-family:georgia;"&gt;Brian Barry&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://cs.iit.edu/faculty/elrad.html"&gt;&lt;span style="font-family:georgia;"&gt;Tzilla Elrad&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://ic.arc.nasa.gov/people/filman/"&gt;&lt;span style="font-family:georgia;"&gt;Bob Filman&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.cs.ubc.ca/~gregor"&gt;&lt;span style="font-family:georgia;"&gt;Gregor Kiczales&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:georgia;"&gt; (chair)&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.ccs.neu.edu/home/lieber/"&gt;&lt;span style="font-family:georgia;"&gt;Karl Lieberherr&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.st.informatik.tu-darmstadt.de/staff/Mezini"&gt;&lt;span style="font-family:georgia;"&gt;Mira Mezini&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.cs.ubc.ca/~murphy"&gt;&lt;span style="font-family:georgia;"&gt;Gail Murphy&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.research.ibm.com/people/o/ossher/"&gt;&lt;span style="font-family:georgia;"&gt;Harold Ossher&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-111315459023020449?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://kenyth.blog.com/164657/' title='The Aspect-Oriented Software Association'/><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/111315459023020449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=111315459023020449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/111315459023020449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/111315459023020449'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2004/04/aspect-oriented-software-association.html' title='The Aspect-Oriented Software Association'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8880329.post-109877671760828402</id><published>2004-03-26T17:42:00.000+08:00</published><updated>2005-04-11T01:51:56.970+08:00</updated><title type='text'>Hello World</title><content type='html'>public Class Hello {&lt;br /&gt;public static void main(String[] strgs) {&lt;br /&gt;System.out.println("Hello World!");&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-1045426149692068";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--&gt;&lt;/script&gt;
&lt;script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8880329-109877671760828402?l=kenyth-tech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kenyth-tech.blogspot.com/feeds/109877671760828402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8880329&amp;postID=109877671760828402' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/109877671760828402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8880329/posts/default/109877671760828402'/><link rel='alternate' type='text/html' href='http://kenyth-tech.blogspot.com/2004/03/hello-world.html' title='Hello World'/><author><name>Kenyth</name><uri>http://www.blogger.com/profile/14982761189774109867</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://amadeo.blog.com/repository/64757/134922.p.jpg'/></author><thr:total>2</thr:total></entry></feed>
