March 7, 2000

Passing a Date With the Query String

Question: Can I pass a date with the query string? Will the slashes cause a problem in this example? testing.asp?date=03/01/00 Answer: Yes they will. You will need to “encode” the data before passing it within the “URL”. To do that, use the Server.URLEncode function: testing.asp?date= Make sure you are only

Create a Collapsible Tree in IE5 Using SrcElement

Browsers Targeted: Internet Explorer 5 Tree structures appear quite often over the ‘Net, and they are becoming especially prominent in the face of the emergence of XML. Fortunately, tree structures are remarkably simple to create, using a combination of list elements and spans. In IE5, you can also take advantage

Determine Your Heap Size

The following example program prints out both the total and free memory sizes, allocates a chunk of memory, and then prints the memory sizes again. If the initial size of your JVM’s heap is about 1 MB, you should see the total memory increase as the heap grows. The amount

Font Metrics

Font properties that affect the rendering of strings are represented by the FontMetrics class. You can determine the FontMetrics of the current font in a graphics context with Graphics.getFontMetrics(). If all you want to know is the estimated width of a string in pixels, FontMetrics provides a stringWidth() method for

Beware of Static Finals

Consider this scenario, you define a public static final variable in one java file, and access the variable in other java file. Now, if you change the value of static variable and compile only the changed java file, you’ll get the wrong result. The example below will make it clear(tested