How I know when divide some number the results is decimal ?

I am new programing in java, I looking for any instruction what tell me where I divide a number and the results is a decimal number like 2.5, 4.9, etc.

> Excuse me, Mr_Evil, but I am a new programer, I try
to use that instruction, but I don't get it. Do you
have some example about that instruction. I
appreciate your efforts for me.
Thanks
This is what Mr_Evil meant:double originalValue = 0.0d;
for(int i = 0; i < 10; i++) {
  originalValue += 0.1d;
// round originalValue to the closest (mathematical) integer
double roundedValue = Math.rint(originalValue);
System.out.println("Is the original value "+originalValue+
          " an integer? "+(originalValue == roundedValue));; )

Similar Messages

  • How to know when the JComboBox popup is about to show or hide?

    Hi all,
    In JDK 1.4, a new addPopupMenuListener() was added to the JComboBox component. I found out I have to use JDK 1.3, but I already wrote a lot of code around this particular capability. I am trying to figure out how to duplicate it in JDK 1.3. I need to know BEFORE and AFTER the popup is displayed. OR, is there a way with JDK 1.3 that as soon as they click the combo box, it fires an event. The thing is, as soon as they click it, I want to change the background color. When they are done selecting, I can use an ActionListener or ItemListener to find out what was selected and change the color again. My killer is trying to figure out how to know when they have selected the box. I tried adding MouseListener, PropertyChangeListener, AncestorListener. None are doing a thing when the JComboBox is first selected.
    Any help would be much appreciated.
    Thank you.

    Hi all,
    In JDK 1.4, a new addPopupMenuListener() was added to the JComboBox component. I found out I have to use JDK 1.3, but I already wrote a lot of code around this particular capability. I am trying to figure out how to duplicate it in JDK 1.3. I need to know BEFORE and AFTER the popup is displayed. OR, is there a way with JDK 1.3 that as soon as they click the combo box, it fires an event. The thing is, as soon as they click it, I want to change the background color. When they are done selecting, I can use an ActionListener or ItemListener to find out what was selected and change the color again. My killer is trying to figure out how to know when they have selected the box. I tried adding MouseListener, PropertyChangeListener, AncestorListener. None are doing a thing when the JComboBox is first selected.
    Any help would be much appreciated.
    Thank you.

  • How to know when the PRICE AFTER DISCOUNT changed and get the value

    Hi,
    Everything I do to see if a value changed in the grid works except for PRICE AFTER DISCOUNT
    which seems to be inaccessible.
    Any idea how to know when exactly this value changed and do actions accordinly ?
    Also I always get 0.00 if I try to get the value of it
    This works to get in the condition of a vlaue changing but I always get 0.00 as the value of the column
    if (pVal.ItemUID == "38" && pVal.ColUID == COL_DISCOUNT.ToString() && pVal.EventType == BoEventTypes.et_VALIDATE && pVal.ItemChanged == true && pVal.ActionSuccess == true)
        try
            SAPbouiCOM.Matrix Matrix = (SAPbouiCOM.Matrix)SBO_Application.Forms.ActiveForm.Items.Item("38").Specific;
            SAPbouiCOM.EditText Editor = (SAPbouiCOM.EditText)Matrix.Columns.Item(COL_DISCOUNT).Cells.Item(pVal.Row).Specific;
            SBO_Application.MessageBox("Discount changed for : " + Editor.Value + "...", 1, "Ok", "", "");
        catch (Exception ex)
            SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");
    And this do not even get into the condition even tought I SEE the column PRICE AFTER DISCOUNT:
    if (pVal.ItemUID == "38" && pVal.ColUID == COL_PRICEAFTERDISCOUNT.ToString() && pVal.EventType == BoEventTypes.et_VALIDATE && pVal.ItemChanged == true && pVal.ActionSuccess == true)
        try
            SAPbouiCOM.Matrix Matrix = (SAPbouiCOM.Matrix)SBO_Application.Forms.ActiveForm.Items.Item("38").Specific;
            SAPbouiCOM.EditText Editor = (SAPbouiCOM.EditText)Matrix.Columns.Item(COL_PRICEAFTERDISCOUNT).Cells.Item(pVal.Row).Specific;
            SBO_Application.MessageBox("Price after discount changed for : " + Editor.Value + "...", 1, "Ok", "", "");
         catch (Exception ex)
             SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");

    just idea, maybe it will works
    Create one udf in row level and set there FS based on changes on price after discount and fill value what is in price after discount. Then the validation make on this field instead of standard SAP field.

  • I purchased the teacher and student lightroom 5. I put in my code and uploaded my evidence to show that I am a teacher. I am guessing it was sent through to someone. How do I know when I can use the software? I don't understand what to do next.

    I purchased the teacher and student lightroom 5. I put in my code and uploaded my evidence to show that I am a teacher. I am guessing it was sent through to someone. How do I know when I can use the software? I don't understand what to do next.

    Please refer below link for more information
    Education FAQ

  • How to know when I'm doing a createInsert?

    how to know when I'm doing a createInsert, this to hide a button when you run this action, I am using a task flow.
    my version of jdeveloper is 12c

    hi,
      So you are using the createInsert as a method call in task flow. That is your form/table will be come new rows and you want to disable some button.
    Your task flow might be as below
          CreateInsert---->Page.
    To do so
    1.) Take properties of your method call and bind the Method property to a method in a bean (bean registered in the task flow with scope view or any higher scope)
    2) Call the create insert operation programmatically in that method.
    3) And in that method after the createinsert ,set a boolean variable in pageFlowScope.
    4)Put this variable in the disable property or visible propery of the button you wabt to hide/diable.
    eg:
        public void doCreateInserOperation(){
            try {
               // Programatically invoke CreateInsert
                DCBindingContainer bindings = (DCBindingContainer)getBindingContainer();
                bindings.getOperationBinding("CreateInsert").execute();
            //Set a variable in page Flow Scope 
            AdfFacesContext.getCurrentInstance().getPageFlowScope().put("disableButton", true)
            } catch (Exception e) {
                e.printStackTrace();
        public BindingContainer getBindingContainer() {
            FacesContext facesContext = getFacesContext();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            ValueExpression valueExp = elFactory.createValueExpression(elContext, "#{bindings}", Object.class);
            return (BindingContainer)valueExp.getValue(elContext);
    you can access this variable in EL expression as #{pageFlowScope.disableButton}. So when your page render it will be in CreateInsert mode and the button will be disabled/hidden.
    I hope this will help you.
    With regards,
    Gijith.

  • HT201441 dear sir . Ihave bought a dell ipad under serial number DMPKQFF4F186 on 25th of dec.2013,it was packed and seems it was .new,after unpacking i found out it is lock. I just need to know when this serial number has registered in icloud. I will grat

    dear sir . I have bought a dell ipad under serial number DMPKQFF4F186 / UDID : 976ba8f5ba16f665bdf3b1b5ec53a172c9d65381. on 25th of dec.2013,it was packed and seems it was new after unpacking i found out it is locked.Ijust neednto know when this serial number has registered in icloud. I will grateful if you could let me this information. locking forward to your kind response.  With Regards

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • How i know when a EXECUTE_QUERY retrieved last record

    Hi...
    How i know when the EXECUTE QUERY retrieved the last record in a block ....?
    Exist a trigger after trigger POST-QUERY?
    Regards
    Hector Gabriel Ulloa Ligarius
    Santiago of Chile
    http://es.groups.yahoo.com/group/desarrolloOracle/

    Kevin, sorry
    But the :system.last_record not change the value during the execution of EXECUTE_QUERY.
    Only useful when the data was retrieved into blocks...not during..
    Other mode?
    Regards
    Hector Gabriel Ulloa Ligarius
    Santiago of Chile
    http://es.groups.yahoo.com/group/desarrolloOracle/

  • How to know when invoke bytecode implements?

    I've got a classfile - it has few invokeinterface bytecodes inside - their count is defined dynamically - when class is running.
    And I've got a program, which runs this class.
    The aim of this program - to gather statistics of invokeinterface calling frequency.
    How to know when invokeinterface bytecode implements?
    (In that moment I plan to update several digits)
    Have You got an advise for me?
    Thanks.

    You must use the debugging interface, or get a code profiler. Do a search on all forums for profiler, you'll get tons of information.

  • HT2173 How to know when a hard drive has failed ?

    How to know when a hard drive has failed ?

    Machine doesn't boot.  You experience strange crashes.  Gets wrong results.  Your harddrive is five or more years old.  Time to consider repacing it.   You do have backup?
    You may want to run these "standard" fixes if the problem persists.
    1) Check the amount of free space on your harddrive.  You should have a several gigs free.
    2) You should run disk utility
         a) verify the disk
         b) update your permissions.
    3) Try a safe boot.
        Shutdown your machine.  Hold down the shift key.  Poweron.  Wait awhile Wait awhile while you harddrive
          is being checked.
        http://support.apple.com/kb/ht1455
    4) You may want to run applejack to clean up your machine.
         http://applejack.sourceforge.net/
    a lot more ways to fix your Mac.
    http://www.thexlab.com/faqs/faqs.html
    verify & repair your startup drive
    To verify & repair you file system on the startup drive, you will need to run disk utility from you installation DVD.
    This article  will tell you how to get to disk utility.  Once in a disk utility, you can go and attempt to recover the disk.
    http://support.apple.com/kb/TS1417
    To repair your startup drive, you will need to run disk utility from your startup DVD.
    Mac OS X 10.4: About the utilities available on the Mac OS X 10.4 Install DVD
    http://support.apple.com/kb/HT2055
    How to run disk utility from your startup DVD.
    Insert your  startup DVD  into your reader.  Power down your machine.  Hold down to the c key.  Power on your machine.  This will bootup your startup DVD.
    This will bring you to a panel asking you for your language.  Pick your language.
    You you come to the Install Mac OS panel.  Do not install.
    Click on Utilities menu item.  This will give you a pulldown list of utilities.
    Click on the disk utility.
    You are now in disk utility.  Pick your disk.  Click on repair it should be on the lower right of the panel.
    Once the repair completes successfully, you should update your permissions.
    Verify a disk
    As an alternative, you can verify that the filesystem on the disk is correct. You will not be able to repair the file system.
    I suggest that you use disk utility to verify that your startup disk is OK. 
    Macintosh-HD -> Applications -> Utilities -> Disk Utility 
    Start up disk utility.  On the left pane view, you will see a list of all your disks.  
    Click on your startup disk.
    Click on the First Aid  Tab.
    Click on verify.  
    Hopefully your disk will verify.  If not, you have to boot from your installation DVD and run Disk Utility from there to attempt to repair your file-system.

  • How to install when I keep getting the following massage  on windows 7 64 bit with or with firewall on and vwith or with virus protection on  here is post  This installation package could net be opened verify that the package exist and that you can access

    how to install when I keep getting the following massage  on windows 7 64 bit with or with firewall on and with or with virus protection on  here is post           " This installation package could net be opened verify that the package exist and that you can access"  same when trying to install quicktime

    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/quicktime/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • I'm a Microsoft Outlook for Mac user, I need information of how to know when e-mail was readed and confirm receipt of e-mails sent. thank you!  regards Mauricio

    I'm a Microsoft Outlook for Mac user, I need information of how to know when e-mail was readed and confirm receipt of e-mails sent. thank you!  regards Mauricio

    Mail and Address book

  • How To Overcome When User Incorrectly Opened The First Inventory Accounting Period As Next Month

    Hi,
    User has opened the wrong first inventory account period. Instead of Aug-14, next period Sep-14 has been opened. There are transactions which need to be posted in Aug-14. How can I rectify this?
    During my search in oracle support, I found below information but the note is not accessible.
    "Internal Note 400900.1 How To Overcome When User Incorrectly Opened The First Inventory Accounting Period As Next Month"
    Regards,
    Ahmed

    Hi ,
    Try This Way...
       If you want to use the uesr exit in two places...
          If area = xyz
           variable1
         else
             variable2.
    same function module you can use in different places...
    If still not clear send me the full details where you want to use then i can send it to you with sample code.
    Thanks..
    Siri N

  • How to know last access date for the schema's

    Dear all,
    could u plz tell me How to know last access date for the schema’s
    Regards,
    Srinivasa rao.P

    Srinivas,
    could u plz tell me How to know last access date for the schema’s
    In Oracle, we don't access schemas but schema objects.And this informationis not kept anywhere persistantly.As Amit also mentioned,if you do need it,you have to enable Auditing.
    Aman....

  • I have upgraded my OX from mountain lion to mavericks . the installer is asking for previous product key. How to know about previous key as the trial version is installed and I have paid for upgrade cost?

    I have upgraded my OX from mountain lion to mavericks . the installer is asking for previous product key. How to know about previous key as the trial version is installed and I have paid for upgrade cost? I dont have the previous product key.

    virenkhare wrote:
    I have upgraded my OX from mountain lion to mavericks . the installer is asking for previous product key. How to know about previous key as the trial version is installed and I have paid for upgrade cost? I dont have the previous product key.
    There are no keys, there is no trial version of OSX (ML or Mavericks) and Mavericks is free
    What have you downloaded, and where did you get it

  • Let us know when you personally receive the ICS OTA update!

    We are all tired of frequently Googling for when Verizon is going to officially release the Ice Cream Sandwich OTA update for our HTC Rezounds. Please feel free to add to the discussion about the update, but most importantly, let us know when you personally receive the ICS OTA update!
    ...so we can stop wasting valuable hours every day just Googling...

    xnavflyer wrote:
    The only reason I bought the Rezound was because the sales person assured me it would be getting the ICS update in April.  LIES, LIES, LIES.  Will be very glad when my contract is up!!!
    That surely can't be the only reason...the HTC Rezound is a BEAST! With or without ICS.

