顯示具有 COMP 標籤的文章。 顯示所有文章
顯示具有 COMP 標籤的文章。 顯示所有文章

2008年10月5日 星期日

Cleanup of my Computer

才過了一個暑假

最近不知怎麼的,

電腦就像感冒的病人不斷咳嗽般地

風扇一直發出陣陣的不規則起伏的運轉聲~~~

或許是太久沒清理吧!

其實室友Richard也和我說過了,自己還有點不好意思

但是之前一半是忙碌一半是累了想休息(其實是偷懶 XD),

就在剛剛回來的下午,反正大家都還沒回來樂的清閒也比較不會打擾到別人。

就花了半個小時左右用型男COLO借我的螺絲起子和刷子大肆整理一番。

............

在一番小心翼翼溫柔的拂拭之後和短暫的組裝之後。

成果還不錯咧,如果說之前是起伏不定的低頻噪音;

那麼現在則是有如同跑車般低沉穩重的低吼令人放心

2008年7月29日 星期二

OS:Process Terms

http://en.wikipedia.org/wiki/Batch_processing
http://en.wikipedia.org/wiki/Race_condition
http://en.wikipedia.org/wiki/Thrash_(computer_science)
http://en.wikipedia.org/wiki/Data_buffer
http://en.wikipedia.org/wiki/Spooling
http://wiki.answers.com/Q/Different_between_buffering_and_spooling

2008年7月23日 星期三

OS:Scheduling

http://en.wikipedia.org/wiki/Scheduling_(computing)

2008年7月15日 星期二

OS:Interrupt Mechanism

Polling:
http://en.wikipedia.org/wiki/Polling_(computer_science)

Interrupt request:
http://en.wikipedia.org/wiki/Interrupt_request

DMA:
http://en.wikipedia.org/wiki/Direct_memory_access

2007年6月19日 星期二

Java Exercise For ImageIcon

package test;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;

public class Test extends JFrame{
ImageIcon img = new ImageIcon("123456.jpg");
Test(){

JButton abc = new JButton("mo mo ",img);

this.add(abc);
this.setVisible(true);



}
public static void main(String[] args) {
Test a = new Test();
}

}

2007年5月27日 星期日

Java Exercise for inheritance

public class Father {

Father(int x){
//print();
//this.print();
y=x;

}
int y;
public int identity=100;
public int x=0;
public void print(){
System.out.println("print method in Father");
System.out.println("Identity in method \"print\" in Father object "+identity);
}
}


-------------


public class Son extends Father{
private int identity=99;
int y=7;

Son(){
//this in Father in Son
super(9);
super.print();
this.print();

}

public void print(){
System.out.println("print method in Son");

System.out.println("Identity used \"super\"in method \"print\" in Son object :> "+super.identity);

System.out.println("\nIdentity used \"this\"in method \"print\" in Son object "+this.identity);

System.out.println("\nIdentity in method \"print\" in Son object "+identity);
System.out.println("Y in son "+y);
System.out.println("Y in Father "+super.y);
//super.print();
}

}



-------------


public class In {

public static void main(String[] args) {
//Father f= new Father();
System.out.println("-----Partition-----");
Son s=new Son();
System.out.println("-----Partition-----");

Father t=(Father)s;
t.print();
//IMatrix a=new Matrix();
//a
}

}

2007年5月26日 星期六

Java Exercise for enhanced loop

public class arr {
arr() {
show();
}

private void show() {

int[] array = { 1, 2, 3, 4, 5 };
for (int i = 0; i <= 4; i++) {
System.out.print(array[i] + " ");
}
System.out.println("\n\n");
for (int elm : array) {
// elm++;
System.out.print(elm * elm + " ");
}

System.out.println("\n\n");
int[][] arr = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };
for (int[] row : arr){
for (int element : row){
System.out.print(element+" ");
}
System.out.println();
}
}

}

Java Exercise for parse

public class Typical {

public static void main(String[] args) {
final float Pi= 3.1415926f;//float 之後要加入f
int x=1;
float y=2.52f;
double z=3.53;
boolean judge=true;
String str="True";
String numStr="123.9";

System.out.println("This is Pi : "+Pi);
System.out.println("This is judge : "+judge);
judge=Boolean.valueOf(str);
System.out.println("This is judge : "+judge);
try{
print(x);
x=Integer.parseInt(numStr);
print(x);
y=Float.parseFloat(numStr);
print(y);
z=Double.parseDouble(numStr);
print(z);
}
catch(NumberFormatException e){
System.out.println("Wrong Type");
}
finally{
System.out.println("This is Finally Statement");
}
multiTable();

}
static private void print(int a){
System.out.println("\n\n==> "+a);
}
static private void print(float a){
System.out.println("\n\n==> "+a);
}
static private void print(double a){
System.out.println("\n\n==> "+a);
}
static private void multiTable(){
for(int j = 1; j < 10; j++) {
for(int i = 2; i < 10; i++) {
System.out.printf("%d*%d=%2d ",i, j, i * j);
}
System.out.println();
}
}

}

Java Exercise for while

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class loop{
loop() throws NumberFormatException, IOException{
execute();
}
private void execute() throws NumberFormatException, IOException{
int repeat=1;
while(repeat==1? true:false){
BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
System.out.println("\nInput a number to tell if it is odd or even.\nCommand Line :>");

String str=br.readLine();
if(str.equals("exit")){
repeat=0;
break;
}
System.out.println("It is a "+((Integer.parseInt(str))%2==1?"Odd":"Even")+" Number");
//repeat=(Integer.parseInt(str))==-1?0:1;



}
System.out.println("Section Terminated");
}


}