Wed 24th Sep 2008
Posted early evening, filed under
Adium.
I’m very sick of the INFO cmdproc.c:98:show_debug_cmd() rubbish that the latest Adium release is spewing into my Console Log twice a minute.
I’m finding I’d rather leave IM off, than see it traced across my desktop.
(I use MkConsole to keep an eye on things).
Update: it looks like 1.3.2b1 fixes this. Yay!
Wed 24th Sep 2008
Posted early evening, filed under
Hardware.
Most monitors seem to be able to be driven at a higher resolution than it says they can. In some cases, the higher resolution gives a better picture, in other cases it doesn’t.
My work just bought me a new LG W1942T, which is rated as running at 1400×900, which for a 19″ monitor isn’t that high. My laptop (15″) does the same resolution. It’s possible to run the W1942T at 1680×1050, but I really don’t know if the blurriness is caused by that, or if it just isn’t the best monitor available.
My boss bought a 22″ LG monitor, which is rated at 1680×1050, but it does 2048×1280 quite comfortably. And I have an nice old Dell E172FP, which looks best at 1344×1074, rather than the 1280×1024 which it says it can do.
Wed 24th Sep 2008
Posted mid-morning, filed under
Python.
I’ve had cause to transfer a whole stack of data from an old sqlite database to a PostgreSQL database, and since on the new database I am using SQL Alchemy, I used SA to do the transfer.
Because of some of the relations, I have had to keep IDs constant across some of the columns. This is fine, but because they have Sequence objects associated with them, these are not kept up to date with the ‘custom’ created IDs. Thus, when attempting to create a new row in the table, it often fails, since it is trying to add a primary key that already exists.
After a little bit of research, I discovered it is possible to force the sequence object to increment, using the command:
nextID = engine.execute(Sequence('sequence_name'))
Using a little bit of magic, we can find out the largest index currently in use:
maxID = db.query(Object).order_by('-id').first().id
And a simple while loop will keep incrementing until we have reached the correct id.