Saturday, November 17, 2012

Programming Competition


Assalamualaikum and Sawadhikhap..

For this entry I would like to share about mathematical programming contest. ACM-ICPC, Al-Khawarizmi, and Aturkreatif. Have you heard about it? Actually I just entered one of the competitions I mentioned before, it quite tough. Some of the questions given were clearly stated the objective but having a few conditions that need to follow were challenging.

Special thanks to my University for sponsored me and my friends to participate, lecturers who highly motivated us and my beloved friends. Although our team couldn’t managed to win the competition we have something to share with you guys for the future planning.

  1. Most of the participant who managed to solves many problems usually active in Top Coder. Do visit this website and become a part of that community.
  2. For the beginners who want to see the example and answer of the problem, you can always visit to this site. It contains past set of acm icpc problem.
  3. There is one reference book that commonly used to solve this problem. Programming Challenges: The Programming Contest TrainingManual.
  4. Next is to learn from our colleagues in other University.



I hope some of these tips can help you in the future competition. If you want to try in the pc square environment, I can configure it for you(just for my university). =P 

Tuesday, February 28, 2012

Encapsulation in Java

Assalamualaikum.
Today i will demonstrate how to use Encapsulation in Java.
EnCAPSULation = Capsule means it is data hiding.

It is 1 of 4 fundamental in OOP concept. The others are Inheritance, Polymorphism and Abstraction.
Google it to know more :)

In this tutorial we will create two java file

Customer.java
public class Customer {
    private String customerID;
    private String customerName;
    private String address;
    private int pinCode;
     
    public String getCustomerID() {
        return customerID;
        }
         
    public void setCustomerID (String myCustomerID) {
        customerID = myCustomerID;
        }

    public String getCustomerName(){
        return customerName;
        }
         
    public void setCustomerName (String myCustomerName){
        customerName = myCustomerName;
        }   

    public String getAddress () {
        return address;
        }
         
    public void setAddress(String myAddress) {
        address = myAddress;
        }
                 
    public int getPinCode(){
        return pinCode;
        }
     
    public void setPinCode(int myPinCode){
        pinCode = myPinCode;
        }
    }


EncapsulationTry.java
 public class EncapsulationTry{
 
    public static void main (String [] args){
    // Creating object of Customer Class
    Customer customer = new Customer();
 
    /* Calling setter methods for setting the values of instance variables */
    customer.setCustomerID ("0123");
    customer.setCustomerName ("MFZ");
    customer.setAddress ("Seremban,Negeri Sembilan, Malaysia");
    customer.setPinCode (70400);
    /* Calling getter methods for printing the values of instance variables */
 
    System.out.println ("Customer ID :" + " " + customer.getCustomerID());
    System.out.println ("Customer Name:" + " " +  customer.getCustomerName());
    System.out.println ("Customer Address:" + " " + customer.getAddress());
    System.out.println ("Customer Pin Code:" + " " + customer.getPinCode());
    }
}



Then compile all the java file and run the EncapsulationTry.class
Analyse the result and code, InsyaAllah you can get the point. 


  

Tuesday, February 21, 2012

Assalamualaikum.java (Versi Linux)


Assalamualaikum ( Program JAVA pertama)

Java merupakan antara bahasa programming. Boleh digunakan dalam mana2 platform kerana menggunakan JVM.

Dalam tutorial ini, kita akan menggunakan sistem Linux Ubuntu 11.10 dan Text Editor. Dalam bahasa JAVA penggunaan huruf amat sensitif. Pastikan anda menaip dengan tepat.

Taip 'code' di bawah dalam Text Editor dan 'save' sebagai 'Assalamualaikum.java'


public class Assalamualaikum {

public static void main (String [] args) {
System.out.println ("Assalamualaikum daripada Galaxy!!!");
}
}
Dalam tutorial ini, semua file akan di 'save' dalam '~/Desktop/Galaxy'


'Compile' dan 'run'
Mulakan terminal dan 'compile' Assalamualaikum.java


mfz@mfz-Galaxy:~/Desktop/galaxy$ javac Assalamualaikum.java
'Assalamualaikum.class' akan di'create'. '.class' yang mampu untuk di 'run' di mane2 platform.
Kemudian 'Run' program tersebuat dan anda akan dapat lihat hasilnya.



mfz@mfz-Galaxy:~/Desktop/galaxy$ java Assalamualaikum
Assalamualaikum daripada Galaxy!!!

Tuesday, August 9, 2011

Upgrade Galaxy S anda kepada GINGERBREAD 2.3.4

Assalamualaikum dan Salam Sejahtera.

Dah lame den tak update blog ni. maaf la banyak-banyak. Kekangan masa membuatkan blog aku ni tak diupdate. lagipon tengah cuti semester kan, jadi banyak la aktiviti-aktiviti bersama keluarga ni. Cewahh. ahaha..


Lets back into business. Anda semua tahun kan yang saya guna Galaxy S powered by Enclair, tengak name blog pon dah boleh agak ye tak? Jadi ape yang saya nak kongsi la kan adalah macam mana nk mantapkan lagi Galaxy S korang, (klu gune galaxy S ar)..

Sebelum itu pernah dengar tentang Android Cupcake? Donut? Enclair? Fruyo? n agak latest Gingerbread? Sobonarnyo itu semuonyo adalah OS Smartphone yang based on Android. kalau komputer kiter ade Windows 95, win 98. win 200, win ME, n latest win 8 macam itu la jgak smartphone ni.. Jadi dah paham la kan ape itu Android? bukan ape ramai yang tanye sebelum ini, jadi baek diterangkan sekali saja. hahaha..


