

<?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>Site de Francis Hilaire Auto-entrepreneur et Chef de Projets Web à Orléans &#187; Développement</title>
	<atom:link href="http://www.prometee-creation.com/pages/tutoriels/developpement/feed" rel="self" type="application/rss+xml" />
	<link>http://www.prometee-creation.com</link>
	<description>Bonjour et bienvenue sur le site Prometee-creation.com. Vous trouverez ici, le parcours de Francis Hilaire, ses créations, les actualités en tout genre, ainsi que quelques tutoriels élaborés par une équipe de passionnés</description>
	<lastBuildDate>Wed, 23 Nov 2011 10:29:18 +0000</lastBuildDate>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Bien intégrer du flash dans une page xHTML 1.0 strict</title>
		<link>http://www.prometee-creation.com/tutoriels/bien-integrer-du-flash-dans-une-page-html.html</link>
		<comments>http://www.prometee-creation.com/tutoriels/bien-integrer-du-flash-dans-une-page-html.html#comments</comments>
		<pubDate>Tue, 01 Jul 2008 10:13:02 +0000</pubDate>
		<dc:creator>Francis Hilaire</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://www.prometee-creation.com/?p=163</guid>
		<description><![CDATA[Afin de respecter au mieux les spécifications de la W3C ainsi que les règles basique de l&#8217;accéssibilité, je vous propose la règle d&#8217;intégration d&#8217;un élément flash dans une page xHTML 1.0 strict : &#60;div&#62; &#60;object type=&#34;application/x-shockwave-flash&#34; data=&#34;/chemin-vers-le-swf/votre.swf&#34; width=&#34;800px&#34; height=&#34;600px&#34;&#62; &#60;param name=&#34;movie&#34; value=&#34;/chemin-vers-le-swf/votre.swf&#34; /&#62; &#60;img src=&#34;/chemin-vers-image-de remplacement/votre.png&#34; alt=&#34;Vous ne disposez pas d&#039;un plugin flash&#34; /&#62; &#60;/object&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Afin de respecter au mieux les spécifications de la W3C ainsi que les règles basique de l&#8217;accéssibilité, je vous propose la règle d&#8217;intégration d&#8217;un élément flash dans une page xHTML 1.0 strict :</p>
<pre class="brush: html">&lt;div&gt;
&lt;object
type=&quot;application/x-shockwave-flash&quot;
data=&quot;/chemin-vers-le-swf/votre.swf&quot;
width=&quot;800px&quot;
height=&quot;600px&quot;&gt;
&lt;param name=&quot;movie&quot; value=&quot;/chemin-vers-le-swf/votre.swf&quot; /&gt;
&lt;img src=&quot;/chemin-vers-image-de remplacement/votre.png&quot; alt=&quot;Vous ne disposez pas d&#039;un plugin flash&quot; /&gt;
&lt;/object&gt;
&lt;/div&gt;</pre>
<p>Ce code marche dans IE6-7, FF1-2-3, Opera 9 et sup, Safari 3.1, les autres navigateurs je n&#8217;ai pas pu tester, j&#8217;attends vos retour pour savoir si je peux allonger la liste.</p>
<p><em>RQ : Ce code peut vous éviter certains plantages inhérent à l&#8217;utilisation de la balise <strong>embed</strong> par exemple&#8230;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.prometee-creation.com/tutoriels/bien-integrer-du-flash-dans-une-page-html.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fonction de Luhn en php</title>
		<link>http://www.prometee-creation.com/tutoriels/fonction-de-luhn-en-php.html</link>
		<comments>http://www.prometee-creation.com/tutoriels/fonction-de-luhn-en-php.html#comments</comments>
		<pubDate>Sun, 09 Mar 2008 21:15:45 +0000</pubDate>
		<dc:creator>Francis Hilaire</dc:creator>
				<category><![CDATA[Développement]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutoriels]]></category>
		<category><![CDATA[SIREN]]></category>
		<category><![CDATA[SIRET]]></category>
		<category><![CDATA[vérifier numéro de carte bancaire]]></category>

		<guid isPermaLink="false">http://www.prometee-creation.com/tutoriels/fonction-de-luhn-en-php.html</guid>
		<description><![CDATA[Après avoir regarder du côté de wikipédia, j&#8217;ai pu facilement construire la fonction de Luhn permettant entre autre de vérifier des numéros de carte bancaire. //Fonction algorithme de Luhn function isLuhnNum($num) { //longueur de la chaine $num $length = strlen($num); //resultat de l&#039;addition de tous les chiffres $tot = 0; for($i=$length-1;$i&#62;=0;$i--) { $digit = substr($num, [...]]]></description>
			<content:encoded><![CDATA[<p>Après avoir regarder du côté de <a href="http://fr.wikipedia.org/wiki/Formule_de_Luhn" title="formule de Luhn">wikipédia</a>, j&#8217;ai pu facilement construire la fonction de Luhn permettant entre autre de vérifier des numéros de carte bancaire.</p>
<pre class="brush: php">
//Fonction algorithme de Luhn
function isLuhnNum($num)
{
	//longueur de la chaine $num
	$length = strlen($num);

	//resultat de l&#039;addition de tous les chiffres
	$tot = 0;
	for($i=$length-1;$i&gt;=0;$i--)
	{
		$digit = substr($num, $i, 1);

		if ((($length - $i) % 2) == 0)
		{
			$digit = $digit*2;
			if ($digit&gt;9)
			{
				$digit = $digit-9;
			}
		}
		$tot += $digit;
	}

	return (($tot % 10) == 0);
}
</pre>
<p>Merci à <a href="#comment-48" title="Commentaire de Andras (ajout du support pour les numéro de SIREN)">Andras</a> pour sa précision <img src='http://www.prometee-creation.com/wp-engine/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.prometee-creation.com/tutoriels/fonction-de-luhn-en-php.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Fonction SHA1 en ASP</title>
		<link>http://www.prometee-creation.com/tutoriels/fonction-sha1-en-asp.html</link>
		<comments>http://www.prometee-creation.com/tutoriels/fonction-sha1-en-asp.html#comments</comments>
		<pubDate>Sat, 11 Aug 2007 10:54:48 +0000</pubDate>
		<dc:creator>Francis Hilaire</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[Tutoriels]]></category>

		<guid isPermaLink="false">http://www.prometee-creation.com/tutoriels/fonction-sha1-en-asp.html</guid>
		<description><![CDATA[Le SHA1 : http://www.itl.nist.gov/fipspubs/fip180-1.htm Original : http://p2p.wrox.com/archive/proasp_howto/2002-02/27.asp = 32 then binstr = "" elseif count > 0 then binstr = left(tobin(value), 32-count) else binstr = tobin(value) end if do while len(binstr) < 32 binstr = "0" + binstr loop rshift = bin2dec(binstr) end function function lshift(value,count) dim binstr if count >= 32 then binstr = [...]]]></description>
			<content:encoded><![CDATA[<p>Le SHA1 : <a href="http://www.itl.nist.gov/fipspubs/fip180-1.htm">http://www.itl.nist.gov/fipspubs/fip180-1.htm</a>
</p>
<p>Original : <a href="http://p2p.wrox.com/archive/proasp_howto/2002-02/27.asp">http://p2p.wrox.com/archive/proasp_howto/2002-02/27.asp</a>
</p>
<pre><code><%
function tohex(value)
<span id="more-73"></span>
  value = clng(value)
  tohex = lcase(hex(value))
  do while len(tohex) < 8
    tohex = "0" &#038; tohex
  loop
end function

function tobin(value)
  dim hexstr
  hexstr = tohex(value)
  tobin = ""
  for i = 1 to len(hexstr)
    select case mid(hexstr, i, 1)
      case "f", "F"
        tobin = tobin &#038; "1111"
      case "e", "E"
        tobin = tobin &#038; "1110"
      case "d", "D"
        tobin = tobin &#038; "1101"
      case "c", "C"
        tobin = tobin &#038; "1100"
      case "b", "B"
        tobin = tobin &#038; "1011"
      case "a", "A"
        tobin = tobin &#038; "1010"
      case "9"
        tobin = tobin &#038; "1001"
      case "8"
        tobin = tobin &#038; "1000"
      case "7"
        tobin = tobin &#038; "0111"
      case "6"
        tobin = tobin &#038; "0110"
      case "5"
        tobin = tobin &#038; "0101"
      case "4"
        tobin = tobin &#038; "0100"
      case "3"
        tobin = tobin &#038; "0011"
      case "2"
        tobin = tobin &#038; "0010"
      case "1"
        tobin = tobin &#038; "0001"
      case else
        tobin = tobin &#038; "0000"
    end select
  next
end function

function bin2dec(binstr)
  dim flip
  flip = false
  bin2dec = clng(0)
  if left(binstr,1) = "0" then
    for i = 1 to len(binstr)
      if mid(binstr,33-i,1)="1" then
        bin2dec = bin2dec + (2^(i-1))
      end if
    next
  else
    for i = 1 to len(binstr)
      if flip then
        if mid(binstr,33-i,1)="0" then
          bin2dec = bin2dec - (2^(i-1))
        end if
      else
        if mid(binstr,33-i,1)="1" then
          bin2dec = bin2dec - (2^(i-1))
          flip = true
        end if
      end if
    next
  end if
end function  

function rshift(value,count)
  dim binstr
  if count >= 32 then
    binstr = ""
  elseif count > 0 then
    binstr = left(tobin(value), 32-count)
  else
    binstr = tobin(value)
  end if
  do while len(binstr) < 32
    binstr = "0" + binstr
  loop
  rshift = bin2dec(binstr)  
end function

function lshift(value,count)
  dim binstr
  if count >= 32 then
    binstr = ""
  elseif count > 0 then
    binstr = right(tobin(value), 32-count)
  else
    binstr = tobin(value)
  end if
  do while len(binstr) < 32
    binstr = binstr + "0"
  loop
  lshift = bin2dec(binstr)
end function

function rol(value,count)
  rol = lshift(value,count) or rshift(value,32-count)
end function

function add32(a, b)
  dim bina, binb, total, result, carry
  bina = tobin(a)
  binb = tobin(b)
  result = ""
  carry = "0"
  for i = 1 to 32
    total = 0
    if mid(bina,33-i,1)="1" then total = total + 1
    if mid(binb,33-i,1)="1" then total = total + 1
    if carry="1" then total = total + 1
    select case total
      case 3
        carry = "1"
        result = "1" + result
      case 2
        carry = "1"
        result = "0" + result
      case 1
        carry = "0"
        result = "1" + result
      case else
        carry = "0"
        result = "0" + result
    end select
  next
  add32 = bin2dec(result)    
end function

function f(b,c,d,t)
  if t < 20 then
    f = (b and c) or ((not b) and d)
  elseif t < 40 then
    f = b xor c xor d
  elseif t < 60 then
    f = (b and c) or (b and d) or (c and d)
  else
    f = b xor c xor d
  end if
end function

function k(t)
  if t < 20 then
    k = clng(1518500249)
  elseif t < 40 then
    k = clng(1859775393)
  elseif t < 60 then
    k = clng(-1894007588)
  else
    k = clng(-899497514)
  end if
end function

function pad(message)
  dim l, n
  l = len(message)
  n = (((l+8) \ 64) + 1)*16
  redim m(n-1)
  for i = 0 to n-1
    m(i) = clng(0)
  next
  for i = 0 to l-1
    m(i\4) = m(i\4) or lshift(asc(mid(message,i+1,1)),(24-(i mod 4)*8))
  next
  m(l\4) = m(l\4) or lshift(clng(128),(24-(l mod 4)*8))
  m(n-1) = l*8
  pad = m
end function

function sha1(message)
  dim h0, h1, h2, h3, h4
  dim a, b, c, d, e, temp
  dim l, n
  dim w(79)

  l = len(message)
  n = (((l+8) \ 64) + 1)*16
  m = pad(message)

  h0 = clng(1732584193)
  h1 = clng(-271733879)
  h2 = clng(-1732584194)
  h3 = clng(271733878)
  h4 = clng(-1009589776)

  for block = 0 to n-1 step 16
    a = h0
    b = h1
    c = h2
    d = h3
    e = h4
    for t = 0 to 79
      if t < 16 then
        w(t) = m(block + t)
      else
        w(t) = rol(w(t-3) xor w(t-8) xor w(t-14) xor w(t-16),1)
      end if
      temp = add32(rol(a,5),add32(f(b,c,d,t),add32(e,add32(w(t),k(t)))))
      e = d
      d = c
      c = rol(b,30)
      b = a
      a = temp
    next
    h0 = add32(h0, a)
    h1 = add32(h1, b)
    h2 = add32(h2, c)
    h3 = add32(h3, d)
    h4 = add32(h4, e)
  next
  sha1 = tohex(h0)+tohex(h1)+tohex(h2)+tohex(h3)+tohex(h4)
end function
%>
</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.prometee-creation.com/tutoriels/fonction-sha1-en-asp.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

