How i can check this

Hay Friends..
in my code i am generating a randum number (rng), Now i want to check TWO conditiond. Is my number LESS THAN EQUALLS TOsomenumber (let say 0.3) and GREATER THAN EQUALLS TO somenumber (let say 0.58)...I M NOT SURE AM I DOING IT WRITE OR NOT,,,Please lemme me know to do it
if (rng<=.25)
return 1;
else if (.25<rng<=.65)
return 2;
else if (.65<rng<=.85)
return 3;
else (.85<rng<=1)
return 4;
}

http://forums.devshed.com/java-help-9/can-i-use-like-this-364453.html
// if (number >= lo && number <= hi)Hey! That's my comment! ;-)
kind regards,
Jos (c) (tm)

Similar Messages

  • How I can check this condition

    Hi,
    Through PLSQL code how I can check the following condition.
    I have two field column TEXT1 and TEXT2. Text2 contains total five item
    and text1 contain one item, how I can check Text1 against text2 its
    existing or not.
    :Text1 :='B1'
    :Text2 := 'A1,B1,C1,D1'
    I have tried the following way, but it is not working
    IF :Text1 IN (:TEXT2) THEN
    DISP_MSG('EXIST');
    END IF;
    Regards,
    Jen.

    Or
    sql>
    declare
    text1 varchar2(10) := 'B1';
    text2 varchar2(20) := 'A1,B1,C1,D1,E1';
    begin
    dbms_output.put_line(case when text2 like '%'||text1||'%' then 'Exists'
                               else 'Not exists'
                          end );
    end;
    Exists
    PL/SQL procedure successfully completed.
    jeneesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • I have my iphone 5 but a lost. The box where it came  how i can check  of how many gb its ?

    I have my iphone 5 but a lost. The box where it came  how i can check  of how many gb its ?

    Tap settings
    General
    About
    this provides alist of everything you may need to know about your device

  • I deleted all my playlist by mistake from itunes. tried copying the to on the go on ipod and thought it would copy it on to my itune but it didn't. does any one know how i can do this without redoing all my playlists. thanks

    I deleted all my playlist by mistake from itunes. tried copying them to on the go on ipod and thought it would copy it on to my itune but it didn't. does any one know how i can do this without redoing all my playlists. thanks

    Are the playlists still on the iPod? If so I can probably cook up a script to read them back into iTunes, or you can check the features of the various tools listed at the end of this user tip to see if you can find one that you want to use.
    tt2

  • HT201210 when i want to restre the iphone so i can see an error 3194 how i can solve this problem

    i am trying to restore the iphone through itunes and i can an error which is 3194 so how i can solve this problem

    Check Hosts file of comp. It must point to Apple.
    Would have already seen
    Error 1004, 1013, 1638, 3014, 3194: These errors may be the result of the connection to gs.apple.com being redirected or blocked. Follow these steps to resolve these errors:
    Install the latest version of iTunes.
    Check security software. Ensure that communication to gs.apple.com is allowed. Follow this article for assistance with security software. iTunes for Windows: Troubleshooting security software issues.
    Check the hosts file. The restore will fail if there is an active entry to redirect gs.apple.com. Follow iTunes: Advanced iTunes Store troubleshooting to edit the hosts file or revert to a default hosts file. See section "Blocked by configuration: (Mac OS X/Windows) > Rebuild network information".
    Try to restore from another known-good computer and network.
    If the errors persist on another computer, the device may need service.

  • I want to sync tasks in Outlook with my iPhone. I have tried Toodledo (not good) and Todo. Todo works, but it cuts off most of the text. I only get the beginning of my (long) lists. Any ideas how I can solve this problem?

    I want to sync tasks in Outlook with my iPhone. I have tried Toodledo (not good) and Todo. Todo works, but it cuts off most of the text. I only get the beginning of my (long) lists. Any ideas how I can solve this problem? I starting to regret that I switched to iPhone...

    Usually if you have some kind of hardware failure there is some beeping during POST or most motherboards now have LED indicators to produce and error message based on the type of failure
    So if its bad memory, not place properly, mismatched, processor not inserted properly, mismatched voltage or voltage connector not present etc it beeps or generates the error id.
    Power supplies can be tested for failure. There are some walk throughs for testing just them with a switch, paperclip or a jumper (I'd suggest not doing this if you are not familiar with the dangers of electricity).
    Memory can be tested with memory diagnostics programs like Memtest+
    Processors can overheat if the proper precautions have not been taken usually you will get a POST beep or error code for that.
    If the motherboard has no response then do the basics first:
    Check power connectors and power supply. Once you determine that is not the case move on to other items like graphics cards in all the way or memory.

  • HT1386 I recently bought a new laptop and installed itunes. I was trying to sychronize my ipad and iphone, but it seems that the itunes was unable to recognize the devices. Can you tell me how I can solve this problem?

    I recently bought a new laptop and installed itunes. I was trying to sychronize my ipad and iphone, but it seems that the itunes was unable to recognize the devices. Can you tell me how I can solve this problem?

    how new is the Notebook ?
    Also double check your firewalls and virus protection that they are not blocking any ports also make sure you are plugging in the fastest USB

  • My dvd player will not let me change regions, it just quits when i do, now its stuck on region 1. Any thoughts how i can solve this problem or get round it in some way?

    My dvd player will not let me change regions, it says i have one more chance to change it, then it just quits when i do, now its stuck on region 1. Any thoughts how i can solve this problem or get round it in some way?

    Usually if you have some kind of hardware failure there is some beeping during POST or most motherboards now have LED indicators to produce and error message based on the type of failure
    So if its bad memory, not place properly, mismatched, processor not inserted properly, mismatched voltage or voltage connector not present etc it beeps or generates the error id.
    Power supplies can be tested for failure. There are some walk throughs for testing just them with a switch, paperclip or a jumper (I'd suggest not doing this if you are not familiar with the dangers of electricity).
    Memory can be tested with memory diagnostics programs like Memtest+
    Processors can overheat if the proper precautions have not been taken usually you will get a POST beep or error code for that.
    If the motherboard has no response then do the basics first:
    Check power connectors and power supply. Once you determine that is not the case move on to other items like graphics cards in all the way or memory.

  • When i want to download an app in app store give me an error number and i could not down load.how i can solve this error number?

    When i want to download an app in app store give me an error number and i could not down load.how i can solve this error number?

    Hi Amir.09395340646,
    Welcome to the Support Communities!
    What app are you trying to download? Is it iPhoto for iOS?  What error message are you receiving? The first thing I would suggest is to log out of your iTunes Store account on your iPhone. Then restart the device and log in again. 
    iOS: Changing the signed-in iTunes Store Apple ID account
    http://support.apple.com/kb/HT1311?viewlocale=en_US
    If the above did not resolve your issue, follow the troubleshooting steps in the article below.
    The link includes the complete details and screenshots, but I've highlighted a few points for you:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/TS1368
    - Make sure that your iOS software is up to date by connecting your iOS device to iTunes and clicking on Check for Update in your device's Summary page in iTunes.
    - Check and verify that you are in range of a Wi-Fi router or base station. If you are on a 3G capable device, make sure that cellular data is turned on from Settings > General > Cellular.
    - Check to make sure you have an active internet connection. You can check the User Guide for your device for help with connecting to the internet.
    - Check to make sure other devices (portable computers, for example) are able to connect to the Wi-Fi network and access the internet.
    - Try resetting (turning off and then on again) your Wi-Fi router
    - If the issue still persists see, iOS: Troubleshooting Wi-Fi networks and connections or iOS: Troubleshooting Wi-Fi networks and connections.
    I hope this information helps ....
    - Judy

  • The send button is greyed out when I try to text some but not all people from my iPod touch. Any ideas how I can fix this?

    The send buttin is greyed out when I try to text some but not all people from my iPod Touch. This happens even when they have iPhone 4s. Any ideas why and how I can fix this?

    This issue can be caused by the McAfee SiteAdvisor extension.
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • How i can check my phone is under warrenty???????

    i want to know, how i can check my phone warrenty period and my phone originallty...........

    Hi krishanjaat
    It would help if you carry out *#0000# and post the results, if you want more help with this matter.
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • How I can check if my Imac is Intel Core Duo Extreme

    Hello All,
    How I can check if my Imac is truly Intel Core Duo Extreme from Leopard?
    thank you,
    JD

    JD,
    Welcome to Apple Discussions.
    Apple Menu>About This Mac>More Info...>Hardware>Hardware Overview>Processor Name:
    ;~)

  • Suddenly I have problems moving files to the trash...  get a dialog saying Finder wants to make changes and I must provide the password... Any explanation or ideas how I can get this to stop?

    Suddenly I have problems moving files to the trash...  get a dialog saying Finder wants to make changes and I must provide the password... Any explanation or ideas how I can get this to stop?

    Please take these steps if you're prompted for a password when moving items in your home folder to the Trash.
    1. Triple-click anywhere in the line below on this page to select it:
    ~/.Trash
    2. Right-click or control-click the highlighted line and select
    Services ▹ Show Info
    from the contextual menu.* An Info dialog should open.
    3. The dialog should show "You can read and write" in the Sharing & Permissions section. If that's not what it shows, click the padlock icon in the lower right corner of the window and enter your password when prompted. Use the plus- and minus-sign buttons to give yourself Read & Write access and "everyone" No Access. Delete any other entries in the access list.
    4. In the General section, uncheck the box marked Locked if it's checked.
    5. From the action menu (gear icon) at the bottom of the dialog, select Apply to enclosed items and confirm.
    6. Close the Info window and test.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. Open a TextEdit window and paste into it (command-V). Select the line you just pasted and continue as above.

  • How I can check on the existence of a client ActiveX, so that if there is no download begins?

           
    How
    I can check on
    the existence of a client
    ActiveX, so that
    if there is no download begins?
    example:
    I want tocheck for:
    EditDocumentButton = new ActiveXObject "SharePoint.OpenDocuments.2");
    if (EditDocumentButton) {
    EditDocumentButton.EditDocument (strDocument);
    and ifthere is nowarning andlaunch aURLto startthe
    download
    as is?
    thanks

    Hello,
    This control is defined in the OWSSUPP.dll file, a dynamic-link library (DLL) that is installed in the %ProgramFiles%\Microsoft Office\Office14\ directory on the client computer during Microsoft Office Setup. (Read
    full article on MSDN)
    Based on my understanding this below link can help you to open file if activex is not found.
    http://blog.scosby.com/post/2011/08/22/Remotely-Opening-Office-Files-From-SharePoint-2010.aspx
    Now to detect the activex please look this code:
    http://www.andrewshough.com/sharepoint/multiple-office-version-support-in-sharepoint-services-3-0/
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Keep getting a mail pop up "enter password for account "SBC." ATT says I need to update my Mac mail server program. Anyone know how I can do this?

    I keep getting an annoying pop up for mail "Enter password for account "SBC."  I enter my password but it still pops up. But I can still get my mail when I click on "Get mail."  I called ATT and they said they are aware of the problem with Mac users and that I have to update my Mac Mail server program. Anyone know how I can do this? They want to charge me.

    RE: "Mail, Contacts and Calendars preferences can't connect to the Yahoo account "bellsouth.net".
    I recently changed my ATT U-Verse password…and Mail quit working… it wouldn't send or receive, Safari worked fine.  I tried to send an email and a warning message popped up, "Mail, Contacts and Calendars preferences can't connect to the Yahoo account "bellsouth.net". In smaller type the next sentence read, "Enter the password for user [email protected]". The Password box was highlighted in blue so I just typed in my new password and my email message was immediately sent…but… I still couldn't receive messages AND the above "can't connect" warning message kept popping up on the screen at random.
    Here's the Fix that worked for me. (The problem is that the new password was changed/updated on the keychains "smpt.att.yahoo.com" name-but- the name "pop.att.yahoo.com" didn't update to my new password).
    Go to your Utility windows and select Keychain Access. Under Category select Passwords. Now check your password for your current (newest dated) name, "smpt.att.yahoo.com". Now check the password under, "pop.att.yahoo.com". Mine wasn't the same as my newest password found in my
    "smpt.att.yahoo.com" window so I deleted my old password in the "pop.att.yahoo.com" window and typed in my new password, then selected "Save Changes". MY MAIL NOW WORKED…and no more warning messages cropped up. Problem was fixed.

Maybe you are looking for

  • How do I sync movies from one iPod touch to another

    I'm trying to sync it to my brother's account

  • Running In Background on Server

    I am with a Sender and Receiver application where the Receiver runs on a Server and the Sender runs on the Client. What I would like to do is have the Receiver run on the server and continue to set and run waiting for files to be transmitted. I attem

  • A beeping sound, along with a little white light blinking on/off on my MacBook Pro?

    My MacBook Pro is making a loud beeping sound along with a little white light blinking on and off at the bottom of the keyboard. None of the keys are working so I do not have the ability to shut it down. Any idea how to stop the beeping sound?

  • IDoc Function Module(Invoices)

    Dear All, I want IDoc Function Module(Inbound) for T Codes FB60, FB65, FB70, FB75 for Invoices. Actual Scenario is that i want to transfer data from JAVA system to SAP(Vendor Invoice,Customer Invoice,Credit Memo,Debit Memo) using IDoc. Please give me

  • Connecting a cRIO over internet

    Hi guys, i am working on a data aqq cRIO project which is working with headless datalogger architecture, so far it is deployed at a power plant in their local LAN some miles away from my desktop. We want to send commands (UI.vi) from our LAN over the