Tips Agar Blog Ramai Dikunjungi

Pengen bagi2 tips nih buat para blogger Indonesia khususnya biar blog nya jadi tambah bagus dan so pasti dikunjungi banyak orang. Tips berikut ini saya asumsikan untuk blog dari google yaitu blogger.com. Untuk blog yg lain misal wordpress tips ini tetap berlaku kok.

Langsung aja simak tips berikut :
1. Pilih template yang bagus
    Anda bisa pilih template dari blogger atau bisa browse di google dengan keyword "blogger     template". Template yang bagus akan menarik perhatian pengunjung.
2. Publikasikan blog anda
     Anda bisa publikasi kan blog anda ke berbagai milis, tentunya anda harus mempublish     kontent yang sesuai dengan topik milis tersebut, kalo ga bisa disangka spam.
3. Isi kontent yang bagus
    Isilah blog anda dengan kontent2 yang bagus dan bermutu.
4. Gunakan 3rd party publikasi tool
    Banyak sekali situs2 semacam ini seperti feedburner.com
5. Tambahkan kontent menarik diside bar anda
    Aplikasi seperti web counter, subscribe, jam digital akan makin menambah nilai situs anda.

Selamat mencoba.

Trik Untuk Browsing Dan Download Tanpa Batas

Bayangkan anda sedang browsing dengan santai, eh ketika mau browsing kesitus tertentu tiba2 ada message bahwa administrator anda memblok situs tersebut. Atau ketika anda tiba2 mendadak perlu mendownload software/dokumen/musik eh tiba2 administrator anda memblokir akses download anda.

Jengkel dengan ulah administrator anda ?
Ingin browsing dengan bebas ?
Ingin download tanpa batas ?
Simak terus trik berikut ini.

Persiapan :
1. Software 3rd party yaitu http-tunnel bisa didownload gratis dari http://http-tunnel.com atau banyak alternatif lagi anda tinggal search digoogle dengan key "http proxy".
2. Kacang goreng atau kopi hangat untuk menemani anda download software diatas.

Langkah2 yang harus dilakukan :
1. Install software http-tunnel biarkan installasi berjalan dengan option defaultnya.
2. Setelah selesai install, jalankan program tsb. Ketika menjalankan anda akan ditanya serial key, akan tetapi anda masih bisa menggunakan use free service.
3a. Jika anda mau browsing dengan bebas, konfigurasi browser anda.
      *. Firefox 2.xx : Tools -> Option -> Advanced -> Network -> Settings.
          pilih Manual proxy configuration, isi field sbb :
          HTTP Proxy = localhost
          Port                = 1080
          Centang option "Use this proxy server for all protocols"
          Pilih "SOCKS v5"
          No Proxy for = jangan diisi
      *. Opera 9.xx : Tools -> Preferences -> Advanced -> Network -> Proxy Server
          Centang protokol http, isi field sbb :
          HTTP             = localhost
          Port                = 1080
      *. IE 7.xx : Tools -> Internet Options -> Connections -> LAN settings
          Centang "Use a proxy server for your LAN"
          Isi field sbb :
          Address         =  localhost
          Port                =  1080
          Centang "Bypass proxy server for local address"
          
3b. Jika anda mau download tanpa batas, konfigurasi download manager anda.
      *. Getright 5.xx : GetRight Configuration -> Internet -> Proxy
          ditab HTTP Proxy :
                  Centang "Use PASV mode"
                  Centang "Use proxy servers"
                  Isi field sbb :
                  server:port    = localhost : 1080
                  centang option "use HTTP Proxy for FTP address"
                  centang option "Tell HTTP Proxy server to not use caches"
         ditab SOCKS Proxy :
                  Centang "Use PASV mode"
                  Centang "Use proxy servers"
                  Isi field sbb :
                  server:port    = localhost : 1080
                  pilih SOCKS Proxy type   =   SOCKS 5
                  centang option "use SOCKS Proxy with HTTP connection"
                  centang option "use SOCKS Proxy with FTP connection"
       *. Masih banyak lagi program download manager yang tidak mungkin saya bahas semua,            akan tetapi inti nya sama saja, anda tinggal mencari konfigurasi proxy server nya.

Mudahkan ? Happy browsing & download.

10 Kesalahpahaman Tentang Sukses

Kesalahpahaman 1
Beberapa orang tidak bisa sukses karena latar belakang, pendidikan, dan lain-lain.
Padahal, setiap orang dapat meraih keberhasilan.
Ini hanya bagaimana mereka menginginkannya, kemudian melakukan sesuatu untuk mencapainya.

Kesalahpahaman 2
Orang-orang yang sukses tidak melakukan kesalahan.
Padahal, orang-orang sukses itu justru melakukan kesalahan sebagaimana kita semua pernah lakukan Namun, mereka tidak melakukan kesalahan itu untuk kedua kalinya.

Kesalahpahaman 3
Agar sukses, kita harus bekerja lebih dari 60 jam (70, 80, 90...) seminggu.
Padahal, persoalannya bukan terletak pada lamanya anda bekerja. Tetapi bagaimana anda dapat melakukan sesuatu yang benar.

Kesalahpahaman 4
Anda hanya bisa sukses bila bermain sesuatu dengan aturan.
Padahal, siapakah yang membuat aturan itu? Setiap situasi membutuhkan cara yang berbeda. Kadang-kadang kita memang harus mengikuti aturan, tetapi di saat lain andalah yang membuat aturan itu.

Kesalahpahaman 5
Jika anda selalu meminta bantuan, anda tidak sukses.
Padahal, sukses jarang sekali terjadi di saat-saat vakum. Justru, dengan mengakui dan menghargai bantuan orang lain dapat membantu keberhasilan anda. Dan, sesungguhnya ada banyak sekali orang semacam itu.

Kesalahpahaman 6
Diperlukan banyak keberuntungan untuk sukses.
Padahal, hanya dibutuhkan sedikit keberuntungan. Namun, diperlukan banyak kerja keras, kecerdasan, pengetahuan, dan penerapan.

Kesalahpahaman 7
Sukses adalah bila anda mendapatkan banyak uang.
Padahal, uang hanya satu saja dari begitu banyak keuntungan yang diberikan oleh kesuksesan. Uang pun bukan jaminan kesuksesan anda.

Kesalahpahaman 8
Sukses adalah bila semua orang mengakuinya.
Padahal, anda mungkin dapat meraih lebih banyak orang dan pengakuan dari orang lain atas apa yang anda lakukan. Tetapi, meskipun hanya anda sendiri yang mengetahuinya, anda tetaplah sukses.

Kesalahpahaman 9
Sukses adalah tujuan.
Padahal, sukses lebih dari sekedar anda bisa meraih tujuan dan goal anda. Katakan bahwa anda menginginkan keberhasilan, maka ajukan pertanyaan "atas
hal apa?"

Kesalahpahaman 10
Saya sukses bila kesulitan saya berakhir.
Padahal, anda mungkin sukses, tapi anda bukan Tuhan. Anda tetap harus melalui jalan yang naik turun sebagaimana anda alami di masa-masa lalu. Nikmati saja apa yang telah anda raih dan hidup setiap hari sebagaimana adanya.

