Monday, June 30, 2008

Java Programming & Desktop Effect (Compiz/Beryl)

There is a bug in Sun Java's Swing. It doesn't like certain window managers. Something about reparenting and not reparenting or something like that. Whatever. The point is, when trying to run a program you wrote using Swing, all you get is a big white nothing. Nothing draws in the window. Ahhh! What's wrong?! Yeah, I had some trouble with my Java class because of that one. Well, unfortunately, my favourite WM, Compiz/Beryl, is a problem child with this. However, there is an easy fix for it. Open your .bashrc (that in ~). If you don't know how, do this in the terminal:

vi ~/.bashrc

Add this line to it:

export AWT_TOOLKIT=MToolkit

Now try to run your program again. Now everything works. Yay!

Tested on OpenSuse 11.0 for SQuirrel SQL, Eclipse, Adempiere. For application that running from menu, you can try add line in file /etc/profile.

If you run the Java application from eclipse you also should add the parameter in Run menu | Java Application | [application name] | Environment and click New button and add


Variable Name: AWT_TOOLKIT
Value: MToolkit


NOW you can run your Java Application and use Desktop Effect (Compiz/Beryl/KDE Desktop Effect) on the same time. Cheers.

Source: ubuntulinuxtipstricks

SQuirreL, Universal SQL Client

SQuirreL SQL Client is a graphical Java program that will allow you to view the structure of a JDBC compliant database, browse the data in tables, issue SQL commands etc, see Introduction.

The minimum version of Java supported is 1.5.x as of SQuirreL version 2.4. See the Old Versions page for versions of SQuirreL that will work with older versions of Java.

The SQuirreL desktop in Ocean Theme:

Features:

- Object Tree of Session window - right-click to access the popup menu which provides access to advanced script generation and graphing features. The graph plugin allows the user to create table charts
- SQL Editor with code completion popup (ctrl+space) open - code completion can be used to access drop-down lists of options that include keywords, tables, columns, views, stored procedures. Code completion also provides join generation functions. For example, look at the table structure here. Hitting ctrl+space after the expression
- SQL Editor with tools popup menu (ctrl+t) shown - with the tools popup any editor function can be located with only a single short cut: ctrl+t Additionally, the list can be searched incrementally with just a few keystrokes
- SQL Editor with bookmark selection popup (ctrl+j) shown - bookmarks are user-defined code templates. SQuirreL comes with several pre-defined example bookmarks for the most common SQL and DDL statements
- Abbreviations and auto corrections dialog - this feature works much like auto corrects in common office products. With the entries shown in the dialog you may for example type 'sf' which will expand to 'SELECT * FROM'
- Editing of SQL results - the result tabs of SQL queries support editing the rows returned from a query on a single table. You may also edit the contents tab of tables in the Object tree
- Graph: Charts of tables and their relations - To create new charts or to add tables to existing charts right mouse click tables in the Object tree and choose the 'Add to graph' menu. Graph manipulation functions can be accessed by using the right-click context popup menu
- Graph: Scaling and distributing tables on configurable page sizes to prepare for printing - use the right-click context popup menu to switch to the scaling and printing mode

For more detailed description see the paper by Gerd Wagner:
- English version
- German version

In theory SQuirreL should work with any DBMS that has a JDBC 2.0 driver. However not all drivers/DBMS's are fully complient with the JDBC 2.0 specification.


Reported working databases:

- Axion Java RDBMS
- Daffodil (One$DB)
-
Apache Derby (formerly Cloudscape)
- Fujitsu Siemens SESAM/SQL-Server
with the SESAM/SQL JDBC driver
-
Firebird with the JayBird JCA/JDBC Driver
-
FrontBase
-
HSQL
-
Hypersonic SQL
-
H2
-
IBM DB2 for Linux, OS/400 and Windows
-
Informix
-
CA Ingres 2.6 SP2 with EDBC driver v1.8
- InstantDB

-
Interbase with the Interclient JDBC driver
-
Mckoi SQL
-
Microsoft Access with the JDBC/ODBC bridge
-
Microsoft SQL Server with the Microsoft, WebLogic and jTDS JDBC drivers
-
Mimer SQL
-
MySQL with the MM MySQL JDBC driver
-
Oracle 8i, 9i and 10g with the Oracle thin and OCI drivers
-
Pointbase
-
PostgreSQL 7.1.3 and higher
-
Progress OpenEdge 10.1x
-
SAPDB
-
Sybase
-
Sunopsis XML Driver (JDBC Edition)
-
Teradata Warehouse
-
ThinkSQL RDBMS


