Submitted by patrick on Sun, 10/07/2012 - 21:00
Databinding in General
If it doesn't work check:
- You can just bind to a property. Check that you are not binding on a field
Databinding for ContextMenus in General
ContextMenus in WPF are somehow special. They exist outside the visual tree of the parent control and therefore they are unable to find for example the root element by name. In the following example the binding doesn't work:
Submitted by patrick on Sun, 10/07/2012 - 16:14
When using the WebBrowser control and loading a html page it is possible that a message appears that there is a javascript error. This is especially the case if the webpage has been saved from the web and is then displayed on a computer which is offline. Unfortunately there is no property on the browser control which can be used to suppress this kind of error. It is however possible to inject a script tag in the header of an loaded html-file which does catch all errors. Therefore no message will be displayed. You can use the following snippet:
Submitted by patrick on Sun, 10/07/2012 - 15:47
General pitfalls
Output text from within a script
PROMPT "text"
Execute content of another file
@script.sql
Submitted by patrick on Sun, 07/29/2012 - 13:52
If Linux (after an update) doesn't boot up anymore it might be necessary to boot into the installation using some distribution which can be booted from a cd/usb-drive (p. x. Ubuntu). The first step would then be to load the encrypted installation and maybe to rewrite the grub bootloader. The following commands can be used to do so:
cryptsetup luksOpen /dev/sda1 dm-0 mount /dev/mapper/dm-0 /mnt/temp
grub-install -- root-directory /dev/sda
Submitted by patrick on Sun, 07/29/2012 - 12:48
I have a DS1511+ which supports DLNA/UPnP and acts as a server. On the other side I have a blueray player Sony BDP-S480 as receiver. This setup enables me to watch movies from the Diskstation on the television. But sometimes it would start playing a movie but after a while it would just stop. I check some files and found out that they were defect. Here are some commands that can be used to fix them:
Submitted by patrick on Sun, 07/15/2012 - 17:33
Submitted by patrick on Sun, 06/10/2012 - 11:17
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
Submitted by patrick on Sun, 06/10/2012 - 11:10
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:
Submitted by patrick on Sat, 04/14/2012 - 22:21
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 $
Submitted by patrick on Sun, 03/04/2012 - 16:37
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:
Pages