<?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 on: A PHP Competition 2</title>
	<atom:link href="http://codingrecipes.com/a-php-competition-2/feed" rel="self" type="application/rss+xml" />
	<link>http://codingrecipes.com/a-php-competition-2</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 04:47:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Codehead</title>
		<link>http://codingrecipes.com/a-php-competition-2/comment-page-1#comment-321</link>
		<dc:creator>Codehead</dc:creator>
		<pubDate>Fri, 31 Jul 2009 20:06:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.code-head.com/?p=619#comment-321</guid>
		<description>I didn&#039;t approve the responses so they won&#039;t effect anybody&#039;s solution...</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t approve the responses so they won&#8217;t effect anybody&#8217;s solution&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Clark</title>
		<link>http://codingrecipes.com/a-php-competition-2/comment-page-1#comment-320</link>
		<dc:creator>Jeff Clark</dc:creator>
		<pubDate>Wed, 10 Jun 2009 05:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.code-head.com/?p=619#comment-320</guid>
		<description>Not much of a competition considering how easy it was.  Must be why there were no responses.

Well, since your specification ranges overlapped I&#039;ll just go by groups of 1000 starting with 0.

... drum roll ...

abs((floor($codeheads++/1000)/10)-0.9)

If you want code that does not generate a NOTICE error:

abs((floor((isset($codeheads)?$codeheads++:$codeheads=1)/1000)/10)-0.9);</description>
		<content:encoded><![CDATA[<p>Not much of a competition considering how easy it was.  Must be why there were no responses.</p>
<p>Well, since your specification ranges overlapped I&#8217;ll just go by groups of 1000 starting with 0.</p>
<p>&#8230; drum roll &#8230;</p>
<p>abs((floor($codeheads++/1000)/10)-0.9)</p>
<p>If you want code that does not generate a NOTICE error:</p>
<p>abs((floor((isset($codeheads)?$codeheads++:$codeheads=1)/1000)/10)-0.9);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vince</title>
		<link>http://codingrecipes.com/a-php-competition-2/comment-page-1#comment-319</link>
		<dc:creator>Vince</dc:creator>
		<pubDate>Wed, 29 Apr 2009 13:48:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.code-head.com/?p=619#comment-319</guid>
		<description>1 - ( .1 * intval( ( $count++ + 1000 ) / 1000 ) )

or if you wanted people to be a bit more confused change the increment around.

1 - ( .1 * intval( ( ++$count + 999 ) / 1000 ) )</description>
		<content:encoded><![CDATA[<p>1 &#8211; ( .1 * intval( ( $count++ + 1000 ) / 1000 ) )</p>
<p>or if you wanted people to be a bit more confused change the increment around.</p>
<p>1 &#8211; ( .1 * intval( ( ++$count + 999 ) / 1000 ) )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Turbo</title>
		<link>http://codingrecipes.com/a-php-competition-2/comment-page-1#comment-318</link>
		<dc:creator>Turbo</dc:creator>
		<pubDate>Wed, 15 Apr 2009 22:31:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.code-head.com/?p=619#comment-318</guid>
		<description>err... $count++, that is</description>
		<content:encoded><![CDATA[<p>err&#8230; $count++, that is</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Turbo</title>
		<link>http://codingrecipes.com/a-php-competition-2/comment-page-1#comment-317</link>
		<dc:creator>Turbo</dc:creator>
		<pubDate>Wed, 15 Apr 2009 22:31:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.code-head.com/?p=619#comment-317</guid>
		<description>$priority = sprintf(&#039;%01.1f&#039;, ((5000 - $count++)/5000));</description>
		<content:encoded><![CDATA[<p>$priority = sprintf(&#8216;%01.1f&#8217;, ((5000 &#8211; $count++)/5000));</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Codehead</title>
		<link>http://codingrecipes.com/a-php-competition-2/comment-page-1#comment-316</link>
		<dc:creator>Codehead</dc:creator>
		<pubDate>Wed, 08 Apr 2009 21:07:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.code-head.com/?p=619#comment-316</guid>
		<description>David, I honestly think that the post explains it clearly but yes, what you are asking is right and yes in order they are encountered in the loop.

Again yes, it&#039;s must be a mathematical operation, maybe function calls, you can nest as many function calls as you want but not ;

Thanks!</description>
		<content:encoded><![CDATA[<p>David, I honestly think that the post explains it clearly but yes, what you are asking is right and yes in order they are encountered in the loop.</p>
<p>Again yes, it&#8217;s must be a mathematical operation, maybe function calls, you can nest as many function calls as you want but not ;</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://codingrecipes.com/a-php-competition-2/comment-page-1#comment-315</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 08 Apr 2009 20:27:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.code-head.com/?p=619#comment-315</guid>
		<description>Your post is very ill-worded. If all URLs were given a priority of 0.9, then we&#039;ve technically fulfilled your requirements. However, I think I get what you&#039;re trying to say...

I get that the ############# has to be a mathematical one-liner (presumably not a custom function call)... My question is: Is the priority of the URLs is based solely on the order in which they are encountered within the loop?

For more clarity, is this what you mean?:

URLs 1-1000: Priority between 0.9 and 1
URLs 1001-2000: Priority between 0.8 and 0.89
URLs 2001-3000: Priority between 0.7 and 0.79
URLs 3001-4000: Priority between 0.6 and 0.69
URLs 4001-5000: Priority between 0.5 and 0.59

David</description>
		<content:encoded><![CDATA[<p>Your post is very ill-worded. If all URLs were given a priority of 0.9, then we&#8217;ve technically fulfilled your requirements. However, I think I get what you&#8217;re trying to say&#8230;</p>
<p>I get that the ############# has to be a mathematical one-liner (presumably not a custom function call)&#8230; My question is: Is the priority of the URLs is based solely on the order in which they are encountered within the loop?</p>
<p>For more clarity, is this what you mean?:</p>
<p>URLs 1-1000: Priority between 0.9 and 1<br />
URLs 1001-2000: Priority between 0.8 and 0.89<br />
URLs 2001-3000: Priority between 0.7 and 0.79<br />
URLs 3001-4000: Priority between 0.6 and 0.69<br />
URLs 4001-5000: Priority between 0.5 and 0.59</p>
<p>David</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Codehead</title>
		<link>http://codingrecipes.com/a-php-competition-2/comment-page-1#comment-314</link>
		<dc:creator>Codehead</dc:creator>
		<pubDate>Mon, 30 Mar 2009 21:17:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.code-head.com/?p=619#comment-314</guid>
		<description>I will approve the responses all at once 2 weeks from now...</description>
		<content:encoded><![CDATA[<p>I will approve the responses all at once 2 weeks from now&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Wharton</title>
		<link>http://codingrecipes.com/a-php-competition-2/comment-page-1#comment-313</link>
		<dc:creator>Jake Wharton</dc:creator>
		<pubDate>Mon, 30 Mar 2009 20:54:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.code-head.com/?p=619#comment-313</guid>
		<description>.9-.1*floor($count++/1000)</description>
		<content:encoded><![CDATA[<p>.9-.1*floor($count++/1000)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
