Buy House Guide

2009 August 27
by Penguin

Try to summarize a guide for buying a completed property.

1. Search for a property and research about it.

2. Everything ok and decided to buy, go to bank and check loan amount that you can get. Then prepare deposit, agent normally will request 2%(some request more) of the property price as deposit. If deal with property owner then you can discuss about the deposit, 500, 1000 or any amount which is agreed by both side.
read more…

GWT - File Upload

2009 August 19
by Penguin

I am trying to do file upload on GWT, I search through internet and unfortunately, I found no way of doing file uploads with RPC :-(

Solution i found still back to common HTTP upload, just tweak a little to fit into the GWT environment.
I post the solution here which mixed used of widget in GWT and GXT.
Please drop me a comment if you know of a better way, or way to improve what I have done.
read more…

GXT - Progress bar in grid

2009 August 18
tags: , ,
by Penguin

I want to add progress bar into the grid widget but the grid cell does not support widget inserting.

After doing research from internet, i found out one solution which is render the progress bar by inserting plain div. Here is the code i used to show the progress bar in the grid.
read more…

Applet GWT Integration

2009 April 27
tags: ,
by Penguin

Due to some special reasons, some time we still need to display applet in the web application, but thats come to one problem, how to integrate the applet into the application if we using gwt for development ?
read more…

年薪10萬的乞丐 Part 2

2009 April 23
by Penguin

“你接著說。”我更感興趣了,看來今天能學到新的東西了。

有人說做乞丐是靠運氣吃飯,我不以然。給你舉個例子,女人世界門口,一個帥氣的男生,一個漂亮的女孩,你選哪一個乞討?”

我想了想,說不知道。

“你應該去男的那兒。身邊就是美女,他不好意思不給。但你要去了女的那邊,她大可假裝害怕你遠遠地躲開。”

“再給你舉個例子。那天cocopark門口,一個年輕女孩,拿著一個購物袋,剛買完東西;還有一對青年男女,吃著冰淇淋;第三個是衣著考究的年輕男子,拿著筆記本包。我看一個人只要3秒鐘,我毫不猶豫地走到女孩面前乞討。女孩在袋子裡掏出兩個硬幣扔給我,並奇怪我為什麼只找她乞討。我回答說,那對情侶,在吃東西,不方便掏錢;那個男的是高級白領,身上可能沒有零錢;你剛從超市買東西出來,身上肯定有零錢。”

有道理!
我越聽越有意思。
read more…

How Resumable Download Work

2009 April 21
by Penguin

Download, a common activity for most of the IT peoples. Some download manager software support a feature which is resume download, user can pause or stop the download and continue after some time. Starting I thought that must be very complicated implementation within the download manager in order to support resume feature.

Unfortunately, the concept behind that is not that complicated as i thought, after i study on the architecture resume download, I realize the theory behind that is so simple ! The trick to make a download resumable is the HTTP range request header. We know that download file from internet as stream bytes, so we can specific the range header like this
read more…

Add Menu to Header of Tab Item in GXT

2009 April 17
tags: , ,
by Penguin

I want to add Context Menu to the Header of the TabItem under Ext-Gwt (GXT). Unfortunately i can’t find any proper method for me to do that. The Header Item of Ext-GWT tab item was packaged protected and I couldn’t override or extend it.

After research for some time, I find out another way to add context menu to header of the tab item. The example below shows the basic step to add the context menu into tabitem header.
read more…

Drag N Drop Grid To Tree in Ext-GWT (GXT)

2009 April 16
by Penguin

Ext-Gwt(GXT) is a Java library for building rich internet applications with GWT. It provides various good features in the library. Developer can easily implements drag n drop features in their web applications with few line of codes. This is one simple example to drag from grid and drop the item into the tree.

First of all, we need to make the draggable grid. We can use the GridDragSource to do this.I just wrap the grid with the GridDragSource and it is done.

Grid draggableGrid = new Grid();
new GridDragSource(draggableGrid);

read more…

年薪10萬的乞丐 Part 1

2009 April 12
by Penguin

我拎著剛買的levi’s 從茂業出來,站在門口等一個朋友。

一個職業乞丐發現了我,非常專業的、徑直的停在我面前。這一停,於是就有了後面這個讓我深感震撼的故事,就像上了一堂生動的市場調查案例課。為了忠實於這個乞丐的原意,我憑記憶盡量重複他原來的話。

“先生 …… 行行好,給點吧。”我一時無聊便在口袋裡找出一個硬幣扔給他並同他攀談起來。

乞丐很健談。 ” …… 我只在華強北一帶乞討,你知道嗎?我一掃眼就見到你。在茂業買 levi’s ,一定捨得花錢 …… ”

“哦?你懂的蠻多嘛!”我很驚訝。

“做乞丐,也要用科學的方法。”他說。
我一愣,饒有興趣地問”什麼科學的方法?”
read more…

Google Webtool Kit (GWT)

2009 March 23
by Penguin

Java Script, a powerful script for dynamic web application development. Basically, i don’t like to use java script for websites development because the process is tedious and error-prone process, developers can spend 90% of their time working around for those non productive errors.
read more…

@Override annotation

2009 March 11
by Penguin

After back from New Zealand, this the first time i officially used Java 5 and above to do coding, it is bit hard for me to code in Java 5, because i am not familiar with the Java 5 new features such as annotation, generics , boxing unboxing those stuffs.
read more…

纽西兰的工作与薪酬

2009 February 27

我从纽西兰回来一段日子了,这段日子里我发现不少亲戚朋友都蛮关心我的财务状况,
多数人都认为我有在国外工作,应该带了至少”一桶金”回来,凭着那”一桶金”,
从此生活就可以衣食无忧,逍遥自在,快活无比。

既然大家都对我在国外的消费开支那么有兴趣,我就记录一下我的工作薪酬,
也让想去那儿的朋友们有个概念。

从一开始准备出国打工度假兼流浪,我就准备了RM10,000的费用,
扣除了签证费用,单程机票,购买用品和一些零零碎碎的费用之后,
我就只剩下大约RM 6,100而已,把钱以当时1纽币对2.55马币的兑换率,
换成了大约2,400的纽币,然后就开始了我的打工度假旅程。
read more…

P1 WIMAX Broadband Experience

2009 February 27
by Penguin

Recently I subscribe to P1 WIMAX Broadband RM 99 package, but end out I found out the performance is not that good within my house area, maybe my house still not under coverage?

read more…

JUnit HTML Report

2009 February 24
by Penguin

Normally developers write JUnit test cases for unit testing, and analysis the output, but some time we prefer a proper junit report or a nice presentation of junit results rather than all results that just printed in the console.
read more…

Hadoop

2009 February 12
by Penguin

Recently Hadoop was introduced to me, it is a java based framework for distributed computing. This framework implements MapReduce, which is one programming model introduced by Google on Clustering Data Processing.
read more…