Large number display problem

I get an number from my db column (SQL2000), and I need to display a accumulative sum of that column.
I am now facing a problem of the automatic convertion of the sum when it is greater than 9999999.
For example, when the sum is now 12345678 it will automatically convert it into 1.2345678E8.
Please tell me how to solve it. I want the float to display exactly 12345678.
Besides, when I want to display the float as in the format of 12,345,678, please tell me how I can do it.
I list part of my coding for your reference.
float accumTot = 0;
accumTot = accumTot + Float.parseFloat(salamt.getTotAmt());
out.println("<td width='15%'><p>"+accumTot+"</p></td>");
Many Thanks

java.text.NumberFormat will have your solution:
NumberFormat nf = NumberFormat.getInstance();
<%= nf.format(accumTot) %>
Be aware of the rounding errors involved in using floating point:
What Every Computer Scientist Should Know About Floating-Point Arithmetic
Are the numbers whole numbers (ie no decimals)? then you should be using an int/long
Otherwise you should probably be using doubles.

Similar Messages

  • Double number Display problem

    Hi,
    in my programe i have the following calculation
    double a= 12;
    double b= 74;
    tonum = Math.pow(a,b);
    charcount = new Double(count).toString();
    System.out.println("The value of charcount is : "+ charcount);
    when i do this it displays "7.234561410946297E79"
    how do i display the number without this "E" ??
    thanks

    The problem is you cannot get 7*10^79 into a long.
    I slammed out this code:
    <code>
    import java.text.NumberFormat;
    public class Test {
         public static void main( String[] arg ) {
              double d = 7.234561410946297E79;
              System.out.println( NumberFormat.getInstance().format( d ));
    </code>
    and got this output:
    72,345,614,109,462,970,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000
    Probably still not exactly what you are looking for, but take a look at the NumberFormat class and see if you think it will work for you.
    }

  • Smart form number display problem

    Hi Guys,
    I want to display output in following mannner in smartforms.
    eg : 10.4
    minus sign should be display above the decimal place of number.
    Please help!!
    Thank you,
    Bhaskar.

    Hi,
    Thanks for the reply.
    I have tried it and it put the sign infront of the number,however I want sign to be display at the head of the number.
    e.q  :     _
             10.31
    ok man thanks for this reply!!!!
    Thanks & Regards,
    Bhaskar.

  • Large number of problems. HELP!!!!!!

    my computer got a virus a few days ago so i got a new hard drive for it but i didnt back up my itunes library before installing the new hard drive. when i try transfer purchases from my ipod to itunes, nothing happens! i also bought another song after i got the hard drive and when i sync my ipod to the computer, the song isnt added! PLEASE HELP ME!!!!!!
      Windows XP  

    Ok, I will help you if you PROMISE to BACK UP your music from here on out!!! It sooo important because these things happen and relying solely on your iPod is not a good idea, because they break too.
    Read this: http://docs.info.apple.com/article.html?artnum=300173
    If you find it too complicated, go download a third party program that will let you rip your iPod onto your iTunes. Try YamiPod or CopyPod.
    Good Luck and back up now and back up often,
    Rachyl

  • Af:table Scroll bars not displayed in IE11 for large number of rows

    Hi. I'm using JDeveloper 11.1.2.4.0.
    The requirements of our application are to display a table potentially displaying very large numbers of rows (sometimes in excess 3 million). While the user does not need to scroll through this many rows, the QBE facility allows drill-down into specific information in the rowset. We moved up to JDeveloper 11.1.2.4.0 primarily so IE11 could be used instead of IE8 to overcome input latency in ADF forms.
    However, it seems that IE11 does not enable the vertical or horizontal scroll bars for the af:table component when the table contains greater than (approx) 650,000 rows. This is not the case when the Chrome browser is used. Nor was this the case on IE8 previously (using JDev 11.1.2.1.0).
    When the table is filtered using the QBE (to a subset < 650,000 rows), the scroll bars are displayed correctly.
    In the code the af:table component is surrounded by an af:panelCollection component which is itself surrounded by an af:panelStretchLayout component.
    Does anyone have any suggestions as to how this behaviour can be corrected? Is it purely a browser problem, or might there be a programmatic workaround in ADF?
    Thanks for your help.

    Thanks for your response. That's no longer an option for us though...
    Some further investigation into the generated HTML has yielded the following information...
    The missing scroll bars appear to be as a consequence of the setting of a style for the horizontal and vertical scroll bars (referenced as vscroller and hscroller in the HTML).  The height of the scrollbar appears to be computed by multiplying the estimated number of rows in the iterator on which the table is based by 16 to give a scrollbar size proportional to the amount of data in the table, although it is not obvious why that should be done for the horizontal scroller.  If this number is greater than or equal to 10737424 pixels then the scroll bars do not display in IE11.
    It would seem better to be setting this height to a sensible limiting number of pixels for a large number of rows?
    Alternatively, is it possible to find where this calculation is taking place and override its behaviour?
    Thanks.

  • Problems syncing large number of photos while choosing all photos option

    I have 17,800 photos and have experienced problems with trying to sync in iTunes since release day 1.
    If I choose to sync using the all photos option, the iPad will reboot during synch and appears to finish. Ipad will become unresponsive and hang with the apple logo on screen and a hard reset will then be required.
    Then when trying to launch photo app in iPad it displays "updating library" for a minute or 2 and then photo app crashes back to home screen.
    Have tried many options in trying to solve this including restore iPad software, deleting photo cache in iTunes, rebuilding iTunes library, etc.
    Only solution I have found was to break down my 17,800 photos into events and choose to synch events instead of the all photos option and that works, getting all 17,800 photos into iPad. Photos take about 5.8 gb of storage.
    There is definitely a problem with iTunes here in synching large number of photos using the all photos option and I have reported this to AppleCare support via two support calls. There does not appear to be a awareness of this issue in tech supports knowledge base and I am surprised to that there are not a large number of incidents reported as there are a few discussions started here on the issues of photo sync.
    Hopefully this post will help others with the same issue.
    Message was edited by: amfca

    Solved problem of synching iPad with desktop containing large photo library (20,000 photos): In summary, solution was to rename, copy and live iPHoto Library to XHD and reduce size of library on home (desktop) drive.
    In the home directory, rename "iPhoto Library" to "iPhoto Global" (or any other name you want), and copy into an external hard drive via simple drag and drop method.
    Then, go back to the newly renamed iPhoto Global and rename it again, to iPhoto 2010. Now, open iPhoto by holding down the Alt/Option key and opening iPhoto. This provides option to choose library iPhoto 2010. Open the library, and eliminate every photo before 2010. This got us down to a few thousand photos and a much smaller library. Synch this smaller library with the iPad.
    Finally, I suggest downloading a program "iPhoto Library Manager" and using this to organize and access the two libraries you now have (which could be 2, 10 or however many different libraries you want to use.) The iPhoto program doesn't want you to naturally have more than one library, but a download called iPhoto Library Manager allows user to segregate libraries for different purposes (eg. personal, work, 2008, 2009, etc.). Google iPhoto Library Manager, download, and look for links to video tutorials which were very helpful.
    I did not experience any problems w/ iPhoto sequencing so can't address that concern.
    Good luck!

  • Problem with importing a large number of images to Lightroom?

    I'm trying to import a large number of images from disk to Lightroom. If I select more that approximately 1500 images (1250 works fine), I get an error message saying "files do not exist". If I reduce the number of files imported, everything works fine. I can import in groups as long as the number selected at any one time is less that the ~1500 limit.
    Has any one had a similar problems? I'm running LR 2.4 64-bit on Win7 RC 64-bit, Q6600 processor, 8 GB RAM.
    Does not seem like this should be a problem. Its a real hassle to my workflow. I'm working on a series of time-laps movies (here is a link to a sample: http://vimeo.com/6375019).

    Thanks for your reply Sean,
    It is an internal disk drive, SATA II interface.I have no other disk/file problems, this is unique to LR as far as I can tell.
    I'm loading files onto disk from a CF card reader outside of Lightroom, then opening LR and telling it to import from disk. I've never had a problem before with imports. Experimenting with number of files, somewhere between 1250 and 1500 is where the problem occurs.
    Been busy making time-lapse videos of the fire in LA, so I'm away from the computer most of the time.
    thanks,
    Dan Finnerty

  • Large number of attributes reduces data display in Query (PLS HELP).

    Dear Guru's
    We have newly upgraded our system to 7.0, Currently i have a Query based on master data info object(0 equipment) which contain several attributes, due to huge number of attributes, i cannot see data for few  attributes( Ex:-0service descrip), but data exists for these atrrib, when i check in RSA1. my client want to use heavy number of 0Euipment numbers(nearly 10000) in selection screen. thats the reason for data not to be seen.
    WE are under SP 16 also(Note 562162 - Additional selection of attribute reduces query result set is allready exists), and did not found any proper note.
    So guru's can any one please tell me how i can get the data in Query for these attribute by keeping the same selection option for Equipment numbers (10000).
    Dude's give me some good suggestion please...client is waiting from 1 week
    Thanks in adv
    Dev
    Edited by: Srinivas dev on Jun 10, 2008 11:52 AM

    Dear Yogesh,
    Thanks a lot dude...
    I assigned points for your kindly help....
    Got any idea about by initial post   Large number of attributes reduces data display in Query
    Thanks and Regards
    Dev

  • Large number of events (.ics files) caused our problems

    We were plagued with iCal server issues for over a year. iCal server would stop serving to clients, hang, eat CPU time, et al. I had experienced many of the errors in the logs reported her.
    One calendar had over 8000 events in it. We archived older events & put them in a local iCal calendar (since they're static), this lowered the # of events to below 2000. All the iCal server problems instantly and permanently disappeared.
    I had noticed that certain UNIX commands failed in the 8000+ events calendar's directory because of the large number of files (too many arguments error). For example, cat *.ics > All1.txt failed.
    Perhaps Python is similarly limited or the iCal code calls UNIX commands that are barfing because of the number of files.
    If you're having issues and have a calendar with over 2000 or so events, you may want to try breaking up the calendar to see if that fixes the problems.
    Sam

    Hi,
    Firstly check in your system if the standard job SAP_REORG_SPOOL which will delete the old spool files and this job needs to be scheduled in background on daily basis. Regarding the note its asking to check the patch levels of files which you can check at the os level in kernel directory. I am not much aware of AS400 directory structure, but normally kernle path could be /usr/sap/<SID>/SYS/exe/run, /usr/sap/<SID>/DVEBMGS00/exe. In  these path u can find the patch levels of the files.
    Regards,
    Sharath

  • Large number of federated contacts causes problems with client

    Hi,
    We have added a large number of federated contacts to our Lync clients (using Vytru Contact Manager) when we do this the behavior of the client is bad, presence information is not updated for internal or external contacts, messaging is sporadic sometime
    message go through sometimes they don't.
    Is there any limit / recommendation for the number of Federated contacts? we have added around 230 contacts.
    Andrew.

    Solved problem of synching iPad with desktop containing large photo library (20,000 photos): In summary, solution was to rename, copy and live iPHoto Library to XHD and reduce size of library on home (desktop) drive.
    In the home directory, rename "iPhoto Library" to "iPhoto Global" (or any other name you want), and copy into an external hard drive via simple drag and drop method.
    Then, go back to the newly renamed iPhoto Global and rename it again, to iPhoto 2010. Now, open iPhoto by holding down the Alt/Option key and opening iPhoto. This provides option to choose library iPhoto 2010. Open the library, and eliminate every photo before 2010. This got us down to a few thousand photos and a much smaller library. Synch this smaller library with the iPad.
    Finally, I suggest downloading a program "iPhoto Library Manager" and using this to organize and access the two libraries you now have (which could be 2, 10 or however many different libraries you want to use.) The iPhoto program doesn't want you to naturally have more than one library, but a download called iPhoto Library Manager allows user to segregate libraries for different purposes (eg. personal, work, 2008, 2009, etc.). Google iPhoto Library Manager, download, and look for links to video tutorials which were very helpful.
    I did not experience any problems w/ iPhoto sequencing so can't address that concern.
    Good luck!

  • Problem fetch large number of records

    Hi
    I want to fetch large number of record from database.and I use secondary index database for improve performance for example my database has 100000 records and query fetch 10000 number of records from this database .I use secondary database as index and move to secondary database until fetch all of the information that match for my condition.but when I move to this loop performance terrible.
    I know when I use DB_MULTIPLE fetch all of the information and performance improves but
    I read that I can not use this flag when I use secondary database for index.
    please help me and say me the flag or implement that fetch all of the information all to gether and I can manage this data to my language
    thanks alot
    regards
    saeed

    Hi Saeed,
    Could you post here your source code, that is compiled and ready to be executed, so we can take a look at the loop section ?
    You won't be able to do bulk fetch, that is retrieval with DB_MULTIPLE given the fact that the records in the primary are unordered by master (you don't have 40K consecutive records with master='master1'). So the only way to do things in this situation would be to position with a cursor in the secondary, on the first record with the secondary key 'master1' retrieve all the duplicate data (primary keys in the primary db) one by one, and do the corresponding gets in the primary database based on the retrieved keys.
    Though, there may be another option that should be taken into consideration, if you are willing to handle more work in your source code, that is, having a database that acts as a secondary, in which you'll update the records manually, with regard to the modifications performed in the primary db, without ever associating it with the primary database. This "secondary" would have <master> as key, and <std_id>, <name> (and other fields if you want to) as data. Note that for every modification that your perform on the std_info database you'll have to perform the corresponding modification on this database as well. You'll then be able to do the DBC->c_get() calls on this database with the DB_MULTIPLE flag specified.
    I have other question.is there any way that fetch information with number of record?
    for example fetch information that located third record of my database.I guess you're refering to logical record numbers, like the relational database's ROW_ID. Since your databases are organized as BTrees (without the DB_RECNUM flag specified) this is not possible directly.You could perform this if use a cursor and iterate through the records, and stop on the record whose number is the one you want (using an incrementing counter to keep track of the position). If your database could have operated with logical record numbers (BTree with DB_RECNUM, Queue or Recno) this would have been possible directly:
    http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am_conf/logrec.html
    http://www.oracle.com/technology/documentation/berkeley-db/db/ref/am_conf/renumber.html
    Regards,
    Andrei

  • Problem in compilation with very large number of method parameters

    I have java file which I created using WSDL2Java. Since the actual WSDL has a complex type with a large number of elements(around 600) in it, Consequently the resulting java file(from WSDL2Java) has a method that takes 600 parameters of various types. When I try to compile it using javac at command prompt, it says "Too many parameters" and doesn't compile. The same is compiling successfully using JBuilder X . The only way I could compile successfully at command prompt is by reducing the number of parameters to around 250 but unfortunately that it's not a workable solution. Does Sun specify any upper bound on number of parameters that can be passed to a method?

    ... a method that takes 600 parameters ...Not compatible with the spec, see Method Descriptors.
    When I try to compile it using javac at
    command prompt, it says "Too many parameters" and
    doesn't compile.As it should.
    The same is compiling successfully using JBuilder X .If JBuilder produces a class file, that class file may very well be invalid.
    The only way I could compile
    successfully at command prompt is by reducing the
    number of parameters to around 250Which is what the spec says.
    but unfortunately that it's not a workable solution.Pass an array of objects - an array is just one object.
    Does Sun specify
    any upper bound on number of parameters that can be
    passed to a method?Yes.

  • Large number of entries in Queue BW0010EC_PCA_1

    Dear BW experts,
    Our BW system 2004s is extracting data from R3 700. I am a Basis guy and observing large number of entries in SMQ1 in R3 system under Queue BW0010EC_PCA_1. I observe in RSA7 similar number of entries for 0EC_PCA_1.
    The number of entries for this queue in SMQ1 everyday are 50000+. The extraction job in BW is running everyday 5:00AM morning in BW but this only clears data which is lying before 2 days (Example on 10.09.2010, it will extract data of 08.09.2010)
    My questions
    1. Is it ok that such large number of entries lying in queue in SMQ1 and they are extracted once a day by a batch job.Then there is no mean of schedular pushing this entries.
    2. Any idea why extraction job only fetches data of 2 days before.any setting somewhere missing.
    Many thanks in advance for your valuable comments

    Hi,
    The entries lying in RSA7 and SMQ1 are one and the same. In SMQ1, BW0010EC_PCA_1 entry means that this data is lying to be sent across to you BW001 client system. Whereas in RSA7, same data is displayed as 0EC_PCA_1.
    1. Is it ok that such large number of entries lying in queue in SMQ1 and they are extracted once a day by a batch job.Then there is no mean of schedular pushing this entries.
    As I can understand from the data thats lying in your R/3 system in SMQ1, this datasource has delta mode as Direct Delta. SAP recommends that if the number of postings for a particular application is greater than 100000 per day, you should have delta mode as Queued Delta. Since in your system it is in some thousands, therefore BI guys would have kept it as direct delta. So, these entries lying in SMQ1 are not problem at all. As for scheduler from BI, it will pick up these entries every morning to clear the queue for the previous data.
    2. Any idea why extraction job only fetches data of 2 days before.any setting somewhere missing.
    I dont think that it is only fetching the data for 2 days before. The delta concept works in such a manner that once you have pulled the delta load from RSA7, this data would still be lying there under Repeat delta section until the next delta load has finished successfully.
    Since in your system, data is pulled only once a day, therefore even though your today's dataload has pulled yesterday's data, it would still be lying in the system till tomorrow's delta load from RSA7 is successful.
    Hope this was helpful.

  • Possible bug for emails with a large number of recipients

    When receiving emails which was also sent to a large number of people (more than can fit in two lines), it then displays the text 'and 10 more..." or however more there are. Clicking on this text is supposed to then display all the email addresses the email was sent to. However clicking on this is for some reason doing nothing. Is this a bug, or am I the only one having this problem?

    When receiving emails which was also sent to a large number of people (more than can fit in two lines), it then displays the text 'and 10 more..." or however more there are. Clicking on this text is supposed to then display all the email addresses the email was sent to. However clicking on this is for some reason doing nothing. Is this a bug, or am I the only one having this problem?

  • IPhoto 8.1 Garmin Oregon 550t map display problem

    I am trying to view photos captured by a Garmin Oregon 550t in iPhoto. The locations shown on the map are wrong.
    Further investigation of the previously reported problem with iPhoto 8.1 displaying incorrect location information in the map display reveals that the EXIF information captured by the Oregon 550t is unusual in that it captures the longitude as a large number of seconds with 0 minutes. e.g. Longitude: W 105° 0' 810.000116 as reported by EXIF Viewer.
    This unusual format seems to throw off iPhoto.
    Aperture interprets the data correctly reporting Longitude 105º 13' 30.000" W.
    Has anyone else seen this problem?

    I user EXIF viewer http://homepage.mac.com/aozer/EV/
    This photos works fine in iPhoto and with Preview
    Using EXIF viewer the GPS section of a working photo looks like:
    Latitude: N 29° 52' 10.86
    Longitude: E 31° 13' 0.48
    Altitude: 48.00 m
    Time (UTC): 08:36:21
    GPS Status: Measurement In Progress
    Geodetic Survey Data: WGS-84
    The same photo in Preview shows:
    Altitude: 48 m (157.5 ft)
    Altitude Reference: above sea level
    GPS Version: 2.2
    Latitude: 29° 52' 10.86" N
    Longitude: 31° 13' 0.48" E
    Map Datum: WGS-84
    Speed: 0
    Speed Reference: Kilometers per hour
    Status: A
    Time Stamp: 08:36:21.00
    The info you showed is in a different format - my photos work fine with iPhoto
    What version of iPhoto '09 do you have (8.1 is the latest) - some earlier versions had some issues with some types of GPS data - I've not seen any such issues since 8.0.3 (I think)
    LN

Maybe you are looking for

  • Error in Merge (Upsert)

    I was just trying to see how merge worked but got error while running the following script. Could you tell what is missing in the statement? merge into emp_new emp_new using(select EMPNO , ENAME , JOB , MGR , HIREDATE , SAL , COMM , DEPTNO from emp)

  • Deployment for OC4J 11g doesn't work

    Jdeveloper 11g ADF runtime installer for standalone OCJ4 11 doesn't find the following file: - Input File doesn't exist "adfcm.jar". So, when i deploy an application (ear or war) on standalone OC4J, i have the following error: 2007-06-26 11:54:14.328

  • FaceTime will not connect on osx 10.7.5. Does anyone had a fix please?

    FaceTime will not connect on osx 10.7.5. Does anyone had a fix please?

  • Getting an "error 3005" on a distributed app...

    I have searched and tried all of the solutions provided and none of them fix this issue. I have... 1) Recreated the ActiveX object on the front panel, re-compiled, rebuilt the application and no-go, same error 2) Manually registered the DLL using the

  • Image Capture does not recognize scanner with latest update of Mavericks 10.9.4

    Since last week (8-5-14) after updating to OS 10.9.4 (13E28) Image Capture and Printers and Scanner (in System Prefs.) do not recognize my scanner. What the hay! Yes, my scanner is elderly but like me is in perfect working condition. Until now. I've