锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲av无码成人精品国产 ,亚洲酒色1314狠狠做,亚洲乱妇老熟女爽到高潮的片http://m.tkk7.com/raymondchen625/Java絎旇zh-cnSun, 11 May 2025 06:01:57 GMTSun, 11 May 2025 06:01:57 GMT60涓嶅悓鏂規硶閬嶅巻鍒楄〃鐨勬椂闂存晥鐜?/title><link>http://m.tkk7.com/raymondchen625/archive/2006/03/03/33423.html</link><dc:creator>Raymond鐨凧ava絎旇</dc:creator><author>Raymond鐨凧ava絎旇</author><pubDate>Fri, 03 Mar 2006 04:00:00 GMT</pubDate><guid>http://m.tkk7.com/raymondchen625/archive/2006/03/03/33423.html</guid><wfw:comment>http://m.tkk7.com/raymondchen625/comments/33423.html</wfw:comment><comments>http://m.tkk7.com/raymondchen625/archive/2006/03/03/33423.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/raymondchen625/comments/commentRss/33423.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/raymondchen625/services/trackbacks/33423.html</trackback:ping><description><![CDATA[鍦↗ava楂樻晥緙栫▼閲岄潰鐪嬪埌鍙橀噺涓涓狝rrayList鐨勬椂鍊欙紝鏈変袱縐嶆柟寮忥細<BR>鍋囪a鏄釜ArrayList<BR><BR>1銆?for (int i=0;i<a.size();i++) {<BR>2銆?for (int i=0,n=a.size();i<n;i++) {<BR><BR>甯︾潃鐐規鐤戞垜鍋氫簡涓涓嬭瘯楠岋紝鐨勭‘鏄柟娉?蹇竴鐐圭殑錛屼及璁℃槸a.size()鏂規硶閲岄潰鑺辮垂浜嗕竴鐐瑰浣欑殑鏃墮棿銆傚悗鏉ユ垜鎯沖埌jdk 1.5寮濮嬭繕鏈変竴縐嶉亶鍘嗙殑for/each鏂規硶錛屾垜鍋氫簡涓涓嬫瘮杈冿紝緇撴灉鏈夌偣鎯婅銆?BR><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: #008080"> 1</SPAN><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> java.util.ArrayList;<BR></SPAN><SPAN style="COLOR: #008080"> 2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080"> 3</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_59_781_Open_Image onclick="this.style.display='none'; Codehighlighter1_59_781_Open_Text.style.display='none'; Codehighlighter1_59_781_Closed_Image.style.display='inline'; Codehighlighter1_59_781_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_59_781_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_59_781_Closed_Text.style.display='none'; Codehighlighter1_59_781_Open_Image.style.display='inline'; Codehighlighter1_59_781_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.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"> ProfileArrayList </SPAN><SPAN id=Codehighlighter1_59_781_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_59_781_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080"> 4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080"> 5</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_103_354_Open_Image onclick="this.style.display='none'; Codehighlighter1_103_354_Open_Text.style.display='none'; Codehighlighter1_103_354_Closed_Image.style.display='inline'; Codehighlighter1_103_354_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_103_354_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_103_354_Closed_Text.style.display='none'; Codehighlighter1_103_354_Open_Image.style.display='inline'; Codehighlighter1_103_354_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.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) </SPAN><SPAN id=Codehighlighter1_103_354_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_103_354_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080"> 6</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    ArrayList</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">String</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> s</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> ArrayList</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">String</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">();<BR></SPAN><SPAN style="COLOR: #008080"> 7</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_184_234_Open_Image onclick="this.style.display='none'; Codehighlighter1_184_234_Open_Text.style.display='none'; Codehighlighter1_184_234_Closed_Image.style.display='inline'; Codehighlighter1_184_234_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_184_234_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_184_234_Closed_Text.style.display='none'; Codehighlighter1_184_234_Open_Image.style.display='inline'; Codehighlighter1_184_234_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000"> (</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">15000</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">) </SPAN><SPAN id=Codehighlighter1_184_234_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_184_234_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080"> 8</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      s.add(</SPAN><SPAN style="COLOR: #000000">""</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">System.currentTimeMillis());<BR></SPAN><SPAN style="COLOR: #008080"> 9</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    System.out.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Start </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    testOne(s);<BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    testTwo(s);<BR></SPAN><SPAN style="COLOR: #008080">13</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    testThree(s);<BR></SPAN><SPAN style="COLOR: #008080">14</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    System.out.println(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">End </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">15</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>  }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">16</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>  <BR></SPAN><SPAN style="COLOR: #008080">17</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_410_511_Open_Image onclick="this.style.display='none'; Codehighlighter1_410_511_Open_Text.style.display='none'; Codehighlighter1_410_511_Closed_Image.style.display='inline'; Codehighlighter1_410_511_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_410_511_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_410_511_Closed_Text.style.display='none'; Codehighlighter1_410_511_Open_Image.style.display='inline'; Codehighlighter1_410_511_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff">private</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"> testOne(ArrayList</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">String</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> a) </SPAN><SPAN id=Codehighlighter1_410_511_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_410_511_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">18</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;String s</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">19</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_472_507_Open_Image onclick="this.style.display='none'; Codehighlighter1_472_507_Open_Text.style.display='none'; Codehighlighter1_472_507_Closed_Image.style.display='inline'; Codehighlighter1_472_507_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_472_507_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_472_507_Closed_Text.style.display='none'; Codehighlighter1_472_507_Open_Image.style.display='inline'; Codehighlighter1_472_507_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000"> (</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">a.size();i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">) </SPAN><SPAN id=Codehighlighter1_472_507_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_472_507_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">20</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      s</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">a.get(i);<BR></SPAN><SPAN style="COLOR: #008080">21</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      j</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">22</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">23</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>  }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">24</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>  <BR></SPAN><SPAN style="COLOR: #008080">25</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_565_675_Open_Image onclick="this.style.display='none'; Codehighlighter1_565_675_Open_Text.style.display='none'; Codehighlighter1_565_675_Closed_Image.style.display='inline'; Codehighlighter1_565_675_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_565_675_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_565_675_Closed_Text.style.display='none'; Codehighlighter1_565_675_Open_Image.style.display='inline'; Codehighlighter1_565_675_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">private</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"> testTwo(ArrayList</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">String</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> a) </SPAN><SPAN id=Codehighlighter1_565_675_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_565_675_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">26</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">27</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    String s</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">28</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_636_671_Open_Image onclick="this.style.display='none'; Codehighlighter1_636_671_Open_Text.style.display='none'; Codehighlighter1_636_671_Closed_Image.style.display='inline'; Codehighlighter1_636_671_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_636_671_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_636_671_Closed_Text.style.display='none'; Codehighlighter1_636_671_Open_Image.style.display='inline'; Codehighlighter1_636_671_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000"> (</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,n</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">a.size();i</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">n;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">) </SPAN><SPAN id=Codehighlighter1_636_671_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_636_671_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">29</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      s</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">a.get(i);<BR></SPAN><SPAN style="COLOR: #008080">30</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>      j</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">31</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">32</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>  }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">33</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">34</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_729_778_Open_Image onclick="this.style.display='none'; Codehighlighter1_729_778_Open_Text.style.display='none'; Codehighlighter1_729_778_Closed_Image.style.display='inline'; Codehighlighter1_729_778_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_729_778_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_729_778_Closed_Text.style.display='none'; Codehighlighter1_729_778_Open_Image.style.display='inline'; Codehighlighter1_729_778_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">private</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"> testThree(ArrayList</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">String</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> a) </SPAN><SPAN id=Codehighlighter1_729_778_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_729_778_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">35</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">36</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_763_776_Open_Image onclick="this.style.display='none'; Codehighlighter1_763_776_Open_Text.style.display='none'; Codehighlighter1_763_776_Closed_Image.style.display='inline'; Codehighlighter1_763_776_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_763_776_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_763_776_Closed_Text.style.display='none'; Codehighlighter1_763_776_Open_Image.style.display='inline'; Codehighlighter1_763_776_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>  </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000"> (String s : a) </SPAN><SPAN id=Codehighlighter1_763_776_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_763_776_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">37</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    j</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">38</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>  }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">39</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">40</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">41</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">42</SPAN><SPAN style="COLOR: #000000"><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN></DIV> <P>閫氳繃Profiling宸ュ叿鐪嬬粨鏋滐細<BR>鏂規硶      榪愯鏃墮棿<BR>testOne   0.055764<BR>testTwo  0.043821<BR>testThres 0.132451<BR><BR>涔熷氨鏄錛宩dk 1.5鐨刦or/each寰幆鏄渶鎱㈢殑銆傛湁鐐逛笉鐩鎬俊銆傚紑澶磋寰楁槸鍥犱負璧嬪奸犳垚鐨勶紝浣嗗悗鏉ュ湪鍙︿袱涓柟娉曢噷闈㈠姞涓婅祴鍊艱鍙ワ紝渚濈劧鏄痜or/each鏈鎱€傛瘮杈冩湁瓚g殑緇撴灉銆?BR><BR>浠庝唬鐮佹竻鏅拌搴︼紝鐢╢or/each娑堣楀涓鐐圭偣鏃墮棿浼間箮涔熸棤鎵璋撱備絾鏄紝鍙︿袱縐嶄唬鐮佷篃涓嶈寰椻滀笉娓呮櫚鈥濓紝鍛靛懙銆傜湅鐫鍔炰簡銆?/P><img src ="http://m.tkk7.com/raymondchen625/aggbug/33423.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/raymondchen625/" target="_blank">Raymond鐨凧ava絎旇</a> 2006-03-03 12:00 <a href="http://m.tkk7.com/raymondchen625/archive/2006/03/03/33423.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>浣跨敤JMeter榪涜鍘嬪姏嫻嬭瘯http://m.tkk7.com/raymondchen625/archive/2006/03/01/32965.htmlRaymond鐨凧ava絎旇Raymond鐨凧ava絎旇Wed, 01 Mar 2006 02:04:00 GMThttp://m.tkk7.com/raymondchen625/archive/2006/03/01/32965.htmlhttp://m.tkk7.com/raymondchen625/comments/32965.htmlhttp://m.tkk7.com/raymondchen625/archive/2006/03/01/32965.html#Feedback0http://m.tkk7.com/raymondchen625/comments/commentRss/32965.htmlhttp://m.tkk7.com/raymondchen625/services/trackbacks/32965.htmlJMeter鏄痑pache鐨刯akarta涓婇潰鐨勯」鐩紝鐢ㄤ簬杞歡鐨勫帇鍔涙祴璇曪紙Load Test錛夛紝涓嶄絾鍙互瀵笻TTP錛屼篃鍙互瀵規暟鎹簱錛堥氳繃JDBC錛夈丗TP銆乄eb Service銆丣ava 瀵硅薄絳夌瓑榪涜鍘嬪姏嫻嬭瘯銆?BR>
欏圭洰鍦板潃錛歨ttp://jakarta.apache.org/jmeter

