prasad

 
Recently I came across a strange problem on the debian server install. The following piece of jython code which was working fine on my machine failed to work on debian server.
import java.text.DateFormat as DateFormat
format = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);
format.setLenient(1);
print
format.parse('Nov 6, 2006 3:23:54 PM');
I was getting this exception:
Traceback (innermost last):  
File "<string>", line 5, in ?
java.text.ParseException: Unparseable date: "Nov 6, 2006 3:23:54 PM"
at java.text.DateFormat.parse(DateFormat.java:335)
...
I looked at the default Locale that was used and it was: [command used: locale]
LANG=en_IN
LC_CTYPE="en_IN"
LC_NUMERIC="en_IN"
LC_TIME="en_IN"
LC_COLLATE="en_IN"
LC_MONETARY="en_IN"
LC_MESSAGES="en_IN"
LC_PAPER="en_IN"
LC_NAME="en_IN"
LC_ADDRESS="en_IN"
LC_TELEPHONE="en_IN"
LC_MEASUREMENT="en_IN"
LC_IDENTIFICATION="en_IN"
LC_ALL=
I did the following and got the piece of code working:
export LC_CTYPE="en_US.UTF-8"
After this I could got the following output:
Mon Nov 06 15:23:54 IST 2006
Make sure you set the right LOCALE before using any API that depends on SYSTEM LOCALE information. Few Java API's allows you to specify the Locale as an argument use it when required. More details about Java 1.3 Locale I found a related post Don't forget to specify the locale

 
My System got affected by Email-Worm.Win32.Brontok Virus few months back from now.
Although Anti-Virus cleaned up this worm, but I had to spend sometime to get the system configuration back to normal. Here are few links which helped me in the process.

Email-Worm.Win32.Brontok Virus:
http://activepanel.blogspot.com/2006/01/brontok-rontokbro-korbo-b-mytob-virus.html

and more about similar virus W32.Rontokbro@mm:
http://drvamsikrishna.blogspot.com/2007/02/solution-for-folder-options-missing_28.html

My system configuration has landed to proper state, I can now breathe easy, (Quite successfully avoided usual Windows RE-INSTALL!)

 
Check out YouOS, a interesting implementation of OS on the Web. 

 
After working with Antlr and Javacc I came across Sablecc which was described as
"an object-oriented framework that generates compilers (and interpreters) in the Java programming language"
.

I started with Etienne Gagnon's Master thesis which is quite well written. I was pretty convinced when I got my first program working with Sablecc. I decided to document the steps I followed which can serve as a tutorial to start working with Sablecc.

Here is the link for my tutorial(pdf) and first application INIParser(zip)

Reference links:
Mistaeks I Hav Made
Sablecc Wiki

Resource links:
Sablecc-3-beta.3
Sablecc downloads
Sablecc Home

 
Tomcat allows individual WebApplication to have there own Realm. To know more about it look at  ContextFile.

Archives
<< January >> 2009
S M T W T F S
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Meta