233 Topics
| |
#include <iostream> #include <cstdlib> using namespace std; // function prototype for add int add (int x, int y); int sub (int q, int r); int mul (int s, int t); int divi (int u, int v); int main () { int a,b; char ch; loop:cout<<"ENTER CHOICE OF OPERATION: + - … | |
Im trying to create a random 6 digit numeric code that will not repeat. I have tried using guid but that was unsuccessful. random rnd = new random(); int num = rnd.next(000001,999999); I would prefer not to use Random , or to have to iterate through all the previous codes … | |
I have 2 buttons, one is a browse button that allows you to choose which folder you want to select the images from and a GO button that gets a random image from that folder here is what i've gotten so far: Public Class directory Private Sub browsebtn_Click(ByVal sender As … | |
As some of you might know I'm working on a movie database to help track my movie collection. For a while I was having trouble getting the output I wanted for that, but I finally figured out some sql code to help with that problem. I'm going to be working … | |
How would I go about editing this code for displaying a random post from a category for 24 hours, then switching to another random post? This would be to show a Tip of the Day. if ( ! function_exists( 'cb_breaking_news' ) ) { function cb_breaking_news(){ $cb_breaking_filter = ot_get_option('cb_breaking_news_filter', NULL); if … | |
I need a programming for following conditions in python... When the program is launched it should ask me for the number of words... Then as many words as input... then it has to make all the random possibility of those words without any space and provided it as an output... … | |
okay ive been trying to do this for some time i want my program to randomly select 3 strings from my text file and display them randomly so each time i press 9 on my menu it will display 3 different ones each time and i've already made the array … | |
so i found this script which is perfect.. it loads all my content from my ftp and randomizes them.... BUT you always have to refresh the site.. my question now is.. how can i add a fixed frame or just a button which allows me to refresh the pictures instead … | |
Hello i'm using javascript code to redirect visitor to random link like the example below but sometimes i get error 404 response :( var pageArr = ["http://google.com", "http://yahoo.com", "http://bing.com", "http://youtube.com", "http://facebook.com"]; document.location.href = pageArr[Math.ceil(Math.random()*5)]; ps:the code does exist in external js file what the problem here ? i'm not coder … | |
hello guys..can someone help me to create a function that generates random numbers composing of 9 digits with the ff limitations.. * must not have consecutive numbers in any place...sample 158461247....1 and 2 is consecutive numbers... * must not have same numbers before and after....sample 155483628....5 and 5 is same … | |
I'm trying to combine the functionality of the 3 codes below to produce a delayed redirect to a random URL while displaying a bar filling up by %. Each one works great, but I need all 3. Any help would be greatly appreciated. Thanks! **The first redirects after a delay** … | |
What would I need to add to the code below to have the random redirect timeout for 5 seconds before triggering? <script type="text/javascript"> (function(n){ var pages = ['http://www.thestormybrain.com/2013/11/malcolm-gladwell-choice-happiness-and.html', 'http://www.thestormybrain.com/2013/11/steve-jobs-how-to-live-before-you-die.html', 'http://www.thestormybrain.com/2013/11/david-blaine-how-i-held-my-breath-for.html']; n = n < 3? 0 : n < 8? 1 : 2; window.location.replace(pages[n]); })(Math.floor(Math.random() * 10)); </script> I know … | |
My button uses the following. It produces a random post within my blog whenever a user clicks it. <div id="myLuckyPost" class="random button"></div><script type="text/javascript"> function showLucky(root){ var feed = root.feed; var entries = feed.entry || []; var entry = feed.entry[0]; for (var j = 0; j < entry.link.length; ++j){if (entry.link[j].rel == … | |
Hi I have a php header file that displays a random image from a mysql table each time the page is reloaded. I have done this just using rand() in the query. But doing it like this means that the same image could come up 3,4,5 times in a row! … | |
I have a link leading to 1 of 6 articles displaying on my website. Every 6 seconds, the text link switches to the next. I'd like for the order to be randomized, though, so that each article has the same likelihood to be chosen. Can anyone help? My code on … | |
can you help me with the code for that using the logic: 1) randomly select the start point 2) predetermine the distance you need that car to travel using nextGaussian() 3) identify all the end points that are that distance away 4) randomly select one as you can see, i … | |
I have this code here and I need to know how to make it randomize the amoutn of images there are: Currently it shows the images, and uses a cookie so the image doesnt show up more than it needs to, but i need to randomize the image order instead … | |
So, I'm a new programmer python is my first language. I'm trying to create a program to randomly open a pdf from a directory and read/display one page. Anyway thats what I got so far. I'm just wondering if theres a more efficient way to write this. Any advice? import … | |
Where can I download the random module, because I've been looking for weeks and can't find a site where I can download it. | |
Would I create "more" randomness if if I had the library random function selecting randomly a value from the logistic function,with initial values showing chaotic behaviour, which I then would use as a seed to the random function provided by the library? Phew, whole mouthfull I guess . . . … | |
I am using Visual Studio 2010, and I am trying to make a label that moves randomly in the form window, Like this: [Click Here](http://i.stack.imgur.com/IF3IA.gif) I just want a hint on how can I make the label move randomly? Thanks in advance. | |
Can any one help me writing code which can only creat three digit random number not two digit or one digit number? Following code creates 3 digti but also creats two and one digit number.. public class random { public static void main (String [] args) { double n = … | |
Whichever browser I have installed (set as my preferred browser) will open a browser window without user input (and one is not open), will reset to the home page if a browser is open, and open another tab or window at random. There are no pop ups, no specific sites … | |
//Hello(apologize for any formatting errors) //I am trying to finish this program that is supposed to act as a club bouncer. Only letting a max amount of people (125) in at one time. Naturally people leave throughout the night, so I was trying to //implement that with the random variable, … | |
Hello all. I wrote a program that gives me 100 random values from the range between -100 to +100. How am I supposed to find the minimum, maximum, and average of the values that will be listed when I run the program? I appreciate the help anyone can give me. … | |
Okay, so it's been awhile since I've posted on here, but I am having trouble figuring this problem out. So, students need to be assigned randomly to experiments. Experiment 1 has 5 participants, 2 has 10 participants, and 3 has 20 partcipants. Every iteration through the loop, it asks for … | |
Hi every one ! i need to generate a key generator program any one help me. there is one Label and one Button on my Form. e.g i want to generate a random number on Button_click Event like this i.e. g12tu-7bhg5-khd9k-kh88f kdj44-jk73n-khjk6-88dkg | |
hi guys, writing a code in my first term at vb 2010, ive to create a guessing game, generate a number between 1 and 30 and let the user guess it. i must give hints along the way and record the amount of guesses made. i have the code written … | |
Hello, Somehow this is not working. I tried pretty much everything. I am also very new to PHP, but i made a nice CMS. Now I am making a website with some random flash-videos every time you refresh. This is what i got so far: <html> <head> <title>Sydcul.com</title> </head> <body> … | |
I have been working on this assignment for a while now and I can't figure this one issue out. I was given four files, Name.java, SortableArrayList.java, NameListDriver.java, and SortableArrayListWithBubbleSort.java. The program is meant to take a text file with a list of names and sort them alphabetically. Part one of … |
The End.