<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>A Developer E-pistle</title>
	<atom:link href="http://marcomagdy.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://marcomagdy.wordpress.com</link>
	<description>by Marco Magdy</description>
	<lastBuildDate>Tue, 30 Aug 2011 18:21:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='marcomagdy.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>A Developer E-pistle</title>
		<link>http://marcomagdy.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://marcomagdy.wordpress.com/osd.xml" title="A Developer E-pistle" />
	<atom:link rel='hub' href='http://marcomagdy.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Useful and Common bitwise operations in C</title>
		<link>http://marcomagdy.wordpress.com/2011/06/21/useful-and-common-bitwise-operations-in-c/</link>
		<comments>http://marcomagdy.wordpress.com/2011/06/21/useful-and-common-bitwise-operations-in-c/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 18:16:04 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[C\C++]]></category>

		<guid isPermaLink="false">http://marcomagdy.wordpress.com/?p=111</guid>
		<description><![CDATA[A collection of common and useful bitwise operations To multiply by 2 power x i = i &#60;&#60; x To set a bit in an integer: number &#124;= 1 &#60;&#60; x; To clear a bit in an integer: number &#124;= ~(1 &#60;&#60; x); To toggle a bit in an integer: number ^= 1 &#60;&#60; x; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=111&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A collection of common and useful bitwise operations</p>
<p>To multiply by 2 power x<br />
<code>i = i &lt;&lt; x</code></p>
<p>To set a bit in an integer:<br />
<code>number |= 1 &lt;&lt; x;</code></p>
<p>To clear a bit in an integer:<br />
<code>number |= ~(1 &lt;&lt; x);</code></p>
<p>To toggle a bit in an integer:<br />
<code>number ^= 1 &lt;&lt; x;</code></p>
<p>To check a bit in an integer:<br />
<code>is_checked = number &amp; (1 &lt;&lt; x);</code></p>
<p>To count the number of set bits in an integer:<br />
<code>i &amp;= i - 1; // will reset the right most set bit, loop until zero</code></p>
<br />Filed under: <a href='http://marcomagdy.wordpress.com/category/c/'>C#</a>, <a href='http://marcomagdy.wordpress.com/category/cc/'>C\C++</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/111/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/111/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/111/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=111&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2011/06/21/useful-and-common-bitwise-operations-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>Interview Screening Question</title>
		<link>http://marcomagdy.wordpress.com/2010/10/29/interview-screening-question/</link>
		<comments>http://marcomagdy.wordpress.com/2010/10/29/interview-screening-question/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 17:17:37 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">https://marcomagdy.wordpress.com/2010/10/29/interview-screening-question/</guid>
		<description><![CDATA[I received the following test as a screening step to a potential Software Engineer position. I thought it was pretty good compared to the type and nature of screenings you usually get in the Tampa Bay market. Here it goes: Implement the missing class without modifying the provided classes. The correct output should be: Local [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=100&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I received the following test as a screening step to a potential Software Engineer position. I thought it was pretty good compared to the type and nature of screenings you usually get in the Tampa Bay market.</p>
<p>Here it goes:</p>
<p><em>Implement the missing class without modifying the provided classes. </em><br />
<em>The correct output should be:<br />
</em><em>Local Boys = 6 (Home)<br />
</em><em>Tourists = 0 (Away)</em></p>
<p>&nbsp;</p>
<p><pre class="brush: csharp;">
using System;

namespace Test {
    public class FootballTeam : Team {
        public FootballTeam(string name, FieldAdvantage side)
            : base(name, side) {
        }

        public override int NumPlayers {
            get {
                return 11;
            }
        }

        public void Touchdown() {
            Score += 6;
        }
    }

    public class Game {
        public FootballTeam Home = new FootballTeam(&quot;Local Boys&quot;, Team.FieldAdvantage.Home);
        public FootballTeam Away = new FootballTeam(&quot;Tourists&quot;, Team.FieldAdvantage.Away);

        public static void Main() {
            Game game = new Game();
            Referee referee = new Referee(game);
            game.Home.Touchdown();
            game.Away.Touchdown();
            game.Home.Score += 100;
            Console.WriteLine(&quot;{0} = {1} ({2})&quot;, game.Home, game.Home.Score, game.Home.Side.ToString());
            Console.WriteLine(&quot;{0} = {1} ({2})&quot;, game.Away, game.Away.Score, game.Away.Side.ToString());
        }
    }

    public class Referee {
        public Referee(Game game) {
            game.Home.ScoreChange += new Team.ScoreChangeEventHandler(OnScoreChange);
            game.Away.ScoreChange += new Team.ScoreChangeEventHandler(OnScoreChange);
        }

        private void OnScoreChange(Team.FieldAdvantage side, int newScore, ref bool overrule) {
            if ((side == Team.FieldAdvantage.Away) || (newScore &gt; 100))
                overrule = true;
        }
    }
}
</pre></p>
<br />Filed under: <a href='http://marcomagdy.wordpress.com/category/c/'>C#</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=100&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2010/10/29/interview-screening-question/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.NET MVC Model Binding Form Inputs To Action Parameters</title>
		<link>http://marcomagdy.wordpress.com/2009/09/03/asp-net-mvc-model-binding-form-inputs-to-action-parameters/</link>
		<comments>http://marcomagdy.wordpress.com/2009/09/03/asp-net-mvc-model-binding-form-inputs-to-action-parameters/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 21:48:01 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://marcomagdy.wordpress.com/?p=57</guid>
		<description><![CDATA[The conventions followed by asp.net mvc for model binding are volatile to my brain for some reason. Here is a summary of the different ways to bind input fields to action parameters. Assuming the following class: Binding a Custom type Will bind to: Binding a Custom type with parameter name prefix Will bind to: Binding [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=57&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The conventions followed by asp.net mvc for model binding are volatile to my brain for some reason.</p>
<p>Here is a summary of the different ways to bind input fields to action parameters.<br />
Assuming the following class:<br />
<pre class="brush: csharp;">
public class Person
{
    public string Name;
    public string Email;
}
</pre></p>
<h3>Binding a Custom type</h3>
<p><pre class="brush: csharp;">
&lt;%= Html.TextBox(&quot;Name&quot;) %&gt;
&lt;%= Html.TextBox(&quot;Email&quot;) %&gt;
</pre><br />
Will bind to:<br />
<pre class="brush: csharp;">
public ActionResult MyAction(Person myPerson)
{
    // …
}
</pre></p>
<h3>Binding a Custom type with parameter name prefix</h3>
<p><pre class="brush: csharp;">
&lt;%= Html.TextBox(&quot;myPerson.Name&quot;) %&gt;
&lt;%= Html.TextBox(&quot;myPerson.Email&quot;) %&gt;
</pre></p>
<p>Will bind to:<br />
<pre class="brush: csharp;">
public ActionResult MyAction(Person myPerson)
{
    //…
}
</pre></p>
<h3>Binding a Custom type with a custom prefix</h3>
<p><pre class="brush: csharp;">
&lt;%= Html.TextBox(&quot;myPrefix.Name&quot;) %&gt;
&lt;%= Html.TextBox(&quot;myPrefix.Email&quot;) %&gt;
</pre><br />
Will bind to:<br />
<pre class="brush: csharp;">
public ActionResult MyAction([Bind(Prefix = &quot;myPrefix&quot;)] Person myPerson)
{
    // ...
}
</pre></p>
<h3>Binding to Collections of Simple Types</h3>
<p><pre class="brush: csharp;">
&lt;%= Html.TextBox(&quot;Name&quot;) %&gt;
&lt;%= Html.TextBox(&quot;Name&quot;) %&gt;
&lt;%= Html.TextBox(&quot;Name&quot;) %&gt;
</pre><br />
Will bind to:<br />
<pre class="brush: csharp;">
public ActionResult MyAction(List&lt;string&gt; Name)
{
    // …
}
</pre></p>
<h3>Binding to Collections of Custom Types</h3>
<p><pre class="brush: csharp;">
&lt;%= Html.TextBox(&quot;myPerson[0].Name&quot;) %&gt;
&lt;%= Html.TextBox(&quot;myPerson[0].Email&quot;) %&gt;
&lt;%= Html.TextBox(&quot;myPerson[1].Name&quot;) %&gt;
&lt;%= Html.TextBox(&quot;myPerson[1].Email&quot;) %&gt;
</pre><br />
Will bind to<br />
<pre class="brush: csharp;">
public ActionResult MyAction(List&lt;Person&gt; myPerson)
{
    //…
}
</pre></p>
<h3>Binding to Dictionary of Custom Types</h3>
<p><pre class="brush: csharp;">
&lt;%= Html.Hidden(&quot;myPerson[0].key&quot;, &quot;keyOne&quot;) %&gt;
&lt;%= Html.TextBox(&quot;myPerson[0].value.Name&quot;) %&gt;
&lt;%= Html.Hidden(&quot;myPerson[1].key&quot;, &quot;keyTwo&quot;) %&gt;
&lt;%= Html.TextBox(&quot;myPerson[1].value.Name&quot;) %&gt;
</pre><br />
Will bind to<br />
<pre class="brush: csharp;">
public ActionResult MyAction(IDictionary&lt;string, Person&gt; myPerson)
{
    // …
}
</pre></p>
<br />Posted in ASP.NET, C#, MVC, Web  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=57&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2009/09/03/asp-net-mvc-model-binding-form-inputs-to-action-parameters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>Notes on MVC routes mapping</title>
		<link>http://marcomagdy.wordpress.com/2009/07/16/notes-on-mvc-routes-mapping/</link>
		<comments>http://marcomagdy.wordpress.com/2009/07/16/notes-on-mvc-routes-mapping/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 17:24:16 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2009/07/16/notes-on-mvc-routes-mapping/</guid>
		<description><![CDATA[Add the more specific rules first and the more generalized ones at the end Define defaults from the back to front controller and action must exist in all rules either in the URL part or the default part. Otherwise the route handler won&#8217;t know what controller/action to map the URL to. Posted in MVC<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=38&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ol>
<li>Add the more specific rules first and the more generalized ones at the end</li>
<li>Define<em> defaults </em>from the back to front</li>
<li><em>controller</em> and <em>action</em> must exist in all rules either in the URL part or the default part. Otherwise the route handler won&#8217;t know what controller/action to map the URL to.</li>
</ol>
<br />Posted in MVC  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=38&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2009/07/16/notes-on-mvc-routes-mapping/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>Things I&#8217;d love to learn more about</title>
		<link>http://marcomagdy.wordpress.com/2009/03/25/things-id-love-to-learn-more-about/</link>
		<comments>http://marcomagdy.wordpress.com/2009/03/25/things-id-love-to-learn-more-about/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 15:03:26 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2009/03/25/things-id-love-to-learn-more-about/</guid>
		<description><![CDATA[Below are some questions in various subjects I encounter either through day to day work or reading tech articles and blogs. I will put the subjects in bullets and when i find the answers i will hyper-link them to another post where I write the answer I found. How exceptions are implemented by compilers? How [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=37&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Below are some questions in various subjects I encounter either through day to day work or reading tech articles and blogs.</p>
<p>I will put the subjects in bullets and when i find the answers i will hyper-link them to another post where I write the answer I found.</p>
<ul>
<li>How exceptions are implemented by compilers? How does the assembly generated by the compiler look like?</li>
<li>In public key cryptography, what is the algorithm used to raise very large numbers to very large exponents? I know it uses assembly to do bit manipulation but what is the exact algorithm.</li>
</ul>
<p>If anyone can point me to some reference to fulfill my lust to learn about any of the subjects above, I’d appreciate it.</p>
<br />Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=37&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2009/03/25/things-id-love-to-learn-more-about/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>&quot;Remember Me&quot; Doesn&#8217;t work in ASP.NET</title>
		<link>http://marcomagdy.wordpress.com/2009/01/23/remember-me-doesnt-work-in-aspnet/</link>
		<comments>http://marcomagdy.wordpress.com/2009/01/23/remember-me-doesnt-work-in-aspnet/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 17:50:01 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2009/01/23/remember-me-doesnt-work-in-aspnet/</guid>
		<description><![CDATA[The &#34;remember me&#34; option in asp.net 2.0 will remember the user for as long as the Timeout period set in the forms authentication in the web.config It&#8217;s really weird how it works as it is now. Below is an excerpt from a post found on the DotNukeForum: How forms authentication cookies worked under asp.net 1.1 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=36&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The &quot;remember me&quot; option in asp.net 2.0 will remember the user for as long as the <em>Timeout</em> period set in the forms authentication in the web.config</p>
<p>It&#8217;s really weird how it works as it is now. Below is an excerpt from a post found on the DotNukeForum:</p>
<blockquote><p><em>How forms authentication cookies worked under asp.net 1.1</em></p>
<p>session cookies expiration = current datetime +the forms timeout value e.g. 60      <br />persistent cookies expiration = current datetime + 50 years</p>
<p>&#160;</p>
<p><em>How forms authentication cookies work under asp.net 2.0</em></p>
<p>session cookies expiration=current datetime +the forms timeout value e.g. 60      <br />persistent cookies expiration= current datetime +the forms timeout value e.g. 60</p>
</blockquote>
<br />Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=36&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2009/01/23/remember-me-doesnt-work-in-aspnet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>Regex Inverse Matching</title>
		<link>http://marcomagdy.wordpress.com/2009/01/09/regex-inverse-matching/</link>
		<comments>http://marcomagdy.wordpress.com/2009/01/09/regex-inverse-matching/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 21:36:33 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[Regular Expressions]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2009/01/09/regex-inverse-matching/</guid>
		<description><![CDATA[Came across a situation today were I need to inverse match on a string. In other words I want to match anything that is not xyz. Here is how to do it using negative look-ahead: ^((?!xyz).+)$ Alternatively you can use negative look-behind: ^(.+(?&#60;!xyz))$ Posted in Regular Expressions<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=35&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Came across a situation today were I need to inverse match on a string. In other words I want to match anything that is not xyz.</p>
<p>Here is how to do it using negative look-ahead:</p>
<p>^((?!xyz).+)$</p>
<p>Alternatively you can use negative look-behind:</p>
<p>^(.+(?&lt;!xyz))$</p>
<br />Posted in Regular Expressions  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=35&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2009/01/09/regex-inverse-matching/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>On Defensive Programming</title>
		<link>http://marcomagdy.wordpress.com/2008/10/19/on-defensive-programming/</link>
		<comments>http://marcomagdy.wordpress.com/2008/10/19/on-defensive-programming/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 16:27:29 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2008/10/19/on-defensive-programming/</guid>
		<description><![CDATA[Notes from Code Complete Use error-handling code for conditions you expect to occur; use assertions for conditions that should never occur Use assertions to document and verify preconditions and postconditions Throw exceptions at the right level of abstraction; include all information that led to the exception Always have a mechanism to log application errors and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=34&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Notes from Code Complete</p>
<ul>
<li>Use error-handling code for conditions you expect to occur; use assertions for conditions that should never occur</li>
<li>Use assertions to document and verify preconditions and postconditions</li>
<li>Throw exceptions at the right level of abstraction; include all information that led to the exception</li>
<li>Always have a mechanism to log application errors and a way to read that log.</li>
</ul>
<br />Posted in Uncategorized  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=34&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2008/10/19/on-defensive-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting Around Dynamic Casting To Achieve Better Design And Performance</title>
		<link>http://marcomagdy.wordpress.com/2008/09/02/getting-around-dynamic-casting-to-achieve-better-design-and-performance/</link>
		<comments>http://marcomagdy.wordpress.com/2008/09/02/getting-around-dynamic-casting-to-achieve-better-design-and-performance/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 03:19:35 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[C\C++]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2008/09/03/getting-around-dynamic-casting-to-achieve-better-design-and-performance/</guid>
		<description><![CDATA[Using dynamic casts to determine an execution path in your code is not the best to write your logic. I realized this fact while looking at Google&#8217;s style guide for C++ Do not use RTTI, except in unit-tests. If you find yourself in need of writing code that behaves differently based on the class of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=33&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Using dynamic casts to determine an execution path in your code is not the best to write your logic.</p>
<p>I realized this fact while looking at <a href="http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Run-Time_Type_Information__RTTI_" target="_blank">Google&#8217;s style guide for C++</a></p>
<blockquote><p>Do not use RTTI, except in unit-tests. If you find yourself in need of writing code that behaves differently based on the class of an object, consider one of the alternatives to querying the type. </p>
<p>Virtual methods are the preferred way of executing different code paths depending on a specific subclass type. This puts the work within the object itself. </p>
<p>If the work belongs outside the object and instead in some processing code, consider a double-dispatch solution, such as the Visitor design pattern. This allows a facility outside the object itself to determine the type of class using the built-in type system. </p>
<p>If you think you truly cannot use those ideas, you may use RTTI. But think twice about it. :-) Then think twice again. Do not hand-implement an RTTI-like workaround. The arguments against RTTI apply just as much to workarounds like class hierarchies with type tags.</p>
</blockquote>
<p>That was an eye-opener to me. I didn&#8217;t know what <a href="http://en.wikipedia.org/wiki/Double_dispatch" target="_blank">double-dispatch</a> is all about. Turns out that it&#8217;s the heart of the <a href="http://www.dofactory.com/Patterns/PatternVisitor.aspx" target="_blank">Visitor&#8217;s Pattern</a> (although the example at <a href="http://dofactory.com" target="_blank">dofactory.com</a> is not ideal because they do not provide overloads for the visit() function and they cast all types to the base).</p>
<p>&#160;</p>
<p><strong>Double-Dispatch is the ability to dynamically select a method according to the run-time type of the caller (single dispatch) and the run-time type of the argument as well.</strong></p>
<p>&#160;</p>
<p>To close out, remember before you use dynamic casting in your code to think if there is a better way to achieve the same results using <em>function overloads</em>, <em>virtual functions</em> or <em>double dispatch</em>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/marcomagdy.wordpress.com/33/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/marcomagdy.wordpress.com/33/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=33&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2008/09/02/getting-around-dynamic-casting-to-achieve-better-design-and-performance/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>Parsing SQL Statements With Regex</title>
		<link>http://marcomagdy.wordpress.com/2008/08/05/getting-around-sql-escaped-apostrophes-with-in-a-regex/</link>
		<comments>http://marcomagdy.wordpress.com/2008/08/05/getting-around-sql-escaped-apostrophes-with-in-a-regex/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 13:41:11 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[Regular Expressions]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2008/08/05/getting-around-sql-escaped-apostrophes-with-in-a-regex/</guid>
		<description><![CDATA[I was trying to parse a SQL script the other day with regular expressions to extract some values of some columns. The script looked something like this: NSERT INTO wp_posts (ID, post_author, post_date, post_content, post_title) VALUES (5, 1, &#8217;2008-02-03 20:06:31&#8242;, &#8216;marco&#8221;s long text&#8217;, &#8216;hello world&#8217;); so I had a regular expression that would capture anything [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=32&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was trying to parse a SQL script the other day with regular expressions to extract some values of some columns. The script looked something like this:</p>
<blockquote><p>NSERT INTO wp_posts (ID, post_author, post_date, post_content, post_title) VALUES (5, 1, &#8217;2008-02-03 20:06:31&#8242;, &#8216;marco&#8221;s long text&#8217;, &#8216;hello world&#8217;);</p>
</blockquote>
<p><font color="#666666">so I had a regular expression that would capture anything between two apostrophes </font></p>
<blockquote><p><font color="#666666">&#8216;(?&lt;text&gt;[^']+)&#8217;</font></p>
</blockquote>
<p><font color="#666666">The problem is escaped apostrophes in the text itself. Like in the example above <em>marco&#8221;s long text</em> it would stop at the first apostrophe.</font></p>
<p><font color="#666666">So, in short,&#160; to get around that, I did a simple ORing like this:</font></p>
<blockquote><p><font color="#666666">&#8216;(?&lt;text&gt;([^']|[']{2})+)&#8217;</font></p>
</blockquote>
<p><font color="#666666">Seems very simple, but it took me a while to see the light.</font></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/marcomagdy.wordpress.com/32/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/marcomagdy.wordpress.com/32/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=32&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2008/08/05/getting-around-sql-escaped-apostrophes-with-in-a-regex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>My Favorite Geek Quotes</title>
		<link>http://marcomagdy.wordpress.com/2008/07/06/my-favorite-geek-quotes/</link>
		<comments>http://marcomagdy.wordpress.com/2008/07/06/my-favorite-geek-quotes/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 05:07:54 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[geek stuff]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2008/07/06/my-favorite-geek-quotes/</guid>
		<description><![CDATA[I think any of those would be cool to have on a T-shirt. I would love to change the world, but they won&#8217;t give me the source code There are 10 types of people, those who understand binary, and those who don&#8217;t There is no place like 127.0.0.1 Oh, please, Give me a &#60;br/&#62; I&#8217;m [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=30&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I think any of those would be cool to have on a T-shirt.
<ul>
<li>I would love to change the world, but they won&#8217;t give me the source code </li>
<li>There are 10 types of people, those who understand binary, and those who don&#8217;t </li>
<li>There is no place like 127.0.0.1 </li>
<li>Oh, please, Give me a &lt;br/&gt; </li>
<li>I&#8217;m not married, I&#8217;m only loosely coupled </li>
<li>To understand recursion, you must first understand recursion </li>
<li>Girls are like Internet domain names, the ones I like are already taken </li>
<li>How many people can read hex if only you and dead people can read hex? </li>
</ul>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/marcomagdy.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/marcomagdy.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=30&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2008/07/06/my-favorite-geek-quotes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>jscalendar shows at the top of the screen in IE7</title>
		<link>http://marcomagdy.wordpress.com/2008/06/17/jscalendar-shows-at-the-top-of-the-screen-in-ie7/</link>
		<comments>http://marcomagdy.wordpress.com/2008/06/17/jscalendar-shows-at-the-top-of-the-screen-in-ie7/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 05:32:19 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2008/06/17/jscalendar-shows-at-the-top-of-the-screen-in-ie7/</guid>
		<description><![CDATA[jscalendar v1.0 has a bug that makes the calendar displays at the top of the screen in IE7. Here is a patch that fixes it. reference: http://drupal.org/node/118926<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=29&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dynarch.com/projects/calendar/">jscalendar</a> v1.0 has a bug that makes the calendar displays at the top of the screen in IE7.</p>
<p><a href="http://blog.marcomagdy.com/wp-content/uploads/2008/06/jscalendar-1.0-patch.zip" title="jscalendar ie7 patch">Here is a patch</a> that fixes it.</p>
<p>reference: <a href="http://drupal.org/node/118926" target="_blank">http://drupal.org/node/118926</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/marcomagdy.wordpress.com/29/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/marcomagdy.wordpress.com/29/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=29&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2008/06/17/jscalendar-shows-at-the-top-of-the-screen-in-ie7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>Platform-Independent Bitwise Rotation function</title>
		<link>http://marcomagdy.wordpress.com/2008/02/26/platform-independent-bitwise-rotating-function/</link>
		<comments>http://marcomagdy.wordpress.com/2008/02/26/platform-independent-bitwise-rotating-function/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 05:02:26 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[C\C++]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2008/02/26/platform-independent-bitwise-rotating-function/</guid>
		<description><![CDATA[A simple macro to rotate the bits of an unsigned 32-bit value. using shift-left and shift-right we can achieve rotate-left and rotate-right. The macro above can be trivially converted to a function and used in C# for example.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=27&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A simple macro to rotate the bits of an unsigned 32-bit value. using shift-left and shift-right we can achieve rotate-left and rotate-right.</p>
<p><pre class="brush: cpp;">
#define rotlFixed(x,n) (((x) &lt;&lt; (n)) | ((x) &gt;&gt; (32 - (n))))
#define rotrFixed(x,n) (((x) &gt;&gt; (n)) | ((x) &lt;&lt; (32 - (n))))
</pre></p>
<p>The macro above can be trivially converted to a function and used in C# for example<em>.</em></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/marcomagdy.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/marcomagdy.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=27&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2008/02/26/platform-independent-bitwise-rotating-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>JavaScript font detector</title>
		<link>http://marcomagdy.wordpress.com/2008/02/24/javascript-font-detector/</link>
		<comments>http://marcomagdy.wordpress.com/2008/02/24/javascript-font-detector/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 02:37:26 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2008/02/24/javascript-font-detector/</guid>
		<description><![CDATA[I found this little JavaScript utility that tests for the existence of a specific font on the client machine. I thought it would be very handy to use for my church&#8217;s website (coming soon) which will probably have some content written in the Coptic language. Most probably we will be using Athanasuis font. Anyways, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=26&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I found this little <a href="http://www.lalit.org/lab/fontdetect.php" target="_blank">JavaScript utility</a> that tests for the existence of a specific font on the client machine.     <br />I thought it would be very handy to use for <a href="http://www.stmarystmina.org" target="_blank">my church&#8217;s website</a> (coming soon) which will probably have some content written in the Coptic language.</p>
<p>Most probably we will be using <a href="/wp-content/uploads/2008/02/Athanasuis-Plain.zip">Athanasuis font</a>.</p>
<p>Anyways, I want to save the script <a href="/wp-content/uploads/2008/02/font-detector.zip">here</a> in case the original site goes down or something.</p>
<p>The script is released under <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache License, Version 2.0</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/marcomagdy.wordpress.com/26/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/marcomagdy.wordpress.com/26/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=26&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2008/02/24/javascript-font-detector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>You Suck At Photoshop</title>
		<link>http://marcomagdy.wordpress.com/2008/02/23/you-suck-at-photoshop/</link>
		<comments>http://marcomagdy.wordpress.com/2008/02/23/you-suck-at-photoshop/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 03:33:13 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[geek stuff]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2008/02/23/you-suck-at-photoshop/</guid>
		<description><![CDATA[I stumbled on this series of youtube episodes at digg.com and I think they are amazing. if you have a few minutes check them out. each episode is like 5 minutes long. Here is episode #2 but definitely check out the other episodes as well in the related videos section.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=25&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I stumbled on this series of youtube episodes at digg.com and I think they are amazing.</p>
<p>if you have a few minutes check them out. each episode is like 5 minutes long.</p>
<p>Here is <a href="http://www.youtube.com/watch?v=VXeZ0s8DXZ0" target="_blank">episode #2</a> but definitely check out the other episodes as well in the related videos section.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/marcomagdy.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/marcomagdy.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=25&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2008/02/23/you-suck-at-photoshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>Shuffling Analysis</title>
		<link>http://marcomagdy.wordpress.com/2007/12/15/shuffling-analysis/</link>
		<comments>http://marcomagdy.wordpress.com/2007/12/15/shuffling-analysis/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 05:49:20 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[Algorithms]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2007/12/15/shuffling-analysis/</guid>
		<description><![CDATA[This post is in regard to Jeff Atwood&#8217;s post on Shuffling and The Danger of Naïveté. In his second post he used an example of shuffling three-card deck 600,000 times to explain how naive solutions can be dangerous. The post is extremely well written. I enjoyed every bit of it. However I had two questions [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=23&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post is in regard to <a href="http://www.codinghorror.com/blog/">Jeff  Atwood&#8217;s</a> post on <a href="http://www.codinghorror.com/blog/archives/001008.html?r=31644" target="_blank">Shuffling</a>  and <a href="http://www.codinghorror.com/blog/archives/001015.html" target="_blank">The  Danger of Naïveté.</a></p>
<p>In his second post he used an example of shuffling three-card deck 600,000 times to explain how naive solutions can be dangerous. The post is extremely well written. I enjoyed every bit of it. However I had two questions that I couldn&#8217;t find an answer for in Jeff&#8217;s post. <strong>Why exactly 3 permutations (out of the 6 possible ones) are biased? and why those 3 specifically are biased and not any other permutations?</strong></p>
<p>I spent sometime thinking about it and using a pencil and a paper I was able to get some answers.<br />
First here is the naive method: (I reversed the loop to be as similar as possible to the correct method)</p>
<pre>for (int i = cards.Length - 1; i &gt;= 0; i--)
{
    int n = random.Next(cards.Length);
    Swap(ref cards[i], ref cards[n]);
}</pre>
<p>And here is the correct one (<a href="http://en.wikipedia.org/wiki/Knuth_shuffle" target="_blank">Knuth  Shuffle</a>)</p>
<pre>for (int i = cards.Length - 1; i &gt; 0; i--)
{
    int n = rand.Next(i + 1);
    Swap(ref cards[i], ref cards[n]);
}</pre>
<p>Now let&#8217;s agree on some facts real quick. For a three-card deck:</p>
<ol>
<li>There are exactly 6 <strong>unique</strong> possible permutations for that   deck (3!)</li>
<li>Using the Naive shuffling method, there are 27 possible sequences of random-numbers   on any given run (3<sup>3</sup>)</li>
</ol>
<p>The answer to the first question above, is that 27 mod 6 is equal to 3. What that means is there are 3 extra sequences of random numbers that have to map to 1 (or 2 or 3) of the 6 unique permutations of the deck.</p>
<p>To answer the second question we have to note something first about using swapping to perform a shuffle, take a look at the state of the deck at each iteration given the following random numbers:</p>
<table cellpadding="2" cellspacing="2" width="100%">
<tr>
<td>
<table border="1" cellpadding="2" cellspacing="2" width="16%">
<tr>
<th align="center">Step</th>
<th>Random Number</th>
<th>Deck</th>
</tr>
<tr>
<td>0</td>
<td>N/A</td>
<td>123</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>132</td>
</tr>
<tr>
<td>2</td>
<td>3</td>
<td>123</td>
</tr>
<tr>
<td>3</td>
<td>3</td>
<td>321</td>
</tr>
</table>
</td>
<td>
<table border="1" cellpadding="2" cellspacing="2" width="16%">
<tr>
<th align="center">Step</th>
<th>Random Number</th>
<th>Deck</th>
</tr>
<tr>
<td>0</td>
<td>N/A</td>
<td>123</td>
</tr>
<tr>
<td>1</td>
<td>1</td>
<td>321</td>
</tr>
<tr>
<td>2</td>
<td>1</td>
<td>231</td>
</tr>
<tr>
<td>3</td>
<td>2</td>
<td>321</td>
</tr>
</table>
</td>
</tr>
</table>
<p>Notice how the two different sequences of random-numbers resulted in the same permutation of the deck. Now remember there are 27 possible sequences and only 6 unique permutations. if we divide 27/6 we get 4 (with remainder 3) which means there are at least 4 paths (or sequences) for every unique permutation of the deck, the 3 extra possible sequence lead to 3 of the unique permutations giving them an advantage over the other 3.</p>
<p>so basically we have 6 permutations of the deck, 3 of them have 4 random-number sequences that lead to them, and the other 3 have <strong>5</strong> sequences that lead to them.</p>
<p>In this particular example if you follow the algorithm above and try the following random-number sequences you will get the same deck permutation for all 5.</p>
<ul>
<li> 1,1,2</li>
<li>3,1,3</li>
<li> 2,2,2</li>
<li> 1,3,1</li>
<li> 2,3,3</li>
</ul>
<h3>Conclusion</h3>
<p>The problem with the Naive shuffling method is swapping! The fact that swapping elements in 2 (or more) different sequences can lead to the same deck permutation is a subtle problem.</p>
<p>The Knuth shuffle algorithm avoids that problem by ensuring N! possible random sequences where N is the number of elements in a deck (or any container).</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/marcomagdy.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/marcomagdy.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=23&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2007/12/15/shuffling-analysis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>Function Pointers</title>
		<link>http://marcomagdy.wordpress.com/2007/11/15/function-pointers/</link>
		<comments>http://marcomagdy.wordpress.com/2007/11/15/function-pointers/#comments</comments>
		<pubDate>Fri, 16 Nov 2007 02:19:59 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[C\C++]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2007/11/15/function-pointers/</guid>
		<description><![CDATA[Declaring function pointers in C\C++ has a somewhat strange syntax, specially when you want to specify a function pointer as the return type of another function. so here is a brief explanation: To declare a pointer to an int called pNumber: int *pNumber; To declare a pointer to a function called pFunc (that has a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=22&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Declaring function pointers in C\C++ has a somewhat strange syntax, specially when you want to specify a function pointer as the return type of another function.<br />
so here is a brief explanation:</p>
<p>To declare a pointer to an int called <em>pNumber</em>:</p>
<p><em><font color="#800080">int *</font><font color="#800000">pNumber</font>;</em></p>
<p>To declare a pointer to a function called <em>pFunc</em> (that has a <em>string </em>parameter and returns an <em>int</em>):</p>
<p><em><font color="#800080">int (*</font><font color="#800000"> pFunc</font><font color="#800080">)(string);</font></em></p>
<p><font color="#000000">in red is the variable name, in purple is the type.</font></p>
<p>To declare a function that returns a pointer to a function:</p>
<p><font color="#800080"><em>int (*</em></font> <em><font color="#800000">GetFuncPointer(void) </font><font color="#800080">)(string);</font></em></p>
<p>in red is a normal function declaration, in purple is the return type of that function<font color="#800080">.</font><br />
S o basically <em><font color="#800080">int(*)(string)</font></em> is the <strong>type </strong>of the function pointer.</p>
<p>If we want to declare a function that takes a function pointer as a parameter then we would write something like this:</p>
<p><em><font color="#800000">void RegisterCallBack(</font> <font color="#800080">int(*)(string) </font><font color="#800000">);</font></em> <font color="#339933"><em>/* unnamed parameter */</em></font></p>
<p>or</p>
<p><em><font color="#800000">void RegisterCallBack(</font> <font color="#800080">int(*myCallback)(string) </font><font color="#800000">);</font></em> <em><font color="#339933">/* named parameter */</font></em></p>
<p>A prettier way to use function pointers is to use <em>typedef</em> to declare an alias. The<em> typedef</em> syntax is exactly the same as declaring a regular variable (or a function pointer).</p>
<p><em><font color="#0000ff">typedef</font> <font color="#800080">int(*</font><font color="#800000">FunctionPointer</font><font color="#800080">)(string);</font></em></p>
<p>now we can use FunctionPointer like this:</p>
<p><em>FunctionPointer GetFuncPointer(void);</em></p>
<p><a href="http://boredzo.org/pointers/#function_pointers">Click For More Information&#8230;</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/marcomagdy.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/marcomagdy.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=22&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2007/11/15/function-pointers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>Mr. Compiler, would you please inline this function?</title>
		<link>http://marcomagdy.wordpress.com/2007/11/05/mr-compiler-would-you-please-inline-my-function/</link>
		<comments>http://marcomagdy.wordpress.com/2007/11/05/mr-compiler-would-you-please-inline-my-function/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 17:32:59 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[C\C++]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2007/11/05/mr-compiler-would-you-please-inline-my-function/</guid>
		<description><![CDATA[I&#8217;ve always read that marking a function inline doesn&#8217;t guarantee that the compiler will actually inline it, but it&#8217;s merely a hint to the compiler to “try its best” to do it. Which have always raised the question in my head, how do I know if Mr. Compiler agreed to inline my function? Do I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=21&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always read that marking a function <em>inline </em>doesn&#8217;t guarantee that the compiler will actually inline it, but it&#8217;s merely a hint to the compiler to “try its best” to do it. Which have always raised the question in my head, how do I know if Mr. Compiler <em>agreed </em>to inline my function? Do I have to look at the generated assembly code? There has to be an easier way!</p>
<p>So I invested 15 minutes researching that issue and found out that Mr. Compiler is friendly enough to let you know if it was <em><strong>not </strong></em>possible to fulfill your request to inline a certain function by issuing a warning.</p>
<p>For Microsoft’s VC8 compiler <a href="http://msdn2.microsoft.com/en-us/library/yd3056cz%28VS.80%29.aspx" title="warning C41710" target="_blank">warning C4710</a> is turned off by default, you can turn it on by doing any of the following (depends on your choice):</p>
<ol>
<li> <code>#pragma warning (default : 4710)</code></li>
<li><code>#pragma warning (custom_warning_level : 4710)</code></li>
</ol>
<p>For GCC  the <a href="http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Warning-Options.html" target="_blank">-Winline switch</a> can be used to achieve the same thing.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/marcomagdy.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/marcomagdy.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=21&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2007/11/05/mr-compiler-would-you-please-inline-my-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing nVidia drivers on debian linux</title>
		<link>http://marcomagdy.wordpress.com/2007/11/02/installing-nvidia-drivers-on-debian-linux/</link>
		<comments>http://marcomagdy.wordpress.com/2007/11/02/installing-nvidia-drivers-on-debian-linux/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 23:02:28 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2007/11/02/installing-nvidia-drivers-on-debian-linux/</guid>
		<description><![CDATA[Since I forget the steps every single time I try to install or upgrade linux I&#8217;ll write them down. download the drivers from www.nvidia.com (usually a file with .run extension) download the kernel header files &#8212; apt-get install linux-headers-$(uname -r) execute the command &#8212; sh path to the nvidia driver here There is another method [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=20&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Since I forget the steps every single time I try to install or upgrade linux I&#8217;ll write them down.</p>
<ol>
<li>download the drivers from www.nvidia.com (usually a file with .run extension)</li>
<li>download the kernel header files &#8212; apt-get install linux-headers-$(uname -r)</li>
<li>execute the command &#8212; sh <em>path to the nvidia driver here</em></li>
</ol>
<p>There is another method I found, that seems to work for a lot of people:</p>
<ol>
<li>apt-get install module-assistant</li>
<li>m-a prepare</li>
<li>m-a auto-install nvidia</li>
</ol>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/marcomagdy.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/marcomagdy.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=20&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2007/11/02/installing-nvidia-drivers-on-debian-linux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8216;Developers&#8217; Anagrams !!!</title>
		<link>http://marcomagdy.wordpress.com/2007/08/07/developers-anagrams/</link>
		<comments>http://marcomagdy.wordpress.com/2007/08/07/developers-anagrams/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 03:47:43 +0000</pubDate>
		<dc:creator>Marco Magdy</dc:creator>
				<category><![CDATA[geek stuff]]></category>

		<guid isPermaLink="false">http://blog.marcomagdy.com/archive/2007/08/07/developers-anagrams/</guid>
		<description><![CDATA[I&#8217;m a big fan of anagrams, they are very interesting to me, they are mysterious, funny and sometimes true.. quoting a phrase on my favorite anagram generator site &#8220;All the life&#8217;s wisdom can be found in anagrams. Anagrams never lie.&#8221; here are a few interesting anagrams for the word developers: Peeve Lords (that&#8217;s us for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=19&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big fan of anagrams, they are very interesting to me, they are mysterious, funny and sometimes true..</p>
<p>quoting a phrase on <a href="http://wordsmith.org/anagram/index.html" title="Internet Anagram Server" target="_blank">my favorite anagram generator site</a> <em>&#8220;All the life&#8217;s wisdom can be found in anagrams.  Anagrams never lie.&#8221;</em></p>
<p>here are a few interesting anagrams for the word <em>developers</em>:</p>
<ul>
<li>Peeve Lords (that&#8217;s us for the customers)</li>
<li>Deep Solver</li>
<li>Speed Lover (for the performance obsessed ones)</li>
<li>Deep Lovers</li>
</ul>
<p>Anagrams are amazing..</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/marcomagdy.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/marcomagdy.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/marcomagdy.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/marcomagdy.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/marcomagdy.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/marcomagdy.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/marcomagdy.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/marcomagdy.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/marcomagdy.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/marcomagdy.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/marcomagdy.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/marcomagdy.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/marcomagdy.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/marcomagdy.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/marcomagdy.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/marcomagdy.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=marcomagdy.wordpress.com&amp;blog=566067&amp;post=19&amp;subd=marcomagdy&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://marcomagdy.wordpress.com/2007/08/07/developers-anagrams/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/69d7765491ded8ee7f4059ce5d504d11?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">marco</media:title>
		</media:content>
	</item>
	</channel>
</rss>