Diadaptasi dari "The Top 10 Misconceptions About Success", Jim M. Allen. CoachJim.com)

11 Sikap Kegagalan Dalam Pekerjaan

11 Sikap yang menjadi penyumbang kegagalan dalam pekerjaan

Semakin besar tanggung jawab seseorang didalam perusahaan, semakin banyak tuntutan yang harus dipenuhi. Selain pekerjaan yang harus dikelola sebaik mungkin, juga pendekatan yang baik harus dilakukan kepada para rekan kerja, atasan dan bawahan.

Ada banyak orang gagal dalam pekerjaan hanya karena sikap-sikap di bawah ini:
1. Arogansi
Merasa diri paling benar dan yang lain salah

2. Melograma
Selalu ingin menjadi pusat perhatian

3. Volatility
Sulit ditebak, bersikap sesuai mood-nya

4. Excessive Caution
Takut mengambil keputusan

5. Habitual Distrust
Sikap yang selalu curiga ke orang lain

6. Aloofness
Sulit dihubungi dan berkomunikasi dengan orang lain

7. Mischievousness
Peraturan dibuat untuk dilanggar

8. Eccentricity
Selalu ingin berbeda, sehingga terkadang dianggap aneh oleh orang lain

9. Passive Resistance
Tidak yakin dengan apa yang dia katakan

10. Perfectionism
Kebanyakan dianggap salah, hanya sedikit yang benar

11. Eagerness to please
Mengejar popularitas dalam setiap situasi

Adakah kita memiliki salah satu sikap-sikap tersebut ?
Sebaiknya kita semua memikirkan untuk mengelolanya dari sekarang …

Sumber: Disadur dari Why CEOs Fail by David L. Dotlich & Perter C. Cairo; Jossey-Bass, 2003

Trik Telepon Di Wartel Dengan Murah

Trik yang dulu sempet ke-bann ama telkom, tidak tahunya (tempe kali hehehehehe) dibuka kembali! tapi tunggu dulu... yang kebuka ampe sekarang baru tersingkap cuman satu doang, yah lumayan lah ! Langsung aja :

Trik ini bisa digunakan di wartel, tipe apa aja. Yang penting, software wartelnya MEGAKOM, trik ini dicoba sendiri dirumah (ada wartelnya).

