锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产日韩欧美,男人的天堂免费在线视频,欧美久久综合http://www.aygfsteel.com/tkaven/articles/377388.html銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/dc:creator>銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/author>Fri, 04 May 2012 08:02:00 GMThttp://www.aygfsteel.com/tkaven/articles/377388.htmlhttp://www.aygfsteel.com/tkaven/comments/377388.htmlhttp://www.aygfsteel.com/tkaven/articles/377388.html#Feedback0http://www.aygfsteel.com/tkaven/comments/commentRss/377388.htmlhttp://www.aygfsteel.com/tkaven/services/trackbacks/377388.html 1
2 public class TestPriority {
3 public static void main(String[] args) {
4 Thread t1 = new Thread(new T1());
5 Thread t2 = new Thread(new T2());
6 t1.setPriority(Thread.NORM_PRIORITY +3); //浼樺厛綰ц瀹?/span>
7 t1.start(); t2.start();
8 }
9
10 }
11
12 class T1 implements Runnable {
13 public void run() {
14 for(int i=0;i<1000;i++){System.out.println("T1:"+i);}
15 }
16 }
17
18 class T2 implements Runnable {
19 public void run() {
20 for(int i=0;i<1000;i++){System.out.println("------------T2:"+i);}
21 }
22 }
23 
]]>- 銆愪竴鏃ヤ竴緇冦戝綰跨▼ Sleep 鏂規(guī)硶鐨勫疄鐜?/title>http://www.aygfsteel.com/tkaven/articles/377384.html銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/dc:creator>銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/author>Fri, 04 May 2012 07:20:00 GMThttp://www.aygfsteel.com/tkaven/articles/377384.htmlhttp://www.aygfsteel.com/tkaven/comments/377384.htmlhttp://www.aygfsteel.com/tkaven/articles/377384.html#Feedback0http://www.aygfsteel.com/tkaven/comments/commentRss/377384.htmlhttp://www.aygfsteel.com/tkaven/services/trackbacks/377384.html 1 import java.util.*;
2
3 public class TestInterrupt {
4 public static void main(String[] args){
5 MyThread thread =new MyThread();
6 thread.run();
7 try{Thread.sleep(10000);}
8 catch (InterruptedException e){}
9 thread.interrupt();
10 }
11 }
12
13 class MyThread extends Thread{
14 boolean flag =true;
15 public void run() {
16 while(flag){
17 System.out.println("==="+new Date()+"===");
18 try {
19 sleep(1000);
20 }
21 catch (InterruptedException e) {
22 return;
23 }
24 }
25 }
26
27 }
]]> - 銆愭瘡鏃ヤ竴棰樸戝皢閿洏杈撳叆鐨勮嫳鏂囧瓧絎﹁漿鎹負(fù)澶у啓錛圛O鍖?InputStreameRedader,BufferedReader鐨勮繍鐢級http://www.aygfsteel.com/tkaven/articles/377133.html銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/dc:creator>銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/author>Tue, 01 May 2012 17:57:00 GMThttp://www.aygfsteel.com/tkaven/articles/377133.htmlhttp://www.aygfsteel.com/tkaven/comments/377133.htmlhttp://www.aygfsteel.com/tkaven/articles/377133.html#Feedback0http://www.aygfsteel.com/tkaven/comments/commentRss/377133.htmlhttp://www.aygfsteel.com/tkaven/services/trackbacks/377133.html
1 import java.io.*;
2
3 public class TestTransForm {
4
5 public static void main(String[] args){
6 InputStreamReader isr=new InputStreamReader(System.in);
7 BufferedReader br=new BufferedReader(isr);
8 String s=null;
9
10 try{
11 s=br.readLine();
12 while(s!=null){
13 if(s.equalsIgnoreCase("exit"))break;
14 System.out.println(s.toUpperCase());
15 s=br.readLine();
16 }
17 br.close();
18
19 } catch (IOException e){e.printStackTrace();}
20 }
21 }
22

]]> - 銆愭瘡鏃ヤ竴棰樸戞枃浠跺鍒訛紙IO鍖?FileOutputStream鐨勮繍鐢級http://www.aygfsteel.com/tkaven/articles/377117.html銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/dc:creator>銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/author>Tue, 01 May 2012 11:39:00 GMThttp://www.aygfsteel.com/tkaven/articles/377117.htmlhttp://www.aygfsteel.com/tkaven/comments/377117.htmlhttp://www.aygfsteel.com/tkaven/articles/377117.html#Feedback0http://www.aygfsteel.com/tkaven/comments/commentRss/377117.htmlhttp://www.aygfsteel.com/tkaven/services/trackbacks/377117.html
1 import java.io.*;
2
3 public class TestFileOutputStream {
4 public static void main(String[] args){
5 int b=0;
6 FileInputStream in=null;
7 FileOutputStream out=null;
8
9 try{
10 in=new FileInputStream("c:/windows/notepad.exe");
11 out=new FileOutputStream("c:/notepad.exe");
12 while((b=in.read())!=-1){out.write(b);}
13 in.close();
14 out.close();
15
16 } catch (FileNotFoundException e2){
17 System.out.println("鎵句笉鍒版寚瀹氭枃浠?);System.exit(-1);
18 } catch (IOException e1){
19 System.out.println("鏂囦歡澶嶅埗閿欒");System.exit(-1);
20 }
21
22 System.out.println("鏂囦歡宸插鍒?);
23 }
24 }
25

]]> - 銆愭瘡鏃ヤ竴棰樸戝弬鏁扮粺璁★紙瀹瑰櫒涓庢硾鍨嬬殑榪愮敤錛?/title>http://www.aygfsteel.com/tkaven/articles/377088.html銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/dc:creator>銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/author>Mon, 30 Apr 2012 15:15:00 GMThttp://www.aygfsteel.com/tkaven/articles/377088.htmlhttp://www.aygfsteel.com/tkaven/comments/377088.htmlhttp://www.aygfsteel.com/tkaven/articles/377088.html#Feedback0http://www.aygfsteel.com/tkaven/comments/commentRss/377088.htmlhttp://www.aygfsteel.com/tkaven/services/trackbacks/377088.html
1 import java.util.*;
2
3 public class TestArgsWords {
4
5 public static void main(String args[]) {
6 Map<String, Integer> m = new HashMap<String, Integer>();
7
8 for (int i = 0; i < args.length; i++) {
9 int freq = (Integer) m.get(args[i]) == null ? 0 : (Integer) m.get(args[i]);
10 m.put(args[i], freq==0 ? 1 : freq + 1);
11 }
12
13 System.out.println(m.size() + " distinct words detected:\n"+m);
14 }
15 }
16

]]> - 銆愭瘡鏃ヤ竴棰樸戦亶鍘?鏌愪竴鏂囦歡澶逛笅鐨勬墍鏈?鏂囦歡錛堝す錛?/title>http://www.aygfsteel.com/tkaven/articles/377063.html銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/dc:creator>銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/author>Mon, 30 Apr 2012 05:00:00 GMThttp://www.aygfsteel.com/tkaven/articles/377063.htmlhttp://www.aygfsteel.com/tkaven/comments/377063.htmlhttp://www.aygfsteel.com/tkaven/articles/377063.html#Feedback0http://www.aygfsteel.com/tkaven/comments/commentRss/377063.htmlhttp://www.aygfsteel.com/tkaven/services/trackbacks/377063.html
1
/**//*
2
* 緙栧啓涓涓▼搴忥紝
3
* 鍦ㄥ懡浠よ涓互鏍?wèi)鐘毒l撴瀯
4
* 灞曠幇鐗瑰畾鐨勬枃浠跺す鏈哄櫒瀛愭枃浠訛紙澶癸級
5
*/
6
7
import java.io.*;
8
9
public class FileList
{
10
11
public static void main(String[] args)
{
12
tree(new File("d:/Recycler/Legend_Wind"),0);
13
}
14
15
private static void tree(File f,int level)
{
16
String preStr="";
17
for (int n = 0;n<level;n++) preStr +="\t\t";
18
19
File[] sub=f.listFiles();
20
for(int i=0;i<sub.length;i++)
{
21
if(sub[i].isDirectory())
{tree(sub[i],level+1);}
22
System.out.println(preStr+sub[i].getName());
23
}
24
System.out.println();
25
}
26
}
27

]]>- 銆愭瘡鏃ヤ竴棰樸戣В鏋?鏁板瓧瀛楃涓?鍌ㄥ瓨鍒頒簩緇存暟緇?/title>http://www.aygfsteel.com/tkaven/articles/377062.html銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/dc:creator>銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/author>Mon, 30 Apr 2012 04:59:00 GMThttp://www.aygfsteel.com/tkaven/articles/377062.htmlhttp://www.aygfsteel.com/tkaven/comments/377062.htmlhttp://www.aygfsteel.com/tkaven/articles/377062.html#Feedback0http://www.aygfsteel.com/tkaven/comments/commentRss/377062.htmlhttp://www.aygfsteel.com/tkaven/services/trackbacks/377062.html 1

