锘??xml version="1.0" encoding="utf-8" standalone="yes"?>九月婷婷亚洲综合在线,亚洲欧洲精品国产区,亚洲精品亚洲人成在线麻豆http://www.tkk7.com/Johncn/archive/2006/01/07/27021.htmlZhuJunZhuJunSat, 07 Jan 2006 12:46:00 GMThttp://www.tkk7.com/Johncn/archive/2006/01/07/27021.htmlhttp://www.tkk7.com/Johncn/comments/27021.htmlhttp://www.tkk7.com/Johncn/archive/2006/01/07/27021.html#Feedback0http://www.tkk7.com/Johncn/comments/commentRss/27021.htmlhttp://www.tkk7.com/Johncn/services/trackbacks/27021.html    欏圭洰涓疄鐜板璇█鍥介檯鍖栭兘鏄氳繃浣跨敤<bean:message>鏍囩鍜岃祫婧愭枃浠?浣嗘槸濡傛灉鎶婃墍鏈夌殑欏甸潰璇存槑閮藉姞鍏ヤ竴涓祫婧愭枃浠朵腑,閫氬父鐨勫悗鏋滄槸榪欎釜鏂囦歡浼氳秺鏉ヨ秺闀?鑰屼笖寮鍙戜腑涓嶅悓鐨勪漢鍔犲叆鐨勬牸寮忎篃涓嶄竴鐩?鍒版渶鍚庡緢鍙兘鏄皝涔熶笉鐭ラ亾鍒板簳璧勬簮鏂囦歡涓湁浜涗粈涔堝唴瀹?濡傛灉鏈夋柊鐨勫紑鍙戜漢鍛樺姞鍏ョ殑璇?寰堝彲鑳藉彧濂藉啀鑷繁闇瑕佺敤鍒頒粈涔堝啀緇х畫鍔犺繘鏂囦歡.鏈鍚庣淮鎶よ繖鏍風殑鏂囦歡鍙樻垚寰堢棝鑻︾殑浜嬫儏.
    鎵浠ユ兂瑕佷嬌鐢ㄥ涓祫婧愭枃浠?榪欐牱鍙互鏍規嵁涓嶅悓鐨勫垝鍒嗚鍒?鍔熻兘,浣嶇疆,璇嶆?灝嗕笉鍚岀殑鍐呭鏀懼叆涓嶅悓鐨勬枃浠?鏂逛究緇存姢.
鍏蜂綋鐨勫仛娉?
1.鍒涘緩灞炴ф枃浠跺茍涓斿湪struts-config.xml涓負姣忎竴涓枃浠跺0鏄庝竴涓猰essage-resources鍏冪礌銆?/STRONG>
<message-resources
  
parameter="com.oreilly.strutsckbk.MessageResources"/>

<message-resources 
  
parameter="com.oreilly.strutsckbk.LabelResources"

  key
="labels">
</message-resources>
<message-resources 
  
parameter="com.oreilly.strutsckbk.HeaderResources"

  key
="headers">
</message-resources>
娉ㄦ剰:榪欓噷澶氫簡涓涓睘鎬?STRONG>key
,榪欏氨鏄敤鏉ュ湪欏甸潰鏍囩涓尯鍒嗕笉鍚岀殑璧勬簮鏂囦歡鐨?鏍囩榛樿鏄嬌鐢ㄦ病鏈夎鏄?STRONG>key鍊肩殑閭d釜璧勬簮鏂囦歡.

2.浣跨敤<bean:message>鏍囩:
<bean:message bundle="labels" key="label.url"/>
娉ㄦ剰:榪欓噷鐨?STRONG>bundle灞炴у氨鏄敤鏉ユ寚鏄庝笂闈㈡彁鍒扮殑key灞炴х殑,浠ヨ〃鏄庤繖涓?lt;bean:message>鏍囩鏄浣跨敤鍝釜璧勬簮鏂囦歡.

璇存槑:鍙兘鍦╯truts1.1浠ヤ笂鐗堟湰浣跨敤澶氫釜璧勬簮鏂囦歡,struts1.0涓嶆敮鎸?lt;message-resource>灞炴?鎵浠ヤ笉鑳藉疄鐜頒笂闈㈢殑鐢ㄦ硶.