浣跨敤錛?榪愯bin鐩綍涓嬬殑jmeterw.bat錛岃繍琛宩meter.bat涔熷彲浠ワ紝涓嶈繃灝變細鏈変竴涓懡浠ょ獥鍙f樉紺恒?BR>
瑕佹彁閱掍竴涓嬬殑鏄痡meter鏍規嵁褰撳墠緋葷粺鐨刲ocale鏄劇ず鑿滃崟鐨勮璦錛屼負浜嗘柟渚挎兂璁劇疆鍥炶嫳鏂囩殑璇濓紝鍙互淇敼jmeter.properties鏂囦歡錛岃緗甽anguage=en  錛堟垜涓嬭澆鐨?.1.1鐗堟湰鎶娾滈鍑衡濊璇戜負鈥滄帹鍑衡濓紝鎬庝箞鐪嬮兘涓嶉『鐪?錛?BR>
浣跨敤錛?BR>
JMeter鐨勬祴璇曡鍒掞紙Test Plan錛夊憟鏍戠姸緇撴瀯錛屾爲閲岄潰鏈夊縐嶅厓绱犵被鍨嬶紝鏍戠姸緇撴瀯鐨勫厓绱犱箣闂存湁鐨勬槸鏈夌戶鎵垮叧緋葷殑錛堝叾鍘熺悊鏈夌偣綾諱技log4j錛夈備笅闈㈢畝榪頒竴涓嬪厓绱犵被鍨嬶細

1銆?STRONG>ThreadGroup
      欏懼悕鎬濅箟灝辨槸綰跨▼緇勶紝嫻嬭瘯蹇呴』鏈変竴涓猅hreadGroup鍏冪礌浣滀負鍩虹錛堝惁鍒欏氨娌℃湁嫻嬭瘯綰跨▼鍦ㄨ窇浜嗭級錛岃繖涓厓绱犲彲浠ラ厤緗窇澶氬皯涓嚎紼嬨佹瘡涓嚎紼嬪驚鐜灝戞錛屾墍鏈夌嚎紼嬫暟鐨勬誨惎鍔ㄦ椂闂達紙Ramp-up period錛夌瓑絳夈?BR>
2銆?STRONG>Controller
     鍖呮嫭Logical Controller鍜孲ampler錛屽墠鑰呯敤鏉ヤ綔涓浜涢昏緫涓婄殑鎺у埗錛屼緥濡傝疆鎹€佹潯浠躲佸驚鐜瓑絳夈係ampler灝辨槸鐪熸鈥滃共媧燴濈殑鈥滃彇鏍峰櫒鈥濓紝渚嬪鈥淗TTP Request鈥濓紝灝辨槸鎷挎潵鎵ц涓涓狧TTP璇鋒眰鐨勩?BR>
3銆?STRONG>Listener
    Listener瀵硅姹傝繃紼嬭繘琛岀洃鍚紝鍙互綆鍗曠悊瑙d負鑾峰彇緇撴灉鐨勪笢涓溿備緥濡係imple Data Writer錛屽彲浠ユ妸緇撴灉鍐欏埌涓涓枃鏈枃浠墮噷錛堝叾瀹炴墍鏈塋istener閮藉彲浠ュ啓鏁版嵁鍒版枃浠墮噷錛夛紝榪樻湁View Results in Table錛屽氨鏄妸緇撴灉鏄劇ず鍦ㄨ〃鏍奸噷銆?BR>
4銆?Timer
    鐢ㄦ潵鎺у埗鎵ц嫻佺▼涓殑鏃墮棿寤惰繜絳夊姛鑳姐?BR>
5銆?Assertion
    鏂█錛屽姞鍒癝ampler閲岄潰鍙互瀵硅繑鍥炵殑緇撴灉榪涜鍒ゆ柇錛屼緥濡傚垽鏂璈TTP榪斿洖緇撴灉閲岄潰鏄惁鍚湁鏌愪釜瀛楃涓層傚鏋滄柇璦涓虹湡錛孞Meter浼氭爣璁拌姹備負鎴愬姛錛屽惁鍒欐爣璁頒負澶辮觸銆?BR>
6銆?Configuration Element
   
閰嶇疆鐢ㄧ殑鍏冪礌錛屽緢鏈夌敤銆傜敱浜庢祴璇曡鍒掓槸鏍戠姸鍜屾湁緇ф壙鍏崇郴鐨勶紝鍙互鍦ㄩ珮灞傛鎸囧畾涓涓狢onfiguration Element錛屼綆灞傛鐨勭浉鍏砈ampler濡傛灉娌℃湁鏄懼紡鍦版寚瀹氶厤緗紝灝辯戶鎵塊珮灞傛鐨勯厤緗俊鎭傦紙璺焞og4j寰堝儚鍚э紵錛?BR>
7銆?Pre-Processor/Post-Processor Elements
   鐢ㄦ潵鍦⊿ampler榪愯鍓嶅拰榪愯鍚庝綔涓浜涢澶勭悊鍜屽悗澶勭悊宸ヤ綔鐨勩備緥濡傚姩鎬佷慨鏀硅姹傜殑鍙傛暟錛堥澶勭悊錛夛紝浠庤繑鍥炰俊鎭噷闈㈡彁鍙栦俊鎭紙鍚庡鐞嗭級絳夌瓑銆?BR>