Available translations:

- Spanish
- Brizilian
- Czech
- Bulgarian
- Chinese
- French
- Italian
- German
- Russian


Download & Installation:

The SQuirreL SQL Client is installed with the IzPack Java installer. Download the file squirrel-sql--install.jar and execute it using the following command:

java -jar squirrel-sql--install.jar

Make sure that you have write privileges to the directory that you want to install into.

Note that some browsers may attempt to open this file rather than download it. In this case, right-click on the download link and click your browser's equivalent of the "Save as..." menu item.

On Windows, execute the file squirrel-sql.bat to run the application. On Unix, the file is squirrel-sql.sh.

Download: SQuirreL SQL 2.6.6
WebSite: http://www.squirrelsql.org

Source:
http://javaclick.blogspot.com/2007/10/squirrel-universal-sql-client.html

Friday, June 27, 2008

openSuse 10.3 Upgrade ke openSuse11 jadi Bisu

Hari ini saya melakukan upgrade dari openSuse 10.3 ke openSuse 11.0, awalnya dikarena openSuse 10.3 saya sering shutdown sendiri, setelah beberapa perubahan yg pernah saya lakukan terhadap settingan Java dalam system.

Setelah berhasil melakukan UPGRADE ke openSuse 11.0 dengan KDE 3.5.9, semua berfungsi normal, namun sayangnya saat coba amarok, suaranya tidak keluar. Wah, saya pikir bakal sepi neh tidak bisa denger musik. Berikut adalah tips sederhana untuk mengkonfigurasi sound, yaitu cukup masuk terminal sebagai root dan ketik perintah berikut:

#alsaconf

Selanjutnya ikut petunjuk pada screen, dan proses deteksi hardware pun akan segera menemukan hardware yg terinstall dalam PC/Laptop kita, dan setelah selesai, maka hasil test sound kita bisa dengar.

Wah syukur deh, laptop saya bisa nyanyi kembali :D

Wednesday, June 18, 2008

PonyGallery 2.5.1 ML for Joomla 1.5

Pony Gallery adalah salah satu komponen galeri yang handal untuk memajang foto-foto kita di website yang menggunakan CMS (Content Management System) berbasis Joomla dan juga dilengkapi fasitas Watermark (pengaman gambar), komentar, hit counter, slide show, dll. Di site aslinya komponen ini baru mendukung untuk versi Joomla 1.0.x. Bila kita ingin menggunakan Joomla 1.5 dan ingin menginstall komponen tersebut maka kita harus mengaktifkan System Legacy plugin. Walau bisa diinstall fungsinya banyak yg tidak dapat digunakan.

Dari situlah saya mulai berusaha belajar untuk memodifikasi plugin supaya dapat digunakan di Joomla 1.5.x, dan alhasil, walau dengan susah payah namun akhirnya berhasil juga walau tetap sifatnya adalah komponen legacy dan tetap harup mengaktifkan plugin System Legacy. Komponen Joomla 1.5.x saya share website yg saya pasang Pony Gallery tersebut sebagai bukti bahwa komponen tersebut berfungsi dengan baik.

Silahkan download komponen tersebut di link Download pada website Adyawinsa pada subfolder komponen, dan demo gallery bisa di cek pada website Adyawinsa atau HisHeart.

Selamat mencoba dan salam "Never Give Up!".

FISH di kolam OpenSuse

Dalam pencarian saya tentang program setara WinSCP di openSuse10.3, dimana WinSCP adalah salah satu program OpenSource yang sangat powerfull untuk remote management file namun hanya dapat digunakan di environment Windows, saya menemukan sesuatu yg juga tidak kalah menarik dibandingkan WinSCP.

Buat sebagian orang mungkin ada yg baru tahu juga seperti saya. Karena manfaatnya yg sudah saya rasakan sangat membantu dalam memanage file secara remote dibandingkan semula saya harus menggunakan scp yang sifatnya CLI (Command Line Interface), maka fish sangatlah menghibur hati saya.

