Google Code has a java library called Guava. I recently found and used a utility class in the library called Joiner. I used the Joiner class to join a list of String items to make the list one comma separated list. For example:
I had to solve a problem today where we moved a web application from Apache Tomcat 6 to Apache Tomcat 7. All of the applications within Tomcat 6 had to be moved to Tomcat 7. However, some of those applications had jsp pages where an html or jsp tag’s attributes might not have had at least one space between an attribute’s closing quote and the first letter of the subsequent attribute. So, I created a regular expression that can be used to find that text pattern in a file. The regular expression is \)"[a-z].
\) searches for a closing parenthesis,
” searches for a single quote
[a-z] searches for a single occurrence of an lower case letter from a through z, inclusive.
I’ve been working on a Spring Roo application and needed to add a domain class used to model application users. I tried using the default Roo command for adding the User domain class “entity jpa –class ~.domain.User –testAutomatically”, but Roo does not like that method because the name “User” is a reserved word in SQL. However, you can overwrite the command and force Roo to create a User class by adding –permitReservedWords to the command (entity jpa –class ~.domain.User –permitReservedWords –testAutomatically). I’m not sure if this is the most secure way to do things, but it is an option.
Today I was working on a function to convert a map coordinate from degrees-minutes-second format (e.g., 125° 23′ 42” W) to decimal degrees (e.g., -125.395) and I came across the word Sexagesimal. It is not profanity.