-4
votes

1
replies

I'm working on a lottery simulator and I'm not quiet happy with the draws generated by randint.
Are there any tricks to make it more random?...

asked 1 month ago

-1
votes

0
replies

I'm trying to make a game with dice, and I need to have random numbers in it (to simulate the sides of the die. I know how to make it between 1...

asked 1 month ago

0
votes

1
replies

I have a script on an enemy that walks randomly inside a square. I get a random point from that square and moves the enemy towards that random ge...

asked 1 month ago

2
votes

0
replies

I'm trying to build a simple script which randomises data.
I will make it very simple.
Let's say I have the following data inside data.txt: 11 2...

asked 1 month ago

3
votes

5
replies

Hi I would like to generate two random numbers so that the sum of their squares is equal to 1.
I have written this code. The sum of their squar...

asked 1 month ago

0
votes

2
replies

I have a multithreaded program where each thread calls the function erand48() to generate a random number. Each thread has its own private random...

asked 1 month ago

0
votes

2
replies

I want to generate a random M x N matrix with zeros and ones with the following special properties:
1) The ones are only in m of the M rows.
2)...

asked 1 month ago

0
votes

1
replies

This question already has an answer here:
srand() — why call it only once?
7 ans...

asked 1 month ago

-1
votes

1
replies

I need to assign a random number from a range X for each element in list Y while minimizing the number of duplicated numbers from X.
To clarify,...

asked 1 month ago

-3
votes

0
replies

How do I run loops inside the if-else statement until equality achieved?
I've tried this, but didn't work:
if (!Card1.equals(Card2)){...

asked 1 month ago

-1
votes

0
replies

I am trying to verify a CPU and I need to make some constraints for a NOOP instruction. Basically if the upper 4 bits (of a 16 bit instruction ar...

asked 1 month ago

0
votes

1
replies

I want to iterate n times a function that draws n rows at random from a dataframe. Since the groups consist each of 785 rows, the function is thi...

asked 1 month ago

2
votes

2
replies

I want to generate tickets for an event. I need to generate a lot of them and I decided to have the ticket number as UUIDs. The question is how t...

asked 1 month ago

-2
votes

0
replies

so basically i need to have a list of songs and thei artists and the user is meant to try to guess the song name by getting the name of the artis...

asked 1 month ago

0
votes

2
replies

srand(time(NULL));
for(i = 0; i < 100; i++)
{
int randomNumber = (rand() % 100) + 1 // gets a random number from 0 - 100.
// do stuff...

asked 1 month ago

1
votes

1
replies

I am evaluating the feasibility of moving a simulation to a FX 8350.
Is there a document on the availability (if not, a workaround) of the rdrand...

asked 1 month ago

1
votes

2
replies

This question already has an answer here:
Can I specify a numpy dtype when generating random values?...

asked 1 month ago

0
votes

1
replies

I have been sampling random numbers from different distributions and just realized how slow are numpy binomial random numbers compared to other...

asked 1 month ago

0
votes

0
replies

I'm using openpyxl with python 3 and I'm trying to create a script that creates a random username for ten different users. Then I'm trying to get...

asked 1 month ago

-4
votes

0
replies

This question already has an answer here:
Math.random() explanation
5 answers...

asked 1 month ago

1
votes

1
replies

I am creating a treap, and I want to know, which random number generator is most suitable for generating priorities at insertion.
The data set i...

asked 1 month ago

0
votes

1
replies

I have two probability distributions, a beta distribution and a lognormal distribution. What I want to do is draw a random value from within my b...

asked 1 month ago

0
votes

0
replies

I am writing a simple benchmarking application to assess/compare multithreading performance of pthreads and OpenMP. To do so I use the Monte Carl...

asked 1 month ago

0
votes

1
replies

This question already has an answer here:
How do I generate random integers within a specific range in Java?...

asked 1 month ago

-1
votes

2
replies

This question already has an answer here:
Random number generator only generating one random number...

asked 1 month ago