Maybe you are looking for

  • DELETE button not active in Invoice

    Hi All, We have ECC 6.0 and SRM 5.0 . After creating Invoice in SRM front, User keeps the Invoice in HELD or posts it with errors when it goes into "TO BE CORRECTED MANUALLY"  status. Now when the user agains views it in display mode, only CHANGE but

  • Archive Check Criteria for Balanket Purchase Order (PO with Limit Order)

    Hi, My company is going to archive the blanket purchase order. I can use the guidelines SAP provided on what criteria is checked as describe in  http://help.sap.com/saphelp_srm50/helpdata/en/89/a2fb3b699bde74e10000000a114084/frameset.htm I couldn't f

  • Modbus Communication with Cube400

    Hi I have problem to communicate with Cube400. It is using modbus protocol and communication is going through rs485. I must connect it to cRIO 9022 serial port so I used converter IC-485SI (converter manual on page: http://www.esis.com.au/Converters/

  • Bridge cc / Tools menu / photoshop submenu unavailable!

    I Have downloaded the new Photoshop CC 2014 and updated to Bridge CC. I am no longer able to run automated tasks from Bridge in Photoshop because the "photoshop" submenu is no longer available under tools- unistalling en reinstalling brings no avail.

  • Other

    I have a MacBook pro with Mac OS X 10.4.11 I have used firefox for years happily. I was having problems with vimeo and they told me to upgrade firefox. So I did. to the new version of firefox. Firefox let me download it and prompted me to upgrade. Bu