Flag Counter
Posted in Fun
and now.. SPRING vs EJB 3.0
read what they said:
http://onjava.com/lpt/a/5996
Posted in Catatan Pekerjaan
Another Nice Article about JSF and STRUTS
Go to this page:
http://websphere.sys-con.com/node/46516
Posted in Catatan Pekerjaan
Nice Article about iBatis, Hibernate and JPA
Just take a look at this page:
http://www.javaworld.com/javaworld/jw-07-2008/jw-07-orm-comparison.html?page=1
Posted in Catatan Pekerjaan
What will I do today?
What am I doing for my life now?
Whoaa… insurance business is really a sh*t thing!! No, I am not an insurance reseller, I am a programmer in an insurance company in my town. Trust me, being a programmer in an insurance company gives you everyday head-ache!!
Btw, now I am learning about JavaFX. I think I start to love this thing. In my humble opinion, it is Macromedia Flash + Java..
Posted in Catatan Pekerjaan
China Mobile Phone CrossX CB 90
Gong Xi Fat Choi n Happy Valentine’s Day 2010..
A few days ago, I bought a China Mobile Phone, the one that recently we could find easily in the market, CrossX CB 90. Actually it should be bundled with a starter pack of pre-paid card, but because I bought it not in an official shop, I’ve got nothing but the phone only. It was also more expensive than the official one, but it is still cheaper than famous brand mobile phone. Can you find a Rp 800rb (eight hundred thousand rupiah) mobile phone with Rp 2jt (two million rupiah) mobile phone features? Honestly, I bought it because I am interested to its features, such as Shake Sensor, Mobile Modem and 1.3 Mpx Camera. Nice, huh?
The first thing that I wanted to try on my phone was its shake sensor. I open its manual book, and I found nothing about Shake Sensor!!! Damn it!!! Then I tried to open all menus in my phone. I found Shake Sensor Setting, I changed some of them. Turn it off, and turn it on. Open its media player, chose some song, and play one of them. Then.. shake it.. up and down, up and down.. nothing happen!! The song played was still the same. Damn it, again!!!
I tried another feature, mobile modem. Hah.. where is the driver? I didn’t find any disc on the box. So how could I use the modem? My pc would not recognize this modem. Wooaa… damn it, again.. and again!!! I am so disappointed with this China Mobile Phone!!! Then I though, yeah.. what can we got with a Rp 800rb mobile phone? Don’t wish to much…
But.. something happen when my wife hold this mobile phone. She accidentally shake it.. right and left, right and left.. we heard some strange voice, and we saw that its wallpaper was changed!!! Hey, it worked!!! We shake it again and again, and it changed its wallpaper too. Nice.. nice.. so one feature has been proven, this mobile phone has shake sensor.
Now what? Did this mobile phone really has a modem in it? I have to know. I took its usb cable, and plug into my notebook. This mobile phone was recognized as MT6225 USB Device. I tried to find the driver on internet. I saw there were many people also looking for this driver. And, at last, I found it after I read some discussion forum about China Mobile Phone.
I plug my usb cable into my notebook again, and browse the driver I have downloaded. Then my notebook recognized it as 6218 Mobile Modem. I tried to find the driver again. Unfortunately, I was not as lucky as before. I found nothing about 6218 Mobile Modem.
But, in another discussion forum about China Mobile Phone, I got interesting information. Someone wrote that he could use Taxco DM 79 modem driver as 6218 Mobile Modem driver, because it use the same hardware. I though I should try it. I downloaded the driver, and installed it into my notebook. And… you know what… It worked!!!!!
Wooohhoo.. I’ve got Rp 800rb mobile phone with Rp 2jt mobile phone features!!! I think I started to love China Mobile Phone.
Posted in Product Review
How to play Nintendo DS in your Computer (need Mozilla)
Waahh.. tanpa sengaja saya menemukan info bahwa kita bisa memainkan game-game Nintento dengan bantuan komputer kita dan browser Mozilla. Bagaimana caranya?
Lihat gambar di bawah ini:
(oops, sialan.. akses upload dan download udah diblokir ama admin kantor)
Begini aja deh, silakan buka google dan masukkan kata berikut ini: FIRENES. Download dan install. Kemudian buka browser anda, tekan Ctrl – Shift – N. Pada bagian kiri akan muncul sidebar yang berisi daftar game-game Nintendo yang bisa kita mainkan. Have Fun!!
Posted in Fun
How to read file by using url
Masalah kecil sewaktu membuat aplikasi web yang harus membaca file konfigurasi, di mana file konfigurasinya diletakkan pada folder tertentu. Hal ini tidak akan menjadi masalah bila kita bisa mengakses sistem file-nya, tetapi akan menjadi masalah besar bila kita tidak bisa mengakses sistem file-nya, misal bila kita meletakkan aplikasi kita pada server orang lain.
Untuk mengakses file, Java menggunakan konstruktur sbb:
File f = new File(“C:\test.txt”);
Bagaimana bila file itu ada pada server orang lain, di mana kita tidak bisa mengakses sistem file-nya, atau dengan kata lain kita hanya bisa mengakses file dengan menggunakan url?
Penyelesaiannya ternyata cukup mudah:
—–
String strProtocol = “http://”;
String strFileName = “Book1.xls”;
InetAddress lHost = InetAddress.getLocalHost();
String hostAddress = lHost.getHostAddress();
String hostName = lHost.getHostName();
URL url1 = null;
String strFolderData = strProtocol + hostAddress + “:8084/JVOShop/data/” + strFileName;
url1 = new URL(strFolderData);
HttpURLConnection conn = (HttpURLConnection) url1.openConnection();
//Workbook workbook = Workbook.getWorkbook(new File(“C://JVOShop/data/Book1.xls”));
Workbook workbook = Workbook.getWorkbook(conn.getInputStream());
—–
Oops.. mungkin penyelesaian ini hanya cocok untuk masalah yang saya hadapi.. yaitu berusaha membaca file xls, dengan menggunakan jxl.jar, di mana file xls nya itu saya letakkan di suatu folder tertentu..
Posted in Catatan Pekerjaan
Menu “Prev” dan “Next”
Membuat menu “Prev” dan “Next”. Mudah, tetapi terkadang orang malas untuk memikirkan logikanya. Berikut contoh kecil menu “Prev” dan “Next” dalam JSP.
—–
<%
Hashtable htDataNoKlaim = new Hashtable();
HttpSession sessionKu = request.getSession();
htDataNoKlaim = (Hashtable) sessionKu.getAttribute(“claims”);
// untuk prev dan next
int intJmlRecPerHal = 15;
int intJmlBaris1 = htDataNoKlaim.size();
int intStart = 0;
int intNextStart = 0;
int intPrevStart = 0;
int intEnd = 0;
int intNextEnd = 0;
int intPrevEnd = 0;
if (intJmlBaris1 > intJmlRecPerHal) {
// intStart
String strStart = request.getParameter(“start”)==null?”0″:request.getParameter(“start”).toString();
if (strStart.equalsIgnoreCase(“0″)) {
intStart = 1;
} else {
intStart = Integer.parseInt(strStart);
}
// intEnd
String strEnd = request.getParameter(“end”)==null?”0″:request.getParameter(“end”).toString();
if (strEnd.equalsIgnoreCase(“0″)) {
intEnd = intJmlRecPerHal;
} else {
intEnd = Integer.parseInt(strEnd);
}
// intNextStart, intNextEnd
intNextStart = intStart + intJmlRecPerHal;
intNextEnd = intNextStart + (intJmlRecPerHal – 1);
if (intNextEnd > intJmlBaris1) {
intNextEnd = intJmlBaris1;
}
// intPrevStart, intPrevEnd
intPrevStart = intNextStart – (2 * intJmlRecPerHal);
if (intPrevStart < 0) {
intPrevStart = 0;
}
intPrevEnd = intPrevStart + (intJmlRecPerHal – 1);
} else {
intStart = 1;
intEnd = intJmlBaris1;
intNextStart = 1;
intNextEnd = intJmlBaris1;
intPrevStart = 1;
intPrevEnd = intJmlBaris1;
}
%>
…
…
<%
int intLoop = htDataNoKlaim.size();
if (intLoop != 0) {
//for (int a=1; a<= intLoop; a++) {
for (int a=intStart; a<= intEnd; a++) {
String[] strArray = (String[]) htDataNoKlaim.get(String.valueOf(a));
…
…
<%
if (intStart <= 1) {
%>
<button name=”prevData”> < </button>
<% } else {
%>
<button name=”prevData” onclick=”goTo(<%= intPrevStart%>, <%= intPrevEnd%>);”> < </button>
<%
}
%>
…
…
<%
if (intEnd >= intJmlBaris1) {
%>
<button name=”nextData”> > </button>
<% } else {
%>
<button name=”nextData” onclick=”goTo(<%= intNextStart%>,<%= intNextEnd%>)”> > </button>
<%
}
%>
…
…
—–
Selanjutnya terserah anda…
Posted in Catatan Pekerjaan
