<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title><![CDATA[Clément Delafargue]]></title>
	<description><![CDATA[Flux RSS des articles]]></description>
	<pubDate>Sun, 05 Feb 2012 19:32:40 +0100</pubDate>
	<link>http://www.divarvel.fr</link>
	<language>fr</language>
	<generator>http://www.eklablog.com</generator>
	
	<item>
		<title><![CDATA[Retour des RMLL]]></title>
		<link>http://www.divarvel.fr/retour-des-rmll-a4420120</link>
		<description><![CDATA[Du 9 au 14 juillet avaient lieu les douzi&egrave;mes Rencontres Mondiales du Logiciel Libre. L'occasion de rencontrer tout un tas de libristes et de contributeurs dans une ambiance sympa et d&eacute;tendue. Des conf&eacute;rences et des keynotes tr&egrave;s int&eacute;ressantes r&eacute;alis&eacute;es par (entre autres) Richard M. Stallman...]]></description>
		<content:encoded><![CDATA[<p>Du 9 au 14 juillet avaient lieu les douzi&egrave;mes Rencontres Mondiales du Logiciel Libre. L'occasion de rencontrer tout un tas de libristes et de contributeurs dans une ambiance sympa et d&eacute;tendue. Des conf&eacute;rences et des <em>keynotes</em> tr&egrave;s int&eacute;ressantes r&eacute;alis&eacute;es par (entre autres) Richard M. Stallman et Benjamin Bayart.</p>
<p>Ces RMLL ont &eacute;t&eacute; l'occasion de pr&eacute;senter notre retour d'exp&eacute;rience sur diff&eacute;rents projets libres men&eacute;s &agrave; l'<a href="http://www.ec-nantes.fr">&Eacute;cole Centrale de Nantes</a>. Avec <a href="http://www.irccyn.ec-nantes.fr/~magnin/">Morgan Magnin</a>, <a href="http://www.bvialle.eu">Benjamin Vialle</a> et Nelle Varoquaux, nous avons eu la chance de faire trois conf&eacute;rences autour de <a href="http://www.markusproject.org">MarkUs</a>, l'application de correction de TP, et d'OpenOffice.org.</p>
<p>Les supports de ces pr&eacute;sentations, ainsi que de plus amples explications sont disponibles dans la suite de l'article.</p><br /><br /><a href="http://www.divarvel.fr/retour-des-rmll-a4420120">Lire la suite...</a><br /><br />]]></content:encoded>
		<pubDate>Fri, 15 Jul 2011 21:17:22 +0200</pubDate>
		<guid isPermaLink="true">http://www.divarvel.fr/retour-des-rmll-a4420120</guid>
		<dc:creator>divarvel</dc:creator>
		<dc:date>2011-07-15T21:17:22+02:00</dc:date>
	</item>
	<item>
		<title><![CDATA[Tab Candy: They're (poorly) reinventing the Wheel]]></title>
		<link>http://www.divarvel.fr/tab-candy-they-re-poorly-reinventing-the-wheel-a1482303</link>
		<description><![CDATA[It's a fact, more and more applications are web-based, and the tabbed browsing shows its limits. Tabs are now like real applications and need to be managed more precisely and with less hassle. That's why the firefox folks created Tab Candy. This is stupid. There are tons of good window managers out...]]></description>
		<content:encoded><![CDATA[<p>It's a fact, more and more applications are web-based, and the tabbed browsing shows its limits. Tabs are now like real applications and need to be managed more precisely and with less hassle. That's why the firefox folks created Tab Candy.</p>
<p>This is stupid. There are tons of good window managers out there. Why do anybody need to spend time on reinventing one, which won't be as good as existing ones, in addition to create a strong separation between web apps and the regular ones ?</p>
<p>If you want to have several groups of tabs, use several windows. If you want to have a quick access to a web app, give it its own window (with uzbl or jumanji for instance). This way, all your applications (web or regular) behave consistently, and you can use the full power of your WM instead of beeing forced to use a stoneage WM inside your browser.</p>
<p>Problem solved.</p><br /><br />]]></content:encoded>
		<pubDate>Thu, 29 Jul 2010 08:09:16 +0200</pubDate>
		<guid isPermaLink="true">http://www.divarvel.fr/tab-candy-they-re-poorly-reinventing-the-wheel-a1482303</guid>
		<dc:creator>divarvel</dc:creator>
		<dc:date>2010-07-29T08:09:16+02:00</dc:date>
	</item>
	<item>
		<title><![CDATA[Environnement de développement Android - Sans Eclipse]]></title>
		<link>http://www.divarvel.fr/environnement-de-developpement-android-sans-eclipse-a1291837</link>
		<description><![CDATA[Je viens de faire l'acquisisition d'un Nexus One (j'&eacute;tais lass&eacute; des restrictions &agrave; la Apple ), et bien &eacute;videmment la premi&egrave;re envie que j'ai c'est de d&eacute;velopper des applis Android pour faire un peu joujou avec la b&ecirc;te. J'ai trouv&eacute; pas mal de ressources pour d&eacute;buter, mais toute ont pour...]]></description>
		<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/toasty/3538820892/"><img style="float: left; padding-right: 5px;" src="http://data0.eklablog.com/divarvel/mod_article1291837_1.jpg?3561" alt="Android"/></a></p>
<p>Je viens de faire l'acquisisition d'un <strong>Nexus One</strong> (j'&eacute;tais lass&eacute; des <a href="http://www.divarvel.fr/iphone-ou-l-emprisonnement-numerique-a324755">restrictions &agrave; la Apple</a>), et bien &eacute;videmment la premi&egrave;re envie que j'ai c'est de d&eacute;velopper des applis Android pour faire un peu joujou avec la b&ecirc;te.</p>
<p>J'ai trouv&eacute; pas mal de ressources pour d&eacute;buter, mais toute ont pour point commun l'installation d'un CPU / Memory Hog : le tristement c&eacute;l&egrave;bre Eclipse.</p>
<p>Voici donc une petite compilation de ce que j'ai pu trouver pour <strong>d&eacute;ployer et utiliser un environnement de d&eacute;veloppement Android</strong> sous Ubuntu (#<em>Insert troll here</em>#), <strong>qui ne fasse pas appel &agrave; Eclipse</strong>.</p><br /><br /><a href="http://www.divarvel.fr/environnement-de-developpement-android-sans-eclipse-a1291837">Lire la suite...</a><br /><br />]]></content:encoded>
		<pubDate>Mon, 31 May 2010 19:59:17 +0200</pubDate>
		<guid isPermaLink="true">http://www.divarvel.fr/environnement-de-developpement-android-sans-eclipse-a1291837</guid>
		<dc:creator>divarvel</dc:creator>
		<dc:date>2010-05-31T19:59:17+02:00</dc:date>
	</item>
	<item>
		<title><![CDATA[MPD + Quelques tweaks sous Ubuntu]]></title>
		<link>http://www.divarvel.fr/mpd-quelques-tweaks-sous-ubuntu-a1197124</link>
		<description><![CDATA[MPD est, comme son nom s'indique, un daemon qui lit de la musique. L'int&eacute;r&ecirc;t, est que la partie qui lit la musique est d&eacute;coupl&eacute;e de l'IHM qui permet de g&eacute;rer &ccedil;a.

Cette structure apporte plusieurs avantages :
 L&eacute;g&egrave;ret&eacute; (pas besoin d'occuper des ressources en permanence pour l'interface)...]]></description>
		<content:encoded><![CDATA[<abbr title="Media Player Daemon">MPD</abbr> est, comme son nom s'indique, un daemon qui lit de la musique. L'int&eacute;r&ecirc;t, est que la partie qui lit la musique est <strong>d&eacute;coupl&eacute;e</strong> de l'IHM qui permet de g&eacute;rer &ccedil;a.<br /><br />Cette structure apporte plusieurs avantages :<br /> 
<ul>
<li><strong>L&eacute;g&egrave;ret&eacute;</strong> (pas besoin d'occuper des ressources en permanence pour l'interface)</li>
</ul>
<ul>
<li><strong>Choix</strong> du nombre d'interfaces (il y en a vraiment pour tous les go&ucirc;ts, du <a href="http://linux.die.net/man/1/mpc">plus simple</a> au <a href="http://sonata.berlios.de/">plus sophistiqu&eacute;</a>, en passant par le <a href="http://unkart.ovh.org/ncmpcpp/">sobre et efficace</a>)</li>
</ul>
<ul>
<li>Possibilit&eacute; de commander <strong>par le r&eacute;seau</strong></li>
<li><strong>Interfa&ccedil;age rapide</strong> avec tout et n'importe quoi (<a href="http://www.divarvel.fr/un-peu-de-conky-a513079">conky</a>, par exemple)</li>
</ul>
J'ai donc install&eacute; et configur&eacute; <abbr title="Media Player Daemon">MPD</abbr>. (&Agrave; l'aide de la doc d'ubuntu-fr).<br /><br />J'ai eu ensuite &agrave; faire quelques petits tweaks pour int&eacute;grer &ccedil;a correctement &agrave; mon syst&egrave;me.<br />
<h3>Touches multim&eacute;dia</h3>
Comme <abbr title="Media Player Daemon">MPD</abbr> tourne en t&acirc;che de fond, si aucune interface n'est lanc&eacute;e, les touches multim&eacute;dia ne seront pas g&eacute;r&eacute;es.<br />Le plus simple est d'utiliser mpc, qui permet d'envoyer des commandes &agrave; <abbr title="Media Player Daemon">MPD</abbr>.<br />J'ai ainsi associ&eacute; la commande mpc toggle &agrave; la touche <em>XF86Play</em>, mpc stop &agrave; la touche <em>XF86Stop</em>, et ainsi de suite.<br /><br />Pour le fun, j'ai fait un petit script qui permet d'afficher les informations sur le morceau en cours &agrave; l'aide de libnotify.<br /><br /><div class="code"><span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
DISPLAY<span style="color: #339933;">=:</span><span style="color: #cc66cc;">0</span><br />
notify<span style="color: #339933;">-</span>send <span style="color: #0000ff;">&quot;`mpc --format &quot;</span><span style="color: #339933;">%</span>title<span style="color: #339933;">%</span><span style="color: #0000ff;">&quot;|head -n1`&quot;</span> <span style="color: #0000ff;">&quot;`mpc --format &quot;</span><span style="color: #339933;">%</span>artist<span style="color: #339933;">%</span> <span style="color: #339933;">-</span> <span style="color: #339933;">%</span>album<span style="color: #339933;">%</span><span style="color: #0000ff;">&quot;| head -n1`&quot;</span><div style="display:none;">[code=php]<br />#!/bin/sh<br />DISPLAY=:0<br />notify-send "`mpc --format "%title%"|head -n1`" "`mpc --format "%artist% - %album%"| head -n1`"<br />[/code]</div></div><br /><br />Rien de bien m&eacute;chant, mais &ccedil;a peut &ecirc;tre utile quand on veut savoir le nom du morceau en cours sans perdre trop de temps.<br /><br />
<h3>Scrobbling</h3>
Les clients <abbr title="Media Player Daemon">MPD</abbr> sophistiqu&eacute;s g&egrave;rent le scrobbling, mais, comme je l'ai dit, on n'a pas besoin d'avoir une interface en permanence.<br /><br />J'ai trouv&eacute; <a href="http://codingteam.net/project/scrobd">scrobd</a>, un petit script python qui permet de scrobbler sur libre.fm. (Saymieux que last.fm, et on a moins de risques de voir son nom refil&eacute; &agrave; la RIAA)<br /><br />&Eacute;tant donn&eacute; que tous les clients communiquent avec <abbr title="Media Player Daemon">MPD</abbr> par une interface TCP, il n'y a pas de difficult&eacute;s particuli&egrave;res pour que la musique soit jou&eacute;e sur un ordinateur distant, avec autant de facilit&eacute; que si c'&eacute;tait sur son propre PC.<br /><br />Pour plus d'informations :<br /> 
<ul>
<li><a href="http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki">Le Wiki de <abbr title="Media Player Daemon">MPD</abbr></a></li>
<li><a href="http://doc.ubuntu-fr.org/mpd">La page Ubuntu-fr d&eacute;di&eacute;e &agrave; <abbr title="Media Player Daemon">MPD</abbr></a></li>
</ul>
<br />Et merci &agrave; <a href="http://www.twitter.com/keruspe">@Keruspe</a> et <a href="http://www.twitter.com/efyx">@Efyx</a> pour m'avoir aid&eacute; &agrave; faire mes premiers pas avec <abbr title="Media Player Daemon">MPD</abbr><br /><br />]]></content:encoded>
		<pubDate>Thu, 29 Apr 2010 06:03:09 +0200</pubDate>
		<guid isPermaLink="true">http://www.divarvel.fr/mpd-quelques-tweaks-sous-ubuntu-a1197124</guid>
		<dc:creator>divarvel</dc:creator>
		<dc:date>2010-04-29T06:03:09+02:00</dc:date>
	</item>
	<item>
		<title><![CDATA[Passer de SVN à Git + Gitosis]]></title>
		<link>http://www.divarvel.fr/passer-de-svn-a-git-gitosis-a1008783</link>
		<description><![CDATA[J'ai r&eacute;cemment r&eacute;alis&eacute; la migration de tous les projets EklaWeb de Subversion vers Git.
 
 Si vous voulez savoir pourquoi, je vous conseille cet excellent article de Scott Chacon 
 Pour r&eacute;sumer, Git est plus rapide Git est plus puissant Git est plus flexible J'ai ainsi migr&eacute; 3 d&eacute;p&ocirc;ts SVN...]]></description>
		<content:encoded><![CDATA[<p><img style="float: left; padding-right: 5px;" src="http://data0.eklablog.com/divarvel/mod_article1008783_2.jpg?2447" alt="Git Logo"/>J'ai r&eacute;cemment r&eacute;alis&eacute; la migration de tous les projets EklaWeb de Subversion vers Git.<br/> <br/> Si vous voulez savoir pourquoi, je vous conseille cet <a hreflang="en" href="http://carsonified.com/blog/web-apps/why-you-should-switch-from-subversion-to-git/">excellent article de Scott Chacon</a><br/> Pour r&eacute;sumer,</p>
<ul>
<li>Git est plus rapide</li>
<li>Git est plus puissant</li>
<li>Git est plus flexible</li>
</ul>
<p>J'ai ainsi migr&eacute; 3 d&eacute;p&ocirc;ts SVN vers Git tr&egrave;s simplement</p><br /><br /><a href="http://www.divarvel.fr/passer-de-svn-a-git-gitosis-a1008783">Lire la suite...</a><br /><br />]]></content:encoded>
		<pubDate>Fri, 12 Feb 2010 21:39:01 +0100</pubDate>
		<guid isPermaLink="true">http://www.divarvel.fr/passer-de-svn-a-git-gitosis-a1008783</guid>
		<dc:creator>divarvel</dc:creator>
		<dc:date>2010-02-12T21:39:01+01:00</dc:date>
	</item>
	<item>
		<title><![CDATA[Un petit script pour faire du Benchmark]]></title>
		<link>http://www.divarvel.fr/un-petit-script-pour-faire-du-benchmark-a513093</link>
		<description><![CDATA[Dans le cadre d'un travail demand&eacute; en cours de Th&eacute;orie des Graphes, je devais regarder l' &eacute;volution du temps d'ex&eacute;cution d'un programme en fonction d'un param&egrave;tre. (Pour les curieux, c'est la k-Coloration d'un Graphe &agrave; n Sommets)

Je me suis bricol&eacute; un petit script qui fait &ccedil;a tout seul,...]]></description>
		<content:encoded><![CDATA[<img style="float: left; padding-right: 5px;" src="http://data0.eklablog.com/divarvel/mod_article513093_4.png" alt="Un petit script pour faire du Benchmark" width="500"/>Dans le cadre d'un travail demand&eacute; en cours de Th&eacute;orie des Graphes, je devais regarder l'<strong>&eacute;volution du temps d'ex&eacute;cution d'un programme</strong> en fonction d'un param&egrave;tre. (Pour les curieux, c'est la k-Coloration d'un Graphe &agrave; n Sommets)<br /><br />Je me suis bricol&eacute; un petit script qui fait &ccedil;a tout seul, et g&eacute;n&egrave;re un graphe (via l'excellent <a href="http://www.gnuplot.info/">GnuPlot</a>) (ou affiche les temps d'ex&eacute;cution)<br /><br />C'est la premi&egrave;re fois que je fais un vrai script en Bash (<em>ie</em> un script qui n'est pas 3 commandes mises &agrave; la suite), du coup, pour la structure, je me suis inspir&eacute; d'un petit script de <a href="http://p4bl0.net/">P4bl0</a>.<br /><br />Le nom du programme &agrave; tester est <em>hard coded</em>, mais ce n'est pas tr&egrave;s dur &agrave; modifier.<br /><br />N'h&eacute;sitez pas &agrave; vous en servir si &ccedil;a vous est utile ;-), de m&ecirc;me que toutes les critiques sont les bienvenues (je n'y connais pas grand chose (pour ne pas dire que dalle) en scripts Bash)<br /><br />L'usage, c'est $[...]:~&gt; <strong>./bench.sh [-i n] p n1 n2 itv graphe.png</strong><br /><em><strong>n1</strong></em> <em>valeur de d&eacute;part</em> du param&egrave;tre<br /><strong><em>n2</em></strong><em> valeur finale</em> du param&egrave;tre<br /><strong><em>itv</em></strong> <em>variation du param&egrave;tre</em> &agrave; chaque pas<br /><strong><em>graphe.png</em></strong> nom du fichier g&eacute;n&eacute;r&eacute;<br />Pour le<strong> -i n</strong>, n est le nombre d'ex&eacute;cutions du programme pour chaque point (par d&eacute;faut, 10)<br /><br /><div class="code"><span style="color: #666666; font-style: italic;">#!/bin/sh</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;$1&quot;</span> = <span style="color: #ff0000;">&quot;-i&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span><br />
  <span style="color: #007800;">ITER</span>=<span style="color: #ff0000;">&quot;$2&quot;</span><br />
  <span style="color: #7a0874; font-weight: bold;">shift</span><br />
  <span style="color: #7a0874; font-weight: bold;">shift</span><br />
<span style="color: #000000; font-weight: bold;">else</span><br />
  <span style="color: #007800;">ITER</span>=<span style="color: #ff0000;">&quot;10&quot;</span><br />
<span style="color: #000000; font-weight: bold;">fi</span><br />
<br />
_bench_usage<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
  <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #cc0000; font-style: italic;">&lt;&lt;USAGE<br />
Usage: bench disp n1 n2 interval : Affiche le temps pris pour traiter des graphes de n sommets, n variant de n1 à n2 par pas de interval.<br />
       bench plot n1 n2 interval file: Crée le fichier file, un graphique PNG affichant le temps pris pour traiter des graphes de n sommets,<br />
                                   n variant de n1 à n2 par pas de interval.<br />
       bench help: Affiche cette page d'aide.<br />
  La première lettre de chaque commande peut être utilisée<br />
  Le flag -i permet de spécifier combien de fois un graphe à n sommets doit être calculé.<br />
  Valeur par défaut : 10<br />
USAGE</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<br />
_bench_disp<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
  <span style="color: #007800;">i</span>=$<span style="color: #000000;">1</span><br />
  <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$i</span> <span style="color: #660033;">-le</span> $<span style="color: #000000;">2</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span><br />
    <span style="color: #007800;">START</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
    _bench_run<br />
    <span style="color: #007800;">STOP</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Graphe à&quot;</span> <span style="color: #007800;">$i</span> <span style="color: #ff0000;">&quot;sommets :&quot;</span> $<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$STOP</span>-<span style="color: #007800;">$START</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #ff0000;">&quot;secondes&quot;</span><br />
    <span style="color: #007800;">i</span>=$<span style="color: #7a0874; font-weight: bold;">&#91;</span>i + $<span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
  <span style="color: #000000; font-weight: bold;">done</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<br />
_bench_plot<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
  <span style="color: #666666; font-style: italic;"># Création d'un fichier temporaire contenant les données à afficher</span><br />
  <span style="color: #007800;">i</span>=$<span style="color: #000000;">1</span><br />
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;# Temps de calcul pour des graphes de &quot;</span>$<span style="color: #000000;">1</span><span style="color: #ff0000;">&quot; à &quot;</span>$<span style="color: #000000;">2</span><span style="color: #ff0000;">&quot; sommets (par pas de &quot;</span>$<span style="color: #000000;">3</span><span style="color: #ff0000;">&quot;)&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> plot.dat<br />
  <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$i</span> <span style="color: #660033;">-lt</span> $<span style="color: #000000;">2</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span><br />
    <span style="color: #007800;">START</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
    _bench_run<br />
    <span style="color: #007800;">STOP</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$i</span> $<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #007800;">$STOP</span>-<span style="color: #007800;">$START</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> plot.dat<br />
    <span style="color: #007800;">i</span>=$<span style="color: #7a0874; font-weight: bold;">&#91;</span>i + $<span style="color: #000000;">3</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
  <span style="color: #000000; font-weight: bold;">done</span><br />
<br />
  <span style="color: #666666; font-style: italic;"># Génération du graphe</span><br />
  gnuplot<span style="color: #cc0000; font-style: italic;">&lt;&lt;EOF<br />
set xlabel 'Nombre de Sommets du graphe'<br />
set ylabel 'Temps de calcul (s)'<br />
set xrange [*:*]<br />
set yrange [*:*]<br />
set grid<br />
set nokey<br />
set output &quot;${4}&quot;<br />
set terminal png small<br />
plot &quot;plot.dat&quot; with linespoints<br />
EOF</span><br />
<br />
  <span style="color: #666666; font-style: italic;"># Suppression du fichier temporaire</span><br />
  <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> plot.dat<br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<br />
_bench_run<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
  <span style="color: #007800;">j</span>=<span style="color: #ff0000;">&quot;0&quot;</span><br />
  <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$j</span> <span style="color: #660033;">-lt</span> <span style="color: #007800;">$ITER</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">do</span><br />
    ..<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">source</span><span style="color: #000000; font-weight: bold;">/</span>coloration <span style="color: #660033;">-r</span> <span style="color: #007800;">$i</span> <span style="color: #660033;">-v</span> <span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&gt;&gt;</span>coloration.log <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&gt;</span> error.log<br />
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;&gt;</span>coloration.log<br />
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">&gt;&gt;</span>error.log<br />
    <span style="color: #007800;">j</span>=$<span style="color: #7a0874; font-weight: bold;">&#91;</span>j + <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><br />
  <span style="color: #000000; font-weight: bold;">done</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<br />
_bench<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><br />
  <span style="color: #7a0874; font-weight: bold;">local</span> <span style="color: #007800;">ACTION</span>=<span style="color: #ff0000;">&quot;$1&quot;</span><br />
  <span style="color: #7a0874; font-weight: bold;">shift</span><br />
  <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$ACTION</span> <span style="color: #000000; font-weight: bold;">in</span><br />
    d<span style="color: #000000; font-weight: bold;">|</span>disp<span style="color: #7a0874; font-weight: bold;">&#41;</span> _bench_disp <span style="color: #ff0000;">&quot;$@&quot;</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
    p<span style="color: #000000; font-weight: bold;">|</span>plot<span style="color: #7a0874; font-weight: bold;">&#41;</span> _bench_plot <span style="color: #ff0000;">&quot;$@&quot;</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
    h<span style="color: #000000; font-weight: bold;">|</span><span style="color: #7a0874; font-weight: bold;">help</span><span style="color: #000000; font-weight: bold;">|*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> _bench_usage <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span> <span style="color: #000000; font-weight: bold;">;;</span><br />
  <span style="color: #000000; font-weight: bold;">esac</span><br />
<span style="color: #7a0874; font-weight: bold;">&#125;</span><br />
<br />
_bench <span style="color: #ff0000;">&quot;$@&quot;</span><br />
<br />
<span style="color: #7a0874; font-weight: bold;">echo</span><br />
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span><div style="display:none;">[code=bash]<br />#!/bin/sh<br />if [ "$1" = "-i" ]; then<br />&nbsp; ITER="$2"<br />&nbsp; shift<br />&nbsp; shift<br />else<br />&nbsp; ITER="10"<br />fi<br /><br />_bench_usage() {<br />&nbsp; cat &lt;&lt;USAGE<br />Usage: bench disp n1 n2 interval : Affiche le temps pris pour traiter des graphes de n sommets, n variant de n1 &agrave; n2 par pas de interval.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bench plot n1 n2 interval file: Cr&eacute;e le fichier file, un graphique PNG affichant le temps pris pour traiter des graphes de n sommets,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n variant de n1 &agrave; n2 par pas de interval.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bench help: Affiche cette page d'aide.<br />&nbsp; La premi&egrave;re lettre de chaque commande peut &ecirc;tre utilis&eacute;e<br />&nbsp; Le flag -i permet de sp&eacute;cifier combien de fois un graphe &agrave; n sommets doit &ecirc;tre calcul&eacute;.<br />&nbsp; Valeur par d&eacute;faut : 10<br />USAGE<br />}<br /><br />_bench_disp() {<br />&nbsp; i=$1<br />&nbsp; while [ $i -le $2 ]; do<br />&nbsp;&nbsp;&nbsp; START=$(date +%s)<br />&nbsp;&nbsp;&nbsp; _bench_run<br />&nbsp;&nbsp;&nbsp; STOP=$(date +%s)<br />&nbsp;&nbsp;&nbsp; echo "Graphe &agrave;" $i "sommets :" $[$STOP-$START] "secondes"<br />&nbsp;&nbsp;&nbsp; i=$[i + $3]<br />&nbsp; done<br />}<br /><br />_bench_plot() {<br />&nbsp; # Cr&eacute;ation d'un fichier temporaire contenant les donn&eacute;es &agrave; afficher<br />&nbsp; i=$1<br />&nbsp; echo "# Temps de calcul pour des graphes de "$1" &agrave; "$2" sommets (par pas de "$3")" &gt; plot.dat<br />&nbsp; while [ $i -lt $2 ]; do<br />&nbsp;&nbsp;&nbsp; START=$(date +%s)<br />&nbsp;&nbsp;&nbsp; _bench_run<br />&nbsp;&nbsp;&nbsp; STOP=$(date +%s)<br />&nbsp;&nbsp;&nbsp; echo $i $[$STOP-$START] &gt;&gt; plot.dat<br />&nbsp;&nbsp;&nbsp; i=$[i + $3]<br />&nbsp; done<br /><br />&nbsp; # G&eacute;n&eacute;ration du graphe<br />&nbsp; gnuplot&lt;&lt;EOF<br />set xlabel 'Nombre de Sommets du graphe'<br />set ylabel 'Temps de calcul (s)'<br />set xrange [*:*]<br />set yrange [*:*]<br />set grid<br />set nokey<br />set output "${4}"<br />set terminal png small<br />plot "plot.dat" with linespoints<br />EOF<br /><br />&nbsp; # Suppression du fichier temporaire<br />&nbsp; rm -f plot.dat<br />}<br /><br />_bench_run() {<br />&nbsp; j="0"<br />&nbsp; while [ $j -lt $ITER ]; do<br />&nbsp;&nbsp;&nbsp; ../source/coloration -r $i -v 1&gt;&gt;coloration.log 2&gt;&gt; error.log<br />&nbsp;&nbsp;&nbsp; echo ""&gt;&gt;coloration.log<br />&nbsp;&nbsp;&nbsp; echo ""&gt;&gt;error.log<br />&nbsp;&nbsp;&nbsp; j=$[j + 1]<br />&nbsp; done<br />}<br /><br />_bench() {<br />&nbsp; local ACTION="$1"<br />&nbsp; shift<br />&nbsp; case $ACTION in<br />&nbsp;&nbsp;&nbsp; d|disp) _bench_disp "$@" ;;<br />&nbsp;&nbsp;&nbsp; p|plot) _bench_plot "$@" ;;<br />&nbsp;&nbsp;&nbsp; h|help|*) _bench_usage &gt;&amp;2 ;;<br />&nbsp; esac<br />}<br /><br />_bench "$@"<br /><br />echo<br />exit 0<br />[/code]</div></div><br /><br />C'est facilement modifiable pour faire un <strong>comparatif entre deux programmes</strong>, &agrave; condition de regarder un peu la doc de GnuPlot.<br /><br />]]></content:encoded>
		<pubDate>Mon, 01 Jun 2009 16:38:34 +0200</pubDate>
		<guid isPermaLink="true">http://www.divarvel.fr/un-petit-script-pour-faire-du-benchmark-a513093</guid>
		<dc:creator>divarvel</dc:creator>
		<dc:date>2009-06-01T16:38:34+02:00</dc:date>
	</item>
	<item>
		<title><![CDATA[Un peu de Conky]]></title>
		<link>http://www.divarvel.fr/un-peu-de-conky-a513079</link>
		<description><![CDATA[J'avais d&eacute;j&agrave; parl&eacute; de Conky sur ce blog , un outil tr&egrave;s geek et tr&egrave;s sympa.&nbsp; 

Je me suis rebricol&eacute; une config hier (pendant que je je faisais un peu de benchmarking), &agrave; partir de ce super article 

Je n'ai pas encore fini, il faut que je tweake le script qui va chercher les tweets pour...]]></description>
		<content:encoded><![CDATA[<a href="http://data0.eklablog.com/divarvel/mod_article513079_1.png"><img style="float: left; padding-right: 5px;" src="http://data0.eklablog.com/divarvel/mod_article513079_2.png" alt="Un peu de Conky"/></a><a href="http://www.divarvel.fr//article-49528-135662-monitoring-systeme-avec-conky.html">J'avais d&eacute;j&agrave; parl&eacute; de Conky sur ce blog</a>, un outil tr&egrave;s geek et tr&egrave;s sympa.&nbsp; <br /><br />Je me suis rebricol&eacute; une config hier (pendant que je je faisais un peu de benchmarking), &agrave; partir de <a href="http://pastoutafait.org/billets/Conky-Exemple-de-configuration-sous-Ubuntu">ce super article</a><br /><br />Je n'ai pas encore fini, il faut que je tweake le script qui va chercher les tweets pour le mettre un peu plus joliement en forme, et que je mette la m&eacute;t&eacute;o.<br /><br />&Agrave; part ces deux trois trucs &agrave; finir, je suis vraiment content du r&eacute;sultat.<br /><br />J'ai fait une version plus light pour mon EEE, qui rend vraiment bien niveau sobri&eacute;t&eacute; (&ccedil;a se marie bien &agrave;&nbsp; OpenBox)<br /><br />La prochaine &eacute;tape, g&eacute;n&eacute;rer des graphes un peu plus complets avec GnuPlot (temps de latence de diff&eacute;rents serveurs, le temps que je passe sur l'ordi, le cours du Yen, tout &ccedil;a...)<br /><br />]]></content:encoded>
		<pubDate>Mon, 01 Jun 2009 16:23:48 +0200</pubDate>
		<guid isPermaLink="true">http://www.divarvel.fr/un-peu-de-conky-a513079</guid>
		<dc:creator>divarvel</dc:creator>
		<dc:date>2009-06-01T16:23:48+02:00</dc:date>
	</item>
	<item>
		<title><![CDATA[Algorithmique et Programmation en LaTeX]]></title>
		<link>http://www.divarvel.fr/algorithmique-et-programmation-en-latex-a410156</link>
		<description><![CDATA[Cette ann&eacute;e, j'ai des cours d'algorithmique et de programmation, du coup je fais mes rapports en LaTeX. Un de mes coll&egrave;gues m'a pass&eacute; de quoi int&eacute;grer du code et des algorithmes dans vos rapports , et ce proprement et joliment. Listings de Programmation Pour afficher des bouts de code, rien de...]]></description>
		<content:encoded><![CDATA[<p style="text-align: center;"><img src="http://data0.eklablog.com/divarvel/mod_article410156_2.jpg" alt="Algoritmique et Programmation en LaTeX"/></p>
<p style="text-align: justify">Cette ann&eacute;e, j'ai des cours d'algorithmique et de programmation, du coup je fais mes rapports en LaTeX. Un de mes coll&egrave;gues m'a pass&eacute; de quoi <strong>int&eacute;grer du code et des algorithmes dans vos rapports</strong>, et ce proprement et joliment.</p>
<h2>Listings de Programmation</h2>
<p style="text-align: justify">Pour afficher des bouts de code, rien de bien compliqu&eacute;. On commence par charger l'environnement <strong>listing</strong>.</p>
<p style="text-align: justify"><div class="code"><span style="color: #800000; font-weight: normal;">\usepackage</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">listings</span><span style="color: #0000D0; ">}</span><div style="display:none;">[code=Latex]<br />\usepackage{listings}[/code]</div></div></p>
<p style="text-align: justify">Ensuite, on le <strong>configure</strong> un peu.</p>
<p><div class="code"><span style="color: #800000; font-weight: normal;">\lstset</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;"><br />
language=C,<br />
keywordstyle=bfseriesttfamilycolor<span style="color: #0000D0; ">[</span><span style="color: #C08020; font-weight: normal;">rgb</span><span style="color: #0000D0; ">]{</span>0,0,1</span><span style="color: #0000D0; ">}</span>,<br />
identifierstyle=ttfamily,<br />
commentstyle=color<span style="color: #0000D0; ">[</span><span style="color: #C08020; font-weight: normal;">rgb</span><span style="color: #0000D0; ">]{</span><span style="color: #2020C0; font-weight: normal;">0.133,0.545,0.133</span><span style="color: #0000D0; ">}</span>,<br />
stringstyle=ttfamilycolor<span style="color: #0000D0; ">[</span><span style="color: #C08020; font-weight: normal;">rgb</span><span style="color: #0000D0; ">]{</span><span style="color: #2020C0; font-weight: normal;">0.627,0.126,0.941</span><span style="color: #0000D0; ">}</span>,<br />
showstringspaces=false,<br />
basicstyle=footnotesize,<br />
numberstyle=footnotesize,<br />
numbers=left,<br />
stepnumber=1,<br />
numbersep=10pt,<br />
tabsize=2,<br />
breaklines=true,<br />
breakatwhitespace=false,<br />
aboveskip=<span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">1.5baselineskip</span><span style="color: #0000D0; ">}</span>,<br />
columns=fixed,<br />
upquote=true,<br />
extendedchars=true,<br />
<span style="color: #0000D0; ">}</span><div style="display:none;">[code=Latex]\lstset{<br />language=C,<br />keywordstyle=bfseriesttfamilycolor[rgb]{0,0,1},<br />identifierstyle=ttfamily,<br />commentstyle=color[rgb]{0.133,0.545,0.133},<br />stringstyle=ttfamilycolor[rgb]{0.627,0.126,0.941},<br />showstringspaces=false,<br />basicstyle=footnotesize,<br />numberstyle=footnotesize,<br />numbers=left,<br />stepnumber=1,<br />numbersep=10pt,<br />tabsize=2,<br />breaklines=true,<br />breakatwhitespace=false,<br />aboveskip={1.5baselineskip},<br />columns=fixed,<br />upquote=true,<br />extendedchars=true,<br />}<br />[/code]</div></div></p>
<p>Rien de bien sorcier dans la config, en bidouillant un peu, on peut obtenir ce que l'on veut (langage, espacements, etc...) Il suffit ensuite d'encapsuler le bout de code qu'on veut afficher dans un environnement <strong>lstlisting</strong></p>
<p><div class="code">\begin<span style="color: #009900;">&#123;</span>lstlisting<span style="color: #009900;">&#125;</span><br />
&nbsp;<span style="color: #339933;">#include &lt;stdio.h&gt;</span><br />
&nbsp;<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp;    <a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"><span style="color: #000066;">printf</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;Hello World&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp;    <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span><br />
&nbsp;<span style="color: #009900;">&#125;</span><br />
&nbsp;\end<span style="color: #009900;">&#123;</span>lstlisting<span style="color: #009900;">&#125;</span><div style="display:none;">[code=C]\begin{lstlisting}<br /> #include &lt;stdio.h&gt;<br /> int main(){<br /> &nbsp;&nbsp;&nbsp; printf("Hello World");<br /> &nbsp;&nbsp;&nbsp; return 0;<br /> }<br /> \end{lstlisting}[/code]</div></div></p>
<h2>Algoritmique</h2>
<p style="text-align: justify">Pour afficher des algorithmes dans vos documents LaTeX, rien de bien compliqu&eacute; non plus, sauf qu'on va <strong>franciser un peu les packages</strong> dont on se sert (personnellement je trouve &ccedil;a affreux, mais on est oblig&eacute;s de faire comme &ccedil;a en cours :/). On commence par charger les packages.</p>
<p style="text-align: justify"><div class="code"><span style="color: #800000; font-weight: normal;">\usepackage</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithm,algorithmic</span><span style="color: #0000D0; ">}</span>;<div style="display:none;">[code=Latex]\usepackage{algorithm,algorithmic};[/code]</div></div></p>
<p style="text-align: justify">On red&eacute;finit ensuiteles commandes des packages algorithmic et algorithm.</p>
<p style="text-align: justify"><div class="code"><span style="color: #2C922C; font-style: italic;">% Francisation des algorithmes</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicrequire</span><span style="color: #0000D0; ">}</span> <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{textsc{Entrées:</span><span style="color: #0000D0; ">}}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicensure</span><span style="color: #0000D0; ">}</span>  <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{textsc{Sorties:</span><span style="color: #0000D0; ">}}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicwhile</span><span style="color: #0000D0; ">}</span>   <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{tant que</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicdo</span><span style="color: #0000D0; ">}</span>      <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{faire</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicendwhile</span><span style="color: #0000D0; ">}{</span><span style="color: #2020C0; font-weight: normal;">textbf{fin tant que</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicend</span><span style="color: #0000D0; ">}</span>     <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{fin</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicif</span><span style="color: #0000D0; ">}</span>      <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{si</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicendif</span><span style="color: #0000D0; ">}</span>   <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{fin si</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicelse</span><span style="color: #0000D0; ">}</span>    <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{sinon</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicthen</span><span style="color: #0000D0; ">}</span>    <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{alors</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicfor</span><span style="color: #0000D0; ">}</span>     <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{pour</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicforall</span><span style="color: #0000D0; ">}</span>  <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{pour tout</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicdo</span><span style="color: #0000D0; ">}</span>      <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{faire</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicendfor</span><span style="color: #0000D0; ">}</span>  <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{fin pour</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicloop</span><span style="color: #0000D0; ">}</span>    <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{boucler</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicendloop</span><span style="color: #0000D0; ">}</span> <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{fin boucle</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicrepeat</span><span style="color: #0000D0; ">}</span>  <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{répéter</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmicuntil</span><span style="color: #0000D0; ">}</span>   <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">textbf{jusqu'à</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\renewcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithmiccomment</span><span style="color: #0000D0; ">}</span> <span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">STATE //</span><span style="color: #0000D0; ">}</span><br />
<span style="color: #800000; font-weight: normal;">\newcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">BEGIN</span><span style="color: #0000D0; ">}{</span><span style="color: #2020C0; font-weight: normal;">STATE fbox{Début</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\newcommand</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">END</span><span style="color: #0000D0; ">}{</span><span style="color: #2020C0; font-weight: normal;">STATE fbox{Fin</span><span style="color: #0000D0; ">}}</span><br />
<span style="color: #800000; font-weight: normal;">\floatname</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">algorithm</span><span style="color: #0000D0; ">}{</span><span style="color: #2020C0; font-weight: normal;">Algorithme</span><span style="color: #0000D0; ">}</span><div style="display:none;">[code=Latex]% Francisation des algorithmes<br />\renewcommand{algorithmicrequire} {textbf{textsc{Entr&eacute;es:}}}<br />\renewcommand{algorithmicensure}&nbsp; {textbf{textsc{Sorties:}}}<br />\renewcommand{algorithmicwhile}&nbsp;&nbsp; {textbf{tant que}}<br />\renewcommand{algorithmicdo}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {textbf{faire}}<br />\renewcommand{algorithmicendwhile}{textbf{fin tant que}}<br />\renewcommand{algorithmicend}&nbsp;&nbsp;&nbsp;&nbsp; {textbf{fin}}<br />\renewcommand{algorithmicif}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {textbf{si}}<br />\renewcommand{algorithmicendif}&nbsp;&nbsp; {textbf{fin si}}<br />\renewcommand{algorithmicelse}&nbsp;&nbsp;&nbsp; {textbf{sinon}}<br />\renewcommand{algorithmicthen}&nbsp;&nbsp;&nbsp; {textbf{alors}}<br />\renewcommand{algorithmicfor}&nbsp;&nbsp;&nbsp;&nbsp; {textbf{pour}}<br />\renewcommand{algorithmicforall}&nbsp; {textbf{pour tout}}<br />\renewcommand{algorithmicdo}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {textbf{faire}}<br />\renewcommand{algorithmicendfor}&nbsp; {textbf{fin pour}}<br />\renewcommand{algorithmicloop}&nbsp;&nbsp;&nbsp; {textbf{boucler}}<br />\renewcommand{algorithmicendloop} {textbf{fin boucle}}<br />\renewcommand{algorithmicrepeat}&nbsp; {textbf{r&eacute;p&eacute;ter}}<br />\renewcommand{algorithmicuntil}&nbsp;&nbsp; {textbf{jusqu'&agrave;}}<br />\renewcommand{algorithmiccomment} {STATE //}<br />\newcommand{BEGIN}{STATE fbox{D&eacute;but}}<br />\newcommand{END}{STATE fbox{Fin}}<br />\floatname{algorithm}{Algorithme}[/code]</div></div></p>
<p style="text-align: justify">Pour int&eacute;grer un algo dans son document LaTeX, il ne reste plus qu'&agrave; faire comme ceci :</p>
<p style="text-align: justify"><div class="code"><span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">algorithm</span></span><span style="color: #0000D0; ">}</span><br />
  <span style="color: #800000; font-weight: normal;">\caption</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;">Algo de test</span><span style="color: #0000D0; ">}</span><br />
  <span style="color: #C00000; font-weight: normal;">\begin</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">algorithmic</span></span><span style="color: #0000D0; ">}</span><br />
    <span style="color: #800000; font-weight: normal;">\require</span> entiers a, b<br />
    <span style="color: #800000; font-weight: normal;">\ensure</span> entier d<br />
    <span style="color: #C00000; font-weight: normal;">\begin</span><br />
      <span style="color: #800000; font-weight: normal;">\state</span> d <span style="color: #8020E0; font-weight: normal;">$leftarrow (a+b)$</span><br />
    <span style="color: #C00000; font-weight: normal;">\end</span><br />
  <span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">algorithmic</span></span><span style="color: #0000D0; ">}</span><br />
<span style="color: #C00000; font-weight: normal;">\end</span><span style="color: #0000D0; ">{</span><span style="color: #2020C0; font-weight: normal;"><span style="color: #0000D0; font-weight: normal;">algorithm</span></span><span style="color: #0000D0; ">}</span><div style="display:none;">[code=Latex]\begin{algorithm}<br />&nbsp; \caption{Algo de test}<br />&nbsp; \begin{algorithmic}<br />&nbsp;&nbsp;&nbsp; \require entiers a, b<br />&nbsp;&nbsp;&nbsp; \ensure entier d<br />&nbsp;&nbsp;&nbsp; \begin<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \state d $leftarrow (a+b)$<br />&nbsp;&nbsp;&nbsp; \end<br />&nbsp; \end{algorithmic}<br />\end{algorithm}[/code]</div></div></p>
<p style="text-align: justify">Normalement, vous devriez avoir <strong>tout ce qu'il faut</strong> pour impressionn^Wfaire plaisir &agrave; votre prof d'Algo - Programmation pr&eacute;f&eacute;r&eacute;(e). Bon courage et bonne programmation !</p>
<p>Merci &agrave; Julien pour m'avoir pass&eacute; ces bouts de code !</p><br /><br />]]></content:encoded>
		<pubDate>Mon, 30 Mar 2009 07:16:21 +0200</pubDate>
		<guid isPermaLink="true">http://www.divarvel.fr/algorithmique-et-programmation-en-latex-a410156</guid>
		<dc:creator>divarvel</dc:creator>
		<dc:date>2009-03-30T07:16:21+02:00</dc:date>
	</item>
	<item>
		<title><![CDATA[Créer son thème Beamer]]></title>
		<link>http://www.divarvel.fr/creer-son-theme-beamer-a328600</link>
		<description><![CDATA[J'ai enfin (&agrave; peu pr&egrave;s) compris comment cr&eacute;er un th&egrave;me Beamer from scratch . Voil&agrave; la m&eacute;thode (ce n'est en aucun cas un lexique de commandes). Pour les diff&eacute;rentes commandes, &ccedil;a se trouve facilement ( ici et ici par exemple). J'&eacute;cris cet article car il n'y a quasiment aucune ressource qui...]]></description>
		<content:encoded><![CDATA[<div style="text-align: justify;">J'ai enfin (&agrave; peu pr&egrave;s) compris comment cr&eacute;er un th&egrave;me Beamer <em>from scratch</em>. Voil&agrave; la m&eacute;thode (ce n'est en aucun cas un lexique de commandes). Pour les diff&eacute;rentes commandes, &ccedil;a se trouve facilement (<a href="http://www.tuteurs.ens.fr/logiciels/latex/beamer.html#s2_1">ici</a> et <a href="http://mcclinews.free.fr/latex/introbeamer/index.html">ici</a> par exemple). J'&eacute;cris cet article car il n'y a quasiment aucune ressource qui explique comment cr&eacute;er un th&egrave;me entier (juste comment en modifier des existants).<br /><br /><br />Tout se passe dans les fichiers suivants (remplacez <em>Theme</em> par le nom de votre th&egrave;me):<br /></div>
<ul>
<li>beamertheme<em>Theme</em>.sty</li>
<li>beameroutertheme<em>Theme</em>.sty</li>
<li>beamerinnertheme<em>Theme</em>.sty</li>
<li>beamercolortheme<em>Theme</em>.sty</li>
</ul>
<div style="text-align: justify;">Chaque fichier comporte la ligne : <strong><br />\ProvidesPackage{beamer<em>color</em>theme<em>Theme</em>}[<em>AAAA/JJ/MM</em>]</strong> (color pour le fichier colortheme, &agrave; remplacer par inner, outer ou rien)<br /><br />Le fichier principal est <em>beamerthemeTheme.sty</em>, c'est lui qui d&eacute;finit tout le reste (il contient les liens vers les trois autres fichiers de th&egrave;mes). Pour indiquer au compilateur d'utiliser votre fichier de th&egrave;me, ins&eacute;rez la commande suivante <strong>\usetheme{<em>Theme</em>}</strong> dans la partie <strong>\mode&lt;presentation&gt;{}</strong>.<br /></div>
<br />
<div style="text-align: justify;">Pour la structure des slides (fond, menu, <em>etc</em>...), &ccedil;a se passe dans outertheme. Par exemple, pour d&eacute;finir le fond des slides :<br /><strong>\pgfdeclareimage[height=\paperheight,width=\paperwidth]{frame_bg}{frame_bg}</strong><br /><strong>\setbeamertemplate{background}{\pgfuseimage{frame_bg}}</strong><br />On d&eacute;finit une image (frame_bg.png) de la taille du slide (<strong>height=\paperheight,width=\paperwidth</strong>), puis on la met comme fond de chaque slide.<br /></div>
<br />Pour les diff&eacute;rentes couleurs (ici la couleur de fond des slides) :<br /><strong>\definecolor{<em>couleur</em>}{HTML}{F0F6F8}<br />\setbeamercolor{background canvas}{fg=<em>couleur</em>, bg=<em>couleur</em>}</strong><br /><br />Le innertheme d&eacute;finit le contenu des slides. J'ai pas trop d'id&eacute;es de commandes &agrave; mettre dedans.<br /><br />
<div style="text-align: justify;">Voil&agrave; pour une br&egrave;ve explication de la m&eacute;thode. Pour des explications des diff&eacute;rentes commandes, je vous conseille l'excellent site <a href="http://mcclinews.free.fr/latex/introbeamer/index.html">mcclinews.free.fr</a>, qui est complet et d&eacute;taill&eacute;. Le passage sur les beamercolorbox est tr&egrave;s int&eacute;ressant et utile. Enjoy !<br /></div><br /><br />]]></content:encoded>
		<pubDate>Sun, 01 Feb 2009 22:46:39 +0100</pubDate>
		<guid isPermaLink="true">http://www.divarvel.fr/creer-son-theme-beamer-a328600</guid>
		<dc:creator>divarvel</dc:creator>
		<dc:date>2009-02-01T22:46:39+01:00</dc:date>
	</item>
	<item>
		<title><![CDATA[Faire ses présentations en LaTeX avec Beamer]]></title>
		<link>http://www.divarvel.fr/faire-ses-presentations-en-latex-avec-beamer-a281062</link>
		<description><![CDATA[Depuis que je suis arriv&eacute; &agrave; l' ECN , les pr&eacute;sentations PowerPoint sont devenues une norme : Les profs s'en servent pour les cours, les &eacute;tudiants s'en servent pour les expos&eacute;s : d&egrave;s qu'on parle &agrave; plus d'une personne, il faut sortir le PowerPoint (et brasser , mais pour &ccedil;a on nous donne des...]]></description>
		<content:encoded><![CDATA[<p style="text-align: justify">Depuis que je suis arriv&eacute; &agrave; l'<abbr title="&Eacute;cole Centrale de Nantes">ECN</abbr>, les <strong>pr&eacute;sentations PowerPoint</strong> sont devenues une norme : Les profs s'en servent pour les cours, les &eacute;tudiants s'en servent pour les expos&eacute;s : d&egrave;s qu'on parle &agrave; plus d'une personne, il faut sortir le PowerPoint (et <em>brasser</em>, mais pour &ccedil;a on nous donne des cours). Vous connaissez mon amour pour les produits Microsoft (qui est d'ailleurs partag&eacute; par notre Directeur des &Eacute;tudes), donc je me suis d'abord dit que j'utiliserais OpenOffice.org Impress. En fait, je n'aime pas ces clic-o-dr&ocirc;mes, c'est pour cette raison que j'ai saut&eacute; de joie quand j'ai appris qu'on pouvait faire ses pr&eacute;sentations en <a href="http://fr.wikipedia.org/wiki/LaTeX"><strong>LaTeX</strong></a> , et les exporter en format <abbr title="Portable Document Format">PDF</abbr>, certes propri&eacute;taire, mais si bien g&eacute;r&eacute; sur <strong>toutes les plates-formes</strong>. Pas comme le .doc, qu'un abruti de prof a essay&eacute; de faire passer pour un standard. L'<acronym title="International Organization for Standardization">ISO</acronym> ne reconna&icirc;t qu'un seul standard pour les fichiers bureautiques, et c'est... l'<abbr title="Open Document Format">odf</abbr> (fin bref...)</p>
<p style="text-align: justify">Pour ceux qui se le demandent, LaTeX est un langage de description de documents qui est super puisqu'il distingue le fond de la forme (ce que ch&eacute;rit par dessus tout un int&eacute;grateur <abbr title="eXtensible Markup Language">xHTML</abbr> qui se respecte), permet de <strong>g&eacute;rer proprement la mise en page</strong>, et permet d'&eacute;crire de superbes <strong>formules math&eacute;matiques</strong>, et ce <strong>sans le moindre clic</strong>. il y a de quoi baver, s&eacute;rieusement.</p>
<p style="text-align: justify">Pour vous donner une id&eacute;e de ce que &ccedil;a peut donner : <a href="http://data0.eklablog.com/divarvel/perso/programme.pdf">Exemple de document</a></p>
<p style="text-align: justify">Un petit guide du d&eacute;butant vous attend dans la suite de cet article.</p><br /><br /><a href="http://www.divarvel.fr/faire-ses-presentations-en-latex-avec-beamer-a281062">Lire la suite...</a><br /><br />]]></content:encoded>
		<pubDate>Tue, 13 Jan 2009 00:48:57 +0100</pubDate>
		<guid isPermaLink="true">http://www.divarvel.fr/faire-ses-presentations-en-latex-avec-beamer-a281062</guid>
		<dc:creator>divarvel</dc:creator>
		<dc:date>2009-01-13T00:48:57+01:00</dc:date>
	</item>
</channel>
</rss><!--mdp=-->
