Floating in the Pre-Css Era
Wednesday, October 22nd, 2008 Posted in HTML, css | No Comments »Today I learned a fact about HTML which had somehow alluded me for many years. Having been working on web-related projects for so long, the mind boggles as to how I could possibly have not picked up on this in ...
IE6 z-index bug
Monday, June 16th, 2008 Posted in Browser Quirks | No Comments »I ran into an IE6 bug the other day which I've encountered a few times before and managed to workaround without really knowing the true cause. This time I decided to look into what was actually going on. The problem is the way ...
Multiple Dispatch and the Visitor Pattern
Saturday, June 14th, 2008 Posted in Code Design, Design Patterns, Java, Lisp | No Comments »Following from my yakking about the state machine pattern, I've run into situations since where I've had a class which must react differently to different inputs, and thought how, rather than write a huge switch statement, or huge else-if with ...
UTF-7 with JavaMail
Saturday, June 14th, 2008 Posted in Java, Protocols | No Comments »Java has a pretty cool api for handling email called JavaMail. There are classes for constructing and sending multipart email as well as classes for connecting to mailboxes and processing the messages therein. I hit a bit of a problem, however, ...
Doctype Declaration with XMLC
Sunday, March 23rd, 2008 Posted in JSP, Java, XMLC | No Comments »Enhydra XMLC is a neat alternative to Java Server Pages (JSP). XMLC takes a page of plain old HTML and generates a java class capable of producing the same HTML. By marking important elements in the HTML with id and ...
XML Attribute Namespaces
Sunday, March 16th, 2008 Posted in XML | No Comments »When using namespaces in xml, the namespace of an element is, by default, inherited by its child elements. For example: ...
$_SESSION and register globals in PHP
Tuesday, January 8th, 2008 Posted in PHP | No Comments »I spent a silly amount of time getting to bottom of a bug in a php script I was maintaining. The script was using the session to store a list of service names, among other things: $_SESSION["servicename"] = array("Just", "Some", "List", "Of", "Names"); But ...
Image Submit in IE 6
Monday, November 19th, 2007 Posted in Browser Quirks, HTML | No Comments »I've just run into a little gotcha with the "image" type input tag in HTML: <input type="image" src="foobar.gif" name="my_parameter" value="5" /> In Firefox, and probably every other browser other than Internet Explorer, clicking this submit button will post to the next page 3 parameters: "my_parameter", ...
Programatically Selecting Text Background Colour
Monday, October 22nd, 2007 Posted in Code Design | No Comments »Yesterday I was reminded of a little problem I had thought about before but never really solved: how to write a function to select the optimal background colour for any colour of foreground text so that the text can be read easily. An obvious ...
LazyList not lazy enough
Tuesday, October 16th, 2007 Posted in JSP, Java, Struts | No Comments »Today I was writing a jsp for Struts in which I needed to define a text field for an indexed property of the form bean. The property was a string list which could be any length, depending on what was ...