<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Geert Van Damme</title>
	<atom:link href="http://blog.geertvd.be/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.geertvd.be</link>
	<description>Be Creative</description>
	<lastBuildDate>Wed, 08 Feb 2012 20:13:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>My new smartphone, iOs or Android ?</title>
		<link>http://blog.geertvd.be/2012/02/08/my-new-smartphone-ios-or-android/</link>
		<comments>http://blog.geertvd.be/2012/02/08/my-new-smartphone-ios-or-android/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 19:54:52 +0000</pubDate>
		<dc:creator>Geert Van Damme</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[iOs]]></category>

		<guid isPermaLink="false">http://blog.geertvd.be/?p=765</guid>
		<description><![CDATA[Before you start reading this post, please note this is not about which of these is better than the other. It is just a list of criteria on which I based my decision. A few months ago, my Nokia N900 &#8230;<p class="read-more"><a href="http://blog.geertvd.be/2012/02/08/my-new-smartphone-ios-or-android/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Before you start reading this post, please note this is not about which of these is better than the other. It is just a list of criteria on which I based my decision.</p>
<p>A few months ago, my Nokia N900 (with the Maemo OS) broke down, so I was forced to buying a new one. I had thought for a long time that my next phone would be an iPhone (I admit, I&#8217;m kind of an Apple fan, although not all the way). I had seen Android in action about two years ago, and I was not at all impressed (it was very slow), but still I decided to take a look at it again. Here are the criteria on which I based my decision.<br />
<span id="more-765"></span></p>
<h2>Reaction speed of the interface</h2>
<p>I checked out some movies on YouTube of Android examples, just to see if it was as snappy as the iPhone. And I was pleasantly surprised! iOs is probably just a little bit faster, but you hardly notice it. Android (and the hardware) has come a long way since I saw it two years ago.</p>
<h2>Integration and synching</h2>
<p>iOs synchs very well with all Apple software and services. Android on the other hand integrates very well with Google services. As I already use GMail and Google Calendar, Android seemed to be a more logical choice for me.</p>
<h2>GPS</h2>
<p>Android supports voice-assisted navigation for free. On the iPhone, you must purchase separate apps (I think). I love the integration of GPS and Google Maps, it&#8217;s much better than my TomTom.</p>
<h2>Tethering</h2>
<p>This one was very important to me. I don&#8217;t think iOs supports tethering (unless it&#8217;s jailbroken), and Android supports this out of the box.</p>
<h2>Apps</h2>
<p>The iTunes store and all of the iOs apps look more professional and &#8216;polished&#8217; than the Android ones. The apps were the main reason I kept wanting the iPhone for so long.</p>
<h2>Screen size</h2>
<p>Not really Android/iOs related, but the iPhone screen is just a bit too small for me. A lot of people don&#8217;t like &#8216;bulky&#8217; phones like the Galaxy SII, but I don&#8217;t mind and I really like its big bright screen. It doesn&#8217;t bother me sitting in my pocket. But then again, just personal taste&#8230;</p>
<h2>Music</h2>
<p>There&#8217;s no doubt about it : iTunes in combination with the iPhone will always be better than any other system&#8230; But I must say the Andoid music player is not bad at all, I can live with it.</p>
<p>In the end, I decided to go for Android (Samsung Galaxy SII), based on previous criteria. These criteria are very personal of course, but they might help others make a decision. I must admit I had never actually used iOs or Android before the purchase, so some of these criteria may be incorrect. Feel free to comment&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.geertvd.be/2012/02/08/my-new-smartphone-ios-or-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql errno: 150 when creating a foreign key</title>
		<link>http://blog.geertvd.be/2012/02/03/mysql-errno-150-when-creating-a-foreign-key/</link>
		<comments>http://blog.geertvd.be/2012/02/03/mysql-errno-150-when-creating-a-foreign-key/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 13:01:12 +0000</pubDate>
		<dc:creator>Geert Van Damme</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.geertvd.be/?p=756</guid>
		<description><![CDATA[If you receive a errno; 150 when creating a foreign key in mysql, you may have encountered one of following problems : The type of your foreign key is not the same as the referencing key, e.g. BIGINT -&#62; INT &#8230;<p class="read-more"><a href="http://blog.geertvd.be/2012/02/03/mysql-errno-150-when-creating-a-foreign-key/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>If you receive a errno; 150 when creating a foreign key in mysql, you may have encountered one of following problems :</p>
<ul>
<li>The type of your foreign key is not the same as the referencing key, e.g. BIGINT -&gt; INT</li>
<li>One of the two tables does not have the InnoDB engine. You cannot add foreign keys to MyISAM tables, or referencing MyISAM tables.</li>
</ul>
<p>If you need more info about the actual error that occured, you can execute following sql statement :</p>
<pre>SHOW ENGINE INNODB STATUS</pre>
<p>This will show you which foreign key gave the error (or about other errors for that matter) and some more info about possible causes.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.geertvd.be/2012/02/03/mysql-errno-150-when-creating-a-foreign-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony2 &#8211; &#8220;id&#8221; returned as member variable from __sleep() but does not exist</title>
		<link>http://blog.geertvd.be/2011/09/25/symfony2-id-returned-as-member-variable-from-__sleep-but-does-not-exist/</link>
		<comments>http://blog.geertvd.be/2011/09/25/symfony2-id-returned-as-member-variable-from-__sleep-but-does-not-exist/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 19:06:46 +0000</pubDate>
		<dc:creator>Geert Van Damme</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony2]]></category>

		<guid isPermaLink="false">http://blog.geertvd.be/?p=748</guid>
		<description><![CDATA[When storing entity objects in the http session, you might run into following exception : ErrorException: Notice: serialize() [function.serialize]: &#8220;id&#8221; returned as member variable from __sleep() but does not exist in&#8230; Now, apparently php has some problems serializing an object &#8230;<p class="read-more"><a href="http://blog.geertvd.be/2011/09/25/symfony2-id-returned-as-member-variable-from-__sleep-but-does-not-exist/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>When storing entity objects in the http session, you might run into following exception :</p>
<p><b>ErrorException: Notice: serialize() [function.serialize]: &#8220;id&#8221; returned as member variable from __sleep() but does not exist in&#8230;</b></p>
<p>Now, apparently php has some problems serializing an object which subclasses an object with private properties. As Doctrine always creates subclasses of your entity classes (which are called Proxy classes), this means you should never use private properties (e.g. $id or any other property) on your entity (or associated entities) ! Use protected instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.geertvd.be/2011/09/25/symfony2-id-returned-as-member-variable-from-__sleep-but-does-not-exist/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Custom validation messages for standard validators in Symfony2</title>
		<link>http://blog.geertvd.be/2011/09/01/custom-validation-messages-for-standard-validators-in-symfony2/</link>
		<comments>http://blog.geertvd.be/2011/09/01/custom-validation-messages-for-standard-validators-in-symfony2/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 22:12:22 +0000</pubDate>
		<dc:creator>Geert Van Damme</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony2]]></category>

		<guid isPermaLink="false">http://blog.geertvd.be/?p=732</guid>
		<description><![CDATA[Symfony2 contains a lot of validators out of the box, but it is not very clearly documented how to use custom messages when validation fails for these standard validators. After some investigation, I found the validation messages in Symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/translations/. It &#8230;<p class="read-more"><a href="http://blog.geertvd.be/2011/09/01/custom-validation-messages-for-standard-validators-in-symfony2/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Symfony2 contains a lot of validators out of the box, but it is not very clearly documented how to use custom messages when validation fails for these standard validators. After some investigation, I found the validation messages in <code>Symfony/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/translations/</code>. It is very easy to override a message. Just look up the message you wish to modify (e.g. &#8216;This value should not be blank&#8217;), create your own validators.[language].yml file (or .xliff if you prefer) in your bundle, and add this message as a key with your custom message as value :</p>
<pre>
# validators.en.yml

This value should not be blank: This is a required field
</pre>
<p>That&#8217;s all <img src='http://blog.geertvd.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.geertvd.be/2011/09/01/custom-validation-messages-for-standard-validators-in-symfony2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using dompdf with UTF-8 encoding</title>
		<link>http://blog.geertvd.be/2011/08/29/using-dompdf-with-utf-8-encoding/</link>
		<comments>http://blog.geertvd.be/2011/08/29/using-dompdf-with-utf-8-encoding/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 20:49:14 +0000</pubDate>
		<dc:creator>Geert Van Damme</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[dompdf]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.geertvd.be/?p=728</guid>
		<description><![CDATA[I have used dompdf for the first time to generate PDF files from html content, and it seems to be working pretty well. One thing I noticed, when using UTF-8 encoding, you should add following in the head section of &#8230;<p class="read-more"><a href="http://blog.geertvd.be/2011/08/29/using-dompdf-with-utf-8-encoding/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I have used <a href="http://code.google.com/p/dompdf/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/dompdf/?referer=');">dompdf</a> for the first time to generate PDF files from html content, and it seems to be working pretty well. One thing I noticed, when using UTF-8 encoding, you should add following in the head section of your html content :</p>
<pre>
&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;
</pre>
<p>This way, the characters will be displayed correctly in the rendered pdf.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.geertvd.be/2011/08/29/using-dompdf-with-utf-8-encoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xapian queries &#8211; a common mistake&#8230;</title>
		<link>http://blog.geertvd.be/2011/08/12/xapian-queries-a-common-mistake/</link>
		<comments>http://blog.geertvd.be/2011/08/12/xapian-queries-a-common-mistake/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 13:27:56 +0000</pubDate>
		<dc:creator>Geert Van Damme</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Xapian]]></category>

		<guid isPermaLink="false">http://blog.geertvd.be/?p=726</guid>
		<description><![CDATA[I was just trying to figure out why a Xapian query did not work as expected, when it hit me : i was using the word &#8216;and&#8217; to combine search terms, while I should be using the capitalized word &#8216;AND&#8217; &#8230;<p class="read-more"><a href="http://blog.geertvd.be/2011/08/12/xapian-queries-a-common-mistake/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I was just trying to figure out why a Xapian query did not work as expected, when it hit me : i was using the word &#8216;and&#8217; to combine search terms, while I should be using the capitalized word &#8216;AND&#8217; instead&#8230; Stupid mistake that cost me an hour to figure out. Hence this reminder <img src='http://blog.geertvd.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.geertvd.be/2011/08/12/xapian-queries-a-common-mistake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Zend with Symfony2</title>
		<link>http://blog.geertvd.be/2011/08/07/using-zend-with-symfony2/</link>
		<comments>http://blog.geertvd.be/2011/08/07/using-zend-with-symfony2/#comments</comments>
		<pubDate>Sun, 07 Aug 2011 12:35:05 +0000</pubDate>
		<dc:creator>Geert Van Damme</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony2]]></category>

		<guid isPermaLink="false">http://blog.geertvd.be/?p=707</guid>
		<description><![CDATA[I recently needed to use the Zend GData component in my Symfony2 project. It is very easy to setup, but there is one mistake that I suspect some other people might make as well. First, add the Zend library to &#8230;<p class="read-more"><a href="http://blog.geertvd.be/2011/08/07/using-zend-with-symfony2/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I recently needed to use the Zend GData component in my Symfony2 project. It is very easy to setup, but there is one mistake that I suspect some other people might make as well.</p>
<p>First, add the Zend library to your vendor folder (e.g. <code>vendor/Zend/library/Zend</code>). As Zend does not use namespaces, you need to register the &#8216;Zend&#8217; prefix instead. This can be done in the <code>autoload.php</code> file located in your app folder. Apparently Zend has some problems this way with &#8216;require_once&#8217; statements, hence the modification of the include path (last line) :</p>
<pre>
// autoload.php

use Symfony\Component\ClassLoader\UniversalClassLoader;

// ... existing code

$loader->registerPrefixes(array(
    'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib',
    'Twig_'            => __DIR__.'/../vendor/twig/lib',
    'Swift_'           => __DIR__.'/../vendor/swiftmailer/lib/classes',
    <b>'Zend_'           => __DIR__.'/../vendor/Zend/library',</b>
));

$loader->register();
$loader->registerPrefixFallback(array(
    __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs',
));
<b>set_include_path(__DIR__.'/../vendor/Zend/library'.PATH_SEPARATOR.get_include_path());</b>
</pre>
<p>Now you are ready to use the Zend components. One mistake I made, I used the classes without a leading backslash, which does not work because the classes are in de default namespace. So, instead of using e.g. </p>
<pre>
$gdataCal = new Zend_Gdata_Calendar($client); // class not found error will be thrown
</pre>
<p>you need to add a backslash as such : </p>
<pre>
$gdataCal = new \Zend_Gdata_Calendar($client); // class is located in default namespace
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.geertvd.be/2011/08/07/using-zend-with-symfony2/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Running crontab as root</title>
		<link>http://blog.geertvd.be/2011/06/21/running-crontab-as-root/</link>
		<comments>http://blog.geertvd.be/2011/06/21/running-crontab-as-root/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 17:30:05 +0000</pubDate>
		<dc:creator>Geert Van Damme</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.geertvd.be/?p=700</guid>
		<description><![CDATA[If you want to run some script as the root user using crontab, make sure you sudo as root before you modify the crontab entries : $ sudo -i [sudo] password for xxx : (enter your password) $ crontab -e &#8230;<p class="read-more"><a href="http://blog.geertvd.be/2011/06/21/running-crontab-as-root/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>If you want to run some script as the root user using crontab, make sure you sudo as root before you modify the crontab entries :</p>
<pre>
$ sudo -i
[sudo] password for xxx :
(enter your password)

$ crontab -e
</pre>
<p>The <code>sudo -i</code> command will change your current user to root, so <code>crontab -e</code> will automatically use the cron file of the root user.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.geertvd.be/2011/06/21/running-crontab-as-root/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony2 validation using annotations</title>
		<link>http://blog.geertvd.be/2011/06/10/symfony2-validation-using-annotations/</link>
		<comments>http://blog.geertvd.be/2011/06/10/symfony2-validation-using-annotations/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 20:57:42 +0000</pubDate>
		<dc:creator>Geert Van Damme</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony2]]></category>

		<guid isPermaLink="false">http://blog.geertvd.be/?p=678</guid>
		<description><![CDATA[The Symfony2 book says that validation using annotations should be done as follows : // Acme/BlogBundle/Author.php use Symfony\Component\Validator\Constraints as Assert; class Author { /** * @Assert\NotBlank() */ public $name; } I tried this on my installation, but this doesn&#8217;t work. &#8230;<p class="read-more"><a href="http://blog.geertvd.be/2011/06/10/symfony2-validation-using-annotations/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://symfony.com/doc/2.0/book/validation.html" onclick="pageTracker._trackPageview('/outgoing/symfony.com/doc/2.0/book/validation.html?referer=');">Symfony2 book</a> says that validation using annotations should be done as follows :</p>
<pre>
// Acme/BlogBundle/Author.php
use Symfony\Component\Validator\Constraints as Assert;

class Author
{
    /**
     * @Assert\NotBlank()
     */
    public $name;
}
</pre>
<p>I tried this on my installation, but this doesn&#8217;t work. I had to change &#8216;@Assert\&#8217; into &#8216;@assert:&#8217; to make it work :</p>
<pre>
// Acme/BlogBundle/Author.php

class Author
{
    /**
     * <b>@assert:</b>NotBlank()
     */
    public $name;
}
</pre>
<p><span id="more-678"></span><br />
I had the same problem with the @orm prefix, so there might be some other cases where this problem exists. My guess is that my PHP version (5.3.2) does not support native annotations, but the examples in the book are based on a version that supports them (just a wild guess). </p>
<h3>Translations</h3>
<p>The message translations of these validators are located in the <code>vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/translations</code> folder using the name (e.g. for dutch) <code>validators.nl.xliff</code>. In this file you can find all the possible error messages. To overwrite those messages with your custom translation, place a file with the same name (possibly with different extention, e.g. <code>validators.nl.yml</code> in the translations folder of your bundle and add the translations that need to be different than the default.</p>
<p><strong><i>*** update ***</i></strong><br />
The reason the translations are searched for in the validators.*.xliff file, is because of the default error templates used by Symfony2 (this template is a bit different from the original because I already removed the &#8216;ul&#8217; and &#8216;li&#8217; tags&#8230;) :</p>
<pre>
{% block form_errors %}
{% spaceless %}
    {% if errors|length > 0 %}
        {% for error in errors %}
            {{ error.messageTemplate|trans(error.messageParameters, '<b>validators</b>') }}
        {% endfor %}
    {% endif %}
{% endspaceless %}
{% endblock form_errors %}
</pre>
<p>See <a href="http://symfony.com/doc/current/cookbook/form/twig_form_customization.html" onclick="pageTracker._trackPageview('/outgoing/symfony.com/doc/current/cookbook/form/twig_form_customization.html?referer=');">http://symfony.com/doc/current/cookbook/form/twig_form_customization.html</a> for more info.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.geertvd.be/2011/06/10/symfony2-validation-using-annotations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony2 and required fields</title>
		<link>http://blog.geertvd.be/2011/06/09/symfony2-and-required-fields/</link>
		<comments>http://blog.geertvd.be/2011/06/09/symfony2-and-required-fields/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 21:33:22 +0000</pubDate>
		<dc:creator>Geert Van Damme</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Symfony2]]></category>

		<guid isPermaLink="false">http://blog.geertvd.be/?p=675</guid>
		<description><![CDATA[I just came across my first HTML5 &#8216;issue&#8217;. I was testing the Symfony2 forms, and for required fields I always got the message &#8216;Please fill out this field.&#8217; which was shown in a tooltip. I started looking in the Symfony2 &#8230;<p class="read-more"><a href="http://blog.geertvd.be/2011/06/09/symfony2-and-required-fields/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I just came across my first HTML5 &#8216;issue&#8217;. I was testing the Symfony2 forms, and for required fields I always got the message &#8216;Please fill out this field.&#8217; which was shown in a tooltip. I started looking in the Symfony2 code where this message came from, but I couldn&#8217;t find it anywhere. So I started inspecting the generated html, and I saw the &#8216;required&#8217; attribute on the input fields. Apparently this is a new attribute in HTML5, and most browers already support it. I now realise that HTML5 really is something I should learn more about&#8230;</p>
<p>While looking for some more info, I came across an online book that seems very interesting : <a href="http://diveintohtml5.org" onclick="pageTracker._trackPageview('/outgoing/diveintohtml5.org?referer=');">http://diveintohtml5.org</a>. Definitly on my todo list now <img src='http://blog.geertvd.be/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.geertvd.be/2011/06/09/symfony2-and-required-fields/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

