锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲另类视频在线观看,中文字幕亚洲男人的天堂网络,亚洲精品99久久久久中文字幕http://www.tkk7.com/Andyluo/category/1761.html<table><tr><td><font color="blue">閿葷偧韜綋銆佹彁鍗囨妧鑳姐佷慨韜吇鎬?lt;/font><br> 璁ㄨEclipse, Java, Linux, Google浜у搧<br> </td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td> <!-- google script --></td></tr></table>zh-cnFri, 16 May 2008 04:22:48 GMTFri, 16 May 2008 04:22:48 GMT60Rational Application Developer (RAD) 鍑虹幇鈥淛VM terminated. Exit code=1鈥濋敊璇殑瑙e喅鏂規http://www.tkk7.com/Andyluo/archive/2008/05/16/RAD-JVM-Exit-Error.html緗楁槑緗楁槑Fri, 16 May 2008 03:06:00 GMThttp://www.tkk7.com/Andyluo/archive/2008/05/16/RAD-JVM-Exit-Error.htmlhttp://www.tkk7.com/Andyluo/comments/200825.htmlhttp://www.tkk7.com/Andyluo/archive/2008/05/16/RAD-JVM-Exit-Error.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/200825.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/200825.html

鍦ㄧ綉涓婃壘浜嗗緢涔呮墠鎵懼埌developerWorks涓婄殑涓涓В鍐蟲柟妗堬細

鍦ㄥ懡浠ゆ彁紺虹閲屽垏鎹㈠埌鐩綍“C:\Program Files\IBM\SDP70\jdk\jre\bin”錛岃繍琛?#8220;java.exe -Xshareclasses:destroyAll”

榪欐牱灝辮兘姝e父鍚姩RAD浜嗭紒 

鍘熷洜鎻忚堪濡備笅錛?/p>

錛堟憳褰曡嚜http://www-1.ibm.com/support/docview.wss?uid=swg21281393錛屽茍閫氳繃Google Translate杞瘧錛岃瘧鏂囧凡浣滀慨鏀癸級

×××××××××××××××××××××××××××××××××××××

闂錛堟憳瑕侊級
姝よ鏄庤В閲婂浣曡В鍐抽敊璇?#8220;JVM鐨勭粓姝€傞鍑轟唬鐮? 1”銆?br />
璧峰洜
RAD鑷甫鐨処BM JVM浣跨敤浜嗕竴涓珮閫熺紦瀛樺弬鏁版潵鎻愰珮鎬ц兘銆傝屽洜涓篔VM鐨勫穿婧冿紝姣斿钃濆睆錛屾垨鏂數錛岄兘鍙兘閫犳垚Java楂橀熺紦瀛樿鎹熷潖銆?鑰孞VM浼氭嫆緇濊繛鎺ュ埌涓涓崯鍧忕殑楂橀熺紦瀛樸?/p>

瑙e喅闂
瑕佽В鍐寵繖涓棶棰橈紝浣跨敤“-Xshareclasses:destroyAll”鐨凧ava閫夐」灝嗛攢姣佹墍鏈夌殑鍏變韓綰х紦瀛樸傝繖鏄竴縐嶅疄鐢ㄥ伐鍏烽夐」錛屾墍浠ヤ笉浼氬惎鍔↗VM 銆傚鏋滄偍鎯寵榪欎箞鍋氾紝鍙浠庡懡浠ゆ彁紺虹浣跨敤鍙傛暟“-Xshareclasses:destroyAll”鏉ヨ繍琛孯AD浣跨敤鐨刯ava銆?/p>

××××××××××××××××××××××××××××××××××××××



緗楁槑 2008-05-16 11:06 鍙戣〃璇勮
]]>
緙栫▼璋滈 - 2http://www.tkk7.com/Andyluo/archive/2008/05/07/pythonPuzzle2.html緗楁槑緗楁槑Wed, 07 May 2008 08:11:00 GMThttp://www.tkk7.com/Andyluo/archive/2008/05/07/pythonPuzzle2.htmlhttp://www.tkk7.com/Andyluo/comments/198994.htmlhttp://www.tkk7.com/Andyluo/archive/2008/05/07/pythonPuzzle2.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/198994.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/198994.htmlhttp://www.pythonchallenge.com/pc/def/ocr.html
浠庝竴澶у爢涔辯爜涓壘鍑哄彲浠ョ悊瑙g殑淇℃伅錛堝瓧姣嶏級

Java瑙e喅鏂規錛?br />
public class Test {

    
public static void main(String[] args) throws Exception {
        URL url 
= new URL("http://www.pythonchallenge.com"
           + "
/pc/def/ocr.html");
        BufferedReader reader 
= new BufferedReader(new
          
InputStreamReader(url.openStream()));
        StringBuffer sb = new StringBuffer();
        
int i = reader.read();
        
while(i != -1)
        {
            
if((i >= (int)'A' && i <= (int)'Z')
              
|| (i >= (int)'a' && i <= (int)'z'))
            {
                sb.append((
char)i);
            }
            i 
= reader.read();
        }
        reader.close();
        String source 
= sb.toString();
        
       
//欏甸潰婧愮爜涓渶鍚庝竴涓崟璇嶆槸below
        System.out.println(
          
source.substring(source.indexOf("below"+ 5)
        );
    }
}

闄凱ython鍜孲hell錛?br />
Python:
>>> text = """
             <copy and paste>
"""
>>> import string
>>> for i in text:
        
if i in string.ascii_letters:
        
print i,

Shell:
$ curl http://www.pythonchallenge.com/pc/def/ocr.html | grep -o [a-z]


緗楁槑 2008-05-07 16:11 鍙戣〃璇勮
]]>
緙栫▼璋滈1http://www.tkk7.com/Andyluo/archive/2008/05/06/pythonTrick1.html緗楁槑緗楁槑Tue, 06 May 2008 10:02:00 GMThttp://www.tkk7.com/Andyluo/archive/2008/05/06/pythonTrick1.htmlhttp://www.tkk7.com/Andyluo/comments/198768.htmlhttp://www.tkk7.com/Andyluo/archive/2008/05/06/pythonTrick1.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/198768.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/198768.htmlhttp://www.pythonchallenge.com/pc/def/map.html

Java瑙e喅鏂規錛?
 1 public class Test {
 2     public static void main(String[] args) {
 3         String a = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq "
              + "
ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb "
              + "gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq "
              + "qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. "
              + "lmu ynnjw ml rfc spj.";
 4         char[] ac = a.toCharArray();
 5         int zi = (int)'z';
 6         int ai = (int)'a';
 7         for(int index=0; index<ac.length; index++)
 8         {
 9             int aci = (int)ac[index];
10             if(aci >= ai && aci <= zi)
11             {
12                 int aci2 = (int)ac[index] + 2;
13                 
14                 System.out.print((char)((aci2>zi)?(aci2%(zi+1)+ai):aci2));
15             }
16             else
17             {
18                 System.out.print((char)aci);
19             }
20         }
21     }
22 }

闄勪笂Python鍜孲hell瑙e喅鏂規錛?br />
Python:
1 >>> import string
2 >>> text = """g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr
3  amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q
4   ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb.
5  lmu ynnjw ml rfc spj."""
6 >>> table = string.maketrans(
7    string.ascii_lowercase,
8    string.ascii_lowercase[2:]+string.ascii_lowercase[:2])

Shell:
$ tr [a-z] [c-za-b]



緗楁槑 2008-05-06 18:02 鍙戣〃璇勮
]]>
璁㎡SGi鏀寔JSF Web寮鍙?/title><link>http://www.tkk7.com/Andyluo/archive/2007/10/08/jsf-support-in-osgi.html</link><dc:creator>緗楁槑</dc:creator><author>緗楁槑</author><pubDate>Mon, 08 Oct 2007 07:05:00 GMT</pubDate><guid>http://www.tkk7.com/Andyluo/archive/2007/10/08/jsf-support-in-osgi.html</guid><wfw:comment>http://www.tkk7.com/Andyluo/comments/151068.html</wfw:comment><comments>http://www.tkk7.com/Andyluo/archive/2007/10/08/jsf-support-in-osgi.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.tkk7.com/Andyluo/comments/commentRss/151068.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Andyluo/services/trackbacks/151068.html</trackback:ping><description><![CDATA[     鎽樿: 鍦╡quinox鐨凷erver-Side application涓坊鍔燡SF鏀寔  <a href='http://www.tkk7.com/Andyluo/archive/2007/10/08/jsf-support-in-osgi.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/Andyluo/aggbug/151068.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Andyluo/" target="_blank">緗楁槑</a> 2007-10-08 15:05 <a href="http://www.tkk7.com/Andyluo/archive/2007/10/08/jsf-support-in-osgi.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[OSGi]涓轟粈涔堟垜浠渶瑕丅nd錛?/title><link>http://www.tkk7.com/Andyluo/archive/2007/08/26/why-you-need-Bnd.html</link><dc:creator>緗楁槑</dc:creator><author>緗楁槑</author><pubDate>Sun, 26 Aug 2007 14:20:00 GMT</pubDate><guid>http://www.tkk7.com/Andyluo/archive/2007/08/26/why-you-need-Bnd.html</guid><wfw:comment>http://www.tkk7.com/Andyluo/comments/139641.html</wfw:comment><comments>http://www.tkk7.com/Andyluo/archive/2007/08/26/why-you-need-Bnd.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Andyluo/comments/commentRss/139641.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Andyluo/services/trackbacks/139641.html</trackback:ping><description><![CDATA[     鎽樿: 鍒氭敹鍒頒竴涓狦oogle鎻愰啋錛屾槸鍏充簬涓綃囪皥璁篛SGi鐨勫崥瀹㈡枃绔犮傛枃绔犱綔鑰匤illes van Gurp寮綃囦究縐拌禐OSGi錛屼絾闅忎箣鎶ㄥ嚮OSGi鐨勪竴浜涘伐鍏楓備粬涓嶈兘蹇嶅彈鐨勫叧閿紝鍦ㄤ簬闇瑕佹妸鍖呯殑瀵煎叆涓琛屼竴琛岀殑鍔犲埌manifest錛屼粬榪樿涓簃anifest鐨勬牸寮忓緢緋熺硶銆傛垜涓嶅悓鎰忎粬鐨勭湅娉曪紝鍥犱負Bnd瀹屽叏鍙互婊¤凍浠栨彁鍒扮殑闇姹傘?<br>  <a href='http://www.tkk7.com/Andyluo/archive/2007/08/26/why-you-need-Bnd.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/Andyluo/aggbug/139641.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Andyluo/" target="_blank">緗楁槑</a> 2007-08-26 22:20 <a href="http://www.tkk7.com/Andyluo/archive/2007/08/26/why-you-need-Bnd.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>2007 Java Developer's Journal Readers' Choice Awards (zz)http://www.tkk7.com/Andyluo/archive/2007/08/17/JavaDeveloperAwards2007.html緗楁槑緗楁槑Fri, 17 Aug 2007 01:47:00 GMThttp://www.tkk7.com/Andyluo/archive/2007/08/17/JavaDeveloperAwards2007.htmlhttp://www.tkk7.com/Andyluo/comments/137465.htmlhttp://www.tkk7.com/Andyluo/archive/2007/08/17/JavaDeveloperAwards2007.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/137465.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/137465.html闃呰鍏ㄦ枃

緗楁槑 2007-08-17 09:47 鍙戣〃璇勮
]]>
OSGi妗嗘灦瑙勮寖絎?鐗?涔?綆瑕佷粙緇?/title><link>http://www.tkk7.com/Andyluo/archive/2007/06/29/OSGi_Introduction.html</link><dc:creator>緗楁槑</dc:creator><author>緗楁槑</author><pubDate>Fri, 29 Jun 2007 06:18:00 GMT</pubDate><guid>http://www.tkk7.com/Andyluo/archive/2007/06/29/OSGi_Introduction.html</guid><wfw:comment>http://www.tkk7.com/Andyluo/comments/127065.html</wfw:comment><comments>http://www.tkk7.com/Andyluo/archive/2007/06/29/OSGi_Introduction.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Andyluo/comments/commentRss/127065.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Andyluo/services/trackbacks/127065.html</trackback:ping><description><![CDATA[     鎽樿: Eclipse浠?.0鐗堟湰寮濮嬮噰鐢ㄥ熀浜嶰SGi鐨勬彃浠朵綋緋葷粨鏋勩傝繖綃囨枃绔犵畝瑕佷粙緇峅SGi妗嗘灦鐨勫姛鑳芥灦鏋勩侽SGi妗嗘灦鏄疧SGi鏈嶅姟騫沖彴瑙勮寖鐨勬牳蹇冮儴鍒嗐傝妗嗘灦鎻愪緵浜嗕竴涓ぇ浼楀寲錛屽畨鍏紝鍙鐞嗙殑騫沖彴錛屽彲浠ユ敮鎸佸彲鎵╁睍鍙笅杞藉簲鐢ㄦ彃浠剁殑閮ㄧ講錛屾垜浠О榪欎簺搴旂敤鎻掍歡涓築undle銆?nbsp; <a href='http://www.tkk7.com/Andyluo/archive/2007/06/29/OSGi_Introduction.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/Andyluo/aggbug/127065.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Andyluo/" target="_blank">緗楁槑</a> 2007-06-29 14:18 <a href="http://www.tkk7.com/Andyluo/archive/2007/06/29/OSGi_Introduction.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍒舵鎵撳棟鐨勫湡鏂規硶http://www.tkk7.com/Andyluo/archive/2007/05/28/HowToStopDaGe.html緗楁槑緗楁槑Mon, 28 May 2007 15:10:00 GMThttp://www.tkk7.com/Andyluo/archive/2007/05/28/HowToStopDaGe.htmlhttp://www.tkk7.com/Andyluo/comments/120571.htmlhttp://www.tkk7.com/Andyluo/archive/2007/05/28/HowToStopDaGe.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/120571.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/120571.html瑕佸噯澶囩殑涓滀笢錛氫竴鏉竻姘?br>
鏂規硶錛氬惈涓澶у彛姘達紝灝忓彛鍒嗗嬈″悶涓嬶紝鐩磋嚦涓嶆墦鍡濄?錛堜竴鑸袱澶у彛姘撮噺灝卞彲浠ユ悶瀹氾級

PS: 浠g爜瀹炵幇錛?br>

while(鎵撳棟)
{
   
for(int index=0; index<2; index++)
   {
      鍚竴澶у彛姘達紱
      
while錛堝彛涓繕鏈夋按錛?br>      {
         鍚炰竴灝忓彛錛?br>         no sleep錛?br>      }
      no sleep錛?br>   }
   sleep 5縐掞紱
}


緗楁槑 2007-05-28 23:10 鍙戣〃璇勮
]]>
JSP鏍囩浣跨敤鍜岃〃鍗曞弬鏁頒腑鏂囬棶棰樼殑涓浜泂nippetshttp://www.tkk7.com/Andyluo/archive/2007/01/09/tag_encoding_snippets.html緗楁槑緗楁槑Tue, 09 Jan 2007 13:28:00 GMThttp://www.tkk7.com/Andyluo/archive/2007/01/09/tag_encoding_snippets.htmlhttp://www.tkk7.com/Andyluo/comments/92744.htmlhttp://www.tkk7.com/Andyluo/archive/2007/01/09/tag_encoding_snippets.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/92744.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/92744.html聽聽聽聽聽聽聽聽聽鍦ㄣ奐2EE銆嬭紼嬪疄楠岄噷鍐欎簡浜沯sp鍜宻ervlet浠g爜錛屽皢閬囧埌鐨勪竴浜涢棶棰樺拰瑙e喅鏂規硶璐翠笂錛岃嚜宸眒ark涓涓嬄?amp;& 渚涘ぇ瀹跺弬鑰?br />
1銆乯sp:usebean鏍囩涓紝 鑻ュ紩鐢ㄧ殑bean涓嶅瓨鍦紝浼氳嚜鍔ㄨ皟鐢ㄩ粯璁ゆ瀯閫犲櫒鐢熸垚涓涓猨avabean瀹炰緥錛屾墍浠ヤ笉瑕佸湪servlet閲屽啀鐢╯ession.getAttribute鏉ュ垽鏂璪ean鏄惁涓虹┖錛堝洜涓鴻偗瀹氫笉涓虹┖錛夛紝搴旇鍒ゆ柇閲岄潰鐨勫瓧孌墊槸鍚︿負null鎴栦負鍒濆鍖栫姸鎬併?/p>

2銆乯sp:usebean 鐨刢lass灞炴у簲璇ユ槸綾葷殑鍏ㄥ悕錛堝寘鎷寘鍚嶏級銆傚湪鍓嶉潰<%@ import>涓璱mport鐨勫寘錛屽湪tag閲屼笉璧蜂綔鐢紝鍙jsp閲岄潰鐨刯ava浠g爜鏈夌敤錛屾墍浠ag閲岃浣跨敤綾葷殑鍏ㄥ悕

3銆乸ost鏃跺鏋滆〃鍗曢噷鏈変腑鏂囷紝浼氬嚭鐜頒腑鏂囦貢鐮侊紝鍦╯ervlet閲岃皟鐢╮equest.getParameter涔嬪墠鎵цrequest.setCharacterEncoding("gb2312");灝卞彲浠ユ紜瘑鍒拰鏄劇ず涓枃浜嗭紱

