Dugan Chen's Homepage

Various Things

Quetzalcoatl 2.0 Screenshot

This is what you’ll see if you check out Quetzalcoatl’s “experimental” branch. All images are loaded from last.fm’s web services, based on tags in the music files. The albums shown in the “Songs” subtree of the left pane are: the soundtrack to the 2011 version of Jane Eyre, Frente’s “Marvin the Album”, Loreena McKennitt’s “The [...]

Using Django with Selenium

Much has been written about the ways to integrate Django with Selenium. Here’s my attempt. First, I was inspired by harry’s fantastic Test-Driven-Django Tutorial and GitHub page. I am also aware of django-selenium and django-nose-selenium, but have not used them. Now, for functional testing, you want Selenium. Most guides to testing with Selenium recommend integrating [...]

Using PyQt4 to download images from Last.fm

The following is code that I’m planning to roll almost directly into Quetzalcoatl. It asynchronously downloads an image from Last.fm and loads it into a widget. The image then scales with its containing widget, using maximum amount of space while keeping its aspect ratio. Keep in mind that it’s example code, not production code, and [...]

Playing SDL_mixer games with soundfonts

Here’s a post for people who use Linux and still like to play games. As almost everyone above a certain age is aware, DOS was a popular gaming platform. Because most DOS games were made before the advent of CD-ROMs, they stored their music in MIDI format, which is extremely space-efficient. A MIDI file is [...]

Django with Yahoo’s Geoplanet Database

Most web applications eventually need to provide the following user experience: select your country select your “administrative division” from a list appropriate for your country Where administrative division could be state, city, province, prefecture, or something else appropriate to your country. It goes without saying that to pull this off, you need a populated backend [...]

The MPD Client Library Begins

This is a follow-up from a post made a couple of days ago: I’m starting to write a reactive MPD client library for PyQt. Well, I’ve started. There has been some soul-searching since then about just how far I would like to go with this. Do I want to limited it to idle() calls (which [...]

I’m starting to write a reactive MPD client library for PyQt.

The Music Player Daemon commonly known as MPD targets Linux, runs as a daemon, requires you to set a port number, and allows clients to connect to it and send it commands. The commands are plain text: you can connect to the daemon via telnet and send it commands from there. Now, if you have [...]

Progressively Enhancing Upload Forms

This is how you progressively enhance an upload form. Start with your average run-of-the-mill upload form. The following example takes a file whose maximum size is two placekittens: We can use this form in page like the following, where the user is expected to upload an image. After the form is submitted, the server-side code [...]

3D accelerated with Flash. And NVidia. And Issues.

The Linux version of Adobe’s Flash player is at 11 beta 2. My tests have shown that its 32-bit and 64-bit versions perform identically. That is to say, identically badly. It is very unlikely that you’ll be able to watch full-screen HD videos with a default install. For starters, Flash is notoriously CPU-intensive. If you’re [...]

Building Python 2.5 on Slackware64

There are reasons why you might want to install Python 2.5. One of those reasons is to develop Google App Engine apps. Unfortunately, Python 2.5 was never released for the 64-bit version of Slackware. By the time Slackware64 was released, it was already shipping Python 2.6. I could get from an old version of Bluewhite64 [...]


Next Page »