<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/random</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Tue, 21 May 2013 03:18:48 GMT</pubDate>
<item>
<title>(Java) Random number generator - karellism</title>
<link>http://snipplr.com/view/70881/random-number-generator/</link>
<description><![CDATA[ <p>A random number generator using a for-loop.</p> ]]></description>
<pubDate>Mon, 22 Apr 2013 14:42:01 GMT</pubDate>
<guid>http://snipplr.com/view/70881/random-number-generator/</guid>
</item>
<item>
<title>(PL/SQL) Selecting a Random Row from Table in MySQL - apphp-snippets</title>
<link>http://snipplr.com/view/70369/selecting-a-random-row-from-table-in-mysql/</link>
<description><![CDATA[ <p>Here the simplest way of selecting random rows from the MySQL database with using "ORDER BY RAND()" clause in the query.</p> ]]></description>
<pubDate>Tue, 12 Mar 2013 22:09:43 GMT</pubDate>
<guid>http://snipplr.com/view/70369/selecting-a-random-row-from-table-in-mysql/</guid>
</item>
<item>
<title>(PHP) Basic PHP Image Rotation - goddess</title>
<link>http://snipplr.com/view/69502/basic-php-image-rotation/</link>
<description><![CDATA[ <p>simple image rotation script; save as rotate.php in folder with images, call  to display</p> ]]></description>
<pubDate>Wed, 16 Jan 2013 14:39:24 GMT</pubDate>
<guid>http://snipplr.com/view/69502/basic-php-image-rotation/</guid>
</item>
<item>
<title>(Python) Random alphanumeric string generator - zhyar</title>
<link>http://snipplr.com/view/67549/random-alphanumeric-string-generator/</link>
<description><![CDATA[ <p>Returns 5 random alphanumeric strings of arbitrary size.</p> ]]></description>
<pubDate>Mon, 01 Oct 2012 21:11:10 GMT</pubDate>
<guid>http://snipplr.com/view/67549/random-alphanumeric-string-generator/</guid>
</item>
<item>
<title>(JavaScript) Javascript using time to make GET POST calls no cache / random - kutyadog</title>
<link>http://snipplr.com/view/67343/javascript-using-time-to-make-get-post-calls-no-cache--random/</link>
<description><![CDATA[ <p>Simple code example that allows you to pull a time stamp / timestamp to attach to end of URL for GET POST calls</p> ]]></description>
<pubDate>Mon, 24 Sep 2012 22:10:19 GMT</pubDate>
<guid>http://snipplr.com/view/67343/javascript-using-time-to-make-get-post-calls-no-cache--random/</guid>
</item>
<item>
<title>(Python) Use a random user agent for each request - scrapy</title>
<link>http://snipplr.com/view/66992/use-a-random-user-agent-for-each-request/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 01 Sep 2012 07:15:13 GMT</pubDate>
<guid>http://snipplr.com/view/66992/use-a-random-user-agent-for-each-request/</guid>
</item>
<item>
<title>(PHP) random string - tucq88</title>
<link>http://snipplr.com/view/66784/random-string/</link>
<description><![CDATA[ <p>Copied from CodeIgniter</p> ]]></description>
<pubDate>Fri, 17 Aug 2012 12:52:24 GMT</pubDate>
<guid>http://snipplr.com/view/66784/random-string/</guid>
</item>
<item>
<title>(JavaScript) Test randomness in JavaScript - Zielak</title>
<link>http://snipplr.com/view/66700/test-randomness-in-javascript/</link>
<description><![CDATA[ <p>This function tests how random will the Math.random() function be. You can test it with rnd(1000000) a couple of times to get results.</p> ]]></description>
<pubDate>Mon, 13 Aug 2012 16:59:35 GMT</pubDate>
<guid>http://snipplr.com/view/66700/test-randomness-in-javascript/</guid>
</item>
<item>
<title>(PHP) Random numbers from random.org - eortiz</title>
<link>http://snipplr.com/view/66584/random-numbers-from-randomorg/</link>
<description><![CDATA[ <p>Random function, thanks to (http://boallen.com/php-get-true-random-number.html "Bo Allen")</p> ]]></description>
<pubDate>Wed, 08 Aug 2012 03:53:45 GMT</pubDate>
<guid>http://snipplr.com/view/66584/random-numbers-from-randomorg/</guid>
</item>
<item>
<title>(PHP) Php Random String Generator - _reydin_</title>
<link>http://snipplr.com/view/65752/php-random-string-generator/</link>
<description><![CDATA[ <p>This will generate a random alpha numeric string 20 characters long.</p> ]]></description>
<pubDate>Fri, 22 Jun 2012 08:00:37 GMT</pubDate>
<guid>http://snipplr.com/view/65752/php-random-string-generator/</guid>
</item>
<item>
<title>(Rails) Pick a random element - akmuraro</title>
<link>http://snipplr.com/view/65426/pick-a-random-element/</link>
<description><![CDATA[ <p>in your model, add a def
to pick a record where an option (in my case lenght) is equal to 1</p> ]]></description>
<pubDate>Wed, 06 Jun 2012 21:46:06 GMT</pubDate>
<guid>http://snipplr.com/view/65426/pick-a-random-element/</guid>
</item>
<item>
<title>(SAS) Selecting a Random Sample of Observations - webonomic</title>
<link>http://snipplr.com/view/63355/selecting-a-random-sample-of-observations/</link>
<description><![CDATA[ <p>You can use the POINT option of the SET statement to efficiently select a random sample of observations from a SAS data set. In addiiton to any statistical reasons for drawing a random sample, the technique is also useful to create test data from a large file. The program shown here efficiently samples a large data set.
It reads only the observations that have been selected using the POINT option.
You assign a variable that is the desired sample size. The example here selects a 10% sample. You can also assign a fixed value (e.g., 100).
The DO loop is iterated for each observation
The uniform function is compared to the percent of observations still to be selected
If the observation is selected, it is read and output and the number needed is decremented by 1
Regardless the number of observations left is reduced by 1
The STOP statement is very important as without it, the DATA step will enter an infinite loop.
This technique works by modifying the threshold as observations are read and selected. Every observation has the same probability of being selected so the technique is statistically valid (If you are a statistician, you probably know this. If not, the analogy of drawing straws is the logic behind this.)</p> ]]></description>
<pubDate>Thu, 16 Feb 2012 02:08:13 GMT</pubDate>
<guid>http://snipplr.com/view/63355/selecting-a-random-sample-of-observations/</guid>
</item>
<item>
<title>(Java) [JAVA] Número Aleatorio Math.random() - goo</title>
<link>http://snipplr.com/view/62406/java-nmero-aleatorio-mathrandom/</link>
<description><![CDATA[ <p>Número aleatorio entre a y a + b, excluyendo a + b:
a + Math.random() * b</p> ]]></description>
<pubDate>Mon, 09 Jan 2012 02:27:25 GMT</pubDate>
<guid>http://snipplr.com/view/62406/java-nmero-aleatorio-mathrandom/</guid>
</item>
<item>
<title>(Java) Random - ottoman153</title>
<link>http://snipplr.com/view/62136/random/</link>
<description><![CDATA[ <p>genereer een random cijfer:
Math.random = cijfer tussen 0 - 1
maal 5 => 0-1-2-3-4</p> ]]></description>
<pubDate>Tue, 27 Dec 2011 19:07:28 GMT</pubDate>
<guid>http://snipplr.com/view/62136/random/</guid>
</item>
<item>
<title>(ActionScript 3) Random Range - shalomfriss</title>
<link>http://snipplr.com/view/60504/random-range/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 03 Nov 2011 06:50:32 GMT</pubDate>
<guid>http://snipplr.com/view/60504/random-range/</guid>
</item>
<item>
<title>(R) Drunk and her dog visualized - mjaniec</title>
<link>http://snipplr.com/view/60196/drunk-and-her-dog-visualized/</link>
<description><![CDATA[ <p>code inspired by the story presented in http://www-stat.wharton.upenn.edu/~steele/Courses/434/434Context/Co-integration/Murray93DrunkAndDog.pdf</p> ]]></description>
<pubDate>Wed, 26 Oct 2011 07:29:10 GMT</pubDate>
<guid>http://snipplr.com/view/60196/drunk-and-her-dog-visualized/</guid>
</item>
<item>
<title>(PHP) Pick random field vale from mySQL (image filename etc) - flatearthcomms</title>
<link>http://snipplr.com/view/59783/pick-random-field-vale-from-mysql-image-filename-etc/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 15 Oct 2011 02:06:51 GMT</pubDate>
<guid>http://snipplr.com/view/59783/pick-random-field-vale-from-mysql-image-filename-etc/</guid>
</item>
<item>
<title>(Python) Python - Random Numbers - Examples - denakitan</title>
<link>http://snipplr.com/view/59467/python--random-numbers--examples/</link>
<description><![CDATA[ <p>Example of some random number generation mechanisms built-in Python. More details in the following link: http://docs.python.org/library/random.html</p> ]]></description>
<pubDate>Thu, 06 Oct 2011 06:42:00 GMT</pubDate>
<guid>http://snipplr.com/view/59467/python--random-numbers--examples/</guid>
</item>
<item>
<title>(JavaScript) After Effects expression random flicker - one984</title>
<link>http://snipplr.com/view/59310/after-effects-expression-random-flicker/</link>
<description><![CDATA[ <p>After Effects expression random flicker</p> ]]></description>
<pubDate>Sat, 01 Oct 2011 09:47:53 GMT</pubDate>
<guid>http://snipplr.com/view/59310/after-effects-expression-random-flicker/</guid>
</item>
<item>
<title>(JavaScript) Javascript random between - tomdowning</title>
<link>http://snipplr.com/view/58925/javascript-random-between/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 21 Sep 2011 23:28:41 GMT</pubDate>
<guid>http://snipplr.com/view/58925/javascript-random-between/</guid>
</item>
</channel>
</rss>