濡傛灉鏄痷rl涓敤涓枃鍙傛暟錛屽someaction.jsp?q=涓枃闂錛屽垯瑕佸姞涓涓猣ilter鏉etEncoding錛屽洜涓簆ost鍜実et浼犻佸弬鏁扮殑澶勭悊鏂瑰紡涓嶄竴鏍楓倁rl涓寘鍚腑鏂囧弬鏁扮殑璁劇疆鍙傝冿細http://www.itet.cn/0512456328001529/JSP/0691214511318687.html



緗楁槑 2007-01-09 21:28 鍙戣〃璇勮
]]>
CSS灞炴у垪琛ㄥ強瀵瑰簲鐨凧S DOM灞炴ф槧灝?[ZZ]http://www.tkk7.com/Andyluo/archive/2006/12/09/cssAttributes.html緗楁槑緗楁槑Sat, 09 Dec 2006 13:40:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/12/09/cssAttributes.htmlhttp://www.tkk7.com/Andyluo/comments/86587.htmlhttp://www.tkk7.com/Andyluo/archive/2006/12/09/cssAttributes.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/86587.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/86587.html闃呰鍏ㄦ枃

緗楁槑 2006-12-09 21:40 鍙戣〃璇勮
]]>
涓轟粈涔堢敤PreparedStatement鑰屼笉鏄洿鎺ョ敤"+"榪炴帴SQL璇彞http://www.tkk7.com/Andyluo/archive/2006/11/01/78549.html緗楁槑緗楁槑Wed, 01 Nov 2006 12:18:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/11/01/78549.htmlhttp://www.tkk7.com/Andyluo/comments/78549.htmlhttp://www.tkk7.com/Andyluo/archive/2006/11/01/78549.html#Feedback2http://www.tkk7.com/Andyluo/comments/commentRss/78549.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/78549.html鏈寮濮?鎴戝湪紼嬪簭閲屼嬌鐢⊿QL璁塊棶鏁版嵁搴撴椂錛岄兘鏄洿鎺ョ敤鈥?鈥濆皢瀛楁鍊煎祵鍒癝QL涓偮?

String聽sql聽 = " select聽s.name聽from聽student聽s聽where聽s.id=' " + 聽sId聽 + " ' "錛?/span>


鍚庢潵鎴戝紑濮嬩嬌鐢?strong>PreparedStatement錛屽湪SQL閲屼嬌鐢ㄢ滐紵鈥濇爣璁板弬鏁幫紝鐒跺悗鐢╯etXXX鏂規硶緇欏弬鏁拌祴鍊箋傚綋鏃跺彧鐭ラ亾榪欐牱鐢ㄦ槸鍥犱負鏈?strong>setDate錛宻etTimeStamp榪欎簺鐢ㄢ?鈥濊繛鎺ヤ笉鑳界洿鎺ュ祵鍏ョ殑鍊箋?br />
鎰熻PreparedStatement鍦?strong>鎬ц兘鏂歸潰搴旇涔熻兘蹇偣錛屽彲鑳紻BMS浼氶噸鐢紝浣嗕笉鏄庡簳灞傚師鐞嗐?br />
榪欐銆婃暟鎹簱瀹炵幇銆嬭紼嬬粓浜庤鎴戝紕鎳備簡錛?strong>姣忎釜SQL璇彞閮借閫氳繃 璇硶鍒嗘瀽 -> 鐢熸垚閫昏緫鏌ヨ璁″垝 -> 閫昏緫浼樺寲 -> 鐗╃悊浼樺寲 絳夋楠ょ敓鎴愬叿浣撶殑鎵ц璁″垝錛岀敤PreparedStatement灝卞彲浠ョ敓鎴愪竴涓墽琛岃鍒掞紝浠ュ悗鍙槸鍙傛暟鏀瑰彉錛堢浉褰撲簬鎵ц璁″垝鐨?strong>鎵ц鐜鏀瑰彉錛夛紝鍓嶉潰鐨勫洓涓楠や篃浼?strong>鐪佺暐錛屼粠鑰屾彁楂樹簡鏁堢巼銆?br />
濡傛灉涓涓猄QL璇彞瑕佽鍙嶅澶氭鎵ц錛屾垨澶氱敤鎴峰悓鏃舵搷浣滐紝鍒欏簲閫夌敤PreparedStatement錛?/p>

緗楁槑 2006-11-01 20:18 鍙戣〃璇勮
]]>
紼嬪簭鍛樿嚜鍒涚殑涓棣栨瓕 - "Java EE 5"http://www.tkk7.com/Andyluo/archive/2006/06/30/JavaSong.html緗楁槑緗楁槑Fri, 30 Jun 2006 00:40:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/06/30/JavaSong.htmlhttp://www.tkk7.com/Andyluo/comments/55847.htmlhttp://www.tkk7.com/Andyluo/archive/2006/06/30/JavaSong.html#Feedback2http://www.tkk7.com/Andyluo/comments/commentRss/55847.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/55847.html闃呰鍏ㄦ枃

緗楁槑 2006-06-30 08:40 鍙戣〃璇勮
]]>
瀹炵幇綾諱技select new EntityClass(p.attr1,substring(p.attr2),...) EJB QL鐨勫姛鑳?/title><link>http://www.tkk7.com/Andyluo/archive/2006/05/30/49115.html</link><dc:creator>緗楁槑</dc:creator><author>緗楁槑</author><pubDate>Tue, 30 May 2006 14:03:00 GMT</pubDate><guid>http://www.tkk7.com/Andyluo/archive/2006/05/30/49115.html</guid><wfw:comment>http://www.tkk7.com/Andyluo/comments/49115.html</wfw:comment><comments>http://www.tkk7.com/Andyluo/archive/2006/05/30/49115.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Andyluo/comments/commentRss/49115.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Andyluo/services/trackbacks/49115.html</trackback:ping><description><![CDATA[鍦‥JB3.0浠g爜閲岀洿鎺ョ敤select new EntityClass(p.attr1,substring(p.attr2),...) .....鎶ラ敊錛岃涓嶈兘璇嗗埆鈥?鈥濓紝浼拌灝辨槸substring鍚庨潰鐨勨?鈥濓紝闅鵑亾鏄疎JB QL娌¤繖縐嶈娉曪紵<br /><br />鍦ㄧ綉涓婃壘榪欐牱鐨勪唬鐮佹垨瀹炵幇鏂規硶鏈灉錛屾煡<a class="" title="" target="_blank">EJB 3.0瑙勮寖</a>錛岄噷闈㈡湁涓涓狤JB QL鐨勮寖寮忔弿榪幫紝鍘熸潵鍦≦L閲屽彧鑳藉湪where鏉′歡閲屼嬌鐢ㄥ瓧絎︿覆鍑芥暟錛屽湪select new閲屼及璁℃槸涓嶈浜嗭紝鍚庢潵鎯沖埌<strong>select new 瑕佽皟鐢‥ntityClass鐨勬瀯閫犲嚱鏁版潵鏋勫緩EntityClass瀹炰緥</strong>錛屾墍浠ヨ冭檻鍦‥ntityClass鐨勬瀯閫犳柟娉曢噷璋冪敤substring絳夋柟娉曪紝瀹炶返涔嬶紝鎵ц鎴愬姛錛宮ark錛?br /><br />錛堟枃绔犵煭浜嗙偣錛屼絾濡傛灉鑳借В鍐沖埆浜虹殑闂錛屼篃鏄笉閿欑殑銆俻ost瀹岀戶緇啓紼嬪簭錛宧oho錛?img src ="http://www.tkk7.com/Andyluo/aggbug/49115.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Andyluo/" target="_blank">緗楁槑</a> 2006-05-30 22:03 <a href="http://www.tkk7.com/Andyluo/archive/2006/05/30/49115.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>111涓煡鍚岼ava欏圭洰闆嗛敠錛堝寘鎷瑄rl鍜屾弿榪幫級http://www.tkk7.com/Andyluo/archive/2006/04/15/javaprojects.html緗楁槑緗楁槑Sat, 15 Apr 2006 10:49:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/04/15/javaprojects.htmlhttp://www.tkk7.com/Andyluo/comments/41256.htmlhttp://www.tkk7.com/Andyluo/archive/2006/04/15/javaprojects.html#Feedback8http://www.tkk7.com/Andyluo/comments/commentRss/41256.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/41256.html闃呰鍏ㄦ枃

