Monday, January 31, 2005

Locating Code Source

Liou Dong blogs on how to locate the code source of a given class. Use his idea, I put together WhichClass.jsp for use in the web application (screenshot). May come in handy someday.

Technorati Tags:

Preparing for the SCJP exam

Yes, Sir. I am aware of the fact that SCJP is of less value to me, considering that I have more than three years of Java experience now. But since "No More Procrastinating" is top on my New Year resolution list, I will start with getting SCJP certified, something I wanted to do since my graduate school days.

Monday, January 24, 2005

Bye Bye, Palm

PalmOne (has) a disinterested customer base and a product line that's two years behind everyone else.. Right on, could not have said it better myself.

What is my grudge? Palm doesn't handle Chinese correctly on OSX. Although I found a copy of patched Palm Desktop conduit that remedies the problem, I am forced to use Palm Desktop which is limited and ugly. Feeling neglected and not cared for, I want to purge Palm Desktop from my hard drive. I wanted so bad, I bought myself an IPod Mini last weekend and did exactly that.

Technorati Tags:

Wednesday, January 19, 2005

Are you sure your Oracle is set to UTF8?

SQL Error: 17037, SQLState: null
java.sql.SQLException: Fail to convert between UTF8 and UCS2:  failUTF8Conv

I googled, googled... Found plenty of people asking the same question, but no definite answer.

The problem turns out to be that the correct NLS_LANG setting for UTF-8 support is AL32UTF8, not UTF8. As documented in Oracle's Globalization Support Guide, only AL32UTF8 supports the Unicode 3.1.

Technorati Tags: ,

Tuesday, January 18, 2005

Subscribe to JavaBlogs daily feed in NetNewsWire

The RSS daily feed of javablogs is in the form of
    http://www.javablogs.com/ViewDaysBlogs.action?date=19&month=0&year=2005
Therefore the feed for today's entry is dynamic and changes every day. This kind of feed can be easily handled by script subscription in NetNewsWire 2.0. Below is the ruby script to do just that.
#!/usr/local/bin/ruby -w

require 'date'
require 'open-uri'
require 'stringio'

d = DateTime.now

op = StringIO.new("", "w")

open("http://www.javablogs.com/ViewDaysBlogs.action?date=#{d.mday}&month=#{d.month - 1}&year=#{d.year}&view=rss",
    :proxy => nil) do |rss|
    rss.each_line {|line| op.puts line}
end


puts op.string

Technorati Tags: , ,