-----------------------------------------------------------
sudo apt-get install sun-java6-plugin
-----------------------------------------------------------
Wednesday, November 18, 2009
Monday, November 16, 2009
How to Solve Probelm in Listining VirginHiz Radio.
On Ubuntu, I've the problem in listening radio in this site
Now, I know the way to listening easy
http://listen.virginradiothailand.com/hitz
install follow:
------------------------------------------------------------------------
sudo apt-get install gstreamer0.10-ffmpeg
sudo apt-get install gstreamer0.10-plugins-bad
sudo apt-get install gstreamer0.10-plugins-ugly
-----------------------------------------------------------------------
Now, I know the way to listening easy
http://listen.virginradiothailand.com/hitz
install follow:
------------------------------------------------------------------------
sudo apt-get install gstreamer0.10-ffmpeg
sudo apt-get install gstreamer0.10-plugins-bad
sudo apt-get install gstreamer0.10-plugins-ugly
-----------------------------------------------------------------------
Labels:
Ubuntu
Sunday, November 15, 2009
How to install Appserv on Ubuntu
sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server phpmyadmin
Press Enter and Input password :)
sudo /etc/init.d/apache2 restart
Press Enter again.
/var/www/ is directory for http://localhost
Saturday, November 14, 2009
Quiz2_set2_2
//Quiz2_set2_2.java
import java.util.Scanner;
public class Quiz2_set2_2 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.print("Input dd : ");
int dd=s.nextInt();
System.out.print("Input mm : ");
int mm=s.nextInt();
System.out.print("Input yyyy : ");
int yyyy=s.nextInt();
System.out.println(printDate(dd,mm,yyyy));
}
public static String printDate(int d,int m,int y){
String[] myM = {"มกราคม","กุมภาพันธ์","มีนาคม","เมษายน",
"พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม",
"กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"
};
return "วันที่ "+d+" เดือน "+myM[m-1]+" พ.ศ. "+ (y+543);
}
}
import java.util.Scanner;
public class Quiz2_set2_2 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.print("Input dd : ");
int dd=s.nextInt();
System.out.print("Input mm : ");
int mm=s.nextInt();
System.out.print("Input yyyy : ");
int yyyy=s.nextInt();
System.out.println(printDate(dd,mm,yyyy));
}
public static String printDate(int d,int m,int y){
String[] myM = {"มกราคม","กุมภาพันธ์","มีนาคม","เมษายน",
"พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม",
"กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"
};
return "วันที่ "+d+" เดือน "+myM[m-1]+" พ.ศ. "+ (y+543);
}
}
Labels:
HomeworkPOP,
Java
Quiz2_set2_1
//Quiz2_set2_1.java
import java.util.Scanner;
public class Quiz2_set2_1 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.print("Input Oparator(+,-,x,/) : ");
String opt=s.nextLine();
System.out.print("Input Number A : ");
int a=s.nextInt();
System.out.print("Input Number B : ");
int b=s.nextInt();
System.out.printf("%d %s %d = %f",a,opt,b,calc(opt,a,b));
}
public static double calc(String s,int a,int b){
double result=0;
if(s.equals("+"))result=a+b;
if(s.equals("-"))result=a-b;
if(s.equals("x"))result=a*b;
if(s.equals("/"))result=a/b;
return result;
}
}
import java.util.Scanner;
public class Quiz2_set2_1 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.print("Input Oparator(+,-,x,/) : ");
String opt=s.nextLine();
System.out.print("Input Number A : ");
int a=s.nextInt();
System.out.print("Input Number B : ");
int b=s.nextInt();
System.out.printf("%d %s %d = %f",a,opt,b,calc(opt,a,b));
}
public static double calc(String s,int a,int b){
double result=0;
if(s.equals("+"))result=a+b;
if(s.equals("-"))result=a-b;
if(s.equals("x"))result=a*b;
if(s.equals("/"))result=a/b;
return result;
}
}
Labels:
HomeworkPOP,
Java
Quiz2_set1_2
//Quiz2_set1_2.java
public class Quiz2_set1_2{
public static void main(String[] args) {
java.util.Scanner s =new java.util.Scanner(System.in);
System.out.printf("Internet Speed : ");
int speed=s.nextInt();
System.out.printf("File Size (MB) : ");
int filesize=s.nextInt();
String time = calSpeed( speed , filesize );
System.out.println("Download time is :"+time );
}
public static String calSpeed(int s,int f){
return ""+(((f*1024)/(s/10))/60);
}
}
public class Quiz2_set1_2{
public static void main(String[] args) {
java.util.Scanner s =new java.util.Scanner(System.in);
System.out.printf("Internet Speed : ");
int speed=s.nextInt();
System.out.printf("File Size (MB) : ");
int filesize=s.nextInt();
String time = calSpeed( speed , filesize );
System.out.println("Download time is :"+time );
}
public static String calSpeed(int s,int f){
return ""+(((f*1024)/(s/10))/60);
}
}
Labels:
HomeworkPOP,
Java
Quiz2_set1_1
//Quiz2_set1_1.java
public class Quiz2_set1_1 {
public static void main(String[] args) {
// TODO code application logic here
java.util.Scanner s =new java.util.Scanner(System.in);
System.out.printf("insert a : ");
int a=s.nextInt();
System.out.printf("insert b : ");
int b=s.nextInt();
System.out.printf("insert c : ");
int c=s.nextInt();
System.out.printf("The result is : %d",calc(a,b,c));
}
public static double calc(int a,int b,int c){
return (Math.sqrt(Math.pow(a, b)+Math.pow(b, c)+Math.pow(c, a)))/(a*b*c);
}
}
public class Quiz2_set1_1 {
public static void main(String[] args) {
// TODO code application logic here
java.util.Scanner s =new java.util.Scanner(System.in);
System.out.printf("insert a : ");
int a=s.nextInt();
System.out.printf("insert b : ");
int b=s.nextInt();
System.out.printf("insert c : ");
int c=s.nextInt();
System.out.printf("The result is : %d",calc(a,b,c));
}
public static double calc(int a,int b,int c){
return (Math.sqrt(Math.pow(a, b)+Math.pow(b, c)+Math.pow(c, a)))/(a*b*c);
}
}
Labels:
HomeworkPOP,
Java
Thursday, November 12, 2009
where we get flex tools for ubuntu.
1.To get The Flex SDK 4 Gumbo (flex sdk are compiler for flex)
http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4
Or
http://opensource.adobe.com/
2.To get The "mxml.vim" and "actionscript.vim" (to make color hilight for flex in vim)
http://www.abdulqabiz.com/files/vim/
3.To get The "flex.vim" (to compile flex in vim)
http://www.vim.org/scripts/script.php?script_id=1746
http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4
Or
http://opensource.adobe.com/
2.To get The "mxml.vim" and "actionscript.vim" (to make color hilight for flex in vim)
http://www.abdulqabiz.com/files/vim/
3.To get The "flex.vim" (to compile flex in vim)
http://www.vim.org/scripts/script.php?script_id=1746
Wednesday, November 11, 2009
Flex SDK Compiling.
คอมไพล์ไฟล์เดียว(Compile a files).
$ mxmlc /path/to/FileName.mxml
or
$ mxmlc /path/to/FileName.as
คอมไพล์ projects ที่ต้องมีการใช้ lib ภายนอก (Compile a projects).
$ mxmlc /path/to/FileName.mxml -output=/path/to/outputfile.swf -library-path+=/path/to/MyLib.swc
or
$ mxmlc /path/to/FileName.as -output=/path/to/outputfile.swf -library-path+=/path/to/MyLib.swc
$ mxmlc /path/to/FileName.mxml
or
$ mxmlc /path/to/FileName.as
คอมไพล์ projects ที่ต้องมีการใช้ lib ภายนอก (Compile a projects).
$ mxmlc /path/to/FileName.mxml -output=/path/to/outputfile.swf -library-path+=/path/to/MyLib.swc
or
$ mxmlc /path/to/FileName.as -output=/path/to/outputfile.swf -library-path+=/path/to/MyLib.swc
Labels:
Flex
Tuesday, November 10, 2009
Subscribe to:
Comments (Atom)