緗楁槑 2006-04-15 18:49 鍙戣〃璇勮
]]>
濡備綍灝嗗皬鏁拌漿鎹㈡垚鐧懼垎鏁?/title><link>http://www.tkk7.com/Andyluo/archive/2006/03/27/convertToPercent.html</link><dc:creator>緗楁槑</dc:creator><author>緗楁槑</author><pubDate>Mon, 27 Mar 2006 11:48:00 GMT</pubDate><guid>http://www.tkk7.com/Andyluo/archive/2006/03/27/convertToPercent.html</guid><wfw:comment>http://www.tkk7.com/Andyluo/comments/37672.html</wfw:comment><comments>http://www.tkk7.com/Andyluo/archive/2006/03/27/convertToPercent.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Andyluo/comments/commentRss/37672.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Andyluo/services/trackbacks/37672.html</trackback:ping><description><![CDATA[鏈夋湅鍙嬪湪緹ら噷闂簡榪欎釜闂錛屽嵃璞′腑Java娌℃湁榪欐柟闈㈢殑鍑芥暟錛堢櫨鍒嗘暟杞崲涓哄皬鏁板掓槸鏈変竴涓級錛岃屼笖鐩存帴涔樹互100浼氬緱鍑虹被浼?.5999999999鐨勭粨鏋滐紝鍦ㄧ綉涓婁篃娌℃湁鎼滃埌綾諱技鐨勮В鍐蟲柟妗堬紝鎵浠ユ妸鎴戜滑鐨勮璁虹粨鏋滃彂涓婃潵錛岃偗瀹氫笉鏄渶浼樿В錛屼篃甯屾湜鏉ヨ鑰呯暀涓嬩綘浠殑瑙e喅鍔炴硶錛屽彧瑕佽兘浼樺寲鍏朵腑鐨勬煇涓孌靛氨鍙互錛?br /><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: #0000ff">private</span><span style="COLOR: #000000">聽String聽convert(String聽orignal)<br /><img id="Codehighlighter1_39_617_Open_Image" onclick="this.style.display='none'; Codehighlighter1_39_617_Open_Text.style.display='none'; Codehighlighter1_39_617_Closed_Image.style.display='inline'; Codehighlighter1_39_617_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_39_617_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_39_617_Closed_Text.style.display='none'; Codehighlighter1_39_617_Open_Image.style.display='inline'; Codehighlighter1_39_617_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_39_617_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_39_617_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">鍘繪帀灝忔暟鍚庨潰鐨勯浂鍊鹼紝濡傦細0.02500</span><span style="COLOR: #008000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽String聽noDotInteger聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽Integer.parseInt聽聽聽聽(str.replace(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">.</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">''</span><span style="COLOR: #000000">))聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">""</span><span style="COLOR: #000000">;</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">2500</span><span style="COLOR: #008000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽lengthOfZero聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽noDotInteger.length()聽</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">聽noDotInteger.indexOf(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">2</span><span style="COLOR: #008000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽str聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽str.substring(</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">,聽str.length()聽</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">聽lengthOfZero);</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">0.025聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">杞崲鎴愮櫨鍒嗘暟瀛楃涓?/span><span style="COLOR: #008000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">聽index聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽orignal.indexOf(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">.</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(index聽</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">聽orignal.length()聽</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">)<br /><img id="Codehighlighter1_385_515_Open_Image" onclick="this.style.display='none'; Codehighlighter1_385_515_Open_Text.style.display='none'; Codehighlighter1_385_515_Closed_Image.style.display='inline'; Codehighlighter1_385_515_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_385_515_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_385_515_Closed_Text.style.display='none'; Codehighlighter1_385_515_Open_Image.style.display='inline'; Codehighlighter1_385_515_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span id="Codehighlighter1_385_515_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_385_515_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">聽orignal.substring(</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">,index)聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽orignal.substring(index聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">,index聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">3</span><span style="COLOR: #000000">)聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">.</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽orignal.substring(index聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">3</span><span style="COLOR: #000000">)聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span></span><span style="COLOR: #000000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">else</span><span style="COLOR: #000000"><br /><img id="Codehighlighter1_530_615_Open_Image" onclick="this.style.display='none'; Codehighlighter1_530_615_Open_Text.style.display='none'; Codehighlighter1_530_615_Closed_Image.style.display='inline'; Codehighlighter1_530_615_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_530_615_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_530_615_Closed_Text.style.display='none'; Codehighlighter1_530_615_Open_Image.style.display='inline'; Codehighlighter1_530_615_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span id="Codehighlighter1_530_615_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_530_615_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽</span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000">聽orignal.substring(</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">,index)聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽orignal.substring(index聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">)聽</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />聽聽聽聽}</span></span><span style="COLOR: #000000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">聽<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span></div><br />緇細J2ME緇煎悎鎶鏈璁虹兢 鐨勫垬鍐涙彁鍑轟簡浠栫殑瑙e喅鏂規錛?br /><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: #0000ff">import</span><span style="COLOR: #000000">聽java.math.BigDecimal;<br /><img src="http://www.tkk7.com/images/OutliningIndicators/None.gif" align="top" /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000">聽Hello<br /><img id="Codehighlighter1_48_221_Open_Image" onclick="this.style.display='none'; Codehighlighter1_48_221_Open_Text.style.display='none'; Codehighlighter1_48_221_Closed_Image.style.display='inline'; Codehighlighter1_48_221_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" /><img id="Codehighlighter1_48_221_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_48_221_Closed_Text.style.display='none'; Codehighlighter1_48_221_Open_Image.style.display='inline'; Codehighlighter1_48_221_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" /></span><span id="Codehighlighter1_48_221_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_48_221_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽</span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000">聽main(String聽args[])<br /><img id="Codehighlighter1_91_219_Open_Image" onclick="this.style.display='none'; Codehighlighter1_91_219_Open_Text.style.display='none'; Codehighlighter1_91_219_Closed_Image.style.display='inline'; Codehighlighter1_91_219_Closed_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" /><img id="Codehighlighter1_91_219_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_91_219_Closed_Text.style.display='none'; Codehighlighter1_91_219_Open_Image.style.display='inline'; Codehighlighter1_91_219_Open_Text.style.display='inline';" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />聽聽聽聽</span><span id="Codehighlighter1_91_219_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_91_219_Open_Text"><span style="COLOR: #000000">{<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽String聽s聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">0.025</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽BigDecimal聽bd聽</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">聽</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽BigDecimal(s);<br /><img src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" />聽聽聽聽聽聽聽聽System.out.println(bd.multiply(</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000">聽BigDecimal(</span><span style="COLOR: #000000">100</span><span style="COLOR: #000000">)));聽</span><span style="COLOR: #008000">//</span><span style="COLOR: #008000">杈撳嚭2.500</span><span style="COLOR: #008000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" /></span><span style="COLOR: #000000">聽聽聽聽}</span></span><span style="COLOR: #000000"><br /><img src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />}</span></span><span style="COLOR: #000000">聽</span></div><br />灞卞煄嫻瓙鍒欒鐢╦ava.text.DecimalFormat鏈濂芥渶鏂逛究錛?img src ="http://www.tkk7.com/Andyluo/aggbug/37672.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Andyluo/" target="_blank">緗楁槑</a> 2006-03-27 19:48 <a href="http://www.tkk7.com/Andyluo/archive/2006/03/27/convertToPercent.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>J2ME緗戠粶紼嬪簭涓垽鏂竴嬈℃暟鎹彂閫佺殑緇撴潫http://www.tkk7.com/Andyluo/archive/2006/03/19/36103.html緗楁槑緗楁槑Sun, 19 Mar 2006 13:30:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/03/19/36103.htmlhttp://www.tkk7.com/Andyluo/comments/36103.htmlhttp://www.tkk7.com/Andyluo/archive/2006/03/19/36103.html#Feedback3http://www.tkk7.com/Andyluo/comments/commentRss/36103.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/36103.html
濡備笅浠g爜鎵紺猴細

//灝嗘帴鏀跺埌鐨勬暟鎹瓨鍒板瓧鑺傛暟緇刟rray
int聽firstChar聽=聽inputStream.read();
int聽length聽=聽inputStream.available();
byte[]聽array聽=newbyte[length+1];
array[
0]聽=聽(byte)firstChar;
inputStream.read(array,
1,length);


緗楁槑 2006-03-19 21:30 鍙戣〃璇勮
]]>
J2EE寮鍙戣呴夋嫨浣曠AJAX妗嗘灦[杞澆]http://www.tkk7.com/Andyluo/archive/2006/03/04/33565.html緗楁槑緗楁槑Sat, 04 Mar 2006 00:58:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/03/04/33565.htmlhttp://www.tkk7.com/Andyluo/comments/33565.htmlhttp://www.tkk7.com/Andyluo/archive/2006/03/04/33565.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/33565.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/33565.html 鍦ㄤ笅闈㈣繖綃囨枃绔犱腑 http://www.firstpartners.net/blog/technology/2006/03/01/web-20-and-enterprise-java-move-over-struts/ 錛屼綔鑰呬粙緇嶄簡鍑犵甯哥敤鐨凙JAX妗嗘灦銆?/P>

