How to round numbers in java?

hey everyone. just wondering how i can round my final answer which is "repayment" located on the last line to the nearest whole value. thanks :) this is my code:
//Conversion and Calculation
principle = reader.readDouble("Enter Loan Amount: ");
interestRate = reader.readDouble("Enter YEARLY interest rate: ");
convertedRate = interestRate / 100;
monthlyRate = convertedRate / 12;
timePeriod = reader.readDouble("Enter the number of years for the repayment: ");
convertedPeriod = timePeriod * 12;
//Calculation Monthly Repayment Amount for a fixed number of years
topHalf = Math.pow((1+monthlyRate),convertedPeriod);
bottomHalf = (Math.pow((1+monthlyRate),convertedPeriod)-1);
fraction = topHalf / bottomHalf;
repayment = principle * monthlyRate * fraction;
writer.println ("Fixed Monthly Repayment Amount = $" +repayment);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Good point: Klue2k, don't forget about the negative
case.Yes, never forget about the negative case. Your
solution doesn't work with negative numbers!
And by the way, if you had a little bit more of the
good old klue2k, you wouldn't be embarassing yourself
in this way.I think you're confusing me with somebody who give a 5h!t.

Similar Messages

  • How to round numbers using javascript in Adobe Acrobat Pro?

    How to round numbers using java script in Adobe Acrobat Pro?
    For example:
    1.2 becomes 1.0
    1.7 becomes 2.0
    Thank you.

    Assuming you've already set the field to a Number format category and limited it to one digit to the right of the decimal, you can use the following custom Validate script:
    // Custom Validate script
    event.value = Math.round(event.value);
    More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/roun d

  • How to round numbers

    assume variable a is 4.647 and i want to convert this to 4.5 . how can i round numbers like this. Is there is a predefined method in java to achive this.

    I don't think java.lang.Math.round() will do what the original post asked for, since it rounds to the nearest long number. So you still would have to write your own method to round 4.647 down to 4.5.

  • Need help with rounding numbers in Java

    I finally have this program to where it needs to be except for one thing. The variable "freetime" isn't showing any kind of output in the applet. The variable sum and freetime are both called at the start of the program, and have equations to figure out the output for them, but only sum shows an output. I tried using brackets as opposed to multiple parentheses. What can I do to fix this so that there is an output? I was thinking of using something to round up the result, but I can't figure it out. Can anyone help?
    import java.awt.*;
    import javax.swing.*;
    public class FinalLab extends JApplet{
    String firstNum, secondNum, thirdNum, fourthNum, fifthNum;
    int personal, family, school, work, sleep, sum, freetime;
    public void init()
    String firstNum, secondNum, thirdNum, fourthNum, fifthNum;
    firstNum = JOptionPane.showInputDialog( "Enter total personal hours." );
    secondNum = JOptionPane.showInputDialog( "Enter total family hours." );
    thirdNum = JOptionPane.showInputDialog( "Enter total school hours." );
    fourthNum = JOptionPane.showInputDialog( "Enter total work hours." );
    fifthNum = JOptionPane.showInputDialog( "Enter total sleep hours." );
    personal = Integer.parseInt( firstNum );
    family = Integer.parseInt( secondNum );
    school = Integer.parseInt( thirdNum );
    work = Integer.parseInt( fourthNum );
    sleep = Integer.parseInt( fifthNum );
    sum = (personal + family + school + work + sleep);
    freetime = ((168-sum)/168)*100;
    public void paint(Graphics g) {
    super.paint( g );
    g.drawRect( 15, 10, 270, 20 );
    g.drawRect( 15, 35, 270, 20 );
    g.drawRect( 15, 60, 270, 20 );
    g.drawRect( 15, 85, 270, 20 );
    g.drawRect( 15, 110, 270, 20 );
    g.drawRect( 15, 135, 270, 20 );
    g.drawRect( 15, 160, 270, 20 );
    g.drawString( "Personal hours: " + personal, 25, 25);
    g.drawString( "Family hours: " + family, 25, 50);
    g.drawString( "School hours: " + school, 25, 75);
    g.drawString( "Work hours: " + work, 25, 100);
    g.drawString( "Sleep hours: " + sleep, 25, 125);
    g.drawString( "Total hours: " + sum, 25, 150);
    g.drawString( "Free time: " + freetime, 25, 175);
    }

    I am guessing that you really meant that you are seeing "Free time: 0" instead of what you said, which was that it wasn't showing any kind of output. (Your whole terminology is weird, you don't "call a variable" just for example.) If that's the case, it's because you are using integer division. You'll find that 27/168, for example, gives zero. I don't know why you are multiplying by 100 in your calculation and doing the division, perhaps you meant to return the free time as a percentage (in which case your output should say that), but since you are doing that you could do it this way:((168-sum)*100/168)Then you are doing 2700/168, which produces a reasonable number.

  • How to round numbers in RTF templates?

    Hello!
    I'm using BI Publisher for Word (Oracle BI Publisher Builder for Word 10.1.3.4.1) to build a template to my BI Publisher report and I want to calculate this:
    avg(X)/(avg(Y)-avg(Z)/0.9)
    The result should be rounded to 3 places.
    I tried:
    <?(sum(X) div count(X)) div ((sum(Y) div count(Y)) - (sum(Z) div count(Z)) div 0.9)?>
    and I obtained the expected result.
    But, when I try to round in this way:
    <?xdofx:round((sum(X) div count(X)) div ((sum(Y) div count(Y))-(sum(Z) div count(Z)) div 0.9),3)?>
    I obtain 0 when is expected other value.
    Can someone help me?

    Hi ,
    You can select the number format in RTF template .Double click the Form Field select
    Type :Number
    Number Format :#,##0.000
    Thanks.

  • How to round numbers to the nearest .25

    I would like to enter a number in one field and have it rounded to the nearest .25 in another column - (whether that's rounding up or down)
    Example:
    Actual Size
    Adjusted Size
    7.21435
    7.25
    Any help would be appreciated.
    Thanks!

    Hi c,
    The ROUND function limits the precision choices to powers of 10, so we need to work within that limitation:
    Multiply by four, round to the nearer whole number, divide by four.
    Formula in column B: =ROUND(A*4,0)/4
    All cells in B are formatted as Number, with decimal places set to 2.
    Regards,
    Barry

  • Possibility of drawing numbers on java bouncing balls?

    Can anyone show me how to put numbers on these moving balls in my code. I need the numbers 1-60 on them. I have two sets the red and white. Here is my code. Any help is appreciated. I am trying to write a program to represent the powerball.
    import java.awt.*;
    import java.applet.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.Rectangle;
    class CollideBall{
    int width, height;
    public static final int diameter=20;
    //coordinates and value of increment
    double x, y, xinc, yinc, coll_x, coll_y;
    boolean collide;
    Color color;
    Graphics g;
    Rectangle r;
    //the constructor
    public CollideBall(int w, int h, int x, int y, double xinc, double yinc, Color c){
    width=w;
    height=h;
    this.x=x;
    this.y=y;
    this.xinc=xinc;
    this.yinc=yinc;
    color=c;
    r=new Rectangle(150,80,130,90);
    public double getCenterX() {return x+diameter/2;}
    public double getCenterY() {return y+diameter/2;}
    public void alterRect(int x, int y, int w, int h){
    r.setLocation(x,y);
    r.setSize(w,h);
    public void move(){
    if (collide){  
    double xvect=coll_x-getCenterX();
    double yvect=coll_y-getCenterY();
    if((xinc>0 && xvect>0) || (xinc<0 && xvect<0))
    xinc=-xinc;
    if((yinc>0 && yvect>0) || (yinc<0 && yvect<0))
    yinc=-yinc;
    collide=false;
    x+=xinc;
    y+=yinc;
    //when the ball bumps against a boundary, it bounces off
    //ball width is 6 so if the ball becomes less then 6 it is touching the frame
    //if ball is greater than the entire width-the diameter of the rectangle, then the ball is just touching the frame of the rectangle and must switch to negative to go in opposit direction
    if(x<6 || x>width-diameter){
    xinc=-xinc;
    x+=xinc;
    //same thing as about just about the Y-axis instead of the x-axis
    if(y<6 || y>height-diameter){
    yinc=-yinc;
    y+=yinc;
    public void hit(CollideBall b){
    if(!collide){
    coll_x=b.getCenterX();
    coll_y=b.getCenterY();
    collide=true;
    public void paint(Graphics gr){
    g=gr;
    g.setColor(color);
    //the coordinates in fillOval have to be int, so we cast
    //explicitly from double to int
    g.fillOval((int)x,(int)y,diameter,diameter);
    //Draws half white and half dark gray arc around the balls to give light and shadow effect
    g.setColor(Color.white);
    g.drawArc((int)x,(int)y,diameter,diameter,45,180);
    g.setColor(Color.darkGray);
    g.drawArc((int)x,(int)y,diameter,diameter,225,180);
    public class BouncingBalls extends Applet implements Runnable { 
    Thread runner;
    Image Buffer;
    Graphics gBuffer;
    CollideBall ball[];
    //Obstacle o;
    //how many balls?
    static final int MAX=60;
    boolean intro=true,drag,shiftW,shiftN,shiftE,shiftS;
    boolean shiftNW,shiftSW,shiftNE,shiftSE;
    int xtemp,ytemp,startx,starty;
    int west, north, east, south;
    public void init() {  
    Buffer=createImage(getSize().width,getSize().height);
    gBuffer=Buffer.getGraphics();
    ball=new CollideBall[MAX];
    int w=getSize().width-5;
    int h=getSize().height-5;
    //our balls have different start coordinates, increment values
    //(speed, direction) and colors
    for (int i = 0;i<30;i++){
    ball=new CollideBall(w,h,48+i,500+i,1.5,2.0,Color.white);
    ball[i+30]=new CollideBall(w,h,890+i,200+i,1.5,2.0,Color.red);
    public void start(){
    if (runner == null) {
    runner = new Thread (this);
    runner.start();
    /* public void stop(){
    if (runner != null) {
    runner.stop();
    runner = null;
    public void run(){
    while(true) {
    Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
    try {runner.sleep(15);}
    catch (Exception e) { }
    //move our balls around
    for(int i=0;i<MAX;i++){
    ball[i].move();
    handleCollision();
    repaint();
    boolean collide(CollideBall b1, CollideBall b2){
    double wx=b1.getCenterX()-b2.getCenterX();
    double wy=b1.getCenterY()-b2.getCenterY();
    //we calculate the distance between the centers two
    //colliding balls (theorem of Pythagoras)
    double distance=Math.sqrt(wx*wx+wy*wy);
    if(distance<b1.diameter)
    return true;
    return false;
    private void handleCollision(){
    //we iterate through all the balls, checking for collision
    for(int i=0;i<MAX;i++)
    for(int j=0;j<MAX;j++){
    if(i!=j){         
    if(collide(ball[i], ball[j])){  
    ball[i].hit(ball[j]);
    ball[j].hit(ball[i]);
    public void update(Graphics g){
    paint(g);
    public void paint(Graphics g) { 
    gBuffer.setColor(Color.lightGray);
    gBuffer.fillRect(0,0,getSize().width,getSize().height);
    gBuffer.draw3DRect(5,5,getSize().width-10,getSize().height-10,false);
    //paint our balls
    for(int i=0;i<MAX;i++)
    ball[i].paint(gBuffer);
    g.drawImage (Buffer,0,0, this);
    Thanks again

    this.user wrote:
    JakeG27 post your code within the code tab it will be more clear.
    You can do this by clicking on CODE when you do this will appear { code} { code} post your code inbetween those to tags.
    ie
    { code} code... { code}
    and it will look like this
    code
    This must be the first sensible post you've ever made. At least you're able to copy someone else's response and pretend you know something.

  • How to store numbers in a stack....

    hello guys...i ve got the following assignment:
    Write a Java program that reads and evaluates a fully parenthesised arithmetic expression. The
    purpose of this program is to illustrate a fundamental use of stacks. Implement the stack using
    Linked Lists as explained in your notes.
    For e.g if a user enters the expression: (((6 + 9) / 3) * (6 � 4))
    The result should be 10.
    Your program should be properly documented and well structured. Specifications should be
    clearly written in your logbook for all the methods, constructors, and classes that you implement
    in the following format:
    Class / Method/ Constructor name explaining what it does
    Parameters
    Preconditions
    Postconditions
    Throws
    Now, i ve come up with the following code:
    import java.util.EmptyStackException;
    class StackNode {
         private static Object data;
         private StackNode link;
         private static StackNode head;
         private int totalnodes;
    // the constructors
    public StackNode(Object obj, StackNode lk)
         data = obj;
         link = lk;
    public StackNode()
         head = null;
         totalnodes = 0;
         // the push method
         public void push(Object obj)
              head = new StackNode(obj, head);
              totalnodes++;
         // the pop method
         public Object pop()
              Object answer;
              if(head == null)
                   throw new EmptyStackException();
              answer = head.getData();
              head = head.getLink();
              totalnodes--;
              return answer;
         // the isEmpty method
         public boolean isEmpty()
              return (head == null);
         // get data
         public Object getData()
              return data;
         // get link
         public StackNode getLink()
              return link;
         // size or length method
         public int size()
              return totalnodes;
         public static void main (String args [])
              int i;
              StackNode number = new StackNode();
              StackNode operator = new StackNode();
              head = new StackNode(data, head);
              number.push(new Integer(9));
              number.push(new Integer(6));
              operator.push(new Character('+'));
    and i dont know how to store numbers into the stack and how to use the operations such as addition substraction division and multiply...
    any ideas how to do that??
    cheers....

    This doesn't use a stack but the concept is the same:
    import java.util.*;
    public class formula {
    public  int aValue = 1;
    public  int bValue = 2;
    public  int cValue = 3;
    public formula() {
       //StringTokenizer st = new StringTokenizer("a + b/c", " abc()+-*/", true);
       //while (st.hasMoreTokens()) { System.out.println(st.nextToken()); }
       StringTokenizer st2 = new StringTokenizer("a + (c - b) + (b * c)", " abc()+-*/", true);
      int operand1 = 0;
      int operand2 = 0;
      int operator = 0;
      //flag: first operand has a value
      boolean firstOperandFull = false;
      //flag: second operand has a value
      boolean secondOperandFull = false;
      //flag: tokens are between parens
      boolean inParens = false;
      Vector inParensVector = null;
      MAINLOOP:
        while (st2.hasMoreTokens()) {
                  String x = st2.nextToken();
                  //if token is a blank skip it.
                  if (x.equals(" ")) { continue MAINLOOP; }
                  System.out.println(x);
                  //if token is open parens set flag and skip to next token
                  if (x.equals("(")) { inParens = true; inParensVector = new Vector(); continue MAINLOOP; }
                  //if tokn is close parens, retrieve the value from between the parens and reset flag.
                  if (x.equals(")")) { if (! firstOperandFull) { operand1 = doInParens(inParensVector); firstOperandFull = true; }
                                       else { operand2 = doInParens(inParensVector); secondOperandFull = true;  }
                                       inParensVector = null; inParens = false; }
                  //if token is open parens store all tokens until close else process the token
                  if (inParens) { inParensVector.add(x); }
                  else {
                       //if token is a variable put correct value in operand
                       if (x.equals("a")) { if (! firstOperandFull) { operand1 = aValue; firstOperandFull = true; }
                                            else { operand2 = aValue; secondOperandFull = true;  } }
                       if (x.equals("b")) { if (! firstOperandFull) { operand1 = bValue; firstOperandFull = true; }
                                            else { operand2 = bValue; secondOperandFull = true;  } }
                       if (x.equals("c")) { if (! firstOperandFull) { operand1 = cValue; firstOperandFull = true; }
                                            else { operand2 = cValue; secondOperandFull = true;  } }
                       //if token is a operator store the operation
                       if (x.equals("+")) { if (firstOperandFull) { operator = 1; } }
                       if (x.equals("-")) { if (firstOperandFull) { operator = 2; } }
                       if (x.equals("*")) { if (firstOperandFull) { operator = 3; } }
                       if (x.equals("/")) { if (firstOperandFull) { operator = 4; } }
                       System.out.println("operand1 = " + operand1 + " operand2 = " + operand2 + " operator = " + operator);
                        //if second operand has a value perform the operation.
                       if (secondOperandFull) {
                                               switch (operator) {
                                                        case 1 : operand1 = add(operand1, operand2); secondOperandFull = false; break;
                                                        case 2 : operand1 = subtract(operand1, operand2); secondOperandFull = false; break;
                                                        case 3 : operand1 = multiply(operand1, operand2); secondOperandFull = false; break;
                                                        case 4 : operand1 = divide(operand1, operand2); secondOperandFull = false; break;
                                                        }//end switch
                                                 } //end if
                     } //End inParens else
      } //End while
    System.out.println("answer = " + operand1);
    public static void main(String[] args) { //formula f = new formula();
    Vector v = new Vector();
    StringTokenizer st = new StringTokenizer(",Greg,,Paul,,", ",", true);
    String token = null;
    String lastToken = " ";
    boolean firstToken = true;
    while (st.hasMoreTokens()) {
    token = st.nextToken();
    if (firstToken) { if (token.equals(",")) { v.add("X"); }
    firstToken = false; }
    if (! token.equals(",")) { v.add(token); }
    else { if (lastToken.equals(",")) { v.add("X"); } }
    lastToken = token;
    } //End While
    if (token.equals(",")) { v.add("X"); }
    Enumeration tokens = v.elements();
    while (tokens.hasMoreElements()) {
          System.out.println((String)tokens.nextElement()); }
    } //End Main
    public int add(int operand1, int operand2) { return operand1 + operand2; }
    public int subtract(int operand1, int operand2) { return operand1 - operand2; }
    public int divide(int operand1, int operand2) { return operand1 / operand2; }
    public int multiply(int operand1, int operand2) { return operand1 * operand2; }
    public int doInParens(Vector inParensVector) {
          int operand1 = 0;
          int operand2 = 0;
          int operator = 0;
          boolean firstOperandFull = false;
          boolean secondOperandFull = false;
          Enumeration tokens = inParensVector.elements();
          INPARENSLOOP:
               while (tokens.hasMoreElements()) {
                  String x = (String)tokens.nextElement();
                  //if token is a blank skip it.
                  if (x.equals(" ")) { continue INPARENSLOOP; }
                  System.out.println("inparens : " + x);
                  //if token is a variable put correct value in operand
                      if (x.equals("a")) { if (! firstOperandFull) { operand1 = aValue; firstOperandFull = true; }
                                          else { operand2 = aValue; secondOperandFull = true;  } }
                  if (x.equals("b")) { if (! firstOperandFull) { operand1 = bValue; firstOperandFull = true; }
                                      else { operand2 = bValue; secondOperandFull = true;  } }
                  if (x.equals("c")) { if (! firstOperandFull) { operand1 = cValue; firstOperandFull = true; }
                                           else { operand2 = cValue; secondOperandFull = true;  } }
                 //if token is a operator store the operation
                 if (x.equals("+")) { if (firstOperandFull) { operator = 1; } }
                  if (x.equals("-")) { if (firstOperandFull) { operator = 2; } }
                 if (x.equals("*")) { if (firstOperandFull) { operator = 3; } }
                 if (x.equals("/")) { if (firstOperandFull) { operator = 4; } }
                  System.out.println("Inparens : operand1 = " + operand1 + " operand2 = " + operand2 + " operator = " + operator);
                 if (secondOperandFull) {
                                         switch (operator) {
                                                   case 1 : operand1 = add(operand1, operand2); secondOperandFull = false; break;
                                                       case 2 : operand1 = subtract(operand1, operand2); secondOperandFull = false; break;
                                                       case 3 : operand1 = multiply(operand1, operand2); secondOperandFull = false; break;
                                                       case 4 : operand1 = divide(operand1, operand2); secondOperandFull = false; break;
                                                       }//end switch
                                         } //end if
                  } //End while
               System.out.println("Inparens return = " + operand1);
               return  operand1;
    }//End doInParens
    }//End Class

  • How to enter numbers in Arabic?

    Hi All,
    How to write numbers in arabic?
    (how will you in normal papers....assume 123 to be in the arabic numerals here).
    Should it be:
    | -123|
    (or)
    | 123-|
    Thanks,
    Jana

    I won't say I am very clear about this topic. But I will give an example, which seems to show that number (in the double type) is logically of the form -000.00 while locale spacific String object can be both of the forms "000.00-" and "-000.00"
    // you can show the string below (formatted) on a JLabel with the following
    //<JLabel_instance>.setFont(new Font("Lucida Sans", Font.PLAIN, 22));
    NumberFormat nf = NumberFormat.getInstance(new java.util.Locale("ar","EG"));
    //NumberFormat nf = NumberFormat.getInstance(new java.util.Locale("fr","Fr"));   // compare
    DecimalFormat df=null;
    DecimalFormatSymbols dfs= null;
      if (nf instanceof DecimalFormat) {
          df = (DecimalFormat)nf;
          dfs = df.getDecimalFormatSymbols();
          dfs.setZeroDigit('\u0660');// set the beginning of the range to Arabic digits.. this can be commented out
          df.setDecimalFormatSymbols(dfs);
      String formatted = nf.format(-1234567.89);

  • How do I include a JAVA file in my website  using DreamweaverCC ?

    Hi.  I searched the forums and it seems that all questions relating to JAVA and Dreamweaver elicit zero replies.
    I hope that someone has some direction.  Thanks again.
    I have a JAVA file that I want to include or have run within one of my pages in my WebSite.
    file > new > create > and there is not an option for JAVA but there is one for PHP etc. etc.
    How do I incorporate a java script into my Web Site ?
    I thought that I could just copy the code into the file here - at least to begin with  - but JAVA  runs in the background.
    I am lost
    conceptually
    and I do not know how to go about this task
    structurally.
    Thanks again,
    Regina

    JQuery is a core JavaScript library used by millions of web sites.  It's the "do more & write less code framework."  If you're into re-inventing the wheel every time you need an advanced feature (plugin), feel free to manually code it yourself with JavaScript.  However, you'll need to test & debug your scripts in every conceivable browser and OS before you can be sure it's viable for use on a production site.
    On the other hand, you could use a plugin and be up & running in 5 minutes or less. See the code below.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5, with Fancybox2 Viewer</title>
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!--LATEST JQUERY CORE LIBRARY-->
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    <!--FANCYBOX plugins-->
    <link href="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.css" rel="stylesheet" media="screen">
    <script src="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.pack.js"></script>
    <style>
    body {
        background: silver;
        font-family:Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
    #wrapper {
        width: 1000px; margin:0 auto;
        background:#FFF;
    /**this styles image container**/
    #thumbs p {
        float: left;
        width: 180px;
        height: 12.5em;
        margin: 10px 22px 0 22px; /**space between containers**/
        padding: 10px; /**space around containers**/
        border: 1px solid silver;
        /**rounded borders**/
        -moz-border-radius: 20px;
        -webkit-border-radius: 20px;
        border-radius: 20px;
        /**this styles caption text**/
        font: italic 14px/1.5 Geneva, Arial, Helvetica, sans-serif;
        color: #666;
        text-align: center;
    /**recommend using same size images**/
    #thumbs img {
        width: 160px; /**adjust width to thumbnail**/
        height: 120px; /**adjust height to thumbnail**/
        margin-bottom: 1.5em;
        opacity: 0.75;
    #thumbs img:hover { opacity: 1.0 }
    /**float clearing**/
    #thumbs:after {
        content: ".";
        clear: left;
        font-size: 0px;
        line-height: 0;
        display: block;
        visibility: hidden;
    </style>
    </head>
    <body>
    <div id="wrapper">
    <h1><a href="http://fancyapps.com/fancybox/">Fancybox2</a> Viewer with images</h1>
    <!--insert thumbnails with links to full size images below-->
    <div id="thumbs">
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 1" /></a> <br />
    Caption 1 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 2" /></a> <br />
    Caption 2 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 3" /></a> <br />
    Caption 3 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 4" /></a> <br />
    Caption 4 </p>
    <!--end thumbs--></div>
    <!--end wrapper--></div>
    <!--FancyBox function code-->
    <script>
    $(document).ready(function() {
        $('.fancybox').fancybox();
    </script>
    </body>
    </html>
    Nancy O.

  • How to round the fractional values in Abap webdynpro?

    Hi Experts,
    I have designed a screen in which I have a field called ANZHL(which is numberic field of infotype14) It is a fractional digits which needs to be rounded when it comes to display in my webdynpro application?
    Here is my code .........
    How to round the ANZHL field ?
    **if start and end dates are changed then delete the old and insert the new else just mmodify the record
        if ws_0014_temp-begda ne ws_edit-begda or ws_0014_temp-endda ne ws_edit-endda.
          call function 'HR_INFOTYPE_OPERATION'
            exporting
              infty         = '0014'
              number        = wd_this->w_pernr
              subtype       = ws_0014_temp-subty
              objectid      = ws_0014_temp-objps
              lockindicator = ws_0014_temp-sprps
              validityend   = ws_0014_temp-endda
              validitybegin = ws_0014_temp-begda
              recordnumber  = ws_0014_temp-seqnr
              record        = ws_0014_temp
              operation     = 'DEL'
              nocommit      = 'X'
            importing
              return        = w_bapireturn.
          " key                    = w_bapireturn.
          if w_bapireturn-type ca 'EA'.
            r_bapireturn = w_bapireturn.
            return.
          endif.
          ws_0014 = ws_0014_temp.
          ws_0014-endda = ws_edit-endda.
          ws_0014-begda = ws_edit-begda.
          ws_0014-anzhl = ws_edit-anzhl.
                      call function 'HR_INFOTYPE_OPERATION'
            exporting
              infty         = '0014'
              number        = wd_this->w_pernr
              subtype       = ws_0014-subty
              objectid      = ws_0014-objps
              lockindicator = ws_0014-sprps
              validityend   = ws_0014-endda
              validitybegin = ws_0014-begda
              recordnumber  = ws_0014-seqnr
              record        = ws_0014
              operation     = 'INSS'
              nocommit      = 'X'
            importing
              return        = w_bapireturn.
          " key                    = w_bapireturn.
          if w_bapireturn-type ca 'EA'.
            r_bapireturn = w_bapireturn.
            return.
          endif.
        else.
          ws_0014 = ws_0014_temp.
          ws_0014-anzhl = ws_edit-anzhl.
    Edited by: Dharani us on Oct 8, 2009 10:15 AM

    Hi,
    For that attribute, you want to display the decimal values or what.
    Regards,
    Lekha.

  • Please help me.. how to rewrite the following java- for loop code in ada

    int i, j, n = 100;
    for (i = 0, j = 17; i < n; i++, j-- )
    sum += i * j + 3;

    how to rewrite the following java- for loop code in ada
    You should have a programming manual for Ada first. If you mean it the other way round, I think you subject line confused me.

  • How To See Numbers In Arabic Instead Of Indian Format

    I want to see numbers in Arabic format not in Indian format when i log on the Arabic Interface .
    I have EBS (12.0.6) installed on Linux centos , I have implement the below Oracle Metalink Note to solve this issue
    How To See Numbers In Arabic Instead Of Indian Format [ID 785243.1]
    I installed all the patched mentioned in the note (Apply forms version 10.1.2.2.0 with the forms patch 7488328 , Apply patch 7207440:R12.TXK.A , Apply patch 7601624 - NEW PROFILE OPTION: FORMS DIGIT SUBSTITUTION)
    These patches add the Profile option (FORMS DIGIT SUBSTITUTION) , but when i try to used it has no effect at all .
    So kindly if you have any idea about this issue please help me.
    Regards
    Fadi Lafi

    Hi,
    These patches add the Profile option (FORMS DIGIT SUBSTITUTION) , but when i try to used it has no effect at all .At what level you have set this profile option?
    So kindly if you have any idea about this issue please help me.Have you bounced the application services after setting this profile option? If not, please do so, login again and see if it works.
    Thanks,
    Hussein

  • How to assign numbers in external number range?

    Dear experts,
    Since NUMBER_GET_NEXT can only be used to assign numbers in internal number range, how to assign numbers in external number range?
    So far, I only know the NUMBER_CHECK function module to deal with external number ranges and it only check a number whether it lies in any external number range or not, but it doesn't update any number range status. What I need is a function module like NUMBER_GET_NEXT that supports external number range.
    Thanks in advance.
    Regards,
    Haris
    Edited by: harissahlan on Oct 19, 2011 5:44 AM

    With external number range, there is no updating of the number range objectt. The only thing you need to know is whether the number you wish to assign is allowed according to the external number range. And also check if there isn't already an object/document with the same number in the database.

  • How to make numbers in message text input  fields left aligned?

    Hi Friends
    I have completed one of my task .but getting result right side of the field.
    how to make numbers in message text input  fields left aligned?
    Thanks
    Aravinda

    Hi ,
    Sorry for late replay i am trying this alos not set that page....
    pageContext.forwardImmediatelyToCurrentPage(null, true, null);
    and one more that kff field working is fine for ex display any text pled displayed properly and only problem is not set the value and HrSitKeyFlex6 and HrSitKeyFlex7 fields are perfectly get the values but not pront HrSitKeyFlex8 that only my issue....
    Regards,
    Srini

Maybe you are looking for

  • Classical music on iTunes: lack of proper gaps between movements

    I have the latest generation iPod and am using the latest version of iTunes. I purchase primarily classical music on iTunes and am quite annoyed that the gaps between movements (or "tunes" of an "album") are not reproduced properly the way they are o

  • BAPI/FM for goods receipt for a Sub Contracting PO

    Hi All, Is there a BAPI/FM to perform goods receipt for a sub contracting PO? BAPI_GOODSMVT_CREATE can not perform goods receipt for sub contracting PO. My purpose would be served if I can know how to find the component material of a subcontrcting PO

  • I reset my iPad 2 and I lost all my movies but everything else was on iCloud how can I get my movies back?

    I backed up my iPad before I reset it and all my tv series and music and photos was on my iCloud but when I tried to redownload them from the purchased section but when I tried none of my movies I bought was there if there is anyone way I can get the

  • Acrobat not recognising MS word

    Morning All, My first post here so apologies if its in the wrong place or been done to death. I am having issues with Acrobat XI Standard and its interaction with MS Office 2013 (MS WIndows 7, 64bit). I can print to a .pdf from within the word (or Of

  • Making a datagrid display properly

    I am looking for an easy solution to make the datagrid display correctly. I would assume there is a way to display the data in the order of the xml document that is being loaded. Why would the component disregard the file it is sent, doing extra work