random Questions

8

Solved

I have this issue where I would like to shuffle a list, but only do so slightly. Say, I want only a small number of elements to be moved. Is there a simple way to get this done? Right now the best...
Gettysburg asked 17/6, 2020 at 18:51

5

Solved

I'm having issues generating the random number each time I run through the do-while loop in main. When I remove the do - while statement the if statement works fine and seems to generate a random r...
Farrahfarrand asked 11/6, 2014 at 23:12

3

Solved

I want a way to generate a file containing random bits in Java. What will create the random file the fastest? I want to create files of any specified size containing random bits. I want to be able ...
Reprobate asked 10/8, 2012 at 18:14

2

Solved

I'd like to sample rows from a data frame by group. But here's the catch, I'd like to sample a different number of records based on data from another table. Here is my reproducible data: df <- ...
Lamee asked 15/1, 2017 at 21:50

5

Solved

How would I go about getting a random number in a Metal shader? I searched for "random" in The Metal Shading Language Specification, but found nothing.
Malvina asked 26/11, 2017 at 18:21

4

Solved

I am playing around with PRNGs (like Mersenne Twister and rand() function of stdlib) and I would want a good test that would help me ascertain the quality of random data produced by the PRNGs. I ha...
Argyll asked 20/3, 2012 at 1:28

8

Solved

I need help with writing some code that will create a random number from an array of 12 numbers and print it 9 times without dupes. This has been tough for me to accomplish. Any ideas?
Zennie asked 26/9, 2010 at 6:12

4

Solved

I've been writing some code that iteratively performs binomial draws (using rbinom) and for some callee arguments I can end up with the size being large, which causes R (3.1.1, both official or hom...
Robinia asked 7/10, 2014 at 16:49

5

Solved

I am doing some performance testing on a SQL sproc and just want to bang out a quick data generator for testing. I am after a simple way to generate a pseudo random (true random not needed in this...
Mimimimic asked 28/1, 2010 at 3:57

3

Solved

How do I generate a vector of 100 64-bit integer values in the range from 1 to 20, allowing duplicates?
Heaver asked 12/1, 2018 at 1:51

4

Solved

I'm building a website that will randomly display a yelp listing each time the page is refreshed. The yelp search api returns 20 listings in an array. Right now, I am using PHP's function rand(0,19...
Birdella asked 22/7, 2013 at 1:33

5

Solved

Go's math/random library is missing a function to generate 64-bit numbers. This has been an open issue for about four years. In the meantime, what does a workaround look like?
Birkett asked 28/9, 2016 at 19:31

5

How to generate pseudo random number in FPGA?
Allative asked 14/7, 2009 at 14:11

5

Solved

What is the fastest and simplest way to generate fixed length random numbers in Go? Say to generate 8-digits long numbers, the problem with rand.Intn(100000000) is that the result might be far le...
Counterattack asked 15/3, 2016 at 2:27

8

Solved

Every time I run a program with rand() it gives me the same results. Example: #include <iostream> #include <cstdlib> using namespace std; int random (int low, int high) { if (low &...
Erg asked 27/2, 2012 at 1:35

7

Solved

I wrote up a program that can sort words and determine any anagrams. I want to generate an array of random strings so that I can test my method's runtime. public static String[] generateRandomWord...
Brimful asked 10/2, 2011 at 0:5

2

In R language version 4.4.1 (the version should not matter, just for the sake of discussion), we write the code : set.seed(1234) x <- 5 y <- rnorm(1, mean = x, sd = 0.1) We will be able to ...
Decker asked 7/7 at 15:46

4

Solved

Situation: I've a slice of values and need to pick up a randomly chosen value from it. Then I want to concatenate it with a fixed string. This is my code so far: func main() { //create the reason...
Control asked 30/11, 2015 at 8:55

6

I'm trying to generate a random 8 character alphanumeric string in Excel (or Google Sheets or Libreoffice, which both have the same challenge) using a formula. I'd like to get something like this: ...

3

I want to select random points on a given sphere. This page explains it quite well: http://mathworld.wolfram.com/SpherePointPicking.html ("To obtain points such that any small area on the sphere.....
Susannsusanna asked 3/4, 2011 at 19:15

8

Solved

How can I generate random numbers using AShell (restricted bash)? I am using a BusyBox binary on the device which does not have od or $RANDOM. My device has /dev/urandom and /dev/random.
Cum asked 4/10, 2011 at 2:34

4

Solved

I have a requirement to tag records uniquely with UUIDs (for a correlation id). I cant see a direct way to do this via the options, is such a thing possible? If not, is there some kind of workaroun...
Achlamydeous asked 16/5, 2020 at 20:10

3

How can I create a random number when I define a global declaration in an Uppaal program? I want to have a variable that contains a random number as in a C program: int x = rand (100);
Pennoncel asked 22/10, 2013 at 15:59

9

Solved

Java's UUID class generates a random UUID. But this consists of letters and numbers. For some applications we need only numbers. Is there a way to generate random UUID that consists of only numbers...
Wipe asked 11/11, 2011 at 10:57

5

Solved

Simple problem: percentage_chance = 0.36 if some_function(percentage_chance): # action here has 36% chance to execute pass How can I write some_function, or an expression involving percentage_c...
Margiemargin asked 8/7, 2010 at 11:37

© 2022 - 2024 — McMap. All rights reserved.