Calculate numbers with digits

Hi all,
Can someone tell me how to calculate numbers with digits.
Let me explain first. The price comes in a xml format like: <price>2,90</price> (comma instead of dot)
var price:String = XML(dgProducts.selectedItem).child("price").toString();
total += Number(price); --> this won't work, if I use 2.90 there is no problem.
So, how can I fix this?
Hans

Try using NumberBase's formatDecimal property to first convert it to "." separated and then using parseNumberString method of it to extract Number.
then do calculation and finally you can convert to comma separated again.
Formatted Object always returns a string .
check this ref link.
http://livedocs.adobe.com/flex/3/langref/mx/formatters/NumberBase.html
mark post accordingly if it helps.
Cheers,
Prad.

Similar Messages

  • Adding numbers with a length of 50 digits.

    Hi folks,
    Could any one please tell me how to add two numbers with 50 digits each.
    What should be the datatype for each column, in a table, to hold the above said precision.
    However, I know that NUMBER couldn't hold this b'coz its precision is upto 32 digits. Am I right?
    What could be the solution?
    Your favour would, indeed, be remembered and acknowledged, as well.
    Cheers, PCZ.

    you could write your own function if you need arbitrary precision
    I tried (not very fast) :
    SCOTT@LSC01> create or replace function bigadd(n1 varchar2,n2 varchar2)
      2      return varchar2
      3  is
      4      result varchar2(4000);
      5      s number:=0;
      6      i1 number;
      7      i2 number;
      8  begin
      9      if (n1 is null or n2 is null) then
    10          return null;
    11      end if;
    12      if (translate(n1||n2,'x0123456789','x') is not null) then
    13          raise_application_error(-20001,'parameter is not an integer');
    14      end if;
    15      for i in 0..greatest(length(n1),length(n2))-1 loop
    16          if (i>=length(n1)) then
    17              i1:=0;
    18          else
    19              i1:=substr(n1,length(n1)-i,1);
    20          end if;
    21          if (i>=length(n2)) then
    22              i2:=0;
    23          else
    24              i2:=substr(n2,length(n2)-i,1);
    25          end if;
    26          s:=i1+i2+s;
    27          result:=mod(s,10)||result;
    28          s:=trunc(s/10);
    29      end loop;
    30      return nullif(s,0)||result;
    31  end;
    32  /
    Function created.
    SCOTT@LSC01> select bigadd('10000000000000000000000000000000000000000000000000','1') from dual;
    BIGADD('10000000000000000000000000000000000000000000000000','1')
    10000000000000000000000000000000000000000000000001Message was edited by:
    Laurent Schneider
    discovered one bug already... fixed
    Message was edited by:
    Laurent Schneider

  • Datagrid doesn't display numbers with more than 19 digits

    With patch 1 the SQL Developer datagrid should display numbers with more than 10 digits. But the limit seems to be 19 digits now. Number20 and Number21 fields are not displayed on my machine.
    WinXP Prof. 2002 SP2
    SQL Developer 1.0.0.14.67
    Personal Oracle Database 10g Release 10.2.0.2.0 - Production with options Partitioning, Spatial and OLAP

    I saw this as well and am working on fixing it.
    -kris

  • Trouble with Digital output on Live Value under Windows

    I have a soundblaster li've value card in my system using the digital output in win98se and all works fine. I just upgraded to WinXP. The windows drivers worked fine once i switched them to digital output. However, i lost the Creative mixer and wanted it back. I then downloaded your Unipack driver for the Li've card for winXP and lost the digital output even when i toggled to digital output control. I then downloaded the li've value from the Gateway site since they OEM'd the card in my system and the digital is working again. However, they do not provide the Creative mixer. Is there anyway I can get the Creative Mixer to work in XP wiith the li've value card? Thanks
    Soundblaster FAQ states:
    Some name brand systems shipped with a special Li've! Value card that was made to work with digital speakers. If you system shipped with a Li've! Value and you have digital speakers you will need to use drivers provided by your system manufacturer. If you use the drivers on the Creative website your card will no longer work with your digital speakers.
    Boston Acoustic Digital Speakers or Prebuilt System With a Digital Li've! Card
    If you have a set of Boston Acoustic digital speakers that came with your system and they are not working with your sound card, make sure you have it connected to the digital out on the card. Also make sure that the digital out is enabled.

    I still always get the value 0.0 returned for minA. I
    know that the data is being correctly stored because I
    have a seperate report frame that displays all values
    for all entries.
    Any ideas where the flaw is?
    Thanks!
    Hey, there. It's unlikely that your users are entering negative numbers which are the only numbers that will be less than zero. You need to initialize your minA to be some quite large number.

  • I have an iphone4 and my husband merge his numbers with mine and i think it was deleted can you tell me how can he get his number back on his phone

    have an iphone4 and my husband merge his numbers with mine and i think it was deleted can you tell me how can he get his number back on his phone

    Do you possibly mean the contacts have been merged?
    If so, where are each of you syncing contacts?  A supported application on the computer? iCloud or another cloud service? An Exchange server?
    WIthout details, it's difficult to offer specific resolutions.

  • X1 and USB Port Replicator with digital video - hangs system

    Hi
    with the X1 to help with docking it everyday at the office I have a USB Port replicator with digital video. I am not using the digital video but the USB ports, head phone and mics plus ethernet.
    When I plug it in it detects it OK, I then installed the software. But after reboot it looks to stall when logging into windows, screen flickers back and forth and locks up the operating system. I unlplug it and reboot and window is working fine.
    Note as I mentioned I am not using the digital output but instead using an external monitor via the display port on the back of the laptop.
    Also its is very slow to boot (Lenovo bios splash screen is there for about a minute)
    I have gone into the bios and turned off all other bootable devices just leaving the laptops hard drive.
    As a work around I have removed the software and I am getting the basic functionality of the port replicator, but not the ethernet.
    I have run the update manager but does not appear to show a need to update the drivers.
    Model X1 (1293-CTO)
    Windows 7

    Hi, I have this same exact problem.
    Video (anything from youtube to downloaded shows, movies) will freeze for 5-7 seconds at a time. The sound continues to play while the video is 'frozen', and the video resumes after that.
    It will happen on its own, with no bumping, but it is more prone to happen if I do something like increase the volume within the media player.
    Any suggestions are much appreciated!

  • I have just transfered 2 dvd movies i purchases with digital copies to my itunes account and now i am trying to put them om my ipad it keeps telling me that these movies are not supported on my ipad.  what can i do?

    I have just transfered 2 dvd movies i purchases with digital copies to my itunes account and now i am trying to put them om my ipad it keeps telling me that these movies are not supported on my ipad.  what can i do?

    Highlight the movie, go to iTunes menu ADVANCED and select create iPad and AppleTV version.

  • Help. I have a Google Hangout in 40mins and my sound seems to have vanished. I went to Sys Prefs and it came up with Digital Out....and the Internal Speakers option is no longer there. How do I reboot, or fix this please?

    help. I have a Google Hangout in 40mins and my sound seems to have vanished. I went to Sys Prefs and it came up with Digital Out....and the Internal Speakers option is no longer there. How do I reboot, or fix this please?

    There are many possible causes for this issue. Take each of the following steps that you haven't already tried. Some may not apply to your model. Back up all data before making any changes.
    1. Start with the steps recommended in this support article. Don't skip any of the steps. It's the starting point for further efforts to solve the problem.
    2. Make sure you have a fully up-to-date installation of OS X.
    3. If you've installed an application called "Memory Clean" or any other third-party software that is supposed to "clean" or "purge" memory automatically, remove it according to the developer's instructions and restart. You should do that even if the software is not causing the problem, because it's useless.
    4. Other third-party software that has been reported to interfere with sound output includes "Boom" and "Samsung Kies." If applicable, uninstall according to the developer's instructions (not by dragging something to the Trash.)
    5. If an AirPlay device is selected for sound output from iTunes (or from other applications via third-party software such as "Airfoil"), deselect it.
    6. Launch the application "Audio MIDI Setup" by entering the first few letters of its name in a Spotlight search and selecting it in the results (it should be at the top.) Select Built-in Output from the list on the left. If the Mute boxes are checked, uncheck them.
    7. If a red light is visible in the audio-out port when sound should be playing, the internal switch is stuck in the position for digital output. You may be able to free it by inserting and removing a mini-stereo jack of the proper size. If not, the machine needs to be serviced. Inserting any kind of tool in the port may cause damage that won't be covered by the warranty.
    If there's no red light, the switch may still be stuck in the headphone position. Try to free it the same way.
    8. Disconnect all wired peripherals except keyboard and mouse, if applicable. If more than one display is connected, disconnect all extra ones. Restart and test.
    9. If you have a MacBook Air, turn off Bluetooth and restart.
    10. Start up in safe mode. Don't log in; just restart as usual when the login screen appears. When you do, make sure the words "Safe Boot" do not appear in the login screen. If they do, the system is still in safe mode and sound won't work.
    11. Reset the NVRAM.
    12. Reset the SMC.
    13. Triple-click anywhere in the line below on this page to select it:
    /Library/Preferences/Audio
    Right-click or control-click the highlighted line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item selected. Move the selected item to the Trash. You may be prompted for your administrator login password. Restart the computer and empty the Trash. Recreate your settings in the Sound preference pane.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    14. Reinstall OS X after backing up all data.
    15. Make a "Genius" appointment at an Apple Store.

  • Loading Invoice XML IDoc with digital signature via XI into R/3

    Hi,
    I received an Invoice XML IDoc with digital signature via Mail (for test purposes) and want to load it via XI into an R/3 systeme.
    My idea is to load the Invoice XML IDoc file via the File Sender Adapter into XI and send it to the R/3 system via the IDoc Inbound adapter.
    Due to the digital signature the file looks like this:
    0‚ S      *†H†÷
        ‚ D0‚ @   1 0       +      0‚ '      *†H†÷
        ‚   ‚   ‚ –0‚ ’0‚ û      etc.
    When I load the file like this with the File Sender Adapter, an error message occurs in the XI Monitoring as the XML Parser cannot read the file due to the digital signatur (as expected).
    Has anybody an idea how I can configure the File Sender Adapter Communication Channel to be able to load only the XML IDoc and ignore the digital Signature strings?
    Thanks in advance for your support.
    Alex

    BTW
    do use the second way you need:
    Security Settings for the Sender Mail Adapter
    http://help.sap.com/saphelp_nw04/helpdata/en/27/c0524257a1b56be10000000a155106/content.htm
    and
    Key Storage Service
    http://help.sap.com/saphelp_webas630/helpdata/DE/e9/a1dd44d2c83c43afb5ec8a4292f3e0/content.htm
    apart from adapter module config
    Regards,
    michal

  • How to replace numbers with text in tax return pdf using Adobe Acrobat X Pro

    How do I replace numbers with text in tax return pdf using Adobe Acrobat X Pro? The tax return was created using CCH software. Thanks for your review.

    Thanks Bill for your quick reply. CCH software is one of the major
    suppliers of tax return software. I found an internal source that helped me
    make the changes from numbers to text i.e. "$123,456" to "See Schedule O".
    I am not sure if I am working in form or final text. Thanks again! Kelly

  • PROBLEM WITH DIGITAL EDITIONS

    Hi,
    I've always encountered this problem with digital editions: Adobe Digital Editions 2.0 has encountered a problem and needs to close.  We are sorry for the inconvenience.
    I'm using Windows XP pro 2002, service pack2  on an old computer AMD Duron 901 Mhz , 384 mb RAM.
    is there a solution ?
    Thanks

    Hi
    I had the same problem, ADE 2 won't work with older AMD computers.  See http://forums.adobe.com/thread/1081859
    Older version that does work at: http://kb2.adobe.com/cps/403/kb403051/attachments/setup.exe
    good luck

  • Adobe PDF iFilter 9 for 64-bit platforms does not index my PDF files with Digital Sign

    Adobe PDF iFilter 9 for 64-bit platforms does not index my PDF files with Digital Sign, why?

    hi  Phillip
    i am not sure what you mean
    I downloaded the ifilter and installed it
    then configured everything as shown in the pdf file
    I tried indexing from scratch exactly as i did successfully in the other computer
    and got some errors in the log file
    i checked the sql server log and the event viewer logs and got :
    Error '0x80004005' occurred during full-text index population for table or indexed view '[Pirsumim_ext_ck].[dbo].[T_PUBLICATIONS]' (table or indexed view ID '2073058421', database ID '14'), full-text key value 0x0000027A. Attempt will be made to reindex it.    
    The component 'PDFFilter.dll' reported error while indexing. Component path 'C:\Program Files\Adobe\Adobe PDF iFilter 9 for 64-bit platforms\bin\PDFFilter.dll'.   
    Informational: Full-text retry pass of Full population completed for table or indexed view '[Pirsumim_ext_ck].[dbo].[T_PUBLICATIONS]' (table or indexed view ID '2073058421', database ID '14'). Number of retry documents processed: 1. Number of documents failed: 1.
    Changing the status to MERGE for full-text catalog "Pirsumim_ext_catalog_ck" (5) in database "Pirsumim_ext_ck" (14). This is an informational message only. No user action is required.
    Informational: Full-text Auto population initialized for table or indexed view '[Pirsumim_ext_ck].[dbo].[T_PUBLICATIONS]' (table or indexed view ID '2073058421', database ID '14'). Population sub-tasks: 1
    the same dll worked fine in another computer...
    how can i see more details what is wrong with this dll  ?
    meidad

  • Monitors with Digital Inputs

    What monitors are available that accept the Toslink input directly? Do the keyboard and on-screen volume controls still work with this arrangement?

    I believe Tannoy make a set of the Elipse range of speaker with digital inputs as well. I have no idea why you would want to do this though. I suspect the gains in quality would be tiny if anything at all. You'd be better to spend more money on something less techy and get something that really sounds great!

  • PDF File with Digital Signature

    I am opening a "PDF File with Digital Signature" using Adobe Acrobat Pro 9.
    File gets opened.
    Then i choose "Preflight: option for "Report PDF Syntax issues".
    The following message is displayed:
    "An error occured while parsing a contents stream. Unable  to analyze the PDF file."
    So whats the solution for this error?

    Hi,
    I have uploaded the file on the specified link:
    http://www.filefactory.com/file/b3g5h37/n/abc.pdf

  • Have a problem in Numbers with entering data directly into a cell when a table reaches a certain size and special characters are used?

    I am creating a list of words with special characters in some of them. I get to a point where I cannot enter data directly into the cell. I have to use the data entry bar at the top in the toolbar. Any solutions available?
    This is the table I am creating...
    From row 25 on, I am only able to enter data into the cell through the toolbar at the top and not directly into the cell itself. I believe that this problem originates from the special characters I have inserted in the previous records because if I do not use special characters, then the spreadsheet acts flawlessly. Have there been issues in Numbers with data entry, the size of a table, and using special characters?

    I would try removing the rows with "special" characters one at a time to see which one is causing the problem

Maybe you are looking for

  • Foreign fonts display in character drop down menu

    When designing a sign for a customer, I take a photo of the existing signs, place on a new document in illustrator cs6, type text then scroll through the text character drop down menu to match the new sign text to the font that is currently on the cu

  • Profit Center on Condition Types for Taxes

    We have a billing document whose pricing procedure included two condition types for billing.  A single material was delivered and billed but the two line items for the taxes were posted to different profit centers.  Where did the difference could hav

  • NFC on nokia N8?

    I update my nokia n8 to symbian anna but theres no NFC,but when i update my nokia C7 theres an NFC,how can i get the NFC on my nokia N8?pls help...

  • Loading Essbase Members for [ Accounts ] Dimension in ODI 11.1.1.3 ?

    Hi My source is Oracle Database tables and Target is Essbase Members of Dimension ('Accounts') i m trying to load Data to Accounts member (Employee Rate) When i perform Reverse Engineering I am only able to view Dimensions not is members. So in my in

  • Get a list of photos that weren't renamed?

    Is it possible to give me a list of photos where I haven't renamed files & if so how is this done?