en last but not least wil ik mijn vissen bedanken omdat ze rondzwemmen in mijn aquarium en dat maakt me blij als er een dood is moet ik wel wenen want dat is droevig
2345
Yet another dull "numbers are so uncool" blog entry:
I just committed revision 2345 to my subversion repository. Yay.
Apart from having four consecutive digit, there's nothing special about 2345 actually.
In hexadecimal: 929, pfft
In binary: 100100101001, almost, but no sigar
Prime factorization: 5 x 7 x 67, boooring
bleh
4212320
Two days. Two days I'm working to find a bloody number. First I tried with brute force searching. But because that appeared not very feasible, I had to think of a more clever way to find it. Which I did. No brute force exhaustive search, just some matrix multiplication stuff.
And the number is 4212320.
Yay.
By the way: it's the number of unique binary patterns of 5 by 5 pixels, ignoring all copies due to rotations and reflections. Seems a very simple problem, but it was a very tough nut to crack.
Script for easier adding subversion ignore rules
It's possible to make Subversion ignore unversioned files, so they don't show up in the status overview and you get a better signal to noise ratio. The command line interface to add ignore rules this is however a bit clunky. First, you need to remember following command:
svn propedit svn:ignore .
(which can be quite confusing, especially with the slightly similar looking but different propset command).
Then you get a file editor where you have to add the rule (make sure you remembered the file name or pattern you want to ignore), save the file and exit the editor.
A bit too much hoops to jump through for something that could be just one command like svn-ignore filename.
LaTeX: promille/permille sign
I needed the LaTeX code for the sign that is called the "promille" sign in Dutch. It's the sign like the percent sign "%" ("procent" in Dutch), but with two circles at the bottom. Googling for "latex promille" was not very successful, so I thought this would be a good botsnack.
(Googling for "permille" or "(parts) per thousand", yield better results however.)
Anyway, I found two solutions:
\textperthousandfrom the packagetextcomp, also provides\textpertenthousandbut both only work in text mode, not in math mode.\permilfrom the packagewasysym, works in both text mode as in math mode.
That's all folks
Blender: background rendering
Yesterday I had to render a 3d animation for a colleague working on 3D television. He needed a short street-view video with depth map. Because there were some problems with some real world footage he wanted to use, he asked me to create an artificial video in Blender. After I created a simple scene with some models from www.katorlegaz.com, I wanted to render the whole animation overnight on one of the computers in our lab. I had some trouble with getting the command line arguments right and wanted to share this, in case someone else has the same problem.
I first tried
blender -b -a foo.blend
the option -b is for background mode, so I could log out from the computer after I started the job, the options -a is for (according to the command line help):render frames from start to end (inclusive), only works when used after -b I thought this was the bare minimum to get the job done. However, nothing happened but this:
Compiled with Python version 2.5. Checking for installed Python... got it! ERROR: No camera Blender quit
Huh, no camera? There was an active camera, the scene rendered just fine from the UI, I checked my file over and over and everything seemed all right.
PHP is easy or not
PHP is easy, unless you're paying me, in which case its very difficult.
-- Nick Lewis
from http://www.nicklewis.org/a-practical-tutorial-on-drupals-menu-system
Parsing the subversion Id keyword with python
Another one for the category 'remainder-to-self' or 'write-it-on-a-sticky-note-somewhere'.
Parsing a subversion Id keyword is just a matter of some regular expression magic:
# use the built in regular expression library import re # the subversion Id keyword svnid = '$Id: svnidparse.py 1234 2008-02-19 09:59:27Z joske $' # bow for the mighty regular expression svnidrep = r'^\$Id: (?P<filename>.+) (?P<revision>\d+) (?P<date>\d{4}-\d{2}-\d{1,2}) (?P<time>\d{2}:\d{2}:\d{2})Z (?P<user>\w+) \$$' # parse the svn Id mo = re.match(svnidrep, svnid) # use it, like for example: print 'this is %s - revision %s (%s)' % mo.group('filename', 'revision', 'date')
hmm, calling it "black magic" would be better, probably.
Yay, I'm joining Krimson to DrupalCon Boston 2008
It's official now: I'm joining Krimson on their trip to DrupalCon Boston 2008!
Not more than a month ago, the nice people of Krimson offered to fund the trip and stay at DrupalCon Boston for someone from the Belgian/European Drupal community. At first I didn't really consider filling in the application form, because I thought some well known Drupal big shot would be selected. But after my girlfriend pushed me (thank you girlfriend), I decided to give it a try and filled in in the form. When I received the mail of Krimson with the message that I was selected, I was completely flabbergasted. I'm sure this is only the beginning of an amazing experience and I'm really excited about it.
I guess I'm a bit off with my speculation that a well known Drupal big shot would get the plane ticket. So let me introduce myself a bit.

