contour tutorial
Diana asked me about my mission possible powerpoint background, so I decided to share it.

Here is the original background that I used.
Posted on Dec 14 2007 07:49 pm by david
pendrivelinux
I got a new 2-gig thumb drive yesterday, and right away I installed Linux on it because I'd been wanting to do that for a long time but my old 256-meg one wasn't big enough for it and all my school things at the same time. Anyway, it's called pendrivelinux, from pendrivelinux.com, and it's a version of Debian cut down and modified to work from a usb drive.

It works beautifully on my downstairs computer, including persistence, meaning it saves all settings, modifications, files, everything to a separate partition on the drive, and loads them when the computer boots from the drive. However, on the computer that I normally use, it just goes "fatal server error", "no screens found". Strangely, it does recognize the graphics card, screen resolution, refresh rate, etc, and the text does show up. I'm guessing the problem is with the monitor drivers, and it is probably a snap to fix, but I'm (completely coincidentally) probably getting a new monitor on Tuesday, so I might as well wait until after I try it with that. No hurry.
Posted on Nov 25 2007 09:52 am by david
leaves
It's fall already, and the leaves are falling off of the trees, and people are raking them up or leaf-blower-ing them up and stacking them by the road so the leaf-picker-uppers can come and get rid of them.

Which is completely beyond me. Because effectively, they're removing "biomass" from the area, which makes the dirt less fertile, which makes the grass less green, which makes them run to the nearest store come spring and buy some fertilizer to make it greener. Guess where the fertilizer comes from? A lot of it is made from leaves recycled in the fall. So you might as well keep the leaves in a neat pile in your backyard with a little bit of dirt on top of them like we do, and they compost very nicely by spring and you can use it whenever you need to. shocked

Grades: very likely all A's other than math. Which is all right. I think.
Posted on Oct 30 2007 08:45 pm by david
cool swaps
I started doing USACO training last week (http://ace.delos.com/), and I've been playing around with all sorts of stuff in Java. Including swapping without a temp var. Of course, this is what we're taught when we are introduced to programming:
int c = a;
a = b;
b = c;
This definitely works, and there's nothing wrong with it. However, it looks so much cooler if you can do it without c.
a -= b;
b += a;         // b is original a
a = b - a;      // a is original b
Now what about in one line, for an even cooler effect? Start combining from the top:
b += a -= b;
a = b - a;
a = (b += a -= b) - a;
Great, but the parenthesis obstruct the beautiful sight. There's still a cooler way that I came across somewhere, using xors:
x ^= y ^= x ^= y;
The '^=' operator is just like '+=' or '-=', except with an xor instead of addition or subtraction. If you want to see why this works, go through it on paper with the four combinations of two boolean trues or falses. Basically, (a xor b) xor a = b. It works for one bit, and a primitive type is stored as a group of bits, each one is done separately.

Note: this is just for kicks. It's not any better than the first one I had. In fact, it is worse in that each time you swap something it has to be commented for anyone besides you to be able to read it. Keep that in mind.

It only has two advantages that I can think of. One, you can put it in (for example) an if statement without braces (which isn't actually any sort of advantage if you think about it, but it's still appealing). Two, in a recursive function which gets called tens of thousands to millions of times, the weight of a temporary variable begins to show up and these tricks actually help.
Posted on Oct 24 2007 11:34 pm by david
updated cs stuff
The CS stuff page was hopelessly (two weeks, in any case) out of date. I added some more... stuff.
Posted on Oct 07 2007 01:59 pm by david
bcc county meet
Short story: we kind of got crushed.

They got sixth in before our first guy, but the girls ended up winning by one point. It was a pretty bad course in terms of an away meet, because most of it was a huge loop through a forest, where you had no idea how far you were except based on your own pace and time. There were no major hills at all, but there was sand and tree trunks and water and roots and everything.

This was the first time I could actually run at a meet in almost a month, so my pacing was a big (or more) off. I started out with a six or six-and-a-half minute pace for the first mile or so, and finished with eight or maybe even over. Part of that was trying to get ahead before my knee slowed me down.

There's one more meet, the Meade Invitational, before regionals November first.
Posted on Oct 02 2007 06:44 pm by david
gallery
Created a new image, the globe, and, as if I hadn't done enough coding already today, decided to make a gallery to show off all (four rolleyes) of my GIMP images so far. I'll do something later to make it smaller / prettier, but not right now.
Posted on Sep 22 2007 10:45 pm by david
new tutorial
The long-awaited (or, in any case, long-promised) userbar tutorial has arrived. Check it out.

Also brought the school stuff section up to date.

I have poison ivy all done my left arm. shocked And I don't even know where it's from. Maybe the meet at Wootton on Wednesday (I didn't even write about that; short story: guys won, girls lost), although I actually remember checking for it before I sat down anywhere.
Posted on Sep 22 2007 08:47 pm by david

<< Previous 1 2 3 Next >>