This tag is for questions pertaining to random numbers and their generators, whether pseudo-random or truly random.
Let say I need a 3 digit number, so it would be something like: >>> random(3) 563 or >>&…
python randomI have an array called $ran = array(1,2,3,4); I need to get a random value out of this array and store …
php arrays randomIf I have an enum like this: public enum Letter { A, B, C, //... } What is the best way to pick …
java random enumsHow can I create an array with 40 elements, with random values from 0 to 39 ? Like [4, 23, 7, 39, 19, 0, 9, 14, ...] I tried using solutions from here: …
javascript arrays randomRandom class has a method to generate random int in a given range. For example: Random r = new Random(); int …
java random range long-integerI need to generate a uniformly random point within a circle of radius R. I realize that by just picking …
math random geometry probabilityI am looking to get a random record from a huge (100 million record) mongodb. What is the fastest and most …
mongodb random mongodb-queryIf you want a cryptographically strong random numbers in Java, you use SecureRandom. Unfortunately, SecureRandom can be very slow. If …
java performance security random entropy