How can I format the results?

hi,
I do this caculation
double cal = 1.0/3.0;
I just want the result like this "0.3333". How can I format this result?
Thanks,
Bin

java.text.DecimalFormat xForm = new java.text.DecimalFormat("#, ##0.00");:)

Similar Messages

  • How can i display the result of java class in InputText ?

    Hi all,
    How can i get the result of java class to InputText Or OutputText ???
    also can every one in the forum give me road map for dealing with java in oracle adf because i'm beginner in oracle adf
    i saw some samples in oracle adf corner but it's difficult for me.

    User,
    Always mention your JDev version, technologies used and clear usecase description (read through this announcement : https://forums.oracle.com/forums/ann.jspa?annID=56)
    How can i get the result of java class to InputText Or OutputText ???Can you elaborate on your requirement? Do you mean the return value of a method in a class as output text? Or an attribute in your class (bean?) as text field?
    -Arun

  • How can I export the results of a query?

    After executing a select statement I can see the results in a grid but how can I export the results (the data)?
    How can I export the results of a join of two or more tables?

    Right click in the results grid and select the Export menu option

  • How can I format the number in ?shape-text:

    Hi All,
    I am using shapes in the rtf template. I need to format the number which is used in the shape as
    <?shape-text:mytagname?>
    now mytagname has inconsistent values in the xml like 3, 4.5, 3.55. I want to format this to two digits after decimal i.e 0.00 format.
    How can I format the number in <?shape-text: ???
    Regards,
    Amit Deshpande
    Persistent Systems Ltd

    Hi Amit,
    <?shape-text:format-number(4.5,'#,##0.00')?>

  • How can I extract the results of my squence?

    Hello, I'm a beginer of test Stand.
    I've created a main squence with LabView & TestStand, and works well, when it finish TestStand automatically creates my report. I need to extract these results of my sequence in order to create a custom document automatically, creating an action with LabView that works with these results, without any action of an operator.
    How can I extract these results? Thanks you very much.

    Hello,
    you've got several options here, although it seems you might want to go with the first option:
    1) After running your sequence, you'll find all the results needed for creating a report on the variable Locals.ResultList, which is an array of objects (of the Result type). You can pass this array to external code for it to use the information (i.e. create a report)
    2) You can override the report generation callback on your process model (Test Report callback)and create your own LabVIEW-based report generation sequence/routine
    3) You can modify the report generation sequences on the process model to suit your needs (always make backup copies and place your modifications on the /Components/User folder !)
    I would also recommend you to assist National Instruments Training Courses, as these things can be seen in detail and provide you a better understanding of all the options TestStand has.
    Regards,
    Jorge M.Mensaje editado por Jorge M.

  • How can I format the Keynote pages that I print?

    How can I format my keynote pages for printing. I would like to be able to add margins, reduce the size of the slides, and change the size of the presenters noted fonts. Any ideas?

    I think that the answer is lost someone in the manual.....
    Use the inspector where there is a tab for the document format.
    cheers
    rob

  • How can I format the y-axis to display durations?

    How can I cause the y-axis of this chart to reflect the values in Row 6 [Average Pace (Minutes per Mile)] of the corresponding table in duration format rather than number format. In other words, I need the y-axis to be a list of durations appearing like the figures in Row 6. Also, I need it to begin with the longest duration (10:00) and to climb to the shortest duration (5:00) at the top. I'll should mention that I already tried using the Inspector, but the "Duration" formatting option for the y-axis was not selectable while other formats were. I also tried formatting the y-axis this way to "Same as source data," and this didn't cause it to display durations either, though I had expected it to. Thanks in advance!
    Ryan

    Hi Ryan,
    Numbers can display only numeric values on the Y axis, and those values are always arranged from highest to lowest, with highest at the top.
    That said, here's what is possible:
    There is, of course, some manipulation of the data involved in this, as well as replacement of the value axis labels with custom labels in a text box.
    Here's what's happenng with the man behind the curtain:
    While the chart shows the data from row 6, it is actually graphing the data from row 7 (or whatever row you choose to place this data in.
    Row 7 uses a formula ( =-60*24*STRIPDURATION(B6) ) to first strip the Duration from the data in row 6, returning a number representing the fraction of a 24 hour day equivalent to the duration in row 6.
    It multiplies that number by 24*60 to convert it to the number of minutes (and fractions of minutes) in the duration, and changes the sign of the number to - (negative) so that the shorter values will be higher in the chart.
    Selecting row 7 and choosing Line Chart from the Charts Button's  menu produces, with one difference, the chart shown after setting the min and max values on the Y axis to -10 and -5 respectively, and incrementing the number of steps on the Y axis from 4 to 5).
    The difference, of course, is that the Y axis value labels all show negatic=ve numbers, with no m to indicate they show 'minutes.' To correct this, insert a text box and enter the six numbers 5 to 10, with each followed by an m and a return.
    Select the Text box, change the alignment to Right aligned (with the alignment button in the format bar), then drag the box in front of the Value axis labels with the 5s aligned.
    In the Inspector, choose Text inspector, then Text. Use the Space after Paragraph stepper to increase the setting until the 10 in the box aligns with the 10 in the Value Axis labels box. You may have to tweak the height of the chart slightly to achieve this alignment.
    Select the chart, then choose the Chart Inspector, then Axis. Use Choose Axis Options (for the Value Axis) to uncheck Show Value Labels.
    Regards,
    Barry

  • Please Give me reply for this problem(How can I get the result)???

    Hello Friends,
    I have one table CXATCMS.Which has 3 columns and has the following data
    start_no end_no activity_date
    05001000001 05001000002 01-OCT-03
    05001000015 05001000016 01-OCT-03
    05001000017 05001000018 12-JUN-05
    05001000019 05001000020 12-JUL-06
    I have to create a report which lists the the specific range.
    If the next record's start_no is the immediate next number for the prevoius record's
    end_no .....then it has to display all those numbers in a range until it finds a number which is not next immediate number for the previous record's end number.
    like for example....if the user wants to see from 1 to 20 range.
    then the result must be like this........
    start_no end_no
    05001000001 05001000002-------there is no 05001000003 number in the
    05001000015 05001000020 start numbers so it has to stop its range by this number).
    How can i get this result........

    Hi,
    Try this. I am sure you know how to write procedure, I have skipped those obligations, anyway u can sense the absic way of working from here I think. Pls do the uppercase / lowercase adjustment as required by your operating system.
    Declare
    mnd CXATCMS.end_no%type;
    numRec CXATCMS.%rowtype;
    Cursor C is select * from CXATCMS where start_no between 1 and 20 order by start_no;
    begin
    select min(end_no)+1 into mnd from CXATCMS where start_no between 1 and 20;
    open C;
    Loop
    fetch C into numRec;
    DBMS_OUTPUT.putline(numRec);
    exit when mnd<>numrec.start_no;
    if mnd=numrec.start_no then
    mnd:=numRec.end_no + 1;
    end if;
    end loop;
    Exception
    when no_data_found raise application_error;
    end;
    gimme feadback pl,
    Pragati.

  • How can i prevent the result from the user until he does a specific action

    hi again
    1-i have created two textfields for the user to enter two names
    2-i have created a result button when the user hit it a result will appear
    in any case if the user hits the result button the result will appear
    even if he does not enter the two names
    i want to make the result available only if the user enters the two names
    by checking the inputs before the result appear
    if he enteres the names the result appear
    if he does not enter an error message appear?
    how can i do that process?

    lol i think he was talking about formating your messages on the forum.
    look at an example that i just created hope it helps. If not then read up on the GUI chapter of your java book.
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JTextField;
    import java.awt.BorderLayout;
    public class ButtonTest{
        public static void main(String args []){
            JFrame frame = new JFrame();
            JPanel panel = new JPanel();
            final JTextField textA = new JTextField(10);
            final JTextField textB = new JTextField(10);
            JButton button = new JButton("Perform Action");
            class Listener implements ActionListener{
                public void actionPerformed(ActionEvent e){
                    if(!textA.getText().equals("") && !textB.getText().equals("")){
                        System.out.println(textA.getText()+" "+textB.getText());
           ActionListener listener = new Listener();
            button.addActionListener(listener);
            panel.add(textA);
            panel.add(textB);
            panel.add(button);
            frame.getContentPane().add(panel,BorderLayout.SOUTH);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.show();
    }

  • How can I format the double value?

    Hi,
    I am trying to format the double variable as like,
    double var = 1234.56789
    but i want that variable as like var = 1234.56
    How can i do that in java?
    Please help me.
    From
    Parshuram Walunjkar

    Try something like the following, assume the variable 'd' underneath is your double value that you want to format.
    double d = 4.45678;
    NumberFormat nf = NumberFormat.getNumberInstance();
    nf.setMaximumFractionDigits(5);
    nf.setMinimumFractionDigits(5);
    String number = nf.format(d);
    Then use the string "number" for printing out.

  • How can I get the result of web forms by mail ????

    Hi,
    please,
    can someone help me, I spent two days looking on internet to know what I need to install on the web server to get the result of web forms and send it by mail.
    I can't find anything and I don't know what I should look for too ?
    Thanks

    Hi,
    thanks for your answer but I was in fact trying to install Formication, I already opened a thread here :
    http://discussions.apple.com/thread.jspa?threadID=841656&tstart=0
    Can you help me with this one ?
    I installed the last release of FormMail and it start to work now but I'm more insterested in "Formication".
    I'm since two days trying to find documentation for this one and I finally decided to write directly to the author as I really can't find anything to install and use it.
    If you know how to install or have any direction to give me it would be really fine.
    Thanks

  • How can I share the results with limited access to another user

    I am adding another user to be able to see results of forms submitted, I want the user to add some text into the results view but I don't want him to have access the the design view. How can I make that happen?

    Karina Wiggs
    Director of Operations
    Community Lodgings
    Office: (703) 549-4407
    Cell: (301) 412-4407
    Fax: (703) 548-1294
    Facebook <https://www.facebook.com/Community.Lodgings?ref=tn_tnmn> I
    Twitter  <https://twitter.com/CommunityLdgngs>I Instagram
    <http://instagram.com/communitylodgings>
    www.communitylodgings.org
    On Thu, Dec 4, 2014 at 11:43 AM, Vikrantt Singh <[email protected]>

  • How can I format a result to a specified exponent (engineeri​ng format)

    I'm displaying a number of resistance values. To make the results easier to read for the operator I'd like to format the measurement and limits so that the exponent is stepped at 3 intervals (engineering format).
    i.e. by default TestStand will display measurements and limits in scientific notation; 1.0e+005, I'd like to format this to 100.0e+003.
    Can this be done?

    When you say 'displayed', where exactly is the value presented; on screen as part of the thread execution, in the report or some other dialog?
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • How can I format the iphone5 ?

    I'm trying to format the Iphone 5s but it pun Icloud . It ask password but show the password is incorrect. I have trying and trying again but nothing.

    I'm sorry but we are users like  yourself. We don't know your password.
    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    A
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    7. iOS - Unable to update or restore
    Forgotten Restrictions Passcode Help
                iPad,iPod,iPod Touch Recovery Mode
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    You can restore from a backup if you have one from BEFORE you set the restrictions passcode.
    Also, see iTunes- Restoring iOS software.

  • How can I store the results of a report in an Oracle table ?

    In OBIEE 11g, we need the records resulting from the execution of a report, to be stored in an Oracle table.
    Is this possible ?. Thanks.
    F r a n c o . -

    GSR Hi, first of all thanks for your response.
    What I'm wanting to do is not exactly what you're proposing.
    What I want is that an end user can run a report and that the results be automatically stored in an Oracle table. Without manual intervention. Other BI products perform this action, and I need to do it with OBIEE. Thanks.
    F r a n c o . -

Maybe you are looking for

  • IPad2 unusable after upgrade to ios7 because of keyboard lag

    I have a 5-10 second lag after typing any character on my iPad after upgrading to ios7. I've reset it. I've restored it. I've turned off iCloud for data and documents. None of this has solved the problem. Any other ideas? It's impossible to use for a

  • Java 1.5.0.2 deployment fix?

    1. My reading of this 4 yerar old bug: http://forums.java.net/jive/thread.jspa?threadID=315&tstart=0 lead me to belive that word smithing would be done to improve the scarry screen for the sofware publishers that are certified. IT WAS NOT, SAME SCARY

  • Rule to resolve an alert

    I understand that alerts generated using rules cannot be auto-resolved, unlike alerts generated from monitors. However, is it possible to write a rule which resolves alerts? I am writing a management pack where I generate alerts when a particular WMI

  • Printer NOT showing up in "ADD PRINTER"

    Hi, I am installing the software for HP Officejet Pro 8610.  I am at the section where I must create a print queue. I followed the instructions and clicked the "Add Printer" button. It says a dialog will appear listing available printers on my local

  • How flash player takes raw data from webcam to display it ?

    Hello, I would like to know that how flash player takes data from webcam and display it on video display object, does flash player process the raw data comes from webcam meanscompress it or apply any kind of matrix / filter and then display it on vid