Patrick's Blog

Boston, MA

August 24th, 2006

On August 7th I started an internship in Boston (more specific Cambridge), where I’m working for MERL. If all goes well, I will stay here for approximately half a year, i.e. I should be back in Switzerland at the end of January.
So far MERL is really a great place to work at: very smart people, interesting projects, interns and full-time employees from all around the world: I can highly recommend it.

Boston, thumbnail

Posted in life | Comments Off

Some customization hints for beamer

July 20th, 2006

You can find them here.

Posted in latex | Comments Off

An essential LaTeX package for computer scientists: algorithm2e

July 20th, 2006

One LaTeX package I find particular useful is algorithm2e. As it is not included in tetex I installed it on my workstation:

pat@merkur:/~# mkdir ~/texmf/tex/latex/algorithm2e
pat@merkur:/~# cp algorithme2e.sty ~/texmf/tex/latex/algorithm2e
pat@merkur:/~# texhash

Now you (i.e. the user that just did the steps above) can use a simple \usepackage{algorithm2e} in your documents and LaTeX should find the package on its own.

Posted in latex | Comments Off

My gvimrc

July 17th, 2006

In case someone is interested… For the TeX stuff to work, one needs to install vim-latexsuite.

syntax on
set autoindent

set tenc=utf-8
set enc=utf-8

if has("eval")
let g:Tex_AutoFolding=0
let g:Tex_SmartKeyQuote=0
endif

set lines=50
set columns=100

Posted in linux, programming | Comments Off

LaTeX Beamer Themes

July 17th, 2006

Beamer ships with several different themes, however selecting one that suits your needs is a tedious task (change the theme, compile, open it with acrobat again and again). Maybe this will help you: Beamer Themes overview.

Posted in latex | Comments Off

Ubuntu Dapper and new mainboards

July 8th, 2006

Today I was encountering a small “bug” under Ubuntu Dapper: After getting my laptop back from the IBM Repair center (I had an issue with the graphic card) everything was running as before, except one thing: I didn’t get an IP address from my router. I got an error when ifupping eth0:

SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device

After googling, I found the problem: I guess the mainboard got replaced by the repair center and thus I had an other MAC address. Strangely Ubuntu gets quite confused by such a change! The solution was to replace the old MAC address in /etc/iftab by the new one and reboot the system.

Posted in linux | Comments Off

Brother HL-5170DN and Ubuntu 6.06 LTS

June 22nd, 2006

As far as I can remember ever since I bought the Brother HL-5170DN printer in 2004, I had smaller problems using it under Ubuntu. This included among others the following symptoms: printing works only in Acrobat Reader and not in Gnome programs, Duplex printing does not work properly or printing slides which include lots of plots and pictures takes ages to print.

I think that all these problems have finally gone! And this all thanks to this blog entry. To summarize everything and adapted to Ubuntu Dapper Drake:

  1. Download the LPR driver found here. We need the package for Debian.
  2. Second download as well the CUPS driver here. Again: we need the Debian package.
  3. Install both packages with dpkg -i package-name.deb. This will show you a hell a lot of warnings, but it will still work.
  4. Add the printer with the gnome-cups-manager. As driver you need to select: “Brother HL-5170DN for CUPS (en)”. For some odd reasons I had to alter the device URI, as it was set to a default value.

Finally I can strike this through on my TODO list!

Update: For the hl5170dnlpr package to install cleanly, one has to create the directory: /var/spool/lpd and uncomment the last line of /var/lib/dpkg/info/hl5170dnlpr.postinst.

Posted in linux | Comments Off

Modify EXIF timestamp of JPEG images

June 8th, 2006

F-spot has a nice feature to browse your photo gallery by some sort of a time-histogram control. This is very handy if you know the date of a specific picture, you’re looking for. But this feature does not help if the EXIF timestamp of the pictures is just plain wrong (which often happens with “old” pictures, i.e. end of 90’s). So I was looking for a way to change the EXIF timestamp of such photos. jhead solves this problem quite nicely (the application is available from the Ubuntu repositories).

Assume in the current directory all pictures are dated 2036:11:06, instead of 2001:11:05, we can then modify the timestamp with a simple:

jhead -da2001:11:05-2036:11:06 *

What makes more sense for the example above is:

jhead -ts2001:11:05-00:00:00 *

Here no time difference computations are involved.

So now the information shown in f-spot reflects the real date, cool!

Update: If the images do not have a EXIF header, one can use the “transplant” function to copy the exif header from another image:

jhead -te image_with_exif.jpg *

Update 2: To rename (more specific number) the pictures inside of a directory, one can use:

jhead -nf%03i *

Posted in misc | Comments Off

Royalty Free Photos

May 21st, 2006

Warning: This post is mostly about making sure, that I don’t forget about this site.

As a picture is worth more than 1000 words, one often wants to include a photo in a presentation or on a website. But where to take from the pictures? The sites I usually use for this:

And now a completely unrelated photo from Flickr:

Flickr sample

Posted in misc | Comments Off

Variational Methods for Graphical Models

May 14th, 2006

A small presentation (together with a really short summary of the topic) is now available from my webpage under the section variational methods.

Posted in academics | Comments Off