'ERLANG: SUPER BASIC ETS MATCHING TUTORIAL'

I hate having to look stuff up to get examples, especially when I have to click on more than the first google link to figure things out. As a result, here’s a very, very basic intro do doing matching with ETS and erlang. It’s similar to a SELECT in SQL. Here’s some simple matching. 44> Tmp = ets:new(bacon, []). 26 45> ets:insert(Tmp, {joe, {fish, 1}}). true 46>...

GOODBYE QUICKSILVER, HELLO LAUNCHBAR

It’s unfortunate that I’ve reached this point, since I thought quicksilver was a really awesome piece of software. Unfortunately, it’s just gotten to be completely unstable. Beach balls became all too common. So common, that I was willing to cough up $20 for LaunchBar after only trying it out for 10 minutes. I never was a power user of quicksilver - I did like a lot of things in...

TURNING TO THE DARK SIDE FOR A BIT....

For better or worse, I’ll be doing c# development for a while. I’ve never been particularly fond of Windows, so we’ll see how things go. I can say that I did manage to blue screen my box on day #2. If anyone has any good c# tutorials or books they’d recommend, I’d appreciate it.

MYSQL: ERROR 1267 (HY000): ILLEGAL MIX OF COLLATIONS (UTF8_UNICODE_CI,IMPLICIT)

I have never, ever seen this before. I don’t even know how the table was created with a different collation. However, I had all my other tables created with the character set utf8, no collation specified. I had to convert the second table to match the character set. This probably wouldn’t have been a problem if I wasn’t joining on a character field. alter table exclusion CONVERT...

EXECUTING MYSQL QUERIES WITHIN VIM

I haven’t been using vim for very long, but I’ve gotten over the initial learning curve of getting used to the different editing modes. With some help from the guys in #vim on irc.freenode.net, I managed to get this gem: ` map :call SwitchDB() :function SwitchDB() : let g:current_db = input(“Database > “) :endfunction map :call Doquery() :function Doquery() : if...

COMPILING LIBJPEG ON 64 BIT CENTOS

I ran into an issue just now compiling libjpeg on 64 bit CentOS. I found this very helpful post that gives a workaround using a config.guess file from libtool. For some reason, I didn’t have the folder he suggested, but I did have the alternative (automake). cp /usr/share/automake-1.9/config.guess . cp /usr/share/automake-1.9/config.sub . I copied the above files into my jpeg-6b directory,...

ENABLING MOD DEFLATE IN APACHE

I got an error while compiling Apache today: “./configure” “–enable-auth-digest” “–enable-deflate” “–enable-rewrite” “–enable-so” “–enable-vhost-alias” “–disable-userdir” “–enable-mime-magic” \ configure: error: mod_deflate has been requested but can not be...

MUTABLE CLASS INSTANCE VARIABLES IN PYTHON ACT LIKE THEY'RE STATIC

There’s a weird behavior in Python when dealing with Mutable types such as dictionaries, that when you modify a variable defined as a class attribute, you’re actually modifying a shared dictionary amongst all the classes. This seemed weird to me. You can read the lovely discussion about it, if you want. Or, just follow my code for a demo on how to deal with the issue. I just started...

MYSQL ALTER TABLE PROGRESS BAR?

Altering a big table sucks, and to make it worse you have no idea what’s happening or how long it will take. I’d like a progress bar, or some status output, or something that gives me the feeling like my server didn’t die.

MYSQL AND MATERIALIZED VIEWS

I was poking around the MySQL Worklog again over the weekend, and found a request for materialized views for MySQL. This feature has existed in Oracle for a while, in DB2 as a materialized query table, and appeared in MS SQL Server 2000 and 2005 as indexed views. What is a materialized view? A materialized view is a database object that contains the results of a query. The FROM clause of the query...