锘??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩精品电影在线,亚洲a级在线观看,亚洲精品无播放器在线播放http://www.aygfsteel.com/wqnashqu/category/24620.html宸ヤ綔鏃ュ織鈥︹? <!-- SiteSearch Google --> <form method="get" action="http://www.google.com/custom" target="_top"> <table border="0" background ="http://www.aygfsteel.com/images/blogjava_net/wqnashqu/yan.gif"> <tr><td nowrap="nowrap" valign="top" align="left" height="32"> </td> <td nowrap="nowrap"> <input type="hidden" name="domains" value="codesearch.google.com;www.aygfsteel.com;www.ibm.com"></input> <label for="sbi" style="display: none">杈撳叆鎮ㄧ殑鎼滅儲瀛楄瘝</label> <input type="text" name="q" size="26" maxlength="255" value="" id="sbi"></input> <label for="sbb" style="display: none">鎻愪氦鎼滅儲琛ㄥ崟</label> <input type="submit" name="sa" value="Google 鎼滅儲" id="sbb"></input> </td></tr> <tr> <td>&nbsp;</td> <td nowrap="nowrap"> <table> <tr> <td> <input type="radio" name="sitesearch" value="" checked id="ss0"></input> <label for="ss0" title="鎼滅儲緗戠粶"><font size="-1" ">Web</font></label></td> <td> <input type="radio" name="sitesearch" value="codesearch.google.com" id="ss1"></input> <label for="ss1" title="鎼滅儲 codesearch.google.com"><font size="-1" >codesearch.google.com</font></label></td> </tr> <tr> <td> <input type="radio" name="sitesearch" value="www.aygfsteel.com" id="ss2"></input> <label for="ss2" title="鎼滅儲 www.aygfsteel.com"><font size="-1" >www.aygfsteel.com</font></label></td> <td> <input type="radio" name="sitesearch" value="www.ibm.com" id="ss3"></input> <label for="ss3" title="鎼滅儲 www.ibm.com"><font size="-1" >www.ibm.com</font></label></td> </tr> </table> <input type="hidden" name="client" value="pub-5842524610105352"></input> <input type="hidden" name="forid" value="1"></input> <input type="hidden" name="ie" value="GB2312"></input> <input type="hidden" name="oe" value="GB2312"></input> <input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:45;LW:166;L:http://www.aygfsteel.com/images/logo.gif;S:http://www.aygfsteel.com/wqnashqu;FORID:1"></input> <input type="hidden" name="hl" value="zh_CN"></input> </td></tr></table> </form> <!-- SiteSearch Google -->zh-cnFri, 14 Mar 2008 15:01:01 GMTFri, 14 Mar 2008 15:01:01 GMT60涓涓鐞嗛昏緫琛ㄨ揪寮忕殑java紼嬪簭http://www.aygfsteel.com/wqnashqu/archive/2008/02/26/182285.html鏇插己 Nicky鏇插己 NickyTue, 26 Feb 2008 11:05:00 GMThttp://www.aygfsteel.com/wqnashqu/archive/2008/02/26/182285.htmlhttp://www.aygfsteel.com/wqnashqu/comments/182285.htmlhttp://www.aygfsteel.com/wqnashqu/archive/2008/02/26/182285.html#Feedback2http://www.aygfsteel.com/wqnashqu/comments/commentRss/182285.htmlhttp://www.aygfsteel.com/wqnashqu/services/trackbacks/182285.html闃呰鍏ㄦ枃

鏇插己 Nicky 2008-02-26 19:05 鍙戣〃璇勮
]]>
classcial dialogue about Rule Engine_Rete...http://www.aygfsteel.com/wqnashqu/archive/2007/11/29/163937.html鏇插己 Nicky鏇插己 NickyThu, 29 Nov 2007 02:42:00 GMThttp://www.aygfsteel.com/wqnashqu/archive/2007/11/29/163937.htmlhttp://www.aygfsteel.com/wqnashqu/comments/163937.htmlhttp://www.aygfsteel.com/wqnashqu/archive/2007/11/29/163937.html#Feedback5http://www.aygfsteel.com/wqnashqu/comments/commentRss/163937.htmlhttp://www.aygfsteel.com/wqnashqu/services/trackbacks/163937.htmlA variation on the bookstore could be recommendation engine. That would provide an opportunity to use a rule engine for direct matching on category/subcategory and aggregations.  闃呰鍏ㄦ枃