Pagi pengguna openSuse berbasis desktop KDE maka fish sudah terintegrasi dalam Konqueror tanpa harus diinstall. Sekian lama pakai KDE baru tahu ada utility yg sangat powerfull didalamnya. Lebih baik terlambat dari pada tidak tahu sama sekali. Untuk memakai fish cara nya sederhana cukup ikuti langkah2 berikut:

1. Buka Konqueror
2. Pada isian Location ketik fish://username@ip_address/path
Contoh:
fish://root@192.168.0.5/var
fish://root@192.168.0.5 --> masuk ke folder home dari username yg kita gunakan untuk login
3. Pada dialog login isikan password sesuai username yg kita akan gunakan ke host tersebut.4. Selamat, anda sudah berhasil konek ke remote host dan bebas untuk me-manage file dari remote sesuai dengan hak akses dari user yg kita gunakan saat konek.

Reset Senao EOC/NOC 3220 EXT/INT 3220+

Dari beberapa perangkat wireless point to point yg pernah saya pasang seperti Radwin, Mikrotik, Trango dan Senao, perangkat Senao dan Mikrotik lah yang harganya relatif murah untuk range dekat dan terbilang handal. Ada kasus untuk kelas senao saat dipasang di area kawasan industri jababeka dengan perangkat Senao 3220 INT 3220+ dalam jarak udara sekitar 4 km, wlan bisa konek namun link sangat jelek dan tidak stabil saat terjadi proses transfer data. Saat diganti menggunakan Radio Mikrotik, link lancar dan transfer datapun mendapatkan badwidth yg relatif besar.

Saat radio senoa di pasang di wilayah karawang, dengan jarak yg sama dengan jarak saat dipasang di kawasan jababeka, koneksi yang diperoleh sangat bagus. Kesimpulan saya, senoa tidak dianjurkan untuk daerah yang sudah tinggi tingkat interference nya, seperti di daerah kawasan industri. Namun senoa memiliki daya pancar yang kuat, dan harga yang “murah”. Sehingga jika cukup dengan Senao mengapa harus beli yang mahal.

Saya pernah dua kali mengalami tiba-tiba link putus dan kita tidak bisa konek ke radio baik di ping maupun diakses via Web. Untuk kasus pertama, setelah dibawa ketempat beli, tenyata radionya reset sendiri ke konfigurasi default. Untuk yang kedua, setelah tahu penyakitnya dan setelah diakses dengan default IP nya tetap tidak bisa konek, maka mulailah mencari tahu cara untuk mereset sendiri.

Setelah googling .. ternyata harus menggunakan kabel serial RS232 (null modem). Kabel ini bisa dibuat sendiri, dan diperlukan kabel serial RS232 9 pin (DB9) atau bisa pakai UTP Cat5 dengan konektor DB9 female dikedua ujungnya. Yang perlu diperhatikan adalah hubungan antar pin dibuat sesuai dengan hubungan untuk kabel null modem seperti berikut :

Keterangan lengkap mengenai Null Modem ini bisa di baca di sini

Setelah kabel Null Modem siap, selanjutnya ikuti saja langkah-langkah berikut :

Buka terlebih dahulu penutup konektor serial pada radio senao yang terletak dibagian bawah dekat port RJ 45. ( lihat gambar ).

  1. Hubungkan kabel serial ke port com pada komputer/laptop.
  2. Jalankan aplikasi Hyperterminal (ada dibagian accessories-communication). Klik Start kemudian pilih Programs -> Accessories -> Communications -> HyperTerminal.
  3. Berikan nama koneksi apa saja, misalnya Senao 3220. Kemudian pilih koneksi COM1 (atau COM2 tergantung port di komputer).
  4. Setting HyperTerminal baudrate “38400″, data bits “8″, parity “none”, stop bits “1″, flow control “None”. Kemudian tekan “OK”.
  5. Matikan power pada POE selama kurang lebih 5 detik kemudian On-kan kembali.
  6. Tunggu sampai prompt # muncul pada layar HyperTerminal.
  7. Ketik “flash reset”, Tekan enter.
  8. Ketik “reboot”, tekan enter. Perangkat Senao akan reboot dan semua setting akan dikembalikan seperti semula.
  9. Jika tidak terdapat kerusakan, Anda bisa mengakses kembali melalui WEB dengan alamat IP default : 192.168.1.1

Selesai ! Selamat mencoba, dan langkah2 tersebut diatas sudah lulus uji coba :D

Sumber: http://rakhmat.wordpress.com