Extending the LiquidCrystal library

When using the LiquidCrystal library to output some text on an LCD on my Arduino Uno, I stumbled upon the following problem: if a text is displayed on the screen (let's say "hello world!") and you try to display another text (let's say "bye") you end up with the following text: "byelo world!".

The reason for this is that the screen doesn't clear a line before writing to it.


Wikipedia Gotcha if using a proxy server

I was coding a small proxy server. It worked quite nicely with most webpages. But it had problems with Wikipedia.

Firefox issued a request like this:

GET http://upload.wikimedia.org/wikipedia/commons/6/63/Wikipedia-logo.png HTTP/1.1
Host: upload.wikimedia.org

but Wikipedia responded with (trimmed down version):

C# Pass Arguments to the first instance of a program

Sometimes you don't want the user to run more than one instance of a program. But if the user associates a filetype with your programm it shall open the filetype in this first instance. The code below uses interprocess communication to find out if there is already another instance. It further allows the first instance to register an eventhandler which can be called from a second instance in order pass its command line parameters to the first instance.

This is how to use the code:


ArchLinux doesn't boot anymore after updating to Gnome 3.8 - Intel Graphics

Yesterday I updated my system to Gnome 3.8. Unfortunately I was not able to boot it anymore. I would only see the boot manager but then It would just hang with a black screen. Switching to a console (Ctrl + Alt + F2) didn't work.

First of all you need to be able to work with your system. The easiest way to achieve that is starting it with runlevel 1.


Linux Commands

Using SSH to copy files

Copy something from this system to some other system:

scp /path/to/local/file username@hostname:/path/to/remote/file

Copy something from some system to some other system:

scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file

Copy something from another system to this system:


WPF: Check if there are validation errors

I worked on a wpf window containing some controls that were required and that validated the format of the entered data. Once the user pressed a button I wanted to check if there was any validation error and notify the user with an error message. This is how to do it:

Helper class:


InnoDB Engine not available in MySQL

I had an empty standard installation of MySQL but somehow I could not create a database using the InnoDB engine. The engine was just not activated (you can check that with the


C# Dijkstra


Uses the HeapPriorityQueue.
Code on Github


C# PriorityQueue with fast Update operation


Uses a heap for fast retrieval of the smallest element as well as a dictionary for a fast access to an element which is already in the data strucutre. This priority queue is not too bad for implementing a Dijkstra (a fibonacci heap would be perfect...).
Code on Github


C# PriorityQueue


It is a simple implementation of a priority queue which is based on a SortedDictionary. This makes the implementation quite small.
Code on Github



Subscribe to uhlme.ch RSS