256 Kilobytes

All Content > Random Number Generation

Type All Category All Tag Random Number Generation

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 | Last Update

Profile Photo - August R. Garcia

Last ReplyUpdated version of the function in the original post that supports setting an alpha/opacity value: // Generates two complimentary colors functi... August R. Garcia,

Updated version of the fu...

Mon, 30 Sep 2019 14:11:07 -07007 months ago1
🗨 1
🐏 1
👁 952
Profile Photo - Some Guy

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

Answers in Computer Programming | By Some Guy

Published

Profile Photo - TomGreller

Last ReplyPlease 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 -07001 year ago1
🗨 1
🐏 0
👁 242
Profile Photo - Some Guy

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

Answers in Server-Side | By Some Guy

Published

Profile Photo - August R. Garcia

Last Replyfunction 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 -07001 year ago1
🗨 1
🐏 0
👁 332
Profile Photo - Some Guy

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

Answers in Spreadsheets | By Some Guy

Published | Last Update

Profile Photo - August R. Garcia

Last ReplyAm 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 -08001 year ago1
🗨 1
🐏 0
👁 246
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last ReplyDepends 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 -08001 year ago1
🗨 1
🐏 0
👁 190
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last ReplyTo 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 -08001 year ago1
🗨 1
🐏 0
👁 162