鏇插己 Nicky 2007-11-29 10:42 鍙戣〃璇勮
]]>
Trace Iamgehttp://www.aygfsteel.com/wqnashqu/archive/2007/10/30/155837.html鏇插己 Nicky鏇插己 NickyTue, 30 Oct 2007 13:36:00 GMThttp://www.aygfsteel.com/wqnashqu/archive/2007/10/30/155837.htmlhttp://www.aygfsteel.com/wqnashqu/comments/155837.htmlhttp://www.aygfsteel.com/wqnashqu/archive/2007/10/30/155837.html#Feedback0http://www.aygfsteel.com/wqnashqu/comments/commentRss/155837.htmlhttp://www.aygfsteel.com/wqnashqu/services/trackbacks/155837.htmlEach line segment will be of the form " " (quotes for clarity), representing a segment from (x1,y1) to (x2,y2). Segments may cross each other. Segments may also overlap, in which case you should count the overlapping region as appearing in the drawing only once. For example, say t  闃呰鍏ㄦ枃

]]>
Lottery Againhttp://www.aygfsteel.com/wqnashqu/archive/2007/10/24/155675.html鏇插己 Nicky鏇插己 NickyWed, 24 Oct 2007 13:20:00 GMThttp://www.aygfsteel.com/wqnashqu/archive/2007/10/24/155675.htmlhttp://www.aygfsteel.com/wqnashqu/comments/155675.htmlhttp://www.aygfsteel.com/wqnashqu/archive/2007/10/24/155675.html#Feedback1http://www.aygfsteel.com/wqnashqu/comments/commentRss/155675.htmlhttp://www.aygfsteel.com/wqnashqu/services/trackbacks/155675.html闃呰鍏ㄦ枃

鏇插己 Nicky 2007-10-24 21:20 鍙戣〃璇勮
]]>
A Q of Encrypting Stringhttp://www.aygfsteel.com/wqnashqu/archive/2007/10/23/155268.html鏇插己 Nicky鏇插己 NickyTue, 23 Oct 2007 05:34:00 GMThttp://www.aygfsteel.com/wqnashqu/archive/2007/10/23/155268.htmlhttp://www.aygfsteel.com/wqnashqu/comments/155268.htmlhttp://www.aygfsteel.com/wqnashqu/archive/2007/10/23/155268.html#Feedback1http://www.aygfsteel.com/wqnashqu/comments/commentRss/155268.htmlhttp://www.aygfsteel.com/wqnashqu/services/trackbacks/155268.htmlLet's say you have a binary string such as the following:
011100011
One way to encrypt this string is to add to each digit the sum of its adjacent digits. For example, the above string would become:
123210122  闃呰鍏ㄦ枃

鏇插己 Nicky 2007-10-23 13:34 鍙戣〃璇勮
]]>
Maze Problemhttp://www.aygfsteel.com/wqnashqu/archive/2007/10/21/154769.html鏇插己 Nicky鏇插己 NickySun, 21 Oct 2007 13:28:00 GMThttp://www.aygfsteel.com/wqnashqu/archive/2007/10/21/154769.htmlhttp://www.aygfsteel.com/wqnashqu/comments/154769.htmlhttp://www.aygfsteel.com/wqnashqu/archive/2007/10/21/154769.html#Feedback1http://www.aygfsteel.com/wqnashqu/comments/commentRss/154769.htmlhttp://www.aygfsteel.com/wqnashqu/services/trackbacks/154769.html闃呰鍏ㄦ枃

鏇插己 Nicky 2007-10-21 21:28 鍙戣〃璇勮
]]>
TopCoder_2http://www.aygfsteel.com/wqnashqu/archive/2007/10/21/154756.html鏇插己 Nicky鏇插己 NickySun, 21 Oct 2007 12:14:00 GMThttp://www.aygfsteel.com/wqnashqu/archive/2007/10/21/154756.htmlhttp://www.aygfsteel.com/wqnashqu/comments/154756.htmlhttp://www.aygfsteel.com/wqnashqu/archive/2007/10/21/154756.html#Feedback1http://www.aygfsteel.com/wqnashqu/comments/commentRss/154756.htmlhttp://www.aygfsteel.com/wqnashqu/services/trackbacks/154756.html闃呰鍏ㄦ枃