ZhuJun 2006-01-07 20:46 鍙戣〃璇勮
]]>
[Tomcat] 淇敼Tomcat绔彛鍙?/title><link>http://www.tkk7.com/Johncn/archive/2006/01/02/26406.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Mon, 02 Jan 2006 15:42:00 GMT</pubDate><guid>http://www.tkk7.com/Johncn/archive/2006/01/02/26406.html</guid><wfw:comment>http://www.tkk7.com/Johncn/comments/26406.html</wfw:comment><comments>http://www.tkk7.com/Johncn/archive/2006/01/02/26406.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Johncn/comments/commentRss/26406.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Johncn/services/trackbacks/26406.html</trackback:ping><description><![CDATA[<div id="pxnfdhr" class=postcontent> <P><FONT face=Arial size=2>瀹夎浜哋racle鍚?鍚姩Tomcat鏃跺嚭鐜伴敊璇?</FONT></P> <P><FONT face=Arial color=#ff0000 size=2>Error starting endpoint<BR>java.net.BindException: Address already in use: JVM_Bind:8080</FONT></P> <P><FONT face=Arial color=#000000 size=2>鍘熸潵Oracle鐨凷ervlet Engine涔熶嬌鐢ㄤ簡8080绔彛.閭e氨鏉ヤ慨鏀筎omcat鐨勭鍙?</FONT></P> <P><FONT face=Arial size=2>棣栫浉鎵懼埌<FONT color=#0000cc>Tomcat 5.0\conf\server.xml</FONT>鏂囦歡,鐒跺悗鎵懼埌涓嬮潰鐨勪唬鐮?<BR></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">    port="8080"               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>               enableLookups="false" redirectPort="8443" acceptCount="100"<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>               debug="0" connectionTimeout="20000" <BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>               disableUploadTimeout="true" /></SPAN></DIV> <P></FONT><FONT face=Arial size=2>淇敼 port="8080" 涓轟綘鎯寵鐨勭鍙e氨鍙互浜?</FONT></P></DIV><img src ="http://www.tkk7.com/Johncn/aggbug/26406.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Johncn/" target="_blank">ZhuJun</a> 2006-01-02 23:42 <a href="http://www.tkk7.com/Johncn/archive/2006/01/02/26406.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[Velocity] Velocity 鍙傝冭祫鏂?/title><link>http://www.tkk7.com/Johncn/archive/2006/01/02/26400.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Mon, 02 Jan 2006 15:25:00 GMT</pubDate><guid>http://www.tkk7.com/Johncn/archive/2006/01/02/26400.html</guid><wfw:comment>http://www.tkk7.com/Johncn/comments/26400.html</wfw:comment><comments>http://www.tkk7.com/Johncn/archive/2006/01/02/26400.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Johncn/comments/commentRss/26400.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Johncn/services/trackbacks/26400.html</trackback:ping><description><![CDATA[     鎽樿: Velocity 鍙傝冭祫鏂? John Zhu 2005-4-7   鍘熸枃:http://jakarta.apache.org/velocity/user-guide.html VTL Reference: http://jakarta.apache.org/velocity/vtl-reference-guide.html Develop...  <a href='http://www.tkk7.com/Johncn/archive/2006/01/02/26400.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/Johncn/aggbug/26400.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Johncn/" target="_blank">ZhuJun</a> 2006-01-02 23:25 <a href="http://www.tkk7.com/Johncn/archive/2006/01/02/26400.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[Eclipse] 鍦‥clipse涓畨瑁匳isual Editor鎻掍歡http://www.tkk7.com/Johncn/archive/2006/01/02/26398.htmlZhuJunZhuJunMon, 02 Jan 2006 15:22:00 GMThttp://www.tkk7.com/Johncn/archive/2006/01/02/26398.htmlhttp://www.tkk7.com/Johncn/comments/26398.htmlhttp://www.tkk7.com/Johncn/archive/2006/01/02/26398.html#Feedback0http://www.tkk7.com/Johncn/comments/commentRss/26398.htmlhttp://www.tkk7.com/Johncn/services/trackbacks/26398.html鍦‥clipse涓繘琛孏UI寮鍙戦渶瑕佸畨瑁匳isual Editor鎻掍歡:
1.Install Omondo UML(鍖呮嫭浜哣E鎻掍歡鎵闇瑕佺殑EMF,GEF,榪樺寘鎷琔ML2鎻掍歡):
2.Install Visual Editor鎻掍歡:
  • 鍒?/FONT>http://www.eclipse.org/vep/涓嬭澆VE-runtime-1.0.2.1.zip;
  • 灝哣E -runtime-1.0.2.1.zip瑙e帇鍒癱:\eclipse-plugins(鍙互鏄換浣曠洰褰?涓?鍦‥clipse鐨勫畨瑁呰礬寰勪笅鐨刲inks 鐩綍涓緩绔嬩竴涓猯ink鏂囦歡,姣斿gui.ve.link,鏂囦歡鍐呭涓?nbsp; path=c:/eclipse-plugins/VE-runtime- 1.0.2.1, 鍗寵繖涓猯ink鏂囦歡瑕佸搴斾竴涓垰瑙e帇鍚庣殑鎻掍歡鐩綍銆?娉ㄦ剰:姝ょ洰褰曚腑搴斿寘鍚玡clipse/(features|plugins)緇撴瀯);
  • 鍚姩eclipse鍗沖彲,瀹夎瀹屾垚;

