Get a random subsequence of elements

Here’s a bit of code to create a sequence of random elements of a desired length, initialized from another sequence.

,

Leave a comment

Source code clip of the day

Leave a comment

“Using Relative URL Protocol Schemes” or “One Less Special Case for IE”

So the other day I was perusing through some of the RFCs, and came across RFC 1808. It’s called “Relative Uniform Resource Locators.” Of particular interest is section 2.4.3, “Parsing the Network Location/Login,” which says something like: “Hey, remember the last time you were creating a web application that needed to run in both HTTP […]

,

Leave a comment

F1 help in Windows [XP] Explorer

Have you ever accidentally hit the F1 key in Explorer when you meant F2 (or 1, or Esc)? Normally missing a key isn’t a big deal, but in this case F1 triggers the Windows help center. Help may be valuable sometimes (I wouldn’t know, I’ve never used it), but for me, the accidental keypress costs […]

,

Leave a comment

On the Economy of Light Bulbs

On May 17th, 2003, I bought this compact fluorescent light bulb for $5.99. A couple days ago it finally stopped working, ending it’s 76 month career of generating photons.

Leave a comment

Get your motherboard model in Linux

If you ever need to remotely determine the motherboard model of your linux server, try using dmidecode. This dumps the BIOS information, and that will usually yield the motherboard model.

,

Leave a comment

Even Faster Django Unit Tests

Last year, I wrote about speeding up django unit tests. With this method, I’ve been able to significantly reduce the time it takes to run my unit tests. But I still have a real short attention span. If anything, it’s shorter than it was last year. I also have an additional problem: I tend to […]

3 Comments

Linking Javascript

This is an idea that I’ve been kicking around for a while. Back in the C days, when most everything was determined at compile time, life was simple. You wrote your program, you preprocessed it, you compiled it, then you linked it. Linking is the cool part. The linker would determine exactly which bits of […]

,

Leave a comment

Air conditioners, water.

It is surely HOT where I live. Actually, today is on track to be hotter than it’s ever been in Portland. Right now (11:00 AM) it’s 91° F, and it’s forecast to hit 107° F this afternoon. Needless to say I’ve been running my air conditioner non stop for the last few days. This brings […]

Leave a comment

Hulu on the Mac

A quick update to the Hulu experiment: My Pentium 4 2.53GHz system with a GeForce FX 5500 256MB has some serious frame rate problems with Hulu’s streaming flash. Even at a very low resolution (800x600x16), the performance glitches are so distracting that it’s almost impossible to watch.

Leave a comment