Satya's blog - 2006/10/
Okay, here's how to convert a series of images, say from a web cam, to flash video. On linunx, no less. This little trick uses mencoder and flvtool2 (the latter is a ruby script). Here's the command:
mencoder "mf://*.jpg" \
Follow that up with flvtool2 -UP test.flv. Then you will need a Flash video player, such as the one from Jeroenwijering.com. That one's free for non-commercial use. So make an HTML file with content similar to:
<html>
...and Bjorn Stronginthearm's your uncle. Update: I got instructions from Homo-Adminus Blog which helped me. Also, if you want sound you need to add this to the mencoder command line:
-oac mp3lame \
I was wondering what was causing USB events in my server log when I don't have
USB devices connected to the server.
Looking at the back of the coimputer, I found a USB cable plugged in and
realised it was the printer.
Duh.
In a game I play, there are maps. Movement costs differently per type of tile. Moving uses up action points. Players make maps of the sectors. I write an auto-mapper Firefox Extension. I now have a lot of map data in a database. I make pretty maps in HTML and as images using Imagemagick (in perl). Much goodness ensues. "Hmm," I think, "why don't I write something that will calculate the path across the sectors for a of minimum action points, i.e. shortest path. Ah, Dijkstra's algorithm gives me shortest paths. After all, the relevant map data can be expressed as a graph." I used the data in the Dijkstra's algorithm Wikipedia article. Well, Dijkstra's algorithm gave me distances from the start point. I struggled a bit, and eventually this site (PDF) showed me that I also need to track the "previous" vertex. Once I did that, I got the shortest, cheapest, route. Some more struggling with Javascript and I can generate shortest routes as much as I want, and their cost is shown to me. That's right, I have implemented Dijkstra's algorithm in Javascript. I will post it soon.
I was itting on my bike at the corner of Doughty and Ashley waiting for traffic to clear when this slate-gray( don't know if that's the right name) Jeep Cherokee-ish scraped past me. It would have run over my foot if I hadn't jumped away. The lady stopped around the corner and was all like are you hurt, I'm sorry, etc. I said no (mistake!) and never mind (mistake!) and you have to watch where you're going (NO SHIT!). What I should have done is screamed and called for police. She had kids in the car, though, which made me unreasonably sympathetic. It still pisses me off that she got off too easy. I suppose it's my fault for riding a bike while brown.
Remember Serenity? From Firefly (or Serenity the movie) Yesterday I was watching Battle Beyond the Stars, a cheesy SF flick from the 50s or something. Okay, it's from 1980. Think Seven Samurai/China gate/Magnificent Seven set in space. Well, there was a ship in it similar to Serenity, and a big ship like a Star Destroyer but shaped like a like a Rebel Corvette. Go look it up.
This was months ago. I read somewhere that the stardates on the Captain's log in Star Trek: The Next Generation were 5 digits, started with 4, and the second digit was the season number. So when I got (from the library) what I thought was season 1, and heard the Captain say "Stardate four six..." I was prompted to check, and sure enough, I had season 6 by mistake. |
|