3.鍚庢湡璁劇疆:

  • 鐐瑰嚮Window鑿滃崟錛岄夋嫨Customize Perspective鈥?/SPAN>
  • Submenus鏍忕洰涓嬮夋嫨New
  • Shortcut Categories涓嬮夋嫨Java
  • Shortcuts涓湪Visual Class鍓嶅垝鍕?/SPAN>
  • Submenus鏍忕洰涓嬮夋嫨Show View
  • Shortcut Categories涓嬮夋嫨Basic
  • Shortcuts涓湪Palette鍓嶅垝鍕?/SPAN>
  • 閫氳繃鑿滃崟璋冨嚭Palette錛?/SPAN>Window | Show View | Palette
  • 浠?SPAN lang=EN-US>Menu鎵撳紑Properties View錛?SPAN lang=EN-US style="COLOR: blue">Windows | Show View | Basic | Properties

濂戒簡,鐜板湪new->Visual Class灝卞彲浠ヨ繘琛孏UI鐨勫紑鍙戜簡.



ZhuJun 2006-01-02 23:22 鍙戣〃璇勮
]]>
[Velocity] Velocity涓亣鍒扮殑涓涓棶棰?/title><link>http://www.tkk7.com/Johncn/archive/2006/01/02/26394.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Mon, 02 Jan 2006 15:18:00 GMT</pubDate><guid>http://www.tkk7.com/Johncn/archive/2006/01/02/26394.html</guid><wfw:comment>http://www.tkk7.com/Johncn/comments/26394.html</wfw:comment><comments>http://www.tkk7.com/Johncn/archive/2006/01/02/26394.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Johncn/comments/commentRss/26394.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Johncn/services/trackbacks/26394.html</trackback:ping><description><![CDATA[<FONT face=Arial size=2>鍦ㄦā鏉夸腑鑰佹槸璁塊棶涓嶅埌瀵硅薄鐨勫睘鎬?鏈鍚庡彂鐜板師鏉ユ槸搴斾負妯℃澘涓闂殑瀵硅薄涓嶆槸涓涓狿ublic綾?<FONT color=#ff3300>灝咰lass鏀逛負Public</FONT>鍚庝竴鍒嘜K.鍚庢潵鍒嗘瀽鍙兘鏄洜涓鴻闂潈闄愮殑闂,褰揅lass鏈姞Public鏃?鏄寘鍐呭彲璁塊棶(friendly),鑰屾ā鏉垮鏋滀笌瀵硅薄鐨凜lass涓嶅湪鍚屼竴鍖呬腑鏃惰嚜鐒惰闂笉鍒? </FONT><img src ="http://www.tkk7.com/Johncn/aggbug/26394.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Johncn/" target="_blank">ZhuJun</a> 2006-01-02 23:18 <a href="http://www.tkk7.com/Johncn/archive/2006/01/02/26394.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[Hibernate] 涓篐ibernate鎻愪緵JDBC榪炴帴http://www.tkk7.com/Johncn/archive/2006/01/02/26392.htmlZhuJunZhuJunMon, 02 Jan 2006 15:15:00 GMThttp://www.tkk7.com/Johncn/archive/2006/01/02/26392.htmlhttp://www.tkk7.com/Johncn/comments/26392.htmlhttp://www.tkk7.com/Johncn/archive/2006/01/02/26392.html#Feedback0http://www.tkk7.com/Johncn/comments/commentRss/26392.htmlhttp://www.tkk7.com/Johncn/services/trackbacks/26392.html鍙互閫氳繃3閽熸柟寮忎負Hibernate鎻愪緵JDBC榪炴帴:

