Lingo code to show a random number

I am learning Director and my partner and I are trying write
lingo code for when a button is clicked, a random number between 1
and 6 is shown in a text field. Can someone help me? I tried the
code in the Director help that is written: diceroll = (random (6) +
random (6)). We want it for only one die, so we didn't add the
second random(6), but we haven't been able to figure out what else
we should be putting in the code. Thank you.

quote:
Originally posted by:
graphics cat
I have rechecked the spelling and it's still not working.
Most of the time there is no error message, it just doesn't do
anything. Sometimes this error comes up - Script error:
SyntaxEffor: missing; before statment on nouseUp me.
Please, could you post your code or even upload your file
somewhere we can download and check it out. This will help greatly
in trying to find the syntax error you are making.
In the meantime, here's a few links you can check out that
will facilitate learning Director:
http://www.furrypants.com/loope/index.htm
-- advanced lingo
http://www.fbe.unsw.edu.au/learning/director/
-- excellent tutorials
http://www.dreamlight.com/insights/07/
-- learning Lingo
http://www.andyw.com/director/
-- technical guide, tips n’ tricks
http://www.director-onine.com
-- articles and forum
http://www.mediamacros.com/
-- for scripts and more
http://www.xtrasy.com/ --
for xtras and links
http://www.updateStage.com/
-- for quirk list, articles and xtras
http://www.lingoworkshop.com/
-- for some pretty advanced code
http://groups.google.ca/groups?hl=en&lr=&group=macromedia.director.lingo
http://groups.google.ca/groups?hl=en&lr=&group=macromedia.director.basics
http://www.zeusprod.com/
-- some dated technical info
http://www.proscenia.net/resources/tutorials/director/d1/index.html
http://www.shocknet.org.uk/
-- internet, XML, ASP/SQL, database connectivity
http://www.jmckell.com/ -- Math
Lingo
http://www.vtc.com/products/directormx2004.htm
-- free QT How To Videos
http://www.shockwave3d.com/
-- shockwave games
http://www.shocksites.com/
-- information/news repository
http://www.noisecrime.com/
-- cool 3D examples
http://www.chromelib.com/
-- shockwave 3D behavior library
http://www.shocksites.com/
-- good list of Director sites
http://poppy.macromedia.com/~thiggins/
-- Thomas Higgins
http://multimediahelp.org/home/director.html?action=downloads
http://nonlinear.openspark.com/alpha/
-- James Newton’s site. Examples
http://nonlinear.openspark.com/
http://www.j-roen.net/diropener/
-- tools to extract media from dxr, dcr
http://www.macromedia.com/support/director/
-- official MM support site
http://www.robotduck.com/learning/introduction/introduction1.htm
-- tutorials
http://brennan.young.net/Edu/Lingvad.html
-- OOP & Space Invaders game
http://www.markme.com/mxna/index.cfm?category=Director
–MM XML News
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_18629
http://martyplumbo.com/tutor/
-- 3D tutorials
http://www.ullala.at/ -- IL
widgets & cool 3D stuff
http://www.pm-studio.pl/xtraforum/
-- MM Xtra Developer Forum
http://freextras.freeweb.hu/
-- free Xtras
http://www.easyrgb.com/math.html
-- colour model conversion code
http://www.farbflash.de/director/
-- excellent examples of IL and 3D stuff
http://www.acm.org/tog/GraphicsGems/
-- graphics gems code repository – IL
http://www.toxictoy.com/resources.php
-- several introductory tutorials
http://www.catb.org/%7Eesr/faqs/smart-questions.html
http://www.donrelyea.com/testdept1.html
-- some very cool scripts
http://director-online.com/havok/
-- havok code, demos and more
http://www.macromedia.com/software/player_census/shockwaveplayer/version_penetration.html
-- shockwave penetration stats
http://www.codeproject.com/csharp/endogine.asp#xx1253907xx
– Endongine
http://www.macromedia.com/software/eula/third_party/
-- third party eulas

