<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.7.6(BH)" -->
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>Planet Maemo: category &quot;feed:1a8c7792a527ecbb407ba5efbbdaf6d3&quot;</title>
        <description>Blog entries from Maemo community</description>
        <link>http://maemo.org/news/planet-maemo/</link>
        <lastBuildDate>Tue, 09 Jun 2026 02:50:18 +0000</lastBuildDate>
        <generator>FeedCreator 1.7.6(BH)</generator>
        <language>en</language>
        <managingEditor>planet@maemo.org</managingEditor>
        <item>
            <title>Curiosities about parameters and variable declarations in Javascript</title>
            <link>http://blogs.igalia.com/eocanha/?p=95</link>
            <description><![CDATA[
<div class="syntax">
<div class="html4strict" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;html&gt;</span></span></div>
</li>
<li class="li2">
<div class="de2"><span class="sc2"><span class="kw2">&lt;body&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="sc2"><span class="kw2">&lt;script</span> <span class="kw3">type</span>=<span class="st0">&quot;application/javascript;version=1.7&quot;</span><span class="kw2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">function f1(parameter) {</div>
</li>
<li class="li1">
<div class="de1">&nbsp;alert(parameter);</div>
</li>
<li class="li2">
<div class="de2">}</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">function f2(parameter) {</div>
</li>
<li class="li1">
<div class="de1">&nbsp;alert(parameter);</div>
</li>
<li class="li2">
<div class="de2">&nbsp;let parameter = &quot;value&quot;;</div>
</li>
<li class="li1">
<div class="de1">}</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">f1(&quot;hello&quot;);</div>
</li>
<li class="li2">
<div class="de2">f2(&quot;hello&quot;);</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="sc2"><span class="kw2">&lt;/script&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="sc2"><span class="kw2">&lt;/body&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;/html&gt;</span></span></div>
</li>
</ol>
</div>
</div>
<p>Continuing with the &#8220;Curiosities&#8221; serie, today I bring another one: Javascript doesn&#8217;t take too well the definition of a variable with the same name as a function parameter. If you do this, the parameter is lost.</p>
<p>Copy <a href="http://pastebin.com/f4708c14b">the code</a> to a local file and try it yourself&#8230; Surprisingly, the second alert will print &#8220;undefined&#8221;.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=3e49ad9c59a911dea4f08188ada615f715f7&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/3e49ad9c59a911dea4f08188ada615f715f7/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>8 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=3e49ad9c59a911dea4f08188ada615f715f7&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/3e49ad9c59a911dea4f08188ada615f715f7/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Enrique Ocaña González &lt;eocanha@igalia.com&gt;</author>
            <category>feed:1a8c7792a527ecbb407ba5efbbdaf6d3</category>
            <pubDate>Mon, 15 Jun 2009 12:21:25 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-3e49ad9c59a911dea4f08188ada615f715f7</guid>
        </item>
        <item>
            <title>Meiga 0.1.0 released</title>
            <link>http://blogs.igalia.com/eocanha/?p=90</link>
            <description><![CDATA[
<p>As presented on my <a href="http://blogs.igalia.com/eocanha/?p=89">last post</a>, I&#8217;ve been working in Meiga, a lightweight content sharing tool for the desktop.</p>
<p>What you could find these days in the git repository was a beta. I&#8217;ve been working last days in the final details and now it&#8217;s ready to be released. Here it is:</p>
<p><center><br />
<a href="http://meiga.igalia.com"><img src="http://meiga.igalia.com/img/meiga-banner.png" border="0"></a><br />
<a href="http://meiga.igalia.com">http://meiga.igalia.com</a><br />
</center></p>
<p>There you will find packages for Ubuntu <a href="http://meiga.igalia.com/packages/hardy/meiga_0.1.0-1_i386.deb">Hardy</a>, <a href="http://meiga.igalia.com/packages/intrepid/meiga_0.1.0-1_i386.deb">Intrepid</a> and <a href="http://meiga.igalia.com/packages/jaunty/meiga_0.1.0-1_i386.deb">Jaunty</a>, as well as a link to the <a href="http://git.igalia.com/cgi-bin/gitweb.cgi?p=meiga.git">source code</a>.</p>
<p>I hope you to enjoy it as much as I&#8217;ve enjoyed writing it. Of course, comments and improvement suggestions for next versions are welcome. <img src='http://blogs.igalia.com/eocanha/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<span class="net_nemein_favourites">6 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=bbf3efd2508f11dea6b4f5e720142b122b12&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/bbf3efd2508f11dea6b4f5e720142b122b12/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=bbf3efd2508f11dea6b4f5e720142b122b12&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/bbf3efd2508f11dea6b4f5e720142b122b12/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Enrique Ocaña González &lt;eocanha@igalia.com&gt;</author>
            <category>feed:1a8c7792a527ecbb407ba5efbbdaf6d3</category>
            <pubDate>Wed, 03 Jun 2009 22:32:34 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-bbf3efd2508f11dea6b4f5e720142b122b12</guid>
        </item>
        <item>
            <title>Meiga: lightweight content sharing from the desktop</title>
            <link>http://blogs.igalia.com/eocanha/?p=89</link>
            <description><![CDATA[
<p>No, this time I&#8217;m not going to talk about <a href="http://blogs.igalia.com/mario/2009/05/28/introducing-sergio-and-our-brand-new-office-at-the-same-time/">the</a> <a href="http://www.joaquimrocha.com/2009/05/27/igalias-new-office/">wonderful</a> <a href="http://blogs.igalia.com/jmunhoz/2009/05/27/the-new-igalias-office/">new</a> <a href="http://blogs.igalia.com/svillar/2009/05/27/igalias-new-office-party/">Igalia</a> <a href="http://picasaweb.google.com/eocanha/IgaliaNewOfficeOpeningParty">office</a> <a href="http://www.flickr.com/photos/mariosp/sets/72157618742618759/">opening</a> <a href="http://www.flickr.com/photos/mariosp/sets/72157618769128971/">party</a>, nor about the Igalia summit that we&#8217;re going to have this weekend in a hotel near Santiago de Compostela. This time I&#8217;m going to talk about a new free software project I&#8217;ve been working on to take advantage of the paid hackfest ours that our company provides us. Ladies and gentlemen, I&#8217;m proud to present the Meiga project to you.</p>
<p>As all of you already know, the current trend in the Internet is to publish contents in centralized servers to be shared to other people. Nevertheless, sometimes it&#8217;s handy for users to be able to serve their own contents directly from their desktops in a convenient way (instead of using a pendrive, for instance). Why bothering about publishing your contents if you can share them directly from your desktop to the LAN or even to the whole Internet?</p>
<p>To satisfy this need we&#8217;ve created Meiga, a tool that makes possible to share selected local directories via web. But that&#8217;s only the beginning. In fact, the ultimate goal of the project is to serve as a common publishing point for other desktop applications, such as the file manager, picture viewers or music players.</p>
<p><img src="http://people.igalia.com/eocanha/media/wordpress/meiga1.png" align="center"></p>
<p>Meiga is lightweight, easy to use, network friendly and also application friendly. It&#8217;s written in a mix of Vala and pure C code, using existing Gnome technologies to perform its tasks: libsoup is used as a simpler alternative to fat web servers, libgupnp is in charge of doing port redirections if the network router supports UPnP, and DBUS exposes a public API to allow the GUI and third party applications to control what is served. Some advanced publishing features are already implemented, like the feed server that can render an RSS view of a given directory.</p>
<p>From the educational point of view, the source code of this project is a live example of Vala technology usage: pure Vala programming, different alternatives to interface Vala with pure C code (using Vapi files or running a child executable program) or the usage of a &#8220;programmable context&#8221; to handle sequentiation of asynchronous operations. An autotools based build system completes the set of interesting features. This system uses a Vapi file to pass configuration parameters from the config.h to the Vala program. Finally, some additional rule files allow the building of a Debian package, the last step to make the program available to final users in a convenient way.</p>
<p>Meiga is free software. It&#8217;s released under GPL 2.0 and can be downloaded just typing:</p>
<p><code>git clone http://git.igalia.com/meiga.git</code></p>
<span class="net_nemein_favourites">5 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=35964e0a4ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/35964e0a4ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=35964e0a4ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/35964e0a4ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Enrique Ocaña González &lt;eocanha@igalia.com&gt;</author>
            <category>feed:1a8c7792a527ecbb407ba5efbbdaf6d3</category>
            <pubDate>Fri, 29 May 2009 00:05:56 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-35964e0a4ecb11deb4bc2f2fcc29832e832e</guid>
        </item>
        <item>
            <title>Curiosities about using closures in loops in Javascript</title>
            <link>http://blogs.igalia.com/eocanha/?p=88</link>
            <description><![CDATA[
<p>Just execute <a href="http://pastebin.com/f42abcbbd">this code</a> in your browser and find the ten differences between the two loops:</p>
<div class="javascript" style="font-family: monospace;">
<ol>
<li class="li1">
<div class="de1">&lt;html&gt;</div>
</li>
<li class="li2">
<div class="de2">&lt;body&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;script type=<span class="st0">&quot;application/javascript;version=1.7&quot;</span>&gt;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">let funs = <span class="br0">&#123;</span><span class="br0">&#125;</span>;</div>
</li>
<li class="li2">
<div class="de2">let msg = <span class="st0">&quot;&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">for</span> <span class="br0">&#40;</span>let i = <span class="nu0">0</span>; i &lt; <span class="nu0">10</span>; i++<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; funs<span class="br0">&#91;</span>i<span class="br0">&#93;</span> = <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; msg += <span class="st0">&quot;i = &quot;</span> + i + <span class="st0">&quot;<span class="es0">\n</span>&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">for</span> <span class="br0">&#40;</span>let i = <span class="nu0">0</span>; i &lt; <span class="nu0">10</span>; i++<span class="br0">&#41;</span> funs<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">&quot;Without redeclaration: <span class="es0">\n</span>&quot;</span>+msg<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">msg = <span class="st0">&quot;&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">for</span> <span class="br0">&#40;</span>let i = <span class="nu0">0</span>; i &lt; <span class="nu0">10</span>; i++<span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; let idx = i;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; funs<span class="br0">&#91;</span>i<span class="br0">&#93;</span> = <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; msg += <span class="st0">&quot;i = &quot;</span> + idx + <span class="st0">&quot;<span class="es0">\n</span>&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw1">for</span> <span class="br0">&#40;</span>let i = <span class="nu0">0</span>; i &lt; <span class="nu0">10</span>; i++<span class="br0">&#41;</span> funs<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2"><span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">&quot;With redeclaration: <span class="es0">\n</span>&quot;</span>+msg<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">&lt;/script&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;/body&gt;</div>
</li>
<li class="li2">
<div class="de2">&lt;/html&gt;</div>
</li>
</ol>
</div>
<p>As you can see, the i variable works as if it was declared outside the loop, so it&#8217;s reused inside it. Thus, if you use it inside a closure, all the closures share the same reference and can see the changes produced during the iterations.</p>
<p>However, in the second loop a new fresh local variable is defined for each iterations, so the values aren&#8217;t shared among the closures.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=35197a1a4ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/35197a1a4ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=35197a1a4ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/35197a1a4ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Enrique Ocaña González &lt;eocanha@igalia.com&gt;</author>
            <category>feed:1a8c7792a527ecbb407ba5efbbdaf6d3</category>
            <pubDate>Thu, 02 Apr 2009 11:08:04 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-35197a1a4ecb11deb4bc2f2fcc29832e832e</guid>
        </item>
        <item>
            <title>Shell Scripting notes</title>
            <link>http://blogs.igalia.com/eocanha/?p=86</link>
            <description><![CDATA[
<p>Eight years ago, back in 2000, I was decided to learn shell scripting. I found the <a href="http://sayle.net/book/">Bourne Shell Programming book by Robert P. Sayle</a> a very good way to start, so I began my way through it, reading the concepts, making the exercises and taking advantage the opportunity to write a sort of personal notes (in Spanish) using <a href="http://www.lyx.org/">LyX</a> (a text processor I liked very much at the moment).</p>
<p>Some time later I submitted the notes to the <a href="http://gpul.org">GPUL</a> mailing list and they were posted at the <a href="http://old.gpul.org/actividades/grupos_investig.html">research groups page</a>. Unfortunately, there&#8217;s no way to access the notes from there, because a disk failure and the website revamping got them lost. It&#8217;s a pity, because not even the <a href="http://www.archive.org">Internet Archive</a> preserves a copy of them.</p>
<p>Those notes have a symbolic value for me. They served as a basis for later bash scripting courses I taught and, after many changes and adaptations, are still the main inspiration for the <a href="http://people.igalia.com/eocanha/mswl2008/sifsw_admin_scripting_2008.pdf">shell scripting slides</a> used in the <a href="http://www.mastersoftwarelibre.com/">Caixanova Free Software Master</a>.</p>
<p>For that reason, today I did a bit of computer archaeology and searched through my old backups until I found it. Now that this material is back, I want to share it with all of you:</p>
<ul>
<li>Shell Scripting notes (PDF version): <a href="http://people.igalia.com/eocanha/media/wordpress/bash.pdf">bash.pdf</a></li>
<li>Shell Scripting notes (archive with LyX, tex, ps and HTML versions): <a href="http://people.igalia.com/eocanha/media/wordpress/articulo_scripting.tgz">articulo_scripting.tgz</a></li>
</ul>
<p>Enjoy it!</p>
<p><br/><br />
<br/></p>
<p><b>Spanish version / versión en español:</b></p>
<p>Hace ocho años, allá por el 2000, me decidí a aprender shell scripting. Descubrí que <a href="http://sayle.net/book/">el libro Bourne Shell Programming de Robert P. Sayle</a> era una muy buena forma de empezar, así que inicié mi camino a través de él, leyendo los conceptos, haciendo ejercicios y aprovechando la oportunidad para escribir una especie notas personales (en español) usando <a href="http://www.lyx.org/">LyX</a> (un procesador de textos que me gustaba mucho en aquel momento).</p>
<p>Algún tiempo después envié las notas a la lista de correo de <a href="http://gpul.org">GPUL</a> y fueron publicadas en la <a href="http://old.gpul.org/actividades/grupos_investig.html">página de grupos de investigación</a>. Por desgracia, no hay forma de acceder a las notas desde allí, porque un fallo de disco y la remodelación del sitio web hicieron que se perdieran. Es una pena, porque ni siquiera el <a href="http://www.archive.org">Internet Archive</a> guarda una copia de ellas.</p>
<p>Esas notas tienen un valor simbólico para mi. Sirvieron como base para cursos posteriores de scripting bash que impartí y, tras muchos cambios y adaptaciones, son aún la inspiración principal para las <a href="http://people.igalia.com/eocanha/mswl2008/sifsw_admin_scripting_2008.pdf">transparencias de shell scripting</a> usadas en el <a href="http://www.mastersoftwarelibre.com/">Master de Software Libre de Caixanova</a>.</p>
<p>Por esa razón, hoy hice un poco de arqueología informática y estuve buscando en mis viejos backups hasta que lo encontré. Ahora que este material ha reaparecido, quiero compartirlo con todos vosotros:</p>
<ul>
<li>Notas sobre Shell Scripting (versión PDF): <a href="http://people.igalia.com/eocanha/media/wordpress/bash.pdf">bash.pdf</a></li>
<li>Notas sobre Shell Scripting (archivo con versiones LyX, tex, ps y HTML): <a href="http://people.igalia.com/eocanha/media/wordpress/articulo_scripting.tgz">articulo_scripting.tgz</a></li>
</ul>
<p>Disfrutadlo!</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=345c9d144ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/345c9d144ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=345c9d144ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/345c9d144ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Enrique Ocaña González &lt;eocanha@igalia.com&gt;</author>
            <category>feed:1a8c7792a527ecbb407ba5efbbdaf6d3</category>
            <pubDate>Fri, 07 Nov 2008 16:49:37 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-345c9d144ecb11deb4bc2f2fcc29832e832e</guid>
        </item>
        <item>
            <title>How to interact with an SVG image from an HTML document</title>
            <link>http://blogs.igalia.com/eocanha/?p=84</link>
            <description><![CDATA[
<p>Did you know that modern browsers already implement builtin support to visualize SVG drawings? And that you can make changes on them from the HTML document and make changes into the document from the SVG? In this post I&#8217;m going to explain all that through a simple example.</p>
<p>To create the SVG document you can use <a href="http://www.inkscape.org">Inkscape</a>. This program has a nice feature that allows you to edit attributes of particular nodes. For instance, you can select such a node, open the XML editor (Edit &#8211;> XML Editor&#8230;) and add a new attribute <code>onclick</code> to the node with the value:</p>
<pre>
javascript:window.parent.document.form1.bodypart.value='head';
</pre>
<p>When you&#8217;ve finished, just save the document as &#8220;plain SVG&#8221; to prevent compatibility problems.</p>
<p>Let&#8217;s go to the HTML part now. The easiest way to show the SVG in the document is by using an &#8220;embed&#8221; tag:</p>
<blockquote>
<pre>
&lt;html&gt;
&lt;body&gt;

&lt;h1&gt;Anatomy of a smiley&lt;/h1&gt;

&lt;form name="form1"&gt;
Body part: &lt;input type="text" name="bodypart" /&gt; &lt;br/&gt;
&lt;/form&gt;

&lt;embed id="smiley" src="smiley.svg" width="745" height="1053" /&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
</blockquote>
<p>But that&#8217;s not enough. If you want to  change SVG attributes using javascript, just add this code:</p>
<blockquote>
<pre>
&lt;script type="text/javascript"&gt;
   function changeColor(color) {
   var path=document.getElementById("smiley")
      .getSVGDocument()
      .getElementById("path2383");
   path.style.setProperty("fill",color, "");
   }
&lt;/script&gt;

[...]

Color: &lt;input type="text" name="color" value="#FFFF00" /&gt; &lt;br/&gt;

&lt;input type="button" value="Change color"
 onclick="javascript:changeColor(this.form.color.value);"/&gt; &lt;br/&gt;
</pre>
</blockquote>
<p>And that&#8217;s all. Now you have bidirectional knowledge between your HTML document and your SVG document. <a href="http://people.igalia.com/eocanha/media/wordpress/test.html">Take a look here to see the whole example</a>.</p>
<p>There are still pending issues, like embedding the SVG code as part of the HTML source. That can be done including the proper DTDs and making sure that the document is interpreted as XHTML (that&#8217;s the most important think). <a href="http://people.igalia.com/eocanha/media/wordpress/test_inline.xhtml">Here is a modified version of the previous example to illustrate that</a>, but I hadn&#8217;t been able to resolve nodes using this kind of embedded drawings.</p>
<p><a href="http://people.igalia.com/eocanha/media/wordpress/smiley_svg.png"><img src="http://people.igalia.com/eocanha/media/wordpress/smiley_svg_thumb.png" border="0"/></a></p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=33640eb04ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/33640eb04ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=33640eb04ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/33640eb04ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Enrique Ocaña González &lt;eocanha@igalia.com&gt;</author>
            <category>feed:1a8c7792a527ecbb407ba5efbbdaf6d3</category>
            <pubDate>Mon, 03 Nov 2008 16:30:40 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-33640eb04ecb11deb4bc2f2fcc29832e832e</guid>
        </item>
        <item>
            <title>Basic commands and scripting class at Free Software Master</title>
            <link>http://blogs.igalia.com/eocanha/?p=83</link>
            <description><![CDATA[
<p>This weekend I&#8217;ve taught the first sessions at Caixanova Free Software Master. It consisted of a brief introduction to basic command line tools and some concepts about shell scripting and regular expressions tools.</p>
<p>All the course slides are licensed under a Creative Commons license. Until we finish to set up the course collaborative platform, the slides and exercises will be available <a href="http://people.igalia.com/eocanha/mswl2008">in my personal web page</a>. I&#8217;ll update this link when a final destination for those materials is found.</p>
<p>In addition, Ive compiled some interesting links related to the subject, which can be found in <a href="http://delicious.com/eocanha/mswl">this dedicated Delicious section</a>.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=32e6211c4ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/32e6211c4ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=32e6211c4ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/32e6211c4ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Enrique Ocaña González &lt;eocanha@igalia.com&gt;</author>
            <category>feed:1a8c7792a527ecbb407ba5efbbdaf6d3</category>
            <pubDate>Sun, 26 Oct 2008 11:51:40 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-32e6211c4ecb11deb4bc2f2fcc29832e832e</guid>
        </item>
        <item>
            <title>Slides of Master on Free Software</title>
            <link>http://blogs.igalia.com/eocanha/?p=81</link>
            <description><![CDATA[
<p>A quick tip I&#8217;ve recalled today about: The slides written for all the subjects of the Free Software Master were released under a free license and are currently published. You can find them at this URL:</p>
<p><a href="http://www.slideshare.net/tag/freeswmaster">http://www.slideshare.net/tag/freeswmaster</a></p>
<p>A lot of useful information set free. Just have a look and&#8230; who knows, maybe you learn something new there.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=32517f304ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/32517f304ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=32517f304ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/32517f304ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Enrique Ocaña González &lt;eocanha@igalia.com&gt;</author>
            <category>feed:1a8c7792a527ecbb407ba5efbbdaf6d3</category>
            <pubDate>Tue, 16 Sep 2008 11:08:54 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-32517f304ecb11deb4bc2f2fcc29832e832e</guid>
        </item>
        <item>
            <title>Pam_preprofile 1.1, a swiss army knife for PAM</title>
            <link>http://blogs.igalia.com/eocanha/?p=80</link>
            <description><![CDATA[
<p>Pam preprofile is a PAM module that ensures that some program or script is run each time a user logs into the computer. It&#8217;s suited for network administrators when they can&#8217;t rely on a particular shell to execute the user&#8217;s .profile, .bash_profile, .bashrc or similar&#8230; because sometimes the user home directory doesn&#8217;t even exist yet.</p>
<p>There are already many PAM modules out there, each one suited to a particular need (mounting shares, creating tmp dirs, etc.), but the real advantage of pam_preprofile is its versatility. Pam_preprofile can be used to satisfy any need not being implemented by any existing PAM module at this time but which can be written as a script by the system admin.</p>
<p>The configuration is simple. Just install the module at /lib/security/ and add this line at the end of /etc/pam.d/common-session:</p>
<pre>
session required pam_preprofile.so /tmp/myprogram.sh /usr/doc
</pre>
<p>That will call /tmp/myprogram.sh every time the user starts a session (logs into the desktop), passing it a &#8220;/usr/doc&#8221; parameter, plus an extra parameter with the username being authenticated.</p>
<p>In the previous version of the module, the script was executed always at the session stage. It was very helpful to create the user account. But some weeks ago, a network administrator presented me a scenario where he needed to execute the script each time the system asked the user for a password (that is, at &#8220;auth&#8221; stage), because the user info could have been updated meanwhile and some local configuration should be updated based on that.</p>
<p>I then improved the module and the new 1.1 version is out. It allow scripts to be executed in the PAM stage you want (account, auth, password and session), not only at the &#8220;session&#8221; stage allowed by the previous version.</p>
<p>Are you a network administrator? You can download it from:</p>
<p><a href="http://community.igalia.com/twiki/bin/view/Corunix/ProjectDownloadStable">http://community.igalia.com/twiki/bin/view/Corunix/ProjectDownloadStable</a></p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=31ceb4924ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/31ceb4924ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=31ceb4924ecb11deb4bc2f2fcc29832e832e&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/31ceb4924ecb11deb4bc2f2fcc29832e832e/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Enrique Ocaña González &lt;eocanha@igalia.com&gt;</author>
            <category>feed:1a8c7792a527ecbb407ba5efbbdaf6d3</category>
            <pubDate>Mon, 07 Jul 2008 16:29:04 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-31ceb4924ecb11deb4bc2f2fcc29832e832e</guid>
        </item>
    </channel>
</rss>