1.鐩存帴鎻愪緵JDBC榪炴帴瀵硅薄Connection:

Class.forName("com.mysql.jdbc.Driver"); 
String url 
= "jdbc:mysql://localhost:3306/HibernateTest?user=root&password="
java.sql.Connection conn 
= DriverManager.getConnection(url); 
SessionFactory sessionFactory 
= cfg.buildSessionFactory(); 
Session session 
= sessionFactory.openSession(conn);

2.閫氳繃灞炴ф枃浠?/SPAN>hibernate.properties閰嶇疆JDBC鏉ユ簮:

hibernate.show_sql = true 
hibernate.dialect 
= net.sf.hibernate.dialect.MySQLDialect 
hibernate.connection.driver_class 
= com.mysql.jdbc.Driver 
hibernate.connection.url 
= jdbc:mysql://localhost/HibernateTest 
hibernate.connection.username = root
hibernate.connection.password 
= 

3.閫?SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 瀹嬩綋; LETTER-SPACING: 0.75pt; mso-bidi-font-family: 瀹嬩綋; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">榪?/SPAN>XML鏂囦歡hibernate.cfg.xml榪涜閰嶇疆:

<?xml version='1.0' encoding='big5'?> 
<!DOCTYPE hibernate-configuration 
    PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" 
    "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"
> 

<hibernate-configuration> 

    
<session-factory> 

        
<!-- 鏄劇ず瀹為檯鎿嶄綔鏁版嵁搴撴椂鐨凷QL --> 
        
<property name="show_sql">true</property> 
        
<!-- SQL鏂硅█錛岃繖杈硅瀹氱殑鏄疢ySQL --> 
        
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property> 
        
<!-- JDBC椹卞姩紼嬪簭 --> 
        
<property name="connection.driver_class">com.mysql.jdbc.Driver</property> 
        
<!-- JDBC URL --> 
        
<property name="connection.url">jdbc:mysql://localhost/HibernateTest</property> 
        
<!-- 鏁版嵁搴撲嬌鐢ㄨ?nbsp;--> 
        
<property name="connection.username">caterpillar</property> 
        
<!-- 鏁版嵁搴撳瘑鐮?nbsp;--> 
        
<property name="connection.password">123456</property> 

        
<!-- 瀵硅薄涓庢暟鎹簱琛ㄦ牸鏄犲儚鏂囦歡 --> 
        
<mapping resource="User.hbm.xml"/> 
    
</session-factory> 

</hibernate-configuration>


