|
As the title says What is the difference between a randomly generated number and secure randomly generated number?
Started by Shoban on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Because it's a pseudo random....
With just a "random number" one usually means a pseudo random number.
Example: a linear feedback shift register produces lots of random predicted.
For a secure random number generator.
|
|
Given:
a sequence of random numbers X clients select Y numbers from the sequence, forming their own sub-sequences the rules governing the selection process is not known Is there a mathematical property that guarantees that each client will end up with...
Started by Gili on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Of course in this case....
Random data could only be generated from the list.
The subset will not be random if the rules governing the selection process include awareness they have random data, but not if you respect more than 1 user.
|
|
I have a hard drive that went bad and before I send it for RMA I want to wipe as much as possible from it. I tried using windows utilities and also did dd of /dev/random. The problem is I can't wait for either of those solutions to finish as the reason...
Started by Marcin on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at serverfault):
While (true); do number=$((($RANDOM * 32768 + $RANDOM))) dd if=/dev/urandom of=/dev/sdx1 skip=$number count=1 done
You only have to modify the number which is generatet from $....
Hi,
you can use a shellscript in combination with dd.
|
Ask your Facebook Friends
|
I have a program that uses the mt19937 random number generator from boost::random. I need to do a random_shuffle and want the random numbers generated for this to be from this shared state so that they can be deterministic with respect to the mersenne...
Started by Greg Rogers on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Rand(state); std::random_shuffle(vec.begin(), vec.end(), rand); }.
|
|
I'm working in Microsoft Visual C# 2008 Express.
I found this snippet of code:
public static int RandomNumber(int min, int max) { Random random = new Random(); return random.Next(min, max); }
the problem is that I've run it more than 100 times, and it...
Started by adeena on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
Check out the API
random = new Random();
This initiates random....
Just call Randomize() then run your random! :)
The min is inclusive, but the max is exclusive.
In VB i always start with the Randomize() function.
|
|
I would like to use RNGCryptoServiceProvider as my source of random numbers. As it only can output them as an array of byte values how can I convert them to 0 to 1 double value while preserving uniformity of results?
Started by Kamil Zadora on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Use BitConverter to convert a sequence of random bytes to a Double:
byte[] random_bytes = new byte[8]; // BitConverter will expect an 8-byte array new RNGCryptoServiceProvider().GetBytes(random....
From the primitives to a byte array.
|
|
I did this to test the randomness of randint:
>>> from random import randint >>> >>> uniques = [] >>> for i in range(4500): # You can see I optimistic. ... x = randint(500, 5000) ... if x in uniques: ... raise Exception...
Started by orokusaki on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
By reading about the birthday paradox
By the way, the random module in Python uses the Mersenne twister random.shuffle
Python's random implementation is actually quite state of the art:
http://en.wikipedia.org Random Number Generators....
|
|
Hello, always when I try to generate a random number with Int = arc4random % MAXNUM the length of the number is as long as the MAXNUM number length -1. So if I set arc4random % 1 the number is between 1 - . How can I get different numbers like 78, 476...
Started by Flocked on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you want to get a random integer.
Putting 3,4,5 as arguments like arc4random(4);and see the results.
|
|
I've found some articles about using the RandomView view and the GetNewID function to pull back randomized records, but they are using this method with Linq to SQL which allows Functions and Stored Procs to be used with no return value or a scalar return...
Started by Jeremy Sullivan on
, 3 posts
by 2 people.
Answer Snippets (Read the full thread at stackoverflow):
In the Select clause of your Linq query, you should be able to insert a GUID like this:
var result = from myRecord in myTable select new { field1 = myRecord.field1, field2 = myRecord.field2, guidField = new System.Guid() };
Well, my VB is a little rusty... .
|
|
Given data of the following form
myDat = structure(list(Score = c(1.84, 2.24, 3.8, 2.3, 3.8, 4.55, 1.13, 2.49, 3.74, 2.84, 3.3, 4.82, 1.74, 2.89, 3.39, 2.08, 3.99, 4.07, 1.93, 2.39, 3.63, 2.55, 3.09, 4.76), Subject = c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, ...
Started by Dan Goldstein on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Stated question, you can create a random intecept mixed effect model using the following code:
> library(nlme) > m1 <- lme(Score....
BIC logLik deviance REMLdev 53.3 69.8 -12.6 14.6 25.3 Random effects: Groups Name Variance Std.Dev.
|