<?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>Lick My Chip !</title>
	<atom:link href="http://lickmychip.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://lickmychip.com</link>
	<description>Hunt the rabbit</description>
	<lastBuildDate>Mon, 30 Jan 2012 10:26:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Asynchronous template load within jQuery UI autocomplete widget</title>
		<link>http://lickmychip.com/2012/01/30/asynchronous-template-load-within-jquery-ui-autocomplete-widget/</link>
		<comments>http://lickmychip.com/2012/01/30/asynchronous-template-load-within-jquery-ui-autocomplete-widget/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 10:24:34 +0000</pubDate>
		<dc:creator>romainneutron</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://lickmychip.com/?p=2865</guid>
		<description><![CDATA[This week I was playing with jQuery UI Autocomplete widget. I usually use Mustache.js as a template engine for rendering HTML, and I load templates on-demand. My problem was that the widget was not ready for asynchronous load. I use &#8230; <a href="http://lickmychip.com/2012/01/30/asynchronous-template-load-within-jquery-ui-autocomplete-widget/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This week I was playing with jQuery UI <a href="http://jqueryui.com/demos/autocomplete/" target="_blank">Autocomplete</a> widget. I usually use <a href="https://github.com/janl/mustache.js" target="_blank">Mustache.js </a>as a template engine for rendering HTML, and I load templates on-demand.</p>
<p>My problem was that the widget was not ready for asynchronous load.</p>
<p>I use this code to load the Mustache template and render it in the Autocomplete widget :</p>
<pre class="brush: jscript; title: ; notranslate">

    var MustacheRender = function(TemplateName, datas, callback) {
      $.ajax({
        type: &quot;GET&quot;,
        url: &quot;/MustacheLoader/&quot;,
        dataType: 'html',
        data: {
          template: TemplateName
        },
        success: function(template){
          return callback(Mustache.render(template, datas));
        }
      });
    };

    $('input').autocomplete()
      .data( &quot;autocomplete&quot; )._renderItem = function( ul, item ) {

        var LoadAndRender = function(datas){
          $(datas).data( &quot;item.autocomplete&quot;, item ).appendTo( ul );
        };

        MustacheRender('List-Item', item, LoadAndRender);
        return;
      };
</pre>
<p>In this case, everything is visually ok, but it does not work as expected. If you try it, you will find out that <em>mouse*</em> or <em>key-based</em> events are not triggered.<br />
This is because the item list has not been &#8220;refreshed&#8221;.</p>
<p>As a workaround, you can manually refresh the list by adding this to the &#8220;LoadAndRender&#8221; callback:</p>
<pre class="brush: jscript; title: ; notranslate">
$('input').data( &quot;autocomplete&quot; ).menu.refresh();
</pre>
<p>It now perfectly works !</p>
]]></content:encoded>
			<wfw:commentRss>http://lickmychip.com/2012/01/30/asynchronous-template-load-within-jquery-ui-autocomplete-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multilingual documentation with sphinx</title>
		<link>http://lickmychip.com/2011/11/28/multilingual-documentation-with-sphinx/</link>
		<comments>http://lickmychip.com/2011/11/28/multilingual-documentation-with-sphinx/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 00:07:25 +0000</pubDate>
		<dc:creator>romainneutron</dc:creator>
				<category><![CDATA[Documentation]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[restructured text]]></category>
		<category><![CDATA[sphinx]]></category>

		<guid isPermaLink="false">http://lickmychip.com/?p=2850</guid>
		<description><![CDATA[These last days, we were looking for a documentation system for the upcoming Phraseanet release. We were used to build the documentation on an old and fixed Microsoft-like documentation system (sometimes called Windows-Help). We needed a tool that can handle &#8230; <a href="http://lickmychip.com/2011/11/28/multilingual-documentation-with-sphinx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>These last days, we were looking for a documentation system for the upcoming Phraseanet release. We were used to build the documentation on an old and fixed Microsoft-like documentation system (sometimes called Windows-Help).</p>
<p>We needed a tool that can handle multilingual documentation, easy to use, flexible and easy to transform (HTML, PDF, &#8230;.).</p>
<p>We tried many wikis. It was not flexible enough. Export methods were particularly very weak. Until we had a look at ReStructured Text. We now love it !</p>
<p>It is as easy as a wiki to start. The multilingual difficult was solved with multiple documentation roots &#8211; one per language. The build is managed by one Makefile wrote with the help of CakePHP ( thank you http://mark-story.com/posts/view/creating-multi-language-documentation-with-sphinx )</p>
<p>Here&#8217;s the result : <a title="Phraseanet Documentation Git" href="https://github.com/alchemy-fr/Phraseanet-Docs" target="_blank">https://github.com/alchemy-fr/Phraseanet-Docs</a>, you can see the html build at <a title="Phraseanet Documentation" href="http://docs.phraseanet.com" target="_blank">http://docs.phraseanet.com</a></p>
<p>More resources to start your project : <a href="http://sphinx.pocoo.org/tutorial.html" target="_blank">http://sphinx.pocoo.org/tutorial.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lickmychip.com/2011/11/28/multilingual-documentation-with-sphinx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symony2 Response Object</title>
		<link>http://lickmychip.com/2011/07/29/symony2-response-object/</link>
		<comments>http://lickmychip.com/2011/07/29/symony2-response-object/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 08:08:42 +0000</pubDate>
		<dc:creator>romainneutron</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[httpfoundation component]]></category>
		<category><![CDATA[response]]></category>
		<category><![CDATA[symfony2]]></category>

		<guid isPermaLink="false">http://www.lickmychip.com/?p=1462</guid>
		<description><![CDATA[I&#8217;ve been playing a lot with the Silex Microframework these last weeks. I had to build an API for an existing code. The result is amazing, Silex let us build our API, write full coverage unitTests in no more than &#8230; <a href="http://lickmychip.com/2011/07/29/symony2-response-object/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing a lot with the <a title="Silex" href="http://silex-project.org/" target="_blank">Silex Microframework</a> these last weeks.<br />
I had to build an API for an existing code.<br />
The result is amazing, Silex let us build our API, write full coverage unitTests in no more than a week.<br />
I will write a dedicated post about Silex later, the subject is now the <strong>Response Object</strong> of the <a title="HttpFoundation component" href="https://github.com/symfony/symfony/tree/master/src/Symfony/Component/HttpFoundation" target="_blank">Symfony2 HttpFoundation Component</a> :</p>
<p>I found a disturbing behaviour in this object :</p>
<ul>
<li>If you do not set a charset to this object =&gt; HTTP Content-Type header is marqued  &#8216;UTF8&#8242; for &#8220;text/*&#8221; content-type (defaut content-type is text/html).</li>
<li>or If you set a charset by defining it yourself in the header =&gt; HTTP Content-Type header is marqued as your charset (good)</li>
</ul>
<p>But, in both case, the <em>Response::getCharset</em> method will return null.</p>
<p>This is disturbing for the Unit Tests.<br />
Actually, the WebTestCase component provided by Silex get the Response object, when testing a route. So when I check the charset, the test fails.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
require_once dirname(__FILE__) . &quot;/Silex/autoload.php&quot;;

use SymfonyComponentHttpFoundationResponse;

$app = new SilexApplication();

/**
* Good HTTP response / Good Behavior of Response::getCharset
*/
$app-&gt;get('/testpass/', function() use ($app)
  {
    $response = new Response('Hello world');
    $response-&gt;headers-&gt;set('Content-Type', 'text/plain');
    $response-&gt;setCharset('UTF-8');
    return $response;
  }
);

/**
* Good HTTP response / Bad Behavior of Response::getCharset
*/
$app-&gt;get('/testfail/', function() use ($app)
  {
    return new Response(
                      'Hello world'
                      , 200
                      , array('Content-Type' =&gt; 'text/plain; charset=UTF-8')
                );
  }
);
</pre>
<p>I&#8217;ll try to enhance this behaviour in the next few days.</p>
]]></content:encoded>
			<wfw:commentRss>http://lickmychip.com/2011/07/29/symony2-response-object/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Moved to twitter</title>
		<link>http://lickmychip.com/2011/03/25/moved-to-twitter/</link>
		<comments>http://lickmychip.com/2011/03/25/moved-to-twitter/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 17:22:55 +0000</pubDate>
		<dc:creator>romainneutron</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.lickmychip.com/?p=1459</guid>
		<description><![CDATA[As I left Google Reader to twitter for my daily news, there&#8217;s no more auto-reblog here Follow me on twitter : https://twitter.com/#!/romainneutron Next step : real blogs , soon]]></description>
			<content:encoded><![CDATA[<p>As I left Google Reader to twitter for my daily news, there&#8217;s no more auto-reblog here</p>
<p>Follow me on twitter : <a href="https://twitter.com/#!/romainneutron" target="_blank">https://twitter.com/#!/romainneutron</a></p>
<p>Next step : real blogs , soon <img src='http://lickmychip.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://lickmychip.com/2011/03/25/moved-to-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello World !</title>
		<link>http://lickmychip.com/2010/12/25/hello-world-2/</link>
		<comments>http://lickmychip.com/2010/12/25/hello-world-2/#comments</comments>
		<pubDate>Sat, 25 Dec 2010 01:31:19 +0000</pubDate>
		<dc:creator>romainneutron</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.lickmychip.com/?p=1447</guid>
		<description><![CDATA[It works]]></description>
			<content:encoded><![CDATA[<p>It works</p>
]]></content:encoded>
			<wfw:commentRss>http://lickmychip.com/2010/12/25/hello-world-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

