<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Mon, 20 May 2013 11:56:43 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Tobias Schlitt's Blog: Randomized Pi calculation]]></title>
      <guid>http://www.phpdeveloper.org/news/7545</guid>
      <link>http://www.phpdeveloper.org/news/7545</link>
      <description><![CDATA[<p>
Since there is no "magic variable" to get a value for Pi in an application, <i>Tobias Schlitt</i> offers up <a href="http://schlitt.info/applications/blog/index.php?/archives/538-Randomized-Pi-calculation.html">the next best thing</a> - his homegrown solution for creating the value (using a randomized variation).
</p>
<blockquote>
I don't know which is the most common way to calculate Pi in computer programs, but from the stochastics book a read for my recent stochastics exam, I have a randomized variation, which is quite cool I think.
</blockquote>
<p>
The code example <a href="http://schlitt.info/applications/blog/index.php?/archives/538-Randomized-Pi-calculation.html">is included</a> along with a bit of explanation for those not familiar with the concepts behind it. It uses two of PHP functions, pow() and mt_rand(), to run through a series of iterations and, using a preset precision value, find the "hits" to finally calculate the value at the end.
</p>]]></description>
      <pubDate>Mon, 02 Apr 2007 10:04:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Syntux Blog: Advanced Caching Technique - Block Randomization]]></title>
      <guid>http://www.phpdeveloper.org/news/6098</guid>
      <link>http://www.phpdeveloper.org/news/6098</link>
      <description><![CDATA[<p>
In his latest entry to the Synutx blog, <i>Ammar Ibrahim</i> <a href="http://syntux.net/blog/2006/08/21/advanced-caching-technique-block-randomization/">talks about</a> an advanced chaching technique - block randomization.
</p>
<blockquote>
<p>
I'm currenlty working on a site where I want to improve performance of dynamic pages. One of the greatest techniques to do is to cache dynamic content and serve the generated output (HTML). It's not as easy as we all want it to be when you have all sorts of weird blocks on the page: User login area, random content, ..etc
</p>
<p>
As I had a very pleasent experience with eZ components last week, I decided to take a look at the components, but then i remembered it works on PHP5. This project is on PHP4, I had to look for an alternative and decided to use PEAR::Cache_Lite.
</p>
</blockquote>
<p>
He <a href="http://syntux.net/blog/2006/08/21/advanced-caching-technique-block-randomization/">gives a visual example</a> of what he's working towards and includes some sample code (using Cache_Lite) to create the blocks of content for his site. It took a few tries to get right, but apparently, third time's the charm.
</p>]]></description>
      <pubDate>Mon, 21 Aug 2006 16:18:25 -0500</pubDate>
    </item>
  </channel>
</rss>
