July 2006

You are currently browsing the monthly archive for July 2006.

To talk about internationalization, there is an interesting joke on its acronym “i18n”. You know why it is called i18n?

The answer is simple, just because there are 18 characters in between its first and last letter. :)

Last week, my colleague discussed with me on how to make the i18n possible since he was unable to do so. At that time, I couldn’t really answer on why, but I can say, it must be possible, as my old company did that.

After then, I did some researches, and finally solved the problem. It can be divided into several parts. (Mainly focus on how to show Simplified Chinese)

  1. Include Chinese directly in the JAVA class
  2. Show a Chinese String which is retrieved from database
  3. Send the Chinese String from the client to server side

The solutions or methods to each case are as follow:

1. Include Chinese directly in the JAVA class

This one is so simple. Just type the chinese in the JAVA class should be ok. If you’re not ok, it should be just your computer’s problem. Try reinstalling the JDK, it’s no matter to the stable release of JDK version.

2. Show a Chinese String which is retrieved from database

This is one is not difficult either. For the database retrieving part, just like other cases, use the very simple SQL statement is ok, since the JDBC connector will take the content as usual Strings. After retrieving the contents to the Action / Servlet, you should send the content to the JSP, in this step, you should set the character set to UTF-8, so that the string is encoded in Unicode(UTF-8) like the following:

response.setContentType(”text/html; charset=UTF-8″);

3. Send the Chinese String from the client to server side

For this one, there are more to do.
Firstly, as we’re using JBoss which Tomcat is embedded as the web container. We should do some tricks to let Tomcat knows the characters are chinese.

The first thing to do is to make use of the tomcatEncoding-1-0.jar, put this into the /WEB-INF/lib/ folder.
Then we need to add some elements to the /WEB-INF/web.xml, like the following:

<filter>
<filter-name>Set Character Encoding</filter-name>
<filter-class>org.apache.filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>Set Character Encoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

Actually, we just put a filter into Tomcat, so that for every request made to Tomcat, the parameters will pass through this filter and be encoded to UTF-8 Strings. As a resul, we can pass chinese characters into the servlet

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

I have interests on doing some freelance projects, since this can force me to learn things through the work, which is better than letting me study on myself.

Here are some links that can bid a freelance job:

iFreelance.com - http://ifreelance.com/

Bid-Job.com - http://www.bid-job.com/common/cats/sub_cate_super_chi.php?job_id=001

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

After start using the branch, merge and tag technology provided by CVS, it comes up to me with some concerns - naming convention of those tags.

Since the name for these can be anything designed by the users of CVS, we should make some conventions, so that users can clearly understand the under meanings.

Something I want:

  1. The names should clearly describe whether it is tag for version or branch.
  2. The names should describe the version of the tag.
  3. It should show me the projects it belongs to.
  4. The tags should only be created by a project leader (it’s for better project management)

References:

A Project in Stanford - http://smb.slac.stanford.edu/research/developments/blu-ice/dcsAdmin/node7.html

An example - http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/doc/CONVENTIONS

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

Useful Links

Links for preparation on SCJP:

ExamsGuide.com - http://www.examsguide.com/scjp/freequestions.html

Someone’s experience - http://www.mihaiu.name/2004/sun_java_scjp_310_035/

TestKing - http://www.testking.com/

Another site - http://home.tiscali.nl/~bmc88/java/javacert/

China IT Lab - http://download.chinaitlab.com/

PassBible - http://www.passbible.com/testking.htm

Study Guide:

ePlanetLabs - http://eplanetlabs.com/scjp.html

SCJP Tiger Study Guide - http://java.boot.by/scjp-tiger/

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

I think it is the bug for WordPress MU.

When I tried WordPress Single before, the post_status for page is static, but in MU, it becomes public, so that it comes out with unstable performance, I have posted the message on WordPress MU forum, hope someone will fix it.

http://trac.mu.wordpress.org/ticket/103

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

Failure Plugins

Tried two plugins for WordPress MU today, but found they’re something not functioning.

One is the dTree - http://www.silpstream.com/blog/wp-dtree/

After installing it, even it works “like” a tree, but the image as shown in the developer’s website does not appear to me. Also, many layouts on using dTree should be designed by the blog owner by overwriting the theme PHP. It’s two troblesome, so I will not use it at the moment.

dTree Failure Image

The other one is the MU-Admin Bar:

Someone said that this plugin helps to make a header on your blog when you’re logged in, but after I activated it, I totally see nothing changed.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

Currently, there is a new Version Management technology that comes up with attention. It is named Subversion (SVN). It’s new to me and I just know people start using it because they doubt the function of CVS being commit the files one by one.

The following article talks about how to use SVN with Eclipse. Let’s start with it and look at the “power” of SVN.

Quoted from RootPrompt.org:

From the beginning, Eclipse included tight integration with the Concurrent Versions System (CVS) in order to provide access to change-management capabilities. Now, many projects — notably those run by the Apache Software Foundation — are using a different change-management system: Subversion. This article demonstrates how to add Subversion support to Eclipse and how to perform basic version-control activities from the IDE.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

After fighting a two-week battle on the WordPress versions, I finally chose to use WordPress MU as my own blog.

Mainly, WordPress MU provides with me the import/export functions, which to me, is very important so that I can move from one blog to another. If one day I would like to switch off, I can easily get my data from here.

However, the battle is quite hard since there are many constraints, including blocked network access in my company, limited documentation from WordPress MU.

Now, I’m mainly looking at the plugins and themes used in MU, since the settings are somehow different from WordPress Single version.

Some of the plugins I have used are:

More plugins I would like to look at and learn:

For the themes, I guess it’s not that straigh-forward too, I have tried several theme, but seems the themes used in Single version is not fully compatible to MU version. I wonder what have to be changed when migrating the platform.

One example of the problem is that the page cannot appear on the header. Take a snapshot on my current page.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

In these few weeks, I’m working on the conventions of coding stuff in my new company. One of the issues is CVS

CVS, a tool which helps to keep track on the versions of files, source codes, documents. A company must benefit from CVS a lot, if it really uses the functions efficiently. In fact, it seems not the case in my company.

The use of CVS in my company does not have a long history, many of my colleagues don’t even have the mindset on version control in one or two years before. After introducing CVS, they learnt to keep versions at least in each release. But, they just take CVS as a backup tool, and would commit the whole project, including dummy files, compiled files, and also unchanged files. This must not an efficient use of CVS. That’s also the reason why I would like to set up some conventions on using CVS. Here will collect some information from the web.

http://ximbiot.com/cvs/manual/

http://www.bairov.com/2005/09/28/cvs-naming-convention/

http://www.eclipse.org/articles/Article-CVS-branching/eclipse_branch.html

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

This is the first time that I formally use this kind of “blog”
Actually, the word “blog”, somehow just means “diary”
So, it’s quite confuse to separate from another.

But, to me, what I want is a place to keep my learnings on Computing and others
and this place should provide me easy to navigate methods to find my previous posts.
Let say calendar showing the date with entries,
archive on months, subjects, etc.
And, WordPress gives me these all.

So, from now all, let me announce.
The site “Great Technical Skills‘ is coming to the World!!

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Live
  • Technorati
  • YahooMyWeb

« Older entries

 

July 2006
S M T W T F S
    Aug »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories