## PHP Mysql cross questions random number ?

I can speak very little english, Not so great. My web site phpnuke , i am a script question answer tasting module. Primarily mysql table CREATE TABLE nuke_bilgims ( id int(11) NOT NULL auto_increment, question varchar(255) NOT NULL, a varchar(255) NOT NULL, b varchar(255) NOT NULL, c varchar(255) NO ...

## Non-repeat random number generator?

I've looked everywhere for a random number generator which doesn't repeat. Tried loads and none have seemed to work.I'm making a quiz, 5 questions so far.This button, in html, generates the next random Q:<input type="button" value="Next (random)" name="B0" onClick= ...

## Random Number Question

ok do you have a better chance of getting a repeat if you have an 8 digit random number or 2 concatinated 4 digit numbers? or 4 concatinated 2 digit numbers? ...

## Random Number - Easy?

I hope this is an easy one. I am trying to generate a unique random number between 1 and 10. Since randomrange is not inclusive of the max value, I put 11 instead of 10. Here is the code: number1 := randomrange(1,11); number2 := randomrange(1,11); number3 := randomrange(1,11); number4 := randomrange ...

## Random number generator

i have used this formula to generate random number.Integer random_number = new Integer((int)(Math.floor(Math.random() * (max - min + 1)) + min));while(numbers.size() < noofQn ) {Integer random_number = new Integer((int)(Math.floor(Math.random() * (max - min + 1)) + min));System.out.println(" ...

## how to count integer from random number

hi,this is sandy patel.i need simeone's help as soon as possible.i discribe my problem as under:Problem Statement:This problem requires you to generate a series of random numbers.There are many algorithms that have been developed for this purpose. One scheme generatespseudorandom numbers by performi ...

## random number

i have problem related to random number genre.ter .i don't understand from which is number from i have to start my program?and,upto witch number i have to go?The following steps describe the algorithm.Step 1: Enter an odd 4-digit integer seed number that is not divisible by 2 or 5.Step 2: Multiply t ...

## Loops, Random Number and Dictionaries?

Okay I don't get this problem at all: import randomdef chance(number):number = inputfor each in xrange(number):n = random.randrange(100)+1return ndef extreme(x):z = x + 5y = z - 3return z, y#mainrepeat = 0while repeat != 2:x = input("Enter a value for x: ")z, y = extreme(x)print x," + ...

## MySQL Random Number?

I am working on an idea here and was wondering if there is a way to do this. I would like to have MySQL randomly select 10 items from a table in my database and display them. I was going to use rand() to do it but the chances of it picking a number and it not exist would be pretty good. I could do a ...

## Simple VBA Module - Format the Random number generated

simple for the average, however i am belowi am trying to generate a random number that can be repeated time and time again so that when i select a sample (today) i can rerun a query and generate the same sample. Therefore, i use a seed number which i enter on my own. i have a list of employees with ...

## Random Number not based on time

I need to generate a lot of random numbers relatively quickly. Is there any way to do this and not have any of them repeat? The problem that i am running into now is that the programming is executing so quickly that the default seed for the random number (i believe based off of the system time) does ...

## Random Number Genration

I want to know the coding for - Generating 10 random number at a time between 0 to 100, but they should not repeat themself. ...

## Ubuntu Random number generation in repeated simulations

I'm writing some code for simulations which will repeat the same process (but with different starting conditions) many times over. This is serial code, not parallel.I'm wondering about the use of random numbers in these simulations. Should I just set up one random number generator and let it run all ...

## Random Number on button

I was wondering how do i go about generating unique random numbers?iei want to generate numbers between 0-9 randomly. I dont want to repeat the numbers.Then that no: should display on the buttons.ie there are 9 buttons. first randomly generated number should display on the first button & 2nd no: ...

## Add the value of a random number to another value

I can generate a random number between 1 and 9, ( var rand_no = Math.floor( 1 + Math.random() * 9 ); ) but I want to add that random number to a value that is enterred into an inputbox and get a total. How can I do this using Javascript and put the result into a hidden field.I will also need to use ...

## Random Number - Multiple of 10, between 0 and 470

How would I generate a random number between 0 and 470 at multiples of 10 including 0 and 470? ...

## How can I get my random number generator to only execute once?

guys, I scripted a javascript guessing game and I am not sure how I can configure the random number generator to only generate one number and then stop.Here is my code:<html><head><title>Guess it up! </title></head><body><center><BODY onLoad="Generat ...

## Random number code help.

I need help with a code that will generate a random number or integer (from 1-9). Does anybody know of a short random generator without having to import anything? ...

## generate random number?

i need to generate random number for a unique verification key.how do u generate random number in PHP?is there any Random NUmber function in PHP? ...

## Random Number Game

Thanks for clicking my thread.Im rather new to c++ only used it a few times years ago in college.Im having trouble with a random number game im following, I was wondering if someone could have a wee look over my code. Im using Visual c++ 2010The error =Run-Time Check Failure #3 - The variable 'Rando ...

## Win32 Random Number question

I am trying to store a single random number from 0 to 99 to a variable.This is what I used in my code to do that:time_t t;time(&t);srand((unsigned int)t);int rTSB(rand() % 100);I am trying to make a single random picture show up when you start the program.However, when I minimize and maximize th ...

## I Am Having An Issue With The Random Number Operator

On my code the javascript isn't working right I want it to choose a random number then when I click on a picture (image button) it will give an alert box saying my score (if it is wrong, if it is right then it will choose a new one) but when I click on the pictures nothing happens. I also want it on ...

## Problem regarding random number

I'm writing some code which does a lot of password handling, and I need to be able to generate truly random data.Eg:if suppose type a password named phpbuilder, now i wanna to add some random generated number and added to the password.Suppose the generated random number is 25 it should get added to ...

## Do action based on random number

The following code is supposed to provide a different alert message when a page is loaded, based on a random number generated on load. Can anybody see what is probably a very obvious problem that I just can't see? TIA<html><head><script language="javascript" type="text/ ...

## MySQL Random number needed in AUTO_INCREMENT column

I have a table which contains an AUTO_INCREMENT column called ORDR_ID (which is also the primary key). As this is an order number which is given to the customer, I would like it to be randomly generated from the available numbers from the table (so the customer never knows how many orders are being ...

## random number generator

I need to create a tiny function to generate a random number ranging from: 1000000 to 9999999. Also, the number should be unique even if I call the function 100 times in a second...can it actually be done?All I know for the moment is this: srand(time(0)): rand(); but it is not that great :-( ...

## random number generator

how do I generate a random number in Python, can someon plz post an example? D: ...

## Random number generator

First off, Hi I'm new here, and sorta new to C++, so please excuse me if this is in the wrong section.Anyways I was hoping someone could help me with creating a function to create a random number between 0 and 8, and including both numbers, so I could create one of nine possible enemies in this game ...

## Help with random number Game

Im creating a random number game w/ javascript, but it keeps going into either an infinite loop or no loop at all. could someone please help here is my code:<script type = "text/javascript"><!--// variables used to test the state of the gamevar numberToGuess = 0,latestGuess = 9999 ...

## Random Number Generator

I just installed gentoo, and when I boot linux show an "Error initializing random number generator" How can I fix this? ...

## How to update a DB2 column with a random number?

Can someone please help me with this one.I want to update a DB2 table column (Character field) with a random number. I need a SQL for this. ...

## Random number generator

I am doing a program for school using a random number generator, but I keep getting the error "'System.Random.Next()' is a 'method' but is used like a 'type'. What does this mean and what is wrong with my code below: int pens = 0;int light = 0;private void TXTCalc_Click(object sender, EventArgs ...

## Random Number

I need a Ref. num CHAR(16) out of which the first 3 Chars I am using to specify the type of the Process. The remaining I am using to have a Random number. Somebody please specify what is the best logic I can follow as my system is going to face a big load. I want my Random number to be as best as po ...

## C++ random number

I am needing a random number generater I found one on the web srand(time(NULL));int random_integer;for(int index = 0; index < 20; index++)random_integer = (rand() % 20)+1;cout << random_integer << endl;however when I try to compile I get this test2.cpp: In function int main():test ...

## Best way to select a bounded random number.

I'm not exactly sure how to approach this problem, but I want to generate a random number, which would be range between 0 - 99. I know that to have a random number, I need to initialize it with a seed, so I chose to seed it with time. However, I don't know how to ensure that the random number falls ...

## Random number generation using C code

all, currently i'm doing a snake game, but i don't know how i can generate the food randomly when the snake eat it. Can someone help me?I know i need to generate a random number to light up the led/food with x and y co-ordinate, but how should i do it?I'm using ledrow[0] and ledcol[0] for the food c ...

## random number generator, c++

Can anyone see why this always shows the random number as 99?#include <iostream>#include <windows.h>int main(){int x = 1;int y = 99;std::cout << "A random number between " << x << " and " << y << " is: " << rand()%x+y;retu ...

## Random number?

I need a way to generate a small random number. From 1-30. ...

## random number generation

i need to generate random numbers between 2 numbers. I know how to do it from say 0 to something but is there a way to get a random number between lets say 60 and 80 or 40 and 60 ect? ...

## random number

Can someone pls provide me with an algorithim that generates an random number and it cannot generate the same random number more than once.Thanxgetchoo ...

## random number but NOT x

Any ideas for an algorithm to generate a random number between a range, excluding one of the numbers in that range? For example, say the range is one to ten and the number I don't want to be chosen is 4?All help will be cherished forever. WebMonkey ...

## Random number problems

Forgive me I sound ignorant, but I'm still quite new to php. I am trying to generate a random number, which I will use immediately to create a file, then later to either display, edit, or delete the file. But whenever I use the original variable that I generated the number with, it creates a new ran ...

## Random Number based on Day

I am a PHP veteran who is new to ColdFusion. So far, I have rewritten an entire PHP website in ColdFusion, and it has gone really well for me.One thing I can't figure out is this: In PHP, I wrote a function that seeds the random number generator which will make the random number generator return the ...

## random number between 0 and 1

I want to generate a random number like 0.23, 0.88,0.000236. This number must be any float between 0 and 1.Does any one know how to do this in php? ...

## Random Number Generator

I want to build MFC program to generate random number. How To generate random number ranging from 0 to 255? ...

## Random number?

Does anyone know how to generate a random number (integer) in PHP?I want to make a function that pulls a random record from a MySQL DB, each record being indexed (i.e. 1, 2, 3.....200).I know that this is possible in Java through the "math.random()" method, just wondering what the equivale ...

## GOOD random number generator??

This is driving me nuts!! I have been searching all over for a random number algorithm written for PHP but haven't found anything sufficient. The best I found is Code: (double)microtime()*1000000 which seems to be common ground but thats not good enough . In a database of only 30 entries right now i ...

## Help with random number

I am finishing a scheduling system and need some help. I have to make the script generate a random number to assign a customer id and another for an appointment id. Currently I am using:$appt = rand(0,10000);$cust = rand(0,10000);But this seems to be generating the same numbers frequently. Anybody h ...

## random number in javascript

I know how to generate a random number, also how to round it, I can multiply it too, but how on earth do I generate a round number between 100 and 999? I can get a random number from 0 to 999, but need to lose everything less than 3 digits??? ...

## Is there a real random number method?

I'm 1 semester of CS1 into C++, and am trying to make a fun program that attributes a random adjective to the word that is typed in. I tried using rand() to generate random numbers and apply them to adjectives like this:string input;int num;getline (cin,input);num = rand() % 100 + 1;while(input != ...