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

<channel>
	<title>TuniLa.me</title>
	<atom:link href="http://tunila.me/feed" rel="self" type="application/rss+xml" />
	<link>http://tunila.me</link>
	<description>Le blog d&#039;un jeune Geek: Des tutos, infos et astuces de l&#039;informatique, programmation et du web 2.0</description>
	<lastBuildDate>Thu, 01 Dec 2011 19:48:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Programmer sur le STM32L-Discovery sur Linux</title>
		<link>http://tunila.me/article/programmation/embarque/programmer-sur-le-stm32l-discovery-sur-linux.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=programmer-sur-le-stm32l-discovery-sur-linux</link>
		<comments>http://tunila.me/article/programmation/embarque/programmer-sur-le-stm32l-discovery-sur-linux.html#comments</comments>
		<pubDate>Thu, 01 Dec 2011 19:48:19 +0000</pubDate>
		<dc:creator>TuniLame</dc:creator>
				<category><![CDATA[Embarqué]]></category>
		<category><![CDATA[developpement]]></category>
		<category><![CDATA[discovery]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[lcd]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[program]]></category>
		<category><![CDATA[stm32l]]></category>
		<category><![CDATA[stmicroelectronics]]></category>

		<guid isPermaLink="false">http://tunila.me/?p=525</guid>
		<description><![CDATA[STM32 est une famille de plusieurs séries de circuits micro-contrôleurs, par STMicroelectronics (aussi connu comme ST), basé sur le processeur RISC 32 bits Cortex-M3 et Cortex-M4F d&#8217;ARM Holdings. Dans ce tutoriel, vous allez apprendre a compilé un fichier C et l&#8217;envoyé pour l’exécution sur le micro-contrôleur STM32L. Nous allons commencer par installer les paquets nécessaires: [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tunila.me/wp-content/uploads/2011/11/STM32L-DISCOVERY-STM-FNT-LRG.jpg" rel="lightbox[525]"><img class="aligncenter size-full wp-image-529" title="STM32L-DISCOVERY-STM-FNT-LRG" src="http://tunila.me/wp-content/uploads/2011/11/STM32L-DISCOVERY-STM-FNT-LRG.jpg" alt="" width="441" height="400" /></a></p>
<p><a href="http://en.wikipedia.org/wiki/STM32">STM32</a> est une famille de plusieurs séries de circuits micro-contrôleurs, par STMicroelectronics (aussi connu comme ST), basé sur le processeur RISC 32 bits Cortex-M3 et Cortex-M4F d&#8217;ARM Holdings.</p>
<p>Dans ce tutoriel, vous allez apprendre a compilé un fichier C et l&#8217;envoyé pour l’exécution sur le micro-contrôleur STM32L.</p>
<p><span id="more-525"></span></p>
<p>Nous allons commencer par installer les paquets nécessaires:</p>
<ul>
<li>Git:

<div class="wp_codebox"><table><tr id="p52518"><td class="code" id="p525code18"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">git</span></pre></td></tr></table></div>

</li>
<li>libusb-1.0

<div class="wp_codebox"><table><tr id="p52519"><td class="code" id="p525code19"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libusb-<span style="color: #000000;">1.0</span></pre></td></tr></table></div>

</li>
<li>Et le reste:

<div class="wp_codebox"><table><tr id="p52520"><td class="code" id="p525code20"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">flex</span> <span style="color: #c20cb9; font-weight: bold;">bison</span> libgmp3-dev libmpfr-dev libncurses5-dev libmpc-dev <span style="color: #c20cb9; font-weight: bold;">autoconf</span> texinfo build-essential libftdi-dev</pre></td></tr></table></div>

</li>
</ul>
<p>Ensuite, nous allons télécharger les utilitaires nécessaires pour la connexion et la communication avec notre stm32l-discovery :</p>
<ol>
<li>D&#8217;abord, créer un dossier (ou tout va être téléchargé):

<div class="wp_codebox"><table><tr id="p52521"><td class="code" id="p525code21"><pre class="bash" style="font-family:monospace;">~ $ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> stm32l-discovery
~ $ <span style="color: #7a0874; font-weight: bold;">cd</span> stm32l-discovery</pre></td></tr></table></div>

</li>
<li>Puis, on commence a télécharger:

<div class="wp_codebox"><table><tr id="p52522"><td class="code" id="p525code22"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>stm32l-discovery $ <span style="color: #c20cb9; font-weight: bold;">git</span> clone https:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>esden<span style="color: #000000; font-weight: bold;">/</span>summon-arm-toolchain.git</pre></td></tr></table></div>

<p>(summon-arm-toolchain)</p>

<div class="wp_codebox"><table><tr id="p52523"><td class="code" id="p525code23"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>stm32l-discovery $ <span style="color: #c20cb9; font-weight: bold;">git</span> clone https:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>texane<span style="color: #000000; font-weight: bold;">/</span>stlink.git</pre></td></tr></table></div>

<p>(Stlink)</li>
</ol>
<p>Et on installe le summon-arm-toolchain (en super-utilisateur):</p>

<div class="wp_codebox"><table><tr id="p52524"><td class="code" id="p525code24"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>stm32l-discovery $ <span style="color: #7a0874; font-weight: bold;">cd</span> summon-arm-toolchain<span style="color: #000000; font-weight: bold;">/</span>
~<span style="color: #000000; font-weight: bold;">/</span>stm32l-discovery<span style="color: #000000; font-weight: bold;">/</span>summon-arm-toolchain $ <span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>summon-arm-toolchain</pre></td></tr></table></div>

<p>Nous devons maintenant compiler le STlink, ouvrez le dossier stm32l-discovery/stlink puis faites un make:</p>

<div class="wp_codebox"><table><tr id="p52525"><td class="code" id="p525code25"><pre class="bash" style="font-family:monospace;">~ $ <span style="color: #7a0874; font-weight: bold;">cd</span> stm32l-discovery<span style="color: #000000; font-weight: bold;">/</span>stlink<span style="color: #000000; font-weight: bold;">/</span>
~<span style="color: #000000; font-weight: bold;">/</span>stm32l-discovery<span style="color: #000000; font-weight: bold;">/</span>stlink $ <span style="color: #c20cb9; font-weight: bold;">make</span></pre></td></tr></table></div>

<div class="warning">A partir de ce point, nous allons supposer que toolchain est installé dans le dossier $toolchain_path (dans notre cas, $toolchain_path=/home/tunilame/sat)</p>

<div class="wp_codebox"><table><tr id="p52526"><td class="code" id="p525code26"><pre class="bash" style="font-family:monospace;">$ <span style="color: #007800;">toolchain_path</span>=<span style="color: #ff0000;">&quot;/home/&lt;user&gt;/sat&quot;</span></pre></td></tr></table></div>

<p>Remplacez <em>< user ></em> par le nom d&#8217;utilisateur.
</div>
<h3>Compiler un fichier C et l&#8217;envoyer sur le STM32L-Discovery</h3>
<p>Dans cet exemple, nous allons allumer les LEDs LD3 et LD4 (vert et bleu) une après l&#8217;autre, dés que le micro-contrôleur est branché.</p>
<ol>
<li>
<h5>Compilation</h5>

<div class="wp_codebox"><table><tr id="p52527"><td class="code" id="p525code27"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> ~tunilame<span style="color: #000000; font-weight: bold;">/</span>stm32l-discovery<span style="color: #000000; font-weight: bold;">/</span>stlink<span style="color: #000000; font-weight: bold;">/</span>example<span style="color: #000000; font-weight: bold;">/</span>32l_dac<span style="color: #000000; font-weight: bold;">/</span>
~<span style="color: #000000; font-weight: bold;">/</span>stm32l-discovery<span style="color: #000000; font-weight: bold;">/</span>stlink<span style="color: #000000; font-weight: bold;">/</span>example<span style="color: #000000; font-weight: bold;">/</span>32l_dac $ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #660033;">-C</span> ..<span style="color: #000000; font-weight: bold;">/</span>libs_stm<span style="color: #000000; font-weight: bold;">/</span>build</pre></td></tr></table></div>

<p>Ici, on a compilez les fichiers et les bibliothèques spécifiques au STM32L-Discovery</p>

<div class="wp_codebox"><table><tr id="p52528"><td class="code" id="p525code28"><pre class="bash" style="font-family:monospace;">~<span style="color: #000000; font-weight: bold;">/</span>stm32l-discovery<span style="color: #000000; font-weight: bold;">/</span>stlink<span style="color: #000000; font-weight: bold;">/</span>example<span style="color: #000000; font-weight: bold;">/</span>32l_dac $ <span style="color: #c20cb9; font-weight: bold;">make</span></pre></td></tr></table></div>

<p>et hop, on compile notre programme!
</li>
<li>
<h5>Envoi du programme sur le STM32L-Discovery</h5>
<p>Branchez maintenant votre STM32L-Discovery avec un câble USB, puis exécuter le fichier st-util qui se trouve dans gdbserver/:</p>

<div class="wp_codebox"><table><tr id="p52529"><td class="code" id="p525code29"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>stm32l-discovery<span style="color: #000000; font-weight: bold;">/</span>stlink
~<span style="color: #000000; font-weight: bold;">/</span>stm32l-discovery<span style="color: #000000; font-weight: bold;">/</span>stlink $ <span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>gdbserver<span style="color: #000000; font-weight: bold;">/</span>st-util</pre></td></tr></table></div>

<p>Après avoir exécuter ces commandes, vous devez voir le LED LD1 (qui se trouve en haut a gauche du stm32) allumé en VERT.</p>
<p>Ouvrez maintenant un nouveau terminal et, sans fermer le terminal d&#8217;origine (ou est exécuté st-util), exécutez le arm−none-eabi−gdb qui se trouve dans le dossier $toolchain_path/bin:</p>

<div class="wp_codebox"><table><tr id="p52530"><td class="code" id="p525code30"><pre class="bash" style="font-family:monospace;">$ <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>tunilame<span style="color: #000000; font-weight: bold;">/</span>sat<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>arm-none-eabi-gdb</pre></td></tr></table></div>


<div class="wp_codebox"><table><tr id="p52531"><td class="code" id="p525code31"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">gdb</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> target extended-remote :<span style="color: #000000;">4242</span></pre></td></tr></table></div>

<p>Se connecter avec le stm32 (en utilisant le port 4242, qui a est utilisé par st-util dans l&#8217;autre terminal)</p>

<div class="wp_codebox"><table><tr id="p52532"><td class="code" id="p525code32"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">gdb</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>stm32l-discovery<span style="color: #000000; font-weight: bold;">/</span>stlink<span style="color: #000000; font-weight: bold;">/</span>example<span style="color: #000000; font-weight: bold;">/</span>32l_dac<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">gdb</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> load dac.elf</pre></td></tr></table></div>

<p>On charge notre programme&#8230;</p>

<div class="wp_codebox"><table><tr id="p52533"><td class="code" id="p525code33"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">gdb</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> run
The program being debugged has been started already.
Start it from the beginning? <span style="color: #7a0874; font-weight: bold;">&#40;</span>y or n<span style="color: #7a0874; font-weight: bold;">&#41;</span> y
Starting program:</pre></td></tr></table></div>

<p>Et on l’exécute!
</li>
<li>
<h5>Arreter l&#8217;execution</h5>
<p>Pour arrêter l’exécution, faites un CTRL+C.<br />
Pour quitter gdb et démonter votre stm32l:</p>

<div class="wp_codebox"><table><tr id="p52534"><td class="code" id="p525code34"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">gdb</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> quit
A debugging session is active.
&nbsp;
	Inferior <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>Remote target<span style="color: #7a0874; font-weight: bold;">&#93;</span> will be killed.
&nbsp;
Quit anyway? <span style="color: #7a0874; font-weight: bold;">&#40;</span>y or n<span style="color: #7a0874; font-weight: bold;">&#41;</span> y</pre></td></tr></table></div>

</li>
</ol>
<p>Maintenant, vous pouvez essayer les fichiers présents dans le dossier <em>stlink/examples</em>, je vous suggère d’exécuter le fichier <em>32l_lcd.c</em> qui affichera du texte sur l’écran LCD du STM32L-Discovery.</p>
<p>Dorénavant, utilisez 32l_dac et 32l_lcd présents dans <em>stlink/examples</em> comme base pour apprendre a programmer sur votre micro-contrôleur, et faîtes des recherches sur Google!</p>
<p>Pour tout problème/correction, merci de poster un commentaire.</p>
<p><small>sources:</p>
<ul>
<li><a href="https://jethomson.wordpress.com/2011/11/17/getting-started-with-the-stm32vldiscovery-in-linux/">https://jethomson.wordpress.com/2011/11/17/getting-started-with-the-stm32vldiscovery-in-linux/</a></li>
<li><em>tutorial.pdf</em> contenu dans <em>stlink/doc/tutorial</em> (que je vous conseille de lire)</li>
<p></small></p>
]]></content:encoded>
			<wfw:commentRss>http://tunila.me/article/programmation/embarque/programmer-sur-le-stm32l-discovery-sur-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculez votre score du bac tunisien version 2011!</title>
		<link>http://tunila.me/article/enseignement/calculez-votre-score-du-bac-version-2011.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=calculez-votre-score-du-bac-version-2011</link>
		<comments>http://tunila.me/article/enseignement/calculez-votre-score-du-bac-version-2011.html#comments</comments>
		<pubDate>Fri, 24 Jun 2011 19:00:25 +0000</pubDate>
		<dc:creator>TuniLame</dc:creator>
				<category><![CDATA[BAC]]></category>
		<category><![CDATA[Enseignement]]></category>
		<category><![CDATA[2011]]></category>
		<category><![CDATA[bac]]></category>
		<category><![CDATA[formule]]></category>
		<category><![CDATA[informatique]]></category>
		<category><![CDATA[orientation]]></category>
		<category><![CDATA[score]]></category>
		<category><![CDATA[section]]></category>
		<category><![CDATA[tunisien]]></category>
		<category><![CDATA[universitaire]]></category>

		<guid isPermaLink="false">http://tunila.me/?p=513</guid>
		<description><![CDATA[Voila, le calculateur de score a été mis à jour selon le nouvel &#171;&#160;Guide de l&#8217;orientation universitaire 2011&#171;&#160;, &#171;&#160;دليل التوجيه الجامعي 2011 &#160;&#187; téléchargeable gratuitement à cette adresse. Pour le formulaire, il est accessible via cette adresse ou, pour le partager, voici une adresse plus courte: http://tunila.me/score . Pour toutes vos suggestions/rapports de bug, postez [...]]]></description>
			<content:encoded><![CDATA[<p>Voila, le calculateur de score a été mis à jour selon le nouvel &laquo;&nbsp;<em>Guide de l&#8217;orientation universitaire 2011</em>&laquo;&nbsp;, &laquo;&nbsp;<em>دليل التوجيه الجامعي 2011 </em>&nbsp;&raquo; téléchargeable gratuitement <em><a href="http://www.orientation.tn/orient/fr.jsp" target="_blank">à cette adresse</a></em>.</p>
<p>Pour le formulaire, il est accessible via <em><a href="http://tunila.me/portfolio/calculez-votre-score-du-bac" target="_self">cette adresse</a></em> ou, pour le partager, voici une adresse plus courte: <em><span><a href="http://tunila.me/score">http://tunila.me/score</a> .</span></em></p>
<p><em>Pour toutes vos suggestions/rapports de bug, postez un commentaire dans cet article. Merci. <span id="more-513"></span></em></p>
<h1 style="text-align: center;"><a title="Calculez votre score du bac" href="http://tunila.me/score" target="_self"><em><span><a href="http://tunila.me/score">http://tunila.me/score</a></span></em></a></h1>
<p><em>Partagez, partagez, partagez!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://tunila.me/article/enseignement/calculez-votre-score-du-bac-version-2011.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Statistiques mondiales en temps réel grâce à Worldometers</title>
		<link>http://tunila.me/article/divers/statistiques-mondiales-en-temps-reel-grace-a-worldometers.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=statistiques-mondiales-en-temps-reel-grace-a-worldometers</link>
		<comments>http://tunila.me/article/divers/statistiques-mondiales-en-temps-reel-grace-a-worldometers.html#comments</comments>
		<pubDate>Sat, 14 May 2011 22:31:56 +0000</pubDate>
		<dc:creator>TuniLame</dc:creator>
				<category><![CDATA[Divers]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[calcul]]></category>
		<category><![CDATA[environnement]]></category>
		<category><![CDATA[mondiale]]></category>
		<category><![CDATA[population]]></category>
		<category><![CDATA[sante]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[statistiques]]></category>
		<category><![CDATA[Worldometers]]></category>

		<guid isPermaLink="false">http://tunila.me/?p=488</guid>
		<description><![CDATA[Il nous reste 15 545 jours avant la fin du pétrole&#8230; C&#8217;est ce que nous informe le site Worldometers qui affiche des infos en temps réels (selon des calculs théoriques), de la population mondiale, notre populations, eau, environnement, santé etc&#8230; Et ce en plusieurs langues (32, exactement)! Pour y accéder: En français: http://www.worldometers.info/fr/ En arabe: [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_489" class="wp-caption aligncenter" style="width: 599px"><a href="http://tunila.me/wp-content/uploads/2011/05/worldometers-m.png" rel="lightbox[488]"><img class="size-full wp-image-489" title="worldometers-m" src="http://tunila.me/wp-content/uploads/2011/05/worldometers-m.png" alt="Worldometers" width="589" height="316" /></a><p class="wp-caption-text">Worldometers.info</p></div>
<p>Il nous reste 15 545 jours avant la fin du pétrole&#8230; C&#8217;est ce que nous informe le site Worldometers qui affiche des infos en temps réels (selon des calculs théoriques), de la population mondiale, notre populations, eau, environnement, santé etc&#8230; Et ce en plusieurs langues (32, exactement)!</p>
<p><span id="more-488"></span></p>
<p>Pour y accéder:</p>
<blockquote><p>En français: <a href="http://www.worldometers.info/fr/">http://www.worldometers.info/fr/</a></p>
<p>En arabe: <a href="http://www.worldometers.info/ar/">http://www.worldometers.info/ar/</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://tunila.me/article/divers/statistiques-mondiales-en-temps-reel-grace-a-worldometers.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nouveau driver ATI pour résoudre le problème de l&#8217;écran noir au démarrage de Ubuntu</title>
		<link>http://tunila.me/article/systemes-dexploitation-se/ubuntu/nouveau-driver-ati-pour-resoudre-le-probleme-de-lecran-noir-au-demarrage-de-ubuntu.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nouveau-driver-ati-pour-resoudre-le-probleme-de-lecran-noir-au-demarrage-de-ubuntu</link>
		<comments>http://tunila.me/article/systemes-dexploitation-se/ubuntu/nouveau-driver-ati-pour-resoudre-le-probleme-de-lecran-noir-au-demarrage-de-ubuntu.html#comments</comments>
		<pubDate>Fri, 28 Jan 2011 20:28:46 +0000</pubDate>
		<dc:creator>TuniLame</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[amd]]></category>
		<category><![CDATA[ati]]></category>
		<category><![CDATA[black screen]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[carte]]></category>
		<category><![CDATA[catalyst]]></category>
		<category><![CDATA[démarrage]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[ecran noir]]></category>
		<category><![CDATA[graphique]]></category>
		<category><![CDATA[main]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[terminated]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ureadahead-other]]></category>
		<category><![CDATA[with status]]></category>

		<guid isPermaLink="false">http://tunila.me/?p=444</guid>
		<description><![CDATA[Bonjour, Mon Ubuntu vient tout juste de démarrer après deux jours de recherches approfondit sur Google a propos d&#8217;un bug survenu après une mise a jour du SE. En effet, un message &#171;&#160;ureadahead-other main process terminated with status 4&#8243; s&#8217;affichait 4 fois quand je démarre Ubuntu normalement puis, hop, un écran noir! Donc, j&#8217;ai effectué [...]]]></description>
			<content:encoded><![CDATA[<p><b>Bonjour,</b></p>
<p>Mon Ubuntu vient tout juste de démarrer après deux jours de recherches approfondit sur Google a propos d&#8217;un bug survenu après une mise a jour du SE. En effet, un message &laquo;&nbsp;ureadahead-other main process terminated with status 4&#8243; s&#8217;affichait 4 fois quand je démarre Ubuntu normalement puis, hop, un écran noir! Donc, j&#8217;ai effectué tout mes essaies en &laquo;&nbsp;recovery mode&nbsp;&raquo;. Mais en vain, aucune solution n&#8217;était présente.<span id="more-444"></span></p>
<hr />
<p>Sous un coup de tête, j&#8217;ai regarder coté ATI (carte graphique) pour voir s&#8217;il n&#8217;ont pas un nouveau driver pour Linux, et là, surprise! Le dernier a été sortie le 26 Janvier 2011, le jour ou tout a commencé <img src='http://tunila.me/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  . Je l&#8217;ai téléchargé, installé puis j&#8217;ai redémarré l&#8217;ordinateur car, &laquo;&nbsp;on perd rien pour essayer&nbsp;&raquo;! Et voila, il démarre sous Ubuntu normalement&#8230;</p>
<h2>Comment faire?</h2>
<ol>
<li>Télécharger le driver <strong>: <a href="http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx" target="_blank">ATI Catalyst™ 11.1 Proprietary Linux x86 Display Driver (32 et 64bits)</a></strong></li>
<li>Lancer cette commande  (en étant dans le dossier de téléchargement du driver):</li>
<pre>sh ./ati-driver-installer-11-1-x86.x86_64.run</pre>
<li>Suivre les instructions&#8230;</li>
</ol>
<p>Voila! Redémarrez votre ordinateur et revenez pour me partager <img src='http://tunila.me/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://tunila.me/article/systemes-dexploitation-se/ubuntu/nouveau-driver-ati-pour-resoudre-le-probleme-de-lecran-noir-au-demarrage-de-ubuntu.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Une nouvelle ère pour la Tunisie</title>
		<link>http://tunila.me/article/image-de-la-semaine/une-nouvelle-ere-pour-la-tunisie.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=une-nouvelle-ere-pour-la-tunisie</link>
		<comments>http://tunila.me/article/image-de-la-semaine/une-nouvelle-ere-pour-la-tunisie.html#comments</comments>
		<pubDate>Wed, 19 Jan 2011 00:09:23 +0000</pubDate>
		<dc:creator>TuniLame</dc:creator>
				<category><![CDATA[Image de la semaine]]></category>
		<category><![CDATA[14 janvier 2011]]></category>
		<category><![CDATA[avenue]]></category>
		<category><![CDATA[bourghiba]]></category>
		<category><![CDATA[ere]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[manifestation]]></category>
		<category><![CDATA[nouvelle]]></category>
		<category><![CDATA[révolution]]></category>
		<category><![CDATA[tunisie]]></category>

		<guid isPermaLink="false">http://tunila.me/?p=438</guid>
		<description><![CDATA[Source: Facebook]]></description>
			<content:encoded><![CDATA[<div id="attachment_440" class="wp-caption aligncenter" style="width: 604px"><a href="http://tunila.me/wp-content/uploads/2011/01/nouvel_ere_sem_17Jan.jpg" rel="lightbox[438]"><img src="http://tunila.me/wp-content/uploads/2011/01/nouvel_ere_sem_17Jan.jpg" alt="Une nouvelle ère pour la Tunisie" title="nouvel_ere_sem_17Jan" width="594" height="395" class="size-full wp-image-440" /></a><p class="wp-caption-text">Une nouvelle ère pour la Tunisie</p></div>
<p align="right">Source: <a href="http://www.facebook.com/photo.php?fbid=501466565912">Facebook</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tunila.me/article/image-de-la-semaine/une-nouvelle-ere-pour-la-tunisie.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Faites ressembler Ubuntu à Mac OSX en quelques secondes grâce à Macbuntu</title>
		<link>http://tunila.me/article/tutoriels/faites-ressembler-ubuntu-a-mac-osx-en-quelques-secondes-grace-a-macbuntu.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=faites-ressembler-ubuntu-a-mac-osx-en-quelques-secondes-grace-a-macbuntu</link>
		<comments>http://tunila.me/article/tutoriels/faites-ressembler-ubuntu-a-mac-osx-en-quelques-secondes-grace-a-macbuntu.html#comments</comments>
		<pubDate>Tue, 07 Dec 2010 20:30:03 +0000</pubDate>
		<dc:creator>TuniLame</dc:creator>
				<category><![CDATA[Tutoriels]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[automatique]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[compiz]]></category>
		<category><![CDATA[complet]]></category>
		<category><![CDATA[core]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[fusion]]></category>
		<category><![CDATA[icon]]></category>
		<category><![CDATA[installer]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[macbuntu]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[police]]></category>
		<category><![CDATA[ressembler]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sh]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[synaptic]]></category>
		<category><![CDATA[telecharger]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[thunderbird]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://tunila.me/?p=389</guid>
		<description><![CDATA[Vous voulez avoir Mac OSX sur votre machine sans avoir a acheter un mac? La solution est d&#8217;utiliser un script appelé &#171;&#160;Macbuntu&#160;&#187; qui s&#8217;occupe de changer l&#8217;apparence d&#8217;Ubuntu en celle d&#8217;un Mac OSX. Pour celà, rien de plus simple: en éxecutant un script shell de petite taille ~3Ko qui fera tout automatiquement ou en 4 [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left">Vous voulez avoir Mac OSX sur votre machine sans avoir a acheter un mac? La solution est d&#8217;utiliser un script appelé &laquo;&nbsp;Macbuntu&nbsp;&raquo; qui s&#8217;occupe de changer l&#8217;apparence d&#8217;Ubuntu en celle d&#8217;un Mac OSX.</p>
<p style="text-align: left">Pour celà, rien de plus simple: en éxecutant un script shell de petite taille ~3Ko qui fera tout automatiquement ou en 4 lignes de codes&#8230;<span id="more-389"></span></p>
<hr />
<p style="text-align: left">Qu&#8217;installe Macbuntu:</p>
<ul>
<li>Macbuntu-10.04 theme based on GTK Leopard</li>
<li>Macbuntu-10.04-Icons based on Mac4Lin Faenza Icons</li>
<li>Macbuntu-10.04-Cursors based on Mac4Lin Cursors</li>
<li>Arrière-plans Mac OSX</li>
<li>Polices Mac OSX</li>
<li>Inclus aussi Firefox, Thunderbird et les themes de Chrome</li>
</ul>
<h2 style="text-align: left">Téléchargement &amp; installation</h2>
<p style="text-align: left">Pour installer Macbuntu, vous pouvez</p>
<ul style="text-align: left">
<li>ou bien <a href="http://gnome-look.org/content/show.php/Macbuntu?content=129021">le télécharger manuellement</a>, l&#8217;extraire puis exécuter le script &laquo;&nbsp;install.sh&nbsp;&raquo; via le terminal ou</li>
<li>Télécharger ce script Note: There is a file embedded within this post, please visit this post to download the file. puis l&#8217;éxécuter en tapant &laquo;&nbsp;sh Macbuntu-install.sh&nbsp;&raquo; en étant sous le dossier ou se trouve le fichier télécharger ou</li>
<li>éxécuter ces commandes, une par une, d&#8217;aprés votre distribution d&#8217;Ubuntu:
<ul>
<li>Ubuntu 10.04</li>
<pre>wget https://downloads.sourceforge.net/project/macbuntu/macbuntu-10.04/v2.3/Macbuntu-10.04.tar.gz -O /tmp/Macbuntu-10.04.tar.gz
tar xzvf /tmp/Macbuntu-10.04.tar.gz -C /tmp
cd /tmp/Macbuntu-10.04/
./install.sh
</pre>
<li>Ubuntu 10.10</li>
<pre>wget https://downloads.sourceforge.net/project/macbuntu/macbuntu-10.10/v2.3/Macbuntu-10.10.tar.gz -O /tmp/Macbuntu-10.10.tar.gz
tar xzvf /tmp/Macbuntu-10.10.tar.gz -C /tmp
cd /tmp/Macbuntu-10.10/
./install.sh
</pre>
</ul>
</li>
</ul>
<p style="text-align: left">Ensuite, suivez les instructions à l&#8217;écran:</p>
<p style="text-align: center">
<div id="attachment_414" class="wp-caption aligncenter" style="width: 810px"><a href="http://tunila.me/wp-content/uploads/2010/12/macbuntu-install1.png" rel="lightbox[389]"><img src="http://tunila.me/wp-content/uploads/2010/12/macbuntu-install1.png" alt="Macbuntu configuration" width="800" height="516" class="size-full wp-image-414" /></a><p class="wp-caption-text">Macbuntu installation and configuration</p></div>
<p style="text-align: center">
<p style="text-align: left">Après avoir installer Macbuntu, redémarrer votre ordinateur et profitez de votre nouveau mac <img src='http://tunila.me/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h2 style="text-align: left">Désinstallation</h2>
<p>Pour désinstaller Macbuntu, exécutez simplement les commandes écrites ci-dessus en remplaçant &laquo;&nbsp;install.sh&nbsp;&raquo; par &laquo;&nbsp;uninstall.sh&nbsp;&raquo;.</p>
<p><font color="red">Important:</font> Si vous ne pouvez plus activer les effets de bureau aprés avoir désinstaller Macbuntu, cherchez &laquo;&nbsp;compiz&nbsp;&raquo; et &laquo;&nbsp;compiz-core&nbsp;&raquo; dans Synaptic Package Manager et réinstallez-les.</p>
<p style="text-align: right"><a href="http://www.webupd8.org/2010/09/make-ubuntu-look-like-mac-osx-in.html" target="_blank">Source </a></p>
]]></content:encoded>
			<wfw:commentRss>http://tunila.me/article/tutoriels/faites-ressembler-ubuntu-a-mac-osx-en-quelques-secondes-grace-a-macbuntu.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Apple</title>
		<link>http://tunila.me/article/image-de-la-semaine/new-apple.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-apple</link>
		<comments>http://tunila.me/article/image-de-la-semaine/new-apple.html#comments</comments>
		<pubDate>Thu, 14 Oct 2010 20:21:19 +0000</pubDate>
		<dc:creator>TuniLame</dc:creator>
				<category><![CDATA[Image de la semaine]]></category>

		<guid isPermaLink="false">http://tunila.me/?p=382</guid>
		<description><![CDATA[Merci à eYos pour la source]]></description>
			<content:encoded><![CDATA[<div id="attachment_383" class="wp-caption aligncenter" style="width: 614px"><a href="http://tunila.me/wp-content/uploads/2010/10/photo-semaine-14.10.10.jpg" rel="lightbox[382]"><img class="size-full wp-image-383 " title="Photo de la semaine (14/10/10): New Apple" src="http://tunila.me/wp-content/uploads/2010/10/photo-semaine-14.10.10.jpg" alt="Photo de la semaine" width="604" height="451" /></a><p class="wp-caption-text">New Apple</p></div>
<p align="right">Merci à eYos pour <a href="http://www.facebook.com/photo.php?fbid=430025442503&#038;set=a.255124857503.134048.231846292503">la source<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tunila.me/article/image-de-la-semaine/new-apple.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Annuler, coller et couper</title>
		<link>http://tunila.me/article/image-de-la-semaine/annuler-coller-et-couper.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=annuler-coller-et-couper</link>
		<comments>http://tunila.me/article/image-de-la-semaine/annuler-coller-et-couper.html#comments</comments>
		<pubDate>Tue, 31 Aug 2010 15:23:34 +0000</pubDate>
		<dc:creator>TuniLame</dc:creator>
				<category><![CDATA[Image de la semaine]]></category>
		<category><![CDATA[Annuler]]></category>
		<category><![CDATA[clavier]]></category>
		<category><![CDATA[coller et couper]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[raccourcis]]></category>
		<category><![CDATA[semaine]]></category>

		<guid isPermaLink="false">http://tunila.me/?p=366</guid>
		<description><![CDATA[J&#8217;ai décidé de mettre une nouvelle catégorie &#171;&#160;Image de la semaine&#160;&#187;. Pour cette semaine, j&#8217;ai trouvé cette image (geek) sur twitter (plus précisément d&#8217;ici) que je voudrais vous faire partager. Pour mieux comprendre: CTRL+Z est le raccourcis clavier pour annuler la dernière modification d&#8217;un document, CTRL+V est le raccourcis pour coller un élément (ou plusieurs) [...]]]></description>
			<content:encoded><![CDATA[<p>J&#8217;ai décidé de mettre une nouvelle catégorie &laquo;&nbsp;Image de la semaine&nbsp;&raquo;. Pour cette semaine, j&#8217;ai trouvé cette image (geek) sur <a href="https://twitter.com/naamane/statuses/22621123498">twitter</a> (plus précisément d&#8217;<a href="http://www.picselate.com/real-life-keyboard-shortcuts">ici</a>) que je voudrais vous faire partager.</p>
<div id="attachment_367" class="wp-caption aligncenter" style="width: 652px"><a href="http://tunila.me/wp-content/uploads/2010/08/image_de_la_semaine31_08_2010.jpeg" rel="lightbox[366]"><img class="size-full wp-image-367" title="image_de_la_semaine31_08_2010" src="http://tunila.me/wp-content/uploads/2010/08/image_de_la_semaine31_08_2010.jpeg" alt="Image de la semaine du 30.08.2010" width="642" height="642" /></a><p class="wp-caption-text">Source: http://www.picselate.com/real-life-keyboard-shortcuts</p></div>
<p><span id="more-366"></span></p>
<p>Pour mieux comprendre: CTRL+Z est le raccourcis clavier pour annuler la dernière modification d&#8217;un document, CTRL+V est le raccourcis pour coller un élément (ou plusieurs) et CTRL+X est celui pour couper.</p>
<p>Il existe pleins d&#8217;autres raccourcis clavier tels que CTRL+A (sélectionner tout) ou CTRL+C (copier). Vous trouverez la liste des raccourcis clavier les plus important <a href="http://www.pcastuces.com/pratique/windows/clavier/page1.htm">ici</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tunila.me/article/image-de-la-semaine/annuler-coller-et-couper.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 Buttons [Extension WordPress]</title>
		<link>http://tunila.me/article/web/wordpress/plugins/css3-buttons-extension-wordpress.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=css3-buttons-extension-wordpress</link>
		<comments>http://tunila.me/article/web/wordpress/plugins/css3-buttons-extension-wordpress.html#comments</comments>
		<pubDate>Tue, 17 Aug 2010 13:28:14 +0000</pubDate>
		<dc:creator>TuniLame</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://tunila.me/?p=351</guid>
		<description><![CDATA[CSS3 Buttons est un plugin WordPress qui permet d&#8217;ajouter un simple bouton CSS3 en utilisant un shortcode ([ button ]). Vous pouvez bien évidemment choisir une taille (parmi 4), une couleur (parmi 7), le lien et la cible de ce lien. Et si ces boutons ne vous suffisent pas, vous pouvez ajouter votre propre bouton [...]]]></description>
			<content:encoded><![CDATA[<p>CSS3 Buttons est un plugin WordPress qui permet d&#8217;ajouter un simple bouton CSS3 en utilisant un shortcode (<code>[ button ]</code>).</p>
<p>Vous pouvez bien évidemment choisir une taille (parmi 4), une couleur (parmi 7), le lien et la cible de ce lien. Et si ces boutons ne vous suffisent pas, vous pouvez ajouter votre propre bouton (qui sera utilisé comme bouton par défaut) avec une couleur que vous choisirez.</p>
<p><span id="more-351"></span></p>
<hr />
[ download id="12"]<br />
<img src="http://tunila.me/wp-content/uploads/plugins/nom.png" alt="css3 buttons" /></p>
<ul>
<li>Version: 0.1</li>
<li>Contributeurs: TuniLame</li>
<li>Tags: css3, button, shortcode</li>
<li>Requière minimum: 3.0</li>
<li>Testé jusqu&#8217;à: 3.0.1</li>
</ul>
<p>Ajouter des boutons CSS3 dans vos articles en utilisant un shortcode.</p>
<p><img src="http://tunila.me/wp-content/uploads/plugins/Description.png" alt="description" /></p>
<ul>
Ajouter des boutons CSS3 dans vos articles en utilisant un shortcode <code>[ button ]</code>.<br />
Vous serez en mesure de modifier la couleur, taille, le lien et sa cible et même ajouter un bouton par défaut pour vos articles.</p>
<p><strong>Langues:</strong> Anglais, Français
</ul>
<p><img src="http://tunila.me/wp-content/uploads/plugins/Installation.png" alt="Installation" /></p>
<ul>
<li>Uploader le dossier `css3-buttons` vers le dossier `/wp-content/plugins/` de votre installation WordPress</li>
<li>Activez l&#8217;extension depuis le menu &laquo;&nbsp;Extensions&nbsp;&raquo; de WordPress</li>
<li>Accédez à la page de configuration de l&#8217;extension pour modifier le bouton par défaut.</li>
<li>Pour ajouter un bouton personnalisé pour chaque article, ajoutez-y les attributs suivants avec le shortcode:<br />
<code>[ button color= size= link= target=]le texte qui va être afficher en tant que valeur du bouton[ /button]</code></p>
<p>Les attributs qui peuvent être utilisés: </p>
<ul>
<li><strong>color</strong>: 7 couleurs différentes sont disponibles: pink, magenta, green, red, orange, blue et yellow</li>
<li><strong>size</strong>: 4 tailles différentes sont disponibles: small, medium, large et super</li>
<li><strong>link</strong>: Le lien du bouton. Exemple: L&#8217;URL de votre site http:/monsite.com</li>
<li><strong>target</strong>: La cible du lien, peut être: blank, new, parent, self ou top</li>
</ul>
</li>
</ul>
<p><img src="http://tunila.me/wp-content/uploads/plugins/screenshots.png" alt="Screenshot" /></p>
<ul>
<a href="http://twitter.com/tunilame" target="_self"><div class="css3-button blue super">Follow me!</div></a> <a href="http://tunila.me" target="_self"><div class="css3-button green small">  download</div></a> <a href="http://tunila.me" target="_self"><div class="css3-button orange medium">Demo</div></a> <a href="http://tunila.me" target="_self"><div class="css3-button pink large">Go to my site</div></a> <a href="http://tunila.me" target="_self"><div class="css3-button magenta large">Try it!</div></a> <a href="http://tunila.me" target="_self"><div class="css3-button yellow large">What else?&#8230;</div></a> <a href="#" target="_self"><div class="css3-button custom large" style="background-color:#993300;">Default</div></a></ul>
<div id="attachment_353" class="wp-caption aligncenter" style="width: 862px"><a href="http://tunila.me/wp-content/uploads/2010/08/screenshot2.png" rel="lightbox[351]"><img src="http://tunila.me/wp-content/uploads/2010/08/screenshot2.png" alt="Panneau de configuration de l&#039;extension css3-buttons" width="852" height="679" class="size-full wp-image-353" /></a><p class="wp-caption-text">Panneau de configuration de l'extension css3-buttons</p></div>
<p><img src="http://tunila.me/wp-content/uploads/plugins/Changelog.png" alt="changelog" /><br />
= 0.1 =<br />
Première version.</p>
Note: There is a file embedded within this post, please visit this post to download the file.
]]></content:encoded>
			<wfw:commentRss>http://tunila.me/article/web/wordpress/plugins/css3-buttons-extension-wordpress.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>PHP: Calculez la différence entre deux temps</title>
		<link>http://tunila.me/article/web/webmaster/php-calculez-la-difference-entre-deux-temps-differents.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=php-calculez-la-difference-entre-deux-temps-differents</link>
		<comments>http://tunila.me/article/web/webmaster/php-calculez-la-difference-entre-deux-temps-differents.html#comments</comments>
		<pubDate>Wed, 21 Jul 2010 16:55:50 +0000</pubDate>
		<dc:creator>TuniLame</dc:creator>
				<category><![CDATA[Hypertext Preprocessor (PHP)]]></category>
		<category><![CDATA[Tutoriels]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[calculez]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[difference]]></category>
		<category><![CDATA[differents]]></category>
		<category><![CDATA[heures]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[temps]]></category>

		<guid isPermaLink="false">http://tunila.me/?p=303</guid>
		<description><![CDATA[Si vous travaillez a l&#8217;heure, vous aurez surement besoin de ce tout petit script. En effet, il permet de calculer la différence entre 2 heures. Alors, qu&#8217;attendez-vous? Le CSS #full { padding:15px; background: #000; border: #666 solid 2px; margin:30px auto auto auto; color:#FFF; width:400px; text-align:center; } .ok, .error { font-size:18px; padding:10px; margin-bottom:20px; } .ok { [...]]]></description>
			<content:encoded><![CDATA[<p>Si vous travaillez a l&#8217;heure, vous aurez surement besoin de ce tout petit script. En effet, il permet de calculer la différence entre 2 heures.</p>
<p>Alors, qu&#8217;attendez-vous? <span id="more-303"></span></p>
<hr />
 <a href="http://tunila.me/demos/calculez-la-difference-entre-deux-temps-differents" target="_self"><div class="css3-button blue large">Demonstration</div></a>    <a href="http://tunila.me/download/10" target="_self"><div class="css3-button red large">Télécharger</div></a></p>
<hr />
<h2>Le CSS</h2>
<pre>#full {
	padding:15px;
	background: #000;
	border: #666 solid 2px;
	margin:30px auto auto auto;
	color:#FFF;
	width:400px;
	text-align:center;
}
.ok, .error {

	font-size:18px;
	padding:10px;
	margin-bottom:20px;
}
.ok {
	background:#0C0;
	border:#060 solid 1px;
}
.error {
	background: #de0404;
	border:#F00;
}
</pre>
<p>Dans notre cas, le CSS est trés basique vu qu&#8217;il sert juste a aligner la &laquo;&nbsp;boite&nbsp;&raquo; (div) du formulaire en centre et pour que les deux message (erreur et succés) soient mieux compréhensible.</p>
<h2>Le PHP</h2>
<pre>
<div>
&lt;?php
$hdeb=&#039;&#039;;
$hfin=&#039;&#039;;
if (isset($_GET[&#039;deb&#039;]) &amp;&amp; $_GET[&#039;deb&#039;]!=&quot;&quot; &amp;&amp; count(explode(&quot;:&quot;,$_GET[&#039;deb&#039;]))==3) {
	$hdeb=$_GET[&#039;deb&#039;];
	$hfin=$_GET[&#039;fin&#039;];
function difheure($heuredeb,$heurefin)
// J&#039;ai trouvé cette fonction sur cette page: http://www.asp-php.net/ressources/bouts_de_code.aspx?id=799
// Merci à DB77 pour cette fonction.
{
   $hd=explode(&quot;:&quot;,$heuredeb);
   $hf=explode(&quot;:&quot;,$heurefin);
   $hd[0]=(int)($hd[0]);$hd[1]=(int)($hd[1]);$hd[2]=(int)($hd[2]);
   $hf[0]=(int)($hf[0]);$hf[1]=(int)($hf[1]);$hf[2]=(int)($hf[2]);
   if($hf[2]&lt;$hd[2]){$hf[1]=$hf[1]-1;$hf[2]=$hf[2]+60;}
   if($hf[1]&lt;$hd[1]){$hf[0]=$hf[0]-1;$hf[1]=$hf[1]+60;}
   if($hf[0]&lt;$hd[0]){$hf[0]=$hf[0]+24;}
   return (($hf[0]-$hd[0]).&quot;:&quot;.($hf[1]-$hd[1]).&quot;:&quot;.($hf[2]-$hd[2]));
}
// Appel
echo &#039;
<div class="ok">La difference d\'heure est : '.difheure($hdeb,$hfin).'</div>

';
} else if (isset($_GET['deb'])==false){
	echo '
<div class="ok">Veuillez rempire les champs celon ce format: hh:mm:ss</div>

';
} else
{
echo '
<div class="error">Erreur: Verifiez les champs</div>

';
}
?&gt;
</pre>
<p>D&#8217;abord, J&#8217;ai commencé par initialisé à vide les 2 variables <code>$hdeb</code> et <code>$hfin</code> qui vont contenir respectivement l&#8217;heure de début et l&#8217;heure de fin.<br />
Ensuite, une condition vérifie s&#8217;il y a <em>deb</em> envoyé comme paramètre et si ce même <em>deb</em> n&#8217;est pas vide (chaine de caractère). Pour la dernière, j&#8217;avais voulu ajouté la vérification de la taille du tableau, qui est crée a partir d&#8217;<code>explode()</code>, est égale a 3, vu que notre chaine <code>$_GET['deb']</code> est composé de 3 sous-chaines (si quelqu&#8217;un a une meilleur idée, qu&#8217;il m&#8217;informe par commentaire car je pense que la dernier partie n&#8217;est pas à 100% fiable):</p>
<pre>if (isset($_GET['deb']) &amp;&amp; $_GET['deb']!="" &amp;&amp; count(explode(":",$_GET['deb']))==3)</pre>
<p>Si cette condition est vérifié, on déclare la fonction <code>difheure()</code> (que j&#8217;ai trouvé sur <a href="http://www.asp-php.net/ressources/bouts_de_code.aspx?id=799">ce site</a> en passant, merci a DB77 pour l&#8217;avoir concu) pour l&#8217;appeler juste aprés et ainsi avoir la différence d&#8217;heure:</p>
<pre>
function difheure($heuredeb,$heurefin)
// J'ai trouvé cette fonction sur cette page: http://www.asp-php.net/ressources/bouts_de_code.aspx?id=799
// Merci à DB77 pour cette fonction.
{
   $hd=explode(":",$heuredeb);
   $hf=explode(":",$heurefin);
   $hd[0]=(int)($hd[0]);$hd[1]=(int)($hd[1]);$hd[2]=(int)($hd[2]);
   $hf[0]=(int)($hf[0]);$hf[1]=(int)($hf[1]);$hf[2]=(int)($hf[2]);
   if($hf[2]&lt;$hd[2]){$hf[1]=$hf[1]-1;$hf[2]=$hf[2]+60;}
   if($hf[1]&lt;$hd[1]){$hf[0]=$hf[0]-1;$hf[1]=$hf[1]+60;}
   if($hf[0]&lt;$hd[0]){$hf[0]=$hf[0]+24;}
   return (($hf[0]-$hd[0]).&quot;:&quot;.($hf[1]-$hd[1]).&quot;:&quot;.($hf[2]-$hd[2]));
}
// Appel
echo &#039;
<div class="ok">La difference d\'heure est : '.difheure($hdeb,$hfin).'</div>

';
</pre>
<p>Si la condition précédente est fausse et <code>$_GET['deb']</code> n&#8217;existe pas, on affiche un petit message pour que l&#8217;utilisateur remplis les champs<br />
Sinon, on affiche une erreur:</p>
<pre>
else if (isset($_GET['deb'])==false){
	echo '
<div class="ok">Veuillez rempire les champs celon ce format: hh:mm:ss</div>

';
} else
{
echo '
<div class="error">Erreur: Verifiez les champs</div>

';
}
</pre>
<h2>Le (x)HTML</h2>
<p>Juste un petit formulaire (et la fermeture de la div):</p>
<pre>
<form name="DiffHeure" method="get">
Heure de debut? Format 08:30:00        &lt;input type=&quot;text&quot; name=&quot;deb&quot; value=&quot;"/&gt;

Heure de fin? Format 08:30:00              &lt;input type=&quot;text&quot; name=&quot;fin&quot; value=&quot;"/&gt;
</form>
</div>
</pre>
<hr />
 <a href="http://tunila.me/demos/calculez-la-difference-entre-deux-temps-differents" target="_self"><div class="css3-button blue large">Demonstration</div></a>    <a href="http://tunila.me/download/10" target="_self"><div class="css3-button red large">Télécharger</div></a></p>
<hr />
J&#8217;éspere que ce petit tutoriel vous a plu.</p>
]]></content:encoded>
			<wfw:commentRss>http://tunila.me/article/web/webmaster/php-calculez-la-difference-entre-deux-temps-differents.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.846 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-06 11:46:49 -->
<!-- Compression = gzip -->