ZhuJun 2006-01-02 23:15 鍙戣〃璇勮
]]>
[鍙戞帢Jakarta Commons] 浣跨敤StringUtil綾?/title><link>http://www.tkk7.com/Johncn/archive/2005/12/27/25619.html</link><dc:creator>ZhuJun</dc:creator><author>ZhuJun</author><pubDate>Tue, 27 Dec 2005 11:35:00 GMT</pubDate><guid>http://www.tkk7.com/Johncn/archive/2005/12/27/25619.html</guid><wfw:comment>http://www.tkk7.com/Johncn/comments/25619.html</wfw:comment><comments>http://www.tkk7.com/Johncn/archive/2005/12/27/25619.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Johncn/comments/commentRss/25619.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Johncn/services/trackbacks/25619.html</trackback:ping><description><![CDATA[<P><FONT face=Arial size=2>org.apache.commons.lang.StringUtils涓彁渚涜澶氭湁鐢ㄧ殑瀛楃涓叉搷浣滄柟娉曪紝浜嗚В榪欎簺鏂規硶錛屾垜浠彲浠ラ伩鍏嶈澶氫笉蹇呰鐨勯噸澶嶅伐浣溿備笅闈粙緇嶅叾涓瘮杈冩湁鐢ㄧ殑鍑犱釜鏂規硶錛?BR><BR></FONT><STRONG><FONT face=Arial size=2>媯鏌ョ┖瀛楃涓詫細<BR></FONT></P></STRONG> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></FONT><SPAN style="COLOR: #000000"><FONT face=Arial size=2>StringUtils.isBlank(String str);<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>StringUtils.isNotBlank(String str);</FONT></SPAN></DIV> <P><FONT face=Arial><FONT size=2><STRONG>緙╁啓瀛楃涓詫細</STRONG><BR></FONT></FONT></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><FONT face=Arial><FONT size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">String test </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">This is a test of the abbreviation.</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>System.out.println( StringUtils.abbreviate( test, </FONT></SPAN><SPAN style="COLOR: #000000"><FONT face=Arial size=2>10</FONT></SPAN><SPAN style="COLOR: #000000"><FONT face=Arial size=2> ) );<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>[Console杈撳嚭]<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>This is<IMG src="http://www.tkk7.com/images/dot.gif"></FONT></SPAN></DIV><STRONG><FONT face=Arial size=2>鏌ユ壘宓屽瀛楃涓詫細<BR></FONT></STRONG> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><FONT face=Arial><FONT size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">String htmlContent </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><html>\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>                     </FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">  <head>\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>                     </FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">    <title>Test Page</title>\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>                     </FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">  </head>\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>                     </FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">  <body>\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>                     </FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">    <p>This is a TEST!</p>\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>                     </FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">  </body>\n</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>                     </FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"></html></SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Extract the title from this XHTML content </SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">String title </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> StringUtils.substringBetween(htmlContent, </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"><title></SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"></title></SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>System.out.println( </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Title: </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><FONT face=Arial size=2> title );<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>[Console杈撳嚭]<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>Title: Test Page</FONT></SPAN></DIV><STRONG><FONT face=Arial size=2>楠岃瘉瀛楃涓詫細<BR></FONT></STRONG> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><FONT face=Arial><FONT size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">String test1 </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">ORANGE</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>String test2 </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">ICE9</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>String test3 </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">ICE CREAM</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>String test4 </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">820B Judson Avenue</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">;<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">boolean</SPAN><SPAN style="COLOR: #000000"> t1val </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> StringUtils.isAlpha( test1 ); </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> returns true</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">boolean</SPAN><SPAN style="COLOR: #000000"> t2val </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> StringUtils.isAlphanumeric( test2 ); </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> returns true</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">boolean</SPAN><SPAN style="COLOR: #000000"> t3val </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> StringUtils.isAlphaSpace( test3 ); </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> returns true</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">boolean</SPAN><SPAN style="COLOR: #000000"> t4val </SPAN><SPAN style="COLOR: #000000">=</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000"> <BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>    StringUtils.isAlphanumericSpace( test4 ); </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> returns true</SPAN></FONT></FONT></DIV><FONT face=Arial><FONT size=2><STRONG>璁$畻瀛楃涓插嚭鐜伴鐜囷細</STRONG>StringUtils.countMatches()</FONT></FONT><A name=jakartackbk-CHP-2-ITERM-2064></A><FONT face=Arial size=2> </FONT><A name=jakartackbk-CHP-2-ITERM-2065></A><BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><FONT face=Arial><FONT size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">File manuscriptFile </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> File(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">manuscript.txt</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000">);<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>Reader reader </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000"> FileReader( manuscriptFile );<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>StringWriter stringWriter </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000"> StringWriter( );<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG id=Codehighlighter1_177_211_Open_Image onclick="this.style.display='none'; Codehighlighter1_177_211_Open_Text.style.display='none'; Codehighlighter1_177_211_Closed_Image.style.display='inline'; Codehighlighter1_177_211_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_177_211_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_177_211_Closed_Text.style.display='none'; Codehighlighter1_177_211_Open_Image.style.display='inline'; Codehighlighter1_177_211_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">( reader.ready( ) ) </SPAN><SPAN id=Codehighlighter1_177_211_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_177_211_Open_Text><SPAN style="COLOR: #000000">{ writer.write( reader.read( ) ); }</SPAN></SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>String manuscript </FONT></SPAN><SPAN style="COLOR: #000000"><FONT face=Arial size=2>=</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000"> stringWriter.toString( );<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> Convert string to lowercase</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>manuscript </FONT></SPAN><SPAN style="COLOR: #000000"><FONT face=Arial size=2>=</FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000"> StringUtils.lowerCase(manuscript);<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000"> count the occurrences of "futility"</SPAN></FONT></FONT><SPAN style="COLOR: #008000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></FONT></SPAN><FONT face=Arial><FONT size=2><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> numFutility </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> StringUtils.countMatches( manuscript, </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">futility</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><FONT face=Arial size=2> );<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></FONT></SPAN></DIV><FONT face=Arial size=2><STRONG>姣旇緝涓嶅悓瀛楃涓詫細<BR></STRONG></FONT> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><FONT face=Arial><FONT size=2><STRONG><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></STRONG><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> dist </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> StringUtils.getLevenshteinDistance( </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Word</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">World</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000"> );<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>String diff </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> StringUtils.difference( </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Word</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">World</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000"> );<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> index </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> StringUtils.indexOfDifference( </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Word</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">World</SPAN><SPAN style="COLOR: #000000">"</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000"> );<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>System.out.println( </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Edit Distance: </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000"> dist );<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>System.out.println( </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Difference: </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000"> diff );<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>System.out.println( </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Diff Index: </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">+</SPAN></FONT></FONT><FONT face=Arial><FONT size=2><SPAN style="COLOR: #000000"> index );<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>[Console杈撳嚭]<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>Edit Distance: </SPAN><SPAN style="COLOR: #000000">2</SPAN></FONT></FONT><SPAN style="COLOR: #000000"><BR><FONT face=Arial size=2><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>Difference: ld<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>Diff Index: </FONT></SPAN><SPAN style="COLOR: #000000"><FONT face=Arial size=2>3</FONT></SPAN></DIV><BR> <HR> <BR> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">鍙傝冭祫鏂欙細<BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>銆奐akarta Commons Cookbook銆?BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>By Timothy M. O'Brien <BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>   <BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>Publisher : O'Reilly <BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>Pub Date : November </SPAN><SPAN style="COLOR: #000000">2004</SPAN><SPAN style="COLOR: #000000"> <BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>ISBN : </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">596</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">00706</SPAN><SPAN style="COLOR: #000000">-X <BR><IMG src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align=top>Pages : </SPAN><SPAN style="COLOR: #000000">400</SPAN><SPAN style="COLOR: #000000"> </SPAN></DIV><img src ="http://www.tkk7.com/Johncn/aggbug/25619.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Johncn/" target="_blank">ZhuJun</a> 2005-12-27 19:35 <a href="http://www.tkk7.com/Johncn/archive/2005/12/27/25619.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[Hibernate絎旇] 緇勪歡(Component)鏄犲皠http://www.tkk7.com/Johncn/archive/2005/12/22/25115.htmlZhuJunZhuJunThu, 22 Dec 2005 10:46:00 GMThttp://www.tkk7.com/Johncn/archive/2005/12/22/25115.htmlhttp://www.tkk7.com/Johncn/comments/25115.htmlhttp://www.tkk7.com/Johncn/archive/2005/12/22/25115.html#Feedback0http://www.tkk7.com/Johncn/comments/commentRss/25115.htmlhttp://www.tkk7.com/Johncn/services/trackbacks/25115.html緇勪歡(Component)鏄犲皠澶氱敤鏉ヨ〃紺哄璞$殑浠庡睘鍏崇郴(緇勫悎,鑱氬悎).姣斿涓涓鐢熷彲鑳芥湁濮撳悕,騫撮緞,鎬у埆,鎴愮嘩絳夊睘鎬?鍏朵腑鎴愮嘩鏄彟涓涓璞?鍙堟湁縐戠洰,鍒嗘暟灞炴?榪欓噷灝遍渶瑕佺敤緇勪歡鏄犲皠鏉ヨ〃鏄箣闂寸殑鍏崇郴.

