Skip to main content

Posts

Showing posts from March, 2010

Traffic Ticket Fines in California Effective 2010

Pay close attention to the rules of the road!  Traffic Tickets Fines ( Effective 01/06/2010) (California) Violation Total Fine Due VC 12814.6 $214 Failure to obey license provisions. VC 14600(A) $214 Failure to notify DMV of address change within 10 days Note: The fine may be reduced with valid proof of correction. VC 16028(A) $796 Failure to provide evidence of financial responsibility (insurance) Note: This fine may be reduced with proof of insurance on or after the violation date. VC 21453(A) $436 Failure to stop at a red signal. VC 22350 $214 VC 22349 Unsafe Speed, 1 to 1...

Replacing $ in a String in Java

I faced an issue in my project recently where we read a password for an admin user first from a file which has a dummy or wrong password written in it. Then I read the password from database and replace the dummy password with the real password that I get from Database. So the code was something very simple like this (this is actually different from originalk). String myXmlDoc = readALargeXmlAsString(); String realPassword = readFromDatabase(); String password = myXmlDoc.replaceAll("dummyPassword", realPassword); All on a sudden we found that this replacement started failing after the password of that admin user was changed recently. Here is the exception log. Exception in thread "main" java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:706) at java.util.regex.Matcher.replaceAll(Matcher.java:806) at java.lang.String.replaceAll(String.java:2000) at com.salesforce.test.StringReplaceTest.mai...

Bon Jovi Concert, 1st ODI double century by Tendulkar and more

Last month (Feb 22, 2010 Monday to be precise) we went to see the live concert of Bon Jovi in San Jose. With me there were Shusmita, Shahriar, Nodee and Amin as we dropped Ahyan to Wali Bhai/Asha Vabi's house. Shusmita was interested when she heard about Bon Jovi and although I am in now way fac of English music except Michael Jackson and Hip Hop songs like 50 Cents, I agreed to the costly tickets of HP Pavilion in San Jose. We came back from office early that night and was on time at the stadium. I was understanding very well how good Bon Jovi was handling the crowd and making them stand on their feet. He has so many good songs although more than half of those I probably never heard. I enjoyed the show and his performance. So our next target in this line will be Black Eyed Peas (Ahyan's favorite) and Bryan Adams (Shusmita's favorite). While last few months were great for me cricket wise as I was able to watch online several  Bangladesh and Sachin Tendulkar cricket game...