<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments for /log</title>
	<atom:link href="http://log.egamal.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://log.egamal.com</link>
	<description>life.log()</description>
	<lastBuildDate>Thu, 04 Mar 2010 16:50:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on TDD using PHPUnit, NetBeans by me</title>
		<link>http://log.egamal.com/2010/02/tdd-using-phpunit-netbeans/comment-page-1/#comment-7166</link>
		<dc:creator>me</dc:creator>
		<pubDate>Thu, 04 Mar 2010 16:50:03 +0000</pubDate>
		<guid isPermaLink="false">http://log.egamal.com/?p=199#comment-7166</guid>
		<description>You are welcome :)</description>
		<content:encoded><![CDATA[<p>You are welcome <img src='http://log.egamal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TDD using PHPUnit, NetBeans by Gawish</title>
		<link>http://log.egamal.com/2010/02/tdd-using-phpunit-netbeans/comment-page-1/#comment-7165</link>
		<dc:creator>Gawish</dc:creator>
		<pubDate>Thu, 04 Mar 2010 16:09:49 +0000</pubDate>
		<guid isPermaLink="false">http://log.egamal.com/?p=199#comment-7165</guid>
		<description>thanks for  this simple post</description>
		<content:encoded><![CDATA[<p>thanks for  this simple post</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Primes Problem in Python by me</title>
		<link>http://log.egamal.com/2010/02/primes-exceed-time-limit/comment-page-1/#comment-7020</link>
		<dc:creator>me</dc:creator>
		<pubDate>Sat, 06 Feb 2010 12:54:58 +0000</pubDate>
		<guid isPermaLink="false">http://log.egamal.com/?p=241#comment-7020</guid>
		<description>Well, I knew that fact in the meeting, Ahmed Soliman told me That ..
And I tried that now and they both had the same id :)

BTW, The theme is Mac-like :)</description>
		<content:encoded><![CDATA[<p>Well, I knew that fact in the meeting, Ahmed Soliman told me That ..<br />
And I tried that now and they both had the same id <img src='http://log.egamal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>BTW, The theme is Mac-like <img src='http://log.egamal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Primes Problem in Python by KAM</title>
		<link>http://log.egamal.com/2010/02/primes-exceed-time-limit/comment-page-1/#comment-7018</link>
		<dc:creator>KAM</dc:creator>
		<pubDate>Sat, 06 Feb 2010 06:42:16 +0000</pubDate>
		<guid isPermaLink="false">http://log.egamal.com/?p=241#comment-7018</guid>
		<description>about the girlish thing , check this and it may give you some insights :)
http://www.23monkeys.com/designs/python


and another thing , even numerical and string data types have the same behavior and are implemented in the say way.
For Strings , it doesn&#039;t matter because they&#039;re immutable anyway so you can&#039;t see the effect of changing it somewhere and seeing this change every where through different variables referencing the same object.
and the same thing will apply for integers.

you can check this by
&lt;pre class=&#039;brush:python&#039;&gt;
x = &quot;test&quot;
y = x
print id(x)
print id(y)
&lt;/pre&gt;

:) .. BTW , i love the elegance of your theme.</description>
		<content:encoded><![CDATA[<p>about the girlish thing , check this and it may give you some insights <img src='http://log.egamal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<a href="http://www.23monkeys.com/designs/python" rel="nofollow">http://www.23monkeys.com/designs/python</a></p>
<p>and another thing , even numerical and string data types have the same behavior and are implemented in the say way.<br />
For Strings , it doesn&#8217;t matter because they&#8217;re immutable anyway so you can&#8217;t see the effect of changing it somewhere and seeing this change every where through different variables referencing the same object.<br />
and the same thing will apply for integers.</p>
<p>you can check this by</p>
<pre class='brush:python'>
x = "test"
y = x
print id(x)
print id(y)
</pre>
<p> <img src='http://log.egamal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .. BTW , i love the elegance of your theme.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Primes Problem in Python by me</title>
		<link>http://log.egamal.com/2010/02/primes-exceed-time-limit/comment-page-1/#comment-7017</link>
		<dc:creator>me</dc:creator>
		<pubDate>Sat, 06 Feb 2010 03:13:57 +0000</pubDate>
		<guid isPermaLink="false">http://log.egamal.com/?p=241#comment-7017</guid>
		<description>well I didn&#039;t get the girlish thing, but it sounded like you meant the pythonic style that enforces less special characters including ampersand ..
Finally I always considered python data structures (tuple, list and dictionary) to be acting like numeric and string data types ..
But It sounds they are not .. and it sounds that PHP effect is still there ..
as PHP array used to be deeply copied in assignment ..
&lt;pre class=&#039;brush:php&#039;&gt;
$myArray = array(1,2,3);
$yourArray = $myArray ; // here $yourArray is new copy of $myArray .. &quot;deeply&quot; copied 
$yourArray[0] = 3;
$myArray[0] =2;
var_dump($myArray); // first element will be 2
var_dump($yourArray);//first element will be 3
&lt;/pre&gt;

Again thanks for your participation KAM :)</description>
		<content:encoded><![CDATA[<p>well I didn&#8217;t get the girlish thing, but it sounded like you meant the pythonic style that enforces less special characters including ampersand ..<br />
Finally I always considered python data structures (tuple, list and dictionary) to be acting like numeric and string data types ..<br />
But It sounds they are not .. and it sounds that PHP effect is still there ..<br />
as PHP array used to be deeply copied in assignment ..</p>
<pre class='brush:php'>
$myArray = array(1,2,3);
$yourArray = $myArray ; // here $yourArray is new copy of $myArray .. "deeply" copied
$yourArray[0] = 3;
$myArray[0] =2;
var_dump($myArray); // first element will be 2
var_dump($yourArray);//first element will be 3
</pre>
<p>Again thanks for your participation KAM <img src='http://log.egamal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Primes Problem in Python by KAM</title>
		<link>http://log.egamal.com/2010/02/primes-exceed-time-limit/comment-page-1/#comment-7014</link>
		<dc:creator>KAM</dc:creator>
		<pubDate>Fri, 05 Feb 2010 16:31:11 +0000</pubDate>
		<guid isPermaLink="false">http://log.egamal.com/?p=241#comment-7014</guid>
		<description>&quot;So first of all did you expected that .. from Python behavior .. ?&quot;

Maybe python&#039;s everything-is-so-easy behavior may tell you that it&#039;s assigning by value but - a big one is coming - think again , what would things be like if you are assigning by value ? Things will be OK until you need a reference to your objects - as in passing by reference - so python will have to give developers some way to extract the reference - yeah i know pointers and the big &quot;&amp;&quot; is popping up now - and Oops we are hit again by the complex and hazardous pointer programming which some programmers hate - those girls - and we have noway to avoid it.
Now think of the world with assign by reference :) , it&#039;s a pretty nice and girlish one.

The same behavior exist in Java and i&#039;m sure it&#039;ll be in every other programming language that wants to avoid the pointer programming - unless i&#039;m mistaken-.</description>
		<content:encoded><![CDATA[<p>&#8220;So first of all did you expected that .. from Python behavior .. ?&#8221;</p>
<p>Maybe python&#8217;s everything-is-so-easy behavior may tell you that it&#8217;s assigning by value but &#8211; a big one is coming &#8211; think again , what would things be like if you are assigning by value ? Things will be OK until you need a reference to your objects &#8211; as in passing by reference &#8211; so python will have to give developers some way to extract the reference &#8211; yeah i know pointers and the big &#8220;&amp;&#8221; is popping up now &#8211; and Oops we are hit again by the complex and hazardous pointer programming which some programmers hate &#8211; those girls &#8211; and we have noway to avoid it.<br />
Now think of the world with assign by reference <img src='http://log.egamal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  , it&#8217;s a pretty nice and girlish one.</p>
<p>The same behavior exist in Java and i&#8217;m sure it&#8217;ll be in every other programming language that wants to avoid the pointer programming &#8211; unless i&#8217;m mistaken-.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Primes Problem in Python by me</title>
		<link>http://log.egamal.com/2010/02/primes-exceed-time-limit/comment-page-1/#comment-7013</link>
		<dc:creator>me</dc:creator>
		<pubDate>Fri, 05 Feb 2010 13:13:29 +0000</pubDate>
		<guid isPermaLink="false">http://log.egamal.com/?p=241#comment-7013</guid>
		<description>http://www.lastengine.com/syntax-highlighter-wordpress-plugin/#usage

Check this page for how to use the syntax highlighter ..
I don&#039;t want to search any pre-known algorithms before running out of trials :)

Thanks for your help :)</description>
		<content:encoded><![CDATA[<p><a href="http://www.lastengine.com/syntax-highlighter-wordpress-plugin/#usage" rel="nofollow">http://www.lastengine.com/syntax-highlighter-wordpress-plugin/#usage</a></p>
<p>Check this page for how to use the syntax highlighter ..<br />
I don&#8217;t want to search any pre-known algorithms before running out of trials <img src='http://log.egamal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks for your help <img src='http://log.egamal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Primes Problem in Python by KAM</title>
		<link>http://log.egamal.com/2010/02/primes-exceed-time-limit/comment-page-1/#comment-7012</link>
		<dc:creator>KAM</dc:creator>
		<pubDate>Fri, 05 Feb 2010 13:06:01 +0000</pubDate>
		<guid isPermaLink="false">http://log.egamal.com/?p=241#comment-7012</guid>
		<description>Just a question , how do you write your code with syntax high-lighting enabled in you blog ?( is it just [code][/code] ? ) .

And by the way , Prime Number Generation is a huge topic and a topic under research for centuries . So , yes there must be a better solution. :)</description>
		<content:encoded><![CDATA[<p>Just a question , how do you write your code with syntax high-lighting enabled in you blog ?( is it just [code][/code] ? ) .</p>
<p>And by the way , Prime Number Generation is a huge topic and a topic under research for centuries . So , yes there must be a better solution. <img src='http://log.egamal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Primes Problem in Python by me</title>
		<link>http://log.egamal.com/2010/02/primes-exceed-time-limit/comment-page-1/#comment-7011</link>
		<dc:creator>me</dc:creator>
		<pubDate>Fri, 05 Feb 2010 12:46:39 +0000</pubDate>
		<guid isPermaLink="false">http://log.egamal.com/?p=241#comment-7011</guid>
		<description>Again ..
time limit exceeded	-	 4.9M memory usage :(

BTW, someone -using C#- had time limit exceed and 14 M memory usage :)

There must be a better solution
Thanks KAM I Saved .2 Mega</description>
		<content:encoded><![CDATA[<p>Again ..<br />
time limit exceeded	-	 4.9M memory usage <img src='http://log.egamal.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>BTW, someone -using C#- had time limit exceed and 14 M memory usage <img src='http://log.egamal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>There must be a better solution<br />
Thanks KAM I Saved .2 Mega</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Primes Problem in Python by me</title>
		<link>http://log.egamal.com/2010/02/primes-exceed-time-limit/comment-page-1/#comment-7010</link>
		<dc:creator>me</dc:creator>
		<pubDate>Fri, 05 Feb 2010 12:33:17 +0000</pubDate>
		<guid isPermaLink="false">http://log.egamal.com/?p=241#comment-7010</guid>
		<description>Thanks for your comment ..
So first of all did you expected that .. from Python behavior .. ?
2,3
Reason of doing that is I&#039;m thinking of using this list in next time .. I generate primes..
Anyway:
Check that:
&lt;pre class=&quot;brush:python&quot;&gt;
times = input()
while times &gt; 0:
    times -= 1
    limits = raw_input()
    limits = limits.split(&quot; &quot;)
    downLimit = int(limits[0])
    upLimit = int(limits[1])
    numsList = []
    if downLimit &lt;= 2:
        numsList = [i for i in range(2,upLimit) if  i == 2 or i % 2]
    else:
        numsList = [i for i in range(downLimit,upLimit) if  i % 2 ]

    for oddNumber in numsList:
        primeNumber = True;
        for number in range( 2 , oddNumber / 2):
            if oddNumber % number == 0:
                primeNumber = False;
                break;
        
        if primeNumber:
            print oddNumber

&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for your comment ..<br />
So first of all did you expected that .. from Python behavior .. ?<br />
2,3<br />
Reason of doing that is I&#8217;m thinking of using this list in next time .. I generate primes..<br />
Anyway:<br />
Check that:</p>
<pre class="brush:python">
times = input()
while times > 0:
    times -= 1
    limits = raw_input()
    limits = limits.split(" ")
    downLimit = int(limits[0])
    upLimit = int(limits[1])
    numsList = []
    if downLimit < = 2:
        numsList = [i for i in range(2,upLimit) if  i == 2 or i % 2]
    else:
        numsList = [i for i in range(downLimit,upLimit) if  i % 2 ]

    for oddNumber in numsList:
        primeNumber = True;
        for number in range( 2 , oddNumber / 2):
            if oddNumber % number == 0:
                primeNumber = False;
                break;

        if primeNumber:
            print oddNumber
</pre>
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