鏈鍚庝綔鑰呬互Struts涓轟緥錛屼粙緇嶄簡鍑犵閫夋嫨Ajax鐨勫満鏅細

1 鐜版湁鐨凷truts搴旂敤紼嬪簭瑕佷嬌鐢ˋjax錛岃浣跨敤AjaxAnywhere

2 寤虹珛鏂扮殑搴旂敤紼嬪簭鍑嗗浣跨敤Ajax錛屽弬鑰傾ppfuse錛屽畠闆嗘垚浜咲WR鐨凙jax

3 涓湡鐩爣錛?浣跨敤涓縐嶆敮鎸丄jax鐨凧SF鐨勫疄鐜幫紝MyFaces鎴栬匰truts Shale

鍘熸枃鍦板潃錛?A >http://blog.csdn.net/danny_xcz/archive/2006/03/03/614302.aspx



緗楁槑 2006-03-04 08:58 鍙戣〃璇勮
]]>
鍦⊿wing搴旂敤涓紓姝ユ墽琛岀嚎紼?/title><link>http://www.tkk7.com/Andyluo/archive/2006/03/02/33236.html</link><dc:creator>緗楁槑</dc:creator><author>緗楁槑</author><pubDate>Thu, 02 Mar 2006 08:09:00 GMT</pubDate><guid>http://www.tkk7.com/Andyluo/archive/2006/03/02/33236.html</guid><wfw:comment>http://www.tkk7.com/Andyluo/comments/33236.html</wfw:comment><comments>http://www.tkk7.com/Andyluo/archive/2006/03/02/33236.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.tkk7.com/Andyluo/comments/commentRss/33236.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Andyluo/services/trackbacks/33236.html</trackback:ping><description><![CDATA[閬垮厤鍥犵嚎紼嬭繍琛岄犳垚Swing鐣岄潰鍋滄鍝嶅簲銆?BR><BR>綾籮avax.swing.SwingUtilities鎻愪緵浜嗕竴浜汼wing宸ュ叿鏂規硶錛?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"><SPAN style="COLOR: #008000">/*</SPAN><SPAN style="COLOR: #008000"> 寮傛鎵цdoRun綰跨▼ </SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR><BR></SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> invokeLater(Runnable doRun) <BR></SPAN></DIV><BR><BR>榪樻湁涓涓悓姝ユ墽琛岀殑錛?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"><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> invokeAndWait(Runnable doRun) </SPAN></DIV><img src ="http://www.tkk7.com/Andyluo/aggbug/33236.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Andyluo/" target="_blank">緗楁槑</a> 2006-03-02 16:09 <a href="http://www.tkk7.com/Andyluo/archive/2006/03/02/33236.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍋氭姤琛ㄦ椂鏌愮涓枃闂鐨勮В鍐蟲柟娉?/title><link>http://www.tkk7.com/Andyluo/archive/2006/02/19/31540.html</link><dc:creator>緗楁槑</dc:creator><author>緗楁槑</author><pubDate>Sun, 19 Feb 2006 12:43:00 GMT</pubDate><guid>http://www.tkk7.com/Andyluo/archive/2006/02/19/31540.html</guid><wfw:comment>http://www.tkk7.com/Andyluo/comments/31540.html</wfw:comment><comments>http://www.tkk7.com/Andyluo/archive/2006/02/19/31540.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Andyluo/comments/commentRss/31540.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Andyluo/services/trackbacks/31540.html</trackback:ping><description><![CDATA[<P>鍒氳В鍐崇殑闂錛?BR><BR>鐢╓ord鐨勭綉欏靛艦寮忓仛鎶ヨ〃鏃墮亣鍒頒腑鏂囦貢鐮侊紝鑰屼笖宸茬粡浣跨敤ISO8859_1瀵逛腑鏂囧弬鏁拌繘琛屼簡杞崲錛岃瘯璇曞皢緗戦〉閲岀殑charset=us-ascii鏀逛負charset=gb2312<BR><BR>鎬庝箞鎴戣繖閲岄粯璁ょ殑charset鏄痷s-ascii鍛紝鎴戣繖鏄腑鏂囩増闃匡紵錛?/P><img src ="http://www.tkk7.com/Andyluo/aggbug/31540.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Andyluo/" target="_blank">緗楁槑</a> 2006-02-19 20:43 <a href="http://www.tkk7.com/Andyluo/archive/2006/02/19/31540.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鐢╳inrar鎴杦inzip鍒朵綔鍙繍琛宩ar鏂囦歡http://www.tkk7.com/Andyluo/archive/2006/02/16/31057.html緗楁槑緗楁槑Thu, 16 Feb 2006 06:49:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/02/16/31057.htmlhttp://www.tkk7.com/Andyluo/comments/31057.htmlhttp://www.tkk7.com/Andyluo/archive/2006/02/16/31057.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/31057.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/31057.html
姝ラ錛?BR> 
1銆佸湪搴旂敤紼嬪簭鏂囦歡鏍圭洰褰曚笅鏂板緩涓涓狹ETA-INF鐩綍錛屽湪璇ョ洰褰曚笅鏂板緩MANIFEST.MF鏂囦歡錛?
鏂囦歡鍐呭涓猴細
1 Main-Class: 鍖呭悕.涓葷被鍚?nbsp;
2 
3 

2銆佸皢搴旂敤紼嬪簭鏍圭洰褰曚笅鎵鏈夋枃浠剁敤winrar鎴杦inzip鎵撳寘錛屾牸寮忎負zip錛?

3銆佸皢zip鏂囦歡鎵╁睍鍚嶆敼涓簀ar 錛?BR>
4銆佸弻鍑籮ar鏂囦歡鍗沖彲榪愯銆?

甯屾湜鑳藉澶у鏈夌偣甯姪銆?img src ="http://www.tkk7.com/Andyluo/aggbug/31057.html" width = "1" height = "1" />

緗楁槑 2006-02-16 14:49 鍙戣〃璇勮
]]>
[澶囦喚from blueline]鍊肩殑鍏蟲敞鐨凧ava寮婧愰」鐩?zz)http://www.tkk7.com/Andyluo/archive/2006/02/16/31019.html緗楁槑緗楁槑Thu, 16 Feb 2006 06:14:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/02/16/31019.htmlhttp://www.tkk7.com/Andyluo/comments/31019.htmlhttp://www.tkk7.com/Andyluo/archive/2006/02/16/31019.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/31019.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/31019.html闃呰鍏ㄦ枃

緗楁槑 2006-02-16 14:14 鍙戣〃璇勮
]]>
[澶囦喚from blueline]鍒╃敤Ant鏉ュ仛Nightly Test錛坺z錛?/title><link>http://www.tkk7.com/Andyluo/archive/2006/02/16/31017.html</link><dc:creator>緗楁槑</dc:creator><author>緗楁槑</author><pubDate>Thu, 16 Feb 2006 06:13:00 GMT</pubDate><guid>http://www.tkk7.com/Andyluo/archive/2006/02/16/31017.html</guid><wfw:comment>http://www.tkk7.com/Andyluo/comments/31017.html</wfw:comment><comments>http://www.tkk7.com/Andyluo/archive/2006/02/16/31017.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Andyluo/comments/commentRss/31017.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Andyluo/services/trackbacks/31017.html</trackback:ping><description><![CDATA[浣跨敤Ant涓殑涓や釜Tasks鏉ュ畬鎴愯嚜鍔ㄨ繍琛孨ightly Test <br /> <br /> <junit printsummary="yes" haltonfailure="yes"><br />     <test name="org.redsoft.forum.AllTests” haltonfailure="no" outfile="result" ><br />         <formatter type="xml" /><br />     </test> <br /> </junit><br /> <br /> 浜х敓涓涓猉ML鏄粨鏋滄姤鍛?br /> 鍐嶅埄鐢↗unitReport鏉ヤ駭鐢熶竴涓彲渚涙祻瑙堢殑緇撴灉鏂囦歡銆?br /> <br /> <junitreport todir="./reports"><br />     <fileset dir="./reports"><br />         <include name="TEST-*.xml"/><br />     </fileset><br />  <report format="frames" todir="./report/html"/><br /> </junitreport><br /> <br /> <img src ="http://www.tkk7.com/Andyluo/aggbug/31017.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Andyluo/" target="_blank">緗楁槑</a> 2006-02-16 14:13 <a href="http://www.tkk7.com/Andyluo/archive/2006/02/16/31017.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[澶囦喚from blueline]闃呰寮婧愰」鐩簮浠g爜錛歸eblechhttp://www.tkk7.com/Andyluo/archive/2006/02/16/31016.html緗楁槑緗楁槑Thu, 16 Feb 2006 06:12:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/02/16/31016.htmlhttp://www.tkk7.com/Andyluo/comments/31016.htmlhttp://www.tkk7.com/Andyluo/archive/2006/02/16/31016.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/31016.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/31016.html
緇勪歡鍥?/a>

