NEW LISTINGS  HOT LISTINGS  TOP RATED  EDITOR PICK  ADD A LISTING  UPDATE A LISTING  GET RATED  UPGRADE A LISTING
  HOME     MY ACCOUNT     POWER SEARCH     REGISTER     MEMBER LIST     SUGGEST CATEGORY  

Average Visitor Rating: 0.00 (out of 5)
Number of ratings: 0 Votes

Visitor Rating

Generating weighed random numbers
14819 Generating weighed random numbers http://www.javascriptkit.com/javatutors/weighrandom.shtml While it's impossible to forecast the exact occurrence of a random event, even a non-mathematician would agree we can manipulate the likelihood of something occurring. For example, in the case of winning the lottery, that would simply mean buying more tickets (and having your dreams dashed multiple times of course). In this tutorial, we take a stab at generating weighed random numbers, or random numbers with some more likely to show up than others. This is useful in situations where you need a more refined random engine, for example in a banner script that can display some banners more often than others. JavaScript > Tips and Tutorials > Randomizing Oct 12, 2006 JavaScript Kit

Write a Review   Add to My Favorite   Refer it to Friend   Report Broken Link  

Bookmark Generating weighed random numbers:


Other links at JavaScript > Tips and Tutorials > Randomizing
While it's impossible to forecast the exact occurrence of a random event, even a non-mathematician would agree we can manipulate the likelihood of something occurring. For example, in the case of winning the lottery, that would simply mean buying more tickets (and having your dreams dashed multiple times of course). In this tutorial, we take a stab at generating weighed random numbers, or random numbers with some more likely to show up than others. This is useful in situations where you need a more refined random engine, for example in a banner script that can display some banners more often than others.
Category:

Using external javascript files are great. You code them once. Check them then transplant them to any page by adding the SRC="./external file.js" to your tags. We use it extensively for the Date Stamp(Wednesday, December 20, 2006 ) on our pages. We know the code will not change and makes it easier putting it into multiple pages. Also, we will use it to change content on a page randomly or date based. Neat trick and gives your visitors fresh content. Another advantage is that your code will not be visible to folks that right click and view source on your pages.
Category:




Main Category
199
2044
829
286
175
1801
1439
913
1177
7568
70
917
59
2238
175

Join Mailing List
Joining mailing list will entitle you to receive occasional emails informing you of news and updates to the site and any special offers that may be of interest to you.



Top 10
Directory Statistics

Links: 19871
Categories: 1275
Registered Users: 766
Mailing List Subscribers: 2047
Unique Outgoing Hits: 231139

Pagerank Statistics
PR 10
1 site(s)
PR 9
14 site(s)
PR 8
43 site(s)
PR 7
233 site(s)
PR 6
689 site(s)
PR 5
1774 site(s)

PHP News