/**//*
2
* 灝嗕竴浜涙棩鏈熸暎涔卞瓨鍏ユ暟緇勶紝
3
* 鐒跺悗鐢ㄥ啋娉℃硶鍗囧簭鎺掑垪
4
* 騫舵煡鎵句竴涓瓨鍦ㄧ殑鏃ユ湡錛岀粰鍑鴻鏃ユ湡鎵鍦ㄦ暟緇勪腑鐨勪綅緗?br /> 5
*/
6
public class TestDateSort
{
7
public static void main(String[] args)
{
8
Date[] days = new Date[5];
9
days[0] = new Date(2006, 5, 4);
10
days[1] = new Date(2006, 7, 4);
11
days[2] = new Date(2008, 5, 4);
12
days[3] = new Date(2004, 5, 9);
13
days[4] = new Date(2004, 5, 4);
14
15
Date d = new Date(2006, 7, 4);
16
17
bubbleSort(days);
18
19
for(int i=0; i<days.length; i++)
{
20
System.out.println(days[i]);
21
}
22
23
System.out.println(binarySearch(days, d));
24
}
25
26
public static Date[] bubbleSort(Date[] a)
{
27
int len = a.length;
28
for(int i = len-1;i>=1;i--)
{
29
for(int j = 0;j<=i-1;j++)
{
30
if(a[j].compare(a[j+1]) > 0)
{
31
Date temp = a[j];
32
a[j]=a[j+1];
33
a[j+1]=temp;
34
}
35
}
36
}
37
return a;
38
}
39
40
public static int binarySearch(Date[] days, Date d)
{
41
if (days.length==0) return -1;
42
43
int startPos = 0;
44
int endPos = days.length-1;
45
int m = (startPos + endPos) / 2;
46
while(startPos <= endPos)
{
47
if(d.compare(days[m]) == 0) return m;
48
if(d.compare(days[m]) > 0)
{
49
startPos = m + 1;
50
}
51
if(d.compare(days[m]) < 0)
{
52
endPos = m -1;
53
}
54
m = (startPos + endPos) / 2;
55
}
56
return -1;
57
}
58
}
59
60
class Date
{
61
int year, month, day;
62
63
Date(int y, int m, int d)
{
64
year = y; month = m; day = d;
65
}
66
67
public int compare(Date date)
{
68
return year > date.year ? 1
69
: year < date.year ? -1
70
: month > date.month ? 1
71
: month < date.month ? -1
72
: day > date.day ? 1
73
: day < date.day ? -1 : 0;
74
}
75
76
public String toString()
{
77
return "Year:Month:Day -- " + year + "-" + month + "-" + day;
78
}
79
}
]]> - 銆愭瘡鏃ヤ竴棰樸戞棩鏈熷瓨鍏ユ暟緇勶紝鎺掑簭涓旀煡鎵懼茍緇欏嚭浣嶇疆http://www.aygfsteel.com/tkaven/articles/377061.html銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/dc:creator>銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/author>Mon, 30 Apr 2012 04:57:00 GMThttp://www.aygfsteel.com/tkaven/articles/377061.htmlhttp://www.aygfsteel.com/tkaven/comments/377061.htmlhttp://www.aygfsteel.com/tkaven/articles/377061.html#Feedback0http://www.aygfsteel.com/tkaven/comments/commentRss/377061.htmlhttp://www.aygfsteel.com/tkaven/services/trackbacks/377061.html 1

