Peso por extenso

Estou compartilhando um trecho de código bem simples que eu escrevi para retornar um dado peso por extenso. Minha função usa o S.I. (Sistema Internacional de Medidas), mas você pode facilmente alterar o código e adaptá-lo para outro sistema de medidas. Também é bem simples traduzi-lo para outra linguagem de programação. function weight($weight) { $weight […]

Mac OS X and Java 1.6, keyboard input

Few months ago, after I updated (via Apple’s software update) my Java from 1.5 to 1.6, some applications started to have a strange behavior: the input by keyboard simply didn’t work as expected. Some keys, like return and shift, does work, but all letters and numbers not. Only in the past week I’ve discovered why. […]

Opening links in new window: the XHTML way

Roger Johansson said the following about using the target attribute: The target attribute is not allowed in strict doctypes, and since you should always use a strict doctype, the target attribute is invalid. It’s possible to use a JavaScript trick to open a link in a new window and still having a valid XHTML Strict […]