<?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>Samuel's HQ &#187; geeky</title>
	<atom:link href="http://samuel.happycoders.org/category/english/geeky/feed/" rel="self" type="application/rss+xml" />
	<link>http://samuel.happycoders.org</link>
	<description>A french/american blog with some hungarian spices...</description>
	<lastBuildDate>Sun, 27 Nov 2011 02:53:31 +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>Ubuntu 11.10 avec KVM sur dedibox</title>
		<link>http://samuel.happycoders.org/2011/11/27/ubuntu-11-10-avec-kvm-sur-dedibox/</link>
		<comments>http://samuel.happycoders.org/2011/11/27/ubuntu-11-10-avec-kvm-sur-dedibox/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 02:13:14 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Francais]]></category>
		<category><![CDATA[geeky]]></category>
		<category><![CDATA[Geeky Linux fr]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://samuel.happycoders.org/?p=194</guid>
		<description><![CDATA[La plupart des hebergeurs interdisent d&#8217;utiliser le mode bridge pour hoster des VMs sur un serveur. Les hebergeurs veulent limiter le nombre d&#8217;adresses mac sur leur reseaux car les tables macs des switchs sont limitees en taille (sur un catalyst 6500, 128,000 macs par example). Si les machines  [...]]]></description>
			<content:encoded><![CDATA[<p>La plupart des hebergeurs interdisent d&#8217;utiliser le mode bridge pour hoster des VMs sur un serveur. Les hebergeurs veulent limiter le nombre d&#8217;adresses mac sur leur reseaux car les tables macs des switchs sont limitees en taille (sur un catalyst 6500, 128,000 macs par example). Si les machines hebergees utilisent un mode bridge, le nombre de mac peut rapidement exploser&#8230; nb_mac = nb_machines * nb_vms&#8230; Pour se proteger, les hebergeurs utilisent <a href="http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/ios/12.2SX/configuration/guide/port_sec.html" target="_blank">port-security</a>, et le switch automatiquement bloque le port si il detecte du traffic en provenance de plusieurs Mac.<br />
Conclusion, il faut faire attention&#8230;</p>
<p><span id="more-194"></span></p>
<p>Voici les etapes a suivre pour configurer une machine HOST avec 2 VMs GUEST en utilisant ubuntu 11.10 et kvm en mode route.</p>
<p><strong>Modifiez votre /etc/network/interfaces</strong></p>
<p>Configurez l&#8217;ip physique de la machine et creez des bridge.  Le plus important est la derniere ligne, vous devez activez le proxy_arp sur votre interface physique. Cela permet a la machine HOST de repondre au ARP request venant du reseau pour les VMs (donc seulement la mac physique est annoncee et ce pour l&#8217;IP HOST et les IPs des VMs).</p>
<pre class="perl"><span style="color: #808080; font-style: italic;"># The loopback network interface</span>
auto lo
iface lo inet loopback
&nbsp;
<span style="color: #808080; font-style: italic;"># The primary network interface</span>
auto eth0
iface eth0 inet static
        address IP_HOST_FIXME
        netmask <span style="color: #cc66cc;">255.255</span><span style="color: #cc66cc;">.255</span><span style="color: #cc66cc;">.0</span>
        network NETWORK_FIXME
        broadcast BROADCAST_FIXME
        gateway GATEWAY_FIXME
        <span style="color: #808080; font-style: italic;"># create dummy interfaces</span>
        up /sbin/ifconfig dummy0 up
        up /sbin/ifconfig dummy1 up
        <span style="color: #808080; font-style: italic;"># create the bridges</span>
        up /sbin/brctl addbr bridge0
        up /sbin/brctl addbr bridge1
        <span style="color: #808080; font-style: italic;"># add the interfaces to the bridges</span>
        up /sbin/brctl addif bridge0 dummy0
        up /sbin/brctl addif bridge1 dummy1
        <span style="color: #808080; font-style: italic;"># bringup the bridges</span>
        up /sbin/ifconfig bridge0 up
        up /sbin/ifconfig bridge1 up
        <span style="color: #808080; font-style: italic;"># add the routes</span>
        up /sbin/route add IP_VM_1_FIXME dev bridge0
        up /sbin/route add IP_VM_2_FIXME dev bridge1
        <span style="color: #808080; font-style: italic;"># the most important!</span>
        up /sbin/sysctl -w net.ipv4.conf.eth0.proxy_arp=<span style="color: #cc66cc;">1</span>
&nbsp;</pre>
<p><strong>Download this code: </strong><a href="http://samuel.happycoders.org/code/interfaces.txt">interfaces.txt</a></p>
<p>Je pense qu&#8217;il doit etre possible de n&#8217;utiliser qu&#8217;un bridge, mais je n&#8217;ai pas tente.</p>
<p><strong>Activez IP forwarding</strong></p>
<p>Editez /etc/sysctl.conf et modifiez la ligne</p>
<blockquote><p># Uncomment the next line to enable packet forwarding for IPv4<br />
net.ipv4.ip_forward=1</p></blockquote>
<p><strong>Creez la configuration virsh pour vos VM</strong></p>
<p>Creez un fichier xml comme le suivant:</p>
<pre class="xml"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;domain</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'kvm'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;name<span style="font-weight: bold; color: black;">&gt;</span></span></span>ubuntu<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/name<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;memory<span style="font-weight: bold; color: black;">&gt;</span></span></span>8388608<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/memory<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;currentMemory<span style="font-weight: bold; color: black;">&gt;</span></span></span>8388608<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/currentMemory<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;vcpu<span style="font-weight: bold; color: black;">&gt;</span></span></span>4<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/vcpu<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;os<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;type</span> <span style="color: #000066;">arch</span>=<span style="color: #ff0000;">'x86_64'</span> <span style="color: #000066;">machine</span>=<span style="color: #ff0000;">'pc-0.14'</span><span style="font-weight: bold; color: black;">&gt;</span></span>hvm<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/type<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;boot</span> <span style="color: #000066;">dev</span>=<span style="color: #ff0000;">'hd'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/os<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;features<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;acpi</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/features<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;clock</span> <span style="color: #000066;">offset</span>=<span style="color: #ff0000;">'utc'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;on_poweroff<span style="font-weight: bold; color: black;">&gt;</span></span></span>destroy<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/on_poweroff<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;on_reboot<span style="font-weight: bold; color: black;">&gt;</span></span></span>restart<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/on_reboot<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;on_crash<span style="font-weight: bold; color: black;">&gt;</span></span></span>destroy<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/on_crash<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;devices<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;emulator<span style="font-weight: bold; color: black;">&gt;</span></span></span>/usr/bin/kvm<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/emulator<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;disk</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'file'</span> <span style="color: #000066;">device</span>=<span style="color: #ff0000;">'disk'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;driver</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">'qemu'</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'qcow2'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;source</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">'/srv/ubuntu.qcow2'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">dev</span>=<span style="color: #ff0000;">'hda'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'ide'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;address</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'drive'</span> <span style="color: #000066;">controller</span>=<span style="color: #ff0000;">'0'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'0'</span> <span style="color: #000066;">unit</span>=<span style="color: #ff0000;">'0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/disk<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;controller</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'ide'</span> <span style="color: #000066;">index</span>=<span style="color: #ff0000;">'0'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;address</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'pci'</span> <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">'0x0000'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'0x00'</span> <span style="color: #000066;">slot</span>=<span style="color: #ff0000;">'0x01'</span> <span style="color: #000066;">function</span>=<span style="color: #ff0000;">'0x1'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/controller<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;interface</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'bridge'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mac</span> <span style="color: #000066;">address</span>=<span style="color: #ff0000;">'FIXME_MAC_GENERATED'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;source</span> <span style="color: #000066;">bridge</span>=<span style="color: #ff0000;">'bridge0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;model</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'virtio'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;address</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'pci'</span> <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">'0x0000'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'0x00'</span> <span style="color: #000066;">slot</span>=<span style="color: #ff0000;">'0x03'</span> <span style="color: #000066;">function</span>=<span style="color: #ff0000;">'0x0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/interface<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;serial</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'pty'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">port</span>=<span style="color: #ff0000;">'0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/serial<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;console</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'pty'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'serial'</span> <span style="color: #000066;">port</span>=<span style="color: #ff0000;">'0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/console<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;input</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'mouse'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'ps2'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;graphics</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'vnc'</span> <span style="color: #000066;">port</span>=<span style="color: #ff0000;">'-1'</span> <span style="color: #000066;">autoport</span>=<span style="color: #ff0000;">'yes'</span> <span style="color: #000066;">listen</span>=<span style="color: #ff0000;">'127.0.0.1'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;video<span style="font-weight: bold; color: black;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;model</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'cirrus'</span> <span style="color: #000066;">vram</span>=<span style="color: #ff0000;">'9216'</span> <span style="color: #000066;">heads</span>=<span style="color: #ff0000;">'1'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;address</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'pci'</span> <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">'0x0000'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'0x00'</span> <span style="color: #000066;">slot</span>=<span style="color: #ff0000;">'0x02'</span> <span style="color: #000066;">function</span>=<span style="color: #ff0000;">'0x0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/video<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;memballoon</span> <span style="color: #000066;">model</span>=<span style="color: #ff0000;">'virtio'</span><span style="font-weight: bold; color: black;">&gt;</span></span>
      <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;address</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'pci'</span> <span style="color: #000066;">domain</span>=<span style="color: #ff0000;">'0x0000'</span> <span style="color: #000066;">bus</span>=<span style="color: #ff0000;">'0x00'</span> <span style="color: #000066;">slot</span>=<span style="color: #ff0000;">'0x04'</span> <span style="color: #000066;">function</span>=<span style="color: #ff0000;">'0x0'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/memballoon<span style="font-weight: bold; color: black;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/devices<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/domain<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;</pre>
<p><strong>Download this code: </strong><a href="http://samuel.happycoders.org/code/ubuntu.xml">ubuntu.xml</a></p>
<p><strong> Importez la configuration de votre VM</strong></p>
<blockquote><p># virsh define foo.xml<br />
# virsh start ubuntu</p></blockquote>
<p><strong>  Modifiez le /etc/network/interfaces de vos VMs</strong></p>
<pre class="perl">auto lo
iface lo inet loopback
&nbsp;
auto eth0
iface eth0 inet static
        address IP_VM1_FIXME
        netmask <span style="color: #cc66cc;">255.255</span><span style="color: #cc66cc;">.255</span><span style="color: #cc66cc;">.255</span>
        up /sbin/route add IP_HOST_FIXME dev eth0
        up /sbin/route add default gw IP_HOST_FIXME
&nbsp;</pre>
<p><strong>Download this code: </strong><a href="http://samuel.happycoders.org/code/interfaces-vm.txt">interfaces-vm.txt</a></p>
<p>&nbsp;</p>
<p>Voila les grandes lignes, en esperant que cela aide quelques personnes.</p>
]]></content:encoded>
			<wfw:commentRss>http://samuel.happycoders.org/2011/11/27/ubuntu-11-10-avec-kvm-sur-dedibox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Convert a week number to a date in perl</title>
		<link>http://samuel.happycoders.org/2010/06/11/convert-a-week-number-to-a-date-in-perl/</link>
		<comments>http://samuel.happycoders.org/2010/06/11/convert-a-week-number-to-a-date-in-perl/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 22:42:18 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[geeky]]></category>
		<category><![CDATA[convert week number to date]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://samuel.happycoders.org/?p=177</guid>
		<description><![CDATA[Today I had to hack a quick script to convert a week number to a date in perl. To my surprise, the answer was not straightforward and I had to test and try a little bit before to get something working.
So here it is:
#!/usr/bin/perl
use strict;
use Time::ParseDate;
use Time::Local;
&#160;
sub  [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had to hack a quick script to convert a week number to a date in perl. To my surprise, the answer was not straightforward and I had to test and try a little bit before to get something working.</p>
<p>So here it is:</p>
<pre class="perl"><span style="color: #808080; font-style: italic;">#!/usr/bin/perl</span>
<span style="color: #000000; font-weight: bold;">use</span> strict;
<span style="color: #000000; font-weight: bold;">use</span> Time::<span style="color: #006600;">ParseDate</span>;
<span style="color: #000000; font-weight: bold;">use</span> Time::<span style="color: #006600;">Local</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">sub</span> convert_week_to_date
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$year</span>, <span style="color: #0000ff;">$week</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #0000ff;">@_</span>;
&nbsp;
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$ref</span> = timelocal<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #0000ff;">$year</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">my</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$s</span>, <span style="color: #0000ff;">$m</span>, <span style="color: #0000ff;">$h</span>, <span style="color: #0000ff;">$dom</span>, <span style="color: #0000ff;">$m</span>, <span style="color: #0000ff;">$y</span>, <span style="color: #0000ff;">$wd</span>, <span style="color: #0000ff;">$yd</span>, <span style="color: #0000ff;">$i</span><span style="color: #66cc66;">&#41;</span> =
        <a href="http://perldoc.perl.org/functions/localtime.html"><span style="color: #000066;">localtime</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$ref</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$time</span> = parsedate<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;+&quot;</span>.<span style="color: #0000ff;">$week</span>.<span style="color: #ff0000;">&quot; weeks&quot;</span>,
                         NOW =&gt; <span style="color: #0000ff;">$ref</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    <span style="color: #b1b100;">my</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$s</span>, <span style="color: #0000ff;">$m</span>, <span style="color: #0000ff;">$h</span>, <span style="color: #0000ff;">$dom</span>, <span style="color: #0000ff;">$m</span>, <span style="color: #0000ff;">$y</span>, <span style="color: #0000ff;">$wd</span>, <span style="color: #0000ff;">$yd</span>, <span style="color: #0000ff;">$i</span><span style="color: #66cc66;">&#41;</span> =
        <a href="http://perldoc.perl.org/functions/localtime.html"><span style="color: #000066;">localtime</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$time</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #0000ff;">$wd</span> -= <span style="color: #cc66cc;">1</span>;
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$time</span> = parsedate<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;-&quot;</span>.<span style="color: #0000ff;">$wd</span>.<span style="color: #ff0000;">&quot; days&quot;</span>,
                         NOW =&gt; <span style="color: #0000ff;">$time</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">my</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$s</span>, <span style="color: #0000ff;">$m</span>, <span style="color: #0000ff;">$h</span>, <span style="color: #0000ff;">$dom</span>, <span style="color: #0000ff;">$m</span>, <span style="color: #0000ff;">$y</span>, <span style="color: #0000ff;">$wd</span>, <span style="color: #0000ff;">$yd</span>, <span style="color: #0000ff;">$i</span><span style="color: #66cc66;">&#41;</span> =
        <a href="http://perldoc.perl.org/functions/localtime.html"><span style="color: #000066;">localtime</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$time</span><span style="color: #66cc66;">&#41;</span>;
    <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #66cc66;">&#40;</span><a href="http://perldoc.perl.org/functions/sprintf.html"><span style="color: #000066;">sprintf</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;%04d/%02d/%02d&quot;</span>,
            <span style="color: #0000ff;">$y</span> + <span style="color: #cc66cc;">1900</span>, <span style="color: #0000ff;">$m</span> + <span style="color: #cc66cc;">1</span>, <span style="color: #0000ff;">$dom</span> - <span style="color: #0000ff;">$wd</span> + <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> convert_week_to_date<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2009</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\n</span>&quot;</span>;
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> convert_week_to_date<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2009</span>, <span style="color: #cc66cc;">52</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\n</span>&quot;</span>;
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> convert_week_to_date<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2010</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\n</span>&quot;</span>;
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> convert_week_to_date<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2010</span>, <span style="color: #cc66cc;">22</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\n</span>&quot;</span>;
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> convert_week_to_date<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2010</span>, <span style="color: #cc66cc;">23</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\n</span>&quot;</span>;
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> convert_week_to_date<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2010</span>, <span style="color: #cc66cc;">24</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\n</span>&quot;</span>;
&nbsp;</pre>
<p><strong>Download this code: </strong><a href="http://samuel.happycoders.org/code/convert_week_to_date.pl">convert_week_to_date.pl</a></p>
<p>Hopefully it will help someone one day.</p>
]]></content:encoded>
			<wfw:commentRss>http://samuel.happycoders.org/2010/06/11/convert-a-week-number-to-a-date-in-perl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Closing the gap</title>
		<link>http://samuel.happycoders.org/2009/11/22/closing-the-gap/</link>
		<comments>http://samuel.happycoders.org/2009/11/22/closing-the-gap/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 01:00:17 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[geeky]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://samuel.happycoders.org/2009/11/22/closing-the-gap/</guid>
		<description><![CDATA[I got to find about Eric Sink&#8217;s blog today&#8230; Better late than never  
He is writing about a lot of interesting topics related to software engineering.
My favorite column from his blog:

 http://www.ericsink.com/bos/Closing_the_Gap_Part_1.html
  [...]]]></description>
			<content:encoded><![CDATA[<p>I got to find about Eric Sink&#8217;s blog today&#8230; Better late than never <img src='http://samuel.happycoders.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>He is writing about a lot of interesting topics related to software engineering.</p>
<p>My favorite column from his blog:</p>
<ul>
<li> <a href="http://www.ericsink.com/bos/Closing_the_Gap_Part_1.html" target="_blank">http://www.ericsink.com/bos/Closing_the_Gap_Part_1.html</a></li>
<li> <a href="http://www.ericsink.com/bos/Closing_the_Gap_Part_2.html" target="_blank">http://www.ericsink.com/bos/Closing_the_Gap_Part_2.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://samuel.happycoders.org/2009/11/22/closing-the-gap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>future of data center?</title>
		<link>http://samuel.happycoders.org/2008/11/14/future-of-data-center/</link>
		<comments>http://samuel.happycoders.org/2008/11/14/future-of-data-center/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 18:01:34 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[geeky]]></category>
		<category><![CDATA[read on the web]]></category>
		<category><![CDATA[datacenter]]></category>

		<guid isPermaLink="false">http://samuel.happycoders.org/2008/11/14/future-of-data-center/</guid>
		<description><![CDATA[
That&#8217;s what you do when you are a powerful geek with a lot of money  


http://royal.pingdom.com/2008/11/14/the-worlds-most-super-designed-data-center-fit-for-a-james-bond-villain/



]]></description>
			<content:encoded><![CDATA[<div align="center"><img style="max-width: 400px;" src="http://samuel.happycoders.org/wp-content/uploads/2008/11/3029540474-1970ff02b6-o.jpg" /></p>
<div align="left">That&#8217;s what you do when you are a powerful geek with a lot of money <img src='http://samuel.happycoders.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </div>
<div align="left">
<ul>
<li><a target="_blank" href="http://royal.pingdom.com/2008/11/14/the-worlds-most-super-designed-data-center-fit-for-a-james-bond-villain/">http://royal.pingdom.com/2008/11/14/the-worlds-most-super-designed-data-center-fit-for-a-james-bond-villain/</a></li>
</ul>
<p></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://samuel.happycoders.org/2008/11/14/future-of-data-center/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>End of spam?</title>
		<link>http://samuel.happycoders.org/2008/11/13/end-of-spam/</link>
		<comments>http://samuel.happycoders.org/2008/11/13/end-of-spam/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 02:59:20 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[geeky]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://samuel.happycoders.org/2008/11/13/end-of-spam/</guid>
		<description><![CDATA[

	
http://www.washingtonpost.com/wp-dyn/content/article/2008/11/12/AR2008111200658.html

As a consequence, there is a big drop in the spam traffic in the world

Even on happycoders.org, we saw a difference in the daily average of spam received:
	
before: Received             149MB       26945       [...]]]></description>
			<content:encoded><![CDATA[<div>
<div>
<ul>	
<li><a href="http://www.washingtonpost.com/wp-dyn/content/article/2008/11/12/AR2008111200658.html" target="_blank">http://www.washingtonpost.com/wp-dyn/content/article/2008/11/12/AR2008111200658.html</a></li>
<p></ul>
<p>As a consequence, there is a big drop in the spam traffic in the world</div>
<p><a href="http://www.spamcop.net/spamgraph.shtml?spamweek" target="_blank"><img style="max-width: 400px;" src="http://samuel.happycoders.org/wp-content/uploads/2008/11/spamweek.gif" alt="" /></a></div>
<p>Even on happycoders.org, we saw a difference in the daily average of spam received:
<ul>	
<li>before: Received             149MB <b>      26945      </b>3841</li>
<p>	
<li>after:Received             109MB <b>      10351      </b>1563</li>
</ul>
<p>More details:
<ul>
<li><a target="_blank" href="http://hostexploit.com/downloads/Hostexploit%20Cyber%20Crime%20USA%20v%202.0%201108.pdf">http://hostexploit.com/downloads/Hostexploit%20Cyber%20Crime%20USA%20v%202.0%201108.pdf</a></li>
</ul>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://samuel.happycoders.org/2008/11/13/end-of-spam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modern warfare</title>
		<link>http://samuel.happycoders.org/2008/08/12/modern-warfare/</link>
		<comments>http://samuel.happycoders.org/2008/08/12/modern-warfare/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 16:37:37 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[geeky]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[read on the web]]></category>
		<category><![CDATA[hacking info]]></category>

		<guid isPermaLink="false">http://samuel.happycoders.org/2008/08/12/modern-warfare/</guid>
		<description><![CDATA[21st century is here&#8230; it&#8217;s now computer warfare!
Georgia Under Online Assault &#124; Danger Room from Wired.com

]]></description>
			<content:encoded><![CDATA[<p>21st century is here&#8230; it&#8217;s now computer warfare!</p>
<p><a href="http://blog.wired.com/defense/2008/08/georgia-under-o.html">Georgia Under Online Assault | Danger Room from Wired.com</a><br />
<blockquote></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://samuel.happycoders.org/2008/08/12/modern-warfare/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>San Francisco&#8217;s computer network locked down</title>
		<link>http://samuel.happycoders.org/2008/07/16/san-franciscos-computer-network-locked-down/</link>
		<comments>http://samuel.happycoders.org/2008/07/16/san-franciscos-computer-network-locked-down/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 16:37:41 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[geeky]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[san francisco]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://samuel.happycoders.org/2008/07/16/san-franciscos-computer-network-locked-down/</guid>
		<description><![CDATA[Here is an incredible subject for a movie&#8230; unfortunately it&#8217;s not fiction it&#8217;s reality&#8230;

S.F. officials locked out of computer network
http://blog.wired.com/27bstroke6/2008/07/sf-city-charged.html

]]></description>
			<content:encoded><![CDATA[<p>Here is an incredible subject for a movie&#8230; unfortunately it&#8217;s not fiction it&#8217;s reality&#8230;</p>
<ul>
<li><a href="http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2008/07/14/BAOS11P1M5.DTL">S.F. officials locked out of computer network</a></li>
<li><a href="http://blog.wired.com/27bstroke6/2008/07/sf-city-charged.html" target="_blank">http://blog.wired.com/27bstroke6/2008/07/sf-city-charged.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://samuel.happycoders.org/2008/07/16/san-franciscos-computer-network-locked-down/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hungarian notation</title>
		<link>http://samuel.happycoders.org/2008/03/27/hungarian-notation/</link>
		<comments>http://samuel.happycoders.org/2008/03/27/hungarian-notation/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 19:43:53 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[geeky]]></category>

		<guid isPermaLink="false">http://samuel.happycoders.org/2008/03/27/hungarian-notation/</guid>
		<description><![CDATA[I recently came to cross the name &#8220;Hungarian Notation&#8221;. I found it quite funny as I know this method for long time but I didn&#8217;t even know it has a name&#8230; If you are a geek check this:

Hungarian notation &#8211; Wikipedia, the free encyclopedia
And if you have really too much time, and you don&#8217;t know what  [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came to cross the name &#8220;Hungarian Notation&#8221;. I found it quite funny as I know this method for long time but I didn&#8217;t even know it has a name&#8230; If you are a geek check this:<br />
<a href="http://en.wikipedia.org/wiki/Hungarian_notation"></a><br />
<a href="http://en.wikipedia.org/wiki/Hungarian_notation">Hungarian notation &#8211; Wikipedia, the free encyclopedia</a></p>
<p>And if you have really too much time, and you don&#8217;t know what to do, check this document:</p>
<p><a href="http://www.coding-guidelines.com/cbook/sent792.pdf">http://www.coding-guidelines.com/cbook/sent792.pdf</a></p>
]]></content:encoded>
			<wfw:commentRss>http://samuel.happycoders.org/2008/03/27/hungarian-notation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Demonstrate a unix command usage from powerpoint</title>
		<link>http://samuel.happycoders.org/2007/11/15/demonstrate-a-unix-command-application-from-powerpoint/</link>
		<comments>http://samuel.happycoders.org/2007/11/15/demonstrate-a-unix-command-application-from-powerpoint/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 02:26:24 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[geeky]]></category>

		<guid isPermaLink="false">http://samuel.happycoders.org/2007/11/15/demonstrate-a-unix-command-application-from-powerpoint/</guid>
		<description><![CDATA[ .toleft { float: left;}  .toright{ float: right;} 



Here is the reason why I tried to demo a website from powerpoint&#8230;  I needed to demonstrate how to use a new Unix application, but I wanted to do that from my powerpoint presentation. After some time spent on google, I didn&#8217;t find any way to  [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css"> .toleft { float: left;}  .toright{ float: right;} </style>
<p><span class="toleft"><br />
<a href="http://samuel.happycoders.org/wp-content/uploads/2007/11/ssh-vim-demo.JPG" title="ssh demo"><img src="http://samuel.happycoders.org/wp-content/uploads/2007/11/ssh-vim-demo.thumbnail.JPG" alt="ssh demo" /></a><br />
</span><br />
Here is the reason why I tried to <a href="http://samuel.happycoders.org/2007/11/14/how-to-demobrowse-a-website-using-powerpoint/" target="_blank">demo a website from powerpoint</a>&#8230;  I needed to demonstrate how to use a new Unix application, but I wanted to do that from my powerpoint presentation. After some time spent on google, I didn&#8217;t find any way to integrate a &#8216;unix terminal&#8217; component in a power point slide.</p>
<p>So my solution was to use the embedded browser and use Ajaxterm to connect to a remote linux host&#8230; This works&#8230; but there is a limitation as it&#8217;s not possible to use PageUp, PageDown to go up and down in your terminal&#8230; In order to fix that, you can start &#8216;screen&#8217; on your unix host, and then you can navigate in your terminal using Ctrl+b, Ctrl+f.</p>
<p>I believe that there is a cleaner to connect to a unix host from powerpoint&#8230; but I didn&#8217;t find it. If you know other solution&#8230; please share <img src='http://samuel.happycoders.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Some links to finish, I didn&#8217;t try anyterm but it looks cool too&#8230;</p>
<ul>
<li><a href="http://antony.lesuisse.org/qweb/trac/wiki/AjaxTerm" target="_blank">Ajaxterm</a></li>
<li><a href="http://anyterm.org/" target="_blank">Anyterm</a></li>
<li><a href="http://www.gnu.org/software/screen/screen.html" target="_blank">Gnu-Screen</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://samuel.happycoders.org/2007/11/15/demonstrate-a-unix-command-application-from-powerpoint/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to demo/browse a website using powerpoint?</title>
		<link>http://samuel.happycoders.org/2007/11/14/how-to-demobrowse-a-website-using-powerpoint/</link>
		<comments>http://samuel.happycoders.org/2007/11/14/how-to-demobrowse-a-website-using-powerpoint/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 02:40:47 +0000</pubDate>
		<dc:creator>samuel</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[geeky]]></category>

		<guid isPermaLink="false">http://samuel.happycoders.org/2007/11/14/how-to-demobrowse-a-website-using-powerpoint/</guid>
		<description><![CDATA[ .toleft { float: left;}  .toright{ float: right;} 
Problem: You are giving a powerpoint presentation, and during this presentation you need to show/browse a website. The solution that most of the persons will chose will be to hit &#8220;alt+tab&#8221; to switch the focus to their browser&#8230; Yes that does the  [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css"> .toleft { float: left;}  .toright{ float: right;} </style>
<p><u>Problem</u>: You are giving a powerpoint presentation, and during this presentation you need to show/browse a website. The solution that most of the persons will chose will be to hit &#8220;alt+tab&#8221; to switch the focus to their browser&#8230; Yes that does the trick&#8230; But you may want to show the website from your powerpoint to keep your audience captivated. I personally think that people has a tendency to get distracted when you switch away from your fullscreen powerpoint.<br />
<span class="toleft"><a href="http://samuel.happycoders.org/wp-content/uploads/2007/11/webbrowser.JPG" title="Chose the right component"><img src="http://samuel.happycoders.org/wp-content/uploads/2007/11/webbrowser.thumbnail.JPG" alt="Chose the right component" /></a><br />
</span><br />
My solution is  to integrate a &#8220;Microsoft Web browser&#8221; component on your slide, so you can use it to browse a website. Start by adding the component as shown in this screen shot.<br />
<br clear="all" /><br />
<span class="toright"><br />
<a href="http://samuel.happycoders.org/wp-content/uploads/2007/11/edit-full-ppt.JPG" title="Editition of the slide"><img src="http://samuel.happycoders.org/wp-content/uploads/2007/11/edit-full-ppt.thumbnail.JPG" alt="Editition of the slide" /></a><br />
</span><br />
Then you can put several buttons on your slide to control your embedded browser. It should look like on this screenshot.<br />
<br clear="all" /><br />
Finally you will have to add some Visual Basic code to your button&#8217;s callbacks. Something like:</p>
<pre class="vb"><span style="color: #b1b100;">Private</span> <span style="color: #b1b100;">Sub</span> FontDecrease_Click<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #b1b100;">Dim</span> Z <span style="color: #b1b100;">As</span> Variant
    WebBrowser1.<span style="color: #66cc66;">ExecWB</span> OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, Null, Z
&nbsp;
    <span style="color: #b1b100;">If</span> Z &gt; <span style="color: #cc66cc;">0</span> <span style="color: #b1b100;">Then</span>
        Z = Z - <span style="color: #cc66cc;">1</span>
    <span style="color: #b1b100;">Else</span>
        Z = <span style="color: #cc66cc;">0</span>
    <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span>
    WebBrowser1.<span style="color: #66cc66;">ExecWB</span> OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, Z, Null
<span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span>
&nbsp;
<span style="color: #b1b100;">Private</span> <span style="color: #b1b100;">Sub</span> FontIncrease_Click<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #b1b100;">Dim</span> Z <span style="color: #b1b100;">As</span> Variant
    WebBrowser1.<span style="color: #66cc66;">ExecWB</span> OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, Null, Z
&nbsp;
    <span style="color: #b1b100;">If</span> Z &lt; <span style="color: #cc66cc;">4</span> <span style="color: #b1b100;">Then</span>
        Z = Z + <span style="color: #cc66cc;">1</span>
    <span style="color: #b1b100;">Else</span>
        Z = <span style="color: #cc66cc;">4</span>
    <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span>
    WebBrowser1.<span style="color: #66cc66;">ExecWB</span> OLECMDID_ZOOM, OLECMDEXECOPT_DONTPROMPTUSER, Z, Null
<span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span>
&nbsp;
<span style="color: #b1b100;">Private</span> <span style="color: #b1b100;">Sub</span> StartDemo_Click<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
    WebBrowser1.<span style="color: #66cc66;">Navigate</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;http://samuel.happycoders.org/&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span>
&nbsp;</pre>
<p><strong>Download this code: </strong><a href="http://samuel.happycoders.org/code/test-www-ppt.pas">test-www-ppt.pas</a></p>
<p><br clear="all" />And here is the result:<br />
<a href="http://samuel.happycoders.org/wp-content/uploads/2007/11/result.JPG" title="Result"><img src="http://samuel.happycoders.org/wp-content/uploads/2007/11/result.thumbnail.JPG" alt="Result" /></a><br />
<br clear="all" /><a href="http://samuel.happycoders.org/wp-content/uploads/2007/11/test-web.ppt" title="Result">Download the example</a></p>
<p>In the next post I will explain why I wanted to do that&#8230; I have a really geeky reason <img src='http://samuel.happycoders.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://samuel.happycoders.org/2007/11/14/how-to-demobrowse-a-website-using-powerpoint/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

