<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    
    <title>NSA Blog</title>
    <link>http://www.nsa.be/index.php</link>
    <description>NSA.be is the professional website of Raphaël Bauduin. This blog's content is mainly technical and related to free and open source software.</description>
    <language>en-GB</language>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Nsa-be-Blog" /><feedburner:info uri="nsa-be-blog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <title>Locate a message in Gmail with its Message-Id</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/sEWGnSMBZ6g/Locate-a-message-in-Gmail-with-its-Message-Id</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/Locate-a-message-in-Gmail-with-its-Message-Id</guid>
      <description>&lt;p&gt;I recently had to search for a mail delivered to Gmail according to the mail server log, but I couldn't find it immediately.&lt;/p&gt;&lt;p&gt;As I wanted to search the message based on its Message-Id found in the mail server logs, I found this help page. After clicking several checkboxes, it display a form that lets you search your inbox based on the Message-Id. However, looking at the search query generated, it's very simple to do it right from your inbox. Just type this in the search box, replacing $my_message_id by the actual value you're looking for&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: plain;"&gt;&lt;![CDATA[
in:anywhere rfc822msgid:$my_message_id
]]&gt;&lt;/script&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/sEWGnSMBZ6g" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 28 Apr 2010 07:15:13 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/Locate-a-message-in-Gmail-with-its-Message-Id</feedburner:origLink></item>
    <item>
      <title>YUI Datatable note: the initialRequest string is appended to the datasource url</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/gDahowN3LIU/YUI-Datatable-note-the-initialRequest-string-is-appended-to-the-datasource-url</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/YUI-Datatable-note-the-initialRequest-string-is-appended-to-the-datasource-url</guid>
      <description>&lt;p&gt;&lt;a href="http://developer.yahoo.com/yui/datatable/" target="_self"&gt;YUI2's Datatable&lt;/a&gt;
 is a great widget I use in &lt;a href="http://www.myowndb.com" target="_self"&gt;MyOwnDB&lt;/a&gt;
 and here's a small tip for when you use it to &lt;a href="http://developer.yahoo.com/yui/examples/datatable/dt_xhrjson.html" target="_self"&gt;load a remote data source&lt;/a&gt;
.&lt;/p&gt;&lt;p&gt;In that case, the datatable is getting the data to display from a &lt;a href="http://developer.yahoo.com/yui/datasource/" target="_self"&gt;YUI2 DataSource&lt;/a&gt;
 that has been configured with the URL to use when fetching the data requested by the datatable.&lt;/p&gt;&lt;p&gt;When instanciating the datatable, you can pass it a configuration object, with amongst other option, the initialRequest that should be sent by the associated datasource when the datatable is displayed for the first time. initialRequest is a string that is simply appended to the URL passed to the DataSource.&lt;/p&gt;&lt;p&gt;So if your datasource URL is &amp;quot;http://www.myurl.com?all=true&amp;quot;, and your initialRequest is &amp;quot;sort=name&amp;quot;, the request sent by the DataSource will be for the URL &amp;quot;http://www.myurl.com?all=truesort=name&amp;quot;, which is clearly not good.&lt;/p&gt;&lt;p&gt;The solution here is to either be sure that the datasource URL ends with a ? or a &amp;amp;, or to always start the initialRequest with &amp;amp;.&lt;/p&gt;&lt;p&gt;The second option is the easiest in my case.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/gDahowN3LIU" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 24 Feb 2010 13:59:03 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/YUI-Datatable-note-the-initialRequest-string-is-appended-to-the-datasource-url</feedburner:origLink></item>
    <item>
      <title>ActiveRecord serialization on a query result</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/QSN833XtZjs/ActiveRecord-serialization-on-a-query-result</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/ActiveRecord-serialization-on-a-query-result</guid>
      <description>&lt;p&gt;In &lt;a href="http://www.myowndb.com" target="_self"&gt;MyOwnDB&lt;/a&gt;
, there's an CrosstabObject inheriting from ActiveRecord, but that doesn't correspond to any table in the database (actually, it is configured to map to a table in the database as this is mandated by AR, but it's never used like that). It is only used to select data with find_by_sql. &lt;/p&gt;&lt;p&gt;Now, some columns of the data returned by the query can be data that has been serialized to YAML, but each query has its own set of serialized columns.&lt;/p&gt;&lt;p&gt;I first tried to call the serialize method provided by rails, but it didn't work. I suspect the ActiveRecord model needs the column to exist when it is initialized for the serialization to be activated, which is not the case here as the CrosstabObject is mapped to an object that doesn't have the columns returned by the sql query.&lt;/p&gt;&lt;p&gt;In this example, the query returns a result set which has the test_attach column serialized to YAML. test_attach is not a column of the table to which CrosstabObject was mapped. As you can see, the serialization is configured, but has no effect on the returned data:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: ruby;"&gt;&lt;![CDATA[

CrosstabObject.class_eval{ serialize :test_attach}
=&amp;gt; nil
CrosstabObject.serialized_attributes
=&amp;gt; {&amp;quot;test_attach&amp;quot;=&amp;gt;Object}
list=CrosstabObject.find_by_sql(query)
=&amp;gt; [....]
list[6].test_attach=&amp;gt; &amp;quot;--- \n:detail_value_id: 570574\n:filetype: application/octet-stream\n:uploaded: false\n:filename: channels.conf\n&amp;quot; 
]]&gt;&lt;/script&gt;
&lt;p&gt;If I redefine the test_attach accessor on list[6] 's singleton class, I get the expected result though:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: ruby;"&gt;&lt;![CDATA[

class &amp;lt;&amp;lt;l[6]
 def test_attach
 YAML.load(read_attribute(:test_attach))
 end
end
=&amp;gt; nil
l[6].test_attach
=&amp;gt; { :detail_value =&amp;gt; 570574, :filetype =&amp;gt; &amp;quot;application/octet-stream&amp;quot;, :uploaded =&amp;gt; false, :filename =&amp;gt; &amp;quot;channels.conf&amp;quot; }
  
]]&gt;&lt;/script&gt;
&lt;p&gt;As each query has its own set of serialized columns, what I want to do is just pass the list of columns that contain serialized data, so that the accessors get defined, which is easily done by adding a method to CrosstabObject:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: ruby;"&gt;&lt;![CDATA[

def self.serialize_columns(*a)
 a.each do |c|
 m = %{ 
 def #{c}
 str = read_attribute(:#{c})
 return &amp;quot;&amp;quot; if str.nil?
 YAML.load(str)
 end 
 }
 self.class_eval(m)
 end
end
  
]]&gt;&lt;/script&gt;
&lt;p&gt;which enables me to easily configure the columns returned by the sql query that are serialized:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: ruby;"&gt;&lt;![CDATA[

CrosstabObject.serialize_columns(&amp;quot;test_attach&amp;quot;)
list = CrosstabObject.find_by_sql(query)
l[6].test_attach
=&amp;gt; { :detail_value =&amp;gt; 570574, :filetype =&amp;gt; &amp;quot;application/octet-stream&amp;quot;, :uploaded =&amp;gt; false, :filename =&amp;gt; &amp;quot;channels.conf&amp;quot; } 
]]&gt;&lt;/script&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/QSN833XtZjs" height="1" width="1"/&gt;</description>
      <pubDate>Sun, 14 Feb 2010 12:05:07 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/ActiveRecord-serialization-on-a-query-result</feedburner:origLink></item>
    <item>
      <title>IE subtilities to know when working with YUI3</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/pyhRm6atVMM/IE-subtilities-to-know-when-working-with-YUI3</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/IE-subtilities-to-know-when-working-with-YUI3</guid>
      <description>&lt;p&gt;As I'm working on the new interface of MyOwnDB based on YUI, I have discovered 2 subtle differences between IE and FF when creating nodes with YUI 3.&lt;/p&gt;&lt;p&gt;&lt;b&gt;1. You can't change attribute values of INPUT nodes created from a template using the long closing node syntax&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Update: IE is actually doing the right thing, as the input tag does not accept a closing tag as &lt;a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.4" target="_self"&gt;defined by the W3C&lt;/a&gt;
