My Headlines

Monday, November 26, 2012

Koneksi Java ke MySQL dengan JDBC



Berikut contoh class koneksi Java ke database MySQL menggunakan JDBC. Sebelumnya import library MySQL JDBC Driver ke project. Apabila menggunakan NetBean IDE, caranya adalah klik kanan pada Libraries > pilih Add Library… (gambar 1). Setelah itu baru buat java class dengan nama DatabaseConnection, berikut source codenya:



Sekarang kita bisa panggil class tersebut pada class lain, contohnya buat java class dengan nama TesConnection, berikut contoh source codenya:

 


References : http://thesuhu.wordpress.com/2011/11/04/koneksi-java-ke-mysql-dengan-jdbc/
http://bisakomputer.com/koneksi-database-mysql-berbasis-gui-menggunakan-java/

Membuat Syntax Highlighter di Blog

Mudah Membuat Syntax Highlighter di Blog ~ Apakah anda merasa asing dengan istilah tersebut atau bahkan sebaliknya, istilah Syntax Highlighter sudah sering terdengar di telinga anda?. Jangan lupa baca juga Cara Mudah Membatasi Jumlah Tampilan Posting Label Blog
 
Syntax Highlighter atau Penyorotan Sintaks adalah fitur dari beberapa editor teks yang menampilkan teks, terutama source code dalam berbagai warna serta font sesuai dengan kategori istilah. 
Fitur ini memudahkan kita dalam menulis dalam bahasa terstruktur seperti bahasa pemrograman atau bahasa markup serta penulisan berupa syntax-syntax blog. Berikut ini cara membuat syntax highlighter di blog :
1.       Login ke akun blogger anda
2.       Klik Menu Rancangan, lalu pilih Edit HTML
3.       Jangan lupa centang terlebih dahulu
4.       Cari kode ]]></b:skin> dan letakkan kode di bawah ini sebelum kode ]]></b:skin>


5.       Cari kode </head> dan letakkan kode di bawah ini sebelum kode </head>



6.       Cari kode </body> dan letakkan kode di bawah ini sebelum kode </body>



Info :
Setiap mempublikasikan post yang terdapat kode-kode di dalamnya, sobat blogger harus memasukkan kode tersebut seperti contoh d bawah ini!

<textarea name="code" class="c#" cols="60" rows="10">
Kode Yang Akan Ditampilkan Diletakkan Disini
</textarea>

References : http://bangvandawablog.blogspot.com/2012/10/cara-mudah-membuat-syntax-highlighter-diblog.html

Wednesday, November 14, 2012

Disk drive for /boot is not ready yet or not present?

fter a long gap,I am back to Ubuntu from Fedora and I am really impressed by the pleasing interface ‘Lucid Lynx’ comes up with. :-)
After installing Windows XP ,I installed Ubuntu 10.04.The installation process was smooth.But the problem I faced when I restarted the system is, at the splash startup screen.It said ,
The disk drive for /boot is not ready yet or not present.
Continue to wait, press S to skip or M for manual recovery.
I waited for a long time and it is of no use.so I skipped the process and edited some file to mount it automatically.
here is what I did,

1.Open your terminal by ctrl+alt+t or Applications –> Accessories –> Terminal

2.use the below command in terminal,

gksudo gedit /etc/fstab

3.A file will open,find /boot line.It will look something like this ,

/dev/sda2 /boot ext4 defaults 0 0

4.Now open another terminal and use the below command ,

ls -l /dev/disk/by-uuid

5.Now find the UUID for /dev/sda2 and replace the below line in fstab ,

/dev/sda2 /boot ext4 defaults 0 0

as

UUID=a647ea33-74ee-4123-84bf-7edc32e2e39b /boot ext4 defaults 0 0

[Replace the UUID number with your number]

6.save the file and restart the system.It will work fine.The same solution can be addressed for /dev/sda mounting problem.
;-)