Simple Calculator Question

I am trying to learn ActionScript 3 and have been going
through books trying to piece together knowledge.
Today I thought I had figured some things out and attempted
to put together a simple addition, subtraction, multiplication and
division calculator using variables and a function but I cannot
seem to get it to work.
I think it is in the way the function is looking at the
variables when it tries to perform the mathNum function.
All the variables are standard variables except the variable
"operator", that is suppose to hold the operator from the form on
the stage.... i.e. *, +, - , or / , I have tried all the different
data types and it just doesn't seem to work
All it is suppose to do is take 2 numbers that are input on
the stage, let the user input a operator type and then push a
calculate button and it displays the answer.
I have attached the code.... Thank you in advance for
looking.
var operNum1:Number = 0;
var operNum2:Number = 0;
var operator:Object = * ;
var sum:Number = 0;
result_btn.addEventListener(MouseEvent.CLICK, onClick);
function onClick(e:MouseEvent):void
operNum1 = Number(oper1_txt.text);
operNum2 = Number(oper2_txt.text);
operator = Object(operator_txt.text);
var sum = mathNum(operNum1,operator, operNum2);
sum_txt.text = sum;
function mathNum(operNum1,operator,operNum2):Number
return (operNum1 + operator + operNum2);
Thanks again for any help.
Mike

