<?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>Blog de Nico-pyright(c)</title>
	<atom:link href="https://blog.developpez.com/nico-pyright/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.developpez.com/nico-pyright</link>
	<description></description>
	<lastBuildDate>Mon, 08 Apr 2013 09:26:35 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>MVP Visual C# pour 2013</title>
		<link>https://blog.developpez.com/nico-pyright/p11626/c/mvp-visual-c-pour-2013</link>
		<comments>https://blog.developpez.com/nico-pyright/p11626/c/mvp-visual-c-pour-2013#comments</comments>
		<pubDate>Thu, 03 Jan 2013 09:06:02 +0000</pubDate>
		<dc:creator><![CDATA[nico-pyright(c)]]></dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://blog.developpez.com/nico-pyright/?p=133</guid>
		<description><![CDATA[J&#8217;ai le plaisir d&#8217;être renouvelé MVP encore une année, et comme l&#8217;année dernière pour la catégorie Visual C#. Merci à Microsoft de me renouveler une septième fois sa confiance et c&#8217;est toujours avec plaisir que j&#8217;apprécie partager mes aventures .NET avec vous. J&#8217;en profite pour vous souhaiter une très bonne année, en espérant que vous avez eu plein de Windows Phone 8 sous le sapin]]></description>
				<content:encoded><![CDATA[<p>J&rsquo;ai le plaisir d&rsquo;être renouvelé MVP encore une année, et comme l&rsquo;année dernière pour la catégorie Visual C#.</p>
<p>Merci à Microsoft de me renouveler une septième fois sa confiance et c&rsquo;est toujours avec plaisir que j&rsquo;apprécie partager mes aventures .NET avec vous.</p>
<p>J&rsquo;en profite pour vous souhaiter une très bonne année, en espérant que vous avez eu plein de Windows Phone 8 sous le sapin <img src="https://blog.developpez.com/nico-pyright/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sortie de mon livre : Apprenez à développer en C# &#8211; La programmation C# .Net expliquée aux débutants</title>
		<link>https://blog.developpez.com/nico-pyright/p10921/c/sortie_de_mon_livre_apprenez_a_developpe</link>
		<comments>https://blog.developpez.com/nico-pyright/p10921/c/sortie_de_mon_livre_apprenez_a_developpe#comments</comments>
		<pubDate>Thu, 05 Apr 2012 12:37:53 +0000</pubDate>
		<dc:creator><![CDATA[nico-pyright(c)]]></dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Livres]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Bonjour, j&#8217;ai le plaisir de vous annoncer la sortie de mon livre, que j&#8217;ai écrit en partenariat avec le site du zéro. Il s&#8217;agit d&#8217;un livre permettant d&#8217;apprendre le C#. Il est orienté débutant dans la mesure où vous avez juste besoin de savoir allumer un PC pour le suivre. Au menu : Qu’est-ce que la programmation ? Quel langage choisir ? Pourquoi C# ? Installez Visual C# 2010 Express (gratuitement) et écrivez votre premier [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Bonjour,</p>
<p>j&rsquo;ai le plaisir de vous annoncer la sortie de mon livre, que j&rsquo;ai écrit en partenariat avec le site du zéro.</p>
<p><img src="http://ecx.images-amazon.com/images/I/413C2%2B6PfJL._SL500_AA300_.jpg" alt="Apprendre le C#" title="Livre C#" /></p>
<p>Il s&rsquo;agit d&rsquo;un livre permettant d&rsquo;apprendre le C#. Il est orienté débutant dans la mesure où vous avez juste besoin de savoir allumer un PC pour le suivre.</p>
<p>Au menu :</p>
<ul>
<li>Qu’est-ce que la programmation ? Quel langage choisir ? Pourquoi C# ?</li>
<li>Installez Visual C# 2010 Express (gratuitement) et écrivez votre premier programme</li>
<li>Apprenez à manipuler les variables, les méthodes, les boucles…</li>
<li>Initiez-vous aux concepts de la programmation orientée objet</li>
<li>Pratiquez grâce aux TP : créez un jeu, une application de gestion bancaire, un simulateur de météo…</li>
<li>Connectez-vous aux bases de données avec Entity Framework</li>
<li>Découvrez les applications que l&rsquo;on peut développer en C#</li>
</ul>
<p>Bref, plein de petites choses dans un style où on ne se prend pas la tête, pour vous permettre de démarrer dans l&rsquo;apprentissage du C#, et tout en couleur !!</p>
<p><a href="http://www.amazon.fr/Apprenez-d%C3%A9velopper-programmation-expliqu%C3%A9e-d%C3%A9butants/dp/2953527869/">Voir le livre sur Amazon</a></p>
<p><img src="http://uploads.siteduzero.com/files/365001_366000/365357.jpg" alt="Dos du livre C#" title="Dos du livre apprendre le C#" width="300px" /></p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MVP Visual C# pour 2012</title>
		<link>https://blog.developpez.com/nico-pyright/p10627/c/mvp_visual_c_pour_2012</link>
		<comments>https://blog.developpez.com/nico-pyright/p10627/c/mvp_visual_c_pour_2012#comments</comments>
		<pubDate>Tue, 03 Jan 2012 20:55:19 +0000</pubDate>
		<dc:creator><![CDATA[nico-pyright(c)]]></dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Après avoir été nominé MVP Visual C++ en 2007, puis MVP ASP.NET en 2010, me voilà désormais MVP Visual C# pour 2012. Je reconnais que ce blog est de moins en moins mis à jour mais je vais essayer de me rattraper Merci encore à Microsoft de me renouveler sa confiance. J&#8217;en profite au passage pour vous souhaitez à tous une bonne année, pleine de C# et de .NET.]]></description>
				<content:encoded><![CDATA[<p>Après avoir été nominé MVP Visual C++ en 2007, puis MVP ASP.NET en 2010, me voilà désormais MVP Visual C# pour 2012.</p>
<p>Je reconnais que ce blog est de moins en moins mis à jour mais je vais essayer de me rattraper <img src="https://blog.developpez.com/nico-pyright/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /></p>
<p>Merci encore à Microsoft de me renouveler sa confiance. J&rsquo;en profite au passage pour vous souhaitez à tous une bonne année, pleine de C# et de .NET.</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Retour d’expérience sur MVVM</title>
		<link>https://blog.developpez.com/nico-pyright/p10065/silverlight/retour_d_experience_sur_mvvm</link>
		<comments>https://blog.developpez.com/nico-pyright/p10065/silverlight/retour_d_experience_sur_mvvm#comments</comments>
		<pubDate>Thu, 16 Jun 2011 23:00:00 +0000</pubDate>
		<dc:creator><![CDATA[nico-pyright(c)]]></dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[J’ai lu il y a quelques temps un billet d’Olivier Dahan où, par un titre accrocheur, il proposait son retour d’expérience sur MVVM en proposant de bruler le pattern (voir http://www.e-naxos.com/Blog/post/2011/05/20/Faut-il-bruler-la-pattern-MVVM-.aspx) Comme ca fait quelques temps que je n’ai pas écrit de billet et que j’ai envie de partager mon expérience sur le sujet, j’en profite Je suis globalement d’accord avec lui, respecter tout MVVM n’est pas forcément toujours judicieux. Il faut l’adapter aux besoins [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>J’ai lu il y a quelques temps un billet d’Olivier Dahan où, par un titre accrocheur, il proposait son retour d’expérience sur MVVM en proposant de bruler le pattern (voir <a href="http://www.e-naxos.com/Blog/post/2011/05/20/Faut-il-bruler-la-pattern-MVVM-.aspx">http://www.e-naxos.com/Blog/post/2011/05/20/Faut-il-bruler-la-pattern-MVVM-.aspx</a>)</p>
<p>Comme ca fait quelques temps que je n’ai pas écrit de billet et que j’ai envie de partager mon expérience sur le sujet, j’en profite <img src="https://blog.developpez.com/nico-pyright/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
<p>Je suis globalement d’accord avec lui, respecter tout MVVM n’est pas forcément toujours judicieux. Il faut l’adapter aux besoins de l’application.</p>
<p>En général, j’adapte mon utilisation de MVVM en fonction de l’application que je crée. Par contre, aujourd’hui, je ne concevrai pas de créer une application sans MVVM.</p>
<p>Je trouve que le découplage est beaucoup plus clair et j’ai remarqué pour ma part que j’écris plus rapidement mon application en utilisant un viewmodel qu’en utilisant le code behind. De même, un ressenti totalement subjectif et pifométrique me fait trouver que je fais moins de bugs.</p>
<p>Donc, une application sans mvvm ? non. Maintenant que j’y ai gouté, je ne peux plus m’en passer. Par contre, suivant l’application, je respecte plus ou moins le pattern.</p>
<p>Je trouve qu’un des valeurs ajoutées du pattern est qu’il force à utiliser le mécanisme de binding. Il est trop tentant (pour aller vite) de faire du monTextBlock.Text = “…”. </p>
<p>Pour moi ca n’apporte rien, à part des bugs <img src="https://blog.developpez.com/nico-pyright/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
<p>J’ai vu trop de gens ne rien comprendre au binding et c’est bien dommage. Donc oui au binding, forcé par mvvm.</p>
<p>Je suis d’accord qu’on peut se demander vraiment l’utilité d’un locator et en général, pour une petite application rapide, je ne m’en sers pas. Par contre, je rajoute dès que possible l’utilisation des commandes, notamment grâce à la classe RelayCommand qu’on trouve dans MVVM-Light.</p>
<p>Il est vrai que pour une application rapide, pour un test ou autre, j’ai tendance à ne pas embarquer de dépendances (donc pas de RelayCommand ou autres systèmes de messagerie) et donc j’utilise le code-behind pour récupérer mon viewmodel et lancer les commandes. Ca créé un couplage, mais est-ce bien grave ?</p>
<p>Par contre, dès que l’application est un tant soit peu sérieuse, on ne peut pas s’en passer.</p>
<p>Je partage également le point de vue d’Olivier qui dit qu’on peut vite se perdre avec un système de messagerie (je n’utilise pas celui de MVVM-Light). J’ai l’impression de m’en sortir mieux maintenant en me fixant quelques règles de nommages, d’utilisation. Il est vrai qu’il n’y a pas de guidelines pour et qu’au démarrage on peut vite s’embrouiller… mais avec un peu de pratique, je trouve qu’on peut l’utiliser avec profit.</p>
<p>Les boites de dialogues ? Oui, c’est vrai, c’est casse-pied <img src="https://blog.developpez.com/nico-pyright/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> Mais comme j’ai tendance à ne pas trop en faire et plutôt à afficher des confirmations sous une autre forme, ca ne m’embête pas trop trop. Quand j’en ai besoin, le système de messagerie me rend bien des services.</p>
<p>Les tests unitaires ? J’ai beau être un adepte convaincu du testing, j’avoue ne pas m’en servir pour tester les viewmodels. Je préfère blinder la couche d’accès aux données ou la couche de service.</p>
<p>Dans un des commentaires, on peut lire une remarque sur la création de contrôles personnalisés remplies de DependencyProperty juste pour faire du MVVM qui, pour le commentateur, est un problème. Il est vrai que créer des contrôles utilisateurs juste pour ca, c’est un peu dommage. Par contre, dans certains cas, je trouve que ca apporte un découplage complémentaire et offre une réutilisabiilté. Certains behavior sont tout à fait pertinent.</p>
<p>Bref, voici mon retour d’expérience.</p>
<p>En conclusion : Oui pour MVVM, il faut dans un premier temps faire dans l’extrémisme pour pouvoir comprendre et apprécier les avantages du patron de conception et ensuite y revenir et l’adapter vraiment au besoin.</p>
<p>Et vous ? Votre expérience ?</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Renouvellement MVP ASP.NET pour 2011</title>
		<link>https://blog.developpez.com/nico-pyright/p9627/asp-net/renouvellement_mvp_asp_net_pour_2011</link>
		<comments>https://blog.developpez.com/nico-pyright/p9627/asp-net/renouvellement_mvp_asp_net_pour_2011#comments</comments>
		<pubDate>Mon, 03 Jan 2011 20:12:37 +0000</pubDate>
		<dc:creator><![CDATA[nico-pyright(c)]]></dc:creator>
				<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Tout est dans le titre : je suis à nouveau MVP ASP.NET pour l&#8217;année 2011. J&#8217;en profite pour vous souhaiter à tous une très bonne année 2011, qu&#8217;elle soit riche en projet de toutes sortes.]]></description>
				<content:encoded><![CDATA[<p>Tout est dans le titre : je suis à nouveau MVP ASP.NET pour l&rsquo;année 2011.</p>
<p>J&rsquo;en profite pour vous souhaiter à tous une très bonne année 2011, qu&rsquo;elle soit riche en projet de toutes sortes.</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tutoriel : naviguer entre les pages de vos applications Silverlight pour Windows Phone 7</title>
		<link>https://blog.developpez.com/nico-pyright/p9580/c/tutoriel_naviguer_entre_les_pages_de_vos_7</link>
		<comments>https://blog.developpez.com/nico-pyright/p9580/c/tutoriel_naviguer_entre_les_pages_de_vos_7#comments</comments>
		<pubDate>Tue, 14 Dec 2010 23:00:00 +0000</pubDate>
		<dc:creator><![CDATA[nico-pyright(c)]]></dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Windows Phone 7 (WP7) est la nouvelle plateforme de développement de Microsoft destinée aux smartphones. Dans un premier tutoriel, nous avons pu voir une introduction au développement WP7. Dans le second, nous avons pu voir comment utiliser la ListBox et l&#8217;Isolated Storage. Dans le troisième, vous avez pu découvrir comment utiliser le contrôle pivot, son système de swipe et comment accéder à des ressources sur le net. Dans celui-ci, nous allons voir comment naviguer entre [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Windows Phone 7 (WP7) est la nouvelle plateforme de développement de Microsoft destinée aux smartphones.</p>
<p>Dans un premier tutoriel, nous avons <a href="http://nico-pyright.developpez.com/tutoriel/vs2010/csharp/windows-phone-seven/introduction-developpement-windows-phone-seven-wp7-silverlight/">pu voir une introduction au développement WP7</a>.<br />
Dans le second, nous avons pu voir <a href="http://nico-pyright.developpez.com/tutoriel/vs2010/csharp/windows-phone-seven/listbox-isolated-storage-wp7-silverlight/">comment utiliser la ListBox et l&rsquo;Isolated Storage</a>.<br />
Dans le troisième, vous avez <a href="http://nico-pyright.developpez.com/tutoriel/vs2010/csharp/windows-phone-seven/web-service-control-pivot-wp7-silverlight/">pu découvrir comment utiliser le contrôle pivot, son système de swipe et comment accéder à des ressources sur le net</a>.</p>
<p>Dans celui-ci, nous allons voir comment naviguer entre les pages d&rsquo;une application Silverlight pour Windows Phone 7. Nous verrons également que le bouton &laquo;&nbsp;Back&nbsp;&raquo; du téléphone s&rsquo;interface parfaitement avec le framework de navigation de Silverlight pour WP7. Nous verrons enfin comment faire passer des informations entre les pages. </p>
<p>http://nico-pyright.developpez.com/tutoriel/vs2010/csharp/windows-phone-seven/navigation-silverlight-wp7/</p>
<p>Bonne lecture</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutoriel : appeler des services web et utiliser le contrôle Pivot dans vos applications Windows Phone 7</title>
		<link>https://blog.developpez.com/nico-pyright/p9545/c/tutoriel_appeler_des_services_web_et_uti_7</link>
		<comments>https://blog.developpez.com/nico-pyright/p9545/c/tutoriel_appeler_des_services_web_et_uti_7#comments</comments>
		<pubDate>Tue, 30 Nov 2010 23:00:00 +0000</pubDate>
		<dc:creator><![CDATA[nico-pyright(c)]]></dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Windows Phone 7 (WP7) est la nouvelle plateforme de développement de Microsoft destinée aux smartphones. Dans un premier tutoriel, nous avons pu voir une introduction au développement WP7. Dans le second, nous avons pu voir comment utiliser la ListBox et l&#8217;Isolated Storage. Dans celui-ci, à travers la création d&#8217;une application de météo, vous découvrirez comment faire appel à des ressources sur le web. Vous verrez également comment utiliser le contrôle Pivot, un des contrôles les [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Windows Phone 7 (WP7) est la nouvelle plateforme de développement de Microsoft destinée aux smartphones.</p>
<p>Dans un premier tutoriel, nous avons <a href="http://nico-pyright.developpez.com/tutoriel/vs2010/csharp/windows-phone-seven/introduction-developpement-windows-phone-seven-wp7-silverlight/">pu voir une introduction au développement WP7</a>.<br />
Dans le second, nous avons pu voir <a href="http://nico-pyright.developpez.com/tutoriel/vs2010/csharp/windows-phone-seven/listbox-isolated-storage-wp7-silverlight/">comment utiliser la ListBox et l&rsquo;Isolated Storage</a>.</p>
<p>Dans celui-ci, à travers la création d&rsquo;une application de météo, vous découvrirez comment faire appel à des ressources sur le web. Vous verrez également comment utiliser le contrôle Pivot, un des contrôles les plus importants lors du développement d&rsquo;applications pour Windows Phone 7. Il permet de gérer facilement la navigation horizontale, avec ce qu&rsquo;on appelle le swipe et qui permet de simuler un comportement où l&rsquo;utilisateur pose son doigt sur l&rsquo;écran et le fait glisser vers la droite ou la gauche, comme s&rsquo;il tournait une page.</p>
<p>http://nico-pyright.developpez.com/tutoriel/vs2010/csharp/windows-phone-seven/web-service-control-pivot-wp7-silverlight/</p>
<p>Bonne lecture</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutoriel : Utiliser la ListBox et l&#8217;Isolated Storage dans vos applications Windows Phone 7 avec Silverlight</title>
		<link>https://blog.developpez.com/nico-pyright/p9526/c/tutoriel_utiliser_la_listbox_et_l_isolat</link>
		<comments>https://blog.developpez.com/nico-pyright/p9526/c/tutoriel_utiliser_la_listbox_et_l_isolat#comments</comments>
		<pubDate>Mon, 22 Nov 2010 23:00:00 +0000</pubDate>
		<dc:creator><![CDATA[nico-pyright(c)]]></dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Windows Phone 7 (WP7) est la nouvelle plateforme de développement de Microsoft destinée aux smartphones. Dans un premier tutoriel, nous avons pu voir une introduction au développement WP7. Dans ce deuxième tutoriel, vous découvrirez la puissance du contrôle ListBox WP7 et comment il s&#8217;adapte au développement sur téléphone. Vous verrez aussi comment traiter des événements simples, comme un click sur un bouton par exemple. Vous verrez enfin comment faire persister de l&#8217;information entre les différents [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Windows Phone 7 (WP7) est la nouvelle plateforme de développement de Microsoft destinée aux smartphones.</p>
<p>Dans un premier tutoriel, <a href="http://nico-pyright.developpez.com/tutoriel/vs2010/csharp/windows-phone-seven/introduction-developpement-windows-phone-seven-wp7-silverlight/">nous avons pu voir une introduction au développement WP7</a>.</p>
<p>Dans ce deuxième tutoriel, vous découvrirez la puissance du contrôle ListBox WP7 et comment il s&rsquo;adapte au développement sur téléphone.<br />
Vous verrez aussi comment traiter des événements simples, comme un click sur un bouton par exemple.<br />
Vous verrez enfin comment faire persister de l&rsquo;information entre les différents démarrages du téléphone et lorsque l&rsquo;application est suspendue.</p>
<p>http://nico-pyright.developpez.com/tutoriel/vs2010/csharp/windows-phone-seven/listbox-isolated-storage-wp7-silverlight/</p>
<p>Bonne lecture</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tutoriel : introduction au développement d&#8217;applications Windows Phone 7</title>
		<link>https://blog.developpez.com/nico-pyright/p9484/c/tutoriel_introduction_au_developpement_d_7</link>
		<comments>https://blog.developpez.com/nico-pyright/p9484/c/tutoriel_introduction_au_developpement_d_7#comments</comments>
		<pubDate>Sun, 14 Nov 2010 23:00:00 +0000</pubDate>
		<dc:creator><![CDATA[nico-pyright(c)]]></dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Windows Phone 7 (WP7) est la nouvelle plateforme de développement de Microsoft destinée aux smartphones. Dans ce premier tutoriel, vous découvrirez comment démarrer le développement d&#8217;applications avec Windows Phone 7. Nous commencerons par installer les outils nécessaires au développement sur WP7 puis nous créerons un premier programme simpliste en utilisant Silverlight pour WP7. Enfin, nous l&#8217;exécuterons sur l&#8217;émulateur et découvrirons son fonctionnement. Bonne lecture : http://nico-pyright.developpez.com/tutoriel/vs2010/csharp/windows-phone-seven/introduction-developpement-windows-phone-seven-wp7-silverlight/]]></description>
				<content:encoded><![CDATA[<p>Windows Phone 7 (WP7) est la nouvelle plateforme de développement de Microsoft destinée aux smartphones.</p>
<p>Dans ce premier tutoriel, vous découvrirez comment démarrer le développement d&rsquo;applications avec Windows Phone 7.<br />
Nous commencerons par installer les outils nécessaires au développement sur WP7 puis nous créerons un premier programme simpliste en utilisant Silverlight pour WP7.<br />
Enfin, nous l&rsquo;exécuterons sur l&rsquo;émulateur et découvrirons son fonctionnement.</p>
<p>Bonne lecture : http://nico-pyright.developpez.com/tutoriel/vs2010/csharp/windows-phone-seven/introduction-developpement-windows-phone-seven-wp7-silverlight/</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[C] Implémentation de l’algo de Dijkstra en C</title>
		<link>https://blog.developpez.com/nico-pyright/p9300/cc-win32/c_implementation_de_l_algo_de_dijkstra_e</link>
		<comments>https://blog.developpez.com/nico-pyright/p9300/cc-win32/c_implementation_de_l_algo_de_dijkstra_e#comments</comments>
		<pubDate>Sat, 18 Sep 2010 14:41:00 +0000</pubDate>
		<dc:creator><![CDATA[nico-pyright(c)]]></dc:creator>
				<category><![CDATA[C/C++ - Win32]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[J’ai eu besoin d’utiliser l’algo bien connu de Dijkstra pour trouver un plus court chemin entre 2 points. Le principe est très bien expliqué sur wikipédia, mais j’avais besoin d’une implémentation en C. Après quelques recherches, je suis tombé sur cette page qui m’offre l’aglo tout cuit, mais sans son utilisation. Je montre ici comment l’utiliser après une ou deux corrections de coquille dans l’algo trouvé. Il faut dans un premier temps une matrice adjacente, [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>J’ai eu besoin d’utiliser l’algo bien connu de Dijkstra pour trouver un plus court chemin entre 2 points. Le principe est très bien expliqué sur <a href="http://fr.wikipedia.org/wiki/Algorithme_de_Dijkstra" target="_blank">wikipédia</a>, mais j’avais besoin d’une implémentation en C.</p>
<p>Après quelques recherches, je suis tombé sur <a href="http://www.answers.com/topic/dijkstra-s-algorithm-1" target="_blank">cette page</a> qui m’offre l’aglo tout cuit, mais sans son utilisation.</p>
<p>Je montre ici comment l’utiliser après une ou deux corrections de coquille dans l’algo trouvé.</p>
<p>Il faut dans un premier temps une matrice adjacente, qui peut être de cette forme :</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #cc6633">#define</span> INFINI 10000</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #cc6633">#define</span> NB_SOMMET 6</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>&#160; </pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #0000ff">int</span> mat[NB_SOMMET][NB_SOMMET] =  </pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>     {{ 0, 171, INFINI, INFINI, INFINI, INFINI},</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     {171,   0,  30, INFINI, INFINI, INFINI},</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     {INFINI,  30,   0, INFINI,  39,  13},</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>     {INFINI, INFINI, INFINI,   0,  30, INFINI},</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     {INFINI, INFINI, 39,   30,   0,  26},</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>     {INFINI, INFINI,  13, INFINI,  26,   0}};</pre>
</div>
</div>
<p>On a une constante “Infini” qui est suffisamment grande, c’est à dire plus grande que la distance maxi entre 2 sommets. Et une matrice carrée contenant la distance entre chaque sommet.</p>
<p>Ensuite la méthode avec les 2-3 trucs corrigés :</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">void</span> dodijkstra(<span style="color: #0000ff">int</span> sr,<span style="color: #0000ff">int</span> ds, <span style="color: #0000ff">int</span> path[])</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     <span style="color: #0000ff">if</span> (sr == ds)</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>         <span style="color: #0000ff">return</span>;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>&#160; </pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     <span style="color: #0000ff">struct</span> node</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>         <span style="color: #0000ff">int</span> pre;   <span style="color: #008000">/* Predecessor */</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>         <span style="color: #0000ff">int</span> length; <span style="color: #008000">/* Length between the nodes */</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>         <span style="color: #0000ff">enum</span> {perm,tent} label; <span style="color: #008000">/* Enumeration for permanent and tentative labels */</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>     }state[NB_SOMMET];</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>         </pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>         <span style="color: #0000ff">int</span> i,k,min;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>         <span style="color: #0000ff">struct</span> node *p;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>         <span style="color: #008000">/* Initialisation of the nodes aka First step of Dijkstra Algo */</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>         <span style="color: #0000ff">for</span>(p=&amp;state[0];p&lt;&amp;state[NB_SOMMET];p++)</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>         {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>            p-&gt;pre= -1;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>            p-&gt;length=INFINI;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>            p-&gt;label=node::tent;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>         }</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>         state[ds].length=0; <span style="color: #008000">/* Destination length set to zero */</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>         state[ds].label=node::perm; <span style="color: #008000">/* Destination set to be the permanent node */</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>         k=ds; <span style="color: #008000">/* initial working node */</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span>         <span style="color: #008000">/* Checking for a better path from the node k ? */</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span>         <span style="color: #0000ff">do</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>         {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>            <span style="color: #0000ff">for</span>(i=0;i&lt;NB_SOMMET;i++)</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span>               {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30">  30:</span>                   <span style="color: #0000ff">if</span>(mat[k][i]!=0 &amp;&amp; state[i].label==node::tent)</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31">  31:</span>                      {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32">  32:</span>                         <span style="color: #0000ff">if</span>((state[k].length+mat[k][i])&lt;state[i].length)</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33">  33:</span>                            {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34">  34:</span>                                state[i].pre=k;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35">  35:</span>                                state[i].length=state[k].length+mat[k][i];</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36">  36:</span>                            }</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37">  37:</span>                      }</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38">  38:</span>               }</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39">  39:</span>              k=0;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40">  40:</span>              min=INFINI;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41">  41:</span>               <span style="color: #008000">/* Find a node which is tentatively labeled and with minimum label */</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42">  42:</span>               <span style="color: #0000ff">for</span>(i=0;i&lt;NB_SOMMET;i++)</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43">  43:</span>               {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44">  44:</span>                  <span style="color: #0000ff">if</span>(state[i].label==node::tent &amp;&amp; state[i].length&lt;min)</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum45">  45:</span>                     {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum46">  46:</span>                         min=state[i].length;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum47">  47:</span>                         k=i;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum48">  48:</span>                     }</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum49">  49:</span>               }</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum50">  50:</span>               state[k].label=node::perm;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum51">  51:</span>         } <span style="color: #0000ff">while</span>(k!=sr);</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum52">  52:</span>         </pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum53">  53:</span>         i=0;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum54">  54:</span>         k=sr;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum55">  55:</span>         <span style="color: #008000">/* Print the path to the output array */</span></pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum56">  56:</span>         <span style="color: #0000ff">do</span> </pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum57">  57:</span>         {</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum58">  58:</span>             path[i++]=k;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum59">  59:</span>             k=state[k].pre;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum60">  60:</span>         } <span style="color: #0000ff">while</span>(k&gt;=0);</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum61">  61:</span>         path[i]=k;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum62">  62:</span> }</pre>
</div>
</div>
<p>et enfin, l’appel de la méthode :</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">int</span> path[150];</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> z = 0 ; z &lt; 150 ; z++)</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     path[z] = -1;</pre>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> dodijkstra(sommetSource, sommetDestination, path);</pre>
</div>
</div>
<p>On initialise le tableau de résultat. Ici j’ai pris 150 arbitrairement, le but est que le tableau puisse contenir toutes les étapes intermédiaires.</p>
<p>L’algorithme nous rempli le tableau avec le trajet optimal.</p>
<p>path[0] contiendra la source<br />
path[i] contient les différents sommets intermédiaires<br />
path[n] contient la destination<br />
path[n-&gt;150] contient -1</p>
<p>Simple et efficace !</p>
]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
