October 29, 2006

Subversion, ViewVC, and Eclipse

I am now keeping a portion of my web site in a Subversion repository. This helps me keep track of changes that I make and helps keep things organized. I also occasionally use Eclipse with the Subclipse plugin to access the repository when making changes to the files in the repository.

I really wanted a simple way to browse the repository and get colored diffs like I once had with CVSWeb. Fortunately ViewVC has Subversion support. I tried to run it but it didn't work because I didn't build the Python bindings when I built Subversion. This required the installation of SWIG.

Once SWIG was installed the configure script for Subversion detected it and set up the source tree to build bindings for Python, Perl, and Ruby automatically. This was all fine and dandy, except I got an error at install time. I seem to remember running into the same problem the time I originally built Subversion on my laptop. Instead of trying to fix it I thought I would try to update to version 1.4.0.

Upgrading worked with on caveat: I had to pass the "--disable-keychain" argument to the configure script to get the thing to build because I'm running on Mac OS X Panther. For some reason it complains about a header file not being there when it really is.

This worked great. I was browsing my repository in ViewVC and edited a file in Eclipse, but ran into another problem when trying to check the change in. Subclipse showed a error that said "malformed network data." Updating Subclipse to version 1.0.3 solved all of that.

Of course this took all day to accomplish (including interruptions like meals) but it feels nice to have everything working correctly again.

July 20, 2006

I Did It!

I've been studying for the Extra class Amateur Radio license exam for a few years. (Well, not exactly. I started studying a few years ago and only a month or two ago regained interest.) Tonight I took a trip down to Austin, MN to take the test.

I was the only candidate that showed up. It was a nice relaxing atmosphere and I passed with room to spare. They said I got 8 wrong (out of 50 questions) where you are allowed 13. Now I don't know what to do. I've had my nose stuck in that darn book so much lately that I feel strange not having to worry about it.

With the exception of the open book review for accreditation for the ARRL/VEC, I'm pretty much done with tests for Amateur Radio. Now I can actually focus on operating and not worry about the fact that there is an upgrade that I have not yet achieved.

July 12, 2006

Solder Smoke

I've been listening to a podcast called Solder Smoke. It's two guys (KL7R and M0HBR) that talk about homebrew projects and other stuff. They have been working on some really interesting projects and all of the past episodes are available on their site.

June 15, 2006

Check Your Calculator

I've been studying for the Extra Class Amateur Radio exam and while taking a practice test I got the following question:

What is the phase angle between the voltage across and the current through a series R-L-C circuit if XC is 50 ohms, R is 100 ohms, and XL is 75 ohms?

  • 76 degrees with the voltage leading the current
  • 76 degrees with the voltage lagging the current
  • 14 degrees with the voltage lagging the current
  • 14 degrees with the voltage leading the current

I thought I knew how to figure out this problem. I wasn't, however, coming up with a reasonable answer. It took nearly 15 minutes for me to realize that my calculator was set to radian mode.

Duhhhh!

June 14, 2006

Trackback Spam Reporting

In the past two months I've received quite a bit of Trackback spam on my blog. Its interesting to see how many you get per month. This can be done with SQL:

SELECT 
     YEAR( `tbping_created_on` ) AS year, 
     MONTH( `tbping_created_on` ) AS month, 
     COUNT( * ) AS count
FROM 
     `mt_tbping`
WHERE 
     `tbping_blog_id` = 1
     AND `tbping_junk_status` < 0
GROUP BY 
     year,
     month
ORDER BY 
     1, 
     2

June 6, 2006

Movable Type 3.2

I've upgraded to Movable Type 3.2. One of the first things I did after upgrading is to use the new archive basename feature for the individual archive filenames. Immediately, though, I found that editing an entry caused the basename to change by adding a "_1" to the end.

Now, this is normally done to prevent collisions, but an entry should not cause a collision with itself. I did some searching and found that this is a known defect in Movable Type and can be avoided by using the save button on the entry edit screen rather than the one on the preview screen.

I will say the anti-spam filtering for comments and trackbacks is wonderful. They come enabled by default and have been already filtered out hundreds of junk trackbacks that my blog has received in the last few days.

Next, I intend on creating a new site identity. I already have all of my templates and other site specific artifacts in a Subversion repository. I now have to begin editing those templates and other things and come up with a nice clean design with cool CSS tabs for navigaion.

April 21, 2006

Thumbnail Checker Update

As i mentioned in a previous post I have a web based utility to extract and display a thumbnail image that may be hidden in some JPEG images. I have updated it to use PHP's EXIF data extration functions instead of using an external application. It should be more secure this way.

April 19, 2006

File Uploads in Firefox

I recently ran into a problem while uploading files through HTML forms in Firefox. When I uploaded a file the browser would wait for a very long time, then the "Unresponsive Script" message appeared. Clicking on Stop Script would get the page to load immediately, but Continue would take several tries before the result page would load.

After searching through Bugzilla I came to the conclusion that it's possible an extension is causing the problem. To test, I first created a new profile and tried uploading a file to my file upload test servlet. The response came back immediately, even though the file I was transferring was 4 MB.

Next, I switched back to my normal profile and began removing extensions one at a time and trying to upload a file. It finally worked correctly when I removed SessionSaver .2. To get my session management capabilities I was able to install Session Manager which appears to work perfectly.

March 22, 2006

Finding a polynomial with given roots

This is for future reference because it took me forever to remember how to do it the other day.

The problem is to find an nth degree polynomial that satisfies a specific set of conditions:

  • n = 3
  • 2 and 4i are zeros
  • f(2) = -51

First and foremost, since this is a 3rd degree polynomial we need three roots, but are given only two. The third one comes from the fact that imaginary roots come in conjugate pairs. This means that since 4i is a root -4i must also be. Now we have three roots.

Now, those three roots can be used to determine three linear factors of the polynomial in the form (x - a) along with an unknown factor, a:

f(x) = a(x - 2)(x - 4i)(x + 4i)

f(x) = a(x - 2)(x - 4i)(x + 4i)

March 2, 2006

New Host

I just finished moving my site over to a new hosting company: A2 Hosting. I only signed up for one month while I tested the water, but it looks like it'll do everything that I need. The big features I needed were mod_rewrite, PHP, MySQL. I also have some Redirect and ForceType directives in a few of my .htaccess files which I am happy they still work. It just took a little bit of reconfiguring to get Movable Type, MediaWiki, and Gallery running again.