I'm new to Actionscript, but experienced with OOP. There are
a number of errors in this code.
1) I don't believe you can assign the * character as an
object, that will just give you a syntax error or undefined
property.
2) in mathNum, you're mixing data types. the "+" operator
adds numbers or concatenates strings. You can't add an operator to
numbers and expect actionscript to know what you mean by that.
3) in mathNum, you haven't defined the types for the
arguments either.
The only way I know of to do what you want is to either check
a string for the chosen operator and use a case statement, or maybe
use an eval statement (if actionscript has it, I don't know). Maybe
a more experienced as person could direct you further.
good luck.
lou

Similar Messages

  • Simple calculations in Universe not working for XI 3.0

    Simple calculations in Universe using key figures are not working in XI 3.0(without any Fix Pack)
    Below is the steps I followed.
    1. Using key figure [Jan] I am trying to round the values by deviding it by 1000.
    <EXPRESSION>@Select([Jan])/1000</EXPRESSION>
    This gives me a null cell value.
    2. I tried addition then
    <EXPRESSION>@Select([Jan])+1000</EXPRESSION> result was all the cell values changed to 1000.
    3. Finally without calculation I tried
    <EXPRESSION>@Select[Jan]</EXPRESSION> this also resulted null value
    But without EXPRESSION tag if I try @Select[Jan] it works fine.
    Am I missing anything in above expressions.
    As of now I am creating variable in report to incorporate the rounding.
    Thanks
    Raghu

    It was my mistake while writing the question. Path I have used is correct one only @Select(Key Figures/.
    If i use the above alone, I am able to se the data. But if I use in betwen <EXPRESSION> then it gives null value.
    Note: Pls dont confuse with flower bracket i used it just to avoid coverting it to a html link and also the backslash it was not showing in preview
    I have followed that pdf and created calculation in universe.
    Edited by: Raghavendra Barekere on Feb 6, 2009 6:42 AM

  • Adding Date/Time Field + X Number of Days - Basic Calculation Question

    I am assuming this is a basic calculation question. New to Adobe LiveCycle Forms.
    I have a simple form containing a table. The table appears as such:
    Text
    Formatted as Date/Time Fields
    Header 3
    Monday
    user wil choose the beginning date (Date/Time) this is DateTimeField1
    Tuesday
    this should calculate DateTimeField1 + 1
    Wednesday
    this should calculate DateTimeField1 + 2
    Thursday
    this should calculate DateTimeField1 + 3
    Friday
    this should calculate DateTimeField1 + 4
    Saturday
    this should calculate DateTimeField1 + 5
    Sunday
    this should calculate DateTimeField1 + 6
    Calculations are performed after the date is chosen for Monday. My mind tells me the simple calculation of DateTimeField1 + 1 is not going to work (and in fact doesn't!) as it needs to change Monday to a number first. I saw on another thread the following:
    Num2Date(Date2Num(Date(DateTimeField1), "DD.MM.YYYY")+7, "DD.MM.YYYY")
    Thought this was going to get me close. No cigars though!
    Any quick help is greatly appreciated. And since I am new to this, details about what needs to be changed would be great too!
    Thanks

    Here an addition for you date field.
    This FormCalc script in the exit:Event will check it the selected date is on a monday.
    If not it will go the days back until the last monday.
    var Selection = Date2Num($.formattedValue, DateFmt(2))
    var WeekDay = Num2Date(Selection, "E")
    var NewDate
    if (WeekDay eq 1) then
              NewDate = Selection - 6
    elseif (WeekDay eq 3) then
              NewDate = Selection - 1
    elseif (WeekDay eq 4) then
              NewDate = Selection - 2
    elseif (WeekDay eq 5) then
              NewDate = Selection - 3
    elseif (WeekDay eq 6) then
              NewDate = Selection - 4
    elseif (WeekDay eq 7) then
              NewDate = Selection - 5
    else
              NewDate = Selection
    endif
    $ = Num2Date(NewDate, "EEE DD.MM.YYYY")
    Hope this helps, too.

  • Creating a simple calculator

    Hi all. I realize this might fall into the dumb question category, but I can't find any tutorials or walkthroughs on it.
    I want to make a simple calculator. The user inputs the variables and that changes the values displayed.
    I have all of the formulas as a table in Excel. I imported the data source (Excel), created a gallery and connected the various input and text boxes to the corresponding column labels in Excel.
    But when you change the values in the text input box the other fields don't change. It's almost like Siena forgot the formulas and is just displaying the text.
    Any help or directions to a tutorial would be greatly appreciated.
    Thanks!

    Hi,
    When importing data from Excel, Siena retains the values not the initial formula. So you will need to create these formula using Siena expressions.
    As a simple example, let's assume you want to add the values of two input visuals and display the result in a lablel, the text expression of that label would be:
    label: InputText1!Text+InputText2!Text
    Olivier

  • Simple calculations not working in acrobat 9

    I have text form fields made in Acrobat 9 from a previously made pdf, where I need a simple calculation, but I cannot get it to work.
    The form is not for submission, only for personal tracking, so I don't even need validation.
    FieldA (a number they enter) x a number I have entered in the calculation = FieldB
    FieldB x FieldC (a number they enter) = FieldD In FieldB I have a simple javascript Calculation in the form field: FieldA * .115, which should automatically calculate answer into FieldB, when tabbed.
    In FieldD I have a Calculation in the form field: FieldB * FieldC, which should automatically calculate answer into FieldD. All fields are set as numbers.
    I have left the Trigger Action as Mouse Up.
    I don't need to validate, as this is personal use, and is not being submitted.
    I have all fields in the correct tab order.
    I have reader enabled the form. When I open the form in Reader, I can enter the numbers, but no calculations are being performed. It reads 0 in FieldB and FieldD. Any assistance would be greatly appreciated.

    Hello Everyone,
    I use the following VBS code, but to tell the truth, I don't know if it works or not. The main idea was to enable commenting from Adobe Reader. But after execution code, saving document and reopening it in Reader, commenting is still 'Not Allowed'. Is showAnnotToolsWhenNoCollab really capable to allow this and there is only error in my code? Or is the functionality different and this way can never be used for what I want?
    There is another issue that application is not closed on Exit, but is still shown.
    scriptPath = "C:\Acrobat\"
    Set gApp = CreateObject("AcroExch.App")  
    Set pdDoc = CreateObject("AcroExch.PDDoc")
    sampleFilePath = scriptPath & "AR_test_orig.pdf"
    pdDoc.Open sampleFilePath
    pdDoc.OpenAVDoc "myFile"
    gApp.Show
    Set formApp = CreateObject("AFormAut.App")
    'formApp.Fields.ExecuteThisJavascript "app.alert(""hello"");"
    formApp.Fields.ExecuteThisJavascript "Collab.showAnnotToolsWhenNoCollab = true;"
    Set formApp = Nothing
    pdDoc.Save 1, scriptPath & "AR_test.pdf"
    'pdDoc.Close
    gApp.CloseAllDocs
    gApp.Exit
    Set pdDoc = Nothing
    Set gApp = Nothing
    Thanks for any ideas.
    Jan
    PS: I use Acrobat 9.0 Pro

  • Simple/silly question: how do I set/change default font/color for outgoing mail messages?

    Simple/silly question: how do I set/change default font/color for outgoing mail messages?

    Just a suggestion..........
    Download Thunderbird.  Easier to use when it comes to what you want to do w/your emails. 

  • Need help with starting a simple calculator

    I have this simple calculator I just started on, and I'm having just a few problems. First of all, I don't know how to append text to a textfield. Maybe I would have to create a string buffere or something. Then, when the user clicks one of the buttons, the compiler goes crazy, and nothing is displayed.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Calculator extends JFrame implements ActionListener
         JButton[] btnNums;
         JButton btnBack;
         JButton btnClear;
         JButton btnCalculate;
         String[] strNames;
         JTextField txtDisplay;
         public Calculator()
              Container content = getContentPane();
              setSize(210,250);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              /*  construct a JPanel and the textfield that
               *  will show the inputed values and outputed
               *  results
              JPanel jpDisplay = new JPanel();
              jpDisplay.setLayout(new BorderLayout());
              txtDisplay = new JTextField(15);
              txtDisplay.setHorizontalAlignment(JTextField.RIGHT);
              jpDisplay.add(txtDisplay);
              /*  contstruct a JPanel that will contain a back
               *  button and a clear button.
              JPanel jpRow2 = new JPanel();
              btnBack = new JButton("Backspace");
              btnClear = new JButton("Clear");
              btnClear.addActionListener(this);
              jpRow2.add(btnBack);
              jpRow2.add(btnClear);
              /*  construct a string array with all the names of the
               *  buttons, then in a for loop create the new buttons
               *  and add their name and an actionListener to them.
              String[] strNames = {"7","8", "9","/", "4", "5", "6","*", "1", "2", "3","+", "0", "+/-", ".", "-"};
              btnNums = new JButton[16];
              JPanel jpButtons = new JPanel();
              jpButtons.setLayout(new GridLayout(4,4));
                for (int i = 0; i < 16; i++)
                     btnNums[i] = new JButton(strNames);
                   btnNums[i].addActionListener(this);
                   jpButtons.add(btnNums[i]);
              /* construct the final JPanel and add a
              * calculate button to it.
              JPanel jpLastRow = new JPanel();
              btnCalculate = new JButton("Calculate");
              btnCalculate.addActionListener(this);
              jpLastRow.add(btnCalculate);
              /* set the contentPane and create the layout
              * add the panels to the container
              setContentPane(content);
              setLayout(new FlowLayout());
              setResizable(false);
              content.add(jpDisplay, BorderLayout.NORTH);
              content.add(jpRow2);
              content.add(jpButtons);
              content.add(jpLastRow);
              setTitle("Mini Calculator");
              setVisible(true);
         public void actionPerformed(ActionEvent ae)
              for (int i =0; i < 16; i++)
                   if (ae.getSource() == btnNums[i])
                        txtDisplay.setText(strNames[i]);
         public static void main(String[] args)
              Calculator calc = new Calculator();

    First of all, I don't
    know how to append text to a textfield.
    textField.setText( textField.getText() + TEXT_YOU_WANT_TO_APPEND );
    Then,
    when the user clicks one of the buttons, the compiler
    goes crazy, and nothing is displayed.No, the compiler doesn't go crazy, the compiler has done it's job by then. However, you do get a NullPointerException, and the stacktrace tells you that the problem is on the following line:
    txtDisplay.setText(strNames);
    It turns out that strNames is null. I leave it to you to find out why. ;-)

  • Simple Calculations in BPS Web

    Hi,
    I am using the BPS web layouts (ALV Grid not the Excel Web Component). I would like to add a couple of very simple calculations (difference of columns/percentages etc). Is it possible to do this without using the Excel OWC ?
    Thanks
    Shailesh

    Hi
    the simplier way to achieve yor result is to use FOx formula to calculate your results at runtime .
    You should create a formula function and add FOX code to it .
    Check this link for examples
    http://help.sap.com/saphelp_nw04/helpdata/en/d3/8057f830a911d4b2be0050dadfb23f/frameset.htm
    Hope it helps
    Andr

  • 4 Simple Flash Questions that Are Stumping Me!

    What is the Frame Rate for Web Animations
    Q1. I am making an animation which will be played on the web. What is the default frame rate (fps) of Flash CS5? And what is the frame rate of for web?
    Q2. My animation needs to be 30 seconds long. So at 15 fps that would mean I need to use 600 frames in Flash?
    How Do I Mask everything so all I see is the Content on the Stage?
    I have a wide image that extends past my movies stage size so when I preview my movie the image is visible. How do I mask out anything that extends past my movies window size? I believe I can create a layer named "mask" and place it above all other layers, but I forget how to make the mask. Any help is appreciated.
    How to Fade a Graphic
    I have a graphic element (some type) and I want it to fade from 0% to 100%. In older versions of Flash I could just select the symbol and then set it's alpha value to 0%, move a few keyframes and then set the alpha to 100%. Voila! but now it doesn't seem to work that way. How can I do this in CS5?

    Ned, it says 24 fps which means there is 24 frames per second so each 24 frames is 1 second.
    Date: Fri, 4 Nov 2011 05:35:16 -0600
    From: [email protected]
    To: [email protected]
    Subject: 4 Simple Flash Questions that Are Stumping Me!
        Re: 4 Simple Flash Questions that Are Stumping Me!
        created by Ned Murphy in Flash Pro - General - View the full discussion
    1 You can create your character as a movieclip and copy/paste that movieclip from one file to another. 2. One way to create a movieclip is to copy all the frame of the animation's timeline (select them all, right click the selection, choose Copy Frames), then create a new movieclip symbol (Insert -> New Symbol...etc) right click on its only keyframe and chhose Paste Frames.  THat will put all the layers and frames you copied into the movieclip The only way to come close to being certain about the timing of you animation is to use code to keep track of the time, something like getTimer()..  The frame rate that a file plays at is not a reliable means of dictating the time it takes due to a variety of factors which include the amount of content you are trying to process and performance limits of the user's machine.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4007420#4007420
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4007420#4007420. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Flash Pro - General by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Simple performance question

    Simple performance question. the simplest way possible, assume
    I have a int[][][][][] matrix, and a boolean add. The array is several dimensions long.
    When add is true, I must add a constant value to each element in the array.
    When add is false, I must subtract a constant value to each element in the array.
    Assume this is very hot code, i.e. it is called very often. How expensive is the condition checking? I present the two scenarios.
    private void process(){
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
             if (add)
             matrix[i][ii][iii][...]  += constant;
             else
             matrix[i][ii][iii][...]  -= constant;
    private void process(){
      if (add)
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
             matrix[i][ii][iii][...]  += constant;
    else
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
           matrix[i][ii][iii][...]  -= constant;
    }Is the second scenario worth a significant performance boost? Without understanding how the compilers generates executable code, it seems that in the first case, n^d conditions are checked, whereas in the second, only 1. It is however, less elegant, but I am willing to do it for a significant improvement.

    erjoalgo wrote:
    I guess my real question is, will the compiler optimize the condition check out when it realizes the boolean value will not change through these iterations, and if it does not, is it worth doing that micro optimization?Almost certainly not; the main reason being that
    matrix[i][ii][iii][...]  +/-= constantis liable to take many times longer than the condition check, and you can't avoid it. That said, Mel's suggestion is probably the best.
    but I will follow amickr advice and not worry about it.Good idea. Saves you getting flamed with all the quotes about premature optimization.
    Winston

  • Has anyone seen a simple calculator pod that will work in Acrobat Connect Pro?

    I need a simple calculator to total up responses from participants in web meetings. Does anyone know of one that can work as a pod where everyone will see the numbers that are pushed and the calculation display?

    If this one works with you: http://connect.wezupport.se/p39142940/
    I've attatched so you can download it from here - cheers

  • Simple calculator to use log, successor, predecessor ?

    Hello. I have this simple calculator program, and I am having trouble with the log, successor (if 8 entered returns 9), predecessor (if 8 entered returns 7). The log gets this error:
    Calculator.java:113: log(double) in java.lang.Math cannot be applied to (int,int)
                   result = (int)Math.log(result, stringToInteger(ioField.getText()));
    I did the same thing with power, and it seems to work so I'm a little confused about that.
    If anyone can help me out it would be greatly appreciated, and thanks in advance!
    Here's the code (commented out code is what I need help with):
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Calculator extends JFrame implements ActionListener
         public static final int WIDTH = 400;
         public static final int HEIGHT = 200;
         public static final int NUMBER_OF_DIGITS = 30;
         private JTextField ioField;
         private int result = 0;
         public Calculator()
              setSize(WIDTH, HEIGHT);
              setTitle("GUI Calculator");
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              setLayout(new BorderLayout());
              JPanel textPanel = new JPanel();
              textPanel.setLayout(new FlowLayout());
              ioField = new JTextField("Enter numbers here.", NUMBER_OF_DIGITS);
              ioField.setBackground(Color.WHITE);
              textPanel.add(ioField);
              add(textPanel, BorderLayout.NORTH);
              JPanel buttonPanel = new JPanel();
              buttonPanel.setBackground(Color.BLUE);
              buttonPanel.setLayout(new GridLayout(5, 2));
              JButton addButton = new JButton("+");
              addButton.addActionListener(this);
              buttonPanel.add(addButton);
              JButton subButton = new JButton("-");
              subButton.addActionListener(this);
              buttonPanel.add(subButton);
              JButton multButton = new JButton("*");
              multButton.addActionListener(this);
              buttonPanel.add(multButton);
              JButton divButton = new JButton("/");
              divButton.addActionListener(this);
              buttonPanel.add(divButton);
              JButton expButton = new JButton("^");
              expButton.addActionListener(this);
              buttonPanel.add(expButton);
              JButton logButton = new JButton("v");
              logButton.addActionListener(this);
              buttonPanel.add(logButton);
              JButton sucButton = new JButton("s");
              sucButton.addActionListener(this);
              buttonPanel.add(sucButton);
              JButton preButton = new JButton("p");
              preButton.addActionListener(this);
              buttonPanel.add(preButton);
              JButton clearButton = new JButton("C");
              clearButton.addActionListener(this);
              buttonPanel.add(clearButton);
              add(buttonPanel, BorderLayout.CENTER);
         public void actionPerformed(ActionEvent e)
              try
                   assumingCorrectNumberFormats(e);
              catch(NumberFormatException e2)
                   ioField.setText("Error - Reenter number.");
         public void assumingCorrectNumberFormats(ActionEvent e)
              String actionCommand = e.getActionCommand();
              if(actionCommand.equals("+"))
                   result = result + stringToInteger(ioField.getText());
                   ioField.setText(Integer.toString(result));
              else if(actionCommand.equals("-"))
                   result = result - stringToInteger(ioField.getText());
                   ioField.setText(Integer.toString(result));
              else if(actionCommand.equals("*"))
                   result = result * stringToInteger(ioField.getText());
                   ioField.setText(Integer.toString(result));
              else if(actionCommand.equals("/"))
                   result = result / stringToInteger(ioField.getText());
                   ioField.setText(Integer.toString(result));
              else if(actionCommand.equals("^"))
                   result = (int)Math.pow(result, stringToInteger(ioField.getText()));
                   ioField.setText(Integer.toString(result));
    /*          else if(actionCommand.equals("v"))
                   result = (int)Math.log(result, stringToInteger(ioField.getText()));
                   ioField.setText(Integer.toString(result));
              else if(actionCommand.equals("s"))
                   result = result + 1;
              else if(actionCommand.equals("p"))
                   result = result - 1;
    */          else if(actionCommand.equals("C"))
                   result = 0;
                   ioField.setText("0");
              else
                   ioField.setText("Unexpected error.");
         public static int stringToInteger(String stringObject)
              return Integer.parseInt(stringObject.trim());
         public static void main(String[] args)
              Calculator gui = new Calculator();
              gui.setVisible(true);
    }

    A 'double' is not the same as an 'int' and they can't fit the one value-type into the memory of the other.
    Although this is a logical math problem, simple for us, we have better memory than a computer.
    An integer maps a certain amount of memory to fix its maximum value, when you cast, you must cast into a type that is the same or smaller in terms of memory byte size.
    Just like you can't cast some objects as others, you can't cast a double as an int.
    The error is telling you that the result of a method call is incompatiable with the argument of another method call.
    The fault lies at Calculator.java source file at line 113 in the file. This is where you call the method log() which requires an argument of type 'double' which is located in Math class log method where the two arguments are 'int' and 'int'.
    However, in your call, you inflect the reference 'result' as the product of the method call in which the 1st argument is also 'result'
    That in itself is bad design. It's like saying "Joe is the product of Mike (who uses Joe)."
    Memory-wise, this could cause possible leaks.

  • Process sampled data and perform simple calculation to by pass Matlab?

    I have files that contain large number current samples (like 300,000 for example). I need them to performing simple calculations (for example to calculate energy).
    Before, I used Matlab to load all those samples into array and to do all calculations there.
    However... that process is kind of slow. What can I use to simply this and replace Matlab by some script?
    Can I use perl or php to perform this operation on set of sample files to spit out final calculation values into new file?
    Last edited by kdar (2012-05-11 13:21:05)

    I'm surprised no one has suggested numpy and scipy, which are modules for python 2. They have syntax that's similar to mattlab, they're very fast, and python is useful in other circumstances and easy to learn.
    I did something similar for spectral data. Here's an example of what I did in python:
    #!/usr/bin/env python
    #This program goes through rayleigh line data and finde the mean shift
    #in nanometers and the standard deviation
    import sys, os
    import numpy as np
    import scipy as sp
    import scipy.optimize as op
    import time
    ray = []
    filenames = []
    line = 633
    def rs(wavelength,laser):
    return ((float(1)/laser)-(float(1)/wavelength))*(10**7)
    def main(argv): #Goes through a file and finds the peak position of the rayleigh line
    f = np.loadtxt(argv).transpose() #opens the file
    maxi = np.amax(f[1]) #Finds the value of hte peak of the rayleigh line
    intensity = [f[1,i] for i in range(len(f[1]))] #extrants the array into a list
    indi = intensity.index(maxi) #Finds the index of the rayleigh line
    ray.append(f[0,indi])
    filenames.append(str(argv))
    # Goes through each file named in the CLI call and applies the main function to it
    for filename in sys.argv[1:]:
    main(filename)
    # Use numpy for some basic calculations
    mean = np.mean(ray)
    StandardDeviation = np.std(ray)
    median = np.median(ray)
    variance = np.var(ray)
    ramanshift = [rs(ray[i],line) for i in range(len(ray))]
    rsmean = np.mean(ramanshift)
    rsSD = np.std(ramanshift)
    rsmedian = np.median(ramanshift)
    rsvariance = np.var(ramanshift)
    tname = str(time.asctime())
    # Write all calculations to a file
    output = open('rayleigh_'+tname+'.dat','w')
    output.write('#The files used for this compilation are:\n')
    for i in range(len(filenames)):
    output.write('#'+filenames[i]+'\n')
    output.write('The wavelengths of the Rayleigh line are (in nm):\n')
    for i in range(len(ray)):
    output.write(str(ray[i])+'\n')
    output.write('The raman shifts of the rayleigh line for '+str(line)+'nm are (in rel. cm^(-1):\n')
    for i in range(len(ray)):
    output.write(str(ramanshift[i])+'\n')
    output.write('Mean = '+str(mean)+'nm, or '+str(rsmean)+' rel. cm^(-1)\n')
    output.write('Standard Deviation = '+str(StandardDeviation)+' nm, or '+str(rsSD)+' rel. cm^(-1)\n')
    output.write('Median = '+str(median)+'nm or, '+str(rsmedian)+' rel. cm^(-1)\n')
    output.write('Variance = '+str(variance)+'nm or, '+str(rsvariance)+' rel. cm^(-1)\n')
    output.close()
    Last edited by Yurlungur (2012-05-13 21:14:54)

  • Add a simple calcul to a table with Personalize menu

    Hi
    is it possible to add a column (Message Styled Text) that will do a simple calculation ((score +50 *10000) /quote total) in an existing table (Personalize "Supplier Summary Table")
    thanks

    Thank you Bernd, but that is only part of the solution.  For example, I do set the Page Layout to 1-page-continuous.  MOST of the time it keeps this setting, but some documents either override that setting, or perhaps it reverts back to a default (maybe with version upgrades?).  The other part is that I always want the menu-bar and toolbar to show up.  Some documents hide these when they open.  I realize that I can hit [F8] and/or [F9] to toggle these, but there are additional settings.  I also want to always have the selection tools available, etc.  Bottom Line: I just want a collection of settings that I can call up with a single, simple shortcut or button, so I don't have to perform multiple steps just to get the tool back to my standard configuration whenever something changes it.

  • Simple calculator, but ...

    Hi !
    I'm looking for some simple calculator (+,-,*,/) implemented in java using session bean, but unfortunetly I can't find any. Already I've come accross on many examples but without these mentioned beans.
    Please, if you have any working link, or even code - I would be very grateful.

    and what would you learn by downloading some code someone else wrote and submitting it to your teacher as your own?

Maybe you are looking for