Friday, February 20, 2009
Tuesday, February 17, 2009
簡單的multithread
很久沒有寫過programme,連一些很簡單的Java Syntax也要Google,真的要練習練習~
// CounterThread.java
// 1st Argument = No Of Threads
// 2nd Argument = Counter Value
public class CounterThread extends Thread {
public static int counterValue = 0;
public void run(){
for (int i = 0; i < counterValue ;i++){
System.out.println(Thread.currentThread().getName() + "\t" + i);
}
}
public static void main(String arg[]){
if (arg.length==2){
int noOfThreads = Integer.parseInt(arg[0]);
counterValue = Integer.parseInt(arg[1]);
CounterThread [] ct = new CounterThread[noOfThreads];
System.out.println("No Of Threads = " + noOfThreads);
System.out.println("Counter Value = " + counterValue);
for (int i = 0; i < noOfThreads ; i++){
ct[i] = new CounterThread();
ct[i].start();
}
}
else{
System.out.println("Argument incorrct!!");
}
}
}
Sunday, February 15, 2009
Saturday, February 14, 2009
沒有IBM的小黑
因學業關系,得到一部Notebook,就是它....
一部沒有沒有IBM logo的Thinkpad...

而它身上只有小紅點,沒有TouchPad
用了剛剛一個月,對這部機的評價是.... 比起用了2年多,到現在仍是主力的X60,X200應該可以更好。為何是可以更好?留代下回分解!
Config:
| Processor Brand | Intel |
| Processor Type | Core 2 Duo Processor P8400 2.26GHz (3MB L2 cache) 1066MHz FSB |
| Chipset | Intel 45 Express Chipset |
| Memory | 1x 2GB DDR3 1066MHz 2x total RAM slots |
| Intel Centrino Technology | Centrino 2 |
| Memory Max. | 4GB |
| Hard Disk | SATA 160GB 5400rpm |
| Floppy Drive | Optional |
| Optical Drive | DVD+/-RW (External) |
| Audio | High Definition (HD) audio |
| Display | 12.1" Anti-Glare TFT WXGA |
| Resolution | 1280 x 800 |
| Graphics | Intel GMA 4500MHD |
| Video Memory | Up to 256MB shared |
| Video Interface | PCI-e |
| Communications | 56K modem 10/100/1000 LAN Intel 5100 AGN |
| Ports / media | 3x USB 2.0 VGA Audio 5 in 1 Card Reader (SD, SDHC, MMC, MS, MS-Pro) |
| PCMCIA Slots | 1x Express Card |
| Battery | Li-ion / 6-cell |
| Battery Life | Up to 4.5 Hours |
| Operating System | Windows Vista Home Basic |
| Dimension (WxDxH) | 295mm x 210mm x 20.7-35.5mm |
| Weight | 3.14lbs (1.43kg) |
| Pointing Device | TrackPoint |
| Remarks | Active Protection System |
| | Thinklight |
| | Rescue & Recovery |
Subscribe to:
Comments (Atom)