.&lt;/p&gt;&lt;p&gt;By long syntax, I mean closing a tag with an explicit closing tag:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: plain;"&gt;&lt;![CDATA[
&amp;lt;input name=&amp;quot;answer&amp;quot;&amp;gt;&amp;lt;/input&amp;gt;
]]&gt;&lt;/script&gt;
&lt;p&gt;as opposed to the short syntax:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: plain;"&gt;&lt;![CDATA[
&amp;lt;input name=&amp;quot;answer&amp;quot; /&amp;gt;
]]&gt;&lt;/script&gt;
&lt;p&gt;If you create an input node with YUI3 based on the long syntax with IE, you won't be able to set attribute values:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: js;"&gt;&lt;![CDATA[

 template = '&amp;lt;input name=&amp;quot;myfile&amp;quot; type=&amp;quot;file&amp;quot;&amp;gt;&amp;lt;/input&amp;gt;';
 var fileField = Y.Node.create(template);
 fileField.setAttrs({id: 'id453'}); fileField.getAttribute('id'); // =&amp;gt; &amp;quot;&amp;quot;
]]&gt;&lt;/script&gt;
&lt;p&gt;The solution is to use the short syntax to close your tag:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: js;"&gt;&lt;![CDATA[
template = '&amp;lt;input name=&amp;quot;myfile&amp;quot; type=&amp;quot;file&amp;quot;/&amp;gt;';
]]&gt;&lt;/script&gt;
&lt;p&gt;Note that this is only for input nodes. Divs are workling fine with the long syntax:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: js;"&gt;&lt;![CDATA[

template = '&amp;lt;div name=&amp;quot;divname&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;';
 var div = Y.Node.create(template);
 div.setAttrs({id: 'id453'}); div.getAttribute('id'); // =&amp;gt; &amp;quot;id453&amp;quot;
]]&gt;&lt;/script&gt;
&lt;p&gt;&lt;b&gt;2. With IE, you can't set the type of an input node to &amp;quot;file&amp;quot;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;This code will generate a file field with FF, but a text field with IE:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: js;"&gt;&lt;![CDATA[

 template = '&amp;lt;input name=&amp;quot;myfile&amp;quot;/&amp;gt;'
 var fileField = Y.Node.create(template); fileField.setAttrs({type: 'file'});
]]&gt;&lt;/script&gt;
&lt;p&gt;If you want to make it work with IE, you have to make your template include the type attribute:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: js;"&gt;&lt;![CDATA[
 template = '&amp;lt;input type=&amp;quot;file&amp;quot; name=&amp;quot;myfile&amp;quot;/&amp;gt;'
]]&gt;&lt;/script&gt;
&lt;p&gt;I've put a &lt;a href="http://www.nsa.be/static/ie-yui3-node-creation.html" target="_self"&gt;demo page&lt;/a&gt;
 for those interesting in the code, with a YUI console.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/pyhRm6atVMM" height="1" width="1"/&gt;</description>
      <pubDate>Mon, 08 Feb 2010 13:18:03 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/IE-subtilities-to-know-when-working-with-YUI3</feedburner:origLink></item>
    <item>
      <title>Présentation au CaféNumérique</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/X4UjPXssc1s/Presentation-au-CafeNumerique</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/Presentation-au-CafeNumerique</guid>
      <description>&lt;p&gt;J'ai le plaisir de donner &lt;a href="http://www.cafenumerique.be/2010/02/02/open-source-fosdem/" target="_self"&gt;une présentation&lt;/a&gt;
 ce soir au &lt;a href="http://www.cafenumerique.be/" target="_self"&gt;Café Numérique&lt;/a&gt;
 dédié à l'Open Source, comme annoncé également sur le &lt;a href="http://www.profoss.eu/index.php/main/Open-Source-News" target="_self"&gt;site d'actualité Open Source de Profoss&lt;/a&gt;
. Le sujet de la présentation est l'Open Source où ne l'attend pas, et montre combien le Libre et l'Open Source se sont propagé ces 10 dernières années. Pratiquement plus aucun domaine n'échappe à son influence. Parfois même sans qu'on s'en rende compte!&lt;/p&gt;&lt;p&gt;
Voici mes slides au format PDF:&lt;br /&gt;    &lt;a href="/index.php/eng/Media/Files/Logiciels-Libres-Inapercus"&gt;Logiciels Libres Inaperçus&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Bonne découverte!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/X4UjPXssc1s" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 03 Feb 2010 16:28:21 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/Presentation-au-CafeNumerique</feedburner:origLink></item>
    <item>
      <title>How to easily use a javascript function with YUI 3</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/oBLMG5Jy4lQ/How-to-easily-use-a-javascript-function-with-YUI-3</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/How-to-easily-use-a-javascript-function-with-YUI-3</guid>
      <description>&lt;p&gt;ALL YUI 3 code on a page is placed in its own sandbox. This allows several parts of a page to be completely independent, with benefits in maintainability and stability: one sandbox cannot have any effect on another sandbox on the page, and a sandbox only uses the modules it needs. These sandboxes are create with &lt;a href="http://developer.yahoo.com/yui/3/yui/#use" target="_self"&gt;YUI.use&lt;/a&gt;
:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: plain;"&gt;&lt;![CDATA[

