How to make a random generator with a max and a minimum

hello
can anybody telle me how to make a random generator for numbers with a maximum and minimum input
thanks in advance

Hi suske,
If you want a random day for a given month, this is how I would do it.
Hope this helps,
-D
Message Edited by Darren on 02-02-2006 01:35 PM
Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman
Attachments:
Days_per_month.jpg ‏32 KB

Similar Messages

  • How to make a customize form with optional parameter and left join

    Hi,
    I am trying to make a report with a left join. I also want ot have optional parameters in it.
    I am using the Create Reports From SQL Query method:
    SQL is :
    select ename, sal
    from scott.emp left join scott.dept
    on scott.emp.deptno = scott.dept.deptno
    where sal >= :lower_sal
    and sal <= :higher_sal;
    However, if I do it this way, I those 2 parameters are not optional.... How can I make them optional?
    If I use the Create Reports From Query Wizard method, I can make the parameters optional, but then I cannot do the left join...
    Thanks,
    Wilson

    hi,
    to catch null values on both sides I use:
    where nvl(sal,0) >= nvl(:lower_sal,nvl(sal,0))
    and nvl(sal,0) <= nvl(:higher_sal,9999999999)
    otherwise there will be no rows in the report where the value of sal is null, even if there are no selection criteria entered.
    regards Michael

  • Random generator (with weight)

    Hey all..
    I want to make a random generator, which will pick a random object from a vector.
    Each object in the vector has been assigned a weighted INT value between 1 -> 100.
    I want the generator to distribute the generated choices: to pick more values that have been set with a higher weight priority.
    For every 10 choices I want 3 of them to have a weight above 70.
    6 of them to have a weight between 40 -> 69
    1 of them to be below 40.
    Any advice or guidance would be greatly appreciated�
    Cheers,
    Gav.

    Anyway, if you want what you said, I would have three
    vectors rather than one. They would contain the items
    with weight 70 and above, the items with weight 40 to
    69, and the items with weight below 40. I would keep
    track of how many requests had been made, and if that
    number % 10 was 0, 1, or 2 I would choose from the
    70-and-up vector, if it was 9 I would choose from the
    below-40 vector, otherwise from the middle-weight
    vector. The resulting sequence violates several common
    randomness rules, I'm sure, but it does satisfy the
    requirements.The forces the order to be that of 70+, 70+, 70+, mid, mid, mid, mid, mid, mid, 40-
    That's not really random?
    What I'd do is this:
    Create a "class" list upon initialization (and after every 10 requests) that is a shuffled list of "classes." (Your classes being 70+, mid, and 40-). This list will contain the 10 requests and be randomly shuffled.
    Then remove an item from that list first per random request and go and randomly choose a number in that "class".
    When the "class" list is empty (after 10 requests) you'll go back to the top and re-create and shuffle it again for the next 10.
    That should work and guarentee a better randomness. The only thing you have left to consider is how to pick a random number of said class. This shouldn't be too hard, I'd recommend storing each class in a separate bin and randomly choose from that bin.

  • My computer, running on Lion, randomly flashes with crazy lights and colors. Doesn't happen often, but when it does it's totally random. What causes this problem and how can I solve it?

    My MacBook Pro, running on Lion, randomly flashes with crazy lights and colors. Doesn't happen often, but when it does it's totally random. It looks like the Northern LIghts!!!
    What causes this problem and how can I solve it?

    Really? Oh I get it. You're the kind of person who goes on tech message boards to make jokes - or friends.
    Well, I'm trying to solve this problem - which is a rather annoying way to spend a Saturday.
    SO either help or don't reply.

  • How to make SAP B1 connection with Windows Sharepoint Service 3.0

    how to make SAP B1 connection with Windows Sharepoint Service 3.0 through asp.net web part code.. I get the security error when i run that web part......
    public bool ConnectToCompany()
                oCompany = new SAPbobsCOM.Company();
                oCompany.Server = "192.168.1.58";
                oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2005;
                oCompany.CompanyDB = "SBODemoUS";
                oCompany.DbUserName = "sa";
                oCompany.DbPassword = "abc";
                //oCompany.UseTrusted = true;
                oCompany.UserName = "manager";
                oCompany.Password = "manager";
                oCompany.language = SAPbobsCOM.BoSuppLangs.ln_English;
                oCompany.LicenseServer = "192.168.1.58:30000";
                int i = oCompany.Connect();
                if (i != 0)
                    return false;
                return true;
    protected override void RenderContents(HtmlTextWriter writer)
                if (conn.ConnectToCompany() == true)
                    writer.Write("Hello" + this.Context.User.Identity.Name);
    Edited by: bikalg on Nov 28, 2010 9:43 AM

    Hi.......
    Welcome to SAP Business One Forum.....
    Unfortunately this is the wrong forum you posted here.
    I would suggest you post it in SDK or System Administration Forum and definitely you get the solution and close this thread from here......
    Regards,
    Rahul

  • How to make a PDF form with expanding tabel or expanding fields, like in Word.

    How to make a PDF form with expanding tabel or expanding fields, like in Word.

    This is currently not possible in Formscentral. It is something we are working on for the future. Please stay tuned.
    Andrew Yarborough

  • Is their any tutorials on how to make a navigation bar with drop downs in Dreamweaver CC now ?

    Is their any tutorials on how to make a navigation bar with drop downs in Dreamweaver CC now that they do not have the spry option?

    bbull2005 wrote:
    Preran, why wouldn't Dreamweaver include it's own menu/navigation bar widget?
    I can't answer on Preran's or Adobe's behalf, but I think you'll find at least part of the answer here: http://wiki.jqueryui.com/w/page/38666403/Menubar
    Adobe decided to discontinue development of Spry in August last year, and Dreamweaver CC made the switch to using jQuery UI widgets and effects. One reason for dropping Spry was that it failed to work correctly in some browsers. Judging from the fact that the jQuery UI menubar is now "on ice", creating a flyout menu that works reliably across all devices is proving more difficult than originally envisaged.
    Because all other widgets in Dreamweaver CC use jQuery UI, it's a reasonable assumption that Adobe hoped the jQuery UI menubar would be ready in time, but it wasn't.

  • How to make the wifi connection with Ipad in china since it requires user's name and password.

    How to make the wifi connection with Ipad in china since it requires user's name and password just like the dialed-up?

    The same way you would connect to a secure wifi network in any other country. Supply the username and password when prompted.

  • HT4642 ios numbers:how to make cell height variable with auto line brake setting ?

    ipad numbers; How to make cell height variable with auto line break setting?

    That's strange. I responded earlier and the whole message got trashed. Hence the test post before retyping the entire thing again.
    Thanks for the reply.
    The video clip is a single screen capture video clip. This is what I've found by playing around with this more.
    The original clip resolution is greater than 640x480. If I use QT Pro to convert the original clip to 640x480 and then use either Flip4Mac or PE7, then the resolution looks good.
    Just trying to figure out if should keep all workflow on the MacOS side. There are several different version of Flip4Mac. $49 gives me 640x480, but if I ever want to make it slightly larger then I would need to go with the $99 or HD version.
    I also tried to export to AVI with QT Pro and the import with Windows MovieMaker but it didn't work really good. I liked the simplicity (since PE7 hogs a lot of resources especially through VMWare).

  • How to make Dynamically Shortened Text With "Show More"

    Hi there! i want to know how to make dynamically shortened text with show more or read more in my website using HTML 5 pages  or ASP.NET ?
    example like these paragraphs 
    Lorem Ipsum är en utfyllnadstext från tryck- och förlagsindustrin. Lorem ipsum har varit standard ända sedan 1500-talet, när en okänd boksättare tog att antal bokstäver och blandade dem för att göra ett provexemplar av en bok. Lorem ipsum har inte bara överlevt fem århundraden, utan även övergången till elektronisk typografi utan större förändringar. Det blev allmänt känt på 1960-talet i samband med lanseringen av Letraset-ark med avsnitt av Lorem Ipsum, och senare med mjukvaror som Aldus PageMaker.
    Det är ett välkänt faktum att läsare distraheras av läsbar text på en sida när man skall studera layouten. Poängen med Lorem Ipsum är att det ger ett normalt ordflöde, till skillnad från "Text här, Text här", och ger intryck av att vara läsbar text. Många publiseringprogram och webbutvecklare använder Lorem Ipsum som test-text, och en sökning efter "Lorem Ipsum" avslöjar många webbsidor under uteckling. Olika versioner har dykt upp under åren, ibland av olyckshändelse, ibland med flit (mer eller mindre humoristiska).
    I motsättning till vad många tror, är inte Lorem Ipsum slumvisa ord. Det har sina rötter i ett stycke klassiskt litteratur på latin från 45 år före år 0, och är alltså över 2000 år gammalt. Richard McClintock, en professor i latin på Hampden-Sydney College i Virginia, översatte ett av de mer ovanliga orden, consectetur, från ett stycke Lorem Ipsum och fann dess ursprung genom att studera användningen av dessa ord i klassisk litteratur. Lorem Ipsum kommer från styckena 1.10.32 och 1.10.33 av "de Finibus Bonorum et Malorum" (Ytterligheterna av ont och gott) av Cicero, skriven 45 före år 0. Boken är en avhandling i teorier om etik, och var väldigt populär under renäsanssen. Den inledande meningen i Lorem Ipsum, "Lorem Ipsum dolor sit amet...", kommer från stycke 1.10.32.
    Den ursprungliga Lorem Ipsum-texten från 1500-talet är återgiven nedan för de intresserade. Styckena 1.10.32 och 1.10.33 från "de Finibus Bonorum et Malorum" av Cicero hittar du också i deras originala form, åtföljda av de engelska översättningarna av H. Rackham från 1914.

    Moved to the main Dreamweaver support forum.
    There are several ways you could approach this. Here's one you might try:
    Give the first paragraph an ID, such as "first", and wrap the paragraphs you want to hide in a <div> with another ID, such as "more". Then add the following block of JavaScript just before the closing </body> tag of the page:
    <script>
    var first = document.getElementById('first'),
         more = document.getElementById('more'),
         trigger = document.createElement('span');
    trigger.id = 'trigger';
    trigger.innerHTML = 'Show less';
    first.appendChild(trigger);
    function toggleDiv() {
      var state = more.className,
           text = trigger.innerHTML;
      more.className = (state == 'open') ? 'closed' : 'open';
      trigger.innerHTML = (text == 'Show more') ? 'Show less' : 'Show more';
    toggleDiv();
    if (trigger.addEventListener) {
        trigger.addEventListener('click', toggleDiv, false);
    } else if (trigger.attachEvent) {
      trigger.attachEvent('onclick', toggleDiv);
    } else {
      trigger.onclick = toggleDiv;
    </script>
    This gets references to the "first" paragraph and the "more" <div>. It also creates a <span> with the ID "trigger" that's appended to the "first" paragraph. The rest of the script defines a function called toggleDiv(), which toggles the "more" <div> open and closed, and changes the text in the "trigger" <span>.
    You also need to create the following style rules for the various elements:
    <style>
    #trigger {
        text-decoration: underline;
        color: blue;
        cursor: pointer;
    #more {
        transition: ease-out .7s;
        overflow: hidden;
    #more p:first-child {
        margin-top: 0;
    #more.closed {
        height: 0;
        -webkit-transform: translateY(-600px);
        transform: translateY(-600px);
    #more.open {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        max-height: 600px;
    #more + p {
        margin-top: 0;
    </style>
    This solution hides the text and creates the "trigger" <span> only if JavaScript is enabled in the browser. It should work in all browsers, including Internet Explorer 8 and earlier.

  • My 3gs wont restore after ios 5 update. I have tried firmware restore and restore from backup, neither works. All I get is "iphone restore failed because backup session failed" Any ideas on how to make a successful restore with this ios 5 update?

    My 3gs wont restore after ios 5 update. I have tried firmware restore and restore from backup, neither works. All I get is "iphone restore failed because backup session failed" Any ideas on how to make a successful restore with this ios 5 update?

    I was having the same problem, I backed up my phone and then updated to iOS 5 and then it kept telling me it could not restore from my backup as it had failed.  After reading a bunch of forums and posts and trying everything, I did manage to get it to work.  I had tried the Time zone, creating a new computer user account, disabling anti-virus, etc.
    It took a combination of things, one of which was disabling the anti-virus completely and copying the contents of the backup folder to my desktop and then deleting everything in the backup folder.  Then I rebooted the PC, entirely disabled the anti-virus, copied the one backup I wanted to restore from the desktop to the backup folder and then trying to restore.  Low and behold the phone said restoring from backup and I am back in business, so when in doubt, trying combining some of the fixes together.

  • How to make my websites look good in iPhone and iPad?

    I have problem to make my website in iWeb look good in webbrowsers in iPhone or iPad... The background (JPEG-file)are dublicating several times!
    But that's not a problem for all my different sides, thou it was build in the same way. Here's the site (try to looka at it in a webbrowswer in any handheld
    divice): http://www.clavius.se

    That's the way Mobile Safari handles backgrounds.
    Why not use a normal background with proper text boxes.
    Anyway, remove your background in iWeb and paste this code in a HTML Snippet :
    <script language="JavaScript" type="text/javascript">
    <!--
    parent.document.body.style.backgroundImage='url(http://www.clavius.se/entresida.jpg)';
    parent.document.body.style.backgroundRepeat='no-repeat';
    parent.document.body.style.backgroundPosition='50% 0%';
    // -->
    </script>
    where the background file (entresida.jpg) is OUTSIDE the Site folder iWeb creates.
    BTW, here's how I make iPad friendly websites with iWeb :
         http://www.wyodor.net/mfi/

  • How to make a silhouette from a portrait (photo) and-

    How do I make a silhouette from a portrait?
    And how do I make the background transparent?

    Do you mean that I send you the portrait?
    Chabæna
    26 apr 2014 kl. 12:31 skrev c.pfaffenbichler <[email protected]>:
    Re: How to make a silhouette from a portrait (photo) and…
    created by c.pfaffenbichler in Photoshop General Discussion - View the full discussion
    How do I make a silhouette from a portrait?
    Ah, but wouldn’t it be ever so much easier to explain if you actually provided (a lores of) the image in question?
    And how do I make the background transparent?
    Preferably with a Layer Mask and then saving in the appropriate file format (psd or png24 for example support transparency).
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/6332417#6332417
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/6332417#6332417
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/6332417#6332417. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Photoshop General Discussion at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How to make a PWM period of 20 ms and a pulse duration 0,8-2,0 ms

    Hi
    How to make a PWM period of 20 ms and a pulse duration 0,8-2,0 ms. deskret pulse length 0.01 ms. for MCB2300. Are there examples of such implementation?
    thanks

    Sergiv,
    I see you as having two options (if you want finer resolution):
    1) Lower the period of the PWM (such that the percentage values would be of finer resolution with regards to the overall PWM period).
    2) Alter the duty cycle of the PWM with an Inline C node.
    From what I understand, LabVIEW simply calls into the PWM driver distributed by Keil (for the MCB2300).  You can call into the PWM driver directly and/or change register values on the chip if you want in order to do whatever you want.  Both would require you to look through/program in C code.
    Kevin S.
    Applications Engineer
    National Instruments

  • How do  create a slide show with both video and photos in elements 12

    how do  create a slide show with both video and photos in elements 12

    Hi Brian
    You can batch process a set of prepared slides from Full Edit (see image) using:
    File >> Process Multiple Files
    In the PMF dialog you can choose filename, date, or description (caption)
    Make sure you choose a separate destination folder to your source folder so as tot to permanently overwrite your originals.
    Click image to view

Maybe you are looking for