涓句緥錛氳鍋氫竴涓渶綆鍗曠殑HTTP鍘嬪姏嫻嬭瘯錛?鐢?0涓嚎紼嬭闂竴涓猆RL錛屾瘡涓嚎紼嬭闂?00嬈°?BR>鍋氭硶錛?BR>1銆?鍦═est Plan涓嬮潰鍔犱竴涓猅hread Group錛岄厤緗噷闈紝綰跨▼鏁板~10錛屽驚鐜鏁板~100
2銆?鍦═hread Group涓嬮潰鍔犱竴涓狧TTP Request錛岃繖鏄竴涓猄ampler錛屽湪瀹冪殑閰嶇疆閲岄潰濉啓涓繪満淇℃伅錛岀鍙c佸崗璁佽礬寰勩佸弬鏁扮瓑淇℃伅
3銆?鍦℉TTP Request涓嬮潰鍔犱竴涓猇iew Results in Table錛屽鏋滀綘鎯蟲妸璁板綍璁板埌鏂囦歡錛屽垯濉啓鏂囦歡璺緞銆?BR>4銆?淇濆瓨涓浜涜繖涓猅est Plan錛屽氨鍙互閫夋嫨Run鑿滃崟涓嬮潰鐨凴un鏉ヨ繍琛屼簡銆傜洿鍒癛un鑿滃崟欏逛粠鐏拌壊鍙樺洖榛戣壊錛屽氨琛ㄧず榪愯瀹屼簡銆傚湪View Results in Table涓嬮潰錛屼綘鍙互鐪嬪埌榪愯緇撴灉銆?BR>
鍏充簬鍏冪礌鐨勮緇嗘弿榪板彲浠ュ弬鑰?A >瀹樻柟鏂囨。銆?BR>
JMeter鍔熻兘寰堜赴瀵岀殑錛岃繕鏈夊緢寮虹殑鎵╁睍鑳藉姏錛岃屼笖鍙堟槸鍏嶈垂錛屽煎緱鐮旂┒浣跨敤銆?/FONT>


]]>
浣跨敤TPTP鍜宔clipse榪涜Profiling錛堝墫鏋愶級錛嶇畝浠?/title><link>http://m.tkk7.com/raymondchen625/archive/2006/02/27/32637.html</link><dc:creator>Raymond鐨凧ava絎旇</dc:creator><author>Raymond鐨凧ava絎旇</author><pubDate>Mon, 27 Feb 2006 06:14:00 GMT</pubDate><guid>http://m.tkk7.com/raymondchen625/archive/2006/02/27/32637.html</guid><wfw:comment>http://m.tkk7.com/raymondchen625/comments/32637.html</wfw:comment><comments>http://m.tkk7.com/raymondchen625/archive/2006/02/27/32637.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://m.tkk7.com/raymondchen625/comments/commentRss/32637.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/raymondchen625/services/trackbacks/32637.html</trackback:ping><description><![CDATA[<P>鏈枃鍙綔寰堢畝瑕佷粙緇嶏紝鍙浣滃蹇樺弬鑰冦?BR><BR>TPTP鏄痚clipse瀹樻柟鐨刾rofiling鎻掍歡錛屽垵姝ヤ嬌鐢ㄤ笅鎰熻鍔熻兘寮哄ぇ銆?BR><BR>涓嬭澆瀹夎錛?鍦?A >http://www.eclipse.org/tptp/</A>涓嬭澆錛屾垜閫夋嫨All錛峈untime錛岀劧鍚庡儚鍏跺畠鎻掍歡涓鏍瘋В鍘嬪埌eclipse鐨勭洰褰曪紝鐒跺悗鍏佽eclipse -clean鏉ュ埛鏂頒竴鎶娿?BR><BR>浣跨敤錛?nbsp;<BR>   甯哥敤鐨刾rofiling綆鍗曟潵璁插氨瀵圭▼搴忚繍琛岃繘琛岃褰曪紝鐒跺悗浠庢暟鎹腑鍒嗘瀽鍝簺鏂規硶榪愯鏃墮棿闀匡紝鍝簺瀵硅薄鍚冨唴瀛樺錛屽摢浜涚被鐨勫疄渚嬪絳夌瓑銆備竴涓瘮杈冨ソ鐨勪嬌鐢ㄥ叆闂╯ample鍦ㄨ繖閲岋細 <A >http://www.eclipse.org/tptp/home/documents/tutorials/profilingtool/profilingexample_32.html</A> 鎴戝氨涓嶇綏鍡︿簡銆?BR><BR>鍊煎緱澶氳鐨勬槸Remote Profiling錛屽氨鏄繙紼嬪墫鏋愩傚疄鐜扮殑鍘熺悊鏄湪榪滅▼鏈哄櫒涓婅繍琛屼竴涓唬鐞嗚繘紼嬶紝瑕佽榪滅▼鍓栨瀽鐨勭▼搴忔垨鑰匒pplication Server鍚姩鐨勬椂鍊欏姞涓涓狫VM鍙傛暟鏉ヨ瘑鍒繖涓唬鐞嗚繘紼嬶紝涓よ呯浉浜掍綔鐢紝浠g悊灝卞彲浠ユ妸鏀墮泦鍒扮殑淇℃伅鍙戠粰鍦ㄨ繙紼嬬殑涓鏂癸紙灝辨槸榪愯鐫eclipse鐨勪竴鏂癸級銆?BR><BR>鍥犳瑕佸疄鐜癛emote Profiling錛岃繕瑕佸湪鐩爣鏈哄櫒涓婅涓涓猘gent銆?--><BR><BR>涓嬭澆瀹夎錛?A >http://www.eclipse.org/tptp/home/downloads/drops/TPTP-4.0.1.html</A>銆閫夋嫨瀵瑰簲鎿嶄綔緋葷粺鐨?FONT color=#000000><STRONG>Agent Controller</STRONG>涓嬭澆錛岄夋嫨Runtime鍗沖彲銆?BR><BR>涓嬭澆鍚庯紝闃呰渚濈収getting_started.html鐨勮鏄庢潵瀹夎鍗沖彲錛岃繖閲岀畝榪頒竴涓嬶細<BR>1銆?鎶婂畠鐨刡in鐩綍鏀懼埌PATH閲岄潰<BR>2銆?榪愯涓涓婼etConfig鏉ヨ緗弬鏁幫紝娉ㄦ剰濡傛灉鎯寵闄ゆ湰鍦發ocalhost鎰忓鎵浠ユ満鍣ㄩ兘璁塊棶鐨勮瘽錛岃娉ㄦ剰璁劇疆Network Access Mode錛岄粯璁ゆ槸localhost鐨勩?BR>3銆?榪愯RAStart鏉ュ惎鍔ㄤ唬鐞嗭紙Linux涓嬶級<BR>4銆?鏈嶅姟鍣ㄧ紼嬪簭錛堜緥濡倀omcat錛夊惎鍔ㄧ殑JVM鍙傛暟閲岄潰鍔犲叆-XrunpiAgent:server=enabled鍗沖彲錛堣繕鏈夊叾瀹冨弬鏁板煎弬瑙佹枃妗o級<BR>5銆?鐒跺悗灝卞彲浠ュ湪榪滅▼鐢╡clipse鏉ュ惎鍔ㄤ竴涓狿rofiling榪涚▼鏉ttach鍒拌繖涓猘gent controller浜嗐傛晥鏋滃拰鍦╡clipse閲岄潰鐩存帴profile搴旂敤紼嬪簭涓鏍楓?BR><BR></FONT></P><img src ="http://m.tkk7.com/raymondchen625/aggbug/32637.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/raymondchen625/" target="_blank">Raymond鐨凧ava絎旇</a> 2006-02-27 14:14 <a href="http://m.tkk7.com/raymondchen625/archive/2006/02/27/32637.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Volatile Fieldshttp://m.tkk7.com/raymondchen625/archive/2006/02/19/31476.htmlRaymond鐨凧ava絎旇Raymond鐨凧ava絎旇Sun, 19 Feb 2006 07:58:00 GMThttp://m.tkk7.com/raymondchen625/archive/2006/02/19/31476.htmlhttp://m.tkk7.com/raymondchen625/comments/31476.htmlhttp://m.tkk7.com/raymondchen625/archive/2006/02/19/31476.html#Feedback0http://m.tkk7.com/raymondchen625/comments/commentRss/31476.htmlhttp://m.tkk7.com/raymondchen625/services/trackbacks/31476.htmlVolatile Fields

Sometimes, it seems excessive to pay the cost of synchronization just to read or write an instance field or two. After all, what can go wrong? Unfortunately, with modern processors and compilers, there is plenty of room for error:

  • Computers with multiple processors can temporarily hold memory values in registers or local memory caches. As a consequence, threads running in different processors may see different values for the same memory location!

  • Compilers can reorder instructions for maximum throughput. Compilers won't choose an ordering that changes the meaning of the code, but they make the assumption that memory values are only changed when there are explicit instructions in the code. However, a memory value can be changed by another thread!

If you use locks to protect code that can be accessed by multiple threads, then you won't have these problems. Compilers are required to respect locks by flushing local caches as necessary and not inappropriately reordering instructions. The details are explained in the Java Memory Model and Thread Specification developed by JSR 133 (see http://www.jcp.org/en/jsr/detail?id=133). Much of the specification is highly complex and technical, but the document also contains a number of clearly explained examples. A more accessible overview article by Brian Goetz is available at http://www-106.ibm.com/developerworks/java/library/j-jtp02244.html.

NOTE

Brian Goetz coined the following "synchronization motto": "If you write a variable which may next be read by another thread, or you read a variable which may have last been written by another thread, you must use synchronization."


The volatile keyword offers a lock-free mechanism for synchronizing access to an instance field. If you declare a field as volatile, then the compiler and the virtual machine take into account that the field may be concurrently updated by another thread.

