September 10, 2003

Rotate Content Easily with Object-Oriented JavaScript

Presenting information on the web can be a challenge, especially when you need to show more information than fits neatly on a given screen. This article presents a way to increase the density of information on the screen by rotating content within a fixed area dynamically. The popularity of rotating

Sorting SQL Results in Your Own Preferred Order

USE PubS– Sort Each of PubName in Natural Alphabetic Order but push A’s to thelastselect * from publishersOrder by (CASE left(Pub_name,1) WHEN ‘A’ THEN 1000 ELSE ASCII(pub_name)END)–Sort Publishers By City in your own Order of Preference first and in anatural order for the–remaining cities. Also remaning cities to be sorted

International Test for Illegal Characters

Windows has the solution: the IsCharAlphaNumeric function, defined in User32.dll. This function uses the currently defined locale when performing comparisons, thereby allowing full use of accented characters. This sample demonstrates how you might use this function: Public Declare Function IsCharAlphaNumeric Lib _ “user32” Alias “IsCharAlphaNumericA” ( _ ByVal cChar As

Change the Cell Color of a JTable on MouseOver

This code highlights the cell of a JTable when the cell is moused over. It includes its own Table cell renderer and a Mouse motion listener, for getting the mouse position on the JTable. public class MouseHoverTable extends JFrame{ int itsRow =0; int itsColumn = 0; JTable itsTable; MouseHoverTable(String framename)

Explicit Constructors

A constructor that takes a single argument is, by default, an implicit conversion operator, which converts its argument to an object of its class, the keyword “explicit” can be placed before the constructor with one parameter to avoid such implicit conversions. Sample Code: #include class test{ int i; int j;public: