Jul 12, 2010

first day java program..

class VolcanoRobot {
String status;
int speed;
float temperature;
void checkTemperature() {
if (temperature > 660){
status = "returning home";
speed = 5;
}
}
void showAttributes() {
System.out.println("Status: " + status);
System.out.println("Speed: " + speed);
System.out.println("Temperature: " + temperature);
}
public static void main(String[] arguments) {
VolcanoRobot dante = new VolcanoRobot ();
dante.status = "exploring";
dante.speed = 2;
dante.temperature = 510;
dante.showAttributes();
System.out.println("Increasin speed to 3.");
dante.speed = 3;
dante.showAttributes();
System.out.println("Changing temperature to 670.");
dante.temperature = 670;
dante.showAttributes();
System.out.println("Checking the temperature.");
dante.checkTemperature();
dante.showAttributes();
}
}

Jul 11, 2010

let hear how our pc talk...

ကုိယ္ႀကိဳက္တဲ့ စားသားထည့္ၿပီး ကြန္ပ်ဴတာကို စကားေျပာခိုင္းမယ္ဗ်ာ..
ဘယ္လိုေပးေျပာမလဲ? ဒီေအာက္က အတိုင္းလုပ္ၾကည့္ပါ..

Notepad ကိုဖြင့္ပါ.ၿပီးရင္ ဒီေအာက္က code ကို copy ယူၿပီး notepad မွာ
paste ထည့္လိုက္ပါ..

Do
Dim msg, sapi
msg="1437 = I Love You"
Set sapi=CreateObject("sapi.spvoice")
sapi.Speak msg
loop

ၿပီးရင္ Talker.vbs လိုနာမည္ေပးၿပီး Save လိုက္ပါ..
ေနာက္ ကိုယ္ save ထားတဲ့Talker.vbs ကို ဖြင့္လိုက္ပါ..1437 = I Love You ဆိုၿပီး ထပ္ခါထပ္ခါ
ေျပာလာပါလိမ့္မယ္..အနီေရာင္နဲ႔ ျပထားတဲ့စာသားကိုကုိယ္ႀကိဳက္တဲ့ စားသားနဲ႔ေျပာင္းလို.ရပါတယ္..

စကားေျပာတာကိုရပ္ခ်င္ရင္ CTRL + ALT + DEL >>ကိုနိုပ္ၿပီး task manager ကိုဖြင့္လိုက္ပါ..ေနာက္ Processes TAB ထဲကိုဝင္ၿပီး wbscript.exe ကို႐ွာပါ ..
ေတြ႔ၿပီဆိုရင္ သူ႔ကို Select ၿပီး End Process ကိုနိုပ္လိုက္႐ုံပါပဲ..အဲဒါပါပဲခင္ဗ်ာ.. :) ။

Installing JDK