Category "random"

Creating copy of class instance with randomly init variable (python)

I need to initialize an instance of a class with a randomly generated number. I then need to use this instance in several different trials. However, I am havi

Fast real valued random generator in java

java.util.Random.nextDouble() is slow for me and I need something really fast. I did some google search and I've found only integers based fast random generat

Random document in ElasticSearch

Is there a way to get a truly random sample from an elasticsearch index? i.e. a query that retrieves any document from the index with probability 1/N (where N i

Best way to select random rows PostgreSQL

I want a random selection of rows in PostgreSQL, I tried this: select * from table where random() < 0.01; But some other recommend this: select * from table

How to generate a random UUID which is reproducible (with a seed) in Python

The uuid4() function of Python's module uuid generates a random UUID, and seems to generate a different one every time: In [1]: import uuid In [2]: uuid.uuid4(

Laravel str_random() or custom function?

Is the Laravel str_random() function random enough so that I can use it for IDs? For example: str_random(32); This produces a random string of length 32 mad

Pokemon API request generate 5 Pokémon at a time

I need help with how to fetch 5 random pokemon at a time instead of rendering all pokemon on the screen using react? // destructuring const [items, setItems] =

What is the minimum code required to produce random numbers in Elm?

I just want to see a random number. So here's an example straight out of the docs for the Random library. I expect Random.generate to accept a generator and a s

How can I generate a random number in a certain range?

How can I create an app that generates a random number in Android using Eclipse and then show the result in a TextView field? The random number has to be in a r

Random word guessing game

I want to create a word guessing game where the program randomly selects a word from my word list and the user has to guess the word. User can only guess one l

generating a random code in php?

i know this might seem silly, but i want to generate a random code of 8 characetrs, only numbers or letters using php. i needs this to generate a password for e

PHP random string generator

I'm trying to create a randomized string in PHP, and I get absolutely no output with this: <?php function RandomString() { $characters = '01

PHP code for generating decent-looking coupon codes (mix of letters and numbers)

For an ecommerce site I want to generate a random coupon code that looks better than a randomly generated value. It should be a readable coupon code, all in upp

Why rand() every time I refresh the page?

I want to run mini program for confirmation security question : $questions = array('dog legs','car legs','the best country in the world'); $answers = array(4,4

How do I generate a random int number?

How do I generate a random integer in C#?

How do I generate a random int number?

How do I generate a random integer in C#?

How do I generate a random int number?

How do I generate a random integer in C#?

Implicit declaration of functions srand, rand and system

Trying to solve an exercise where I have to print a random temperature value between 35°C & -10°C every 5 seconds followed by the date and time. Eve

Implicit declaration of functions srand, rand and system

Trying to solve an exercise where I have to print a random temperature value between 35°C & -10°C every 5 seconds followed by the date and time. Eve

Implicit declaration of functions srand, rand and system

Trying to solve an exercise where I have to print a random temperature value between 35°C & -10°C every 5 seconds followed by the date and time. Eve