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...
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...
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 ...
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 <- ...
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.
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...
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...
3
Solved
How do I generate a vector of 100 64-bit integer values in the range from 1 to 20, allowing duplicates?
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...
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?
5
How to generate pseudo random number in FPGA?
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...
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 &...
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...
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 ...
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...
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:
...
Prae asked 5/12, 2022 at 21:57
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
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...
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);
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...
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...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.