鏇插己 Nicky 2007-10-21 20:14 鍙戣〃璇勮
]]>
TopCoder_1http://www.aygfsteel.com/wqnashqu/archive/2007/10/20/154480.html鏇插己 Nicky鏇插己 NickySat, 20 Oct 2007 05:25:00 GMThttp://www.aygfsteel.com/wqnashqu/archive/2007/10/20/154480.htmlhttp://www.aygfsteel.com/wqnashqu/comments/154480.htmlhttp://www.aygfsteel.com/wqnashqu/archive/2007/10/20/154480.html#Feedback1http://www.aygfsteel.com/wqnashqu/comments/commentRss/154480.htmlhttp://www.aygfsteel.com/wqnashqu/services/trackbacks/154480.html闃呰鍏ㄦ枃

鏇插己 Nicky 2007-10-20 13:25 鍙戣〃璇勮
]]>
鎷愮偣鎻愬彇娉曞湪鏇茬嚎鎷熷悎涓殑綆鍗曞簲鐢?/title><link>http://www.aygfsteel.com/wqnashqu/archive/2007/08/14/136735.html</link><dc:creator>鏇插己 Nicky</dc:creator><author>鏇插己 Nicky</author><pubDate>Tue, 14 Aug 2007 09:27:00 GMT</pubDate><guid>http://www.aygfsteel.com/wqnashqu/archive/2007/08/14/136735.html</guid><wfw:comment>http://www.aygfsteel.com/wqnashqu/comments/136735.html</wfw:comment><comments>http://www.aygfsteel.com/wqnashqu/archive/2007/08/14/136735.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wqnashqu/comments/commentRss/136735.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wqnashqu/services/trackbacks/136735.html</trackback:ping><description><![CDATA[     鎽樿: 鏈▼搴忎負浼樺寲錛屾瘮杈冨ソ鐨勬柟娉曟槸錛岃繘琛屾洸綰跨Н鍒嗭紝綆楄宸瘮榪涜鏂圭▼綰︽潫錛岀敱浜庢椂闂存瘮杈冨皯錛岀◢鍊欎細緇欏嚭浼樺寲紼嬪簭銆?nbsp; <a href='http://www.aygfsteel.com/wqnashqu/archive/2007/08/14/136735.html'>闃呰鍏ㄦ枃</a><img src ="http://www.aygfsteel.com/wqnashqu/aggbug/136735.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wqnashqu/" target="_blank">鏇插己 Nicky</a> 2007-08-14 17:27 <a href="http://www.aygfsteel.com/wqnashqu/archive/2007/08/14/136735.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Stack Simple implementhttp://www.aygfsteel.com/wqnashqu/archive/2007/08/03/134301.html鏇插己 Nicky鏇插己 NickyFri, 03 Aug 2007 10:14:00 GMThttp://www.aygfsteel.com/wqnashqu/archive/2007/08/03/134301.htmlhttp://www.aygfsteel.com/wqnashqu/comments/134301.htmlhttp://www.aygfsteel.com/wqnashqu/archive/2007/08/03/134301.html#Feedback0http://www.aygfsteel.com/wqnashqu/comments/commentRss/134301.htmlhttp://www.aygfsteel.com/wqnashqu/services/trackbacks/134301.html闃呰鍏ㄦ枃

鏇插己 Nicky 2007-08-03 18:14 鍙戣〃璇勮
]]>
To find a max segment in a array which includes negative and positive no.http://www.aygfsteel.com/wqnashqu/archive/2007/07/31/133552.html鏇插己 Nicky鏇插己 NickyTue, 31 Jul 2007 04:45:00 GMThttp://www.aygfsteel.com/wqnashqu/archive/2007/07/31/133552.htmlhttp://www.aygfsteel.com/wqnashqu/comments/133552.htmlhttp://www.aygfsteel.com/wqnashqu/archive/2007/07/31/133552.html#Feedback0http://www.aygfsteel.com/wqnashqu/comments/commentRss/133552.htmlhttp://www.aygfsteel.com/wqnashqu/services/trackbacks/133552.html闃呰鍏ㄦ枃

