<?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>Serenity &#187; VB</title>
	<atom:link href="http://seanchenxi.com/tag/vb/feed" rel="self" type="application/rss+xml" />
	<link>http://seanchenxi.com</link>
	<description>-非淡泊无以明志，非宁静无以致远</description>
	<lastBuildDate>Wed, 16 Dec 2009 22:15:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>VB-Simulation du jeu ultimatum</title>
		<link>http://seanchenxi.com/simulation-du-jeu-ultimatum-vb.html</link>
		<comments>http://seanchenxi.com/simulation-du-jeu-ultimatum-vb.html#comments</comments>
		<pubDate>Sat, 24 May 2008 12:57:22 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Français]]></category>
		<category><![CDATA[Jeu]]></category>
		<category><![CDATA[Programmation]]></category>
		<category><![CDATA[Ultimatum]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://seanchenxi.com/?p=84</guid>
		<description><![CDATA[&#160;&#160;&#160; Salut ! Tout le monde, je vous repr&#233;sente d&#8217;ici un jeu&#160;de programmation&#160;int&#233;ressant que nous avons r&#233;alis&#233;&#160;en&#160;utilisant&#160;VB pendant&#160;ce semestre &#224; l&#8217;universit&#233;. Pour qu&#8217;on&#160;peut partager&#160;les exp&#233;riences et se progresser. Sujet : Le jeu de l&#8217;ultimatum se pr&#233;sente de la fa&#231;on suivante : 2 individus (A et B) se partagent une somme S = 100 ; A [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left">&nbsp;&nbsp;&nbsp; Salut ! Tout le monde, je vous repr&eacute;sente d&#8217;ici un jeu&nbsp;de programmation&nbsp;int&eacute;ressant que nous avons r&eacute;alis&eacute;&nbsp;en&nbsp;utilisant&nbsp;VB pendant&nbsp;ce semestre &agrave; l&#8217;universit&eacute;. Pour qu&#8217;on&nbsp;peut partager&nbsp;les exp&eacute;riences et se progresser.</p>
<p style="text-align: left"><strong>Sujet :</strong> Le jeu de l&rsquo;ultimatum se pr&eacute;sente de la fa&ccedil;on suivante :</p>
<p style="margin-left: 40px; text-align: left">2 individus (<strong>A et B</strong>) se partagent une somme <strong>S = 100 </strong>; <br />
<strong>A </strong>(le proposant) offre &agrave; <strong>B</strong> (le r&eacute;pondant) une&nbsp;part&nbsp;<strong>X</strong> de cette somme, c&rsquo;est &agrave; dire, <br />
<strong>A</strong> re&ccedil;oit une somme <strong>(S-X)</strong> ; <strong>B</strong> re&ccedil;oit une somme <strong>X </strong>; <br />
Si&nbsp;<strong>r&eacute;pondant B</strong>&nbsp;accepte la proposition, les 2 gagent la somme indiqu&eacute;e au-dessus; <br />
Si <strong>r&eacute;pondant B</strong> n&#8217;accepte pas, les 2 n&#8217;obtiennent rien du tout;</p>
<p style="text-align: left">&nbsp;&nbsp;&nbsp; (Au sens de la th&eacute;orie des jeux, s&#8217;ils&nbsp;sont rationnels, la proposition (<strong>X=1 ; S-X=99</strong>)&nbsp;est un &eacute;quilibre parfait). &nbsp;&nbsp;&nbsp; On suppose que l&rsquo;on a 49 individus qui r&eacute;p&egrave;tent ce jeu un certain nombre de fois :</p>
<p style="margin-left: 40px; text-align: left">A&nbsp;chaque fois, chaque individu joue le r&ocirc;le de proposant avec un r&eacute;pondant choisi au hasard.</p>
<p style="text-align: left">&nbsp;&nbsp;&nbsp; La strat&eacute;gie de chaque individu est la suivante :</p>
<p style="margin-left: 40px; text-align: left">Choisir&nbsp;2 nombres entiers au hasard mais entre 0 et 100, <strong><em>prop</em></strong> et <strong><em>accept </em></strong>; Quand il est proposant il offre toujours <strong><em>prop</em></strong> &agrave; l&rsquo;autre; Quand il est r&eacute;pondant il accepte si et seulement si la r&eacute;partition offerte est sup&eacute;rieure ou &eacute;gale &agrave; <strong><em>accept</em></strong>.</p>
<p style="margin-left: 40px; text-align: left"><span id="more-84"></span></p>
<p style="text-align: left"><strong>&nbsp;R&eacute;alisation :</strong></p>
<p style="text-align: left">&nbsp;<img class="size-full wp-image-86" title="preseantion du jeu de VB" alt="Jeu ultimatum" width="500" height="348" src="http://seanchenxi.com/wp-content/uploads/2008/05/preseantion.jpg" />&nbsp;&nbsp;</p>
<p style="text-align: left">&nbsp;&nbsp;&nbsp; Notre programme r&eacute;alis&eacute; consiste &agrave; simuler des &eacute;changes entre des individus. Ces derniers d&eacute;terminent un niveau de proposition et un niveau d&rsquo;acceptation. En fonction de ces niveaux, ils choisiront de jouer et d&rsquo;avoir un gain, ou non. Le gain est li&eacute; &agrave; la r&eacute;partition des sommes &eacute;chang&eacute;es. Il est donc question d&rsquo;analyser le gain cumul&eacute; et le gain moyen des individus en fonction du leur proposition et de leur acceptation.</p>
<p style="text-align: left">&nbsp;&nbsp;&nbsp; Nous proposons 3 simulations de jeu : le mode normal, le mode intelligent, et le mode parfait sous 3 hypoth&egrave;ses. Ces 3 modes de jeu peuvent &ecirc;tre s&eacute;lectionn&eacute;s &agrave; la fin d&rsquo;une partie, avant d&rsquo;en commencer une autre. Ceci peut correspondre par exemple dans la r&eacute;alit&eacute; &agrave; un contrat sign&eacute; qui fait que les quantit&eacute;s et les prix n&eacute;goci&eacute;s ne pourront pas &ecirc;tre anticip&eacute;s diff&eacute;remment au cours d&rsquo;une p&eacute;riode (ici une partie, c&#8217;est-&agrave;-dire un ensemble de confrontations). On peut d&eacute;finir cette p&eacute;riode comme une p&eacute;riode d&rsquo;adaptation.</p>
<p style="margin-left: 40px; text-align: left">Le mode normal : hypoth&egrave;se d&rsquo;information nulle : Les individus ne se connaissent pas, chacun ne conna&icirc;t pas&nbsp;lui-m&ecirc;me&nbsp;en plus. C&#8217;est l&rsquo;exp&eacute;rience d&#8217;individu des parties pr&eacute;c&eacute;dentes n&#8217;a pas d&rsquo;impact pour la partie suivante. <strong>prop</strong> et <strong>accept </strong>sont donc choisit au hasard entre 0 et 100.</p>
<p style="margin-left: 40px; text-align: left">Le mode Intelligent : hypoth&egrave;se d&rsquo;information imparfaite : Les individus ne se connaissent pas, mais chacun conna&icirc;t lui-m&ecirc;me.&nbsp;C&#8217;est &agrave;&nbsp;dire,&nbsp;chaque individu prendra sa d&eacute;cision en fonction de la moyenne des ses gains moyens r&eacute;alis&eacute;s pendant les <strong>n</strong> confrontations pr&eacute;c&eacute;dentes. <strong>prop</strong> et <strong>accpet</strong> sont donc tous sup&eacute;rieures&nbsp;au gain moyen pr&eacute;c&eacute;dent d&#8217;individu ;</p>
<p style="margin-left: 40px; text-align: left">Le mode parfait : hypoth&egrave;se d&rsquo;information imparfait : Tout le mode se conna&icirc;t. C&#8217;est &agrave; dire, chaque individu va prendre en compte les r&eacute;sultats globaux obtenus des parties pr&eacute;c&eacute;dentes pour faire la d&eacute;cision. Donc <strong>prop</strong> &gt; le gain moyen global et <strong>accept</strong> &lt; le gain moyen global</p>
<p style="text-align: left">un peu plus tard, je vais mettre en place notre programme et le code original&nbsp;pour le &nbsp;t&eacute;l&eacute;chargement.</p>
]]></content:encoded>
			<wfw:commentRss>http://seanchenxi.com/simulation-du-jeu-ultimatum-vb.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comment vérifier un premier nombre dans VB</title>
		<link>http://seanchenxi.com/comment-verifier-un-nomber-premier-dans-vb.html</link>
		<comments>http://seanchenxi.com/comment-verifier-un-nomber-premier-dans-vb.html#comments</comments>
		<pubDate>Wed, 27 Feb 2008 10:13:17 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Français]]></category>
		<category><![CDATA[premier nombre]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://seanchenxi.com/comment-verifier-un-nomber-premier-dans-vb.html</guid>
		<description><![CDATA[See this post in : English Version or Chinese Version Private Sub Command1_Click() 　r = InputBox(&#8220;Entrez un chiffre pour vérifier, SVP&#8221;) 　For i = 2 To r 　　　If Val(r) Mod i = 0 And i &#60;&#62; Val(r) Then &#8216;Ici donne une condition pour les non premiers nombres 　　　　MsgBox (&#8220;Ce n&#8217;est pas un premier nombre&#8221;) 　　　　Exit Sub [...]]]></description>
			<content:encoded><![CDATA[<p align="left">See this post in : <a href="http://seanchenxi.com/how-to-verify-a-prime-number-in-vb-en.html" title="How to verify a prime number in VB">English Version</a> or <a href="http://seanchenxi.com/how-to-verify-a-prime-number-in-vb-cn.html" title="VB中如何判断是否为质数">Chinese Version</a></p>
<p>Private Sub Command1_Click()<br />
　r = InputBox(&#8220;Entrez un chiffre pour vérifier, SVP&#8221;)<br />
　For i = 2 To r<br />
　　　If Val(r) Mod i = 0 And i &lt;&gt; Val(r) Then &#8216;Ici donne une condition pour les non premiers nombres<br />
　　　　MsgBox (&#8220;Ce n&#8217;est pas un premier nombre&#8221;)<br />
　　　　Exit Sub<br />
　　　End If<br />
　Next i<br />
　MsgBox (&#8220;C&#8217;est un premier nombre&#8221;)<br />
End Sub</p>
<p><span id="more-35"></span><br />
&#8216;Lister des nombres de 1 à 100Private Sub Command2_Click()<br />
　r = 100<br />
　Me.Caption = 0<br />
　Me.ForeColor = vbBlue<br />
　For j = 1 To r<br />
　　　For i = 2 To j<br />
　　　　　If Val(j) Mod i = 0 And i &lt;&gt; Val(j) Then<br />
　　　　　　Me.ForeColor = vbBlue &#8216;la couleur pour les non premiers nombres<br />
　　　　　　Exit For<br />
　　　　　Else<br />
　　　　　　Me.ForeColor = vbRed &#8216;la couleur pour les premiers nombres<br />
　　　　　End If<br />
　　　Next i<br />
　　Print &#8221; &#8221; &amp; Format(j, &#8220;000&#8243;);<br />
　　If Me.ForeColor = vbRed Then Me.Caption = Me.Caption + 1 &#8216;La totale de nombre des premiers nombres<br />
　　If j Mod 10 = 0 Then Print<br />
　Next j<br />
End Sub</p>
]]></content:encoded>
			<wfw:commentRss>http://seanchenxi.com/comment-verifier-un-nomber-premier-dans-vb.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VB中如何判断是否为质数</title>
		<link>http://seanchenxi.com/how-to-verify-a-prime-number-in-vb-cn.html</link>
		<comments>http://seanchenxi.com/how-to-verify-a-prime-number-in-vb-cn.html#comments</comments>
		<pubDate>Wed, 27 Feb 2008 09:57:43 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[中文]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[质数]]></category>

		<guid isPermaLink="false">http://seanchenxi.com/vb%e4%b8%ad%e5%a6%82%e4%bd%95%e5%88%a4%e6%96%ad%e6%98%af%e5%90%a6%e4%b8%ba%e8%b4%a8%e6%95%b0.html</guid>
		<description><![CDATA[See this post in : English Version or French Version  Private Sub Command1_Click() 　r = InputBox(&#8220;请输入您要判断的数字&#8221;) 　For i = 2 To r 　　　If Val(r) Mod i = 0 And i &#60;&#62; Val(r) Then &#8216;这里给出了非质数的条件 　　　　MsgBox (&#8220;此数为非质数&#8221;) 　　　　Exit Sub 　　　End If 　Next i 　MsgBox (&#8220;此数为质数&#8221;) End Sub &#8216;列出1到100中的质数与非质数 Private Sub Command2_Click() 　r = 100 &#8216;设定最大范围为100 　Me.Caption = [...]]]></description>
			<content:encoded><![CDATA[<p align="left">See this post in : <a href="http://seanchenxi.com/how-to-verify-a-prime-number-in-vb-en.html" title="How to verify a prime number in VB">English Version</a> or <a href="http://seanchenxi.com/comment-verifier-un-nomber-premier-dans-vb.html" title="Comment vérifier un premier nombre dans VB">French Version</a></p>
<p> Private Sub Command1_Click()<br />
　r = InputBox(&#8220;请输入您要判断的数字&#8221;)<br />
　For i = 2 To r<br />
　　　If Val(r) Mod i = 0 And i &lt;&gt; Val(r) Then &#8216;这里给出了非质数的条件<br />
　　　　MsgBox (&#8220;此数为非质数&#8221;)<br />
　　　　Exit Sub<br />
　　　End If<br />
　Next i<br />
　MsgBox (&#8220;此数为质数&#8221;)<br />
End Sub</p>
<p><span id="more-34"></span><br />
&#8216;列出1到100中的质数与非质数<br />
Private Sub Command2_Click()<br />
　r = 100 &#8216;设定最大范围为100<br />
　Me.Caption = 0 &#8216;把按钮2的显示名称设为0，为了之后显示总数<br />
　Me.ForeColor = vbBlue &#8216;把按钮2的显示名称的字体颜色设为蓝色<br />
　For j = 1 To r<br />
　　　For i = 2 To j<br />
　　　　　If Val(j) Mod i = 0 And i &lt;&gt; Val(j) Then<br />
　　　　　　Me.ForeColor = vbBlue &#8216;非质数为蓝色<br />
　　　　　　Exit For<br />
　　　　　Else<br />
　　　　　　Me.ForeColor = vbRed &#8216;质数为红色<br />
　　　　　End If<br />
　　　Next i<br />
　　Print &#8221; &#8221; &amp; Format(j, &#8220;000&#8243;);<br />
　　If Me.ForeColor = vbRed Then Me.Caption = Me.Caption + 1 &#8216;显示质数的总数<br />
　　If j Mod 10 = 0 Then Print<br />
　Next j<br />
End Sub</p>
]]></content:encoded>
			<wfw:commentRss>http://seanchenxi.com/how-to-verify-a-prime-number-in-vb-cn.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to verify a prime number in VB</title>
		<link>http://seanchenxi.com/how-to-verify-a-prime-number-in-vb-en.html</link>
		<comments>http://seanchenxi.com/how-to-verify-a-prime-number-in-vb-en.html#comments</comments>
		<pubDate>Wed, 27 Feb 2008 09:30:13 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[prime number]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://seanchenxi.com/how-to-verify-a-prime-number-in-vb.html</guid>
		<description><![CDATA[See this post in: Chinese Version or French Version Private Sub Command1_Click() 　r = InputBox(&#8220;Enter a number please&#8221;) &#8216; Enter a number to verify 　For i = 2 To r 　　　If Val(r) Mod i = 0 And i &#60;&#62; Val(r) Then &#8216; this phase give a condition which is not a prime number 　　　　MsgBox (&#8220;The numbered you [...]]]></description>
			<content:encoded><![CDATA[<p align="left">See this post in: <a href="http://seanchenxi.com/how-to-verify-a-prime-number-in-vb-cn.html" title="VB中如何判断是否为质数">Chinese Version</a> or <a href="http://seanchenxi.com/comment-verifier-un-nomber-premier-dans-vb.html" title="Comment vérifier un premier nombre dans VB">French Version</a></p>
<p>Private Sub Command1_Click()<br />
　r = InputBox(&#8220;Enter a number please&#8221;) &#8216; Enter a number to verify<br />
　For i = 2 To r<br />
　　　If Val(r) Mod i = 0 And i &lt;&gt; Val(r) Then &#8216; this phase give a condition which is not a prime number<br />
　　　　MsgBox (&#8220;The numbered you entered is not a prime number&#8221;)<br />
　　　　Exit Sub<br />
　　　End If<br />
　Next i<br />
　MsgBox (&#8220;The numbered you entered is not a prime number&#8221;)<br />
End Sub</p>
<p><span id="more-33"></span><br />
&#8216;A list of number from 1 to 100<br />
Private Sub Command2_Click()<br />
　r = 100<br />
　Me.Caption = 0<br />
　Me.ForeColor = vbBlue<br />
　For j = 1 To r<br />
　　　For i = 2 To j<br />
　　　　　If Val(j) Mod i = 0 And i &lt;&gt; Val(j) Then<br />
　　　　　　Me.ForeColor = vbBlue &#8216;color of a not prime number<br />
　　　　　　Exit For<br />
　　　　　Else<br />
　　　　　　Me.ForeColor = vbRed &#8216;color of a prime number<br />
　　　　　End If<br />
　　　Next i<br />
　　Print &#8221; &#8221; &amp; Format(j, &#8220;000&#8243;);<br />
　　If Me.ForeColor = vbRed Then Me.Caption = Me.Caption + 1 &#8216;total of the prime number<br />
　　If j Mod 10 = 0 Then Print<br />
　Next j<br />
End Sub</p>
]]></content:encoded>
			<wfw:commentRss>http://seanchenxi.com/how-to-verify-a-prime-number-in-vb-en.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