Ada kotak kotak yang berwarna biru yang dipalang oleh garis tebel warna merah muda ato kotak warna abu-abu yang dipalang garis tebel warna biru, trus, di pojok kiri atas, ada persegi panjang warna merah muda (tempat nama 'n alamat wartel), nah gini caranya :

1. Dial tuh nomor tujuan, nomor temen kek, sodara kek, embek kek, sapi kek pokoknya nomor telpon yang valid :D
2. Setelah terdengar bunyi tut yang pertama, tekan sembarang tombol sampe nomor di display-nya penuh, contoh:

|---------------|        |---------------------------------|
|081444555666| => | 081444555666111111111111111|
|---------------|        |---------------------------------|


3. nah tambahin lagi tuh satu nomor lagi, entar displaynya akan muncul lagi kalimat "Silahkan tekan" lagi hehehehehe....

4. Setelah puas telpon, tutup telponnya, trus, biar nggak curiga nie orangnya, kamu telpon lagi tuh orang, kalo udah XX menit... tutup deh telponnya, dah kamu bayar deh yang terakhir itu... yang tadi nggak usah, nggak mungkin ada meskipun orangnya nyari ampe printernya rusak (kebanyakan nge-print nota, buat nyari nota ente yang lama itu hehehehehe)

5. Jika kamu sampai masuk penjara gara-gara cara ini, jangan sangkutin saya yah ! (emangnya layangan, bisa nyangkut ?!)


Artikel diatas ini disadur dari salah satu blog phreaker indonesia diedit seperlunya.

JaMU 0607

Sudah lama juga saya tidak hadir diacara JaMU karena banyak halangan entah ujian maupun kuliah (Halangan utama sih males pagi2 kesana, enakan tidur hehe). Tapi JaMu bulan ini saya lihat schedulenya tidak bentrok dengan ujian, jadi kalo 
lancar saya akan  datang kesana.

Buat yg belum tahu JaMU itu apa, saya bahas sedikit.
JaMU merupakan pertemuan rutin para dedengkot java untuk membahas update seputar kemajuan java.

JaMU bulan ini akan membahas Guice, framework dari Google, seperti yang kita ketahui Google akhir2 ini agresif banget menguasai segala bidang, mulai dari search engine, aplikasi word & excel online, blog, sampai akhirnya ke bidang development.

Guice ini menurut pembicara kali ini (Arif), mengalahkan spring yang ribet dan kompleks. Meski saya tidak tertarik dengan spring maupun guice, tapi boleh juga untuk update ilmu.

Berikut ini undangan resminya dari moderator JUG Indonesia yaitu Thomas :
Java Meet Up (JaMU) 07.06 - Jakarta

Tempat:
SUN Microsystem Indonesia
Lantai 13, Gedung Wisma Metropolitan I (WTC Sudirman)
Jakarta

Waktu:
10.00 - 12.00 WIB

Hari/Tanggal:
Sabtu, 30 Juni 2007

Pembicara dan Topik:
Arif Rachim - Guice Framework

Biaya:
-- FREE --

Pendaftaran:
Kirim email ke: jug-indonesia-owner@yahoogroups.com

Subject: [JaMU 07.06] Registration
Content:
Member Information
Name:
Position:
Company:
Website:
Contact Number:
Comment:


Note:

* Tidak ada konfirmasi dari moderator, jadi silakan langsung datang ke acara.
* Registrasi diperlukan untuk keperluan administrasi JUGI dan Sun Microsystems Indonesia.

SQL Toolkit For DBA's


HIPAA. SOX. FACTA. Every DBA needs to get compliant. However, not every DBA has the resources to migrate corporate databases to the new version of SQL Server overnight. Some of us need to be in compliance *yesterday*, but for one reason or another we won't be able to take advantage of the additional security and other high-speed functionality of SQL 2005 until after tax season.

Or after the start of the next fiscal year.

Or after the next presidential election.

You get the point.

So what do we do - those of us who are stuck with good old SQL 2000 with no foreseeable upgrade in sight? One option is to roll your own solutions. Or you could let someone like me do the dirty work for you.

This DBA Toolkit includes over two dozen extended stored procedures to help DBA's and developers who are committed to the SQL 2000 platform to some degree. Some of the tools are designed to add badly needed encryption to SQL 2000; others provide specific SQL Server functionality I've found useful over the years. All are designed to make SQL development and administration a little easier by extending the functionality of your SQL Server.

This series of articles provides the introduction to the Toolkit:
1. This first article will start with a look at the re-birth of SQL 2000 encryption.
2. The second article will discuss the addition of regular expressions to SQL Server via the Toolkit.
3. A third article will address phonetic matching tools in the Toolkit.
4. Finally, I will wrap up this series with a discussion of additional functionality in the toolkit that fits into none of the above categories.

Feel free to use these tools as you see fit. If you find them useful, please drop me a line and let me know which ones you use, how you use them, and what you find most useful.

Enjoy.

Download here http://www.sqlservercentral.com/downloads/DBAToolkit.zip

Bahasa Indonesiaku Tercinta

Bila kita ( anak di Jakarta khususnya ) berbicara dengan teman sebaya kita, atau sesama anak dari Jakarta juga, biasa kita menggunakan bahasa Indonesia. Tapi kalau diperhatikan, sepertinya banyak juga kata-kata / frase yang bukan bahasa Indonesia asli, gak jelas abis asal usulnya, serta maksud dan tujuan dari penggunaan itu. Tapi biasanya penyebarannya sangat cepat, dan langsung dimengerti oleh orang yang bersangkutan. Tapi apabila dimintai penjelasan tentang hal ini, banyak dari orang-orang yang tidak bisa menjelaskannya. Banyak juga orang menyebut bahasa ini dengan sebutan : bahasa prokem (jaman 80s) dan yang males banget kalo gue denger dan paling najis banget adalah "bahasa gaul". Gaul itu sendiri salah satu artinya adalah : banyak teman, jadi bahasanya punya banyak temen dong ???? Kaya orang gitu, punya temennya banyak...
Kita sekarang akan mencoba menguraikan tentang fenomena ini.

Penyimpangan bahasa ini, bisa dikategorikan jadi beberapa kelompok :
1. Kata awalan, sisipan dan akhiran.
2. Frase / ungkapan yang sering digunakan dalam sehari-hari.
3. Kata yang diserap dari bahasa asing.
4. Singkatan
5. Kata / frase yang dapat berubah-rubah sesuai variasi penggunaan dan perubahan waktu.
6. Kata-kata yang mempunyai arti jelas, dan digunakan sebagai pengganti kata asli.
7. Bahasa banci
8. Kata pengungkapa ekspresi
9. Pengunaan "wasa" dalam suatu kata
10. Bahasa yang dibalik
11. Yang bersajak

1. Awalan, sisipan dan akhiran.
Kata-kata ini biasanya yang paling sering banget dipakai dalam suatu pembicaraan sehari-hari. Kita pun secara tak sadar memakainya, karena sudah terbiasa saja. Biasanya kata ini tidak mempunya arti yang jelas, bahkan sama sekali gak ada arti / maksud yang bisa dijelasin. Digunakan hanya sekedar buat penegas.

Contoh :
Awalan : men, nyet, woi , eh, eh jek, eh coy, brur, njing
dalam kalimat "Eh, besok ngapain ?" ; "Woi , dengerin gue gak sih ?"

Sisipan : abis, banget, loh, berat
dalam kalimat : "Gila abis tu orang." ; "Yoi banget tuh!" " ; "Eh, makasih loh udah nelpon gue kemarin."

Akhiran: sih , yak, dong, nih
dalam kalimat : "Iya gak sih ??" ; "Eh, jangan gitu dong!" ; "Begimane nih ?"

2. Frase / ungkapan yang sering digunakan dalam sehari-hari.
Untuk kategori ini banyak sekali contohnya, dan juga sering kurang jelas makna dan tujuannya. Biasanya hanya sebagai celaan atau penyemarak suasana.
Keterangan : Kata "Jayus" sempat mempunyai kedudukan lebih tinggi, karena bila orang ngelawaknya garing / gak lucu atau tu orang gak jelas gimana, biasanya "Jayus lo ah...". Tapi asal usul kata tersebut pun tidak jelas. Banyak mitos / kabar angin yang kasih tau asal usul kata "jayus" itu, namun semuanya hanya isapan jempol belaka.
Kata-kata dalam kategori ini pun juga banyak yang berasal dari kata dalam lirik lagu, jingle iklan, ataupun dialog dalam iklan / televisi, yang akhirnya tersebar luas dan dipakai oleh banyak orang. Contoh : Muke lo jauh...
Atau juga istilah-istilah dalam permainan, yang menunjukan suatu keadaan. Contoh : "Topan!" (sambil nunjukin jempol), yang artinya pause dulu. "Gak aci lo!" , yang artinya gak pas / sesuai / setara.

Contoh :
Selametttt yeeeeee
Iye ? Iye ? selamet yeeeeee
Muke luh tuh bau menyan!!
Auk ah gelap, emang gue pikirin.
Gilingan padi
Yoi Doi Toi
EGP !!! (Emang Gue Pikirin)
Wandaa!! :waa...ndak tau ya
JIJAY BAJAY CAP CAY FU YUNG HAY....
Kasian deh loooooo
Yoi cing
Yongkru
Gigi lo gambreng!
Jayus
Emberrrrr
Oke deh kaka!
Tae ah
SGM : sinting gila miring
Muke lu jauh
Samber gledek !
Jangan jangan jangan jangan
Plis dong ah
Iya lah yaw
Adee apeeee ???
Topan-topan! (Sambil nunjukin jempol)
Ah gak aci lo !
Gak pentingggg
Prikitiwww
Basi
Nggak kuku
Gantung

3. Kata yang diserap dari bahasa asing.
Biasanya hanya 1 kata saja, atau gabungan 2 kata bahasa asing ( Inggris, Belanda atau Cina ) yang menjadi 1 kata dalam bahasa Indonesia.
Contoh :
men = man ; "Ayo men.." ; "Gimane men ?"
top = Top ; "Top abis lo..." ; "Top top..salut gue.."
sit = shit ; "Ah, sit nih sekolah gue sekarang."
tenkyu = thank you ; "Weh, tengkyu banget ya!"
slip = sleep ; "Gue mau slip cepet ah malem ini."
dem = damn ; "Dem! Gue gak lulus nih !"
debes = the best ; "Eh, lo musti nonton Spiderman deh, debes abis tu film."s
plis = please ; "Mau ya jemput gue nanti ?? plisssssss" ; "Plis dong ah!"
kemon = come on ; "Mari kita kemon!" ; "Kemon men.." ; "Ayo kemon!"
ngedrop = drop ; "Ngedrop nih men......"
beep = BF = Blue Film "Nonton beep yuk..." ; "Eh, gue ada beep baru nih...".
1000= seceng ; "Pinjem seceng dong buat parkir"
10.000 = ceban ; "Anjingggg rokok kaya ginian ceban !!"
50.000=goban ; "Eh, lo kan minjem goban ama gue, nanti loe bayar ke anu aja!"
eike = saya
yey = kamu

4. Singkatan
Dalam bahasa sehari2, banyak juga dijumpai singkatan-singkatan yang gak jelas, sering membuat orang salah paham, gak ngerti dan terkadang malah norak, tapi ada juga yang bermaksud mencela / nyindir sesuatu.
Contoh :
EGP : emang gue pikirin
ABG: angkatan babe gue, anak baru gede, alat bantu goyang, anak buah gorgom
Nyandu = nyantai duluuuuuuuuuuu
Jibang : jijik banget
Gatoooott : gagal total
PW : posisi wuenak
Sakaw = sakit putaw
Mapet = maruk pete
Ardath : aku rela diperkosa asal tidak hamil
Jarum Super : jarang di rumah suka pergi
Titi DJ Dedi Dores : hati hati dijalan dengan diiringi doa restu
SGM : sinting gila miring
Harmoko : hari hari omong kosong ?
Habibi : hari hari bikin bingung ??

5. Kata / frase yang dapat berubah-rubah sesuai variasi penggunaan dan perubahan waktu.
Dalam bahasa sehari-hari, bannyak kata-kata yang emang udah aneh / gak jelas, namun karena sakin sudah lamanya dipakai, makan mengalami perubahan bentuk.

anjing : sinjing, sinjrit, anjir, anjrit
ya udah : ya udin, ya suw, ya sud, ya sutra lah
Najis = najong
kasian deh lo : cucian deh lo, education deh lo, conversation deh lo, kasino deh lo ( apalagi kalau pake gerakan tangan, bikin makin enek )

6. Kata-kata yang mempunyai arti jelas, dan digunakan sebagai pengganti kata awal.
Kata ini biasa menggantikan kata awal yang dianggap kasar / kurang pantas diucap pada saat tertentu. Atau juga hanya sebagai pengganti saja tanpa maksud lain, atau mungkin sebagai "penunjuk status", jadi apabila memakai kata ini, maka orang itu akan dicap / dianggap mempunyai status tertentu. Bisa juga digunakan agar orang lain (biasanya orang tua / guru) tidak dapat mengerti pembicaraan kita. Banyak kata ini dari angkatan 80an.
Contoh :
Tool, otong, burung = alat kelamin pria
Nyemok = ngerokok
Ngokar = ngerokok
Madol = cabut
Giting = mabok
Neken = triping
Cucaw = nyuntik
Mete = make pete
Cabs = cabut
Doku = uang
Boil = mobil
Sepokat = sepatu
Bonyok = Bokap Nyokap = papa mama
Doi, doski = dia / beliau ; pacar

7. Bahasa banci
Bahasa ini banyak dipergunakan oleh banci. Mungkin awal mulanya mereka kali yang nyiptain, gak jelas juga. Intinya ya gitu, berkesan norak dan paling susah dimengerti oleh orang awam. Menurut pola katanya, jadi diambil suku kata pertama dari kata aslinya, lalu dibuat kata lain yang suku kata pertamanya sama seperti kata aslinya. Contoh : Emang menjadi ember, kencing menjadi kencana.
Contoh :
Gilingan = gila
Lambreta = lama
Akika = aku
Ember = emang
Mawar = mau
Kencana = kencing
(kita gak bisa kasih contoh banyak, soalnya kita gak ada yang banci..)

8. Kata pengungkapan ekspresi
Kata ini sama sekali tidak ada hubungannya dengan apa yang dimaksud....liat aja deh contohnya....sama sekali gak jelas.

Contoh :
Kaget / gak percaya akan sesuatu
Yang gak jelas banget
Astaganaga!!
Ah mukegile lu!!!
Asli lo ????
Yang boneng ting?
Sumpe lu ??
Kadal mleduk!!
Amit-amit jabang bayi!!
Gile mek!
Yoi pace!
Taek banget!
Malesbanget!

9. Pengunaan "wasa" dalam suatu kata:
Ini yang sampe sekarang belom jelas asal usul dan maksudnya
Contoh :
Anjing = wasainjing
Titit = wasaitit

10. Kata yang dibalik :
Susunan katanya dibalik menurut suku katanya / urutan huruf-hurufnya, bertujuan untuk menyamarkan arti kata aslinya.
Contoh :
wece = cewe
etep = pete
ubas = shabu
ngiprit = triping
giting = tinggi
bais = abis


11.Yang bersajak :
No woman no cry
No school nongkrong
No money nodong

Bersatu kita teguh
Bercerai kita kawin lagi


"....bicaralah dengan bahasa yang dimengerti oleh semua orang, bukan dengan bahasa yang tertera di buku...."

Textpad Configuration

Susah mengcompile dengan textpad ?
sering menemukan masalah error class not found ?
import class bermasalah ?
Ini solusinya.

Jika ingin mengcompile dengan include library tertentu misalnya log4j, junit :
Masuk ke Configure -> Preferences -> Tools -> Compile Java
Dibagian parameters isi dengan -classpath ".;C:\library\log4j.jar" $File

Jika ingin mencompile dengan menginclude class yang sudah kita buat :
Masuk ke Configure -> Preferences -> Tools -> Compile Java
Dibagian parameters isi dengan -classpath "(ROOT_PROJECT)" $File
Contoh : -classpath "C:\MyProject\src" $File

Download textpad di http://www.textpad.com/

Yahoo Mail Now Has Unlimited Storage


Unlimited Storage!


Q : How does unlimited storage work?
A : It’s pretty straightforward—users that follow normal email practices and comply with our anti-abuse limits can consume an unlimited amount of free email storage. This will apply to both new and existing users.


Q : Wait – what? Wow!
How can Yahoo! afford to give away unlimited email storage?
A : By hiring outstanding engineers, of course! Ours have been hard at work developing an incredibly efficient backend storage system. Protected by responsive anti-abuse controls, this updated storage system gives you the option to never delete another email! Unless, of course, you want to.


Q : How will you prevent abuse?
A : Responsive anti-abuse controls enable us to effectively identify anyone who’s taking advantage of Yahoo!’s email service. We want to ensure that everyone benefits from unlimited storage!


Q : What exactly does unlimited storage mean?
A : The purpose of unlimited storage isn’t to provide an online storage warehouse. Usage that suggests this approach gets flagged by Yahoo! Mail’s anti-abuse controls.


Unlimited storage gives normal email account users like yourself an opportunity to not have to worry about hitting a storage limit. Basically, the idea is that now you can save your correspondence and memories and never worry about deleting older messages to make room for more.

http://www.yahoo.com

Calon MA (Mahasiswa Asyiieekkk) Part 2

Ini story lanjutan dari yang pertama, saya buka http://registrasi.binus.ac.id/krs kemarin tgl 11 juni 2007 karena saya kena sanksi akademis jadi saya baru bisa isi krs bulan juni sementara teman2 saya yang lain sudah mengisi dari tanggal 22 mei 2007.

Setelah saya lihat2 mata kuliah nya, ternyata banyak sekali matakuliah yang dibuka di krss akan tetapi di krs ternyata ditutup. Beberapa matakuliah yang justru penting bagi kelulusan saya ternyata tidak dibuka. Karena sebab itulah dari total hak 23 sks saya cuma saya ambil 18 sks, sehingga saya sudah rugi 5 sks yaitu sekitar 500rb. Dan lagi diantara 18sks yang saya ambil itu kebanyakan kelas pagi, jadi kemungkinan saya tidak akan mengikuti kuliah yang pagi tersebut. Lagi2 jengkel karena di krss jelas ada pilihan malam, tapi ternyata di krs tidak ada.

Mengapa ini terjadi ?
Apakah saya kurang proaktif dikampus ? Atau pihak Binus yang kurang informatif ? Atau bagian LIM yang kurang profesional ? Atau apa ?
Yang jelas setelah pengisian krss saya sudah konsultasi 2x dengan bagian LIM perihal pengisian krs dan kemungkinan skripsi smt 9, akan tetapi mereka TIDAK memberitahukan tanggal autodebet yang jelas2 penting sekali. Saya jelas kecewa sekali dengan hal itu karena dengan gagal autodebet saya kena sanksi akademis yang berujung menyusahkan saya dalam mengisi krs karena tidak bisa batal tambah dan mengisi krs terlambat. Saya tidak bisa aktif lagi dikampus dikarenakan kesibukan saya dikantor. Saya harus bersikap profesional dikantor. DiBinus terdapat banyak sekali mahasiswa, seharusnya pihak binus mempunyai cara menangani tipe mahasiswa pekerja seperti saya ini. Kini harapan saya untuk lulus smt 10 sepertinya makin kecil.

Optimize Rails on Oracle


By Luca Mearelli [http://spazidigitali.com]

Using the Ruby on Rails framework it is relatively easy to develop complex systems that are backed by an Oracle database, but this ease doesn't exempt the developer from the need to optimize the data model and the code that manipulates it.

This article is for developers working with Ruby on Rails applications on an Oracle database, with special attention to those having a live application that needs to be optimized. You will learn which options tweak the parameters that handle the connection to the database for the Oracle adapter to boost the application performance, as well as get a useful plugin to track down the query execution plans for live applications. You'll build a simple set of models and look at various typical queries on them, exploring how you can improve their efficiency.
Setup

The prerequisite to follow this article is having Ruby on Rails installed and configured properly to connect with an Oracle database. "The Ruby on Rails with Oracle FAQ" by Casimir Saternos explains the process in detail. (It's quite easy.)

All the examples for this article have been written and tested on a Windows XP machine running Instant Rails 1.5 preview 1 connecting to Oracle Database 10g Express Edition (XE) installed on Debian Linux.

For the remainder of this article I will make examples based on a Rails "version" of the HR schema that has been modified to directly comply with the common Rail conventions (as opposed to using the standard HR schema from a Rails application, explained in Saternos' "HR Schema On Rails"). This choice has been dictated by the wish to show the behavior of a standard Rails application on an Oracle database without being distracted by the specifics of handling a separate schema to map the HR schema into the Rails conventions. (Which is indeed a very clever way to handle legacy schemas!)

In the sample code file you will find the complete migrations for the schema and a (yml format) dump of the data which can be used to load them using the Active Record fixtures plugin, which is also included. (The db/db_loading.rb file does the data import and can be executed using script/runner).

The six tables are populated by the very same data that the regular HR schema holds, while they have some columns modified. (E.g., all of them now use the common Rails convention of having one id column as their primary key.)

The models also define some relations among them; you can see the full code for the models in the sample code file:

class Country < ActiveRecord::Base
belongs_to :region
has_many :locations
end

class Department < ActiveRecord::Base
belongs_to :manager, :class_name => "Employee", :foreign_key => "manager_id"
belongs_to :location
has_many :employees
end

class Employee < ActiveRecord::Base
belongs_to :department
belongs_to :manager, :class_name => "Employee", :foreign_key => "manager_id"
belongs_to :job
belongs_to :department
has_many :managed_employees, :class_name => "Employee", :foreign_key => "manager_id"
end
class Job < ActiveRecord::Base
has_many :employees
end

class Location < ActiveRecord::Base
belongs_to :country
has_many :department
end

class Region < ActiveRecord::Base
has_many :country
end

All our tests will be done simply by connection with the Rails console and interactively querying the database through the model methods as we would do from within our controllers:

C:\Progetti\ArticoliROR\Oracle\project> ruby script\console
Loading development environment.
>>

Part 1: Of configuration, Cursors, and Rows
Basic Configuration

So, you have already configured all the required prerequisites for running Rails on an Oracle database, and bootstrapping your Rails application is just a matter of opening a prompt window (terminal, xterm, or whatever) and typing:

rails myapp

This will reward you with a skeleton application that is ready to hold your code (models, views, controller and tests). You will need to customize the config/database.yml file telling the framework basic information for each one of the databases that Rails uses.

Each entry is identified with a key that tells the system if the specific information is to be used while developing the application, while running the tests or when running the application in production mode. You could even define other database connections beyond the standard three and use them from your Rails application, but this subject goes beyond the scope of this article.

Having separate database settings means that you may modify the values in the development or testing database and conduct your tests and measures without touching the production database.

Here is an example of the basic configuration:

development:
adapter: oracle
host: DEBIAN
username: rails
password: rails

The adapter parameter specify that we are connecting with an Oracle database and selects the OracleAdapter (see: activerecord/lib/active_record/connection_adapters/oracle_adapter.rb ). Older Rails releases used the 'oci' value to identify the oracle adapter, and this value can still be used.

With the host parameter you specify the database to which you want to connect. If you have configured TNS entry for your database:

DEBIAN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.211.55.7)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)

you may use its name for the host parameter; otherwise, you can use the Easy Connect naming convention to address the Oracle instance (host: //10.211.55.7:1521/XE).

The username and password are the credentials you want to use for your application. All the objects (tables, sequences) needed by the application should be accessible from this user and anything built thorough the database migrations will be built into this user's schema (at least this is the default behavior).
Models and SQL Queries

Now we will look at some of the queries that are generated by ActiveRecord, and this is made simple by the fact that while in development mode Rails writes all the queries it is performing to the log file. In this manner you can familiarize yourself with the behavior of the framework and gain greater confidence in what the tool will do.

I find that having a deeper understanding of how the framework code is going to translate your high level requests into actual SQL is a required step when working with powerful frameworks that make complex interactions with the data. You will gain a better understanding of the Rails idioms that should be used and how to write more efficient code.

One of the most common ways to get the model data is looking up an object by its id:

emp = Employee.find(202)

will get you the employee record with id = 202. Looking at the development.log we will see the queries that are getting executed:

Employee Columns (0.120000)
select column_name as name, data_type as sql_type, data_default, nullable,
decode(data_type, 'NUMBER', data_precision,
'FLOAT', data_precision,
'VARCHAR2', data_length,
null) as limit,
decode(data_type, 'NUMBER', data_scale, null) as scale
from all_tab_columns
where owner = 'RAILS'
and table_name = 'EMPLOYEES'
order by column_id

Employee Load (0.070000) SELECT * FROM employees WHERE (employees.id = 202)

The first query is executed once the first time a model class is loaded to pull the columns from the employee table allowing the system to dynamically generate the required methods for the model based on the database structure. (This is one of those features that make Rails development really quick!) Be warned that while doing your activity and running the server in development mode you will see this query repeated many times as the models get reloaded on each browser request. This makes the server slower but allows you to get the updates to the database structures without restarting the server.

The second query gets the data from the employees table for the employee whose id is 202.

Other examples of the models may be the following (all presented with the actual query executed on the database):

Given an employee, get its department manager.

mgr = emp.department.manager

SELECT * FROM departments WHERE (departments.id = 20)
SELECT * FROM employees WHERE (employees.id = 201)

Given an employee, get all the colleagues at the same department.

emps = emp.department.employees

SELECT * FROM employees WHERE (employees.department_id = 20)

mgr.managed_employees

SELECT * FROM employees WHERE (employees.manager_id = 201)

You may use the include option to pull down in a single query from the server also objects which have some relation with our entity:

emp = Employee.find(202, :include=>[:department,:manager])
emp.department
emp.manager

SELECT employees.id AS t0_r0, employees.commission AS t0_r1, employees.job_id AS t0_r2,
employees.manager_id AS t0_r3,employees.salary AS t0_r4, employees.hire_date AS t0_r5,
employees.phone_number AS t0_r6, employees.department_id AS t0_r7,
employees.first_name AS t0_r8, employees.last_name AS t0_r9, employees.email AS t0_r10,
departments.id AS t1_r0, departments.name AS t1_r1, departments.manager_id AS t1_r2,
departments.location_id AS t1_r3, managers_employees.id AS t2_r0,
managers_employees.commission AS t2_r1, managers_employees.job_id AS t2_r2,
managers_employees.manager_id AS t2_r3, managers_employees.salary AS t2_r4,
managers_employees.hire_date AS t2_r5, managers_employees.phone_number AS t2_r6,
managers_employees.department_id AS t2_r7, managers_employees.first_name AS t2_r8,
managers_employees.last_name AS t2_r9,
managers_employees.email AS t2_r10 FROM employees LEFT OUTER JOIN departments
ON departments.id = employees.department_id LEFT OUTER JOIN employees managers_employees
ON managers_employees.id = employees.manager_id WHERE (employees.id = 202)

This is really handy and efficient when working with objects behaving as containers for sets of other items as it avoids going to the database with a query for each and every row you want to manipulate.

Here's another example:

job = Job.find(id,:include=>:employees)
job.employees

SELECT jobs.id AS t0_r0, jobs.job_title AS t0_r1, jobs.min_salary AS t0_r2,
jobs.max_salary AS t0_r3, employees.id AS t1_r0, employees.commission AS t1_r1,
employees.job_id AS t1_r2, employees.manager_id AS t1_r3, employees.salary AS t1_r4,
employees.hire_date AS t1_r5, employees.phone_number AS t1_r6,
employees.department_id AS t1_r7, employees.first_name AS t1_r8,
employees.last_name AS t1_r9, employees.email AS t1_r10 FROM jobs LEFT OUTER JOIN employees
ON employees.job_id = jobs.id WHERE (jobs.id = 7)

One of the points of this article is to show you the new configuration parameters introduced with the release 1.2 of Rails that may help in tuning the database-related performance of your application, but before going deeper into it let me explain how currently Rails builds the actual SQL used.
Bind Variables and Cursor Sharing

ActiveRecord uses its (dynamically built) knowledge of the models and database to create queries on the fly. It even builds many methods of the models themselves in this way allowing the developer to write things like:

Employee.find_by_first_name_and_last_name('Steven','King')

but it does so by building the SQL query as a string and doing parameter interpolation before sending the query to the adapter for execution (without using bind variables). SQL injection and security problems are attacked at the adapter level by quoting the values on SQL interpolation but the performance hit remains, and it also impacts the scalability of any Rails application running on Oracle. To understand how this impacts performance and scalability, let me explain what happens when a query is executed.

When a query is first executed Oracle performs a hard parse step which verifies that it is syntactically correct and that all the objects (tables, columns, ...) being accessed really exist. If the checks pass, a new entry is created in the library cache with the parse results that may be reused for subsequent executions. The key to the library cache is the SQL text for the query itself, therefore two queries that have any literal difference are considered different for the purposes of parsing.

When a new query is executed, a hash lookup into the library cache is done to see if the query had been already parsed. If the query is found then the cached parse result is used and the hard parse step is avoided, moreover no new entries are added to the library cache. A way to minimize hard parses is to always use bind parameters.

Within the context of a pre-1.2 Rails application, without any specific database tuning this means that each time a different query is executed (even if it differs just for the parameter values), the statement is hard parsed by the database engine and a new query entry is inserted in the library cache.

You can verify what happens by looking at the v$sql view where the sql_text column holds the actual SQL used for the queries: each row in v$sql corresponds to an entry in the library cache. We may use the following query to get all the queries generated by our application (limiting ourselves to the queries that hit one of the 6 tables):

select sql_text from v$sql
where ( lower(sql_text) like '%employee%'
or lower(sql_text) like '%countries%'
or lower(sql_text) like '%departments%'
or lower(sql_text) like '%jobs%'
or lower(sql_text) like '%locations%'
or lower(sql_text) like '%regions%'
)
and not lower(sql_text) like '%v$sql%'
order by sql_text
If we do the following:
(1..200).each do |id|
Employee.find(id) rescue nil
end

which tries to get each Employee with id between 1 and 200. You'd end up with the following in v$sql:

SQL_TEXT
--------------------------------------------------------------------------------
SELECT * FROM employees WHERE (employees.id = 1)
SELECT * FROM employees WHERE (employees.id = 10)
SELECT * FROM employees WHERE (employees.id = 100)
SELECT * FROM employees WHERE (employees.id = 101)
...

This is not an advisable behavior from an application expected to scale, especially for the common patterns of use where you may expect many queries using the primary key (e.g. accessing to the user table for login purposes or for configuration data).

Work is under way to provide Rails with proper handling of bind variables, or at least to let ActiveRecord adapters themselves do the binding of parameters within the query. In the meantime the best option is to use the ability to handle query rewriting built into the database.

A specific configuration offered by Oracle comes to the rescue here. The CURSOR_SHARING database parameter changes the way the database behaves doing hard and soft parses in presence of queries that are not using bind parameters. The parameter can be set to exact, similar, or force (and the latter can be set databasewide or on a specific session).

* exact is the default value where the database behaves as outlined above.
* force tells the database to rewrite all the queries substituting the literals in the SQL text with bind parameters (e.g. :"SYS_B_0") resulting in one parsed entry for each query.
* similar rewrites the query but also looks at the effect of such rewrite and generates different entries in library cache for queries that would end up using different execution plans—that is, if substituting the literal with a bind parameter would end up in a different plan being executed then the replacement is not done.

Before Rails 1.2, to change the cursor sharing setting you'd need to change it for the entire database instance or patch the ActiveRecord adapter. From the last major release an adapter configuration parameter has been added to do just that.

The cursor_sharing setting can be used in database.yml to choose the preferred value without messing with the global database parameters (thus being better citizens in an heterogeneous environment where other applications may require different settings).

development:
adapter: oracle
host: DEBIAN
username: rails
password: rails
cursor_sharing: similar

Its value is used straight in an alter session statement upon establishing a connection (in OracleConnectionFactory.new_connection):

conn.exec "alter session set cursor_sharing = #{cursor_sharing}" rescue nil

Moreover the default value has been chosen to be similar, which means that without needing to add cursor_sharing to the parameters you get a reasonable behavior: the queries are changed according to the plan that would be used depending on the values.

If you redo the query above you'll see this in v$sql:

SELECT * FROM employees WHERE (employees.id = :"SYS_B_0")
just one library cache entry for any Employee.find(id) call.

To see the impact of similar vs. force, update the table to have some skewed data:

Employee.find(:all).each do |emp|
emp.salary = 3000 unless emp.id == 100
emp.save
end

You updated all the records to have a salary of 3,000 except for the one whose id equals 100. Now you can add an index to the employee table from within the Rails project by generating a migration:

C:\Progetti\ArticoliROR\Oracle\project>ruby script/generate migration AddIndexes
exists db/migrate
create db/migrate/007_add_indexes.rb

In the generated file you should have

class AddIndexes < ActiveRecord::Migration
def self.up
add_index :employees, :salary, :name=>:idx_emp_salary
end

def self.down
remove_index :employees, :name=>:idx_emp_salary
end
end
then we do a rake db:migrate from the command line. Now if we do:
Employee.find(:all, :conditions=>["salary = ?", 24000])
Employee.find(:all, :conditions=>["salary = ?", 3000])

You'll find two parsed entries in v$sql:

SELECT * FROM employees WHERE (salary = :"SYS_B_0")
SELECT * FROM employees WHERE (salary = :"SYS_B_0")

This is because the two queries generated would use two different plans depending on the salary value. (In the first case the index would be used while in the second case a full table scan would result being the best plan.) Using force cursor sharing would tell the database to use to the same parsed entry for both queries which is not what we want in this case, even if it meant having only one cache entry.

Having a configuration available for this from Rails, let's tune its value on a per-application case, depending also on which kind of data you have and on which patterns of use you are seeing for your application.

A second parameter added to Rails 1.2, which may help in tuning the application, is the prefetch_rows configuration. This allows setting the OCI_ATTR_PREFETCH_ROWS connection parameter, which specifies the amount of rows to be pre-fetched from the database on each round trip. It can give a great performance boost in all cases where you want to fetch many rows.

Typical patterns are iterations over a set of entities like in:

Employee.find(:all, :conditions=>"salary < 5000")

In these cases rows pre-fetching means fewer hits to the database, while the cost is more memory used by the adapter—which is not a problem anyway if you want to process all the rows returned by the query.

The default value is set to 100 which has been identified by the Oracle adapter contributors to be ideal in a range of test cases, but more than for cursor_sharing the prefetch value needs to be tweaked by benchmarking with the real data-sets and queries used in the application. For custom tuning this parameter is set in database.yml as usual:

development:
adapter: oracle
host: DEBIAN
username: rails
password: rails
prefetch_rows: 100

Part 2: Execution plans and Indexes
What Rails Cannot Do

While Rails goes great lengths toward reducing the burden of development through a clever use of conventions and design pattern implementation, there are situations where it cannot have the required knowledge to make the decisions for the developer. Thus, the Rails developer should not forget that he or she is building a database-backed application, nor which database he or she is developing for.

While most of the coding is doable in a fairly database independent way a good understanding of how a database works is required if you want to get the best performance out of your applications.

Knowing how your database works is useful while developing the data model and while building the queries, but it is much more important when deciding which indexes you need on your tables. This is something that the framework cannot do and does not even attempt to do, as it would depend on:

* the specific database that is used (as it might have or not have some capability when it comes to creating and using indexes)
* the data that is present in the tables (as they influence the query execution plan and which indexes are used)
* the specific application (as the actual queries used may access the data in unpredictable ways based on usage patterns)

Moreover these factors influence each other and any optimization will depend on all of them collectively. In his blog post "Indexing for DB Performance", Jamis Buck gives some tips on the kind of indexes that might be needed:

* foreign keys (has_one, belongs_to, has_many, ... relations)
* non-index fields that are frequently queried upon (e.g. login names)
* columns where you sort of do calculations frequently
* sets of columns that are used as conditions together

Each index adds some overhead as it needs to be updated on data insert and update, so you should not add indexes for every column (or combination of them). Rather you should make informed choices starting with some reasonable set of indexes, modifying them as the application evolves over time, taking into account the actual data and usage patterns.
Explain Plan. In an Oracle context, this means using the explain plan command to understand how queries are executed. It gives the developer a way to optimize the query itself and to eventually add indexes.

You should always try to optimize the query first and only afterward go on to add the indexes.

Rails makes it rather easy to use custom queries instead of a regular one with the handy find_by_sql method of ActiveRecord. Note however that in the find_by_sql call you could simply pass the text of the SQL query, but you should really confirm that you use the parameter substitution form, passing an array with the query and the list of parameters. This way you can use the parameter quoting that is in the database adapter and you make sure that you will use real bind variables in future when ActiveRecord supports them without the need to modify your code.

Query_Analyzer Plugin. While looking for bottlenecks in your application it is important that you get to know which queries are executed. The Rails log files can be really useful here, as the application while running in development mode logs all the actual queries. They might be collected and examined one by one to find the queries and generate the execution plans. This can become tedious work. The query_analyzer plugin helps relieve the burden by dumping the explain plan output in the log file. You can get an Oracle compatible release here; it was originally developed by Bob Silva for MySQL. To install it just unzip the archive contents in the vendor/plugins directory on your Rails project.

To allow the plugin to work in Oracle the database user will need to be given enough privileges on the data dictionary tables that are queried on loading the model. The following statement will do it:

GRANT SELECT ANY DICTIONARY TO <>;

The plugin monkey patches the database adapter to add the explain plan for each query that is executed by the adapter while running at a logging level below INFO. The plan is formatted and printed at the debug level to the default logger. This default behavior makes sure that the plan is not executed while running on the production environment.

Two parameters are available to modify the default behavior; both can be modified within the environment setup files: The plan_table_name parameter can be used to specify the name of the plan table and its default is the standard PLAN_TABLE; the plan_details parameter can be used to specify which details should be printed by the explain plan statement. Possible values are:

* BASIC: displays minimum information
* TYPICAL: displays most relevant information (default value)
* SERIAL: like TYPICAL but without parallel information
* ALL: displays all information

If you execute a common query:

Employee.find(101)

it will dump the following data to the development.log file:


Employee Load (0.000000) explain plan for SELECT * FROM employees WHERE (employees.id = 101)
Analyzing Employee Load
plan_table_output
-------------------------------------------------------------------------------------------
Plan hash value: 1171009080
-------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 719 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| EMPLOYEES | 1 | 719 | 2 (0)| 00:00:01 |
|* 2 | INDEX UNIQUE SCAN | SYS_C004026 | 1 | | 1 (0)| 00:00:01 |
-------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("EMPLOYEES"."ID"=101)

Note that the query uses a unique index related to the primary key for the table; in this case, nothing needs to be done.

Leaving the plugin active (setting a debug level of informations) allows you to collect the plan table outputs for all queries while running the application.

The plan table outputs a lot of information on the queries. You can quickly spot the tables that may need a new index by searching for 'TABLE ACCESS FULL' in the log file.


Employee Load (0.010000) explain plan for SELECT * FROM employees WHERE (first_name = 'Stephen')
Analyzing Employee Load
plan_table_output
-------------------------------------------------------------------------------
Plan hash value: 1445457117
-------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 719 | 3 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| EMPLOYEES | 1 | 719 | 3 (0)| 00:00:01 |
-------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("FIRST_NAME"='Stephen')
Note
-----
- dynamic sampling used for this statement

This is the result of querying all the employees that have first name 'Stephen': Employee.find(:all, :conditions=>["first_name = ?", "Stephen"]).

Note that this query needs to scan the full EMPLOYEES table to get just one row when using a filter on the first_name column. If this kind of query is seen many times through the application, you should consider adding an index. The predicate information for the more costly operations gives you a good hint at what indexes may benefit the query execution—in this case, obviously an index on the first_name column.
Rails Migrations. You can also use Rails Migrations to manage indexes. (See the API docs for more information on what Migrations are and how to use them to manage a database schema.) To add an index use:

add_index table_name, column_names, options = {}

this adds an index on "table_name" for "column_names" where the latter can be a single column or a list of columns:

add_index :departments, :manager_id
add_index :locations, [:city, :postal_code]

Within the options parameter you can specify if the index is to be created as unique:

add_index :locations, [:city, :postal_code, :street_address], :unique => true

or with a given name. (This is useful on Oracle since the default is to use a combination of table name and first column name, which can be too long.)

add_index :locations, [:city, :postal_code], :name => :idx_city_zip

To remove an index just use the remove_index method:

remove_index table_name, options = {}
we can pass as options the column name(s) or the index name:
remove_index :departments, :manager_id
remove_index :departments, :column => :manager_id
remove_index :locations, :column => [:city, :postal_code, :street_address]
remove_index :locations, :name => :idx_city_zip

If you need to use more complex or database-specific SQL, use the execute command from the up or down methods to which you pass the SQL string to execute:

execute "CREATE INDEX idx_emp_first_name ON employees (first_name)"

In the example above:

C:\Progetti\ArticoliROR\Oracle\project>ruby script/generate migration AddFirstNameIndex
exists db/migrate
create db/migrate/008_add_first_name_index.rb

This is the migration file:

class AddFirstNameIndex < ActiveRecord::Migration
def self.up
add_index :employees, :first_name, :name=>:idx_emp_first_name
end

def self.down
remove_index :employees, :name=>:idx_emp_first_names
end
end

Run the migration using rake db:migrate.

C:\Progetti\ArticoliROR\Oracle\project>rake db:migrate
(in C:/Progetti/ArticoliROR/Oracle/project)
== AddFirstNameIndex: migrating ===============================================
-- add_index(:employees, :first_name, {:name=>:idx_emp_first_name})
-> 0.0100s
== AddFirstNameIndex: migrated (0.0100s) ======================================

Executing the query again shows that the index is now used:


Employee Load (0.010000) explain plan for SELECT * FROM employees WHERE (first_name = 'Stephen')
Analyzing Employee Load
plan_table_output
--------------------------------------------------------------------------------------------------
Plan hash value: 2736374945
--------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 719 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| EMPLOYEES | 1 | 719 | 2 (0)| 00:00:01 |
|* 2 | INDEX RANGE SCAN | IDX_EMP_FIRST_NAME | 1 | | 1 (0)| 00:00:01 |
--------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("FIRST_NAME"='Stephen')
Note
-----
- dynamic sampling used for this statement

As you have seen it is really easy to use the plugin to poke at the execution plans used by a running application and you may even leave it installed on the production server and disable/enable it when needed by changing the logging level.
Conclusion

In this article you dug a bit into how connections to an Oracle database are configured in a Rails application, and you have seen how the framework has been updated in the 1.2 release to have better performances thorough the use of the cursor_sharing and prefetch_rows parameters (while waiting for a real bind variable implementation).

You have also examined the Rails migration commands that are relevant to tuning the database (specially creating/removing indexes).
Finally, as you've learned, a good understanding of both how Rails builds the SQL from the code and how the database executes them is needed to get the best performance. The provided plugins should help here.

Shimokawa Mikuni

Yap dari judulnya pasti penggemar anime sudah pada tahu. Salah satu artis penyanyi anime yang paling saya suka yang menyanyikan ost Full Metal Panic. Suaranya itu loh khas banget dan jernih banget.

Penasaran dengan lagu2nya lainnya selain ost Full Metal Panic ? silahkan download di
http://gendou.com/amusic/?filter=mikuni&match=3&show=1

Anda diharuskan register dahulu sebelum mendownload. Registration are free.

Selamat menikmati suara indah Mikuni.

Free SMS


Do you want to send free sms ? Is so try this.

Its so simple just signup and confirmation sent to your mobile number. Activate your account using those confirmation.

Advantages :
* Free SMS every day;
* Directly 20 free SMS credits;
* Your own number as sender;
* Follow status report of your SMS;
* Earn free SMS free and simple;
* Phonebook & SMS History;
* Group SMS and Plan your SMS's;
* SMS anonymously;
* And many more!

Easy huh ? Just click here to start

Enhydra Shark 2.0 Open Source Workflow Engine Has Been Released


The 2.0 final version of the open source workflow engine Enhydra Shark is released.

Enhydra Shark is a flexible and extensible WfMC and OMG Workflow Management Facility compliant embeddable Java Workflow Engine.

As its native workflow process definition format Enhydra Shark uses WfMC-XPDL (XML Process Definition Language) without proprietary extensions. XPDL process definitions can easily be created using the included graphical workflow editor (Enhydra JaWE).

For execution of serverside system activities the WfMC Tool Agents API is supported. Many standard toolagents for common tasks are included.

Every single component (persistence layer, assignment manager, etc.) can be used with its default implementation or extended/replaced by project specific modules. This way Enhydra Shark can be used as a simple "Java library" in servlet or swing applications or running in a J2EE container supporting a session beans API, Corba ORB or accessed as a web service.

Distribution package includes an advanced Swing administration client and a web based worklist and administration client applications for managing workflows.

Enhydra Shark has well defined client interface and well defined interfaces for plug-in components.

In contrast to many other solutions on the market Enhydra Shark gives you the freedom to define your own GUI and to integrate existing system's components of YOUR environment!

The project is hosted on ObjectWeb, it has a large community, very active mailing list and it is highly rated on ObjectWeb.

For the professional users, commercial version called Together Workflow Server is now available. You can test it by downloading demo version from
http://www.together.at/together/prod/tws/twsdemo/index.html


Website: http://shark.objectweb.org/
ObjectWeb Project: http://forge.objectweb.org/projects/shark/

Execute CommandLine Inside Java


Here is the code how to execute command line like ping, netstat etc from java application


/**
* com.harry.latihan.system
* ExecuteCommandPrompt.java
* Jun 4, 2007 - 12:58:06 PM
*/
package com.harry.latihan.system;

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

/**
* @author Harry Christian
* @email harry.christian@yahoo.com
*
*/
public class ExecuteCommandPrompt
{

   public static void main(String[] args)
  {
      String command = "ping www.google.com -t";
      String message = null;
      try
     {
         Process p = Runtime.getRuntime().exec(command);
         BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
        BufferedReader error = new BufferedReader(new InputStreamReader(p.getErrorStream()));

        // Read the output from command
       while ((message = input.readLine()) != null)
              System.out.println(message);
        // Read any errors from command
        while ((message = error.readLine()) != null)
              System.out.println(message);
        System.exit(0);
    } catch (IOException e)
    {
        e.printStackTrace();
       System.exit(-1);
    }
  }
}