Archive for the 'Technical' Category

NTFS-3G Will Not Mount FAT32 DMG Images

I have an external hard drive which is formatted NTFS. Just one of the many hazards of using a Mac is that they do not support NTFS, which is a far superior filesystem to FAT32. Fortunately, there is a program called MacFuse which allows you to use many different things as filesystems, including SSH. Someone at Google wrote a read/write NTFS driver, known as NTFS-3G, which works with MacFuse to allow read/write mounting of NTFS volumes. Exactly what I wanted, so I downloaded and installed MacFuse and NTFS-3G, taking care to get the latest stable versions.

Continue reading ‘NTFS-3G Will Not Mount FAT32 DMG Images’

Fatal error: Call to undefined function wp_register_sidebar_widget() in /blog/wp-admin/includes/dashboard.php on line 31

WordPress 2.5 is not compatible with older versions of K2. You’ll know if you have this problem because this error message appears:

Fatal error: Call to undefined function wp_register_sidebar_widget() in /blog/wp-admin/includes/dashboard.php on line 31

I had this problem, and found a solution in the WordPress Forums. I wonder why it happens and how the K2 people fixed it. Continue reading ‘Fatal error: Call to undefined function wp_register_sidebar_widget() in /blog/wp-admin/includes/dashboard.php on line 31′

Comparing Images and Measuring their Similarity in PHP

I’m very proud of myself tonight. You see, I’m a programmer at heart. Yet it has been a long time since I just programmed something for fun. Not a contest, not a class. Just out of pure usefulness and interest. Here’s the story.

php code for webcamI setup a webcam to watch my room for the day, and some software that uploads the webcam’s image to my server via FTP, 6 times per minute. The software is Active Webcam, and I just used the free evaluation version. Over the course of the day, it generated 6,522 images - way too many to view at once. So I decided to script something to make looking at the images more interesting.

The first obvious problem is that most of the images look exactly the same. Nothing happened during the day, so the images have no easily visible distinction. Yet they are not the same in terms of bits: the brightness has slight variations, the JPEG compression differed, etc. So doing an md5 comparison (which will be the same for files which are the same) doesn’t cut it. I need to actually look at the image data.

Fortunately, PHP has a great built-in image library known as gd. You have to have PHP compiled with it, but my host does, so I suspect most others do, too. After much trial and error, I managed to do the following: Continue reading ‘Comparing Images and Measuring their Similarity in PHP’

Grab the Latest Post from Multiple WordPress Blogs

I searched for a solution to this for hours, and ended up adapting some older code I’ve been using on my own website for years. Sometimes the best solution is the simplest one.

Continue reading ‘Grab the Latest Post from Multiple WordPress Blogs’

Weird Tab Behavior in Firefox

Is this a bug?

I was working on the TCF website, happily coding along, until I hit a snag: whenever I’d click on a link, it seems to be redirecting me back to the page I was on.

Okay, I shortly realized I was mistaken: I was actually not moving at all, and just staying where I was. What’s going on?, I thought. I clicked again. I realized the link was opening in a new tab… unless that page was already open in a tab. In that case, it wasn’t a new tab at all– it was the same tab, but not the one I was looking at. So when I clicked the link, if my Internet connection was fast enough, it looked like nothing happened!

Continue reading ‘Weird Tab Behavior in Firefox’

HackTool.Linux.ProcHider.a

Running your own server and writing your own scripts is really tough work. Now I need to go learn about HackTool.Linux.ProcHider.a.

Continue reading ‘HackTool.Linux.ProcHider.a’

How the Palm Foleo is as great as the iPhone

I heard about the Palm Foleo on one of Lao Laporte’s podcasts, so I looked up Palm and checked it out. It’s very intriguing. If you haven’t seen it yet, take a look.

palm-foleo.JPG

The Palm Foleo is basically a very small laptop. The appealing thing to me is that it runs Linux. I love small laptops. It’s a market I’ve always felt has been underappreciated and missed by most companies. When I first heard about the Toshiba Libretto nearly 10 years ago, I was hooked. I never actually got one, but I read lots about it and drooled over it for weeks. I hunted for a cheap one on eBay and visited pretty much every single website about the mini-laptop.

The point is that I like to travel and I like to take my computer with me. In that sense, Palm is absolutely right.

Continue reading ‘How the Palm Foleo is as great as the iPhone’

Runtime installation error

I was installing Paint Shop Pro 8 on my sisters new tablet pc when we got this error: Could not register flash06007900. I’m not sure what fixed it, but it worked after trying to find a fix and then just trying again.

Continue reading ‘Runtime installation error’

Browser cache is confusing

Yesterday, I was working on a website and had two versions of the same file. When I was ready to put the new version up for testing, I deleted the old one and put in the new one. I refreshed my browser window. No change! I pressed Ctrl+F5. I was still seeing the old version! I replaced the old file again, making sure to overwrite the old copy. I refreshed a few times and used Ctrl+F5 a few times to “force refresh.” No go. For about 5 minutes I was totally confounded. Why was the old version of my file still showing up, no matter how much I tried to refresh?! As a last resort, I went to Tools -> Clear Private Data in Firefox, and cleared my cache. One last refresh, and– BAM! The beautiful new version finally appeared. Another example from today after the fold…

Continue reading ‘Browser cache is confusing’

USC ITS Sucks

Computer science at USC is dying, and half of it is ITS’s fault. ITS is Information Technology Services here at the University of Southern California. I don’t know their history, but what I do know is:

  • They are one of the most crucial organizations at USC.
  • They manage USC Wireless, the  on-campus 802.11g wireless network.
  • They manage the usc.edu domain name and website.
  • They are highly restrictive and severely stifle innovation on a regular basis.
  • They move at a glacial pace. That is, extremely slowly and inefficiently.

An explanation of my complaints follows… now that I’ve written it out, I’m not so angry. But best to keep this online so I can record for memory’s sake how I felt at the time (though maybe not anymore).

Continue reading ‘USC ITS Sucks’