256 Kilobytes

All Content > Random Number Generation

Type All Category All Tag Random Number Generation

Profile Photo - Some Guy

srand(time(null)) doesn't change value fast enough?

Answers in Computer Programming | By Some Guy

Published 6 months agoWed, 06 Feb 2019 13:49:18 -0800

Profile Photo - TomGreller

Last Reply Please review your code, and check how often you are reseeding the function. This random generator number should only be seeded once, or else you will... TomGreller,

Please review your code,...

Sat, 30 Mar 2019 15:01:35 -0700 4 months ago
🗨
1
🐏
0
👁
103
Profile Photo - Some Guy

How to write "correct horse battery staple" passwords in PHP?

Answers in Server-Side | By Some Guy

Published 5 months agoTue, 19 Mar 2019 19:19:24 -0700

Profile Photo - August R. Garcia

Last Reply function correct_horse_battery_staple() { // The file that contains the words you want to use $f_contents = file(public_path() .... August R. Garcia,

Tue, 19 Mar 2019 19:23:10 -0700 5 months ago
🗨
1
🐏
0
👁
169
Profile Photo - August R. Garcia

[PHP] How to generate random, readable background and text color pairs

Articles in Web Development | By August R. Garcia

Published 8 months agoMon, 03 Dec 2018 14:29:25 -0800 | Last update 8 months agoMon, 03 Dec 2018 16:22:02 -0800

Profile Photo - August R. Garcia

How to generate random, complimentary pa...

MoreWhile writing a PHP graphing library the other day, it became apparent that code would be needed to generate an arbitrary random colors that did not l...
🗨
0
🐏
1
👁
418
Profile Photo - Some Guy

Pls halp: Google Sheets' REPT function uses same random number for all repetitions.

Answers in Spreadsheets | By Some Guy

Published 8 months agoSun, 02 Dec 2018 03:45:49 -0800 | Last update 8 months agoSun, 02 Dec 2018 12:26:10 -0800

Profile Photo - August R. Garcia

Last Reply Am fairly sure that this is not supported in Google Sheets. It might be possible to emulate behavior for your specific use case through a... August R. Garcia,

Am fairly sure that this...

Sun, 02 Dec 2018 12:25:48 -0800 8 months ago
🗨
1
🐏
0
👁
129
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last Reply Depends on what "best" means to you. Pulled this function from a recent project. Generates array of a length between 2 and 10. Adjust as... August R. Garcia,

Depends on what "bes...

Sun, 02 Dec 2018 03:48:58 -0800 8 months ago
🗨
1
🐏
0
👁
90
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last Reply To get a random number in a range of 2k to 3k rounded to the nearest interval of 100: =round(randbetween(2000, 3000)*0.01)*100 August R. Garcia,

To get a random number in...

Sun, 02 Dec 2018 03:46:19 -0800 8 months ago
🗨
1
🐏
0
👁
70