Wednesday, February 18, 2015

Using DB2 from Python

I have been searching on and off for several years to try and find a simple way to use Python for DB2 queries. Connecting to DB2 from Java is fairly simple--or at least straightforward, because nothing in Java is really that simple--but I have had trouble finding the information and steps for actually making Python speak to DB2. I have finally found the right combination of ingredients for the sauce, though, and it turns out to be extremely simple.

Thursday, October 16, 2014

Ignoring Files in Subversion

Most of our project files were originally designed around Eclipse and the IntelliJ project files keep showing up when I do an SVN status. Not a huge deal...it is fairly easy to just ignore them. But I got tired of seeing them and couldn't remember how to make Subversion ignore them. Online info for dealing with Subversion is generally great, but everything I found on this process was a bit confusing so I wanted to put it all together here.

Tuesday, August 12, 2014

Federal Place Name Codes

First there were FIPS codes. Then they became INCITS codes, but they are still FIPS codes. Frankly, I don't know what to call them, so I will continue to refer to them as FIPS codes until too many people correct me. INCITS sounds a little dirty if you pronounce it out in certain ways.

For a little history, read this. For some federal (possibly international) standard codes on places in the us such as counties, cities, metropolitan statistical areas (MSAs), and voting districts, as well as to find links to stuff like standardized spellings for all kinds of geographic entities, just go here.

Sunday, June 15, 2014

Converting Video for Use on iPod Nano

I wanted to leave my kids some video messages on their iPods for camp (7th generation Nano devices). I did this last year using the Photobooth app on the Mac and just loaded them into iTunes and there was no problem. Naturally this did not work again. Linux to the rescue, however.

Friday, June 13, 2014

Checking out just a little with Subversion

We have a huge source tree in subversion and I don't want the whole thing on my laptop. There is a top-level trunk directory and then project directories within it, and I only want a few of those project directories. Ordinarily I would just check out the individual ones I want separately, but this leaves them unrelated and when you have to make changes to multiple projects and want check them in all at once with a single commit you simply cannot. The alternative, checking out the entire trunk, seems to be a bit excessive as well. Luckily there is another alternative: checking out the root directory with a depth of empty, and then updating only the subdirectories/projects that I want within that directory.

Sunday, April 27, 2014

Exporting Video from OpenShot for Android

I was having trouble finding the exact combination of video and audio settings to use for exporting a video from OpenShot to view on my Android phone (specifically, I was using my Nexus 4 to view the videos on my LG TV via Miracast). There is not a preset, so after trying several combinations I just copied the codecs and settings used on video recorded on the device itself and everything fell into place.

Saturday, February 22, 2014

Making a Deployment Package From a Git Repository

I have a Django application in a git repository, and the whole thing needs to be moved to a server. I want to copy the application, but I don't want to drag the git repository info along with it.

Wednesday, February 12, 2014

Python triple-quoted strings vs. raw strings

Python lets you include text as strings in a number of ways, but picking the right one is important. There are two specific types of strings that I get confused and occasionally need a little reference to sort out: triple-quoted strings and raw strings.

Tuesday, June 11, 2013

Syncing an iPod Nano with Windows under VirtualBox in Ubuntu

I bought an iPod Nano (7th generation) for my son, and decided I wanted to use a Windows 7 virtual machine to house the iTunes software necessary to manage the gizmo. Apple items need to be managed with iTunes running on a Windows or Apple computer (there are options for dealing with iProducts from Linux, but since this is my son's gizmo I don't want to have to deal with them). I have been using Linux on my desktop and laptop for some time now, and the only things I use that have to run on Windows (for which I created the VM) are some tax software and the sync software for the Fitbit. And now this.

Since tax season is past and since my Fitbit split apart into a kazillion pieces, I have had little need to run the VM, so the first problem I had to deal with was the excessive number of Windows updates to be sifted through. Once that was done, installing iTunes was easy but connecting to the iPod was unsuccessful. Windows kept telling me that it could not start the device, could not find the device, could not find the appropriate driver, etc. It turns out that the problem was USB 2.0 compatibility--the iPod quietly requires USB2.0 and the current version of VirtualBox doesn't support it directly. Instead of going through the whole troubleshooting story, which would bore you to tears, I will just cut to the chase and tell you the things I did to get it running properly.

Friday, March 8, 2013

Resolving tree conflicts in Subversion

On the list of things I can never remember how to do when I need to do it: resolving tree conflicts in Subversion. Tree conflicts happen to me often when I am working in a branch of the main code and I merge from trunk to keep things current. I can't explain why they happen a lot in the system I work with (perhaps I should find out?), but I can fix them easily when they come up. But I always have to look up the simple command to do it. Well here is how it is done...