For example, suppose an object has a boolean flag done that is set by one thread and queried by another thread. You have two choices:

  1. Use a lock, for example:

    public synchronized boolean isDone() { return done; }
    private boolean done;
    

    (This approach has a potential drawback: the isDone method can block if another thread has locked the object.)

  2. Declare the field as volatile:

    public boolean isDone() { return done; }
    private volatile boolean done;
    

Of course, accessing a volatile variable will be slower than accessing a regular variablethat is the price to pay for thread safety.

NOTE

Prior to JDK 5.0, the semantics of volatile were rather permissive. The language designers attempted to give implementors leeway in optimizing the performance of code that uses volatile fields. However, the old specification was so complex that implementors didn't always follow it, and it allowed confusing and undesirable behavior, such as immutable objects that weren't truly immutable.


In summary, concurrent access to a field is safe in these three conditions:

  • The field is volatile.

  • The field is final, and it is accessed after the constructor has completed.

  • The field access is protected by a lock.



]]>
The Joel Test: 12 Steps to Better Codehttp://m.tkk7.com/raymondchen625/archive/2006/02/17/31303.htmlRaymond鐨凧ava絎旇Raymond鐨凧ava絎旇Fri, 17 Feb 2006 14:02:00 GMThttp://m.tkk7.com/raymondchen625/archive/2006/02/17/31303.htmlhttp://m.tkk7.com/raymondchen625/comments/31303.htmlhttp://m.tkk7.com/raymondchen625/archive/2006/02/17/31303.html#Feedback0http://m.tkk7.com/raymondchen625/comments/commentRss/31303.htmlhttp://m.tkk7.com/raymondchen625/services/trackbacks/31303.html

The Joel Test: 12 Steps to Better Code


By Joel Spolsky
Wednesday, August 09, 2000
Printer Friendly Version

Have you ever heard of SEMA? It's a fairly esoteric system for measuring how good a software team is. No, wait! Don't follow that link! It will take you about six years just to understand that stuff. So I've come up with my own, highly irresponsible, sloppy test to rate the quality of a software team. The great part about it is that it takes about 3 minutes. With all the time you save, you can go to medical school.

The Joel Test

  1. Do you use source control?
  2. Can you make a build in one step?
  3. Do you make daily builds?
  4. Do you have a bug database?
  5. Do you fix bugs before writing new code?
  6. Do you have an up-to-date schedule?
  7. Do you have a spec?
  8. Do programmers have quiet working conditions?
  9. Do you use the best tools money can buy?
  10. Do you have testers?
  11. Do new candidates write code during their interview?
  12. Do you do hallway usability testing?

The neat thing about The Joel Test is that it's easy to get a quick yes or no to each question. You don't have to figure out lines-of-code-per-day or average-bugs-per-inflection-point. Give your team 1 point for each "yes" answer. The bummer about The Joel Test is that you really shouldn't use it to make sure that your nuclear power plant software is safe.

A score of 12 is perfect, 11 is tolerable, but 10 or lower and you've got serious problems. The truth is that most software organizations are running with a score of 2 or 3, and they need serious help, because companies like Microsoft run at 12 full-time. 

Of course, these are not the only factors that determine success or failure: in particular, if you have a great software team working on a product that nobody wants, well, people aren't going to want it. And it's possible to imagine a team of "gunslingers" that doesn't do any of this stuff that still manages to produce incredible software that changes the world. But, all else being equal, if you get these 12 things right, you'll have a disciplined team that can consistently deliver.

1. Do you use source control?
I've used commercial source control packages, and I've used CVS, which is free, and let me tell you, CVS is fine. But if you don't have source control, you're going to stress out trying to get programmers to work together. Programmers have no way to know what other people did. Mistakes can't be rolled back easily. The other neat thing about source control systems is that the source code itself is checked out on every programmer's hard drive -- I've never heard of a project using source control that lost a lot of code.

2. Can you make a build in one step?
By this I mean: how many steps does it take to make a shipping build from the latest source snapshot? On good teams, there's a single script you can run that does a full checkout from scratch, rebuilds every line of code, makes the EXEs, in all their various versions, languages, and #ifdef combinations, creates the installation package, and creates the final media -- CDROM layout, download website, whatever.

If the process takes any more than one step, it is prone to errors. And when you get closer to shipping, you want to have a very fast cycle of fixing the "last" bug, making the final EXEs, etc. If it takes 20 steps to compile the code, run the installation builder, etc., you're going to go crazy and you're going to make silly mistakes.

For this very reason, the last company I worked at switched from WISE to InstallShield: we required that the installation process be able to run, from a script, automatically, overnight, using the NT scheduler, and WISE couldn't run from the scheduler overnight, so we threw it out. (The kind folks at WISE assure me that their latest version does support nightly builds.)

3. Do you make daily builds?
When you're using source control, sometimes one programmer accidentally checks in something that breaks the build. For example, they've added a new source file, and everything compiles fine on their machine, but they forgot to add the source file to the code repository. So they lock their machine and go home, oblivious and happy. But nobody else can work, so they have to go home too, unhappy.

Breaking the build is so bad (and so common) that it helps to make daily builds, to insure that no breakage goes unnoticed. On large teams, one good way to insure that breakages are fixed right away is to do the daily build every afternoon at, say, lunchtime. Everyone does as many checkins as possible before lunch. When they come back, the build is done. If it worked, great! Everybody checks out the latest version of the source and goes on working. If the build failed, you fix it, but everybody can keep on working with the pre-build, unbroken version of the source.

On the Excel team we had a rule that whoever broke the build, as their "punishment", was responsible for babysitting the builds until someone else broke it. This was a good incentive not to break the build, and a good way to rotate everyone through the build process so that everyone learned how it worked. 

Read more about daily builds in my article Daily Builds are Your Friend.

4. Do you have a bug database?
I don't care what you say. If you are developing code, even on a team of one, without an organized database listing all known bugs in the code, you are going to ship low quality code. Lots of programmers think they can hold the bug list in their heads. Nonsense. I can't remember more than two or three bugs at a time, and the next morning, or in the rush of shipping, they are forgotten. You absolutely have to keep track of bugs formally.

Bug databases can be complicated or simple. A minimal useful bug database must include the following data for every bug:

  • complete steps to reproduce the bug
  • expected behavior
  • observed (buggy) behavior
  • who it's assigned to
  • whether it has been fixed or not

If the complexity of bug tracking software is the only thing stopping you from tracking your bugs, just make a simple 5 column table with these crucial fields and start using it.

For more on bug tracking, read Painless Bug Tracking.

5. Do you fix bugs before writing new code?
The very first version of Microsoft Word for Windows was considered a "death march" project. It took forever. It kept slipping. The whole team was working ridiculous hours, the project was delayed again, and again, and again, and the stress was incredible. When the dang thing finally shipped, years late, Microsoft sent the whole team off to Cancun for a vacation, then sat down for some serious soul-searching.

What they realized was that the project managers had been so insistent on keeping to the "schedule" that programmers simply rushed through the coding process, writing extremely bad code, because the bug fixing phase was not a part of the formal schedule. There was no attempt to keep the bug-count down. Quite the opposite. The story goes that one programmer, who had to write the code to calculate the height of a line of text, simply wrote "return 12;" and waited for the bug report to come in about how his function is not always correct. The schedule was merely a checklist of features waiting to be turned into bugs. In the post-mortem, this was referred to as "infinite defects methodology".

To correct the problem, Microsoft universally adopted something called a "zero defects methodology". Many of the programmers in the company giggled, since it sounded like management thought they could reduce the bug count by executive fiat. Actually, "zero defects" meant that at any given time, the highest priority is to eliminate bugs before writing any new code. Here's why. 

In general, the longer you wait before fixing a bug, the costlier (in time and money) it is to fix.

For example, when you make a typo or syntax error that the compiler catches, fixing it is basically trivial.

When you have a bug in your code that you see the first time you try to run it, you will be able to fix it in no time at all, because all the code is still fresh in your mind.

If you find a bug in some code that you wrote a few days ago, it will take you a while to hunt it down, but when you reread the code you wrote, you'll remember everything and you'll be able to fix the bug in a reasonable amount of time.

But if you find a bug in code that you wrote a few months ago, you'll probably have forgotten a lot of things about that code, and it's much harder to fix. By that time you may be fixing somebody else's code, and they may be in Aruba on vacation, in which case, fixing the bug is like science: you have to be slow, methodical, and meticulous, and you can't be sure how long it will take to discover the cure.

And if you find a bug in code that has already shipped, you're going to incur incredible expense getting it fixed.

That's one reason to fix bugs right away: because it takes less time. There's another reason, which relates to the fact that it's easier to predict how long it will take to write new code than to fix an existing bug. For example, if I asked you to predict how long it would take to write the code to sort a list, you could give me a pretty good estimate. But if I asked you how to predict how long it would take to fix that bug where your code doesn't work if Internet Explorer 5.5 is installed, you can't even guess, because you don't know (by definition) what's causing the bug. It could take 3 days to track it down, or it could take 2 minutes.

