233 Topics

Member Avatar for
Member Avatar for Praveen_10

#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: + - …

Member Avatar for Praveen_10
0
272
Member Avatar for GrantB

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 …

Member Avatar for Ketsuekiame
0
2K
Member Avatar for roguexe

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 …

Member Avatar for Reverend Jim
0
870
Member Avatar for jdm

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 …

Member Avatar for jdm
0
315
Member Avatar for rpro2

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 …

Member Avatar for cereal
0
343
Member Avatar for ganapathy24

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... …

Member Avatar for ganapathy24
0
291
Member Avatar for dean.n.harris

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 …

Member Avatar for ObSys
0
224
Member Avatar for Walter Faber

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 …

Member Avatar for noelthefish
0
212
Member Avatar for mario90

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 …

Member Avatar for mario90
0
248
Member Avatar for garyjuano

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 …

Member Avatar for AARTI SHRIVAS
0
305
Member Avatar for jonsan32

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** …

Member Avatar for happygeek
0
2K
Member Avatar for jonsan32

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 …

Member Avatar for jonsan32
-1
539
Member Avatar for jonsan32

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 == …

Member Avatar for jonsan32
0
6K
Member Avatar for GlenRogers

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! …

Member Avatar for GlenRogers
1
349
Member Avatar for jonsan32

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 …

Member Avatar for jonsan32
0
191
Member Avatar for proconfusion

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 …

Member Avatar for JamesCherrill
0
227
Member Avatar for Cravver

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 …

Member Avatar for Cravver
0
365
Member Avatar for wolf_one

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 …

Member Avatar for chriswelborn
-1
265
Member Avatar for entropic3105

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.

Member Avatar for entropic3105
0
734
Member Avatar for ddanbe

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 . . . …

Member Avatar for deceptikon
0
113
Member Avatar for LionelMessi

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.

Member Avatar for tinstaafl
0
2K
Member Avatar for hashim5003

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 = …

Member Avatar for hashim5003
0
7K
Member Avatar for Micometer

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 …

Member Avatar for Micometer
0
276
Member Avatar for RawrInYoMouth

//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, …

Member Avatar for IIM
0
171
Member Avatar for ralph.d.abernathy.1

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. …

Member Avatar for tinstaafl
0
3K
Member Avatar for VengefulToast

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 …

Member Avatar for stultuske
0
155
Member Avatar for khair.ullah

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

Member Avatar for khair.ullah
0
165
Member Avatar for clubberlangMayo

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 …

Member Avatar for clubberlangMayo
0
311
Member Avatar for lukas.vandendijssel

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> …

Member Avatar for bradly.spicer
0
312
Member Avatar for ray.chappel

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 …

Member Avatar for ray.chappel
0
376

The End.