綾誨浘

浜嗚В緇撴瀯浜嗗氨寮濮嬬湅鍚э紝go

緗楁槑 2006-02-16 14:12 鍙戣〃璇勮
]]>
[澶囦喚from blueline]鍙戠幇weblech鐨勪竴涓狟ug錛堝綰跨▼錛?/title><link>http://www.tkk7.com/Andyluo/archive/2006/02/16/31013.html</link><dc:creator>緗楁槑</dc:creator><author>緗楁槑</author><pubDate>Thu, 16 Feb 2006 06:10:00 GMT</pubDate><guid>http://www.tkk7.com/Andyluo/archive/2006/02/16/31013.html</guid><wfw:comment>http://www.tkk7.com/Andyluo/comments/31013.html</wfw:comment><comments>http://www.tkk7.com/Andyluo/archive/2006/02/16/31013.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Andyluo/comments/commentRss/31013.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Andyluo/services/trackbacks/31013.html</trackback:ping><description><![CDATA[褰撲笅杞界涓涓猆RL鏃訛紙涓鑸槸緗戠珯涓婚〉錛夛紝濡傛灉絳夊緟鏃墮棿榪囬暱錛岄偅涔堝叾浠栫嚎紼嬭涔堜細璁や負緗戠珯宸蹭笅杞藉畬鑰岀粨鏉燂紝瑕佷箞浼氬湪涓嬮潰鏍?浠g爜澶勬姏鍑?STRONG>NullPointerException, </STRONG>寰堝皯鑳藉瀛樻椿涓嬫潵銆?BR><BR> <DIV style="BORDER-RIGHT: #999999 1px dotted; PADDING-RIGHT: 5px; BORDER-TOP: #999999 1px dotted; PADDING-LEFT: 5px; FONT-SIZE: 11px; PADDING-BOTTOM: 5px; BORDER-LEFT: #999999 1px dotted; WIDTH: 537px; PADDING-TOP: 5px; BORDER-BOTTOM: #999999 1px dotted; FONT-FAMILY: sans-serif; BACKGROUND-COLOR: #f9f9f9" ;> <P>else if(queueSize() == 0)       /* queueSize()宸茬粡琚悓姝?*/<BR>{<BR>    break;<BR>}<BR>URLToDownload nextURL;<BR>synchronized(queue)<BR>{<BR>    nextURL = queue.getNextInQueue();<BR>    downloadsInProgress++;<BR>}<BR>synchronized(urlsDownloading)<BR>{<BR>    urlsDownloading.add(nextURL);<BR>}<BR>int newDepth = nextURL.getDepth() + 1; **********************</P></DIV><BR>浼拌鍙兘鏄嚎紼嬩氦鍙変簡錛岃繕娌℃潵寰楀強鍚屾灝辮窇鍒板悗闈㈠幓鎵цgetDepth()浜嗐?BR>鍦?STRONG>nextURL = queue.getNextInQueue();</STRONG>鍚庨潰鍔犱笂鍒ゆ柇灝監K浜?<BR><BR> <DIV style="BORDER-RIGHT: #999999 1px dotted; PADDING-RIGHT: 5px; BORDER-TOP: #999999 1px dotted; PADDING-LEFT: 5px; FONT-SIZE: 11px; PADDING-BOTTOM: 5px; BORDER-LEFT: #999999 1px dotted; WIDTH: 537px; PADDING-TOP: 5px; BORDER-BOTTOM: #999999 1px dotted; FONT-FAMILY: sans-serif; BACKGROUND-COLOR: #f9f9f9" ;> <P>synchronized(queue)<BR>{<BR>    nextURL = queue.getNextInQueue();<BR><STRONG>    if(nextURL == null)<BR>    {<BR>        continue;<BR>    }</STRONG><BR>    downloadsInProgress++;<BR>}</P></DIV><BR><img src ="http://www.tkk7.com/Andyluo/aggbug/31013.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Andyluo/" target="_blank">緗楁槑</a> 2006-02-16 14:10 <a href="http://www.tkk7.com/Andyluo/archive/2006/02/16/31013.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[澶囦喚from blueline]weblech闃呰蹇冨緱20050501錛圲RL鍒嗙被銆侀摼鎺ュ鐞嗐佽鍙栬祫婧愩佸綰х洰褰曘佸彉閲廌oc銆丩og4j錛?/title><link>http://www.tkk7.com/Andyluo/archive/2006/02/16/31014.html</link><dc:creator>緗楁槑</dc:creator><author>緗楁槑</author><pubDate>Thu, 16 Feb 2006 06:10:00 GMT</pubDate><guid>http://www.tkk7.com/Andyluo/archive/2006/02/16/31014.html</guid><wfw:comment>http://www.tkk7.com/Andyluo/comments/31014.html</wfw:comment><comments>http://www.tkk7.com/Andyluo/archive/2006/02/16/31014.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/Andyluo/comments/commentRss/31014.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/Andyluo/services/trackbacks/31014.html</trackback:ping><description><![CDATA[<p>URL鍒嗗埆鐢ㄤ笁涓狶ist淇濆瓨錛?br /> 涓涓槸boring錛岃繖涓猯ist涓殑url鏈鍚庢潵涓嬭澆<br /> 鍏朵粬涓や釜鏄痠nteresting鍜宎verage<br /> 褰撴悳绱㈠埌url鏃舵鏌ユ槸鍚﹀寘鍚瀹氫負boring鐨勮瘝錛屽茍鏀懼叆boring涓?/p> <p>鐢ㄦ埛鍙瀹?#8220;娣卞害鎼滅儲”錛氭瘡鎼滃埌涓涓猽rl灝辨斁鍦╨ist鐨勬渶鍓嶉潰<br /> 涔熷彲騫垮害</p> <p>鏈変簺緗戦〉閾炬帴瑕佺壒孌婂鐞嗭細</p> <div style="border: 1px dotted #999999; padding: 5px; font-size: 11px; width: 537px; font-family: sans-serif; background-color: #f9f9f9;" ;=""> <p>url = textReplace("?", URLEncoder.encode("?"), url);<br /> url = textReplace("&", URLEncoder.encode("&"), url);<br /> private String textReplace(String find, String replace, String input)<br /> {<br />     int startPos = 0;<br />      while(true)<br />     {<br />         int textPos = input.indexOf(find, startPos);<br />         if(textPos < 0)<br />         {<br />             break;<br />         }<br />         input = input.substring(0, textPos) + replace + input.substring(textPos + find.length());<br />         startPos = textPos + replace.length();<br />     }<br />     return input;<br /> }</p> </div> <p>璇誨彇璧勬簮浠g爜錛?/p> <div style="border: 1px dotted #999999; padding: 5px; font-size: 11px; width: 537px; font-family: sans-serif; background-color: #f9f9f9;" ;=""> <p>BufferedInputStream remoteBIS = new BufferedInputStream(conn.getInputStream());<br /> ByteArrayOutputStream baos = new ByteArrayOutputStream(10240);<br /> byte[] buf = new byte[1024];<br /> int bytesRead = 0;<br /> while(bytesRead >= 0)<br /> {<br />     baos.write(buf, 0, bytesRead);<br />     bytesRead = remoteBIS.read(buf);<br /> }</p> <p>byte[] content = baos.toByteArray();</p> </div> <br /> 寤虹珛澶氱駭鐩綍錛? <div style="border: 1px dotted #999999; padding: 5px; font-size: 11px; width: 537px; font-family: sans-serif; background-color: #f9f9f9;" ;=""> <p>File f = new File(fileName);<br /> f.getParentFile().mkdirs();<br /> FileOutputStream out = new FileOutputStream(fileName);<br /> out.write(content);<br /> out.flush();<br /> out.close();</p> </div> <br /> 緇欎竴涓彉閲忓啓doc錛氾紙鍦╡clipse涓紝榧犳爣緗笂浼氭樉紺猴級 <div style="border: 1px dotted #999999; padding: 5px; font-size: 11px; width: 537px; font-family: sans-serif; background-color: #f9f9f9;" ;=""> <p>/**<br /> * Set of URLs downloaded or scheduled, so we don't download a<br /> * URL more than once.<br /> * Thread safety: To access the set, first synchronize on it.<br /> */<br /> private Set urlsDownloadedOrScheduled;</p> </div> <br /> 榪欑log鎸哄ソ錛氾紙apache log4j錛? <div style="border: 1px dotted #999999; padding: 5px; font-size: 11px; width: 537px; font-family: sans-serif; background-color: #f9f9f9;" ;=""> <p>private final static Category _logClass = Category.getInstance(TextSpider.class);</p> </div> <div style="border: 1px dotted #999999; padding: 5px; font-size: 11px; width: 537px; font-family: sans-serif; background-color: #f9f9f9;" ;=""> <p>/*<br /> 鏄劇ず淇℃伅: 2005-05-01 11:40:44,250 [main] INFO? TextSpider.java:105 - Starting Spider...<br /> */<br /> _logClass.info("Starting Spider...");</p> </div> <img src ="http://www.tkk7.com/Andyluo/aggbug/31014.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/Andyluo/" target="_blank">緗楁槑</a> 2006-02-16 14:10 <a href="http://www.tkk7.com/Andyluo/archive/2006/02/16/31014.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[澶囦喚]鍒濆鍖栨垨娉ㄥ唽璧勬簮http://www.tkk7.com/Andyluo/archive/2006/02/16/31010.html緗楁槑緗楁槑Thu, 16 Feb 2006 06:07:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/02/16/31010.htmlhttp://www.tkk7.com/Andyluo/comments/31010.htmlhttp://www.tkk7.com/Andyluo/archive/2006/02/16/31010.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/31010.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/31010.html渚嬶細