鏇插己 Nicky 2007-07-31 12:45 鍙戣〃璇勮
]]>
澶у鏉ヨ瘯璇曡繍姘斿晩...嬈㈣繋緇欏嚭緙╁噺鐗堟湰http://www.aygfsteel.com/wqnashqu/archive/2006/10/12/74845.html鏇插己 Nicky鏇插己 NickyThu, 12 Oct 2006 10:45:00 GMThttp://www.aygfsteel.com/wqnashqu/archive/2006/10/12/74845.htmlhttp://www.aygfsteel.com/wqnashqu/comments/74845.htmlhttp://www.aygfsteel.com/wqnashqu/archive/2006/10/12/74845.html#Feedback0http://www.aygfsteel.com/wqnashqu/comments/commentRss/74845.htmlhttp://www.aygfsteel.com/wqnashqu/services/trackbacks/74845.html    *@ the titlt  about a Random example about choose 7 from 33
    *@ the auther Nicky (EN) QuQiang(CH)
    *@ the date   2006.9.1
**/



/** the rules

//涓絳夊錛氶変腑錛栦釜姝i夊彿鍙婄壒鍒彿錛?br>
//浜岀瓑濂栵細閫変腑錛曚釜姝i夊彿鍙婄壒鍒彿錛?br>
//涓夌瓑濂栵細閫変腑錛曚釜姝i夊彿錛?br>
//鍥涚瓑濂栵細閫変腑錛斾釜姝i夊彿鍙婄壒鍒彿錛?br>
//浜旂瓑濂栵細閫変腑錛斾釜姝i夊彿鎴栭変腑錛撲釜姝i夊彿鍙婄壒鍒彿錛?br>
//鍏瓑濂栵細閫変腑錛撲釜姝i夊彿銆?br>
**/

import java.util.*;

public class NotSameRandoml{
     private static String transform;
     private static String match="00";
     private static int special;


  //浜х敓褰╃エ涓婚昏緫鍑芥暟
   private static void Nicky(int[] guess){
      Random r = new Random();     //鏋勯犱吉闅忔満鐢熸垚鍣?br>      //鏌愪簺鏄犲皠瀹炵幇鍙槑紜繚璇佸叾欏哄簭錛屽 TreeMap 綾伙紱鏌愪簺鏄犲皠瀹炵幇鍒欎笉淇濊瘉欏哄簭錛屽 HashMap 綾?br>      Map map = new TreeMap();   //Map 鎺ュ彛鐨勫疄鐜?br>      int n = 0;
      int nt = 1;
      String[] temps=new String[7];
      
      while(true){
          n = r.nextInt(33)+1; //浜х敓1~33鐨勯殢鏈烘暟
          //if( map.get(new Integer(n))!=null){
          //   nt = ((Integer)map.get(new Integer(n))).intValue();  
          //}
          //閬垮厤浜嗕駭鐢熺殑闅忔満鏁板瓧閲嶅
          if(map.containsValue(n)){
            continue;
          }
          map.put(new Integer(nt),new Integer(n));//灝嗘寚瀹氱殑鍊間笌姝ゆ槧灝勪腑鐨勬寚瀹氶敭鐩稿叧鑱?br>          if(map.size()==7){
             break;
          }
          nt++;
      }
      
