Questions tagged as 'random'

2
answers

Generate a word between words defined [PHP]

I'm pretty new to PHP , but I already know the basics of HTML , and a large part of Ruby script (not ruby on rails ). Well, you know, how can I generate a word or something random, we can say, but not so random. As if...
asked by 07.06.2015 / 00:16
0
answers

Changing value in integer array in an index works in one case, and in another not, why?

privatevoidbtnRodaLabirinto_Click(objectsender,EventArgse){char[,]Lab=newchar[10,10];int[,]Lab2=newint[10,10];intI=0,J=0;RandomNumerosRandomicos=newRandom();//abaixo,setandolabirintocom0e1for(I=0;I<10;I++){for(J=0;J<10;J++){Lab2[I,J]=Nume...
asked by 01.03.2018 / 15:00
1
answer

Randint does not generate random numbers the second time I use it

My randint when used the second time it does not generate new random numbers, it stays with the same numbers generated. I know in C when this happens I can use the srand (time (NULL)) , but in Python I'm not finding anything like it Show 3 d...
asked by 28.02.2018 / 20:07
1
answer

In BlueJ Class Random IDE, limit the initial and final values

As I have in the code gives me the error of    void can not be deferenced In the part of nextInt() in the last two lines and with so many attempts I've already done I ended up staying like this. The latitude can not be outside [-9....
asked by 29.01.2018 / 02:00
1
answer

onload random redirect

I would like to create a function that loads a random page from a particular address. Something like www.meusite.com/(numeros entre 0-100).html I think the function should create the tag A , then fill it with the text www.me...
asked by 14.09.2017 / 12:14
1
answer

Random.getstate function Python

I need your help in the following situation: I have a loop that every random interaction is generated from 0 to 400. I need my function to return at what point in the loop the X number was generated. (For example, loop 4 generated the n...
asked by 03.03.2017 / 00:46
1
answer

How to select by the database the value of the column that I used the method random ()

I made a project in Android that is a little game of the gallows, where I can write in the SQLite database the word and a tip. In my DatabaseHelper class I created the normal database, and made some selects from the column where the words are st...
asked by 15.06.2016 / 02:32
3
answers

How to generate random arrays without repeated numbers on the same line?

I want to store random numbers from 1 to 60 in an array. When there are equal numbers in the rows, it is to generate another random number. Type, can not be: 11 55 55 43 49 30, but should be 11 55 52 43 49 30. There should be no repetitions....
asked by 27.08.2015 / 06:35
1
answer

How to create a ListView with random items? (Android)

I'm having problems in my ListView. I would like it to display its items randomly, but the items do not repeat themselves, as is happening now. Here is the code: public class AdapterConteudo extends BaseAdapter{ private Context ctx; priva...
asked by 13.05.2015 / 03:09
1
answer

rand () returning the same value even with the inclusion of srand ((unsigned) time (NULL) [duplicate]

Why does the rolaData function below always return the same values when calling multiple times, even though seed srand ((unsigned) time (NULL)) has been initialized? #include <time.h> #include <stdio.h> int rolaDados(int *a){...
asked by 04.11.2018 / 20:30