Class.forName("weblech.util.Log4j");

鍦↙og4j閲屽畾涔変竴涓潤鎬佺被鏋勯犲櫒錛岄噷闈㈡斁apache log4j鐨勫垵濮嬩唬鐮併?BR>
鍏朵粬濡傛敞鍐屾暟鎹簮銆佺晫闈㈡湰鍦板寲銆傘傘?BR>
Eclipse鐪嬩唬鐮佹槸鏈鐖界殑錛?BR>鏌ョ湅綾葷殑寮曠敤銆佷唬鐮佸鑸?img src ="http://www.tkk7.com/Andyluo/aggbug/31010.html" width = "1" height = "1" />

緗楁槑 2006-02-16 14:07 鍙戣〃璇勮
]]>
璁捐RIA Web搴旂敤鐨?鏉℃寚瀵煎師鍒?錛堣漿杞斤級http://www.tkk7.com/Andyluo/archive/2006/01/09/27279.html緗楁槑緗楁槑Mon, 09 Jan 2006 09:16:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/01/09/27279.htmlhttp://www.tkk7.com/Andyluo/comments/27279.htmlhttp://www.tkk7.com/Andyluo/archive/2006/01/09/27279.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/27279.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/27279.htmlBill Scott's AJAX Blog: Nine Tips for Designing Rich Internet Applications
If you were going to provide some quick basic guidelines for designing rich applications what would they be?



緗楁槑 2006-01-09 17:16 鍙戣〃璇勮
]]>
Trick: How to access private APIs from a different package (ZZ)http://www.tkk7.com/Andyluo/archive/2006/01/05/26787.html緗楁槑緗楁槑Thu, 05 Jan 2006 13:01:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/01/05/26787.htmlhttp://www.tkk7.com/Andyluo/comments/26787.htmlhttp://www.tkk7.com/Andyluo/archive/2006/01/05/26787.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/26787.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/26787.htmlSource: http://openide.netbeans.org/tutorial/api-design.html#design.less.friend
Allow access only from a friend code
Another useful technique to not expose too much in API is to give access to certain functionality (e. g. ability to instantiate a class or to call a certain method) just to a friend code.

Java by default restricts the friends of a class to those classes that are in the same package. If there is a functionality that you want share just among classes in the same package, use package-private modifier in definition of a constructor, a field or a method and then it will remain accessible only to friends.

Sometimes however it is more useful to extend the set of friends to a wider range of classes - for example one wants to define a pure API package and put the implementation into separate one. In such cases following trick can be found useful. Imagine there is a class item:

public final class api.Item {
    /** Friend only constructor */
    Item(int value) {
        this.value = value;
    }

    /** API method(s) */
    public int getValue() {
        return value;
    }
        
    /** Friend only method */
    final void addListener(Listener l) {
        // some impl
    }
}
that is part of the API, but cannot be instanitated nor listened on outside of the friend classes (but these classes are not only in api package). Then one can define an Accessor in the non-API package:
public abstract class impl.Accessor {
    public static Accessor DEFAULT;

    static {
        // invokes static initializer of Item.class
        // that will assign value to the DEFAULT field above
        Class c = api.Item.class;
        try {
            Class.forName(c.getName(), true, c.getClassLoader());
        } catch (ClassNotFoundException ex) {
            assert false : ex;
        }
        assert DEFAULT != null : "The DEFAULT field must be initialized";
    }

    /** Accessor to constructor */
    public abstract Item newItem(int value);
    /** Accessor to listener */
    public abstract void addListener(Item item, Listener l);
}
with abstract methods to access all friend functionality of the Item class and with a static field to get the accessor's instance. The main trick is to implement the Accessor by a (non-public) class in the api package:
final class api.AccessorImpl extends impl.Accessor {
    public Item newItem(int value) {
        return new Item(value);
    }
    public void addListener(Item item, Listener l) {
        return item.addListener(l);
    }
}
and register it as the default instance first time somebody touches api.Item by adding a static initializer to the Item class:
public final class Item {
    static {
        impl.Accessor.DEFAULT = new api.AccessorImpl();
    }

    // the rest of the Item class as shown above
}
Then the friend code can use the accessor to invoke the hidden functionality from any package:
api.Item item = impl.Accessor.DEFAULT.newItem(10);
impl.Accessor.DEFAULT.addListener(item, this);


緗楁槑 2006-01-05 21:01 鍙戣〃璇勮
]]>
WEB涓熀浜嶺MLHTTP鐨勭畝鍗曞疄渚嬪垎鏋?杞澆)http://www.tkk7.com/Andyluo/archive/2006/01/03/26462.html緗楁槑緗楁槑Tue, 03 Jan 2006 10:59:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/01/03/26462.htmlhttp://www.tkk7.com/Andyluo/comments/26462.htmlhttp://www.tkk7.com/Andyluo/archive/2006/01/03/26462.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/26462.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/26462.html 杞嚜錛?A >http://blog.csdn.net/3cts/archive/2005/12/30/566079.aspx

