Activity Stream
48,167 MEMBERS
65238 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 4 of 4 FirstFirst ... 234
Results 31 to 32 of 32

Hybrid View

Mr Happy [PHP] Random Number Problem 2nd Jul 2010, 06:13 PM
jayfella hmmm. i have an idea. lemme have... 2nd Jul 2010, 06:18 PM
Hyperz $num = (time() & 1) ? mt_rand(1,... 2nd Jul 2010, 06:20 PM
jayfella a bit more complicated, but you get... 2nd Jul 2010, 06:27 PM
litewarez if(substr(time(),0,-1) > 7) { ... 2nd Jul 2010, 06:28 PM
jayfella why am i the only one writing the... 2nd Jul 2010, 06:29 PM
Hyperz My 1 line of code is the whole... 2nd Jul 2010, 06:44 PM
litewarez function doWork() { $rnd =... 2nd Jul 2010, 06:33 PM
Mr Happy Ok so these are all far superior on... 2nd Jul 2010, 06:44 PM
Hyperz Oh I didn't think of a matrix, that... 2nd Jul 2010, 06:52 PM
litewarez Clocked it bitches: Test Case: ... 2nd Jul 2010, 07:01 PM
Hyperz Not the best implementation of what... 2nd Jul 2010, 07:23 PM
litewarez Don't work dood, just returns 1... 2nd Jul 2010, 09:07 PM
Hyperz Don't wrap my calculations and... 3rd Jul 2010, 12:01 AM
litewarez yea i know, the first one does... 3rd Jul 2010, 08:14 AM
Hyperz Well obviously if you keep... 3rd Jul 2010, 12:14 PM
Mr Happy lol that's why it wasn't working... 3rd Jul 2010, 01:12 PM
Hyperz Maybe you should explain again what... 3rd Jul 2010, 02:00 PM
jayfella i win. face it =) 3rd Jul 2010, 12:28 PM
litewarez Well lets walk threw it: abs()... 3rd Jul 2010, 01:28 PM
Mr Happy Sorry I probably should have... 3rd Jul 2010, 02:26 PM
Hyperz And do you want to generate... 3rd Jul 2010, 02:31 PM
Mr Happy One per run would be fine but... 3rd Jul 2010, 02:39 PM
Hyperz This is actually quite a complex... 3rd Jul 2010, 03:25 PM
Mr Happy lol that's good. Well what... 3rd Jul 2010, 04:05 PM
immortalxx this is certainly a very complex... 3rd Jul 2010, 03:47 PM
litewarez Here you go Happy, Ive created a... 4th Jul 2010, 09:51 AM
Hyperz This again isn't what he's looking... 4th Jul 2010, 02:12 PM
litewarez Okee Dokey, thought it was but... 4th Jul 2010, 03:24 PM
Mr Happy To be honest I've just used a... 4th Jul 2010, 03:45 PM
immortalxx i thought about this, you could... 5th Jul 2010, 12:07 AM
Hyperz It seems you haven't read the topic... 5th Jul 2010, 11:29 AM
Previous Post Previous Post   Next Post Next Post
  1.     
    #1
    Member
    Website's:
    CodeSociety.net
    i thought about this, you could also change the odd by doing something like this

    rand(1,rand(1,2000)) im sure u get the logic
    immortalxx Reviewed by immortalxx on . [PHP] Random Number Problem Basically I want to generate a Random number but increase the chances of lower numbers appearing more. if I just use mt_rand(1, 1000) the chances of getting the number 1 is the same as 468 which is the same as 1000. I want to increase the chances of lower numbers appearing. This poor way shows what I mean if (mt_rand(1, 2) == 1) // 50-50 chance { Rating: 5



  2.   Sponsored Links

  3.     
    #2
    Respected Developer
    It seems you haven't read the topic .

Page 4 of 4 FirstFirst ... 234

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problem with number of posts at homepage
    By bdr111446 in forum Wordpress
    Replies: 0
    Last Post: 21st May 2012, 03:10 PM
  2. Problem on DLE 9.3 Error Number: 1267
    By Devils in forum Technical Help Desk Support
    Replies: 6
    Last Post: 26th Sep 2011, 04:17 PM
  3. From random to more random
    By dannym23 in forum General Discussion
    Replies: 4
    Last Post: 13th Aug 2011, 07:35 PM
  4. DLE random log out problem
    By seraphim in forum Webmaster Discussion
    Replies: 0
    Last Post: 12th May 2011, 01:36 PM
  5. How to get those random ads?
    By DXS in forum Webmasters, Money Making
    Replies: 3
    Last Post: 8th Mar 2009, 08:13 AM

Tags for this Thread

BE SOCIAL