Android: Use better MTP Filesystem ‘go-mtpfs’

I was quite angry about my Android 4 phone and the bad behaviour when mounting it with my Ubuntu 12.10 notebook. Thought for a long time i had to live with it, even it has worked better a few updates before.

Solution for my and maybe you was this instruction:
http://www.webupd8.org/2012/12/how-to-mount-android-40-ubuntu-go-mtpfs.html

You will install a different MTP gvfs driver that seem to work far better then the original. Lets have a try.

PHP: Check if XML is valid with SimpleXmlElement

Just a short function that checks if a XML file’s structure is valid:

I had to use libxml_use_internal_errors, because otherwise PHP would output a Warning like this: “PHP Warning: SimpleXMLElement::__construct() …”

PHP: Remove “empty” elements from Array

I recently read more about functional programming and found some functions in PHP that tend in that direction.

Like this function that removes all empty entrys from a array:

To understand what array_filter does, have a look at this version with foreach():