Eh tadi kate nk upgrade galaxy kan? haish apela aku ni. jom.. tajuknye: Upgrade OS Galaxy S anda kepada Gingerbread 2.3.4. paling latest ni..

Sebelum nak buat bende ni, meh aku ingatkan dulu;
  1. Risiko memang tinggi. tp kalau buat dgn betul InsyaAllah selamat.
  2. Kadang2 orang tanye tak salah ke amik os ni kat internet. mcm cetak rompak je konsep. So aku jawab. bende ni open source. so takde hal.
  3. Backup file2 korang yang penting. contact2 ke. Kebiasaannye ak sync dengan google. Bila dah selesai nnt boleh sync kan je balik. Link ini juga boleh membantu.Android backup guide.
  4. USB driver. Ini sgt penting. jadi Install dulu. Untuk 32 bit (x86) klik ni. Untuk 64 bit (x64) klik ini.
  5. Firmware. ini kalau tak download memang tak jadi la. Android 2.3.4 Firmware – XXJVP. Filename: XXJVP-234.ZIP. Size: 247.03 MB.
  6. Kemudian Extract file tadi untuk dapatkan isi kandungan yang ini
    1. .CODE_I9000XXJVP_CL264642_REV03_user_low_ship.tar.md5
    2. GT-I9000-CSC-MULTI-OXAJVP.tar.md5
    3. MODEM_I9000XXJVP_REV_00_CL1019177.tar.md5
    4. s1_odin_20100512.pit
  7. Odin3 v1.7.zip - Akhirnye download bende ni juga. ni platform die nanti.
Odin

Mari Mulakan

  1. Off Galaxy. Aktifkan Download mode - Tekan Volume_DOWN + Home + Power.
  2.  Bila dah jadi. sambungkan USB ke komputer dan bukak Odin yang tadi kita download. kalau betul sambungan akan ade tulis "Added".
  3. Seterusnye, ingat lagikan file yang godang2 kita download tadi? Files tu masukkan pada ruangan masing-masing.
    1. PDA - CODE_I9000XXJVP_CL264642_REV03_user_low_ship.tar.md5
    2. Phone - MODEM_I9000XXJVP_REV_00_CL1019177.tar.md5
    3. CSC - GT-I9000-CSC-MULTI-OXAJVP.tar.md5
    4. PIT - s1_odin_20100512.pit
  4. Doa banyak-banyak dan klik pada START. dan proses downloading akan berlaku pada Galaxy S anda.Bila dah selaesai Galxy akan restrt automatic.



Kalau menjadi, Tahniah kepada anda kerana anda sedang menggunakan XXJVP Android 2.3.4 Firmware dalam galaxy S anda. lebih mantap daripada sebelum ini. Boot awal selepas download ni maybe agak lambat sket. jadi tak perlu risau.

Saya dah cuba dan ini hasilnya;
Galaxy S ku yang baru.

Kebanyakan pic kat atas ni selaen hasil tu mmg bukan milik saya. saya lupa rakam time buat ari tu.

Tak dinafikan kat internet sana banyak lagi tutor macam ini tetapi saya tulis ini berdasarkan pengalaman saya sendiri. maybe lebih ringkas dan mudah untuk ikut. Semoga berjaya. Sila komen untuk tanye ape-ape sahaja mengenai topik ini.

Semoga berjumpa lagi,
Wassalam

Saturday, April 23, 2011

Shortcut key secara umum


Shortcut key untuk keyboard secara umum. kebiasaanya kita selalu tercari-cari function semasa menggunakan komputer. jadi, sekarang ini saya dedahkan beberapa shortcut key yang boleh kita aplikasikan. selepas ini takdela tercari-cari kat menu bar tu. lambat nanti. =p


Yang selalu digunakan
  • CTRL+C (Copy)
  • CTRL+X (Cut)
  • CTRL+V (Paste)
  • CTRL+Z (Undo)
  • DELETE (Delete)
  • SHIFT+DELETE (Delete secara permanent tanpa melalui Recycle Bin )
  • CTRL semasa drag item (Copy item yang dipilih)
  • CTRL+SHIFT semasa drag item (Buat shortcut )
  • F2 key (Rename)
  • CTRL+A (Select all)
  • F3 key (Search for a file or a folder)
  • ALT+ENTER (Lihat properties)
  • ALT+F4 (Tutup application)
  • ALT+TAB (Switch antara apps)
  • F4 key Tunjuk  Address bar list dalam My Computer / Windows Explorer)
  • F10 key (Aktifkan manu bar program)
  • F5 key (refr)
  • BACKSPACE (level-up dalam folder)
  • ESC (Cancel)
  • SHIFT semasa masukkan CD-ROM into the CD-ROM drive (Halang daripada autorun)

Standard Microsof punye shortcut;

  • Windows Logo (Tunjuk Startmenu)
  • Windows Logo+BREAK (Show System Properties dialog box)
  • Windows Logo+D (Display the desktop)
  • Windows Logo+M (Minimize all of the windows)
  • Windows Logo+SHIFT+M (Restore the minimized windows)
  • Windows Logo+E (Open My Computer)
  • Windows Logo+F (Search for a file or a folder)
  • CTRL+Windows Logo+F (Search for computers)
  • Windows Logo+F1 (Display Windows Help)
  • Windows Logo+ L (Lock the keyboard)
  • Windows Logo+R (Open the Run dialog box)
  • Windows Logo+U (Open Utility Manager)