YUI().use('dd-drop', function(Y) {
 // Y.DD is available
}
YUI().use('anim', function(Y) {
 // Y.Anim is available} 
]]&gt;&lt;/script&gt;
&lt;p&gt;If you have a function based on YUI that you are going to reuse often, as I had with transitioning MyOwnDB to YUI 3, the best solution is to define it in a module that you'll use in each sandbox that needs it. Defining a module is done with &lt;a href="http://developer.yahoo.com/yui/3/api/YUI.html#method_add" target="_self"&gt;YUI.add&lt;/a&gt;
 which also lets you specify which other modules it depends on. The body of the module is simply adding a namespage to YUI, which will hold all my code, defining the function and putting it under the namespace just created, like this:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: plain;"&gt;&lt;![CDATA[

YUI.add('madb', function(Y) {
Y.namespace('madb');
var get_detail_validator= function (detail_id) {
 // code using YUI
}
Y.madb.get_detail_validator= get_detail_validator;}, '1.0', { requires: ['io-base'], skinnable: false} );
]]&gt;&lt;/script&gt;
&lt;p&gt;Now I can simply use my new module and its associated function in any sandbox I define:&lt;/p&gt;&lt;script type="syntaxhighlighter" class="brush: plain;"&gt;&lt;![CDATA[

YUI().use('madb', function(Y) {
  // Y.madb.get_detail_validator is available}
]]&gt;&lt;/script&gt;
&lt;p&gt;Thanks to Satake and Daniel Cook on the YUI Forum for &lt;a href="http://yuilibrary.com/forum/viewtopic.php?f=18&amp;amp;t=2433&amp;amp;p=8207" target="_self"&gt;their advice&lt;/a&gt;
.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/oBLMG5Jy4lQ" height="1" width="1"/&gt;</description>
      <pubDate>Mon, 25 Jan 2010 09:33:22 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/How-to-easily-use-a-javascript-function-with-YUI-3</feedburner:origLink></item>
    <item>
      <title>From Swing to Jwt</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/GMJfgvLRw4c/From-Swing-to-Jwt</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/From-Swing-to-Jwt</guid>
      <description>&lt;p&gt;The other day, I read the blog post &lt;a href="http://stuartsierra.com/2010/01/08/agents-of-swing" target="_self"&gt;Agents of Swing&lt;/a&gt;
 by Stuart Sierra describing the use of agents in combination with a Swing UI. As soon as I read it I wanted to implement it with Jwt in the hope it would be easy. And I wasn't disappointed!&lt;/p&gt;&lt;p&gt;As I had expected, I was able to reuse the agents code from Stuart and integrate it very easily in my web app. Actually, the development op the web interface was similar to the development of the swing interface. It's so similar I can only paste it here without further explanations:&lt;/p&gt;&lt;pre&gt;; Create the Timer that will update results on the page 
; by calling the function passed
(defn create-timer [wapp fn-update-results]
  (let [timer (WTimer.)]
        (.setInterval timer 1000)
   (.. timer timeout (addListener wapp (create-listener [event] 
                                                                      (fn-update-results))))
   timer))

(defn make-flipper-app [env]
  (let [wapp (new WApplication env)
        root (.getRoot wapp)
        result-text (WText. &amp;quot;&amp;quot;)
        flipper (new-flipper)
        fn-update-results (fn []
               (.setText result-text (
                   str &amp;quot;error: &amp;quot; (error @flipper) &amp;quot; after &amp;quot; 
                       (:total @flipper)  &amp;quot; flips, of which &amp;quot; 
                       (:heads @flipper) &amp;quot; where heads&amp;quot;  )))
        timer (create-timer wapp fn-update-results)
       ]
    (.setTitle wapp &amp;quot;Agents of Jwt&amp;quot;)
    (.. (WPushButton. &amp;quot;Start counter&amp;quot; root) clicked
               (addListener  wapp ( create-listener [mouse-event] 
                   (send flipper start) 
                   (fn-update-results)  
                   (.start timer)  )))    
   (.. (WPushButton. &amp;quot;Stop counter&amp;quot; root) clicked 
              (addListener  wapp ( create-listener [mouse-event] 
                   (send flipper stop) 
                   (.stop timer) 
                   (fn-update-results)   )))
    (.addWidget  root (WBreak.))
    (.addWidget  root result-text)
    (.addWidget  root (WBreak.))
    wapp))


&lt;/pre&gt;&lt;p&gt;The only thing needed in addition to this is importing the necessary jwt classes, the definition of the servlet, and starting the server, the last two being done with this code:&lt;/p&gt;&lt;pre&gt;(def my-servlet
  (proxy [WtServlet] [] 
    (createApplication [env]
      (make-flipper-app env))))


(def my-server (jetty-server))
(add-servlet my-server my-servlet &amp;quot;/*&amp;quot;)

;(org.bitumenframework.jettify.clj_jettify/start-server 
       jwt-toss/my-server)


&lt;/pre&gt;&lt;p&gt;Here is the file with the complete code that I was able to run:&lt;/p&gt;
&lt;div class="object-center"&gt;&lt;img src="/design/standard/images/class_2.png" border="0" alt="Document" /&gt;&amp;nbsp;&lt;a href="/index.php/eng/Media/Files/Jwt-Toss-a-port-of-Agents-of-Swing-to-Jwt"&gt;Jwt Toss: a port of Agents of Swing to Jwt&lt;/a&gt;&lt;/div&gt;&lt;p&gt;If someone's interested, I can possibly bundle a complete environment to be able to run it immediately. Just give me a sign.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/GMJfgvLRw4c" height="1" width="1"/&gt;</description>
      <pubDate>Thu, 21 Jan 2010 17:22:20 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/From-Swing-to-Jwt</feedburner:origLink></item>
    <item>
      <title>Adding a table in my Jwt Clojure app </title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/Ypb02UWRt5M/Adding-a-table-in-my-Jwt-Clojure-app</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/Adding-a-table-in-my-Jwt-Clojure-app</guid>
      <description>&lt;p&gt;Here are the results of my exploration of Jwt tables with Clojure. The code is inspired by an example in the Jwt sources.&lt;/p&gt;&lt;p&gt;A table in Jwt is created with WTreeView&lt;/p&gt;&lt;pre&gt; let [ tree-view (WTreeView.) ]&lt;/pre&gt;&lt;p&gt; and the columns are configure in a model object. In my case, I'll use the &lt;a href="http://www.webtoolkit.eu/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WStandardItemModel.html" target="_self"&gt;WStandardItemModel&lt;/a&gt;
. When instanciating the model, you tell it how many row and columns it should have, in this case 0 rows (I don't know yet why I should pass anything else than 0 here) and 4 columns:&lt;/p&gt;&lt;pre&gt; (WStandardItemModel. 0 4)&lt;/pre&gt;&lt;p&gt;Once the model is intanciated, we can set the column headers with the &lt;a href="http://www.webtoolkit.eu/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WStandardItemModel.html#setHeaderData%28int,%20eu.webtoolkit.jwt.Orientation,%20java.lang.Object,%20int%29" target="_self"&gt;setHeaderData&lt;/a&gt;
 method:&lt;/p&gt;&lt;pre&gt; (.setHeaderData model 0 Orientation/Horizontal &amp;quot;Places&amp;quot;)
 (.setHeaderData model 1 Orientation/Horizontal &amp;quot;Weather&amp;quot;)
 (.setHeaderData model 2 Orientation/Horizontal &amp;quot;Drink&amp;quot;)
 (.setHeaderData model 3 Orientation/Horizontal &amp;quot;Visited&amp;quot;)
&lt;/pre&gt;&lt;p&gt;Now we should add data to the table! A data row is represented by a list of &lt;a href="http://www.webtoolkit.eu/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WStandardItem.html" target="_self"&gt;WStandardItem&lt;/a&gt;
 objects, each being the data displayed in a column, so in our case we'll have each row represented by a list of 4 elements. A list? That's perfect for Clojure! I'll build a list of the items I want in the table and map them to a list of WStandardItems, like this:&lt;/p&gt;&lt;pre&gt; (map #( WStandardItem. % ) '(&amp;quot;Leuven&amp;quot; &amp;quot;Rain&amp;quot; &amp;quot;Beer&amp;quot; &amp;quot;Yes&amp;quot;) )&lt;/pre&gt;&lt;p&gt;For the fun I defined a function building the WStandardItem:&lt;/p&gt;&lt;pre&gt; (defn standard-itemize [ item ]
   (WStandardItem. item))&lt;/pre&gt;&lt;p&gt;Which lets me write this code to build a row:&lt;/p&gt;&lt;pre&gt;(map standard-itemize '(&amp;quot;Leuven&amp;quot; &amp;quot;Rain&amp;quot; &amp;quot;Beer&amp;quot; &amp;quot;Yes&amp;quot;) )&lt;/pre&gt;&lt;p&gt;When we have the row, we can add it to the table with &lt;a href="http://www.webtoolkit.eu/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WStandardItemModel.html#appendRow%28java.util.List%29" target="_self"&gt;appendRow&lt;/a&gt;
 :&lt;/p&gt;&lt;pre&gt; (.appendRow model row)&lt;/pre&gt;&lt;p&gt;We can the set assign this model to the tree-view with :&lt;a href="http://www.webtoolkit.eu/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WTreeView.html#setModel%28eu.webtoolkit.jwt.WAbstractItemModel%29" target="_self"&gt;setModel&lt;/a&gt;
&lt;/p&gt;&lt;pre&gt; (.setModel tree-view model)&lt;/pre&gt;&lt;p&gt;Once we know that, it's trivial to work on list of rows:&lt;/p&gt;&lt;pre&gt;(let [data'((&amp;quot;Leuven&amp;quot; &amp;quot;Rain&amp;quot; &amp;quot;Beer&amp;quot; &amp;quot;Yes&amp;quot;)(&amp;quot;Brussels&amp;quot; &amp;quot;Rain&amp;quot; &amp;quot;Beer&amp;quot; &amp;quot;Yes&amp;quot;)) )
 rows (map #( map standard-itemize %) data)]
....
(doall (map #(.appendRow model %) rows))&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;With a function I called standard-rowize taking a row of data and returning a row of WStandardItems, we get somewhat cleaner code:&lt;/p&gt;&lt;pre&gt;(defn standard-rowize [ row ]
 (map standard-itemize row))


 (let [data'((&amp;quot;Leuven&amp;quot; &amp;quot;Rain&amp;quot; &amp;quot;Beer&amp;quot; &amp;quot;Yes&amp;quot;)(&amp;quot;Brussels&amp;quot; &amp;quot;Rain&amp;quot; &amp;quot;Beer&amp;quot; &amp;quot;Yes&amp;quot;)) )
 rows (map standard-rowize data)]


 ... 
 (doall (map #(.appendRow model %) rows))
&lt;/pre&gt;&lt;p&gt;Here's the result, a table with row ordering and alternating row colors&lt;/p&gt;
&lt;div class="object-center"&gt;&lt;div class="content-view-embed"&gt;
&lt;div class="class-image"&gt;
    &lt;div class="attribute-image"&gt;

    
        
    
                    &lt;img src="/var/ezwebin_site/storage/images/media/images/treeview-simple/5076-1-eng-GB/Treeview-simple.png" width="594" height="66"  style="border: 0px;" alt="" title="" /&gt;
            
    
    
    &lt;/div&gt;

     &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;But there's more to it than this. As the table is represented by a tree view, it can group rows and that is achieved really easily: each row can be the container of its sub rows! Here are the only changes to do:&lt;/p&gt;&lt;p&gt;Create a europe-row which will contain european cities&lt;/p&gt;&lt;pre&gt;europe-row (WStandardItem. &amp;quot;Europe&amp;quot;)&lt;/pre&gt;&lt;p&gt;appends the rows to the europe-row rather than to the model:&lt;/p&gt;&lt;pre&gt;(doall (map #(.appendRow europe-row %) rows))&lt;/pre&gt;&lt;p&gt;and finally, append the europe-row to the model:&lt;/p&gt;&lt;pre&gt;(.appendRow model europe-row)&lt;/pre&gt;&lt;p&gt;This is all what's needed to get this:&lt;/p&gt;
&lt;div class="object-center"&gt;&lt;div class="content-view-embed"&gt;
&lt;div class="class-image"&gt;
    &lt;div class="attribute-image"&gt;

    
        
    
                    &lt;img src="/var/ezwebin_site/storage/images/media/images/tweeview-subrows/5072-1-eng-GB/TweeView-subrows.png" width="610" height="92"  style="border: 0px;" alt="" title="" /&gt;
            
    
    
    &lt;/div&gt;

     &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The changes were so small that despite the fact that I discovered all this, it worked at the first try! Here's the code of the function buidling the tree-view:&lt;/p&gt;&lt;pre&gt;(defn build-tree-view []
 ( let [ tree-view (WTreeView.)
 model (WStandardItemModel. 0 4)
 europe-row (WStandardItem. &amp;quot;Europe&amp;quot;)
 rows (map standard-rowize '((&amp;quot;Leuven&amp;quot; &amp;quot;Rain&amp;quot; &amp;quot;Beer&amp;quot; &amp;quot;Yes&amp;quot;)(&amp;quot;Brussels&amp;quot; &amp;quot;Rain&amp;quot; &amp;quot;Waffles&amp;quot; &amp;quot;Yes&amp;quot;)) )
 ]
 (.setHeaderData model 0 Orientation/Horizontal &amp;quot;Places&amp;quot;)
 (.setHeaderData model 1 Orientation/Horizontal &amp;quot;Weather&amp;quot;)
 (.setHeaderData model 2 Orientation/Horizontal &amp;quot;Item&amp;quot;)
 (.setHeaderData model 3 Orientation/Horizontal &amp;quot;Visited&amp;quot;)
 (.setAlternatingRowColors tree-view true)
 (doall (map #(.appendRow europe-row %) rows))
 (.appendRow model europe-row)
 (.setModel tree-view model)
 tree-view))
&lt;/pre&gt;&lt;p&gt;Let's go further and manipulated the table: let's add a button to toggle the alternated row colors. Again, the changes to make are minimal:&lt;/p&gt;
&lt;ul&gt;

&lt;li&gt;instanciate a WPushButton&lt;/li&gt;

&lt;li&gt;instanciate a WContainerWidget and pass it as the parent widget to the button and treeview constructor&lt;/li&gt;

&lt;li&gt;return the container in place of the treeview&lt;/li&gt;

&lt;li&gt;add a listener to the click event of the button to toggle the rows coloring. This uses the macro written for the Jwt-Clojure previous post.&lt;/li&gt;

&lt;/ul&gt;
&lt;p&gt;Here is the code where I indicated the lines that were added or adapted:&lt;/p&gt;&lt;pre&gt;(defn build-tree-view []
 ( let [ 
 container (WContainerWidget.) ;added
 button (WPushButton. &amp;quot;Toggle colors&amp;quot; container) ;added
 tree-view (WTreeView. container) ;adapted
 model (WStandardItemModel. 0 4)
 europe-row (WStandardItem. &amp;quot;Europe&amp;quot;)
 rows (map standard-rowize '((&amp;quot;Leuven&amp;quot; &amp;quot;Rain&amp;quot; &amp;quot;Beer&amp;quot; &amp;quot;Yes&amp;quot;)(&amp;quot;Brussels&amp;quot; &amp;quot;Rain&amp;quot; &amp;quot;Waffles&amp;quot; &amp;quot;Yes&amp;quot;)) )
 ]
 (.. button clicked (addListener container (create-listener [mouse-event]
 (.setAlternatingRowColors tree-view (not (.hasAlternatingRowColors tree-view) ))))) ; added
 (.setHeaderData model 0 Orientation/Horizontal &amp;quot;Places&amp;quot;)
 (.setHeaderData model 1 Orientation/Horizontal &amp;quot;Weather&amp;quot;)
 (.setHeaderData model 2 Orientation/Horizontal &amp;quot;Item&amp;quot;)
 (.setHeaderData model 3 Orientation/Horizontal &amp;quot;Visited&amp;quot;)
 (.setAlternatingRowColors tree-view true)
 (doall (map #(.appendRow europe-row %) rows))
 (.appendRow model europe-row)
 (.setModel tree-view model) ;adapted
 container)) ;adapted
&lt;/pre&gt;&lt;p&gt;Although there's a lot more to explore (pagination being the first thing I want to explore next), this is is for now. I hope this encourages to test Jwt and Clojure, both being very exciting projects!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/Ypb02UWRt5M" height="1" width="1"/&gt;</description>
      <pubDate>Mon, 14 Dec 2009 13:31:30 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/Adding-a-table-in-my-Jwt-Clojure-app</feedburner:origLink></item>
    <item>
      <title>Jekyll, YUI and Github: a great combination</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/Vdf4q3ykzqI/Jekyll-YUI-and-Github-a-great-combination</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/Jekyll-YUI-and-Github-a-great-combination</guid>
      <description>&lt;p&gt;I was looking for a way to easily publish documentation for &lt;a href="http://dedomenon.org" target="_self"&gt;Dedomenon&lt;/a&gt;
, the information storage engine behind &lt;a href="http://www.myowndb.com/" target="_self"&gt;MyOwnDB.com&lt;/a&gt;
 which I'm again developing heavily. And as I'm developing, I want to write complete and up to date documenation. I was looking for a hosted solution, which I wouldn't have to maintain myself, but I still wanted to have full control of the content, so I could easily move to another solution in the future if needed.&lt;/p&gt;&lt;p&gt;I thought of a wiki, but didn't go for it as I'm not sure of the export functionalities of hosted solution and the ease of integrating the content in a new solution. Each wiki seems to have its own markup, and I'm afraid that an export functionality is not enough to ensure long term availability of the content.&lt;/p&gt;&lt;p&gt;I then looked at &lt;a href="http://wiki.github.com/mojombo/jekyll" target="_self"&gt;Jekyll&lt;/a&gt;
, a tool to maintains web sites (and more specifically blogs) developed by &lt;a href="http://github.com" target="_self"&gt;Github&lt;/a&gt;
. It has some very compelling functionalities:&lt;/p&gt;
&lt;ul&gt;

&lt;li&gt;can be hosted as Github pages, which responds to my hosting requirement&lt;/li&gt;

&lt;li&gt;content is written in markdown or textile. As I had some content in textile format already, it's a plus!&lt;/li&gt;

&lt;li&gt;I can write content with my prefered editor (vim)&lt;/li&gt;

&lt;li&gt;Hosting on github means I can (I must!) handle the content's history with git&lt;/li&gt;

&lt;li&gt;categorizes content based on the directories hierarchy&lt;/li&gt;

&lt;/ul&gt;
&lt;p&gt;The only problem I had it that it didn't seem a ready-made solution to handle non-blog oriented website. But after some work, I got a working solution which is worth sharing:&lt;a href="http://github.com/raphinou/jekyll-base" target="_self"&gt; Jekyll Base&lt;/a&gt;
. &lt;/p&gt;&lt;p&gt;Jekyll Base is simply the basic directory hierarchy expected by jekkyl, with a ready-to-use template offering:&lt;/p&gt;
&lt;ul&gt;

&lt;li&gt;Cross-browser layout thanks to &lt;a href="http://developer.yahoo.com/yui/grids/" target="_self"&gt;YUI Grids&lt;/a&gt;
&lt;/li&gt;

&lt;li&gt;&lt;a href="http://www.styleshout.com/templates/preview/FreshPick1-0/index.html" target="_self"&gt;FreshPick&lt;/a&gt;
 based CSS&lt;/li&gt;

&lt;li&gt;Use of Yahoo’s CDN for delivery of YUI Grids files&lt;/li&gt;

&lt;li&gt;Google Analytics activated by putting site id in config file&lt;/li&gt;

&lt;li&gt;Google Ajax Search activated by putting your API key in the config file&lt;/li&gt;

&lt;li&gt;Listing of documents in current section&lt;/li&gt;

&lt;li&gt;List of subsections&lt;/li&gt;

&lt;li&gt;Breadcrumbs to help in navigation&lt;/li&gt;

&lt;/ul&gt;
&lt;p&gt;It includes 2 helpers script to add sections and pages. You can of course see it in action at &lt;a href="http://dedomenon.github.com/documentation" target="_self"&gt;http://dedomenon.github.com/documentation&lt;/a&gt;
.&lt;/p&gt;&lt;p&gt;Thanks to the use of YUI Grids, the template is very simple, though will render in all browser as expected. Combined with the FreshPick CSS, it gives an acceptable solution. This is particularly important as I'm really not a designer.&lt;/p&gt;&lt;p&gt;Jekyll Base &lt;a href="http://github.com/raphinou/jekyll-base" target="_self"&gt;source is available on github&lt;/a&gt;
 and its documentation is of course self-managed and hosted as Github pages at &lt;a href="http://raphinou.github.com/jekyll-base/" target="_self"&gt;http://raphinou.github.com/jekyll-base/&lt;/a&gt;
&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/Vdf4q3ykzqI" height="1" width="1"/&gt;</description>
      <pubDate>Thu, 26 Nov 2009 14:59:01 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/Jekyll-YUI-and-Github-a-great-combination</feedburner:origLink></item>
    <item>
      <title>Using Jwt's WTimer</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/ebq9mY85q00/Using-Jwt-s-WTimer</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/Using-Jwt-s-WTimer</guid>
      <description>&lt;p&gt;Jwt includes the class WTimer to help you run tasks at regular intervals. Here is a code that updates a text element of the page every second. It simply instanciates a WTimer, and adds a listener to its timeout signal:&lt;/p&gt;&lt;pre&gt;(let [ container (WContainerWidget.)
        layout (WGridLayout.)
        text (WText. &amp;quot;Hello&amp;quot;)
        timer (WTimer.) ]
  (doto timer
    (.setInterval 1000)
    (-&amp;gt; .timeout (.addListener container
         (create-listener [ev] 
           (.setText  text (str 
             (java.util.Date. (System/currentTimeMillis)) )))))
   (.start))
  (.addWidget layout text 0 0)
  (.setLayout container layout)
  container)
&lt;/pre&gt;&lt;p&gt;Simple, isn't it?&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/ebq9mY85q00" height="1" width="1"/&gt;</description>
      <pubDate>Tue, 08 Sep 2009 08:40:41 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/Using-Jwt-s-WTimer</feedburner:origLink></item>
    <item>
      <title>From OO to Lisp style: structuring my Clojure Jwt app</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/z9SDBZgJ1zY/From-OO-to-Lisp-style-structuring-my-Clojure-Jwt-app</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/From-OO-to-Lisp-style-structuring-my-Clojure-Jwt-app</guid>
      <description>&lt;p&gt;As I'm progressing with Jwt app development in Clojure, I encountered the question of structuring my code. I'm not yet talking of namespaces, but simply how I should my code in functions, and how do I translate the OO code, heavily using instance variables. See &lt;a href="http://github.com/rdale/wtruby/blob/a51bf9a48c0a2e783f6911673a12557e4a3794b1/ruby/wtruby/examples_3_0/hangman/hangmangame.rb" target="_self"&gt;this code&lt;/a&gt;
 from a WT Ruby example to get an idea.&lt;/p&gt;&lt;p&gt;I wanted to develop a login widget with login and password fields and a submit button. I wanted this login widget to be displayed in a modal dialog that disappears when valid credentials are submitted.&lt;/p&gt;&lt;p&gt;I've started with the same approach as &lt;a href="/index.php/eng/Blog/Using-Jwt-yes-it-s-a-J-with-Clojure" target="_self"&gt;my previous post&lt;/a&gt;
: a function creating the WApplication instance that is passed to the servlet. In this function, I instanciate all main components of the application: the WApplication, the modal dialog, the login widget and the main application screen:&lt;/p&gt;&lt;pre&gt;(defn make-login-app [env]
  (let [wapp (new WApplication env)
        root (.getRoot wapp)
        result-text (WText. &amp;quot;&amp;quot;)
        user nil
        dialog (WDialog. &amp;quot;test&amp;quot;)
        dialog-container (.getContents dialog)
        app-screen (make-app-screen)
        form (make-login-form)
       ]
    ; function code will come here
))
&lt;/pre&gt;&lt;p&gt;Creating the login form is done by the function make-login-form. This function creates the form elements and lays them out. As Jwt is a framework using the signal/slot idea to implement communication between application components, I've decided to use it with the login form. A signal is triggered when the login is successful, and another signal is triggered when the creadential provided are incorrect.&lt;/p&gt;&lt;p&gt;Using signal is really simple: just instanciate the Signal class and give a way to access this instance to the component wishing to connect to it. In the OO world, this is implemented by an instance variable and a get method. So, how do we translate that in Clojure? &lt;/p&gt;&lt;p&gt;The trick is that the make-login-form will not only return the login widget, but also both signal instances, all placed in a map. That way, inmake-login-app, we will be able to add listeners to these signals. &lt;/p&gt;&lt;p&gt;The signals are triggered by a listener attached to the button's clicked signal: if the credential provided are correct the loggedin-signal is trigger, else the wrong-credentials-signal is triggered. &lt;/p&gt;&lt;p&gt;Here's the function's code (the last line returns the map):&lt;/p&gt;&lt;pre&gt;(defn make-login-form []
  (let [layout (WGridLayout.)
        container (WContainerWidget.)
        password-field (doto (WLineEdit. container) 
                  (.setEchoMode WLineEdit$EchoMode/Password ) )
        password #(.getText password-field)
        login-field (WLineEdit. container)
        login #(.getText login-field)
        loggedin-signal (Signal.)
        wrong-credentials-signal (Signal.)
        do-login (fn [evt] 
             (if (authenticate (login) (password)) 
                (.trigger loggedin-signal ) 
                (.trigger wrong-credentials-signal)  ))
        submit-button (WPushButton. &amp;quot;Login&amp;quot;)]
    (-&amp;gt; submit-button .clicked
              (.addListener  container 
                   ( create-listener [mouse-event] 
                    (do-login mouse-event) )))
    (.addWidget layout (WLabel. &amp;quot;Login:&amp;quot;) 0 0 )
    (.addWidget layout login-field 0 1 )
    (.addWidget layout (WLabel. &amp;quot;Password:&amp;quot;) 1 0 )
    (.addWidget layout password-field 1 1)
    (.addWidget layout  submit-button 2 0 1 2)
    (.setLayout container layout)
    (.setFocus login-field)
   { :container container 
    :authenticated loggedin-signal 
    :rejected wrong-credentials-signal}))
&lt;/pre&gt;&lt;p&gt;The credentials are checked by the function authenticate which takes the login and password as argument. This naive authentication method only to be used in an example will simply check if it finds a user entry with the corresponding user and password (using clj-record):&lt;/p&gt;&lt;pre&gt;(defn authenticate [login password]
    (user/find-record {:login login :password password}))
&lt;/pre&gt;&lt;p&gt;&lt;b&gt;And here we see why I'm so interested in Jwt:&lt;/b&gt;&lt;i&gt;&lt;b&gt; I don't have to care about server side or client side! I just code my app and Jwt handles all the rest. I don't have to care about making a request to the server which then will check the credentials in the database, and send a response that I would need to handle at the client side. It's all Clojure code, and Jwt handles all that trasparently.&lt;/b&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;In the make-login-app I also already initialised the app's main screen, thanks to a function that simply creates a text widget that will be updated by the login widget's signal's listeners:&lt;/p&gt;&lt;pre&gt;(defn make-app-screen []
 (let [ container (WContainerWidget.)
        layout (WGridLayout.)
        text (WText. &amp;quot;Hello&amp;quot;)]
  (.addWidget layout text 0 0)
  (.setLayout container layout)
  container))
&lt;/pre&gt;&lt;p&gt;Now that we know how all &amp;quot;variables&amp;quot; are initialised in the make-login-app function, we can take a closer look to that function's body, where we set up the listeners:&lt;/p&gt;&lt;pre&gt;(defn make-login-app [env]
  (let [wapp (new WApplication env)
        root (.getRoot wapp)
        result-text (WText. &amp;quot;&amp;quot;)
        user nil
        dialog (WDialog. &amp;quot;test&amp;quot;)
        dialog-container (.getContents dialog)
        app-screen (make-app-screen)
        form (make-login-form)
       ]
    (.addListener (form :authenticated) wapp  
             (create-listener [] 
               (.remove dialog) 
                (.setText (-&amp;gt; app-screen .getLayout (.getItemAt 0) .getWidget) &amp;quot;Logged in!&amp;quot;)))
    (.addListener (form :rejected) wapp  
              (create-listener []  
                 (.setText (-&amp;gt; app-screen .getLayout (.getItemAt 0) .getWidget) &amp;quot;Wrong credentials!&amp;quot;)))
    (.setTitle wapp &amp;quot;Login Example&amp;quot;)
    (doto dialog (.. getContents (addWidget (form :container))) .show)
    (.addWidget  root app-screen)
    wapp))
&lt;/pre&gt;&lt;p&gt;We simply add a listener to each signal, which will update the text element we placed in the app-screen. Also note the doto usage: many Jwt methods return void, and the doto macro is really a time-saviour.&lt;/p&gt;&lt;p&gt;Advices and remarks to improve the code are welcome!&lt;/p&gt;&lt;a name="eztoc2962_1" id="eztoc2962_1"&gt;&lt;/a&gt;&lt;h2&gt;Update&lt;/h2&gt;&lt;p&gt;Jonathan Smith noted that the multiple calls to (.addWidget layout ...) in make-login-form could be grouped in a doto:&lt;/p&gt;&lt;pre&gt;(doto layout
   (.addWidget  (WLabel. &amp;quot;Login:&amp;quot;) 0 0 )
    (.addWidget  login-field 0 1 )
    (.addWidget  (WLabel. &amp;quot;Password:&amp;quot;) 1 0 )
    (.addWidget  password-field 1 1)
    (.addWidget  submit-button 2 0 1 2))&lt;/pre&gt;&lt;p&gt;Jonathan also mentioned the possibility of using a 'continuation passing' style, which rather than using signals, passes functions to be called when an action occurs. The first version of my code was actually like that, and I paste it here for completeness (see the anonymous functions passed to make-login-form):&lt;/p&gt;&lt;pre&gt;(defn make-login-form [ succes-fn failure-fn]
  (let [layout (WGridLayout.)
        container (WContainerWidget.)
        password-field (doto (WLineEdit. container) 
           (.setEchoMode WLineEdit$EchoMode/Password ) )
        password #(.getText password-field)
        login-field (WLineEdit. container)
        login #(.getText login-field)
        do-login (fn [evt] (if (authenticate (login) (password)) 
            (succes-fn) (failure-fn)  )) 
        submit-button (WPushButton. &amp;quot;Login&amp;quot;)]
    (-&amp;gt; submit-button .clicked 
            (.addListener  container 
              (create-listener [mouse-event] (do-login mouse-event))))
    (.addWidget layout (WLabel. &amp;quot;Login:&amp;quot;) 0 0 )
    (.addWidget layout login-field 0 1 )
    (.addWidget layout (WLabel. &amp;quot;Password:&amp;quot;) 1 0 )
    (.addWidget layout password-field 1 1)
    (.addWidget layout  submit-button 2 0 1 2)
    (.setLayout container layout)
    (.setFocus login-field)
   container))
    
(defn make-login-app [env]
  (let [wapp (new WApplication env)
        root (.getRoot wapp)
        result-text (WText. &amp;quot;&amp;quot;)
        form (make-login-form 
          #(.setText result-text &amp;quot;Welcome back!&amp;quot;) 
          #(.setText result-text &amp;quot;Check your credentials!&amp;quot;))
        user nil
        dialog (WDialog. &amp;quot;test&amp;quot;)
        dialog-container (.getContents dialog)
       ]
    (.setTitle wapp &amp;quot;Login Example&amp;quot;)
    (doto dialog (.. getContents (addWidget form)) .show)
    (.addWidget  root result-text)
    wapp))
&amp;lt;/pre&amp;gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/z9SDBZgJ1zY" height="1" width="1"/&gt;</description>
      <pubDate>Fri, 04 Sep 2009 14:25:16 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/From-OO-to-Lisp-style-structuring-my-Clojure-Jwt-app</feedburner:origLink></item>
    <item>
      <title>Using Jwt with JRuby</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/vxa78jYLBKw/Using-Jwt-with-JRuby</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/Using-Jwt-with-JRuby</guid>
      <description>&lt;p&gt;After getting the &lt;a href="/index.php/eng/Blog/Using-Jwt-yes-it-s-a-J-with-Clojure" target="_self"&gt;Jwt Hello world working with Clojure&lt;/a&gt;
, I was notified by Shantanu Kumar about his &lt;a href="http://bitbucket.org/kumarshantanu/jettify/" target="_self"&gt;Jettify&lt;/a&gt;
 library, which is a wrapper for the Jetty Servlet Container. Using it with Clojure was a breeze, but it also gave me an easy path to deploy Jruby based Jwt apps in Jetty!&lt;/p&gt;&lt;p&gt;And so immediately started to translated the Hello World in Jruby, getting it working nearly instantly. &lt;/p&gt;&lt;p&gt;It was also very easy to add listeners, thanks to what JRuby calls &lt;a href="http://kenai.com/projects/jruby/pages/CallingJavaFromJRuby#Closure_conversion" target="_self"&gt;Closure Conversion&lt;/a&gt;
 which converts a Ruby block or closure to an appropriate Java interface .Thanks to that feature, adding the listener for the button click is as simple as this:&lt;/p&gt;&lt;pre&gt;button.clicked.add_listener(self) do
  greeting_.setText(nameEdit_.getText) 
end
&lt;/pre&gt;&lt;p&gt;The only problem I encountered and which I have not solved yet are setting the margin of the button. This line &lt;/p&gt;&lt;pre&gt;button.setMargin(WLength.new(5.0), Side::Left)
&lt;/pre&gt;&lt;p&gt;causes the error &amp;quot;no setMargin with arguments matching&amp;quot;, which I think is due to &lt;a href="http://www.webtoolkit.eu/jwt/latest/doc/javadoc/eu/webtoolkit/jwt/WWebWidget.html#setMargin%28eu.webtoolkit.jwt.WLength,%20java.util.EnumSet%29" target="_self"&gt;setMargin&lt;/a&gt;
 expecting its second argument to be a EnumSet.&lt;/p&gt;&lt;p&gt;The other problem I still need to solve is stopping the Jetty server when the script is stopped with CTRL-C. I thought to trap the signal like this:&lt;/p&gt;&lt;pre&gt;trap &amp;quot;SIGINT&amp;quot;, proc{  instance.stop }
&lt;/pre&gt;&lt;p&gt;but JRuby warns that this signal is handled by the java platform. I'll look further to solve these 2 minor problems, but I wanted to already share this working code:&lt;/p&gt;&lt;pre&gt;require 'java'

import &amp;quot;eu.webtoolkit.jwt.Side&amp;quot;
import &amp;quot;eu.webtoolkit.jwt.Signal&amp;quot;
import &amp;quot;eu.webtoolkit.jwt.Signal1&amp;quot;
import &amp;quot;eu.webtoolkit.jwt.WApplication&amp;quot;
import &amp;quot;eu.webtoolkit.jwt.WBreak&amp;quot;
import &amp;quot;eu.webtoolkit.jwt.WEnvironment&amp;quot;
import &amp;quot;eu.webtoolkit.jwt.WLineEdit&amp;quot;
import &amp;quot;eu.webtoolkit.jwt.WMouseEvent&amp;quot;
import &amp;quot;eu.webtoolkit.jwt.WPushButton&amp;quot;
import &amp;quot;eu.webtoolkit.jwt.WText&amp;quot;
import &amp;quot;eu.webtoolkit.jwt.WLength&amp;quot;
import &amp;quot;org.bitumenframework.jettify.JettyServer&amp;quot;
import &amp;quot;eu.webtoolkit.jwt.WtServlet&amp;quot;

class MyApplication &amp;lt; WApplication
  def initialize(env)
    super
    setTitle(&amp;quot;Hello World&amp;quot;)
    getRoot.addWidget(WText.new(&amp;quot;Your name, please ? &amp;quot;))
    nameEdit_ = WLineEdit.new(getRoot)
    nameEdit_.setFocus()
    button = WPushButton.new(&amp;quot;Greet me.&amp;quot;, getRoot())
    getRoot().addWidget(WBreak.new)
    greeting_ = WText.new(getRoot())
    wapp=self
    button.clicked.add_listener(self) do
      greeting_.setText(nameEdit_.getText) 
    end
    nameEdit_.enterPressed.add_listener(self) do 
      greeting_.setText(nameEdit_.getText) 
    end

  end
end


class MyServlet &amp;lt; WtServlet
  def createApplication(env)
    MyApplication.new(env)
  end
end

instance = JettyServer.new
instance.addServlet(MyServlet.new, &amp;quot;/*&amp;quot;)
instance.start


&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/vxa78jYLBKw" height="1" width="1"/&gt;</description>
      <pubDate>Sun, 30 Aug 2009 10:08:43 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/Using-Jwt-with-JRuby</feedburner:origLink></item>
    <item>
      <title>Using Jwt (yes, it's a J)  with Clojure</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/2PKpkwJ_EH0/Using-Jwt-yes-it-s-a-J-with-Clojure</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/Using-Jwt-yes-it-s-a-J-with-Clojure</guid>
      <description>&lt;a name="eztoc2850_1" id="eztoc2850_1"&gt;&lt;/a&gt;&lt;h2&gt;Introduction&lt;/h2&gt;&lt;p&gt;&lt;a href="http://www.webtoolkit.eu/jwt" target="_self"&gt;Jwt&lt;/a&gt;
 is a &amp;quot;&lt;i&gt;Java library for developing web applications&lt;/i&gt;&amp;quot; with a widget-centric API. Jwt is actually the result of a translation to Java of the original &lt;a href="http://www.webtoolkit.eu/wt" target="_self"&gt;Wt&lt;/a&gt;
 C++ code, which was originally developed by Koen Deforche and both are now maintained by &lt;a href="http://www.emweb.be/" target="_self"&gt;Emweb&lt;/a&gt;
.&lt;/p&gt;&lt;p&gt;I've been intrigued by Wt since I saw an (was that 3 year ago?!) &lt;a href="http://ajaxian.com/archives/wt-c-ajax-framework" target="_self"&gt;announcement on Ajaxian&lt;/a&gt;
 for its widget approach, but I never used it due to its C++ base. Not that C++ is bad, it certainly has its justification in the embedded space, but I got used to dynamic scripting languages.&lt;/p&gt;&lt;p&gt;When Koen told me some months ago a Java version was on its way, I immediately told him I was eager to test it. Not with Java the language, but on Java the platform with Clojure (which I'll cover in this post) and JRuby (maybe for a future post, but if you want to test Wt from Ruby, take a look at Richard Dale's &lt;a href="http://github.com/rdale/wtruby/tree/master" target="_self"&gt;WtRuby&lt;/a&gt;
 which uses the C++ Wt).&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.clojure.org/" target="_self"&gt;Clojure&lt;/a&gt;
 is a &amp;quot;&lt;i&gt;dynamic programming language that targets the Java Virtual Machine&lt;/i&gt;&amp;quot; which is a dialect of Lisp sharing with it &amp;quot;&lt;i&gt;the code-as-data philosophy and a powerful macro system&lt;/i&gt;&amp;quot;. Clojure is a recent language with a vibrant and &lt;a href="http://www.google.com/trends?q=clojure" target="_self"&gt;steadily growing&lt;/a&gt;
 community. Despite being so young, there's already &lt;a href="http://www.pragprog.com/titles/shcloj/programming-clojure" target="_self"&gt;a book covering Clojure by the Pragmatic Programers&lt;/a&gt;
.&lt;/p&gt;&lt;a name="eztoc2850_2" id="eztoc2850_2"&gt;&lt;/a&gt;&lt;h2&gt;Setup&lt;/h2&gt;&lt;p&gt;I'm using Sun's Java 6 on an Debian, and got code for Clojure, Clojure-contrib and Jwt from their respective repositories. If this is fine for Clojure and Clojure-contrib, which build flawlessly with ant giving you a usable jar file, it caused problems with Jwt as the git repo seems to be out of sync... One advice here: be sure to &lt;a href="http://www.webtoolkit.eu/jwt#/download" target="_self"&gt;download the Jwt zip file&lt;/a&gt;
 (currently 2.99.3) to avoid headaches wondering why you get blank pages served!&lt;/p&gt;&lt;a name="eztoc2850_3" id="eztoc2850_3"&gt;&lt;/a&gt;&lt;h2&gt;First step&lt;/h2&gt;&lt;p&gt;Jwt applications need to run in a servlet container, and Compojure, a Clojure web development framework provides jetty.clj module allowing to create a servlet holder in which you can add an instantiated Jwt servlet. (thanks to Adrian Cuthbertson for this info!).&lt;/p&gt;&lt;p&gt;So, the only thing I needed to find is how to instanciate a WtServlet. To find out I decided to translate in Clojure the &lt;a href="http://www.webtoolkit.eu/jwt#/src/hello" target="_self"&gt;HelloWorld&lt;/a&gt;
 found in Jwt's &lt;a href="http://www.webtoolkit.eu/jwt#/examples/" target="_self"&gt;examples&lt;/a&gt;
. My first attempt was some some of literal translation of the Java code which was not very &amp;quot;clojurish&amp;quot; nor working as I always got blank pages served. Eventually I got everything sorted out: the problem was because the git repo doesn't contain the latest release, and the code was improved by Chouser on irc to look like this:&lt;/p&gt;&lt;pre&gt;(ns be.nsa.server
  (:use compojure))

(import '(eu.webtoolkit.jwt WApplication
                    WEnvironment WtServlet WText 
                    WPushButton WLineEdit WBreak))

(defn make-hello-app [env]
  (let [wapp (new WApplication env)
        root (.getRoot wapp)
        line-edit (WLineEdit.)
        result-text (WText. &amp;quot;&amp;quot;)
       ]
    (.setTitle wapp &amp;quot;HelloWorld&amp;quot;)
    (.addWidget root (WText. &amp;quot;Hello there! &amp;quot;))
    wapp))

(def my-servlet
  (proxy [WtServlet] []
    (createApplication [env]
      (make-hello-app env))))

(defserver my-server {:port 8080} &amp;quot;/*&amp;quot; my-servlet  )
&lt;/pre&gt;&lt;p&gt;After declaring our namespace and saying we &lt;a href="http://clojure.org/API#toc586" target="_self"&gt;use&lt;/a&gt;
 compojure, we import the classes needed from Jwt.&lt;/p&gt;&lt;p&gt;The code itself is not very complex: it creates an instance of a &lt;a href="http://clojure.org/java_interop#toc26" target="_self"&gt;proxy&lt;/a&gt;
 class to WtServlet, of which we overwrite the method createApplication (which receives as argument a WEnvironment instance). This method simply return the WApplication we instanciate in make-hello-app.&lt;/p&gt;&lt;a name="eztoc2850_4" id="eztoc2850_4"&gt;&lt;/a&gt;&lt;h2&gt;Implementing listeners&lt;/h2&gt;&lt;p&gt;The second step needed to get the working hello world application, is to add a text field and a button. This is straight-forward, but then we need to add a listener on the button, which is defined like this in Java:&lt;/p&gt;&lt;pre&gt;b.clicked().addListener(this, new Signal1.Listener&amp;lt;WMouseEvent&amp;gt;() {
   public void trigger(WMouseEvent a1) {
     greet();
   }
});
&lt;/pre&gt;&lt;p&gt;The listener needs to implement the nested interface Signal1.Listener. To get access to it, you use the syntax Signal1$Listener, but it is accessible only after you have imported it! If you don't import Signal1$Listener, you'll have to reference it by its fully qualified name (even if you imported Signal1)! I got a useful help from Cark on IRC for this, thanks!&lt;/p&gt;&lt;p&gt;Once accessing the nested interface was sorted out, implementing the listener was easy:&lt;/p&gt;&lt;pre&gt;(.. (WPushButton. &amp;quot;Greet me&amp;quot; root) clicked
    (addListener  
          wapp
          (proxy [Signal1$Listener] [] 
               (trigger [ mouse-event ] 
                 (.setText result-text (.getText line-edit)) ))))&lt;/pre&gt;&lt;p&gt;we add a listener to the object returned by the button's clicked method. The first argument to addListener is the wapp, the second argument is the proxy class' instance of which we implement the trigger method. This code to create the widget seems to be screaming for macros, see below.&lt;/p&gt;&lt;p&gt;At that time I though I was done, as implementing the second listener is done by this code:&lt;/p&gt;&lt;pre&gt;(.. line-edit enterPressed
    (addListener 
       wapp   
        (proxy [Signal$Listener] [] 
            (trigger [] 
             (.setText result-text (.getText line-edit))))))&lt;/pre&gt;&lt;p&gt;But it didn't work :(&lt;/p&gt;&lt;p&gt;The addListener method could not be resolved. After looking at it for hours spread on multiple days with the help of clojure wizards on the #clojure IRC channel, cgrand finally identified the problem (&lt;b&gt;update (20090901)&lt;/b&gt;: this problem has been patched and will be gone in future Clojure releases): proxy objects for nested interfaces are cached and identified by the interface's name. Meaning that if you have multiple interfaces with the same name in different packages, you'll get in trouble. The solution is to call proxy with a dummy interface that we don't care about, but which will change the key used to stored it in the proxy cache... In this example I added the interface Runnable:&lt;/p&gt;&lt;pre&gt;(.. line-edit enterPressed 
    (addListener 
       wapp  
        (proxy [Signal$Listener Runnable] [] 
           (trigger [] 
             (.setText result-text (.getText line-edit))))))&lt;/pre&gt;&lt;p&gt;And that's it, the first Jwt app written with Clojure is now running :-D&lt;/p&gt;&lt;p&gt;The code (that you'll find at the bottom of this page) is to be place in the file be/nsa/server.clj under your classpath, and can be loaded in a repl with&lt;/p&gt;&lt;pre&gt;(use 'be.nsa.server.clj)
&lt;/pre&gt;&lt;p&gt;You can then start and stop the server with:&lt;/p&gt;&lt;pre&gt;(compojure.server.jetty/start my-server)
(compojure.server.jetty/stop my-server)
&lt;/pre&gt;&lt;a name="eztoc2850_5" id="eztoc2850_5"&gt;&lt;/a&gt;&lt;h2&gt;Macro&lt;/h2&gt;&lt;p&gt;Here is a macro greatly simplifying the creation of listeners:&lt;/p&gt;&lt;pre&gt;(defmacro create-listener [ args &amp;amp; body]
  (let [argsnum# (if (&amp;lt; 0 (count args)) (count args) &amp;quot;&amp;quot;) ]
  `(proxy [ ~(symbol (str &amp;quot;Signal&amp;quot; argsnum# &amp;quot;$Listener&amp;quot;)) ] []
          (trigger ~args ~@body))))&lt;/pre&gt;&lt;p&gt;It's really heloing development in our case, as the interface implemented will be determined based on the number of arguments we want trigger to have. So this call&lt;/p&gt;&lt;pre&gt;(create-listener [a1 a2] (do-stuff a1 a2))
&lt;/pre&gt;&lt;p&gt;will implemented the interface Signal2$Listener and this call&lt;/p&gt;&lt;pre&gt;(create-listener [] (do-stuff))
&lt;/pre&gt;&lt;p&gt;will implement Signal$Listener.&lt;/p&gt;&lt;p&gt;This macro is not usable in this state though, due to the &lt;a href="http://www.assembla.com/spaces/clojure/tickets/181-proxy-name-does-not-produce-unique-names" target="_self"&gt;Clojure bug&lt;/a&gt;
 describe above. To work around that bug, it is possible to add an argument to the macro, so say which dummy interface we want to implement:&lt;/p&gt;&lt;pre&gt;(defmacro create-listener [ interface args &amp;amp; body]
  (let [argsnum# (if (&amp;lt; 0 (count args)) (count args) &amp;quot;&amp;quot;) ]
  `(proxy [ ~(symbol (str &amp;quot;Signal&amp;quot; argsnum# &amp;quot;$Listener&amp;quot;)) ~interface ] []
       (trigger ~args ~@body))))&lt;/pre&gt;&lt;a name="eztoc2850_6" id="eztoc2850_6"&gt;&lt;/a&gt;&lt;h2&gt;The code&lt;/h2&gt;&lt;p&gt;This code is compatible with Clojure 1.0. See below for updates...&lt;/p&gt;&lt;pre&gt;(ns be.nsa.server
  (:use compojure))

(set! *warn-on-reflection* true)

(defmacro create-listener [ interface args &amp;amp; body]
  (let [argsnum# (if (&amp;lt; 0 (count args)) (count args) &amp;quot;&amp;quot;) ]
  `(proxy [ ~(symbol (str &amp;quot;Signal&amp;quot; argsnum# &amp;quot;$Listener&amp;quot;)) ~@interface ] []
         (trigger ~args ~@body))))

(import '(eu.webtoolkit.jwt WObject WApplication
                  WEnvironment WtServlet WText WPushButton 
                  WLineEdit WBreak Signal1 Signal1$Listener 
                  Signal Signal$Listener EventSignal))

(defn make-hello-app [env]
  (let [wapp (new WApplication env)
        root (.getRoot wapp)
        line-edit (WLineEdit.)
        result-text (WText. &amp;quot;&amp;quot;)
       ]
    (.setTitle wapp &amp;quot;HelloWorld&amp;quot;)
    (.addWidget root (WText. &amp;quot;Your name, please ? &amp;quot;))
    (.. (WPushButton. &amp;quot;Greet me&amp;quot; root) clicked 
          (addListener  
             wapp
             ( create-listener [] [mouse-event] 
               (.setText result-text (.getText line-edit)))))
   (.. line-edit enterPressed 
           (addListener 
               wapp  
             (create-listener [Runnable] [] 
               (.setText result-text (.getText line-edit)))))
    (.addWidget  root (WBreak.))
    (.addWidget  root line-edit)
    (.addWidget  root (WBreak.))
    (.addWidget  root result-text)
    wapp))

(def my-servlet
  (proxy [WtServlet] []
    (createApplication [env]
      (make-hello-app env))))


(defserver my-server {:port 8080} &amp;quot;/*&amp;quot; my-servlet  )
&lt;/pre&gt;&lt;a name="eztoc2850_7" id="eztoc2850_7"&gt;&lt;/a&gt;&lt;h2&gt;Update&lt;/h2&gt;&lt;p&gt;With the Clojure bug mentioned above gone, and removing the unecessary gensym as it is outside the escaped code, the macro can be written:&lt;/p&gt;&lt;pre&gt;(defmacro create-listener [ args &amp;amp; body]
  (let [argsnum (if (&amp;lt; 0 (count args)) (count args) &amp;quot;&amp;quot;) ]
  `(proxy [ ~(symbol (str &amp;quot;Signal&amp;quot; argsnum &amp;quot;$Listener&amp;quot;)) ] [] (trigger ~args ~@body))))
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/2PKpkwJ_EH0" height="1" width="1"/&gt;</description>
      <pubDate>Tue, 25 Aug 2009 12:05:58 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/Using-Jwt-yes-it-s-a-J-with-Clojure</feedburner:origLink></item>
    <item>
      <title>X window screencast recording script with ruby and ffmpeg</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/o_X1mb8Ufwk/X-window-screencast-recording-script-with-ruby-and-ffmpeg</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/X-window-screencast-recording-script-with-ruby-and-ffmpeg</guid>
      <description>&lt;p&gt;As I didn't find a satisfactory solution to record screencasts, I decided to write a small script tailored to my needs, which were:&lt;/p&gt;
&lt;ul&gt;

&lt;li&gt;stable solution, not crashing 50% of the time&lt;/li&gt;

&lt;li&gt;ability to select the window to record&lt;/li&gt;

&lt;li&gt;ability to pause and restart recording the same area of the desktop&lt;/li&gt;

&lt;li&gt;ability to record sound during the capture&lt;/li&gt;

&lt;li&gt;work with Free/Open Source Software&lt;/li&gt;

&lt;/ul&gt;
&lt;p&gt;That's not too much asked I guess.... Anyway, here's the solution: &lt;a href="/index.php/eng/Media/Files/screencaster.rb" target="_self"&gt;screencaster.rb&lt;/a&gt;
, a 55 line ruby script using ffmpeg. &lt;/p&gt;&lt;p&gt;When you start, it asks you to click on the window you want to record and what's the directory name (place in /tmp) in which to store the movie(s). It then starts right away recording that region of your desktop. In the terminal where you launched screencast.rb, type p followed by Enter to pause the recording. Then to restart recording, type n followed by Enter (it records each part in separate files). To quit, enter q+Enter.&lt;/p&gt;&lt;p&gt;I've used it to record a screencast, and it worked flawlessly. To produce the final file, I used .&lt;a href="http://www.kdenlive.org/" target="_self"&gt;Kdenlive&lt;/a&gt;
&lt;/p&gt;&lt;p&gt;Note: in addition to ffmpeg, it also depends on xwininfo&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/o_X1mb8Ufwk" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 03 Jun 2009 14:15:24 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/X-window-screencast-recording-script-with-ruby-and-ffmpeg</feedburner:origLink></item>
    <item>
      <title>Website launched</title>
      <link>http://feedproxy.google.com/~r/Nsa-be-Blog/~3/k9Z9F7sr3bI/Website-launched</link>
      <guid isPermaLink="false">http://www.nsa.be/index.php/Blog/Website-launched</guid>
      <description>&lt;p&gt;My professional website is finally launched. Until now, I didn't have a presence on the internet to present my activities which is a pitty for someone providing internet-related services.&lt;/p&gt;&lt;p&gt;I expect to post rather technical content on this blog, and mostly in english. Although I'll take care to have the content of the website available in english, french and dutch, translating all blog posts in those languages would be too time-consuming I'm afraid....&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/Nsa-be-Blog/~4/k9Z9F7sr3bI" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 22 Apr 2009 07:04:34 GMT</pubDate>
    <feedburner:origLink>http://www.nsa.be/index.php/Blog/Website-launched</feedburner:origLink></item>
  </channel>
</rss>