銆銆寮曡█
銆銆
銆銆澶у閮界煡閬撳彲浠ラ氳繃post鎴栬単et鑾峰緱form琛ㄥ崟鐨勬暟鎹紝閭d箞鎴戜滑濡備綍瀹炵幇涓嶅埛鏂扮殑鎻愪氦鐩存帴鑾峰緱欏甸潰涓婄殑鏁版嵁鍛紵榪欏氨瑕佸熷姪xmlhttp鍗忚浜嗐倄mlhttp鏄痻mldom鎶鏈殑涓閮ㄥ垎銆?BR>銆銆
銆銆涓嬮潰鐨勪唬鐮佸氨鏄竴涓緢綆鍗曠殑渚嬪瓙錛屾垜浠埄鐢▁mlhttp鎶鏈疄鐜扮畝鍗曠殑鐢ㄦ埛鐧婚檰銆?BR>銆銆
銆銆寮濮?/B>
銆銆
銆銆1.綆鍗曠殑鐧誨綍欏甸潰
銆銆
銆銆login.jsp
銆銆function toServer(){
銆銆var xml = "<root>"+
銆銆"<name>"+document.all('name').value+"</name>"+
銆銆"<pwd>"+document.all('pwd').value+"</pwd>"+
銆銆"</root>";
銆銆
銆銆var XMLSender = new ActiveXObject("Microsoft.XMLHTTP" );
銆銆XMLSender.Open("POST",'do_login.jsp',false);
銆銆XMLSender.send((xml));
銆銆alert(XMLSender.responseText);銆//鍙鐞嗗悗鍙拌繑鍥炵殑緇撴灉
銆銆}
銆銆
銆銆濮撳悕錛?lt;input type="text" id="name" /><br>
銆銆瀵嗙爜錛?lt;input type="text" id="pwd" /><br>
銆銆<input type="button" value="鐧誨綍" onclick="toServer()">
銆銆
銆銆2.鍚庡彴鐨勭櫥褰曞鐞嗛〉闈?BR>銆銆do_login.jsp
銆銆
銆銆<%
銆銆//璇誨彇XMLHTTP嫻?BR>銆銆java.io.BufferedReader br =銆request.getReader();
銆銆String str = "";
銆銆while (str != null) {
銆銆str = br.readLine();
銆銆process (str); //鍙氳繃浠諱綍璇█瀹炵幇瑙f瀽XML錛岃繘琛屼笟鍔″鐞?BR>銆銆}
銆銆
銆銆//榪斿洖淇℃伅
銆銆javax.servlet.ServletOutputStream sos = response.getOutputStream();
銆銆sos.print("login success" );
銆銆sos.close();
銆銆%>
銆銆涓庝紶緇熺殑鈥滄彁浜わ紞鍥炲彂錛嶉噸緇樷濆紡鐨剋eb緋葷粺鍩烘湰榪愯緇撴瀯涓嶅悓錛屾垜浠彲浠ラ氳繃閫氳繃XMLHTTP瀹炵幇鏃犲埛鏂扮殑瀹㈡埛绔洿鎺ヤ笌鏈嶅姟鍣ㄤ氦浜掞紝鏋佸ぇ鐨勬彁楂樼敤鎴風殑鎰熷彈搴︺?BR>銆銆
銆銆鏌ヨ冭祫鏂?/B>
銆銆
銆銆XMLHTTP鏂規硶錛?BR>銆銆
銆銆Open bstrMethod, bstrUrl, varAsync, bstrUser, bstrPassword
銆銆bstrMethod錛氭暟鎹紶閫佹柟寮忥紝鍗矴ET鎴朠OST銆?BR>銆銆bstrUrl錛氭湇鍔$綉欏電殑URL銆?BR>銆銆varAsync錛氭槸鍚﹀悓姝ユ墽琛屻傜己鐪佷負True錛屽嵆鍚屾鎵ц錛屼絾鍙兘鍦―OM涓疄鏂藉悓姝ユ墽琛屻?BR>銆銆搴旂敤涓竴鑸皢鍏剁疆涓篎alse錛屽嵆寮傛鎵ц銆?BR>銆銆bstrUser錛氱敤鎴峰悕錛屽彲鐪佺暐銆?BR>銆銆bstrPassword錛氱敤鎴峰彛浠わ紝鍙渷鐣ャ?BR>銆銆
銆銆Send varBody
銆銆varBody錛氭寚浠ら泦銆傚彲浠ユ槸XML鏍煎紡鏁版嵁錛屼篃鍙互鏄瓧絎︿覆錛屾祦錛屾垨鑰呬竴涓棤絎﹀彿鏁存暟鏁扮粍銆備篃鍙互鐪佺暐錛岃鎸囦護閫氳繃Open鏂規硶鐨刄RL鍙傛暟浠e叆銆?BR>銆銆
銆銆setRequestHeader bstrHeader, bstrValue
銆銆bstrHeader錛欻TTP 澶?header)
銆銆bstrValue錛欻TTP 澶?header)鐨勫?BR>銆銆濡傛灉Open鏂規硶瀹氫箟涓篜OST錛屽彲浠ュ畾涔夎〃鍗曟柟寮忎笂浼狅細
銆銆xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
銆銆
銆銆XMLHTTP灞炴э細
銆銆
銆銆onreadystatechange錛氬湪鍚屾鎵ц鏂瑰紡涓嬭幏寰楄繑鍥炵粨鏋滅殑浜嬩歡鍙ユ焺銆傚彧鑳藉湪DOM涓皟鐢ㄣ?BR>銆銆responseBody錛氱粨鏋滆繑鍥炰負鏃犵鍙鋒暣鏁版暟緇勩?BR>銆銆responseStream錛氱粨鏋滆繑鍥炰負IStream嫻併?BR>銆銆responseText 錛氱粨鏋滆繑鍥炰負瀛楃涓層?BR>銆銆responseXML錛氱粨鏋滆繑鍥炰負XML鏍煎紡鏁版嵁銆?/TD>

緗楁槑 2006-01-03 18:59 鍙戣〃璇勮
]]>
The AJAX Year In Review (杞澆)http://www.tkk7.com/Andyluo/archive/2006/01/03/26426.html緗楁槑緗楁槑Tue, 03 Jan 2006 03:42:00 GMThttp://www.tkk7.com/Andyluo/archive/2006/01/03/26426.htmlhttp://www.tkk7.com/Andyluo/comments/26426.htmlhttp://www.tkk7.com/Andyluo/archive/2006/01/03/26426.html#Feedback0http://www.tkk7.com/Andyluo/comments/commentRss/26426.htmlhttp://www.tkk7.com/Andyluo/services/trackbacks/26426.html

  • Content with Style: Fixing the Back Button and Enabling Bookmarking for AJAX Apps - Mike Stenhouse explains how to fix two of the more distracting problems with Ajax. These can be particularly problematic for users new to Ajax applications.  Since Ajax apps typically load into a single web page, it makes pressing the Back button meaningless or actually harmful.  And this breaks the browser usage model annoyingly.  Also, individual views of data in an Ajax application cannot have a URL or permalinks unless precautions are taken.  Mike does a great job covering how to reduce these problems.
  • Saving Session Across Page Loads Without Cookies, On The Client Side - Ajax virtuoso Brad Neuberg strikes again with a detailed explanation of how to deal with saving session information across page loads without relying on cookies.  This is important in larger applications which typically want to store more information than a cookie can hold.  Brad also has some terrific tools to deal with this as well (see AMASS below)
  • Call SOAP Web services with AJAX - By design, Ajax is a voracious consumer of web services like XML/HTTP, REST, and SOAP.  A great article at IBM's DeveloperWorks describes how to easily call SOAP web services from Ajax.  This is important because SOAP is a complex protocol that requires some familiarity to use.  While Ajax development tools like Atlas, General Interface, and Bindows will solve this by providing a SOAP stack, for many, hand development of back-end SOAP request is the only option right now to achieve interoperability with WS-I Basic Profile web services.
  • Ajax using only an image - Browsers and networks continue to get more secure and many configurations will not allow an Ajax application to use web services, and almost none of them will allow you to access a server other than the one the Ajax app loaded from.  Enter an elegant technique to solve this by using image URLs.  Not for the faint of heart, and certainly a possible security hole but a compelling solution nonetheless.

Ajax Tools and Libraries


Note: The most complete Ajax framework listing I've seen available is here.

Ajax News and Resources

Ajax Developer's Journal

  • The Ajax Developer's Journal - Good sources of news for Ajax are still pretty scarce but that's starting to change in a big way.  SYS-CON has recently launched their Ajax Developer's Journal and has been working closely with Jesse James Garrett, who coined the term.  Expect lots of interesting and topical new articles and coverage on a regular basis.
  • Ajaxian - Dion Almaer and Ben Galbraith have been working on Ajaxian for a while now and it remains one of the very best sources for the latest Ajax news, tools, events, and general inspiration.

Critiques and Analysis of Ajax


  • Ajax Mistakes - This is Alex Bosworth's terrific analysis of the early problems with Ajax.  He a big believer in the technology and his Ajax-powered LiveMarks site is one of my absolute favorites.  A good place to start to understand some of the challenges with Ajax.
  • Fixing Ajax: XmlHttpRequest Considered Harmful - Some good coverage of why Ajax doesn't really enable the use of the services of other web sites without a lot of work.  This is a big barrier to leveraging Web 2.0's global services landscape.  This can be solved a number of ways however and the options are explored here.  The image URL solution a few paragraphs above is missing but otherwise this is an excellent summary.

    Ajax Network Constraints


  • 10 Places You Must Use Ajax - Alex is back and carefully enumerates the good places to use Ajax.  He also covers when to avoid it.  Excellent material for those learning how to design with Ajax.
  • Top 10 Reasons Ajax Is Here To Stay - Andre Charland nails it.  Though some folks dislike Ajax for a variety of reasons, here are some terrific positive motivations for using it today.

And don't forget to see what can be done with Ajax!  Check out these great new Ajax-enabled applications here.

posted Friday, 30 December 2005



緗楁槑 2006-01-03 11:42 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 在线视频网址免费播放| 在线播放高清国语自产拍免费| 水蜜桃亚洲一二三四在线| 中文字幕天天躁日日躁狠狠躁免费| 亚洲av专区无码观看精品天堂| 亚洲国产成人在线视频| 色吊丝最新永久免费观看网站| 4hu四虎免费影院www| 亚洲色欲www综合网| 免费观看午夜在线欧差毛片| 99视频在线免费看| 色九月亚洲综合网| 91亚洲导航深夜福利| 免费在线观看一级毛片| 成年人免费的视频| 中国好声音第二季免费播放| 在线亚洲午夜片AV大片| 亚洲女同成av人片在线观看| 免费无码又爽又刺激高潮| 国产精品免费观看调教网| 色多多免费视频观看区一区| 亚洲欧洲日韩综合| 亚洲精品无码mv在线观看网站| 日本一道综合久久aⅴ免费| 一区二区免费视频| 久久久WWW免费人成精品| 亚洲成aⅴ人片久青草影院按摩| 亚洲AV无一区二区三区久久| 国产a级特黄的片子视频免费| www视频免费看| 国产亚洲免费的视频看| 五月天国产成人AV免费观看| 国产成人精品日本亚洲专区6| 亚洲成AV人片在线观看WWW| 四虎精品亚洲一区二区三区| 在线观看人成网站深夜免费| 3344免费播放观看视频 | 亚欧日韩毛片在线看免费网站| 男女男精品网站免费观看 | 120秒男女动态视频免费| 中文永久免费观看网站|