Only two figures after the point...

Hi,
I have a float number with 6,7 figures after the point, as I make for have only two figueres after the point??
thanks

Check out the DecimalFormat class
http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html

Similar Messages

  • How to get only two digits after decimal point of an expression

    i am doing simple multiplication between two float numbers.
    both the numbers have two digits after decimal point.
    so naturally the result will have 4 digits after decimal point.
    i want to get only two digits after decimal point.
    help me please...

    If you just want to limit the displayed decimal places, you can do the following...
    import java.text.*;
    public class Formatting {
        public static void main(String[] args) {
            NumberFormat format = NumberFormat.getNumberInstance();
            format.setMaximumFractionDigits(2); //what you seem to want
            format.setMinimumFractionDigits(2); //if you always want at least 2 digits displayed
            System.out.println(format.format(12.345));
            System.out.println(format.format(12.0));

  • Why does fix capitalization work when there is only one space after the period in pages 09?

    why does fix capitalization work when there is only one space after the period in pages 09?  For example:  "Turn on 3rd St. After the traffic light."  There is only one space after the period in "St."  shouldn't it only auto correct after TWO spaces..??  the word After, should be after..

    You may also use a noBreak space after the period at the end of the abbreviation.
    If I remember well, in such case the capitalization will not apply.
    Yvan KOENIG (VALLAURIS, France) mercredi 27 avril 2011 23:34:46

  • How can I move two figures on the stage with remote shared object?

    Hi, I have a problem...
    I need to move two figures on the stage with shared object like the "Tutorial shared Object ball" on the adobe website but with more than one figure. All the client must see the figures moving. The figure are a circle (Cerchio) and a square (Quadrato).
    Help me, please. This is the script:
    package
      import flash.display.Sprite;
      import flash.net.SharedObject;
      import flash.events.NetStatusEvent;
      import flash.events.SyncEvent;
      import flash.net.NetConnection;
      import flash.events.MouseEvent;
      import flash.display.MovieClip
      //import flash.net.ObjectEncoding;
      public class BlocchiLogici extends Sprite
            private var pointer_so:SharedObject;
            private var pointer1_so:SharedObject;
            private var nc:NetConnection;
            private var good:Boolean;
            private var Cerchio:cerchio;
            private var Quadrato:quadrato;
            private var Rettangolo:rettangolo;
            private var Triangolo:triangolo;
            public function BlocchiLogici()
                 //NetConnection.defaultObjectEncoding=flash.net.ObjectEncoding.AMF0;
                 //Connect
                 var rtmpNow:String="rtmp://192.168.1.66/BlocchiLogici";
                 nc=new NetConnection  ;
                 nc.connect (rtmpNow);
                 nc.addEventListener (NetStatusEvent.NET_STATUS,doSO);
                 Cerchio=new cerchio ;
                 addChild (Cerchio);
                 Cerchio.x=50;
                 Cerchio.y=200;
                 Cerchio.addEventListener (MouseEvent.MOUSE_DOWN,beginDrag);
                 Cerchio.addEventListener (MouseEvent.MOUSE_UP,endDrag);
                 Quadrato=new quadrato ;
                 addChild (Quadrato);
                 Quadrato.x=100;
                 Quadrato.y=200;
                 Quadrato.addEventListener (MouseEvent.MOUSE_DOWN,beginDrag);
                 Quadrato.addEventListener (MouseEvent.MOUSE_UP,endDrag);
            private function doSO (e:NetStatusEvent):void
                 good=e.info.code == "NetConnection.Connect.Success";
                 if (good)
                       //Shared object
                       pointer_so=SharedObject.getRemote("point",nc.uri,false);
                       pointer_so.connect (nc);
                       pointer_so.addEventListener (SyncEvent.SYNC,doUpdate);
            private function doUpdate (se:SyncEvent):void
                 for (var cl:uint; cl < se.changeList.length; cl++)
                       trace(se.changeList[cl].code);
                       if (se.changeList[cl].code == "change")
                           if (Cerchio)
                            switch (se.changeList[cl].name)
                                 case "xpos" :
                                       Cerchio.x=pointer_so.data.xpos;
                                       break;
                                 case "ypos" :
                                       Cerchio.y=pointer_so.data.ypos;
                                       break;
                        else if (Quadrato)
                               switch (se.changeList[cl].name)
                                 case "xpos" :
                                       Quadrato.x=pointer_so.data.xpos;
                                       break;
                                 case "ypos" :
                                       Quadrato.y=pointer_so.data.ypos;
                                       break;
            private function beginDrag (e:MouseEvent)
                if (Cerchio)
                     Cerchio.addEventListener (MouseEvent.MOUSE_MOVE,moveMc);
                     Cerchio.startDrag ();
                else if (Quadrato)
                     Quadrato.addEventListener (MouseEvent.MOUSE_MOVE,moveMc);
                     Quadrato.startDrag ();
            private function endDrag (e:MouseEvent)
                if (Cerchio)
                     Cerchio.stopDrag ();
                else if (Quadrato)
                     Quadrato.stopDrag ();
            private function moveMc (e:MouseEvent)
                e.updateAfterEvent ();
                if (Cerchio)
                     pointer_so.setProperty ("xpos",Cerchio.x);
                     pointer_so.setProperty ("ypos",Cerchio.y);
                else if (Quadrato)
                     pointer_so.setProperty ("xpos",Quadrato.x);
                     pointer_so.setProperty ("ypos",Quadrato.y);
    I need of a server side file?
    Thanks.

    I solved it!!
    I duplicated the script....
    It's work perfectly..
    Emiliano.

  • I do not have an option to join tracks in Itunes 11.2.2.3. My options button has only two choices after selecting multiple tracks.

    I do not have an option to join tracks in Itunes 11.2.2.3. My options button has only two choices after selecting multiple tracks - get track names and submit cd track names. How do I join multiple tracks into one?

    Weird, works for me.
    tt2

  • Order in progress for two weeks after the appointm...

    Hello,
    I have ordered BT Broadband on the New Year's Day. The appointment has been set for for two weeks ago - the Kelly Communications technician couldn't set up the line as there was a (unidentified) fault at the Exchange. The day after an Openreach technician showed up to look into the phone line but he also wasn't able to resolve the issue and advised to wait for BT to get in touch when the issue at the Exchange is sorted.
    Over the last 13 days there was no communication from BT regarding my order, I called them twice and the response was the same: we're looking at it, there is a fault at the Exchange, we'll come back with an update (which obviously they didn't).
    I have two concerns that I hope you can comment on:
    - Is there a point in getting in touch with the Exchange directly? Would they be able to look into it in paralell to the BT's efforts?
    - Is that possible the issue at the Exchange is unfixable within any reasonable timeframe (as BT support cannot provide any)? Can I in such case withdraw from the contract with BT and cancel the order without any adverse effects (fines etc.)
    I would appreciate your help.

    Well I thought I'll share an update.
    So getting extremely frustrated I have posted on this forum in high hopes that someone will finally pay attention to my order. It was Wednesday. I also called the BT (not-so-very-)help(-ful) line the very same day just to be told that I need to wait for an update until Monday. On Monday I have been made an appointment with a technician to come on Friday (today), 8am-1pm. I have received a phone call at 2pm (when I've already been in the office for 0.5h) from the technician who was standing at my door.
    To sum it all up, 10 days since when I had already been extremely frustrated I am in the very same position, having no phone line / broadband, my case didn't move forward by an inch. I have already stopped hoping to be treated seriously, with respect etc. I just hope that there is somebody out there in BT who has some leftovers of humanity and compassion who can treat a fellow human being with dignity it deserves.

  • DVD Menu only shows up after the movie?!?!

    Hey guys
    I'm new to IDVD!
    I made a slideshow on Imovie and I hit share it to IDVD, i think pick a menu and hit burn. But when I play the movie in my DVD player, the movie starts right up and then it's not until after the movie is done playing that the DVD Menu comes up.
    What am I doing wrong? How do I fix this!?!?
    Thanks!!!

    You have inadvertently created what is called an "autoplay" slideshow. That type operates exactly as you described.
    You must have dragged you slideshow into the Project icon in Map View. To activate Map View, you click on the left-most of the three icons in the center below the iDVD window. The Project icon is the icon on the top in the Map View. . It states within that icon "Drag content here to automatically play ..."
    So, you need to either drag your project from there down to the lower box, or re-do your project by dragging it into the main project area on the theme's main screen. Just do not move it into the Project icon in Map View.

  • Last night installed Photoshop CC and lightroom then installed Nik collection and the only two out of the lot that seem to be working  is Vivez and Define the others crash with a windows error not able launch ...need help and keep in mine I an not a techi

    Asking for assistance with the above topic

    I got it working with the help of Live Chat tech support. There was some sort of error happening with my graphics driver... something that was not a problem with my previous version of Photoshop was now a problem with the new version. I updated the graphic card driver and software via the manufacturer's website and that helped me get through.
    After updating the driver... at first it felt like I was going backward a bit... I got an expired trial period error again on opening Photoshop the first time, but then I tried again logging out and logging back in to CC as noted previously ( http://helpx.adobe.com/photoshop/kb/cc-applications-crash-immediately- launch.html ) ... and this time that helped fix the trial error and this time that was not followed by crashing (thanks to the graphics driver update).
    I have an ATI Radeon HD 5670 graphics card. The previous version of the driver I was running did not work with Photoshop CC. I have now updated the driver to version 12.104.0.0 and everything is working now.
    Thanks to the Live Chat technician who quickly identified my graphics card as the issue!

  • Macbook air 2013 battery only has 4hour after the icon shows 100%

    As title, when I charged the battery of MBA to 100%, the using time only shows about 4~5 hours.
    I think that should be 9 hours.
    Does my MBA have problem?

    Runaway applications can shorten battery runtime ...

  • My iPhone will not sync completely.  All of my audiobooks are only half downloaded. after the first chapter there is just silence. I've removed and reinstalled them and still the same thing.

    Ive also tried to unistall them and get them directly from iTunes on the phone again and iTunes wants me to pay for them again.  Very upsetting because they were not cheap to begin with like 10 bucks a pop.  I'm going crazy someone please help me

    Same here. Things were working fine before the update.
    I tried to turning on and off the option of IOS devices, it doens't seem to work

  • Double with only 2 number after point

    hi,
    I have a double with a few number after the poin, I need have only 2 number after the point...
    in past I have asked in this forum and receive a good answer...
    NumberFormat formatter = new DecimalFormat("00.00");
    String Average=formatter.format(Media1);
    Now the problem is that Average is a String while I need a double, exists a way to return a double rather than a String...
    thanks in advance...

    hi,
    I have a double with a few number after the poin, I
    need have only 2 number after the point...
    in past I have asked in this forum and receive a good
    answer...
    NumberFormat formatter = new DecimalFormat("00.00");
    String Average=formatter.format(Media1);
    Now the problem is that Average is a String while I
    need a double, exists a way to return a double rather
    than a String...
    thanks in advance...You are confusing a double's value with its representation. The representation (as a string of characters - digits, decimal point, and more digits) is what shows 2 decimal places. That is what DecimalFormat is for.

  • After the last update, on 9/9/11, my firefox only moves when the cursor moves. In other words, in order to progress from page to page I have to keep moving the cursor around. IE does not have the same problem.

    This only started happening after the latest update on 9/9. I am using Windows 7 and Firefox 6.0.2

    Troubleshooting extensions and themes
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
    Check and tell if its working.

  • What is the point of Mission Control?

    I have been a Mac user since 1987, when I got my first SE/30.  I understand a LOT about the Mac OS, and I consider myself and expert. For the life of me, however, I cannot figure out the point of Mission Control (or Exposé or Spaces, for that matter).  Let me explain, and ask if anyone here can clear this up for me.
    As I understand it, the point of Mission Control is to make it easy to access various open applications in an uncluttered workspace/desktop.  If this is the case, then how is this better than, say, Quickeys, which I have used forever? 
    In other words, I typically use the following applications, all open at the same time: Word, Mail, Safari, my office accounting program, iTunes, iChat, and maybe one or two more.  I use Quickeys and have assigned a keyboard shortcut for each - for example, control-E for mail; control-s for Safari; control-W for Word, etc.  It is second nature for me to immediately go to, say, Mail by pressing control-E.  Bringing the app to the front is literally instantaneous.
    I "get it" that, say, Safari can show below Mail, or iTunes can show behind Word, but that (multiple windows partially overlappiong each other) has never bothered me - indeed, I've never even considered it something worthy of worry.
    Thus, my question is, how does Mission Control do this - navigation of open applications - better than Quickeys? Is it simply and only to avoid the "behind the window clutter"?  If so, is the contortion needed to activate Mission Control - removing fingers from keyboard, clicking mouse, navigating mouse to proper desktop, and returning keys to keyboard - worth it? If so, how?  There has to be something else to this Mission Control that I am just missing.
    Could one of you enlighten me?
    Thanks!

    Different people have different ways of working and long ago I discovered the joys of virtual desktops (think mission control). Since System 7 (when the multi-finder stopped being optional) I've been keeping lots of programs open at the same time. The problem with that is the desktop gets very cluttered very fast and getting to the right window of the right program can be challenging. Thankfully between 3rd party tools and Apple's own built in tools we have many ways of dealing with this. Mission Control (virtual desktops) is one of them.
    I have assigned related programs to a single desktop. I have the Programming Desktop where the terminal, BBedit, Racket, and Xcode tools live. I have the Writing Desktop where Pages, Word, and InDesign live. And so on. This cuts down on the clutter of my display since only a couple programs appear on a single virtual desktop. Where Mission Control itself comes into play is when I need to get a resource from one Desktop to another. Say I'm writing an email and need to refer back to a document in Word. I might open the document in Word (which would move me into the Writing Desktop) then I'd shift to Mission Control and drag that Word document's window into my Internet Desktop so it would temporarily reside along with Mail so I could look at both the Word document and my email.
    It isn't the only way to work but I've found it very convenient and indispensible on my notebook. On my work desktop where I have two displays my workflow is a little different since I have lots of REAL window space.

  • Process order confirm_Goods movement_Qty consum. after decimal point not al

    Sir,
    I am doing process order confirmation (COR6), In which go to "Goods Movement "....and consume actual consumption qty...but when i put figure after decimal point, system does not allow...e.g  3.524 KG...System rounded figure which i put in BOM...e.g in bom 3.524 KG, but when i confirm (COR6) the order shows 4 KG....
    Pl. help how to put decimal point...
    Pl. not that in BOM , system allows to put decimal point qty, but in confirmation it does not allow...
    Error message comes :
    Only 0 decimal places are permitted for unit of measure KG
    Message no. RU303
    Rajesh

    Sir,
    We check in CUNI,
    But in BOM, Decimal Point is allowed, but when we confirm the process order decimal place is not allowing...
    If seems that is it any setting in process order ?...Because if any error in CUNI then it does not allow at BOM creation level also....
    Rajesh Mehta

  • "Invalid annotation object" on only two of six computers.

      When searching for the resolution to this error I keep seeing that the PDF is corrupt when people get the error "Invalid annotation object".  But I have a office that has eight workstations and only two are getting the error.  To further complicate issues I downloaded Adobe Reader on one of the machines and it does not get the error either.  All of the machines on the network are using Adobe Acrobat 9.
    The steps we have taken to try to resolve the issue on one of the computers:
    Ran the repair of Adobe from the help.
    Checked for updates.  None were found, it was fully updated.
    Downloaded malware scanners - RKill, Malwarebytes and AdwCleaner.  All found nothing.
    Removed Adobe Pro and tried Adobe Standard.
    After all these steps we still get the error on the machine, but if we go to the computer in the next room it will open it fine with no errors.  We can also open the same document on that computer with Adobe Reader and get no errors.
    One way to bypass the error is to use the arrow keys to navigate the document.  The error only happens when navigating by using the mouse.
    Any and all help would be greatly appreciated.
    Thank you.

    Jenny,
    Look at where the problem computer is getting its time/date from (System Preferences>Date/Time), then compare that to one of the functional computers. It might not be syncing up with the Exchange server time-wise, which will cause problems.
    Good luck

Maybe you are looking for

  • LINEITEMS MISSING IN FBL3N AND FS10N

    Hi all, I am facing the problem in differences in balances for both FS10N & FBL3N for same g/l account.There were some GL accounts showing difference .what i observed was they Migrated in 2000. for some g/l accounts i found balance in fs10n for all 1

  • Go to a specific byte in a field ?

    I know how to go to a specific field on a Form by doing go_item. My question is, can I go to a specific byte in the field? Say I want to go to the place in the field where the value entered in it ends. Is there a way to do this? Thanks

  • How to disable TNEF/winmal.dat files in outgoing emails?

    We are using javamail to send emails with excel files to users. Right now some of the users are geting winmail.dat files instead of the xls files. What is the configuration entry or what do I need to do to disable TNEF messages? I have been looking f

  • Convert smartform as PDF from ABAP Webdynpro

    Hi, I want to convert smartform as pdf from ABAP webdynpro. Flow: SmartForm-->Generating Function Module -->Getting Output Data --> Converting OTF to PDF --> Open/Save PDF file in ABAP webdynpro. What are the sequence of function modules to be used f

  • IPhone calendar is two hours off from mac calendar

    events on iphone are two hours earlier than events on mac calendar even after syncing