Shorting the number of digits after the dot

how do I changing an endless float number (that has alot of digits after the dot) to number with only 2 digits after the dot?

java.text.DecimalFormat.

Similar Messages

  • Limit the number of digits after the decimal point

    hi,
    in webform how to limit the number of digits after the decimal point?
    thanks

    Hi,
    In the Web form Design menu there is a tab for Other Options wherein you would find the setting for number of Decimal places.
    Thanks.
    Madhavi

  • Take 2 digits after the comma of a number of type float

    Hello everybody,
    I want to take 2 digits after the comma of a number of type 'float'.
    For example I want to get 3,57 instead of  3.5714285714285716E+00
    Thanks & Regards

    Hello,
    Are you getting the value
    3.5714285714285716E+00
    from the program into some variable ??
    If thats the case you can declare the variable as
    DATA: var TYPE p DECIMALS 2
    BR,
    Suhas

  • Counting the number of digits in a field

    Hello friends,
    does anyone know of any function module by which we can count the number of digits in a field.
    Say i have a priority field which is numc2, and the the user fills in a 5 digit number in it, i was to calculate this and raise an error if the number of digits is more than 2.
    Thanks in advance.
    charu.

    data : text(10),
          len type i.
    text = <your variable which user is passing>
    len = strlen( text ).
    if len gt 2.
    message 'Length incresed' type 'E'.
    endif.
    regards
    shiba dutta

  • The BADI AND FM involved in mentioning the number of digits for Price

    Hi,
      Please mention me the name of BADI & Functional module(or if report program) involved in validating the number of digits entered for the field price while creating Shopping cart.
    i am eagerly waiting for the answer.
    regards,
    George.

    Hi. I would imagine it is the done via the data dictionary and is checked as a matter of course in every transaction like normal.
    Why do you want to know this? If you need to change number of decimals there are options available.
    Have a look at this thread:
    Re: decimal places for Price
    Regards,
    Dave.

  • How do I get very short movies to play one after the other?

    How do I get very short movies to play one after the other?
    I have some video tutorials to show me how to use software on the Mac.
    When a short 4 min. video is finished - I have to double click the next one.
    There must be a way to have continuous playing of movies back to back...
    I've looked - I am sure it's obvious...
    Help please.  Thanks!

    make them type 'Music Video', and add info on artist to group them, then play them.

  • Increasing the number of digits in batch number range

    Dear Experts,
      The number of digits I have in ''Maintain Number Range  Interval'' screen of tcode omad is ten. Please How can I increase it to accomodate an additional digit so it will be eleven, as the digits of my new external batch number  range is 11?. The NR object is 'Client Batch Number'

    Dear,
    The filed length for CHARG in standard SAP is only 10 Characters. If you need changes then you need to make changes to Domain CHARG, i would not recommend this.
    I would suggest you to create an OSS message and see their feedback,
    Regards,
    Prasobh

  • Limit Data Entry to 2 Digits after the Comma

    Hi
    I've an Form with Matrix and EditText Columns.
    The columns are bound to Userdatasources.
    When changing the type of the userdatasources i'm able to limit the displayed digits to 2 places after the comma. But it's only  a visual representation as it seems because i'm still able to enter more than 2 digits after the comma.
    Any suggestions?
    Thanks

    It's getting even worse. When entering more than 4 digits after the comma Business One crashes hardly (UI Server - Message)
    I'm using an Userform as described before with 2004 PL34
    Will try to reproduce it with an minimalistic sample but maybe somebody has an idea.
    No one?

  • Exchange 2010 SP2 RU2 - Indexing backlog reached a critical limit of 48 hours or the number of items in the retry queue is greater than 10000 for one or more databases

    We have been getting intermittent SCOM alarms for our Exchange 2010 MBX server citing "Indexing backlog reached a critical limit of 48 hours or the number of items in the retry queue is greater than 10000 for one or more databases"
    I see events in EventViewer that SCOM is triggering on, but not whats generating the events or how else to test for them.
        get-eventlog -computername SERVERNAME -logname "Application" -after "03/14/2013" | ?{$_.eventid -eq "5604"} | select MachineName,EventID,EntryType,Message | ft -autosize
    One MS Forum post online says it is a bug in RU4, unclear if it may also be a bug in RU2 (our installed version).
        http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/9dcb3011-9327-4935-9479-62b38a6ddd87
        "I was looking for the same error and found this.. it basically says that this is a bug in RU4 and RU4-v2...and it needs to be removed."
    tests using troubleshooting scripts find no issues with search indexer,
        [PS] C:\Program Files\Microsoft\Exchange Server\V14\scripts>.\Troubleshoot-CI.ps1
        Get-EventLog : No matches found
        At C:\Program Files\Microsoft\Exchange Server\V14\scripts\CITSLibrary.ps1:622 char:40
        + $msftesqlCrashes = get-eventlog <<<< -computername $Server -after $StartTime -logname "Application" -source $msftesqlServiceName | where {$_.eventId
        -eq $msftesqlCrashEventId}
            + CategoryInfo : ObjectNotFound: (:) [Get-EventLog], ArgumentException
            + FullyQualifiedErrorId : GetEventLogNoEntriesFound,Microsoft.PowerShell.Commands.GetEventLogCommand
        Name IsDeadLocked CatalogStatusArray
        SERVERNAME False {DATABASENAME\SERVERNAME, DATABASENAME\S...
        [PS] C:\Program Files\Microsoft\Exchange Server\V14\scripts>
    and tests against searches on each DB themselves show no issues and respond typically within 3 seconds.
        [PS] C:\Program Files\Microsoft\Exchange Server\V14\scripts>Test-ExchangeSearch | ft Server, Database, ServerGuid, ResultFound, SearchTimeInSeconds, Error -AutoSize
        Server Database ServerGuid ResultFound SearchTimeInSeconds Error
        SERVERNAME DATABASENAME b16e3461-257c-40dd-a9ad-99a5f41a927e True 2.937
    I also tried to check the Performance Viewer for the MSExchange Search Indexer and MXExchange Search Indices but am unsure which of the many metrics would indicate this issue.
    We have had no reports of search issues from our users and have been unable to duplicate any impairment in our testing.
    Does anyone else have any suggestions for tests to check or steps to take on this alert? Is it simply a false alarm or a timeout of other sorts during testing? We have 80 DAGs on this server (as well as all our servers, some of which have also reported the
    same alert) and the Test-ExchangeSearch command times out before completely testing all DAGs.

    Hi IAMChrisL,
    Any updates?
    Frank Wang
    TechNet Community Support

  • When i send a imessage it sends it from the number that was on the sim before i transfered my number how do i change it to my number?

    when i send a imessage it sends it from the number that was on the sim before i transfered my number how do i change it to my number?
    ive tried to change it in message settings but the number is grey so im unable to de-select it ?
    any ideas?
    cheers Dan

    Hello joinerdan,
    It sounds like you are unable to change the phone number that Messages is sending messages from because it is grayed out. I recommend the steps outlined in the following article named:
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    Unlink a phone number
    To remove a phone number from an Apple ID, sign out of FaceTime and Messages on your iPhone:
    Settings > Messages > Send & Receive. Tap your Apple ID, then tap Sign Out.
    Settings > FaceTime. Tap your Apple ID, then tap Sign Out.
    This should remove your phone number from other devices using the same Apple ID with FaceTime and Messages. If the phone number is still available on other devices after you sign out of FaceTime and iMessage on the iPhone, you may need to sign out of iMessage and FaceTime on all your devices, then sign in to FaceTime and Messages again on devices you want to use.
    Note: If you no longer have access to the iPhone that is using the number you want to remove, reset your Apple ID password.
    Thank you for using Apple Support Communities.
    All the best,
    Sterling

  • XMLIndex: finding indexed XPaths and the number of rows in the path table

    Hi,
    I am storing non-schema-based binary XMLs in an XMLType column in 11g (11.1.0.6.0) and would like to index the XMLs either partially or fully using XMLIndex. I'm expecting to have a large number (tens of millions) of XML documents and have some concerns about the size of the XMLIndex path table.
    In short, I am worried that the path table might grow unmanageable large. In order to avoid this and to plan for table partitioning, I would like to create a report of all indexed XPaths in an XMLIndex and to find out how many times each path is actualized in the path table. I would do this for a representative XML sample.
    I have been creating XMLIndexes with different exclude/include paths, gathering stats with DBMS_STATS (estimate_percent = 100) and selecting the number of rows in the path table through USER_TABLES.
    If anyone knows a more straightforward way of doing this all advice is very much appreciated.
    Best Regards,
    Rasko Leinonen

    Thanks Marco,
    I managed to get out all indexed paths using the following SQL. It took a while to understand how the join the XDB.X$PT39CW6BJR8W4VVE0G0LLGA0OCR5 and XDB.X$QN39CW6BJR8W4VVE0G0LLGA0OCR5 tables together but got there in the end. This helps to clarify which XPaths are being currently indexed by the XMLIndex.
    begin
    for v_row in (select PATH from XDB.X$PT39CW6BJR8W4VVE0G0LLGA0OCR5)
    loop
    declare
    v_i BINARY_INTEGER := 1;
    v_id raw(8);
    v_len BINARY_INTEGER := 2;
    v_skip BINARY_INTEGER := 1;
    begin
    while v_i < utl_raw.length(v_row.path) and
    v_i + v_len <= utl_raw.length(v_row.path)
    loop
    v_i := v_i + v_skip;
    v_id := utl_raw.substr(v_row.path, v_i, v_len);
    --dbms_output.put_line(v_id);
    for v_row2 in (select LOCALNAME, flags from XDB.X$QN39CW6BJR8W4VVE0G0LLGA0OCR5
    where ID = v_id )
    loop
    if rawtohex(v_row2.flags) = '01'
    then
    dbms_output.put('@');
    end if;
    dbms_output.put(v_row2.localname);
    if v_i + v_len < utl_raw.length(v_row.path)
    then
    dbms_output.put('/');
    end if;
    end loop;
    v_i := v_i + v_len;
    end loop;
    dbms_output.put_line('');
    end;
    end loop;
    end;
    Example output:
    RUN
    RUN/@accession
    RUN/@alias
    RUN/@instrument_model
    RUN/@run_date
    RUN/@run_center
    RUN/@total_data_blocks
    RUN/EXPERIMENT_REF
    RUN/EXPERIMENT_REF/@accession
    RUN/EXPERIMENT_REF/@refname
    RUN/DATA_BLOCK
    RUN/DATA_BLOCK/@name
    RUN/DATA_BLOCK/@total_spots
    RUN/DATA_BLOCK/@total_reads
    RUN/DATA_BLOCK/@number_channels
    RUN/DATA_BLOCK/@format_code
    RUN/DATA_BLOCK/@sector
    RUN/DATA_BLOCK/FILES
    RUN/DATA_BLOCK/FILES/FILE
    RUN/DATA_BLOCK/FILES/FILE/@filename
    RUN/DATA_BLOCK/FILES/FILE/@filetype
    RUN/RUN_ATTRIBUTES
    RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE
    RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE/TAG
    RUN/RUN_ATTRIBUTES/RUN_ATTRIBUTE/VALUE

  • Hello, I have transferred my Acrobat XI Pro from old MAC to the new one. After the transfer can not open any PDF file. Any idea how to solve this?

    Hello, I have transferred my Acrobat XI Pro from old MAC to the new one. After the transfer can not open any PDF file. Any idea how to solve this?

    Hey ilyaz20360341,
    Could you please specify how exactly did you transfer Acrobat from one MAC to other.
    You might need to deactivate the software from your old machine and then activate it on the new one with the same serial number (for Acrobat license) or Adobe credentials (for Acrobat subscription).
    If you have done the same way, then let me know if you are able to open Acrobat itself.
    Do you get any specific error message while opening a PDF?
    Hope to get your response.
    Regards,
    Anubha

  • How can I view the number of tunes in the Library? The number shows for Playlists but not for the total Library.

    How can I view the number of tunes in the Library? The number shows for Playlists but not for the total Library.

    Hello,
    I apologize for submitting this question.  Soon after I posted it I saw a similar question that had my answer..
    Again, my bad for not looking first.
    Ron Morris

  • AD user script to populate the IPPHONE attribute with the last 4 digits of the Telephonenumber attribute

    Good Afternoon Scripting Guys. I have a script that I have been working with pretty much all day today and just cant quite get it to play nice. Our objective is to search AD for specific users (say filtering them out with a username that starts with a "T")
    and User account is "Enabled" then grab the last four digits of their phone number (phone number is set up as follows: (800) 123 456 ) then populate the IPPHONE attribute with the last four digits of their phone number. I have read a ton of online
    blogs with users successfully making this happen but it appears that they are all using Quest (as the commands are all Get-qaduser and Set-qaduser). I need something that runs strictly in native Active Directory Module PowerShell on a Windows Server 2008r2
    Domain Controller.  I am also trying to keep it as simple as possible by using a Get command, then piping a Set command.  I have saved the script into a .ps1 file with the logic as follows:
    $SelUsers = Get-ADUser -filter {(SamAccountName -like "t*")} -Properties ipphone,telephonenumber -searchbase "OU=Test Users,OU=Temporary Org,OU=Test_Domain Users,DC=mydomain,DC=com" | where {($_.enabled -eq $True)}
    foreach ($user in $SelUsers)
     {$user.ipphone = $user.telephonenumber(4,$User.telephonenumber.length-4)
     set-aduser -instance $user}
    What is happening is kind of funny, but aggravating at the same time.  When we run the script, it completes with no errors.  When I pull up the properties of a user in the OU, the IP Phone field is populated with the number 8.  If the User
    account did not have a telephone number, the IP Phone field is populated with a -4.  So, apparently, the script is somehow subtracting the "-4" from the number of all of the Telephone Number field's characters.  Basically 12-4 is 8. 
    If there is no telephone number, then 0-4 is -4.  I have run the Get-ADUser portion of the script independently so I know its getting the correct users.  I also know it is populating the IPPHONE attribute but not with the last 4 digits of the telephone
    number.  Can you guys help out and maybe get this to work correctly?  Also, can you add logic to it to the script to delete any value in the IPPHONE field first, then replace it with the last 4 digits of the telephone.
    Any help would be GREATLY appreciated!!!!!  Thanks Guys...
    Lee

    First thing I would do is modify your filtering. This will remove the unneeded piping to the Where-Object cmdlet and also allow us to only return users who already have something in the telephoneNumber field. It is possible this could return all of your
    users, but if you have service accounts, etc. that do not have a telephoneNumber then they will not be included in your results. It's just a little cleaner.
    $SelUsers = Get-ADUser -filter {(SamAccountName -like 't*' -and Enabled -eq $True -and TelephoneNumber -like '*')}
    I suspect you may have a made a mistake when you entered what your phone numbers looks like. I assume that you forgot a final digit. If this is correct, and you have a space in the phone number between the three digits and the final four then you can use
    the split method to grab the last four digits.
    Foreach ($User in $SelUsers) {
    $Number = $User.telephoneNumber.split(' ')[-1]
    Set-ADUser -Identity $User -Replace @{ipPhone=$Number}
    There's no reason to delete what's in the field first because that's part of what the -Replace parameter will do anyway. This should help get you started!

  • Is it possible to maintain the last AO value after the DAQmx task is done on device DAQ USB-6341 ?

    Hi all,
    I use the device DAQ USB-6341 to generate the desired voltage waveform by the "finite samples" sample mode.
    I notice that the channel resets to zero volts after the DAQmx task is done and the DAQ USB-6341 does not have 
    the property AO.idleOutputBehavior to select "Maintain Existing Value".
    How can I maintain the last AO value after the DAQmx task is done on device DAQ USB-6341 ?
    Thanks.
    Godel

    How many computers do you have in the network?
    What is the IP address and default gateway number on your computer?
    In order to connect to the wireless network, WVC80N should get valid IP address from the access point.
    If the access point has capacity to assign a private IP address to the computers and devices then I think you can use WVC80N.

Maybe you are looking for