What this means is that if you have a schedule with a lot of bugs remaining to be fixed, the schedule is unreliable. But if you've fixed all the known bugs, and all that's left is new code, then your schedule will be stunningly more accurate.

Another great thing about keeping the bug count at zero is that you can respond much faster to competition. Some programmers think of this as keeping the product ready to ship at all times. Then if your competitor introduces a killer new feature that is stealing your customers, you can implement just that feature and ship on the spot, without having to fix a large number of accumulated bugs.

6. Do you have an up-to-date schedule?
Which brings us to schedules. If your code is at all important to the business, there are lots of reasons why it's important to the business to know when the code is going to be done. Programmers are notoriously crabby about making schedules. "It will be done when it's done!" they scream at the business people.

Unfortunately, that just doesn't cut it. There are too many planning decisions that the business needs to make well in advance of shipping the code: demos, trade shows, advertising, etc. And the only way to do this is to have a schedule, and to keep it up to date.

The other crucial thing about having a schedule is that it forces you to decide what features you are going to do, and then it forces you to pick the least important features and cut them rather than slipping into featuritis (a.k.a. scope creep).

Keeping schedules does not have to be hard. Read my article Painless Software Schedules, which describes a simple way to make great schedules.

7. Do you have a spec?
Writing specs is like flossing: everybody agrees that it's a good thing, but nobody does it. 

I'm not sure why this is, but it's probably because most programmers hate writing documents. As a result, when teams consisting solely of programmers attack a problem, they prefer to express their solution in code, rather than in documents. They would much rather dive in and write code than produce a spec first.

At the design stage, when you discover problems, you can fix them easily by editing a few lines of text. Once the code is written, the cost of fixing problems is dramatically higher, both emotionally (people hate to throw away code) and in terms of time, so there's resistance to actually fixing the problems. Software that wasn't built from a spec usually winds up badly designed and the schedule gets out of control.  This seems to have been the problem at Netscape, where the first four versions grew into such a mess that management stupidly decided to throw out the code and start over. And then they made this mistake all over again with Mozilla, creating a monster that spun out of control and took several years to get to alpha stage.

My pet theory is that this problem can be fixed by teaching programmers to be less reluctant writers by sending them off to take an intensive course in writing. Another solution is to hire smart program managers who produce the written spec. In either case, you should enforce the simple rule "no code without spec".

Learn all about writing specs by reading my 4-part series.

8. Do programmers have quiet working conditions?
There are extensively documented productivity gains provided by giving knowledge workers space, quiet, and privacy. The classic software management book Peopleware documents these productivity benefits extensively.

Here's the trouble. We all know that knowledge workers work best by getting into "flow", also known as being "in the zone", where they are fully concentrated on their work and fully tuned out of their environment. They lose track of time and produce great stuff through absolute concentration. This is when they get all of their productive work done. Writers, programmers, scientists, and even basketball players will tell you about being in the zone.

The trouble is, getting into "the zone" is not easy. When you try to measure it, it looks like it takes an average of 15 minutes to start working at maximum productivity. Sometimes, if you're tired or have already done a lot of creative work that day, you just can't get into the zone and you spend the rest of your work day fiddling around, reading the web, playing Tetris.

The other trouble is that it's so easy to get knocked out of the zone. Noise, phone calls, going out for lunch, having to drive 5 minutes to Starbucks for coffee, and interruptions by coworkers -- especially interruptions by coworkers -- all knock you out of the zone. If a coworker asks you a question, causing a 1 minute interruption, but this knocks you out of the zone badly enough that it takes you half an hour to get productive again, your overall productivity is in serious trouble. If you're in a noisy bullpen environment like the type that caffeinated dotcoms love to create, with marketing guys screaming on the phone next to programmers, your productivity will plunge as knowledge workers get interrupted time after time and never get into the zone.

With programmers, it's especially hard. Productivity depends on being able to juggle a lot of little details in short term memory all at once. Any kind of interruption can cause these details to come crashing down. When you resume work, you can't remember any of the details (like local variable names you were using, or where you were up to in implementing that search algorithm) and you have to keep looking these things up, which slows you down a lot until you get back up to speed.

Here's the simple algebra. Let's say (as the evidence seems to suggest) that if we interrupt a programmer, even for a minute, we're really blowing away 15 minutes of productivity. For this example, lets put two programmers, Jeff and Mutt, in open cubicles next to each other in a standard Dilbert veal-fattening farm. Mutt can't remember the name of the Unicode version of the strcpy function. He could look it up, which takes 30 seconds, or he could ask Jeff, which takes 15 seconds. Since he's sitting right next to Jeff, he asks Jeff. Jeff gets distracted and loses 15 minutes of productivity (to save Mutt 15 seconds).

Now let's move them into separate offices with walls and doors. Now when Mutt can't remember the name of that function, he could look it up, which still takes 30 seconds, or he could ask Jeff, which now takes 45 seconds and involves standing up (not an easy task given the average physical fitness of programmers!). So he looks it up. So now Mutt loses 30 seconds of productivity, but we save 15 minutes for Jeff. Ahhh!

9. Do you use the best tools money can buy?
Writing code in a compiled language is one of the last things that still can't be done instantly on a garden variety home computer. If your compilation process takes more than a few seconds, getting the latest and greatest computer is going to save you time. If compiling takes even 15 seconds, programmers will get bored while the compiler runs and switch over to reading The Onion, which will suck them in and kill hours of productivity.

Debugging GUI code with a single monitor system is painful if not impossible. If you're writing GUI code, two monitors will make things much easier.

Most programmers eventually have to manipulate bitmaps for icons or toolbars, and most programmers don't have a good bitmap editor available. Trying to use Microsoft Paint to manipulate bitmaps is a joke, but that's what most programmers have to do.

At my last job, the system administrator kept sending me automated spam complaining that I was using more than ... get this ... 220 megabytes of hard drive space on the server. I pointed out that given the price of hard drives these days, the cost of this space was significantly less than the cost of the toilet paper I used. Spending even 10 minutes cleaning up my directory would be a fabulous waste of productivity.

Top notch development teams don't torture their programmers. Even minor frustrations caused by using underpowered tools add up, making programmers grumpy and unhappy. And a grumpy programmer is an unproductive programmer.

To add to all this... programmers are easily bribed by giving them the coolest, latest stuff. This is a far cheaper way to get them to work for you than actually paying competitive salaries!

10. Do you have testers?
If your team doesn't have dedicated testers, at least one for every two or three programmers, you are either shipping buggy products, or you're wasting money by having $100/hour programmers do work that can be done by $30/hour testers. Skimping on testers is such an outrageous false economy that I'm simply blown away that more people don't recognize it.

Read Top Five (Wrong) Reasons You Don't Have Testers, an article I wrote about this subject.

11. Do new candidates write code during their interview?
Would you hire a magician without asking them to show you some magic tricks? Of course not.

Would you hire a caterer for your wedding without tasting their food? I doubt it. (Unless it's Aunt Marge, and she would hate you forever if you didn't let her make her "famous" chopped liver cake).

Yet, every day, programmers are hired on the basis of an impressive resum茅 or because the interviewer enjoyed chatting with them. Or they are asked trivia questions ("what's the difference between CreateDialog() and DialogBox()?") which could be answered by looking at the documentation. You don't care if they have memorized thousands of trivia about programming, you care if they are able to produce code. Or, even worse, they are asked "AHA!" questions: the kind of questions that seem easy when you know the answer, but if you don't know the answer, they are impossible.

Please, just stop doing this. Do whatever you want during interviews, but make the candidate write some code. (For more advice, read my Guerrilla Guide to Interviewing.)

12. Do you do hallway usability testing?
A hallway usability test is where you grab the next person that passes by in the hallway and force them to try to use the code you just wrote. If you do this to five people, you will learn 95% of what there is to learn about usability problems in your code.

Good user interface design is not as hard as you would think, and it's crucial if you want customers to love and buy your product. You can read my free online book on UI design, a short primer for programmers.

But the most important thing about user interfaces is that if you show your program to a handful of people, (in fact, five or six is enough) you will quickly discover the biggest problems people are having. Read Jakob Nielsen's article explaining why. Even if your UI design skills are lacking, as long as you force yourself to do hallway usability tests, which cost nothing, your UI will be much, much better.

