ElecFreaks JoyStick Game Kit

There is a Tutorial how to prepare it. In the tutorial there is a link to a library which can be used for the Nokia 5110 LCD display. However for me it did not work. I tried to run the code in the Arduino IDE (v. 1.0.1). It didn't compile.


Linux Driver for Canon P-150

If you try to build the driver you might get the following error message:

make[1]: Entering directory `/home/patrick/Desktop/Canon P-150 Linux/sane-backends-1.0.19/doc'
Generating sane.ps...

kpathsea: Running mktexfmt latex.fmt
make[1]: *** [sane.ps] Error 1
make[1]: Leaving directory `/home/patrick/Desktop/Canon P-150 Linux/sane-backends-1.0.19/doc'
make: *** [all-recursive] Error 1

The problem is the documentation (does anyone read it?) so you can just disable building it. Open the make file and change line 40 from


Evince PDF Document not supported

Sometimes after an update you might get the error "PDF Document not supported" in Evince. To see what exactly the problem is you should start it up using the command line (p. x. evince '/test.pdf'). In my case I got the following message:


Another Android Income Report #01

I started to experiment with the android market aka Google Play Store. I wanted to see if I could generate some income. Just for fun. I have a job so no need to earn money with android apps :D.

The first day I integrated AdMob advertisements was the 13. March. So how much did I made until 13. of April?

Impressions: ~ 32'000
Fill Rate: ~ 98.27 %
Revenue ~ 15.50 $


C# saving a bitmap results in generic GDI+ error

If you save a bitmap the following exception can pop up:

System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
   at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)

Possible causes:

C# Scale bitmap

The following code scales a bitmap from the filesystem to a defined width:

C# Multithreading

Execute code in the UI Thread

Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, () => {
                Mouse.OverrideCursor = Cursors.Wait;

Log4Net take the name of the actual class for the logger


Oracle SQL-Script output

First you need to activate it and call the script:

set serveroutput on format wrapped;
call SOME_SCRIPT(150);

In the script you can output something with that line:


After the script has been executed you can see the output for example in the Script Output tab of SQLDeveloper.


PInvokeStackImbalance Excpetion

If you get a PInvokeStackImbalance exception it could be:

  • One parameter has a wrong type (p. x. int changed to long)
  • The CallingConvention of the DllImport. Change it in the declaration:
    [DllImport("user32.dll", EntryPoint="SetWindowLongA", SetLastError=true)]
    		private static extern long SetWindowLong (IntPtr hwnd, int nIndex, long dwNewLong);

    for example to


Subscribe to uhlme.ch RSS