Questions tagged as 'random'

1
answer

How to do so that I do not repeat the elements of a RANDOM WITH ELEMENTS OF ARRAYLIST JAVA

In this case when I'm going to print the product data I have put a random amount and price because when you start the program each product has different amounts and different prices, the problem I have is that I do it randomly but it repeats me...
asked by 18.12.2018 / 11:11
1
answer

how do I assign words to numbers using random in python?

I would like to know how to have a str instead of a number (without using lists or random.randint) import random prob=random.randrange(1,5) 1 = pedro 2 = maria 3 = juan 4 = luis print (prob)    Traceback (most recent call last): File "pyt...
asked by 12.10.2018 / 06:22
1
answer

Call to a member function random on null in Laravel 5.7

I am doing a test project for my learning of Laravel in its version 5.7 I am in the part of launching a seeder for, with everything configured in the factories, the models and the DatabaseSeeder, random data are created in the database to be...
asked by 25.09.2018 / 00:18
2
answers

Random Function Properly [closed]

As I can use the function Random in C # using two functions, the first function is the minimum damage of the player, and the second the maximum damage that a player can do, my idea is to use the function Random , calling to both fun...
asked by 20.09.2018 / 17:34
1
answer

Reverse the bits of each byte of a string

I have a string byte generated by the Random module of the PyCrypto library in this way: c = Random.new().read(13) Now, I want to invert the value of the bits that make c with the unary operator ~ , but I can not do it because...
asked by 09.11.2017 / 15:39
2
answers

How can I do a java program that chooses random words?

Hello, good greetings, I would like to ask you one thing they sent me to do a program that randomly picks up an option of the machine and a user option I was doing it with import java.util.Random; but I realized that this is only applicab...
asked by 21.11.2018 / 21:00
0
answers

Random alphanumeric value in textbox | VFP9

I hope you can help me with something I want to implement in a program. I want to know how to make every time a form / window opens a random 8-character alphanumeric value is displayed in a textbox, something like a captcha more or less....
asked by 15.09.2018 / 20:48
1
answer

How to make random names

I want to make a random text in a text written by a php web, the theme is that the one I have created creates the same name in all texts, and I want it to be random, I do not know if I explain it. I have this: function generateRandomString($le...
asked by 03.06.2018 / 19:46
1
answer

Obtain a random value from a map with reverse weights in Java

I have a map from which I want to get a word for a game of the hangman. In the map I keep with each word the times that have already been chosen. For example, the map may contain: abaleadura 4 abajo 2 abalada 1 abalaustrado 3 The map start...
asked by 23.05.2018 / 20:33
0
answers

Play random sounds without repeat - HELP 2018

I WANT TO RANDOMIZE THIS CODE: WE HAVE TO IMPROVE IT. 1- I NEED TO APPEAR THE NORMAL AUDIO PLAYER, AS A PICTURE APPEARS. 2- WHEN FINISHING A SONG DOES NOT CONTINUE WITH THE FOLLOWING. The code that makes the random is fine, you just have to impr...
asked by 20.04.2018 / 04:33