<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-20785750</id><updated>2012-01-27T13:56:01.037-08:00</updated><category term='ror'/><category term='xml'/><category term='javascript'/><category term='java'/><category term='python'/><category term='Ajax'/><category term='haskell'/><category term='perl'/><title type='text'>Simple Code</title><subtitle type='html'>Simpler is Better</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-20785750.post-6745465229991935333</id><published>2011-10-18T22:23:00.000-07:00</published><updated>2011-10-18T22:57:46.711-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><title type='text'>How to Write a Spelling Corrector - The Haskell Version</title><summary type='text'>Peter Norvig has an essay on How to Write a Spelling Corrector. There are implementations in many languages.  However, the link to the Haskell version is broken now.  So I used this opportunity to practice my limited Haskell skill.File: SpellChecker/Core.hs&lt;![CDATA[module SpellChecker.Core where import Char import Data.Char import Data.Maybe import Control.Applicative import qualified </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/6745465229991935333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=6745465229991935333' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/6745465229991935333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/6745465229991935333'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2011/10/how-to-write-spelling-corrector-haskell.html' title='How to Write a Spelling Corrector - The Haskell Version'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-1497414536036275834</id><published>2008-03-20T21:51:00.000-07:00</published><updated>2008-03-20T21:53:35.197-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Export emails from Outlook</title><summary type='text'>"""Exports email address from MS Outlook from recent eemails"""from win32com.client import Dispatch, constantsimport os.pathclass Exporter(object):    app = None    emails = []        def __init__ (self): self.app = Dispatch("Outlook.Application")        if self.app == None:            raise Exception, "Unable to create an Outlook application object"    def export_emails(self, foldername, outfile</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/1497414536036275834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=1497414536036275834' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/1497414536036275834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/1497414536036275834'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2008/03/export-emails-from-outlook.html' title='Export emails from Outlook'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-1434918736561703679</id><published>2008-02-29T12:11:00.000-08:00</published><updated>2008-02-29T12:51:33.389-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ror'/><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>A few lessons learned on prototype.js and RoR</title><summary type='text'>A few lessons learned from my recent work on prototype.js and Ruby on Rails1) "class" is a reserved word for IE"class" is a reserved word for IE. If you use "class" as variable name in your JavaScript such as this (example using prototype.js): var highlight_span= new Element('span', { margin: '0', class: 'highlight' }); It works in Firefox but gives you an error in IE. The work around is:var </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/1434918736561703679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=1434918736561703679' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/1434918736561703679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/1434918736561703679'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2008/02/few-lessons-learned-on-prototypejs-and.html' title='A few lessons learned on prototype.js and RoR'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-5916531773057071989</id><published>2008-02-08T11:06:00.000-08:00</published><updated>2008-02-08T15:44:39.743-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Web page smoke test script</title><summary type='text'>#!/usr/local/bin python"""This script is used to check urls with a pattern. The configuration file has following format    protocol_name|url|additional_argsexample:    simpleGET|http://www.google.com/|Google    simpleGET|http://www.aol.com/|WhatWhatExample output:    http://www.google/ -&gt; True    http://www.aol.com/ -&gt; False"""import os.path, re, getopt, sys, urllib2, urllibverbose = FalseFETCHER</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/5916531773057071989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=5916531773057071989' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/5916531773057071989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/5916531773057071989'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2008/02/web-page-smoke-test-script.html' title='Web page smoke test script'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-9077439883354516189</id><published>2008-02-05T19:22:00.000-08:00</published><updated>2008-02-05T19:23:04.810-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Email forwarding script</title><summary type='text'>#!/usr/local/bin python"""This script is used to forward email"""import os, sys, poplib, getopt, getpass, email, smtplibfrom_email = '???'to_email = '???'pop3_server_url = '???'pop3_server_port = 110pop3_user = '???'pop3_pass = '???'delete_after = Truesubject_filter = '????'def match_filter(subject, sfilter):    return subject.find(sfilter) == 0def forward_mail(femail, temail, mail):    for (</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/9077439883354516189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=9077439883354516189' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/9077439883354516189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/9077439883354516189'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2008/02/email-forwarding-script.html' title='Email forwarding script'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-3935341119512554320</id><published>2008-02-02T09:28:00.000-08:00</published><updated>2008-07-07T13:34:41.311-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Search text pattern in log files</title><summary type='text'>#!/usr/local/bin python"""This script is used to analyze log file"""import os.path, time, re, getopt, sys, fnmatchverbose = Falsedef say(s):   if verbose:       print sdef searchPattern(args, dirname, filenames):   file_pattern, text_pattern, count = args   say("Processing directory %s now" % (dirname))   say("File pattern: %s" % (file_pattern))   say("Text pattern: %s" % (text_pattern))   say("</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/3935341119512554320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=3935341119512554320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/3935341119512554320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/3935341119512554320'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2008/02/log-mining-script-1.html' title='Search text pattern in log files'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-5390932120196783976</id><published>2008-01-28T09:21:00.000-08:00</published><updated>2008-01-29T20:52:26.398-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>SlimFIX gets new life</title><summary type='text'>I just found that a project I developed a few years back SlimFIX has been adopted by an open source project called ActiveQuant. I am glad it finally gets a new life.</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/5390932120196783976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=5390932120196783976' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/5390932120196783976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/5390932120196783976'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2008/01/slimfix-gets-new-life.html' title='SlimFIX gets new life'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-6282988812574573989</id><published>2007-04-11T09:13:00.000-07:00</published><updated>2008-01-12T18:10:49.259-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>ssl mutual authentication in perl</title><summary type='text'>Here is a perl script to invoke web service using SSL mutual authentication.use LWP::UserAgent;use HTTP::Request::Common;my $request = &lt;&lt; REQ;# message hereREQ# client certificate support$ENV{HTTPS_CERT_FILE} = 'test.crt';$ENV{HTTPS_KEY_FILE} = 'test.key';# CA cert peer verification$ENV{HTTPS_CA_FILE} = 'ca.crt';my $ua = new LWP::UserAgent;my $res = $ua-&gt;request(POST 'https://test.com', </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/6282988812574573989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=6282988812574573989' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/6282988812574573989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/6282988812574573989'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2007/04/ssl-mutual-authentication-in-perl.html' title='ssl mutual authentication in perl'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-532887561166913532</id><published>2007-04-10T22:50:00.000-07:00</published><updated>2008-01-12T18:13:45.952-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python utility for generating certificate</title><summary type='text'>Here is a Python script that generates a certificate with various formats, including JKS and PFX. It also requires JDK and OpenSSL being installed.-----------------------------#!/usr/local/bin python"""Create a certificate with Python."""import urllib, sys, getopt, os, shutilfrom M2Crypto import SSL, httpslibfrom M2Crypto import RSA, X509, EVP, m2, Rand, Errkeystorepass = 'secret'def </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/532887561166913532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=532887561166913532' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/532887561166913532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/532887561166913532'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2007/04/python-utility-for-converting.html' title='Python utility for generating certificate'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-1808618274462734108</id><published>2007-04-10T22:22:00.000-07:00</published><updated>2008-01-12T18:20:58.989-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><title type='text'>Cross Domain Ajax in IE</title><summary type='text'>I have recently  had the opportunity to implement an AJAX solution for my project. The goal is to allow AJAX calls to our web service. The challenge is the call is cross-domain.  After spending  some hours in investigation,  I realized that it is real hard if not possible to accomplish this in Firefox. Tricks, such as iframe and JSOD, won't work well because the web service interface (SOAP) is </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/1808618274462734108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=1808618274462734108' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/1808618274462734108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/1808618274462734108'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2007/04/cross-domain-ajax-in-ie.html' title='Cross Domain Ajax in IE'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-678965706132943339</id><published>2007-03-10T15:57:00.000-08:00</published><updated>2007-03-10T16:40:04.174-08:00</updated><title type='text'>Building a web site with Google tools</title><summary type='text'>It has been a long long time since my last post. My current work project has kept me busy for almost a year without being able to do much other stuff.Recently I have to redesign our church web site (http://www.cbcsdwc.org). I need to find a way to complete it fast and more importantly, to keep the on-going maintenance work easy. The previous web site was created with PHP Nuke. I had also made a </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/678965706132943339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=678965706132943339' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/678965706132943339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/678965706132943339'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2007/03/building-web-site-with-google-tools.html' title='Building a web site with Google tools'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-114843067873939943</id><published>2006-05-23T17:28:00.000-07:00</published><updated>2008-01-12T18:21:54.909-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>JBoss application configuration during deployment time</title><summary type='text'>I was looking for a mechanism to configure my application during deployment time. We have our own configuration module but it does not handle the case for deployment descriptor. For example, the application needs to connect to different JMS queues in different environment. The JMS queue name is usually specified in the jboss.xml which is wrapped in the ear file. Our old approach is to use an Ant </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/114843067873939943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=114843067873939943' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114843067873939943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114843067873939943'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/05/jboss-application-configuration-during.html' title='JBoss application configuration during deployment time'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-114710246744491680</id><published>2006-05-08T08:27:00.000-07:00</published><updated>2008-01-12T18:20:13.134-08:00</updated><title type='text'>Setting SSL on Apache 2.0</title><summary type='text'>I have been working on Ajax and JSOD recently to prototype different ways to access a secure web service in a cross domain manner. As a result, I need to setup different SSL secure domains on my local box. I have used name based virtual host with Apache 2.0 before to setup mutiple hosts on my box. But setting SSL sites could be a challenge.Fortunately I found a execllent guide on the web and was </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/114710246744491680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=114710246744491680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114710246744491680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114710246744491680'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/05/setting-ssl-on-apache-20.html' title='Setting SSL on Apache 2.0'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-114710169063047332</id><published>2006-05-08T08:20:00.000-07:00</published><updated>2008-01-12T18:22:46.757-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Implementing web service on JBoss 4.0.3</title><summary type='text'>My recent project involves implementing web services on JBoss platform. The current implementation (4.0.3) is based on a modified Axis code base and does not provides a good support on top-down (starts from WSDL) development approach. I ended up have to integrate Axis 1.2 with JBoss 4.0.3. It works well so far.At the same time, I have been looking into the next generation of JBoss WS which looks </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/114710169063047332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=114710169063047332' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114710169063047332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114710169063047332'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/05/implementing-web-service-on-jboss-403.html' title='Implementing web service on JBoss 4.0.3'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-114710157794974747</id><published>2006-05-08T08:19:00.000-07:00</published><updated>2008-01-12T18:23:37.959-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>A maven 1.x plug-in for Agitar</title><summary type='text'>I have been spending some time to create a Maven 1.x plug-in for Agitar . It was finally done last week and I have posted it on Agitar's forum .</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/114710157794974747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=114710157794974747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114710157794974747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114710157794974747'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/05/maven-1x-plug-in-for-agitar.html' title='A maven 1.x plug-in for Agitar'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-114428116077376792</id><published>2006-04-05T16:51:00.000-07:00</published><updated>2008-01-12T18:24:31.307-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>A Python script to sync. with Perforce</title><summary type='text'>I have been using Fitnesse for a while. But I am not happy with the file system based backup. There is no easy way to setup a SCM back end for the Fitnesse. So I end up have to write a Python script to periodically sync. my local page with a Perforce depot. It works quite convenient.</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/114428116077376792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=114428116077376792' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114428116077376792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114428116077376792'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/04/python-script-to-sync-with-perforce.html' title='A Python script to sync. with Perforce'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-114428089640186952</id><published>2006-04-05T16:46:00.000-07:00</published><updated>2008-01-12T18:25:04.902-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Bitten by Maven</title><summary type='text'>I have been struggling with my Maven script for a few hours. Finally it turned out is because of a property name I used. After I changed the name from "someA-someB" to "someA.someB", the problem is gone. Maven just does not like '-'.</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/114428089640186952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=114428089640186952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114428089640186952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114428089640186952'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/04/bitten-by-maven.html' title='Bitten by Maven'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-114165960583530715</id><published>2006-03-06T07:38:00.000-08:00</published><updated>2008-01-12T18:25:33.436-08:00</updated><title type='text'>Turn off caching for Firefox</title><summary type='text'>I have a need to turn off the caching for a particular page. I suppose the correct way is to set the cache directive in my Http request:Cache-Control: no-cacheThe server correctly returns the new version. The Firefox, however, insists to return me the cached old version.So I have to turn the entire Firefox caching capability off through its about:config page network.http.use-cache = false.Too bad.</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/114165960583530715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=114165960583530715' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114165960583530715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114165960583530715'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/03/turn-off-caching-for-firefox.html' title='Turn off caching for Firefox'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-114165945965980047</id><published>2006-03-06T07:36:00.000-08:00</published><updated>2008-01-12T18:53:50.705-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>My first grease monkey script</title><summary type='text'>I wrote my first grease monkey script today. It is to apply a XSLT style sheet on certain types of XML files. This is because usually the xml contains too much information and I just want ot view certain part of it and in more clean format such as a table. Here is the code:/*Title:xml transformerDescription:This is a Greasemonkey user script for Firefox.This script applies XSLT on plain XML files</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/114165945965980047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=114165945965980047' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114165945965980047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114165945965980047'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/03/my-first-grease-monkey-script.html' title='My first grease monkey script'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-114019834925479928</id><published>2006-02-17T09:41:00.000-08:00</published><updated>2008-01-12T22:01:48.072-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Mapping xml to Python objects</title><summary type='text'>I need to process XML in my python code and prefer to deal with the data in the pythonic way. From a wide options available, I choose to play with 3 of them. * generateDS   * gnosis.xml.objectify   * amara Because I am a fan of XmlBeans, it seems that generateDS should be my favorite choice. However, when I tried to run the code-generating script on my schema file, it encountered some recursive </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/114019834925479928/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=114019834925479928' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114019834925479928'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114019834925479928'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/02/mapping-xml-to-python-objects.html' title='Mapping xml to Python objects'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-114011114490839603</id><published>2006-02-16T09:29:00.000-08:00</published><updated>2008-01-12T19:05:31.167-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>2 tips about JBoss</title><summary type='text'>* to retrieve the server name, such as "minimal", "default", "max", in your codeString serverName = System.getProperty( org.jboss.system.server.ServerConfig.SERVER_NAME); * to set an unique Xid for each JBoss instanceif you are running multiple JBoss instances on the same machine, you probably want to give each instance a unique Xid base name. To do it, you need to addthe following line in the </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/114011114490839603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=114011114490839603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114011114490839603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114011114490839603'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/02/2-tips-about-jboss.html' title='2 tips about JBoss'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-114002628828214446</id><published>2006-02-15T09:56:00.000-08:00</published><updated>2008-01-12T19:07:21.152-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Successfully installed Twisted</title><summary type='text'>I need to install the latest Twisted with Python 2.4. Unfortunately I don't have Visual Studio on my machine. Is there a way to do it. I find this excellent instruction on how to install Python extensions without VS. It works as advertised. I am happily running Twisted now!</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/114002628828214446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=114002628828214446' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114002628828214446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/114002628828214446'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/02/successfully-installed-twisted.html' title='Successfully installed Twisted'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113986602360166236</id><published>2006-02-13T13:25:00.000-08:00</published><updated>2008-01-12T19:08:47.127-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Upgrade to CruiseControl 2.4.0</title><summary type='text'>Today I upgraded my CruiseControl to 2.4.0. The main reason is my project's SCM has been moved from Visual Source Safe to Perforce and I cannot get the CruiseControl 2.2.1 to work with Perforce. After the upgrade, everything comes back to normal.</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113986602360166236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113986602360166236' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113986602360166236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113986602360166236'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/02/upgrade-to-cruisecontrol-240.html' title='Upgrade to CruiseControl 2.4.0'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113950274128048093</id><published>2006-02-09T08:14:00.000-08:00</published><updated>2008-01-12T19:25:43.476-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python web service</title><summary type='text'>In my previous post, I have discussed using Perl (SoapLite) as client to consume a web service  implemented using Java(Apache Axis). I am curious to find how it will work out for other lanuages such as Python and Ruby. Here is my try for Python.The tool I use is ZSI which stands for Zolera SOAP Infrastructure. It provides a tool wsdl2py that can generate Python stub code from a wsdl file. Run the</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113950274128048093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113950274128048093' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113950274128048093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113950274128048093'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/02/python-web-service.html' title='Python web service'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113900930216714518</id><published>2006-02-03T15:10:00.000-08:00</published><updated>2008-01-12T19:26:21.642-08:00</updated><title type='text'>Programming languages I use now</title><summary type='text'>Programming languages I useJava - the  language  I  use to  earn my bread-and-butter and the one I will choose to do serious workRuby - it's style is cute I think, and it is fun to work with,Python - as powerful as it's name suggests, I have been bitten by the white spaces,  but now recoveredPerl - there is more than one way to do it, but many times I prefer there is only one way</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113900930216714518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113900930216714518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113900930216714518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113900930216714518'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/02/programming-languages-i-use-now.html' title='Programming languages I use now'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113892197265690561</id><published>2006-02-02T14:05:00.000-08:00</published><updated>2008-01-12T19:27:05.152-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Complex test data setup in Fitnesse</title><summary type='text'>I am creating functional specifications using Fitnesse for one of my systems. The system is a typical messaging system following the request/response pattern. Writing Fitnesse for this kind of system is straight forward and falls nicely into the BuildOperateCheck pattern. The only problem is that some types of requests are really really complex which could contain up to a few hundred different </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113892197265690561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113892197265690561' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113892197265690561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113892197265690561'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/02/complex-test-data-setup-in-fitnesse.html' title='Complex test data setup in Fitnesse'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113891755824172345</id><published>2006-02-02T13:36:00.000-08:00</published><updated>2008-01-12T19:27:34.624-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Fitnesse and coding convention</title><summary type='text'>I have recently started to use Fitnesse to document the requirements of two of my projects. It is a wonderful tool that not only makes writing requirement more fun, but also makes the process works. Many of us are used to hundreds of pages of requirement document that only satisfies the "process police" but does little help to developers. The requirements written in Fitnesse is live and up to </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113891755824172345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113891755824172345' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113891755824172345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113891755824172345'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/02/fitnesse-and-coding-convention.html' title='Fitnesse and coding convention'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113872591091562275</id><published>2006-01-31T08:37:00.000-08:00</published><updated>2008-01-12T19:28:02.442-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Stomp</title><summary type='text'>I have previous written about using web service as a mediator to let languages other than Java to communicate with JMS server. The approach is only for simple usage such as a testing tool. For more advanced usages, we can consider Stomp whcih is an open messaging protocol. There are various clients exist for Perl, Python and Ruby. On the server side, however, there is only ActiveMQ support.</summary><link rel='related' href='http://stomp.codehaus.org/Home' title='Stomp'/><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113872591091562275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113872591091562275' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113872591091562275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113872591091562275'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/stomp.html' title='Stomp'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113834890303833997</id><published>2006-01-26T23:31:00.000-08:00</published><updated>2008-01-12T21:23:43.211-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Make Perl speak JMS (3)</title><summary type='text'>Finally I will implement a Perl web service client. The tool I pick is SOAP::Lite (v0.55).SOAP::Lite comes with a handy tool similar to wsdl2java called stubmaker.  Run our WSDL through the tool and it generates a Perl module MessageRoutingService.pm. This module wrapps the call to the single RouteMessage API defined in the WSDL. Following code shows how to use this module:my @dest = (  SOAP::</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113834890303833997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113834890303833997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113834890303833997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113834890303833997'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/make-perl-speak-jms-3.html' title='Make Perl speak JMS (3)'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113834688915988635</id><published>2006-01-26T22:58:00.000-08:00</published><updated>2008-01-12T21:32:34.989-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Make Perl speak JMS (2)</title><summary type='text'>Now the WSDL is ready, I can start to implement the WS server in Java. The tool of choice is Apache Axis 1.2.1.With the wsdl2java tool, it is straight forward to generate the codes from the WSDL file. Because we will only use the server code, so we only need to change one class HttpBindingImpl.java.private MessageRouter mRouter = new MessageRouter();public code.simple.www.router._2005._11._7.</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113834688915988635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113834688915988635' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113834688915988635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113834688915988635'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/make-perl-speak-jms-2.html' title='Make Perl speak JMS (2)'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113834444706520240</id><published>2006-01-26T22:22:00.000-08:00</published><updated>2008-01-12T21:37:55.098-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><title type='text'>Make Perl speak JMS (1)</title><summary type='text'>To add JMS capability to Plum, I need to find a way to let Perl talk "JMS". Unfortunately there is no standard wire protocol for JMS. The JMS spec. defines the Java API but not the wire protocol. This is understandable as JMS is a Java centric system. Some JMS implementations, such as JBoss 3.x and 4.x, just use the Java serialization as their wire protocol. Others may use their propriate  </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113834444706520240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113834444706520240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113834444706520240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113834444706520240'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/make-perl-speak-jms-1.html' title='Make Perl speak JMS (1)'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113823287090209626</id><published>2006-01-25T15:33:00.000-08:00</published><updated>2008-01-12T21:39:04.311-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>PLUM is ripe</title><summary type='text'>My little tool PerL based Utility for Messaging is almost done. It needs to be improved in several places, but it is actually usable now.  It has following functions:* send single request to server using different protocols, currently supports HTTP(Post) and JMS(Topic and Queue)* compare response message with expected response* Perl RE can be used for matching XML type response* send a batch of </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113823287090209626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113823287090209626' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113823287090209626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113823287090209626'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/plum-is-ripe.html' title='PLUM is ripe'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113822637611159430</id><published>2006-01-25T13:52:00.000-08:00</published><updated>2008-01-12T21:43:36.701-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Added login for the Catalyst application</title><summary type='text'>I tried to add login for my testing utility which is a Catalyst based web application last night. I finished the code by carefully following the examples provided with document. Not too bad, just a couple of lines and I was done. But the application complained:Can't locate object method "session" via package "myapp" I went back and reviewed the code several times and could not figure out what was</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113822637611159430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113822637611159430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113822637611159430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113822637611159430'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/added-login-for-catalyst-application.html' title='Added login for the Catalyst application'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113804054066161689</id><published>2006-01-23T10:08:00.000-08:00</published><updated>2008-01-12T21:46:11.874-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>SemanticXmlDiff failed on Unicode</title><summary type='text'>I am using CPAN module SemanticXmlDiff to compare two set of XML files.  It complains about not being able to handle "wide character". After looking at the source code, it turns out the problem is the MD5 function used inside the module. The MD5 hash is used to spead up the comparson of text node in the XML file. However, MD5 only supports computing hash of ASCII characters, thus it will fail on </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113804054066161689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113804054066161689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113804054066161689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113804054066161689'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/semanticxmldiff-failed-on-unicode.html' title='SemanticXmlDiff failed on Unicode'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113772039116263813</id><published>2006-01-19T17:23:00.000-08:00</published><updated>2008-01-12T21:50:00.575-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Configure Catalyst 5.61 with Apache2 on Windows</title><summary type='text'>I reconfigured my Catalyst app using mod_perl today. It was configured using CGI before as I was making a lot of changes and would like to page to always reflect the last change. The original configuration is:&lt;VirtualHost *:80&gt; ServerAdmin my@server.com DocumentRoot c:/site/myapp/root ServerName myserver2 ErrorLog c:/site/myapp/myapp-error.log CustomLog c:/site/myapp/myapp-access.log common </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113772039116263813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113772039116263813' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113772039116263813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113772039116263813'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/configure-catalyst-561-with-apache2-on.html' title='Configure Catalyst 5.61 with Apache2 on Windows'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113763130986714003</id><published>2006-01-18T16:30:00.000-08:00</published><updated>2008-01-12T21:54:01.233-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Use DBD: :Oracle 1.16 to access Oracle 9.2 database</title><summary type='text'>I try to connect to an Oracle 9.2 database using following code: my $dbh = DBI-&gt;connect($config-&gt;{dburl}, $config-&gt;{dbuser}, $config-&gt;{dbpass});It failed with error:DBI connect('host=host;sid=dbsid','user',...) failed: ORA-12705: invalid or unknown NLS parameter value specified (DBD ERROR: OCISessionBegin) at ..I have to explicitly set the ENV variable NLS_LANG to make it work. The new code looks</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113763130986714003/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113763130986714003' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113763130986714003'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113763130986714003'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/use-dbd-oracle-116-to-access-oracle-92.html' title='Use DBD: :Oracle 1.16 to access Oracle 9.2 database'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113760604683878649</id><published>2006-01-18T09:36:00.000-08:00</published><updated>2008-01-12T21:54:37.316-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>The SimpleDateFormat class is NOT threadsafe</title><summary type='text'>In researching a defect in my project, I find SimpleDateFormat class is not thread safe. The "bug" is reported back in JDK 1.2 and JavaDoc is added in JDK 1.5. I just don't see it. :(</summary><link rel='related' href='http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4146524' title='The SimpleDateFormat class is NOT threadsafe'/><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113760604683878649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113760604683878649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113760604683878649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113760604683878649'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/simpledateformat-class-is-not.html' title='The SimpleDateFormat class is NOT threadsafe'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113726808253442749</id><published>2006-01-14T11:37:00.000-08:00</published><updated>2008-01-12T21:56:17.165-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>Perl object is just a blessed hash</title><summary type='text'>To work on a small testing utility, I have to pick up perl again. Fortunately my memory still served me well until I got into this problem. How to trun a hash into object. After a little reading of my Learning Perl book. I figured out how it works. Once you understand perl object is just a blessed hash, then the solution is clear.============================package MyTest;use strict;my %hash = (</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113726808253442749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113726808253442749' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113726808253442749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113726808253442749'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/perl-object-is-just-blessed-hash.html' title='Perl object is just a blessed hash'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113726636943594058</id><published>2006-01-14T11:07:00.000-08:00</published><updated>2008-01-12T21:58:59.531-08:00</updated><title type='text'>Added a nice JSCalendar to the blogger</title><summary type='text'>I added a nice JSCalendar to my blog. The instructions from ecmanaut helped. The first part is relatively easy. But the seconf part is difficult to follow. I ended up have to dig into the source code to find out how it works. After a hour or so, I finally figured out the basic functions. The challenge is  because I used a customized  template so that  many  CSS  tags  used  by the scripts  are </summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113726636943594058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113726636943594058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113726636943594058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113726636943594058'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/added-nice-jscalendar-to-blogger.html' title='Added a nice JSCalendar to the blogger'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113726552366310324</id><published>2006-01-14T11:01:00.000-08:00</published><updated>2008-01-12T21:57:35.099-08:00</updated><title type='text'>The del.icio.us tag script does not get along with Google's tools bar</title><summary type='text'>I added the del.icio.us greasemonkey script so that I can create the bookmark after the post. However, it stopped working today. After a search on google, I learned that the script, for some reason, does not work with Google's toolbar extension. After remove the Google's toolbar, it works just fine. :(</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113726552366310324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113726552366310324' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113726552366310324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113726552366310324'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/delicious-tag-script-does-not-get.html' title='The del.icio.us tag script does not get along with Google&apos;s tools bar'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20785750.post-113722084729881613</id><published>2006-01-13T22:24:00.000-08:00</published><updated>2008-01-12T21:58:16.513-08:00</updated><title type='text'>Added the freshtag to the blog</title><summary type='text'>I added the freshtag to my blog today. It allows me to use del.icio.us tag to categorize my blog.</summary><link rel='replies' type='application/atom+xml' href='http://sunh11373.blogspot.com/feeds/113722084729881613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20785750&amp;postID=113722084729881613' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113722084729881613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20785750/posts/default/113722084729881613'/><link rel='alternate' type='text/html' href='http://sunh11373.blogspot.com/2006/01/added-freshtag-to-blog.html' title='Added the freshtag to the blog'/><author><name>hsun</name><uri>http://www.blogger.com/profile/17732445074262240952</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