Similar Messages

  • Generate a random number and make it STAY after "save"

    I searched around this forum and found that I can use this code to generate a random number:
    //this.rawValue = Math.round(Math.random() * 1000000);
    Works great. only problem is, once I practice on the "real" form and save, close, and reopen - it changes the random number every time. I need to figure out a way to make it save the 1st number it generates when someone opens the form and types info in it....then they save and close, etc.
    Can anyone help me? Thanks!!

    Example steps:
    1. Add a hidden field to the same subform with name 'hiddenField'.
    2. First time you open 'hiddenField' rawValue will be null.
    3. where ever you run the code to generate random number use scenario like this.
    if (hiddenField.isNull) {
    this.rawValue = Math.round(Math.random() * 1000000);
    }else {
    this.rawValue = hiddenField.rawValue;
    Hope this thelps.
    SekharN

  • Random Number list

    Lo peeps, I have a small problem, i'm trying to create a random number generator and create a list of size current_size. The code also generates the random number from zero to current_size. The following code seems to work correctly in generating a random number, but it doesn't create a list of random numbers, instead it creates a list of the same random number!!! Does anyone have any ideas?
    import java.util.*;       // needed for Random
    public class ListByArray
        private     int           current_size;
        private     String[]      data;
        private final int        default_max_size = 4096;
        public int createRandomList(String string_size)
            int i;
            int j;
            if(!isIntString(string_size)) {
                return 0;
            else {
                Integer size = Integer.valueOf(string_size);
                current_size = size.intValue();
            for(i=0; i<current_size; i++) {
                Random R = new Random();
                j = (int)(R.nextFloat()*current_size);
                data[i] = Integer.toString(j);
            return current_size;
        } //end createRandomList
    } //end classIt's manly the for loop which I'm wondering about because I know the rest of the code works!!!.

    That line creates a new pseudo random number generator with the current time (in milliseconds) as a seed. When you call r.nextFloat you don't actually get a random number but a number that is a function of the last number generated, or, if there are no numbers yet generated, of the seed (that's why they call them pseudo random number generators). So the sequence you get is totally dependent on the seed. Your loop seems to be passed so fast that the time in milliseconds doesn't change during it, with the result that you have many generators with the exact same seed and will produce the exact same sequence of numbers... and you use only the first number of each sequence.
    But if you move the line outside the loop you'll have only one RNG that is seeded only once.
    More info on RNGs: http://directory.google.com/Top/Computers/Algorithms/Pseudorandom_Numbers/

  • AppleScript Random Number Question.

    I know there are several "guess a random number" AppleScript examples on the web, but I tried writing my own to see if I could pull it off.  Works pretty good except for one bug.  If the random number is lower than 10 (single digit) and I guess a number 10 or higher, my script comes back saying my guess is too small!  Everything in my code looks reasonable to me, but obviously I'm overlooking something!  Here's my code:
    set rnd to (random number from 1 to 20)
    set rnd to rnd as string
    set num to 5
    repeat 5 times
              if num = 1 then
                        set anw to text returned of (display dialog "You have only 1 guess left!
    Pick a number from 1 to 10." default answer "" buttons {"OK"} default button 1)
              else
                        set anw to text returned of (display dialog "You have " & num & " guesses left!
    Pick a number from 1 to 20." default answer "" buttons {"OK"} default button 1)
              end if
              if anw < rnd then
      display dialog "Too Small!" buttons {"OK"} default button 1
              else
                        if anw > rnd then
      display dialog "Too Big!" buttons {"OK"} default button 1
                        else
                                  if anw = rnd then
      display dialog "Correct!" buttons {"OK"} default button 1
                                            return
                                  end if
                        end if
              end if
              set num to num - 1
    end repeat
    display dialog "You have run out of guesses!
    The number was " & rnd & "." buttons {"OK"} default button 1

    you need to convert the variable anw to an integer, otherwise your script will compare anw to rnd as text strings (and text strings beginning with 1 are always small).  add the following code before you do your comparisons:
              set anw to anw as integer
    also, your script will be cleaner if you use the 'else' command in your if statement:
              if anw < rnd then
                      display dialog "Too Small!" buttons {"OK"} default button 1
              else if anw > rnd then
                      display dialog "Too Big!" buttons {"OK"} default button 1
              else
                      display dialog "Correct!" buttons {"OK"} default button 1
                      return
              end if

  • FBL5N t code and BSEG table is showing wrong contract number

    Hi,
    The proces flow is contract number>sales order>DMR-->Invoice
    Now when I am checking the VBFA table it's showing correct contract number against invoices but FBL5N t code and BSEG table are showing wrong contract numbers.
    Why FBL5N and BSEG table is showing wrong contract number?
    Currently we are using one enhancement and user exit is used to incorporate one customized field as identifier for bill type.
    1. During the billing document release to accounting VFX3, The user exit triggering and it is update the customized fields and Net settlement indicator.
    2. Using the Invoice number, get the fields VGBEL(Document number of the reference document) and VGPOS (Item number of the reference item) from VBRP and read table VBAP with VBELN and POSNR, to get DMR number (Sales Document) that created for the Invoice.
    3. Use fields VGBEL and VGPOS on table VBAP to get the sale order number.
    4. By using the Sales order number, get the Distribution channel to update Net indicator field
    In accounting table BSEG-UZAWE = JF must be updated on the customer line.
    5. Retrieve the sale order number and item level to get customized field from table VBAP
    Any pointers.
    Thanks
    Ashu

    Hi Reazuddin,
    Thanks for your reply,
    I am concercerned about BSEG table and using user exit EXIT_SAPLV60B_008 to post the document in FI.
    Now in we have enhanced this user exit  for contracts and included in this way.
      SELECT SINGLE ZZ_CONTRACT FROM VBAK INTO (LC_CONTRACT) WHERE VBELN EQ cvbrp-vgbel.
    Endloop.
    *Moving the values to final accounting table
    loop at xaccit.
    xaccit-vertn = lc_contract.
    xaccit-VBEL2 = xaccit-AUBEL.
    xaccit-xref3 = lc_vbel2.
    MODIFY xaccit .
    ENDLOOP.
    Clear: lc_contract,lc_vgbel,lc_vgpos,lc_vbel2.
    But I am getting correct data when checked other clients( development and quality), this problem I am getting in production.
    Do I need to ask the ABAP'er to debug this enhancement in production?
    Thanks
    Ashutosh

  • How to use a random number equal another number. (with my source code)

    hi, i'm having trouble with this assignment.
    3. Determine how many times a die must be rolled in order to
    win a prize. (This represents one trial.) Print this value to a
    text file.
    4. Conduct at least 1,000 trials.
    5. Read the data back in from all of the trials.
    6. Calculate the average number of times a die must be rolled in order to win a prize.
    7. Print the result to the screen
    This is what I have so far.
    But I get a "int cannot be dereferenced" error
    * Write a description of class BottleCapPrize here.
    * @author (your name)
    * @version (a version number or a date)
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.Scanner;
    import java.util.Random;
    import java.io.File;
    public class BottleCapPrize
    public static void main (String [ ] args) throws IOException
    PrintWriter outFile = new PrintWriter(new File("bah.txt"));
    Random randomGenerator = new Random();
    int random = randomGenerator.nextInt(5);
    int count = 0;
    for (int loop = 1; loop <= 1000; loop++)
    if(random.equals("3"))
    outFile.println("Congratulations, both pairs matched.");
    count++;
    outFile.close ( );
    }

    And the random generator can only choose a 1 or 2 or 3 or 4 or 5. This is then randomly chosen 1000 times like 400 2s and 200 5s for example.I think you have still to appreciate that the task is not to roll a dice 1000 times and see how many of each number you get.
    Tackle it one step at a time:
    3. A - Determine how many times a die must be rolled in order to win a prize. (This represents one trial.)
    B - Print this value to a text file.
    Even the first part of the problem can be broken down into two parts. I strongly suggest to get step 3A working correctly before you move any further. Notice that this step does not involve 1000 rolls of the dice. Rather it asks you to roll the dice as many times as needed until you get a three. Start there: write a method that does no more than report the number of times it had to roll the dice in order to get a three.
    import java.util.Random;
    public class BottleCapPrize
        public static void main (String [ ] args) throws IOException
            Random randomGenerator = new Random();
            int count = 0;
             * Your code here.
             * At the end of it count should be equal to the number of
             * dice rolls it took to get a three.
            System.out.println("It took " + count + "dice rolls to get a three");
    }Once you have this method working correctly - that is you run it lots of times and it agrees with what you find experimentally with an actual dice - then you can move on to saving this result to a file (step 3B). The steps of the assignment provide a framework that makes sense - follow them one at a time.
    but only thing is that the random number is all a certain number.That's a fairly major defect in a randomly generated number ;). Read the API documentation for the [nextInt(n)|http://java.sun.com/javase/6/docs/api/java/util/Random.html#nextInt(int)] method. It should be clear that this is the method that randomly generates a number. So if you want lots of randomly generated numbers (rather than one randomly generated number lots of times) then you have to call this method lots of times. A call to nextInt(n) is the programming equivalent to rolling a dice.

  • HT5188 I have 50 iPads and 50 codes, but I am not able to install the app on the last ipad.  One code in the spreadsheet says it's already been used but shows no serial number or device name.

    I have 50 iPads and 50 codes, but I am not able to install the app on the last ipad using Apple Configurator.  One code in the spreadsheet says it's already been used but shows no serial number or device name.

    Hi mafiose15,
    Thanks for visiting Apple Support Communities.
    Restoring your iPod to factory settings is the best way to try and get it back to working order. You can use the instructions below to restore it:
    How to restore iPod
    Verify that you have an active Internet connection, because you may need to download new versions of the iTunes and iPod Software.
    Download and install the latest version of iTunes if necessary.
    Open iTunes. Connect your iPod to your computer using the USB or FireWire cable that came with your iPod.
    After a few moments, your iPod will appear in the Source panel in iTunes.
    Select your iPod in the Source panel. You will see information about your iPod appear in the Summary tab of the main iTunes window.
    Click Restore.
    If you are using a Mac, you will be asked to enter an administrator’s name and password.
    A progress bar will appear on the computer screen, indicating that stage one of the restore process has begun. When this stage is done, iTunes will present one of two messages with instructions specific to the iPod model you are restoring.
    Disconnect iPod and connect it to iPod Power Adapter (typically applies to older iPod models).
    Leave iPod connected to computer to complete restore (typically applies newer iPod models).
    During stage two of the restore process, the iPod displays an Apple logo as well as a progress bar at the bottom of the display. It is critical that the iPod remain connected to the computer or iPod power adapter during this stage.
    Note: The progress bar may be difficult to see, because the backlight on the iPod display may be off.
    After stage two of the restore process is complete, the iTunes Setup Assistant window will appear. It will ask you to name your iPod and choose your syncing preferences, as it did when you connected your iPod for the first time.
    You can find the instructions in this article:
    Restoring iPod to factory settings
    http://support.apple.com/kb/ht1339
    All the best,
    Jeremy

  • Hard code a seed for a random number generator?

    Hi, I need to randomly get either 1 or 0, but in the program I'm running I want to get the same distribution of 1's and 0's every time I run it. I know I need to hardcode the seed in so I use the same seed every time, but I'm not sure how to do this. I know how to use Math.random, and just do
    double randomDouble = Math.random();
    int rand = (int)(randomDouble + 0.5);but I dont know how to hard code a seed using this.
    thanks.

    ryanj318 wrote:
    I tried that, and the problem is that I get the same random number every time (in this case I get 1 every time).Then you must be creating a new Random every time.
    To be more clear on what I want, I am generator 20 numbers, and I want a random distributions of 1's and 0's, but I want to get the same distribution every time I run the program. Like if I get 13 1's and 7 0's then I want to get that every time. Can I do this? Right now, I will end up with either 20 1's or 20 0's.
    ThanksCreate a new Random once, probably as a static member variable, but possibly just at the start of that method. Seed that Random with the same value every time it's created, and you'll get the same sequence every time you use it.
    BUT, if you create it, then use it, then create, then use, and repeat that 20 times, then you'll be getting the first number of the same sequence 20 times.
    By the way, to you want 1/0 or true/false? If the latter, I believe Random has a nextBoolean method.

  • A simple question on random number generation?

    Hi,
    This is a rather simple question and shows my newbieness quite blatantly!
    I'm trying to generate a random number in a part of a test I have.
    So, I have a little method which looks like this:
    public int getRandomNumber(int number){
            Random random = new Random(number);
            return random.nextInt(number);
        }And in my code I do int random = getRandomNumber(blah)...where blah is always the same number.
    My problem is it always returns the same number. What am I missing here. I was under the impression that nextint(int n) was supposed to generate the number randomly!! Obviously I'm doing something wrong or not using the correct thing. Someone please point out my stupidity and point me in the right direction? Ta

    I think the idea is that Random will generate the same pseudo-random sequence over and over if you don't supply a seed value. (The better to debug with, my dear.) When you're ready to put an app into production, the seed value should be the current system time in milliseconds to guarantee a new sequence with each run.
    Do indeed move Random outside the loop. Think of it like a number factory - instantiate it once and let it pump out the random values for you as needed.

  • How do I assign images to grid cells based on their random number value?

    Hello everyone!
         I need a good point (or shove) in the correct direction.
    Background
         I've created (with previous help from this forum) a 12 x 9 random number grid which cycles through the numbers 1 to 9 a total of twelve times each. I've then created a button which shuffles the current grid's cells each time it is clicked. I now want to use 9 images that I have imported as individual symbols into the library (I have given them each their own class titled "skin1," "skin2," ... "skin9") as cell labels or the equivalent. I have also set the images up as individual movie clips (using the .Sprite class as the extended base class but keeping the actual image class names in line with their object name, i.e. the "skin1" image is the "skin1.as" class).
    Question
         How do I assign these images to the grid cells based on their respective values (ranging from 1 to 9) and have them populate the grid each time I click the "shuffle" button? So for example, in my grid the numbers 1 through 9 randomly appear 12 times each. Every time the number 4 appears in a cell, I want it to be assigned to the image "skin4" (which is just a graphic that looks like a button and has a fancy number "4" printed on it). Below is a chunk of the code I am using to draw the grid cells with:
    // Creates a grid cell when called by generateGrid().
    private funciton drawCell(_numeral:int):Sprite
              This is the code I am currently implementing to populate the grids with (although I
              don't want to use text labels as I want to fill each grid with an image according
              to its numerical value (1 to 9).
         var _label:TextField = new TextField();
         _label.multiline = _label.wordWrap = false;
         _label.autoSize = "center";
         _label.text = String(_numeral);
         // Add numerical label to cell array.
         cellLabels.push(_label);
         var _s:Sprite = new Sprite();
         _s.graphics.lineStyle(2, 0x019000);
         _s.graphics.drawRect(30, 0, cellW, CellH);
         _s.addChild(_label);
         return _s;
         While the following isn't working code, it will hopefully demonstrate what I want to achieve inside this function so I don't have to use the above snippet for text labels:
         //This will "hopefully" create an array of all 9 images by calling their classes.      var _imageArray:Array = [skin1, skin2, skin3, skin4, skin5 , skin6, skin7, skin8, skin9];      // This is what I want to happen for each cell using the above image array:      for (i = 0; i < cells; i++)      {           if (_numeral == 1)           {                // Insert skin1 image for each instance of #1 in the grid.           }           if (_numeral == 2)           {                // Insert skin2 image for each instance of #2 in the grid.           }           ...           if (_numeral == 9)           {                // Insert skin9 image for each instance of #9 in the grid.           }      } 
         Again, I don't want to use text labels. I have a custom skin graphic that I want to go over each number on the grid based on its numerical value (1 to 9). Any help with this is much appreciated!

    kglad,
         Thank you for your help with this one. Using the code below, I have successfully populated my grid cells with the desired corresponding graphics. I noticed one thing though regarding my use of the shuffle button with this particular implementation: even though the numerical values residing in each cell get shuffled, the original images remain in the grid rather than being replaced by new ones. The first code snippet below is the revised cell drawing function including your help; the second snippet shows you my simple shuffle button function (where the problem lies, I think).
    Snippet #1:
         // Creates a grid cell when called by generateGrid().
         private function drawCell(_numeral:int):Sprite
              var _label:TextField = new TextField();
              _label.multiline = _label.wordWrap = false;
              _label.autoSize = "center";
              // Creates a label that represents the numerical value of the cell.
              cellLabels.push(_label);
              var _s:Sprite = new Sprite();
              _s.graphics.lineStyle(2, 0x019000);
              _s.graphics.drawRect(30, 0, cellW, cellH);
              // Physically adds the labels to the grid.
              _s.addChild(_label);
              // Assigns a graphic class to a cell based on its numerical value.
              var _classRef:Class = Class(getDefinitionByName("skin" + _numeral));
              // Undefined variable for holding graphic classes.
              var _image:* = new _classRef();
              // Lines the images up with the grid cells.
              _image.x = 30;
              // Physically adds a graphic on top of a cell label.
              _s.addChild(_image);
              return _s;
         So far so good (although I question needing text labels at all if they are just going to remain invisible underneath the images, but enough about that for now). This next part is the reason that the images won't shuffle with the cell values, I think.
    Snippet #2:
         // When shuffleButton is clicked, this event shuffles
         // the number array and fills the cellLabels with the new values.
         private function onButtonShuffleClick(e:MouseEvent):void
              // Shuffles the number array.
              shuffle(numbers);
              // Verifies the array has been shuffled.
              trace("After shuffle:", numbers);
              // Loop replaces old cellLabels with new number array values.
              for (var i:int = 0; i < cells; i++)
                   cellLabels[i].text = String(numbers[i]);
         As you can see, it never replaces the original images that populate the grid. I tried using the _s.removeChild(image) function but that didn't work, nor would copying/pasting some of the code from snippet #1 directly into this function as it would cause another instance of the images to be placed over top of the existing ones rather than actually swapping them out. Any continued help here is greatly appreciated!
         PS Is there a quicker method for posting code into these forums without having to type it all out by hand again (i.e. copy/paste or drag/drop from my .fla or Notepad file directly into this thread)?

  • How to generate a unique random number in a MySQL db

    I'm creating a volunteer and also a separate vendor application form for an airshow. The volunteer and vendor info is stored in separate tables in a MySQL db, one row per volunteer or vendor. There will be about 100 volunteers and 50 vendors. When the application is submitted it should immediately be printed by the applicant, then signed and mailed in. This past year we had problems with some people who didn't immediately print their application so I'd like to still give them the option to immediately print but also send them an e-mail with a link to their specific row in the MySQL db. I have an autoincrement field as the primary key for each table, but I think sending this key to the applicant in an e-mail would be too easy for them to guess another id and access other people's info.
    I'm thinking I should add a column to each table which would contain a unique random number and I would then send this key in the e-mail to the applicant. So, can anyone suggest a simple way to do this or suggest a better way of giving the applicant a way to access their own application and no-one elses after they have submitted their form?
    Thanks all.
    Tony Babb

    Thanks so much, that was very helpful. I added the code you suggested to create and display the random number - I called it "vollink" and that worked fine. Then I added the hidden field toward the bottom of the form - it shows at line 311 when I do a "View Source in Int Explorer and then tried adding the code to add it to the table and when I tested it failed with "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1" . The test version of the page is here www.hollisterairshow.com/volunteerapp2.php . The changes I made to add it to the table is shown below , I must be missing something blindingly obvious, if you could suggest a fix I'd really appreciate it. I did add the field to the MySQL table also.
    Thanks again
    Tony
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO volunteers (firstname, lastname, email, thursday, friday, saturday, sunday, monday, activity, talents, specialrequests, tshirt, phone, street, city, st, zip, updatedby, vollink) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, $s)",
                           GetSQLValueString($_POST['firstname'], "text"),
                           GetSQLValueString($_POST['lastname'], "text"),
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['thursday'], "text"),
                           GetSQLValueString($_POST['friday'], "text"),
                           GetSQLValueString($_POST['saturday'], "text"),
                           GetSQLValueString($_POST['sunday'], "text"),
                           GetSQLValueString($_POST['monday'], "text"),
                           GetSQLValueString($_POST['activity'], "text"),
                           GetSQLValueString($_POST['specialtalents'], "text"),
                           GetSQLValueString($_POST['specialrequests'], "text"),
                           GetSQLValueString($_POST['tshirt'], "text"),
                           GetSQLValueString($_POST['phone'], "text"),
                           GetSQLValueString($_POST['street'], "text"),
                           GetSQLValueString($_POST['city'], "text"),
                           GetSQLValueString($_POST['st'], "text"),
                           GetSQLValueString($_POST['zip'], "text"),
            GetSQLValueString($_POST['vollink'], "text"),
                           GetSQLValueString($_POST['lastname'], "text"));
      mysql_select_db($database_adminconnection, $adminconnection);
      $Result1 = mysql_query($insertSQL, $adminconnection) or die(mysql_error());

  • My skype caller id shows the correct number but al...

    When I call using my skype online number, caller id shows the correct number but also displays someone elses name.  How can I remove the name? 

    I have the same problem. Although I have my Caller ID set to show my Skype Number businesses tell me they're seeing area code 559 with a random/different last 4 digits each time. I just went through an account verification with a vendor and it was impossible to get them to verify - kept telling me I need to be calling from the number they have on file.
    Come on Microsoft. There's no way to actually get support (for a paid product no less), let alone see anyone participating in support (hic) forums to resolve countless issues that others are reporting.

  • Caller ID showing the wrong number (a different on...

    I live in Massachusetts, USA.
    When I am calling a US business, sometimes a toll-free (800/877/866) and other times not, the number shows up with a (559) area-code and a different number each time.  If I am calling someplace important (bank/internet provider/electric company/PayPal) they will give Me a hard time as I am not calling from the number they have listed.
    This is NOT a Windows issue.  To suggest udating to the latest version is offensive.  I am running Windows 7 with all the most recent updates.  I need a real solution.  Not some platitude of, "Make sure you are running the most current verion of Skype." (I am).  This happens no matter what computer I am logged into with My Skype account.
    I have checked several times the the number listed in "Display this number when I call mobiles and landlines from Skype" is correct.  The number displays correctly when I call some businesses and all home Caller IDs, but not to other businesses.  Every business I call is in the US.

    I have the same problem. Although I have my Caller ID set to show my Skype Number businesses tell me they're seeing area code 559 with a random/different last 4 digits each time. I just went through an account verification with a vendor and it was impossible to get them to verify - kept telling me I need to be calling from the number they have on file.
    Come on Microsoft. There's no way to actually get support (for a paid product no less), let alone see anyone participating in support (hic) forums to resolve countless issues that others are reporting.

  • VBScript Truly Random Number/Password Generators?

    So... I have a script that generates random passwords for use in a project in VBS.  The code used to generate the password is something that is very similar to this blog post: 
    http://blogs.msdn.com/b/gstemp/archive/2004/02/23/78434.aspx.  And considering every random-number generator in VBS that I was able to find appears to be based (at least, in part)
    off of this code, I'm looking for something that is reliable. 
    The above blog article basically states that the builtin Rnd and Randomize functions are not functionally secure for password generation because of the small number of "seeds" that vbscript has builtin to it's randomize/rnd functions.  And because of
    this small number of seeds, it's relatively easy to deduce the password because of it.  So ultimately, I'm asking to know if there is a reliable way to generate, "truly random" numbers that are secure enough for password values (through random number
    -> ANSI character translation)?
    The article talks about the Crypto API being able to generate truly random numbers but I wasn't able to find any documentation on how to access the Crypto API from VBS.  Can anyone provide any assistance on either of these two questions?  Thanks.

    @Richard
    The Rnd() function does not appear to be good enough for me.  I'm testing password generation on different machines at startup and writing those values to AD.  What I've seen is a preponderance of either "very close" or identical passwords from
    using this general code:
    Randomize
    rndNum = Int((122 - 33 + 1) * Rnd + 33)
    ...who's value gets converted to a character and appended to a string that gets repeated x times to generate a password.  To show you what spawned this entire thread, my computers (that are all running this at startup), are generating passwords that
    look like this:
    "ua*td"4poYAp=SlL
    #ua+td"4ppZBq>SlL
    #vb+ue#5qpZBr>TmM
    $wc-vf$6rq[Ds?UnN
    $wc-vf$6rq[Ds?UnN
    $wc-vf$6rr[Ds@UnN
    -%k5$n,>zzdL!H^vV
    %wd-vf%6sr\Ds@VoN
    &ye.xh&8ts]EtAWpP
    &ye/xh&8tt]FuBWpP
    (!g0zj(:vu_GwCYrR
    (!g0zj(:vu_HwCYrR
    )!g1zj(:vv`HwDZrR
    )!h1!k):wv`HwDZsS
    *"h2!k);wwaIxEZsS
    *"i2!k*;xwaIxE[tS
    *#i2"l*<xwaIyE[tT
    *#i3"l*<xxbJyF[tT
    *6"F5%=O11u]2Yo-g
    ,$j4#m+=yycKzG]uU
    ,%k5$n,>zycL!H]vV
    .'m6&p.@"!eM"I_xX
    /'n7&p/@#"fN#J`yX
    :2xB1!9K--qY.Uk)c
    :2xB1!9K--qY.Uk)c
    :2xB1!9K--qY.Uk)c
    :2yB1!9K.-qY.Uk)c
    :2yB1!9K.-qY.Uk)c
    :2yB2":K.-qY.Uk*d
    :3yC2":L..qZ/Vk*d
    :3yC2":L..qZ/Vk*d
    ;3yC2":L..rZ/Vl*d
    ;4zC3#;M/.rZ0Vl+e
    ;4zC3#;M/.rZ0Vl+e
    ;4zD3#;M/.r[0Vl+e
    ?7#G6&>P22v^3Zo.h
    ?7#G6&>P22v^3Zo.h
    ?7#G6&>P22v^3Zp.h
    ?7#G6&>P32v^3Zp.h
    ?7$G6&>P32v^3Zp.h
    ?7$G7'?P32v^3Zp/i
    ?8$G7'?Q32v^3Zp/i
    ?8$Gn^v.jjS<k8MfF
    ?8$H7'?Q32v_4Zp/i
    @8$H7'?Q33w_4[q/i
    @9%I8(@R43w`5[q0j
    @9%I8(@R44w`5\q0j
    [S?cRBZlNN8zOv2J*
    [S@cRB[lON8zOv2K*
    [S@cRBZlON8zOv2J*
    [T@cSC[mON8zPv2K+
    [T@cSC[mON8zPv2K+
    [T@dSC[mOO9!Pw2K+
    \kW!jZr*ffP8g4IbB
    \T@dSC[mOO9!Pw2K+
    \T@dSC[mOO9!Pw3K+
    \T@dSC[mOO9!Pw3K+
    \T@dSC[mOO9!Pw3K+
    \TAdSC[mPO9!Pw3L+
    \UAdTD\nPO9!Qw3L,
    \UAeTD\nPP:"Qx3L,
    ]UAeTD\nPP:"Qx4L,
    ]VBeUE]oQP:"Qx4M-
    ]VBfUE]oQP:#Rx4M-
    ^VBfUE]oQQ;#Ry4M-
    ^VCfUE]oRQ;#Ry5M-
    ^WCfVF^pRQ;#Ry5N.
    ^WCfVF^pRQ;#Ry5N.
    _WCgVF^pRR<$Sz5N.
    _WCgVF^pRR<$Sz5N.
    _WCgVF^pRR<$Sz6N.
    _WCgVF^pRR<$Sz6N.
    _XDhWG_qSS<%T!6O/
    `XEhWG_qTS=%T!7O/
    `YEhXH`rTS=%T!7P0
    `YEhXH`rTS=%U!7P0
    `YEhXH`rTS=%U!7P0
    `YEhXH`rTS=%U!7P0
    `YEhXH`rTS=&U!7P0
    `YEiXH`rTS=&U!7P0
    `YEiXH`rTS=&U!7P0
    `YEiXH`rTT=&U"7P0
    +#i3"l*<xxbJyF[tT
    +#i3"l*<xxbJyF[tT
    +$j3#m+=yxbJyF\uU
    +$j4#m+=yxbKzF\uU
    <4!D4$<M0/s[0Wm,f
    <4zD3#;M//s[0Wl+e
    <5!D4$<N0/s[0Wm,f
    <5!E4$<N0/s\1Wm,f
    =5!E4$<N00t\1Xm,f
    =5"E4$=N10t\1Xn-f
    =6"E5%=O10t\2Xn-g
    =6"E5%=O10t]2Xn-g
    =6"F5%=O11t]2Yn-g
    =6"F5%=O11t]2Yn-g
    >6"F5%=O11u]2Yn-g
    >6#F5%=O21u]2Yo-g
    >6#F5&>O21u]2Yo.g
    >7#F6&>P21u]2Yo.h
    >7#G6&>P21u^3Yo.h
    0(n8'q/A##gO$KayY
    0(n8'q/A##gO$KayY
    0(o8(r0A$#gO$KazZ
    0(o8'q/A$#gO$KayY
    0)o9(r0B$#gP%KazZ
    0)o9(r0B$#gP%KazZ
    0)o9(r0B$$gP%LazZ
    1)o9(r0B$$hP%LbzZ
    1)o9(r0B$$hP%LbzZ
    1*p:)s1C%$hQ&Lb![
    1*p:)s1C%%hQ&Mb![
    1*p9)s1C%$hQ&Lb![
    2*p:)s1C%%iQ&Mb![
    2+q:*t2D&%iQ&Mc"\
    2+q:*t2D&%iQ'Mc"\
    4,s<,v4E('kS(Oe$^
    4'm7&p.@"!eN#I_xX
    4-s<,v4F('kT)Oe$^
    5.t=-w5G)(lT)Pf%_
    5.t=-w5G)(lT*Pf%_
    5.t=-w5G)(lU*Pf%_
    5.t>-w5G))lU*Qf%_
    5.t>-w5G))lU*Qf%_
    5-s=,v4F((lT)Pe$^
    6.t>-w5G))mU*Qf%_
    6.t>-w5G))mU*Qg%_
    6/u?.x6H*)mV+Qg&`
    6/u?.x6H**mV+Rg&`
    6/u?.x6H**nV+Rg&`
    7/u?.x6H**nV+Rh&`
    70v?/y7I+*nV,Rh'a
    70v@/y7I+*nW,Rh'a
    70v@/y7I++nW,Sh'a
    81wA0z8J,,oX-Ti(b
    81wA0z8J,+oX-Si(b
    81wA0z8J,+oX-Si(b
    81wA0z8J,+oX-Si(b
    91wA0z8J,,pX-Tj(b
    91xA0z8J-,pX-Tj)b
    92xA1!9K-,pX.Tj)c
    92xA1!9K-,pX-Tj)c
    92xA1!9K-,pX-Tj)c
    92xB1!9K-,pY.Tj)c
    A:&I9)AS54x`5\r1k
    A:&I9)AS54x`6\r1k
    A9%I8(@R44x`5\q0j
    A9&I9)AR54x`5\r1j
    aYEiXH`rTT>&U"7P0
    aYEiXH`rTT>&U"7P0
    aYEiXH`rTT>&U"8P0
    aYEiXH`rTT>&U"8P0
    aYEiXH`rTT>&U"8P0
    aZFiYIasUT>&U"8Q1
    What you see above is a snippet of the passwords that each computer generates and writes to AD and then sorted through PowerShell to show the similarities/identicals.  I'm only running this on 300ish systems and they seem to be relatively close. 
    As you stated, I'm not sure if the number generators you provided (which were awesome btw) are necessary but unless I'm implementing the Randomize/Rnd functions completely wrong, these passwords seem to be WAY to close for comfort.  I think I'm going
    to try a variation of the GUID usage and run it for awhile to see how "frequent" passwords appear similarly:
    Low = 33
    High = 122
    For i=0 to 100
    WScript.Echo "END: " & GetRandomInt(Low,High)
    Next
    Function GetRandomInt(iLowPart,iHighpart)
    iLowPartLen = Len(iLowPart)
    iHighPartLen = Len(iHighPart)
    ' Loop through dynamically generated GUIDs until we find a string of characters that meet the criteria
    Do
    ' Generate a starting point to read out of a 32-bit GUID string
    Randomize
    iGuidLow = Int(((32 - 8) - 1 + 1) * Rnd + 1)
    ' Generate a GUID
    objGuid = CreateObject("Scriptlet.TypeLib").Guid
    ' Strip out the dashes and braces and pull an 8-character section of the GUID from the provided starting point
    strGuid = Mid(Replace(Replace(Replace(CStr(objGuid), "-", ""), "{", ""), "}", ""), iGuidLow, 8)
    ' Convert back to a number
    iGuid = Abs(CLng("&h" & strGuid))
    iGuidLen = Len(iGuid)
    ' Generate the span of characters to generate given the high/low vals
    Randomize
    iLengthVal = Int((iHighPartLen - iLowPartLen + 1) * Rnd + iLowPartLen)
    ' Loop through the GUID-fragment-converted-to-number to find a value between the given numeric span
    For iStartPos=1 to iGuidLen
    iSegment = CInt(Mid(iGuid, iStartPos, iLengthVal))
    If iSegment >= iLowPart And iSegment <= iHighPart Then
    Exit Do
    Else
    If iSegment > iHighPart Then
    Exit For
    End If
    End If
    Next
    Loop Until iStartPos > iGuidLen
    GetRandomInt = iSegment
    End Function

  • How to define "leading" random number in Infoset fpr parallel processing

    Hello,
    in Bankanalyzer we use an Infoset which consists of a selection across 4 ODS tables to gather data.
    No matter which PACKNO fields we check or uncheck in the infoset definition screen (TA RSISET), the parallel frameworks always selects the same PACKNO field from one ODS table.
    Unfortunately, the table that is selected by the framework is not suitable, because our
    "leading" ODS table which holds most of our selection criteria is another one.
    How to "convince" the parallel framework to select our leading table for the specification
    of the PACKNO in addition (this would be times 20 faster due to better select options).
    We even tried to assign "alternate characteristics" to the packnos we do not liek to use,
    but it seems that note 999101 just fixes this for non-system-fields.
    But for the random number a diffrent form routine is used in /BA1/LF3_OBJ_INDEX_READF01
    fill_range_random instead of fill_range.
    Has anyone managed to assign the PACKNO of his choice to the infoset selection?
    How?
    Thanks in advance
    Volker

    Well, it is a bit more complicated
    ODS one, that the parallel framework selects for being the one to deliver the PACKNO
    is about equal in size (~120GB each) to ODS two which has two significant field which cuts down the
    amount of data to be retreived.
    Currently we execute the generated SQL in the best possible manner (by faking some stats )
    The problem is, that I'd like to have a Statement that has the PACKNO in the very same table.
    PACKNO is a generated random number esp. to be used for parallel processing.
    The job starts about 100 slaves
    Each slave gets a packet to be processed from the framework, which is internaly represented
    by a BETWEEN clause on this PACKNO. This is joined against ODS2 and then the selective fields
    can be compared resultin in 90% of the already fetched rowes can be discarded.
    Basicly it goes like
    select ...
    from
      ods1 T_00,
      ods2 T_01,
      ods3 T_02,
      ods4 T_03
    where
    ... some key equivalence join-conditions ...
    AND  T_00.PACKNO BETWEEN '000000' and '000050' -- very selective on T_00
    AND  T_01.TYPE = '202'  -- selective Value 10% on second table
    I'd trying to change this to
    AND  T_01.PACKNO BETWEEN '000000' and '000050'
    AND  T_01.TYPE = '202'  -- selective Value 10%
    so I can use a combined Index on T_01 (TYPE;PACKNO)
    This would be times 10 more selective on the driving table and due to the fact,
    that T_00 would be joined for just the rows I need, about a calculated time 20-30 faster.
    It really boosts when I do this in sqlplus
    Hope this clearyfies a bit.
    Problem is, that I can not change the code either for doing the
    build of the packets or the one that executes the application.
    I need to change the Inofset, so that the framework decides to build
    proper SQL with T_01.PACKNO instead of T_00.PACKNO.
    Thanks a lot
    Volker

Maybe you are looking for

  • I can't send a video from Adobe Send

    I purchased Adobe Send 19.95 yesterday to send a video. But when i sign in it tskes me to Send/Now and will not let me send the video.

  • Itunes version on latest Muontain Lion

    is this new version of OS X Mountain Lion includes the latest version of itunes?? because i had problems with iphone USB tethering in the latest itunes version that i had to go through **** to fix it...

  • OPEN DATASETvery urgent..

    Hi guys, I am published a CSV file in the FTP server using OPEN DATASET..every thing is working fine.. I have the below columns in my CSV file product,location,Quantity.. I want to display in the CSV file with correct alingment,,I mean the Quantity f

  • Reader Extensions

    Can I use reader extensions with LiveCycle Designer ES or do I have to upgrade to ES4?  I am running version 8.2.1.

  • A module reported an error 0x80004005 from call back which was running as part of rule

    Hi  a module reported an error 0x80004005 from call back which was running as part of rule. with event id 4503this error shown since delta monitor is enable!thanks