Wednesday, December 14, 2011

Who sucks?

When googling and found ... always annoys me. I learned it from the hard way, so I just want to present a fairer view and give you another perspective.



Plain: google search the keyword
Sucks: adds a ' sucks' at the end of the keyword
Great: adds a ' great' at the end of the keyword

I'll let you guys do your own conclusion.

Friday, December 2, 2011

Java Clipboard Image Corrupted?

I try to create an applet which will capture the Image from the clipboard and POST it to my web server. However the code below doesn't work for me for some reason.
- Getting the TransferData from clipboard
- Cast it to BufferedImage
- Convert to byet array
- upload... 



Somehow the image I get at the server side is corrupted.
Run a (not so) few test and finally got it to work.





Additional steps is:
- Cast the TransferData into Image first.
- Convert Image into BufferedImage
- Then you will get the correct image at the server side.

If anyone bump into this problem, hope this post helps.
(I still don't know why it happened ...)