233 Topics
|
|
I'm using the code below to get a random number of items from an array, but I'd like to just get 3-5 random numbers from the provide range to display. Right now, it either shows 1, all, or any amount in between. I'm also good with completely changing up my … |
|
I need help in filling array in Pascal with random number. I have 9 empty array ( A: array[1..10] of integer ), and i want to fill the array with integer for 1 to 9 randomly, but one number can only be choosen one time. So when a number (eg. … |
|
I'm writing a game in PHP. Now the script generates a random number to get the players registered. But: the number generated is the same for every player. It's about this line: $activationkey = rand( 1000000000, 9999999999 ); Every player gets the same key. How can this be? Any help? … |
|
Haven't programmed in a long time. Last project was a GCODE pathway generator I wrote several years back. My compiler is obviously several years out of date. Uses time(), itoa(), rand(). Current standard compliant compilers should have <chrono>, <thread>, <random>, and to_string() in suppliment to those more deprecated functions. This … |
|
i have a problem in displaying the values of a cookie dynamically code goes as... <?php $x=array(); include("connect.php");//database connection file $temp=$_GET['id']; setcookie(count($x)+1,$temp); echo $_COOKIE['$x[1]']; ?> // how do i display the value of cookie every time... it is over written.... i have tried it with using array.. in short i … |
|
Is there any method in java to generate random number (integer, byte or float). please tell me if any i need it in my program. if possible please give full example. thanks. |
|
Hi guys... I want some help of how to call images from a folder.... Its like..v have a folder called images and it has many images in it.....but i need only 6 images to display in a php webpage...when the webpage is reloaded, it displays another images...its like its displaying … |
|
Last night, a friend mentioned to me that one day he was trying to fetch a random 5 rows from a MySQL database. He researched online, and was eventually presented with a working solution in which he would generate five random numbers. Then, he would query the database for items … |
|
Hi, Daniweb. I have this hobby project I'm playing with where I need to generate data for a MonteCarlo simulation. The data needs to fit within a bell-curve around a given mean with a standard-deviation. I'm trying to figure out which random distribution system I need to use and how … |
|
A little fun with Python's turtle module drawing a number of random stars in the dark sky. |
|
Hello Community, I was just clearing up my (Android) phone and when I was looking in the downloads folder there is an Adobe Acrobat folder and inside of it is a random file I couldn't imagine I've downloaded its name is 'ChandlerIncidentReview.pdf' no a single clue how it got on … |
|
Just a simple password creator using Python code. The length of the password can be set and the characterset could be changed if you so desire. |
|
Part 3 of the taste of Swift explores class objects in Apple's Swift language. A class allows you to group methods (class functions) together that belong together. Class Person groups some information of people working in an office. Class Pay inherits class Person and adds pay information. Class File groups … |
|
Trying to insert both of these arrays of random quotes on the same page so that both show at the same time. I realize I have to rename some of the elements within, but apparently I have no clue which. I've tried giving each rannum, ShowText, and RndText a number … |
|
This shows you how to create a flashcard like quiz game using a Python dictionary. It's up to you to explore the approach and make this a more meaningful game. |
|
Hi guys, I am trying to write a program which picks the closest number possible out of a dictionary. The dictionary contains 50 doubles values, and I use a random double to pick the number i want to get the closest to if that makes sense. Currently I am using … |
|
Sorry for the misleading question guys, I know how to generate two random numbers but I want to use them in One JOptionPane input Dialogbox so the user can add the two numbers. Below is my code of what I have done so far I know it's not a lot … |
|
Hello. Imagin we have a python file with many alphabet letters like this: (Which is infact meaningful like i am a programmer) i a m a p r o g r a m m e r How can i print them randomly that nobody could read it? sth like this … |
|
int firstarray[12][7] = { }; double firstClass(int airplane, int seats, double price) {cout<<setw(60)<<"---------------------... cout<<setw(60)<<"You are in **first class** booking screen\n"; cout<<setw(60)<<"----------------------... cout<<"\n"; cout<<"How many seats would you like to book for first class?"<<" ";cin>>seats; for(int row=0; row<2; row++) { for(int column=0;column<7;column++) { } } } The thing is, The first … |
|
Let's say I have a banner on my site that randomly rotates between images that depict the month of January. Is it possible to have 10 images randomly rotate the entire month, then to have a new 10 images rotate randomly for the following month? I also need each image … |
|
Hi I have two edittexts and I have to generate random no and randomly show in one of two edittexts. generating random no is ok,but randomly showing in one of the edittext, I donot have any idea. if any one have any hint or any arrticle.,Please help |
|
I seem to not be able to identify why the styling does not appear at all on my page... Did i reference something incorrectly? It all appears right to me... syntax, quotes, tags all look right. Does anyone have an idea what may be happening? Sorry if my question is … |
|
I've made a timer and six labels. Then a number is being generated for each label seperately. After testing how it works, I found out that sometimes two same numbers are being generated at the same time. In the picture attachment you can see how two numbers were generated at … |
|
i have an issue, my code works wonderfully for the pupose its designed for however for security reasons i need th epages page my login page to have either randomized links or just links that cannot be bookmakred too so that one can bypass the login page. My login page … |
|
Hello everyone, so i am basically new to C++ coding and i am trying to write the randNum function in a way that it will give me these ranges The range for this row is: 1 to 10: 5 4 10 2 7 9 1 8 9 6 The range … |
|
Dear Daniweb, I just got the following [HTML5 music player](http://www.audioplayerhtml5.com/player_blackControllers_WithoutPlaylist_Ex1.html), which gets it's music from a list I provide in HTML like this: <ul> <li class="xtitle">Follow Me Here B</li> <li class="xauthor">Author Name</li> <li class="xsources_mp3">audio/adg3com_freeform.mp3</li> <li class="xsources_ogg">audio/adg3com_freeform.ogg</li> </ul> <ul> <li class="xtitle">This is Freeform C</li> <li class="xauthor">Author Name</li> <li class="xsources_mp3">audio/wm_follow_me.mp3</li> <li class="xsources_ogg">audio/wm_follow_me.ogg</li> … |
|
I am trying to write a querry to pull just one playername out of a database by random, can anyone see what I am missing please ? open base< $sql="select playername from tablejollys where (ID % 1000) = floor(rand() * 1000) order by rand() limit 1"; $result=mysql_query($sql); echo ['playername'] ; … |
|
Trying to figure out how to have 2 sets of images display randomly on the same page. I know I have to rename something, but nothing I try is working. Any help would be greatly appreciated. Thanks. For now I just have the two scripts repeated back to back before … |
|
Why isn't the Microsoft built in class Random class an type static class as the Math. class is. Why didn't they make this class static? |
|
Ok, so I just made this account because I'm super stuck. Basically I need to create a math quiz that takes a users input (1 through 12), have it spit out a question, i.e What is 5 x 12? however if the user enters 5, it must randomly generate a … |
The End.