/**//*
2
* 灝嗕竴浜涙棩鏈熸暎涔卞瓨鍏ユ暟緇勶紝
3
* 鐒跺悗鐢ㄥ啋娉℃硶鍗囧簭鎺掑垪
4
* 騫舵煡鎵句竴涓瓨鍦ㄧ殑鏃ユ湡錛岀粰鍑鴻鏃ユ湡鎵鍦ㄦ暟緇勪腑鐨勪綅緗?br /> 5
*/
6
public class TestDateSort
{
7
public static void main(String[] args)
{
8
Date[] days = new Date[5];
9
days[0] = new Date(2006, 5, 4);
10
days[1] = new Date(2006, 7, 4);
11
days[2] = new Date(2008, 5, 4);
12
days[3] = new Date(2004, 5, 9);
13
days[4] = new Date(2004, 5, 4);
14
15
Date d = new Date(2006, 7, 4);
16
17
bubbleSort(days);
18
19
for(int i=0; i<days.length; i++)
{
20
System.out.println(days[i]);
21
}
22
23
System.out.println(binarySearch(days, d));
24
}
25
26
public static Date[] bubbleSort(Date[] a)
{
27
int len = a.length;
28
for(int i = len-1;i>=1;i--)
{
29
for(int j = 0;j<=i-1;j++)
{
30
if(a[j].compare(a[j+1]) > 0)
{
31
Date temp = a[j];
32
a[j]=a[j+1];
33
a[j+1]=temp;
34
}
35
}
36
}
37
return a;
38
}
39
40
public static int binarySearch(Date[] days, Date d)
{
41
if (days.length==0) return -1;
42
43
int startPos = 0;
44
int endPos = days.length-1;
45
int m = (startPos + endPos) / 2;
46
while(startPos <= endPos)
{
47
if(d.compare(days[m]) == 0) return m;
48
if(d.compare(days[m]) > 0)
{
49
startPos = m + 1;
50
}
51
if(d.compare(days[m]) < 0)
{
52
endPos = m -1;
53
}
54
m = (startPos + endPos) / 2;
55
}
56
return -1;
57
}
58
}
59
60
class Date
{
61
int year, month, day;
62
63
Date(int y, int m, int d)
{
64
year = y; month = m; day = d;
65
}
66
67
public int compare(Date date)
{
68
return year > date.year ? 1
69
: year < date.year ? -1
70
: month > date.month ? 1
71
: month < date.month ? -1
72
: day > date.day ? 1
73
: day < date.day ? -1 : 0;
74
}
75
76
public String toString()
{
77
return "Year:Month:Day -- " + year + "-" + month + "-" + day;
78
}
79
}
]]> - 銆愭瘡鏃ヤ竴棰樸戝皬瀛╁洿鍦堬紝鏁頒笁閫涓http://www.aygfsteel.com/tkaven/articles/377060.html銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/dc:creator>銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/author>Mon, 30 Apr 2012 04:56:00 GMThttp://www.aygfsteel.com/tkaven/articles/377060.htmlhttp://www.aygfsteel.com/tkaven/comments/377060.htmlhttp://www.aygfsteel.com/tkaven/articles/377060.html#Feedback0http://www.aygfsteel.com/tkaven/comments/commentRss/377060.htmlhttp://www.aygfsteel.com/tkaven/services/trackbacks/377060.html
1
//鍋囪500涓皬瀛╂墜鎷夌潃鎵嬪洿鐫涓鍦堬紝鏁頒笁灝遍鍑哄湀瀛愶紝鏈鍚庣暀鍦ㄥ湀鍐呯殑灝忓鏄鍑犲彿錛?/span>
2
3
public class Count3Quit
{
4
public static void main(String[] args)
{
5
KidCircle kc = new KidCircle(500);
6
7
Kid k = kc.first;
8
int countNum = 0;
9
while(kc.count > 1)
{
10
countNum ++;
11
if(countNum == 3)
{
12
countNum = 0;
13
kc.del(k);
14
}
15
k = k.right;
16
}
17
System.out.println("鍓╀笅鐨勫皬瀛╃紪鍙鋒槸錛?/span>"+(kc.first.id+1));
18
}
19
}
20
21
class Kid
{
22
int id;
23
Kid left;
24
Kid right;
25
}
26
27
class KidCircle
{
28
int count = 0;
29
Kid first,last;
30
31
32
KidCircle (int n)
{
33
for (int i = 0;i<n;i++)
{add();}
34
}
35
36
void add()
{
37
Kid k =new Kid();
38
k.id=count;
39
if (count<=0)
{
40
first=k;
41
last=k;
42
k.left=k.right=k;
43
} else
{
44
k.left =last;
45
k.right =first;
46
last.right=first.left=last=k;
47
}
48
count++;
49
}
50
51
void del(Kid k)
{
52
if (count<=0)
{return;}
53
else if (count==1)
{first=last=null;}
54
else
{
55
k.left.right=k.right;
56
k.right.left=k.left;
57
if (k==first)
{ first=k.right;}
58
else if (k==last)
{last=k.left;}
59
}
60
count--;
61
}
62
}

]]> - 銆愭瘡鏃ヤ竴棰樸慗AVA錛氱牆鐮侀棶棰?/title>http://www.aygfsteel.com/tkaven/articles/377059.html銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/dc:creator>銆愰犲弽鐨勫瀛愪滑銆慇銆愭祦嫻ぇ鍙旂殑鍏洯銆?/author>Mon, 30 Apr 2012 04:51:00 GMThttp://www.aygfsteel.com/tkaven/articles/377059.htmlhttp://www.aygfsteel.com/tkaven/comments/377059.htmlhttp://www.aygfsteel.com/tkaven/articles/377059.html#Feedback0http://www.aygfsteel.com/tkaven/comments/commentRss/377059.htmlhttp://www.aygfsteel.com/tkaven/services/trackbacks/377059.html 1
package poise;
2
3
/** *//**
4
* 鐢ㄥぉ騫崇О閲嶆椂錛屾垜浠笇鏈涚敤灝藉彲鑳藉皯鐨勭牆鐮佺粍鍚堢О鍑哄敖鍙兘澶氱殑閲嶉噺銆?br /> 5
濡傛灉鍙湁5涓牆鐮侊紝閲嶉噺鍒嗗埆鏄?錛?錛?錛?7錛?1銆傚垯瀹冧滑鍙互緇勫悎縐板嚭1鍒?21涔嬮棿浠繪剰鏁存暟閲嶉噺錛堢牆鐮佸厑璁告斁鍦ㄥ乏鍙充袱涓洏涓級銆?br /> 6
鏈鐩姹傜紪紼嬪疄鐜幫細(xì)瀵圭敤鎴風(fēng)粰瀹氱殑閲嶉噺錛岀粰鍑虹牆鐮佺粍鍚堟柟妗堛?br /> 7
渚嬪錛?br /> 8
鐢ㄦ埛杈撳叆錛?br /> 9
5
10
紼嬪簭杈撳嚭錛?br />11
9-3-1
12
鐢ㄦ埛杈撳叆錛?br />13
19
14
紼嬪簭杈撳嚭錛?br />15
27-9+1
16
杈撳叆錛?br />17
41
18
杈撳嚭錛?br />19
81-27-9-3-1
20
瑕佹眰紼嬪簭杈撳嚭鐨勭粍鍚堟繪槸澶ф暟鍦ㄥ墠灝忔暟鍦ㄥ悗銆?br />21
鍙互鍋囪鐢ㄦ埛鐨勮緭鍏ョ殑鏁板瓧絎﹀悎鑼冨洿1~121銆?br />22
**/
23
24
public class Weight
{
25
26
public static void main(String[]args)
{
27
int input = 106;
28
int[] a , b , c , d , e;
29
a = b = c = d = e = new int[]
{-1,0,1};
30
for (int ai : a)
{
31
for (int bi : b)
{
32
for (int ci : c)
{
33
for (int di : d)
{
34
for (int ei : e)
{
35
if (input == ei*81 + di*27 + ci*9 + bi*3 + ai*1)
{
36
System.out.println("("+ ei*81 + ")+(" + di*27 + ")+(" + ci*9 + ")+(" + bi*3 + ")+(" + ai*1 +")");
37
}
38
}
39
}
40
}
41
}
42
}
43
}
44
}
]]>
主站蜘蛛池模板:
红原县|
克山县|
屯留县|
平武县|
淳化县|
沂南县|
五寨县|
兴海县|
即墨市|
个旧市|
巴彦淖尔市|
蛟河市|
晋江市|
庆城县|
西贡区|
项城市|
灵川县|
山阳县|
商洛市|
贺兰县|
山西省|
慈溪市|
如东县|
土默特右旗|
莱芜市|
宜昌市|
南部县|
民县|
永修县|
东光县|
青铜峡市|
静宁县|
文登市|
古蔺县|
奇台县|
兖州市|
雷波县|
宜君县|
建昌县|
漳州市|
河南省|