      Iterator it = map.keySet().iterator(); //榪斿洖姝ゆ槧灝勪腑鍖呭惈鐨勯敭鐨?set 瑙嗗浘
      for(int i=0;it.hasNext();i++){
       Object o = it.next();
        // 涓轟簡鏇寸鍚堢幇瀹炰腑33閫?錛屾暟瀛椾負01銆傘傘?浣?br>       int temp=((Integer)map.get(o)).intValue();
       if(temp>=1&&temp<10){
           transform="0"+Integer.toString(temp);
           match=match+" "+transform;
           temps[i]=transform;
           if(((Integer)o).intValue()==7){
                   special=temp;
                   System.out.println(""+transform+"涓轟駭鐢熺殑鐗瑰埆涓涓鍙風爜");
               }else  
                 System.out.println(""+transform+"涓轟駭鐢熺殑絎?+((Integer)o).intValue()+"涓腑濂栧彿鐮?);
        }else{
        temps[i]=Integer.toString(temp);
        match=match+" "+temps[i];
        if(((Integer)o).intValue()==7){
           System.out.println(""+transform+"涓轟駭鐢熺殑鐗瑰埆涓涓鍙風爜");
        }else
        System.out.println(""+temp+"涓轟駭鐢熺殑絎?+((Integer)o).intValue()+"涓腑濂栧彿鐮?);
       }
      }
      String creat=match.substring(3);
      System.out.println("鎵浜х敓鐨勪腑濂栧彿鐮佷覆涓?"+creat);
      //System.out.println("瀵逛駭鐢熺殑涓鍙風爜欏哄簭鎺掑簭涓?"+creats);
      Sort(temps);
      check(map,guess);
   }
   
   //瀹炵幇鎺掑簭錛屼篃鍙互璋冪敤鏂規硶錛屼絾鏄嵈蹇呴』瑕佽В鍐砎oid闂
    private static void Sort(String[] temps) {
         for(int i=0;i<temps.length;i++){
          for(int j=i+1;j<temps.length;j++){
         if(Integer.parseInt(temps[i])>Integer.parseInt(temps[j])){
            String k;
            k=temps[i];temps[i]=temps[j];temps[j]=k;
         }
        }
      }
      System.out.println("瀵逛駭鐢熺殑涓鍙風爜欏哄簭鎺掑簭涓?");
      for(int i=0;i<temps.length;i++){
          System.out.print(temps[i]+" ");
      }
      System.out.println("\n");
    }
   
   
  //杈撳嚭緇撴灉綾誨埆  
   private static void check(Map map ,int[] guess){
        int flag=0;
         for(int i=0;i<guess.length-1;i++){
            if(map.containsValue(guess[i])){
                    flag++;
                }
         }
         if(guess[guess.length-1]==special){
            flag=flag+10;
         }
         switch(flag){
              case 16: System.out.println("鎭枩鎮ㄤ腑涓絳夊");break;
              case 15: System.out.println("鎭枩鎮ㄤ腑浜岀瓑濂?);break;
              case  5: System.out.println("鎭枩鎮ㄤ腑涓夌瓑濂?);break;
              case 14: System.out.println("鎭枩鎮ㄤ腑鍥涚瓑濂?);break;
              case 13: System.out.println("鎭枩鎮ㄤ腑浜旂瓑濂?);break;
              case  4: System.out.println("鎭枩鎮ㄤ腑浜旂瓑濂?);break;
              case  3: System.out.println("鎭枩鎮ㄤ腑鍏瓑濂?);break;
              default: System.out.println("璋㈣阿鍙備笌錛岀鎮ㄤ笅嬈′腑濂?);
         }
   }
   
   
   
  //璇存槑
 
   private static void usage(){
      System.out.println("Usage:java Randomol program [the number you guess for the lucky nums.]");
      System.out.println("\t And the nums. you must typed 7,else you will be cancel by the game rules");
      System.out.println("\t The first 6 nums is your basic nums.,the last one is your special num.");
      System.exit(0);
   }
   
   
  //涓誨嚱鏁?br>   public static void main(String []args){
        if(args.length==0||args.length>7){
              usage();
            }//甯﹀叆鍙傛暟
            int[] guess=new int[7];
            for(int i=0;i<args.length;i++){
               guess[i]=Integer.parseInt(args[i]);
            }
            //鍒ゆ柇鎵杈撳叆鐨勫彿鐮佹槸鍚︾浉鍚?br>        List <Integer> ls= new ArrayList<Integer>();
        for(int i=0;i<guess.length;i++){
           if(ls.contains(guess[i])){
              System.out.println("鎮ㄦ墍涔扮殑鍙風爜涓嶅彲浠ョ浉鍚?);
              System.exit(0);
           }else  ls.add(guess[i]);
        }
        Nicky(guess);      
        System.exit(0);
   }
}

鏇插己 Nicky 2006-10-12 18:45 鍙戣〃璇勮
]]>
浠婂ぉ紿佺劧鎯沖啓浜嗕釜鎶樺崐鏌ユ壘http://www.aygfsteel.com/wqnashqu/archive/2006/08/27/66011.html鏇插己 Nicky鏇插己 NickySun, 27 Aug 2006 09:02:00 GMThttp://www.aygfsteel.com/wqnashqu/archive/2006/08/27/66011.htmlhttp://www.aygfsteel.com/wqnashqu/comments/66011.htmlhttp://www.aygfsteel.com/wqnashqu/archive/2006/08/27/66011.html#Feedback0http://www.aygfsteel.com/wqnashqu/comments/commentRss/66011.htmlhttp://www.aygfsteel.com/wqnashqu/services/trackbacks/66011.html
 1 /**
 2  * @the author:Nicky(EN) QuQiang(CH)
 3  * @the data :2006.8.27
 4  **/
 5 // 褰撶劧鏈畻娉曟渶濂界紪鍒舵垚涓ゅ埌3涓枃浠?/span>
 6 
 7 public class HalfSearch{
 8     private static int lengthValue;
 9     private static byte  flag=0;
10     private static int SearchValue=0;
11    
12     //瀹氫箟榪斿洖鏁扮粍綾誨瀷鐨勬柟娉?nbsp; 姝ゆ柟娉曠粰鍑虹殑public鏉冮檺
13     public static int[] Sort(int[] b){
14         for(int i=0;i<b.length;i++){
15             for(int j=i+1;j<b.length;j++){
16                 int temp;
17                 if(b[i]>b[j]){
18                     temp=b[i];b[i]=b[j];b[j]=temp;
19                 }
20             }
21         }
22         System.out.println("\u6309\u5e8f\u6392\u5217\u4e3a:");  //瀵瑰簲姹夊瓧涓?nbsp;    鎸夊簭鎺掑垪涓?
23         for(int i=0;i<b.length;i++){
24           System.out.println(b[i]);
25         }                            //鍐掓場鎺掑簭娉曟帓搴?nbsp; 鎴栫洿鎺ヤ嬌鐢吉錛わ極鎻愪緵鐨剆ort()鍑芥暟榪涜鎺掑垪
26         return b;
27     }
28 
29     //鎶樺崐鏌ユ壘
30     private static int Half(int[] a){
31         int m=a.length,k,n=1;
32         System.out.println("\u5f53\u524d\u5171\u8f93\u5165"+m+"\u4e2a\u6570\u7b26"); //瀵瑰簲姹夊瓧涓?nbsp; "褰撳墠鍏辮緭鍏? 涓暟絎?/span>
33         int index=0;
34         if(m==1){
35            if(a[0]==SearchValue){
36              flag=1;
37              index=1;
38            }
39            else{
40               flag=0;
41               index=1;
42            }
43         }             //鑰冭檻鍒扮敤鎴烽櫎杈撳叆鏌ユ壘鏁扮澶栵紝鍙緭鍏ヤ竴涓暟絎︼紝鍗硁=m=1
44         for(int i=1;;i++){
45           if(n<m){
46              index+=1;
47              k=(n+m)/2;
48              if(a[k-1]>SearchValue){
49                  m=k-1;      //姝ゆ椂瀹氫箟鏈澶у間負褰撳墠涓棿鍊肩殑鍓嶄竴涓?nbsp; //絎?nbsp;嬈℃煡鎵炬湭鎴愬姛錛屽綋鍓嶅煎ぇ浜嶴earchValue
50                  System.out.println("\u7b2c"+index+"\u6b21\u67e5\u627e\u672a\u6210\u529f\uff0c \u5f53\u524d\u503c\u5927\u4e8e"+SearchValue);//鍚﹀垯灝?鏀逛負鍙橀噺
51              }else if(a[k-1]<SearchValue){
52                  n=k+1;          //鏈壘鍒幫紝鍒欏湪鍚庡崐鍖洪棿榪涜鏌ユ壘  //灝忎簬
53                  System.out.println("\u7b2c"+index+"\u6b21\u67e5\u627e\u672a\u6210\u529f\uff0c \u5f53\u524d\u503c\u5c0f\u4e8e"+SearchValue);//鍚﹀垯灝?鏀逛負鍙橀噺
54              }else{
55                  System.out.println("\u67e5\u627e\u6210\u529f");  //鏌ユ壘鎴愬姛
56                  flag=1;
57                  break;
58              }
59            }else break;
60          }
61         return index;
62     }                      //涔熷彲浠ュ畾涔変竴涓敤鎴烽渶杈撳叆鐨勬煡鎵懼?br>63    
64     //浣跨敤璇存槑
65    private static void usage(){
66       System.out.println("Usage:java HalfSearch program [the number you search] [the array list you give]");
67       System.out.println("\t [the number you search] the only number you want to use it to test this program");
68       System.out.println("\t [the Array list you give] A array list may be it contains it may be not");
69       System.exit(0);
70    }
71       
72     //涓誨嚱鏁扮殑鍔熻兘  浼犲叆鏌ユ壘鏁扮粍
73     public static void main(String[] args){
74         if(args.length==0||args.length==1){
75             usage();
76             System.exit(0);
77         }
78         SearchValue=Integer.parseInt(args[0]);
79         lengthValue=args.length;
80         int index=0;
81         int[] TransArray=new int[args.length-1];
82         for(int i=1;i<args.length;i++){
83             TransArray[i-1]=Integer.parseInt(args[i]);
84             System.out.println(TransArray[i-1]);
85         }
86         index=HalfSearch.Half(HalfSearch.Sort(TransArray));
87         //杈撳嚭鏌ヨ緇撴灉
88         switch(flag){
89              //鍦ㄦ湰嬈℃姌鍗婃煡鎵句腑鍏辯粡榪?nbsp; 嬈℃煡鎵?鏈垚鍔?nbsp;  鎴愬姛
90             case 0: System.out.println("\u5728\u672c\u6b21\u6298\u534a\u67e5\u627e\u4e2d\u5171\u7ecf\u8fc7"+index+"\u6b21\u67e5\u627e,\u672a\u6210\u529f");break;
91             case 1: System.out.println("\u5728\u672c\u6b21\u6298\u534a\u67e5\u627e\u4e2d\u5171\u7ecf\u8fc7"+index+"\u6b21\u67e5\u627e,\u6210\u529f");break;
92         }
93         System.exit(0);
94     }
95 }




鏇插己 Nicky 2006-08-27 17:02 鍙戣〃璇勮
]]>
姹備換鎰忔鏁存暟鐨勯樁涔?/title><link>http://www.aygfsteel.com/wqnashqu/archive/2006/07/22/59560.html</link><dc:creator>鏇插己 Nicky</dc:creator><author>鏇插己 Nicky</author><pubDate>Sat, 22 Jul 2006 09:21:00 GMT</pubDate><guid>http://www.aygfsteel.com/wqnashqu/archive/2006/07/22/59560.html</guid><wfw:comment>http://www.aygfsteel.com/wqnashqu/comments/59560.html</wfw:comment><comments>http://www.aygfsteel.com/wqnashqu/archive/2006/07/22/59560.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.aygfsteel.com/wqnashqu/comments/commentRss/59560.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/wqnashqu/services/trackbacks/59560.html</trackback:ping><description><![CDATA[<p>鍦↗ava涓紝鎴戜滑鍙鍒╃敤BigInteger綾伙紝鍙互瀹屾垚鍚屾牱鍔熻兘錛涜繖閲屼篃嫻嬭瘯浜嗗紓甯鎬互鍙奃ialog鐨勪駭鐢熴?/p> <p>寮鍙戠幆澧冿細Windows Server 2003 Standard Edition SP1, J2SDK 1.5.0_06, Eclipse 3.1.2<br>婧愪唬鐮佸涓嬶細</p> <pre> <p>//Factorial.java<br>import java.math.BigInteger;<br>import javax.swing.*;</p> <br> <p>/**<br> * 璁$畻浠繪剰姝f暣鏁扮殑闃朵箻<br> *  <a ></a><br> * <br> */<br>public class Factorial {<br> public static void main(String[] args) {<br>  BigInteger x = BigInteger.valueOf(1); //瀛樺偍緇撴灉<br>  int num = 1; //寰呰綆楃殑鏁存暟<br>  String s = null;<br>  boolean correct = false;<br>  do {<br>   try {<br>    s = JOptionPane.showInputDialog(null, "璇瘋緭鍏ヨ璁$畻鐨勬暟(姝f暣鏁?錛?);<br>    if (s == null)<br>     break;<br>    else {<br>     num = Integer.parseInt(s);<br>     if (num < 0) <br>      throw new IllegalArgumentException();<br>     else correct = true; <br>    }  <br>   } catch (NumberFormatException e) {<br>    JOptionPane.showMessageDialog(null, "鏁版嵁鏍煎紡閿欒錛?);<br>    continue;<br>   } catch (IllegalArgumentException e) {<br>    JOptionPane.showMessageDialog(null,"璇瘋緭鍏ヤ竴涓鏁存暟錛?);<br>    continue;<br>   }<br>   break;<br>  } while (true);<br>  if (correct == true) {<br>   for (int i = 1; i <= num; i++)<br>    x = x.multiply(BigInteger.valueOf(i));<br>   JTextArea textArea = new JTextArea(x.toString(), 5, 30);<br>   textArea.setEditable(false);<br>   textArea.setLineWrap(true);<br>   Object[] object = {num + " ! : ",new JScrollPane(textArea)};<br>   JDialog dialog = new JOptionPane(object).createDialog(null,"闃朵箻鐨勭粨鏋?);<br>   dialog.setVisible(true);<br>  }<br>  System.exit(0);<br> }<br>}</p> </pre> <p> </p> <p>榪愯緇撴灉濡備笅錛?/p> <p> <img alt="" src="http://www.loujing.com/mywork/java/J2SE/20060330/1.jpg" border="0" hspace="0"> </p> <p> <img alt="" src="http://www.loujing.com/mywork/java/J2SE/20060330/2.jpg" border="0" hspace="0"> </p><img src ="http://www.aygfsteel.com/wqnashqu/aggbug/59560.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/wqnashqu/" target="_blank">鏇插己 Nicky</a> 2006-07-22 17:21 <a href="http://www.aygfsteel.com/wqnashqu/archive/2006/07/22/59560.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> 主站蜘蛛池模板: <a href="http://" target="_blank">营口市</a>| <a href="http://" target="_blank">明光市</a>| <a href="http://" target="_blank">独山县</a>| <a href="http://" target="_blank">临沂市</a>| <a href="http://" target="_blank">四会市</a>| <a href="http://" target="_blank">海宁市</a>| <a href="http://" target="_blank">银川市</a>| <a href="http://" target="_blank">武陟县</a>| <a href="http://" target="_blank">马边</a>| <a href="http://" target="_blank">界首市</a>| <a href="http://" target="_blank">仙游县</a>| <a href="http://" target="_blank">广汉市</a>| <a href="http://" target="_blank">上思县</a>| <a href="http://" target="_blank">顺义区</a>| <a href="http://" target="_blank">铜陵市</a>| <a href="http://" target="_blank">桑植县</a>| <a href="http://" target="_blank">嘉禾县</a>| <a href="http://" target="_blank">儋州市</a>| <a href="http://" target="_blank">万安县</a>| <a href="http://" target="_blank">阳城县</a>| <a href="http://" target="_blank">宁南县</a>| <a href="http://" target="_blank">三门峡市</a>| <a href="http://" target="_blank">当涂县</a>| <a href="http://" target="_blank">杭州市</a>| <a href="http://" target="_blank">洛浦县</a>| <a href="http://" target="_blank">雅江县</a>| <a href="http://" target="_blank">阿尔山市</a>| <a href="http://" target="_blank">长葛市</a>| <a href="http://" target="_blank">融水</a>| <a href="http://" target="_blank">龙川县</a>| <a href="http://" target="_blank">馆陶县</a>| <a href="http://" target="_blank">平度市</a>| <a href="http://" target="_blank">遵化市</a>| <a href="http://" target="_blank">阳江市</a>| <a href="http://" target="_blank">台南市</a>| <a href="http://" target="_blank">绥芬河市</a>| <a href="http://" target="_blank">年辖:市辖区</a>| <a href="http://" target="_blank">临澧县</a>| <a href="http://" target="_blank">山丹县</a>| <a href="http://" target="_blank">闽清县</a>| <a href="http://" 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>