Category Archives: Programming

All tech posts

Using Oracle Dialect in HSQLDB

HSQLDB supports Oracle dialect starting version 2.0 onwards. However, there is not much documentation or examples around this feature. In this post, I will explain the usage of this feature with a simple example. To enable SQL dialect, two steps … Continue reading

Posted in Java, Oracle, Programming | Tagged , , , | Leave a comment

GWT Designer is now free! Yippee!

GWT Designer is a powerful UI development tool for GWT. It is based on the Eclipse framework. Initially a paid tool, it has been re-launched as a free product after Google’s acquisition’s of Instantiations. Read further for details… Continue reading

Posted in GWT, GWT-Ext, HTML, Java | Tagged , , , , | Leave a comment

GWT Quick Tip: How to check whether a GWT application is running in Hosted Mode

Sometimes, at runtime, you need to detect whether the application is running in Hosted Mode or not. E.g. you might decide to enable client side logging using GWT-Log only when the application is executing in Hosted Mode. The logging should … Continue reading

Posted in GWT, GWT-Ext | Tagged , , , | Leave a comment

Java Design Patterns – A Short Writeup

A design pattern is a general, language-independent technique used to solve a class of related problems. A design pattern is a widely accepted solution to a recurring design problem. It is a guideline rather than a specific solution. An idiom, … Continue reading

Posted in Java | Tagged | Leave a comment

Number of Days Since 1900

Here is a simple Orace query to calculate the number of days since 1900. Thanks to Ari Kaplan for the query!

Posted in Oracle | Tagged , | 2 Comments

Get the Last Day of The Month in Java

Use the getActualMaximum(int field) method of the Calendar class to retrieve the last day of the month. See the below code for usage details. The code retrieves the last date for Feb 2009 as an example. You can modify the … Continue reading

Posted in Java | Tagged , , | 1 Comment

URL Connection via Proxy (the Java 1.5 way)

In enterprises/corporate environments, more often than not, connection to external servers/resources is via a proxy server. While developing applications for such environments, developers need to make sure that their code connects to external sites/resources via the proxy. In this post, … Continue reading

Posted in Java | Tagged , , , , , | 2 Comments

GWT-Ext – Synchronized Scrolling of Grids

I recently had a requirement wherein two grids showing similar information needed synchronized scrolling i.e. if the left grid was scrolled down vertically, the right grid also needed to be scrolled down in the same proportion and vice-versa. This feature … Continue reading

Posted in GWT, GWT-Ext | Tagged , , , , | Leave a comment

SPRING Quick Tip: Setting application property values dynamically!

Spring provides a very cool feature of passing application property values dynamically using the java -D switch. All you need to do is define the property in the properties file and leave the value part blank. When you run the … Continue reading

Posted in Java, Quick Tips, Spring | Tagged , | Leave a comment

A simple way to list/filter files

Here is a very simple and elegant way to list or filter the files in a given directory. For this use the File.listFiles() method of java.io.File class. The example below deletes all the files that end with the “.tmp” extension. … Continue reading

Posted in Java | Tagged , | Leave a comment