Number of random generator help
I created a generator of random numbers with this code. The idea is that a number is introduced into the EntryText and a random number is chosen between 1 and the value of EntryText."" ResponseString =:
TempString: = LowerCase (EntryText)
ResponseString: = (number: = Random (1, TempString, 1)) ^ return
Is it possible that I can improve it so that:
a. once a number has been selected, it will not take again?
b. instead of display an imbue at one time, a whole list of numbers appears in the range between 1 and the value of EntryText. For example, if the value of EntryText was 5, the list might be:
3
1
4
5
2
Given that the space varies in fact (i.e. for a given result, there may be
groups of different sizes), it is probably better to specify the number of
groups instead, then maybe something like:
TempString: = "15".
numgroups: = 5
t: = Number (TempString)
[randomlist: =]
Repeat with j: = 1 to t
AddLinear (randomlist, j, Random(1,j,1))
end repeat
"" ResponseString =:
a: = 0
b: = t
Repeat with j: = 1 to t
ResponseString: = ResponseString ^ randomlist [j]
a: = a + numgroups
If a > = b then
ResponseString: = ResponseString ^ return
b: = b + t
on the other
"" ResponseString: = ResponseString ^ ' "
end if
end repeat
Chris Forecast
Tags: Authorware
Similar Questions
-
Generate number with random interval
Dear friends,
I want to generate number between number and number with random interval.
for example... .parameters entered by the user as
number = 10
number = 50
and interval = 4
. (The answer should only not be in sql plsql)
Answer is
10
14
18
22
26
30
34
38
42
46
50
Hello
These intervals are not really random are they?
Try this:
with the info like
(
Select
to_search 10
end_num 50
, int_num 4
Of
Double
)
Select
to_search + (level - 1) * int_numOf
Infoconnect
to_search + (level - 1) * int_num<=>=>
;Kind regards
Peter
-
draw the histogram of the random generator of >; >; >;
Hello
I have a bulit a random generator by using + 1 D Cellular Autómata LFSR
I need to draw the histogram of the system to check the shape of the distribution
I have the vision of labview
help me draw
I thank you in advace
concerning
Mathematics-> probability and statistics, below a histogram express vi that will help you.
-
Some how my email was requested to be removed and the link to verify that I DON'T want be removed takes me to some site randomly, please help.
Your post is a little vague, but I fear that you may have received a phishing e-mail. Please tell us all about this request but do not follow any links or give any information at this stage.
-
How can I get a phone number or on line help chat?
How can I get a phone number or on line help chat?
Try this link:
"" How and when to contact Microsoft and support Customer Service ".
<>http://support.Microsoft.com/kb/295539 >HTH,
JW -
I can´t download acrobat 9.0 in Spanish (several languages), I have my serial number. Who can help me...? Thank you
If this is an upgrade license, then you must also enter the number of the previous version that you upgraded.
-
I need a serial number because I paid the money already. Where can I get my serial number? Aodbe inDesign Help!
Hello
Please see Troubleshooting FAQ: what should I do if the creative cloud invites me for a serial number?
Hope that helps!
Kind regards
Sheena
-
my computer crashed and I am trying to reistall elements 9. I downloaded it and I have my serial number, but I need help
Download and Installation Help-
-
Hi, I have a subscription in photoshop and creative cloud which includes the luminous room. but he asks me a serial number now; can anyone help please?
Help creating cloud / Cloud Creative applications request serial number
https://helpx.Adobe.com/creative-cloud/KB/CCM-prompt-serial-number.html
-
I have a license to cs3 Middle Eastern version, the hard drive broke down and had to be replaced and reinstalled. Impossible to activate it maintains a maximum number of licenses Please Help
Download & install instructions https://forums.adobe.com/thread/2003339 can help
-includes a link to access a page to download the Adobe programs if you do not have a disk or drive
-Cloud desktop http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html
-Cloud Getting Started https://helpx.adobe.com/creative-cloud.html
-you will need to enter your original serial number during the installation for non-Cloud programs
- or kglad links in response to #1 here can help https://forums.adobe.com/thread/2081216
Also go to https://forums.adobe.com/community/creative_cloud/creative_cloud_faq
-
Hello
I'm new to Flash and AS3 and I tried to create a random number generator. I have included the code at the end I have a button to generate the number and a 'exit' called dynamic text box in which to display the number.
However, when I click on 'generate', I get the error message-> "1067: Implicit coercion of a value of type uint to type String unrelated."
I guess that means that Flash cannot display the number as a string, but is there a way I can do this? Or something that I left out? You can convert a data type to another? I know that you can convert String into numbers, can you do the reverse?
Thanks for any help
CODE:
package
{
import flash.display.MovieClip
import flash.events.MouseEvent
SerializableAttribute public class Main extends MovieClip
{
public void Main()
{
generateButton.addEventListener (MouseEvent.CLICK, onGenerateButtonClick);
}
function onGenerateButtonClick(event:MouseEvent):void
{
var randNum:uint = Math.ceil (Math.random () * 100);
output_txt. Text = randNum;
}
}
}
You can cast randNum string or use:
package
{
import flash.display.MovieClip
import flash.events.MouseEvent
SerializableAttribute public class Main extends MovieClip
{
public void Main()
{
generateButton.addEventListener (MouseEvent.CLICK, onGenerateButtonClick);
}
function onGenerateButtonClick(event:MouseEvent):void
{
var randNum:uint = Math.ceil (Math.random () * 100);
output_txt. Text = randNum.toString ();
}
}
}
-
Phone dials a number at random during an ongoing call
My phone and my wife's phone has been randomly component another number during an active call. This causes the current call to give up without warning.
I thought it was my accidental mistake until it happened to him, then it is true again and again on my phone.
You should try an app like Tools of Droid of Tedd. It locks the screen while you are on a call, which will prevent the face dials. It locks the screen and prevents any entry through the screen while you are on a call. I'm not saying it's happening for sure, but it could be. This could be a good test for it. If the problem goes away when you use tools of Tedd Droid that I would say that what's happening is you're face composition.
There's another app on the market that will do the same thing, but I don't remember the name of any other. I hope this helps.
-
How to add a sequential number or random as a merger of field?
I created a landing page of confirmation which must be sent to an external site for tracking purposes. As one of the URL attributes, I need to assign a unique ID for the transaction, but the problem is that I can't use the email address.
So my thought was that I created a random number and use it as id I checked the Math App in the cloud connectors, but realized that this only works in the campaign workflow. Then I thought so maybe some PHP in the destination page would help, but that is not taken care of.
Any ideas on what I can do to fix this problem? A sequential number would be great but not necessary, so I figure that if it's long enough so a random number should not be repeated and will be able to work for my needs.
Thank you
Fernando
I see two options:
(1) you might actually be able to use the Math cloud connector in this case. To do this, start by creating a new field in the contact table to hold the random numbers, then set this field as a merge field (assets > creating a new Email > merge field > New). Now, you just need to run the Math Cloud Connector step in your Web of campaign, do fill this field of database for you and don't forget to add the merge field at the end of your URL as a query string.
(2) the simplest option is to use the Eloqua user as a fusion variable id. If the Eloqua user ID is not yet an option of merger on your instance, simply follow the steps to set up a merge field (assets > creating a new Email > merge field > New) and choose the Eloqua user ID, now add at the end of your URL. It works even better that which precedes because area you guaranteed to have a unique value per user. If you need a unique value per visit, then I think that freejungof response would work very well, especially if you concatenate the JavaScript random number with the user id.
-
Randomly generate movieClips from the library onto the stage
Hello
I'm calling the objects from the library for a collection set.
Major problems with how best to attribute the good and bad objects update later a score.
Can anyone help me how can I first assign the clips in the library in an array of good and bad and then after randomally fill the stage with them.
Concerning
James
see you never fake in your output panel, when using:
public void placeWords() {}
random location
var x: Number = Math.floor (Math.random () * mapRect.width) + mapRect.x;
var y: Number = Math.floor (Math.random () * mapRect.height) + mapRect.y;
check all blocks to see if it's over everything
var isOnBlock:Boolean = false;
for (var j: int = 0; j
If (blocks [j].hitTestPoint(x+gamesprite.x,y+gamesprite.y)) {}
isOnBlock = true;
break;
}
}
not on everything, so use location
trace (isOnBlock);
If (! isOnBlock)
{
var goodObjects:Array = ["WordObject1"];
var badObjects:Array = ["WordObject2"];
If (Math.Random)<>
{
var r: int = Math.floor (Math.random () * goodObjects.length);
var classRef: Class = getDefinitionByName (goodObjects [r]) in class;
var newObject:MovieClip = new classRef();
newObject.typestr = "good";
} else
{
r = Math.floor (Math.random () * badObjects.length);
classRef = getDefinitionByName(badObjects[r]) in class;
newObject = new classRef();
newObject.typestr = "bad";
}
gamesprite.addChild (newObject);
newObject.x = Math.floor (Math.random () * stage.stageWidth);
newObject.y = Math.floor (Math.random () * stage.stageHeight);
break;
}
}
-
Randomly generate the special characters
I want to generate random password which should include at least one special character that could be any special character except @. dbms_random. String ('p', 1) will give 1 printable character that could be all in uppercase or lowercase, or any numeric value too. But how can I generate just 1 special character (with the exception of the @)?
Thank you
Published by: user5406804 on November 4, 2009 05:50Hello
Welcome to the forum!
You can do something like this:
SELECT SUBSTR ( '!#$%^*:;,.' -- list all special characters here , dbms_random.value (1, 11) -- 11 = 1 + number of special characters , 1 ) AS special_char FROM scott.emp ;
Maybe you are looking for
-
HSON.exe - security concern or not?
McAfee security marked this program on cranking up today. Never seen this before. Program is on C:\PROGRAM FILES\ TOSHIBA\TBS\HSON.exe and tries to connect to the internet according to McAfee, and they do not recognize his fingerprint. It is authenti
-
Where can I find manual for TV Stor.E 1 GB?
Can someone tell me one I can download a manual for the tv 1 TB stor.e
-
Talking stranger about 30 seconds
On my Mac laptop, Pro a foreign language (Europe?) lights up about 30 seconds after starting or when I open another application and speaks of a dialog for about 30 seconds and then stops. It's really disruptive when I do a presentation for this unkno
-
HP Photosmart 5520 e-print: printing with my project problem
I had a document that I scanned and I wanted to print it. The original size is 5 X 7 and I want to print at 8 X 10. He printede very well, but when I printed it he left a border on my the sixe 5 X 7 original work. How can I get rid of this border so
-
The camcorder files have no sound when played back with Windows media player
Videos from my camcorder Sony have not all sounds when I try and view them using Windows Media Player. I need to burn a DVD with audio and video from camcorder files. How to overcome the lack of audio?