Remove All Children!
When searching for an easy method to remove all of a node’s children in JavaScript, I really need to remember to include the search term “JavaScript”.
Add comment October 22nd, 2009
When searching for an easy method to remove all of a node’s children in JavaScript, I really need to remember to include the search term “JavaScript”.
Add comment October 22nd, 2009
Something I want to know just infrequently enough. How is it done? How do I know, if I’ve got an element with “overflow:auto”, if it’s generated the scrollbar? And why do I want to know?
This is a handy technique when trying to, for instance, truncate unwieldy text within a fixed space. The trick?
Compare the element’s clientWidth (or clientHeight) to it’s scrollWidth (or scrollHeight). If the scrollWidth > clientWidth, the element has gone off the edge. Voila! Hopefully next time I need to remember this, I remember where I wrote it down.
Add comment December 11th, 2008
Something frequently encountered when using computers is the ubiquitous error message. There are lots of them that are inane, and, indeed, there are sites out there with whole sections devoted to this.
But there’s another peculiar brand of error message: The Incredibly Specific Error. For instance, this java.lang.IllegalArgumentException:
Path does not start with a "/" character.
I could understand if, perhaps, the path as a whole was invalid, or otherwise syntactically incorrect, but in this case, couldn’t the software try just a little harder? Couldn’t it throw the slash on there itself and just kick out a polite warning?
Add comment January 14th, 2008
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Feb | ||||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||