Four Ways To Use The Joel Test

  1. Rate your own software organization, and tell me how it rates, so I can gossip.
  2. If you're the manager of a programming team, use this as a checklist to make sure your team is working as well as possible. When you start rating a 12, you can leave your programmers alone and focus full time on keeping the business people from bothering them.
  3. If you're trying to decide whether to take a programming job, ask your prospective employer how they rate on this test. If it's too low, make sure that you'll have the authority to fix these things. Otherwise you're going to be frustrated and unproductive.
  4. If you're an investor doing due diligence to judge the value of a programming team, or if your software company is considering merging with another, this test can provide a quick rule of thumb.


]]>
鍦╨ucene瀹炵幇鎸夊叧閿瓧鍑虹幇嬈℃暟鎺掑簭鐨勫垪琛?/title><link>http://m.tkk7.com/raymondchen625/archive/2006/02/04/29526.html</link><dc:creator>Raymond鐨凧ava絎旇</dc:creator><author>Raymond鐨凧ava絎旇</author><pubDate>Sat, 04 Feb 2006 06:26:00 GMT</pubDate><guid>http://m.tkk7.com/raymondchen625/archive/2006/02/04/29526.html</guid><wfw:comment>http://m.tkk7.com/raymondchen625/comments/29526.html</wfw:comment><comments>http://m.tkk7.com/raymondchen625/archive/2006/02/04/29526.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/raymondchen625/comments/commentRss/29526.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/raymondchen625/services/trackbacks/29526.html</trackback:ping><description><![CDATA[闇姹傦細 鍦╨ucene绱㈠紩涓緩绔嬩簡寰堝鍏抽敭瀛楃殑绱㈠紩錛屾兂鑾峰緱涓涓綋鍓嶇敤鎴風殑鍏抽敭瀛楀垪琛紝騫朵笖姣忎釜鍏抽敭瀛楄繕甯︽湁浣跨敤浜嗗灝戞鐨勪俊鎭?BR><BR>瑙e喅鏂規硶錛?BR>浣跨敤鑷畾涔夌殑HitCollector瀵硅薄錛屼唬鐮佸涓? <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://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> java.io.IOException;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> java.util.ArrayList;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> java.util.Collections;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> java.util.HashMap;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> java.util.Iterator;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> java.util.Set;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> org.apache.lucene.document.Document;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> org.apache.lucene.search.HitCollector;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000"> org.apache.lucene.search.IndexSearcher;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top><BR><IMG id=Codehighlighter1_347_1561_Open_Image onclick="this.style.display='none'; Codehighlighter1_347_1561_Open_Text.style.display='none'; Codehighlighter1_347_1561_Closed_Image.style.display='inline'; Codehighlighter1_347_1561_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_347_1561_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_347_1561_Closed_Text.style.display='none'; Codehighlighter1_347_1561_Open_Image.style.display='inline'; Codehighlighter1_347_1561_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.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"> TagCollector </SPAN><SPAN style="COLOR: #0000ff">extends</SPAN><SPAN style="COLOR: #000000"> HitCollector </SPAN><SPAN id=Codehighlighter1_347_1561_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_347_1561_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000"> IndexSearcher searcher;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000"> HashMap</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">String,Integer</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> tagList</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> HashMap</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">String,Integer</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">();<BR><IMG id=Codehighlighter1_499_528_Open_Image onclick="this.style.display='none'; Codehighlighter1_499_528_Open_Text.style.display='none'; Codehighlighter1_499_528_Closed_Image.style.display='inline'; Codehighlighter1_499_528_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_499_528_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_499_528_Closed_Text.style.display='none'; Codehighlighter1_499_528_Open_Image.style.display='inline'; Codehighlighter1_499_528_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> TagCollector(IndexSearcher searcher) </SPAN><SPAN id=Codehighlighter1_499_528_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_499_528_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">this</SPAN><SPAN style="COLOR: #000000">.searcher</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">searcher;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    @Override<BR><IMG id=Codehighlighter1_586_847_Open_Image onclick="this.style.display='none'; Codehighlighter1_586_847_Open_Text.style.display='none'; Codehighlighter1_586_847_Closed_Image.style.display='inline'; Codehighlighter1_586_847_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_586_847_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_586_847_Closed_Text.style.display='none'; Codehighlighter1_586_847_Open_Image.style.display='inline'; Codehighlighter1_586_847_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> collect(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> docID, </SPAN><SPAN style="COLOR: #0000ff">float</SPAN><SPAN style="COLOR: #000000"> score) </SPAN><SPAN id=Codehighlighter1_586_847_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_586_847_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_594_791_Open_Image onclick="this.style.display='none'; Codehighlighter1_594_791_Open_Text.style.display='none'; Codehighlighter1_594_791_Closed_Image.style.display='inline'; Codehighlighter1_594_791_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_594_791_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_594_791_Closed_Text.style.display='none'; Codehighlighter1_594_791_Open_Image.style.display='inline'; Codehighlighter1_594_791_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN id=Codehighlighter1_594_791_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_594_791_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>            Document doc</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">searcher.doc(docID);<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>            String[] tagValues</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">doc.getValues(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">tag</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR><IMG id=Codehighlighter1_701_787_Open_Image onclick="this.style.display='none'; Codehighlighter1_701_787_Open_Text.style.display='none'; Codehighlighter1_701_787_Closed_Image.style.display='inline'; Codehighlighter1_701_787_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_701_787_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_701_787_Closed_Text.style.display='none'; Codehighlighter1_701_787_Open_Image.style.display='inline'; Codehighlighter1_701_787_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>            </SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000"> (tagValues</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">) </SPAN><SPAN id=Codehighlighter1_701_787_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_701_787_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG id=Codehighlighter1_744_782_Open_Image onclick="this.style.display='none'; Codehighlighter1_744_782_Open_Text.style.display='none'; Codehighlighter1_744_782_Closed_Image.style.display='inline'; Codehighlighter1_744_782_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_744_782_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_744_782_Closed_Text.style.display='none'; Codehighlighter1_744_782_Open_Image.style.display='inline'; Codehighlighter1_744_782_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>                </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000"> (</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">tagValues.length;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">) </SPAN><SPAN id=Codehighlighter1_744_782_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_744_782_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>                    addTagCount(tagValues[i]);<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>                }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>            }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG id=Codehighlighter1_815_843_Open_Image onclick="this.style.display='none'; Codehighlighter1_815_843_Open_Text.style.display='none'; Codehighlighter1_815_843_Closed_Image.style.display='inline'; Codehighlighter1_815_843_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_815_843_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_815_843_Closed_Text.style.display='none'; Codehighlighter1_815_843_Open_Image.style.display='inline'; Codehighlighter1_815_843_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        }</SPAN></SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000"> (IOException e) </SPAN><SPAN id=Codehighlighter1_815_843_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_815_843_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>            e.printStackTrace();<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    <BR><IMG id=Codehighlighter1_893_1025_Open_Image onclick="this.style.display='none'; Codehighlighter1_893_1025_Open_Text.style.display='none'; Codehighlighter1_893_1025_Closed_Image.style.display='inline'; Codehighlighter1_893_1025_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_893_1025_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_893_1025_Closed_Text.style.display='none'; Codehighlighter1_893_1025_Open_Image.style.display='inline'; Codehighlighter1_893_1025_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> addTagCount(String tagName) </SPAN><SPAN id=Codehighlighter1_893_1025_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_893_1025_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> count</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">;<BR><IMG id=Codehighlighter1_946_992_Open_Image onclick="this.style.display='none'; Codehighlighter1_946_992_Open_Text.style.display='none'; Codehighlighter1_946_992_Closed_Image.style.display='inline'; Codehighlighter1_946_992_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_946_992_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_946_992_Closed_Text.style.display='none'; Codehighlighter1_946_992_Open_Image.style.display='inline'; Codehighlighter1_946_992_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000"> (tagList.containsKey(tagName)) </SPAN><SPAN id=Codehighlighter1_946_992_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_946_992_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>            count</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">(Integer)tagList.get(tagName)</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>        tagList.put(tagName,count);<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    <BR><IMG id=Codehighlighter1_1074_1095_Open_Image onclick="this.style.display='none'; Codehighlighter1_1074_1095_Open_Text.style.display='none'; Codehighlighter1_1074_1095_Closed_Image.style.display='inline'; Codehighlighter1_1074_1095_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1074_1095_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1074_1095_Closed_Text.style.display='none'; Codehighlighter1_1074_1095_Open_Image.style.display='inline'; Codehighlighter1_1074_1095_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> HashMap</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">String,Integer</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> getTagList() </SPAN><SPAN id=Codehighlighter1_1074_1095_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1074_1095_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> tagList;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    <BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    @SuppressWarnings(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">unchecked</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_1197_1556_Open_Image onclick="this.style.display='none'; Codehighlighter1_1197_1556_Open_Text.style.display='none'; Codehighlighter1_1197_1556_Closed_Image.style.display='inline'; Codehighlighter1_1197_1556_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1197_1556_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1197_1556_Closed_Text.style.display='none'; Codehighlighter1_1197_1556_Open_Image.style.display='inline'; Codehighlighter1_1197_1556_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>    </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> ArrayList</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">TagSummary</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> getSortedTagList(</SPAN><SPAN style="COLOR: #0000ff">boolean</SPAN><SPAN style="COLOR: #000000"> ascending) </SPAN><SPAN id=Codehighlighter1_1197_1556_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1197_1556_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>        ArrayList</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">TagSummary</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000"> list</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> ArrayList</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">TagSummary</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">();<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>        Iterator keyIterator</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">tagList.keySet().iterator();<BR><IMG id=Codehighlighter1_1341_1458_Open_Image onclick="this.style.display='none'; Codehighlighter1_1341_1458_Open_Text.style.display='none'; Codehighlighter1_1341_1458_Closed_Image.style.display='inline'; Codehighlighter1_1341_1458_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1341_1458_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1341_1458_Closed_Text.style.display='none'; Codehighlighter1_1341_1458_Open_Image.style.display='inline'; Codehighlighter1_1341_1458_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000"> (keyIterator.hasNext()) </SPAN><SPAN id=Codehighlighter1_1341_1458_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1341_1458_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>            String key</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">(String)keyIterator.next();<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>            </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> value</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">tagList.get(key);<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>            list.add(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> TagSummary(key,value));<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>        Collections.sort(list);<BR><IMG id=Codehighlighter1_1504_1538_Open_Image onclick="this.style.display='none'; Codehighlighter1_1504_1538_Open_Text.style.display='none'; Codehighlighter1_1504_1538_Closed_Image.style.display='inline'; Codehighlighter1_1504_1538_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1504_1538_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1504_1538_Closed_Text.style.display='none'; Codehighlighter1_1504_1538_Open_Image.style.display='inline'; Codehighlighter1_1504_1538_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000"> (</SPAN><SPAN style="COLOR: #000000">!</SPAN><SPAN style="COLOR: #000000">ascending) </SPAN><SPAN id=Codehighlighter1_1504_1538_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://m.tkk7.com/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1504_1538_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>            Collections.reverse(list);<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>        }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>        </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> list;<BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>    }</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top>    <BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align=top><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align=top></SPAN></DIV>鍔熻兘璇存槑錛?姣忎釜鎼滅儲鍒扮殑hits錛岄兘浼氳皟鐢ㄨ繖涓柟娉曠殑collect鏂規硶錛屽洜姝ゅ彲浠ュ湪榪欎釜瀵硅薄褰撲腑鏀句竴涓狧ashMap錛岀瘡璁¤褰曟瘡涓叧閿瓧寰楀埌鐨勬鏁般?BR><BR>鎺掑簭閮ㄥ垎鐢ㄥ彟澶栫殑涓涓猅agSummary綾繪潵鑾峰緱錛岃繖閲屽氨涓嶈緇嗙粰鍑轟簡銆?BR><BR>闂錛?榪欐槸涓涓洿瑙傜殑鏂規硶錛屼絾鏄浉淇¢綣佽皟鐢ㄨ繖鏍風殑鏂規硶浼氶犳垚鏈嶅姟鍣ㄧ殑涓ラ噸璐熸媴銆傚彲浠ヨ冭檻涓涓嬬敤緙撳瓨鐨勬柟娉曪紝鍦ㄦ病鏈夊叧閿瓧鏈浘鍙戠敓鏀瑰彉涔嬪墠錛屽彧鍦ㄧ涓嬈¤皟鐢ㄨ繖鏍風殑鏂規硶錛屼箣鍚庢妸緇撴灉緙撳瓨鍦ㄦ暟鎹〃鎴栬呭唴瀛樺綋涓傛湁鏇存柊鐨勬椂鍊欙紝閫氳繃鐗堟湰鍙峰姣斾互鍐沖畾鏄惁闇瑕佹洿鏂般?img src ="http://m.tkk7.com/raymondchen625/aggbug/29526.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/raymondchen625/" target="_blank">Raymond鐨凧ava絎旇</a> 2006-02-04 14:26 <a href="http://m.tkk7.com/raymondchen625/archive/2006/02/04/29526.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Resin + Struts 鐨勪腑鏂囦貢鐮侀棶棰樿В鍐?/title><link>http://m.tkk7.com/raymondchen625/archive/2006/01/19/28708.html</link><dc:creator>Raymond鐨凧ava絎旇</dc:creator><author>Raymond鐨凧ava絎旇</author><pubDate>Thu, 19 Jan 2006 15:28:00 GMT</pubDate><guid>http://m.tkk7.com/raymondchen625/archive/2006/01/19/28708.html</guid><wfw:comment>http://m.tkk7.com/raymondchen625/comments/28708.html</wfw:comment><comments>http://m.tkk7.com/raymondchen625/archive/2006/01/19/28708.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/raymondchen625/comments/commentRss/28708.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/raymondchen625/services/trackbacks/28708.html</trackback:ping><description><![CDATA[闂錛?BR>浣跨敤Struts鐨凙ctionForm鎺ユ敹鍒扮殑涓枃鍏ㄩ儴鏄貢鐮侊紝渚嬪鎻愪氦榪囧幓鐨勨滄祴璇曗濆瓧絎︿覆錛屽緱鍒扮殑鏄??????貓????鈥濄傚紑澶翠互涓烘槸浼犵粺鐨別ncoding璇嗗埆鐨勯棶棰橈紝浣嗘槸鐢ㄥ悇縐嶇紪鐮侀噸鏂版瀯閫犲緱鍒扮殑byte[]鏁扮粍錛屼緷鐒舵棤娉曞緱鍒版紜殑涓枃銆備絾鏄鏋滅敤鏅氱殑jsp鏉ユ帴鏀秄orm鐨勬暟鎹紝涓枃鏄畬鍏ㄦ甯哥殑銆?BR>鎴戝紑濮嬭寰楁槸struts鐨勬祦紼嬪綋涓紝閿欒鍦頒嬌鐢ㄤ簡緙栫爜錛屼互鑷蟲渶鍚庡緱鍒扮殑緇撴灉瀹屽叏涔變簡銆傛悳绱簡濂藉鏂囩珷錛屾葷畻鎵懼埌涓涓瘮杈冩帴榪戠殑銆?BR>瑙e喅鏂規硶錛?BR>瀹氫箟涓涓猣ilter錛宖ilter鍙仛涓浠朵簨鎯咃紝灝辨槸錛?BR>      request.setCharacterEncoding("UTF-8");<BR>鍦╳eb.xml鐨刦ilter mapping閲?璁懼畾鍜宻truts鐨刟ction鍚屾牱鐨刴apping銆?BR><BR>瑙i噴錛?Filter鏈鍏堟嫤鎴獁eb璇鋒眰錛屽湪榪欓噷璁劇疆浜嗘紜殑CharacterEncoding錛屾帴涓嬫潵鍚勪釜澶勭悊鐨勭粍浠跺氨涓嶄細鎼為敊浜嗐傚湪娌℃湁Filter鐨勬儏鍐典笅錛屾垜鐨剅esin鏈嶅姟鍣ㄤ笂鑾峰緱鐨勬槸null錛屼及璁truts涓嶅悓鐨勫鐞嗙粍浠跺null鐨勮В閲婂拰澶勭悊涓嶅お涓鑷達紝瀵艱嚧閿欒鐨勪駭鐢熴?BR><BR>瑕佹敞鎰忔垜鎵鏈夐〉闈㈤兘鏄疷TF-8緙栫爜錛屾墍浠ュ湪filter閲岄潰瀹氫箟浜哢TF-8錛屽鏋滄槸鍏跺畠鐨勭紪鐮侊紝榪欓噷搴旇鐩稿簲鏀逛竴涓嬨?img src ="http://m.tkk7.com/raymondchen625/aggbug/28708.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/raymondchen625/" target="_blank">Raymond鐨凧ava絎旇</a> 2006-01-19 23:28 <a href="http://m.tkk7.com/raymondchen625/archive/2006/01/19/28708.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Java鍒ゅ畾瀛楃鏄惁涓枃http://m.tkk7.com/raymondchen625/archive/2006/01/17/28293.htmlRaymond鐨凧ava絎旇Raymond鐨凧ava絎旇Tue, 17 Jan 2006 04:09:00 GMThttp://m.tkk7.com/raymondchen625/archive/2006/01/17/28293.htmlhttp://m.tkk7.com/raymondchen625/comments/28293.htmlhttp://m.tkk7.com/raymondchen625/archive/2006/01/17/28293.html#Feedback0http://m.tkk7.com/raymondchen625/comments/commentRss/28293.htmlhttp://m.tkk7.com/raymondchen625/services/trackbacks/28293.html

   System.out.println(Character.UnicodeBlock.of('鐞?));
   System.out.println(Character.UnicodeBlock.of('j'));
   System.out.println(Character.UnicodeBlock.of(3267));

榪愯緇撴灉錛?BR>CJK_UNIFIED_IDEOGRAPHS
BASIC_LATIN
KANNADA

鍏跺疄涓嶅畬鍏ㄥ鐢紝鍥犱負濡傛灉寰楀埌鈥淐JK_UNIFIED_IDEOGRAPHS鈥濓紝榪樺彲鑳芥槸鏃ユ枃鎴栬呴煩鏂囥備笉榪囧鎴戠殑闇姹傛槸瓚沖浜嗐傚鏋滆鍑嗙‘鍒ゆ柇涓枃錛屽幓鏌ヤ竴涓媢nicode浠g爜灝卞彲浠ヤ簡銆?BR>


]]>
瀹炵幇闃熷垪鐨凧avaScript瀵硅薄http://m.tkk7.com/raymondchen625/archive/2006/01/16/28205.htmlRaymond鐨凧ava絎旇Raymond鐨凧ava絎旇Mon, 16 Jan 2006 07:52:00 GMThttp://m.tkk7.com/raymondchen625/archive/2006/01/16/28205.htmlhttp://m.tkk7.com/raymondchen625/comments/28205.htmlhttp://m.tkk7.com/raymondchen625/archive/2006/01/16/28205.html#Feedback2http://m.tkk7.com/raymondchen625/comments/commentRss/28205.htmlhttp://m.tkk7.com/raymondchen625/services/trackbacks/28205.html this.size=size;
 this.data=new Array();
 this.add=function(ele) {
  if (this.data.length<this.size) {
   this.data[this.data.length]=ele;
  } else {
   this.data.shift();
   this.data[this.data.length]=ele;
  }
 };
 this.getData=function() {
  return this.data;
 };
 this.toCookieValue=function(delimiter) {
  var result='';
  for (var i=0;i<this.data.length ;i++ )
  {
   if(i==0) {
    result=escape(this.data[i]);
   } else {
    result+=delimiter+escape(this.data[i]);
   }
  }
  return result;
 };
}


]]>
Resin 緙栬瘧鐨勫鎬棶棰樿В鍐?/title><link>http://m.tkk7.com/raymondchen625/archive/2006/01/13/27945.html</link><dc:creator>Raymond鐨凧ava絎旇</dc:creator><author>Raymond鐨凧ava絎旇</author><pubDate>Fri, 13 Jan 2006 08:05:00 GMT</pubDate><guid>http://m.tkk7.com/raymondchen625/archive/2006/01/13/27945.html</guid><wfw:comment>http://m.tkk7.com/raymondchen625/comments/27945.html</wfw:comment><comments>http://m.tkk7.com/raymondchen625/archive/2006/01/13/27945.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/raymondchen625/comments/commentRss/27945.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/raymondchen625/services/trackbacks/27945.html</trackback:ping><description><![CDATA[浣跨敤Resin 3.0寮鍙戯紝寰堝鎬狤clipse鍦ㄥ惎鍔ㄤ簡remote debug錛岀劧鍚庡姞鏂偣鐨勬椂鍊欒鎴戠殑綾繪病鏈夊姞琛屽彿銆傛垜鎵鵑亶浜嗛夐」錛屾槑鏄庢槸鍔犱簡琛屽彿鐨勫憖銆傜敋鑷蟲垜鍦ㄤ竴涓繀瀹氫細璧拌繃鐨勭被鍓嶉潰鍔犱釜log鎵撳嚭鏉ワ紝璺収璧頒簡錛屽眳鐒跺湪console涓嶈log銆傜櫨鎬濅笉寰楀叾瑙o紝蹇穿婧冧箣鍓嶃傜粓浜庢兂璧蜂簡涓存椂鐩綍銆?BR><BR>Resin榛樿鎬繪槸鍦╓EB-INF涓嬮潰鐢熸垚work鍜宼mp鐩綍錛屾槸鏀緅sp緙栬瘧鑰屾垚鐨勭被鐨勩傛垜鎶婅繖涓や釜鐩綍鍒犻櫎浜嗐備竴鍒囨甯革紝鏂偣涔熷彲浠ュ姞浜嗐?BR><BR>鍘熷洜錛?搴旇鏄痳esin鍦ㄥ垽鏂被鏄惁闇瑕侀噸鏂扮紪璇戞椂鏈夌偣闂錛屽浜庢垜jsp閲岄潰鏈変嬌鐢ㄥ埌鐨勭被鍙戠敓鍙樺寲浠ュ悗錛岃皟鐢ㄥ畠鐨刯sp鏂囦歡娌℃湁閲嶆柊緙栬瘧銆傚鑷寸被鏂囦歡涓嶆洿鏂幫紝榪炲甫灝卞嚭浜嗕竴鍫嗗彜鎬殑閿欒銆?BR><BR>涓嬫璁頒綇浜嗭紝鏈夐棶棰橈紝鍏堝垹涓存椂鐩綍錛?img src ="http://m.tkk7.com/raymondchen625/aggbug/27945.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/raymondchen625/" target="_blank">Raymond鐨凧ava絎旇</a> 2006-01-13 16:05 <a href="http://m.tkk7.com/raymondchen625/archive/2006/01/13/27945.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://avyjj.com" target="_blank">四虎成人免费观看在线网址 </a>| <a href="http://50077995.com" target="_blank">亚洲av永久无码精品古装片</a>| <a href="http://baoyutv777.com" target="_blank">午夜亚洲WWW湿好爽</a>| <a href="http://701807.com" target="_blank">啦啦啦中文在线观看电视剧免费版</a>| <a href="http://dunyny.com" target="_blank">亚洲福利视频网址</a>| <a href="http://www999973.com" target="_blank">妻子5免费完整高清电视</a>| <a href="http://8mav958.com" target="_blank">亚洲欧洲精品视频在线观看</a>| <a href="http://8888kkk.com" target="_blank">中文免费观看视频网站</a>| <a href="http://www-65jjj.com" target="_blank">亚洲精品国产精品国自产网站</a>| <a href="http://ax445.com" target="_blank">日本XXX黄区免费看</a>| <a href="http://jdv6.com" target="_blank">337P日本欧洲亚洲大胆精品 </a>| <a href="http://cangtuyuan.com" target="_blank">亚洲伊人久久综合影院</a>| <a href="http://941sese.com" target="_blank">国产一二三四区乱码免费</a>| <a href="http://91haikala.com" target="_blank">亚洲AV无码日韩AV无码导航</a>| <a href="http://ymiwang.com" target="_blank">99久久免费精品高清特色大片</a>| <a href="http://1444000.com" target="_blank">亚洲精品成人av在线</a>| <a href="http://w6626.com" target="_blank">无码国产精品一区二区免费</a>| <a href="http://c7372.com" target="_blank">亚洲乱码日产精品一二三</a>| <a href="http://cxljdz.com" target="_blank">国产真实伦在线视频免费观看</a>| <a href="http://ttvv55.com" target="_blank">日韩毛片免费一二三</a>| <a href="http://777vip8.com" target="_blank">亚洲AV人无码激艳猛片</a>| <a href="http://x3013.com" target="_blank">日本成年免费网站</a>| <a href="http://46339cc.com" target="_blank">美美女高清毛片视频黄的一免费</a>| <a href="http://www-5453.com" target="_blank">国产精品亚洲视频</a>| <a href="http://liulian88.com" target="_blank">狼群影院在线观看免费观看直播</a>| <a href="http://cnlawedu.com" target="_blank">亚洲中文字幕无码一去台湾</a>| <a href="http://www44wawa.com" target="_blank">免费成人午夜视频</a>| <a href="http://51caox.com" target="_blank">色欲色香天天天综合网站免费</a>| <a href="http://wanguoshan.com" target="_blank">亚洲国产精品久久网午夜</a>| <a href="http://bjgelinhotel.com" target="_blank">国产精品黄页在线播放免费</a>| <a href="http://9156892.com" target="_blank">中文字幕版免费电影网站</a>| <a href="http://zzdyzj.com" target="_blank">亚洲国产视频网站</a>| <a href="http://44od.com" target="_blank">亚洲精品第一国产综合境外资源</a>| <a href="http://bcz123.com" target="_blank">四虎成人精品永久免费AV</a>| <a href="http://xxxxyz.com" target="_blank">亚洲熟妇AV乱码在线观看</a>| <a href="http://xx2015.com" target="_blank">精品国产日韩亚洲一区</a>| <a href="http://fenglibin.com" target="_blank">中文字幕在线免费</a>| <a href="http://ganbadei.com" target="_blank">四虎影视久久久免费观看</a>| <a href="http://yyfass.com" target="_blank">久久亚洲精品中文字幕</a>| <a href="http://91haikala.com" target="_blank">免费观看午夜在线欧差毛片</a>| <a href="http://717795.com" target="_blank">日韩免费观看一区</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>