Java浠g爜:
// 瀛︾敓
class Student{
  
private
 String name;
  
private int
 age;
  
private
 String sex;
  
private
 Grade grade;

}

// 鎴愮嘩
class Grade{
  
private
 String subject;
  
private float
 score;

}

鏁版嵁搴?

-- 瀛︾敓琛?/SPAN>
create table STUDENT ( 
    ID 
char(32not null

    NAME 
varchar(16not null

    SEX 
char(1
), 
    AGE 
integer

    
primary key
 (ID) 
);

-- 鎴愮嘩琛?/SPAN>

create table GRADE ( 
    ID 
char(32not null

    student_id 
char(32not null

    SUBJECT 
varchar(10
), 
    SCORE 
float

    
primary key
 (ID),
    
foreign key
 (student_id) 
);

Hibernate鏄犲皠鏂囦歡:
<?xml version="1.0"?> 
<!
DOCTYPE hibernate-mapping 
    PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" 
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"
>
 
<hibernate-mapping>
 
    
<class name="Student" table="STUDENT">
 

            
<id name="id" type="string" unsaved-value="null">
 
            
<column name="ID" sql-type="char(32)"/>
 
            
<generator class="uuid.hex"/>
 
        
</id>
 

        
<property name="name" type="string" not-null="true">
 
            
<column name="NAME" length="16" not-null="true"/>
 
        
</property>
 
        
<property name="sex" type="char" column="SEX"/>
 
        
<property name="age" type="int" column="AGE"/>
 
        
        
<component name="grade" class="Grade">
 
            
<property name="subject" type="string" column="SUBJECT" not-null="true"/>
 
            
<property name="score" type="float" column="SCORE" not-null="true"/>
 
        
</component>
 

    
</class>
 
</hibernate-mapping>


ZhuJun 2005-12-22 18:46 鍙戣〃璇勮
]]>[鍙戞帢Jakarta Commons] 浣跨敤LRUMap http://www.tkk7.com/Johncn/archive/2005/12/15/24088.htmlZhuJunZhuJunThu, 15 Dec 2005 11:59:00 GMThttp://www.tkk7.com/Johncn/archive/2005/12/15/24088.htmlhttp://www.tkk7.com/Johncn/comments/24088.htmlhttp://www.tkk7.com/Johncn/archive/2005/12/15/24088.html#Feedback0http://www.tkk7.com/Johncn/comments/commentRss/24088.htmlhttp://www.tkk7.com/Johncn/services/trackbacks/24088.htmlLRUMap(Least Recently Used Cache)鍙敤鏉ヤ繚瀛樻渶榪戜嬌鐢ㄧ殑鍑犳潯璁板綍,渚嬪:淇濆瓨Blog涓殑鏈榪?0鏉$暀璦.澶у鏁版儏鍐電敤浣滅紦瀛?濡?EHCache)鐨勪竴縐嶇瓥鐣?鍏蜂綋浣跨敤鏂規硶濡備笅:
import java.util.Map;
import
 org.apache.commons.collections.map.LRUMap;

cache 
= new LRUMap( 5
 );     

// Populate the cache with 5 stock prices

cache.put( "MSFT"new Float( 0.03 ) );
cache.put( 
"TSC"new Float( 0.001
 ) );
cache.put( 
"LU"new Float( 23.30
 ) );
cache.put( 
"CSCO"new Float( 242.20
 ) );
cache.put( 
"P"new Float( 10.23
 ) );
     
// Now use some of the entries in the cache

Float cscoPrice  = (Float) cache.get( "CSCO" );
Float msPrice 
= (Float) cache.get( "MSFT"
 );
Float tscPrice 
= (Float) cache.get( "TSC"
 );
Float luPrice 
= (Float) cache.get( "LU"
 );
Float pPrice 
= (Float) cache.get( "P"
 );
Float msPrice2 
= (Float) cache.get( "MSFT"
 );
  
// Add another price to the Map, this should kick out the LRU item.

cache.put( "AA"new Float( 203.20 ) );
姝ゆ椂,緙撳瓨涓殑鍏冪礌涓?
[CSCO]
[MSFT]
[TSC]
[LU]
[P]
[AA]
鐢變簬LRU鏈榪戞病鏈夎璁塊棶,鎵浠ュ綋AA鍔犲叆鏃?鐢變簬瓚呰繃浜嗙紦瀛樼殑鏈澶у閲?5),鎵浠ヨ鍓旈櫎浜嗙紦瀛?


鍙傝冭祫鏂?
<<
Jakarta Commons Cookbook>>
 
By Timothy M. O
'Brien 

   
Publisher : O
'Reilly 

Pub Date : November 2004 
ISBN : 
0-596-00706-

Pages : 
400
 


ZhuJun 2005-12-15 19:59 鍙戣〃璇勮
]]>[Hibernate絎旇] 緇ф壙鏄犲皠http://www.tkk7.com/Johncn/archive/2005/09/11/12645.htmlZhuJunZhuJunSat, 10 Sep 2005 16:21:00 GMThttp://www.tkk7.com/Johncn/archive/2005/09/11/12645.htmlhttp://www.tkk7.com/Johncn/comments/12645.htmlhttp://www.tkk7.com/Johncn/archive/2005/09/11/12645.html#Feedback0http://www.tkk7.com/Johncn/comments/commentRss/12645.htmlhttp://www.tkk7.com/Johncn/services/trackbacks/12645.html瀵逛簬瀵硅薄鐨勭戶鎵垮叧緋? 寤鴻鈥滄瘡涓媯電被緇ф壙鏍戝搴斾竴涓〃鈥?鍗沖姣忎竴涓瓙綾婚兘榪涜浣跨敤<subclass>澹版槑銆?渚嬪:

鏈変竴涓熀綾? class User, 涓や釜瀛愮被: class Admin鍜?class Guest.

鍒欐柊寤轟竴涓〃鏍兼潵瀵瑰簲榪欎釜緇ф壙綾繪暟:

create table USER ( 
    ID 
char(32not null
    DISCRIMINATOR_USERTYPE 
varchar(255not null
    NAME 
varchar(16not null
    PASSWORD 
varchar(16not null
    USER_LEVEL 
integer
    POWER_OTHER 
varchar(255), 
    GUEST_OTHER 
varchar(255), 
    
primary key (ID) 
);

鍏朵腑瀛楁DISCRIMINATOR_USERTYPE鏉ヨ褰曞偍瀛樼殑綾誨埆鏄睘浜?/SPAN>User銆?/SPAN>Admin鎴栨槸Guest鐨勮褰曪紝濡傛灉璇ュ瓧孌墊槸ParentUser錛屽垯琛ㄧず璇ョ瑪鏁版嵁鏄?/SPAN>User綾誨埆錛屽鏋滄槸ADMIN錛岃〃紺烘槸Admin鐨勮褰曪紝濡傛灉鏄?/SPAN>GUEST錛岃〃紺烘槸Guest鐨勮褰?


鏄犲儚鏂囦歡:

<?xml version="1.0"?> 
<!DOCTYPE hibernate-mapping 
    PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" 
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"
> 

<hibernate-mapping> 

    
<class name="com.zj.User" table="USER" discriminator-value="ParentUser"> 

        
<id name="id" type="string" unsaved-value="null"> 
            
<column name="ID" sql-type="char(32)"/> 
            
<generator class="uuid.hex"/> 
        
</id> 

        
<discriminator column="DISCRIMINATOR_USERTYPE" type="string"/> 

        
<property name="name" type="string" not-null="true"> 
            
<column name="NAME" length="16" not-null="true"/> 
        
</property> 

        
<property name="password" type="string" not-null="true"> 
            
<column name="PASSWORD" length="16" not-null="true"/> 
        
</property> 

        
<subclass name="com.zj.Admin" discriminator-value="ADMIN"> 
            
<property name="level" type="integer" column="ADMIN_LEVEL"/> 

            
<property name="otherOfPower" type="string" column="POWER_OTHER"/> 
         
</subclass> 
        
         
<subclass name="com.zj.Guest" discriminator-value="GUEST"> 
            
<property name="otherOfGuest" type="string" column="GUEST_OTHER"/> 
         
</subclass> 
    
</class> 

</hibernate-mapping>


娉ㄦ剰涓婇潰鏂囦歡涓?鍦ㄦ槧鍍忓瓙綾誨埆鏃訛紝浣跨敤<subclass>鎸囨槑鏄犲儚鐨勫瓙綾誨埆浠ュ強鍏?/SPAN>discriminator-value鏉ユ寚瀹?

ZhuJun 2005-09-11 00:21 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 一区二区免费视频| 免费在线观看你懂的| 成人无码区免费视频观看 | a毛片免费全部播放完整成| 天天天欲色欲色WWW免费| 国产亚洲免费的视频看| 色多多免费视频观看区一区| 中文字幕影片免费在线观看| 亚洲AV无码乱码麻豆精品国产| a国产成人免费视频| 国产中文在线亚洲精品官网| 免费在线观看黄网| 美女视频黄a视频全免费网站色窝| 亚洲精品无码午夜福利中文字幕| 国产精品怡红院永久免费| 亚洲黄色在线观看网站| 99久久综合精品免费| 亚洲人成亚洲精品| 久久这里只精品热免费99| 亚洲网址在线观看你懂的| 四虎免费在线观看| 无码日韩精品一区二区三区免费| 国产精品亚洲av色欲三区| 日本高清免费aaaaa大片视频| 日本亚洲免费无线码| 免费鲁丝片一级在线观看| 日本亚洲欧美色视频在线播放| 国产a级特黄的片子视频免费| 一区二区三区在线免费| 国产午夜亚洲不卡| 无码少妇一区二区浪潮免费| 国产成人免费ā片在线观看老同学| 亚洲成av人片在线天堂无| 国产一级理论免费版| 亚洲w码欧洲s码免费| 日本亚洲欧美色视频在线播放| 亚洲视频精品在线观看| 亚洲精品无码乱码成人| 亚洲国产香蕉人人爽成AV片久久 | 国产高潮流白浆喷水免费A片 | 亚洲国产精品嫩草影院在线观看|