Need urgent help! How to check if the generated number is a whole number

Hi,
I have a simple issue but I need some assistance. I am
calculating a number and the result number sometimes a whole number
but in some cases decimals are present. Decimals do not need change
but whole numbers need to change. So for example if the end result
is "6" I need it to show it as "6.0" in a field beacuse that is the
way the calculator should display it according to request.
How can I check that the result number is a whole number and
then add ".0" to it?
I just included a simple script below.
if (outputnumber == ?) {
resultNum = Number(String(outputnumber+".0"));
} else {
resultNum = outputnumber;
Thanks,
Attila

Hi reinhat,
That means that "outputnumber" wasn't something that can be
converted to
a number. When you trace this value, what do you see?
Regards,
Patrick Bay
BAY NEW MEDIA
"reinhat" <[email protected]> wrote in
message
news:fndgeh$484$[email protected]..
> The above mentioned example returns "NaN".
> How can it return numeric value?

Similar Messages

  • URGENT HELP How Can I clone the database only?

    Hi all
    I have two database, oracle9.2.0.6 running on RHEL4
    one is testing server and the other for the production server
    how can i clone the testing DATABSE on the productioin DATABASE?
    please help me urgent
    Thank You
    Regards

    Hello Tawfik,
    You can use RMAN duplicate with the following link for 9i.
    http://www.oracle-base.com/articles/9i/DuplicateDatabaseUsingRMAN9i.php
    If you want to clone manually then follow this thread
    Cloning 9i database manually

  • Need urgent help: how to avoid concurrent calls on statefull session beans

    Hi,
    I need a little advice in designing a EJB session facade using JSPs, servlets, session and
    entity beans.
    My current design is:
    - JSP pages: here are only getMethods for the session bean used. All set-methods are handled by a
    - servlet: I have got one servlet handling several JSP pages. The servlet basically takes the
    form fields and stores them in the session bean and than dispatches to the next JSP-page
    - stateful session bean: here is, where all the business logic is conducted. There is one session
    bean per servlet using several
    - CMP entity beans: to talk to the database (Oracle 8i)
    The application server is JBoss 3.0.3.
    My problem is, if a user clicks on a submit button of a JSP page more than once before the next
    page builds up, I may get a "javax.ejb.EJBException: Application Error: no concurrent calls on
    stateful beans" error. I already synchronized (by the "session") the code in the servlet, but
    it happens in the JSP pages as well.
    I know, that Weblogic is able to handle concurrent calls, by JBoss isn't and it's clearly stated
    in the spec, that a user should avoid to have concurrent calls to a stateful bean.
    The big question is now: How can I avoid this? How can I prohibit the user to submit a form several
    times or to ignore anything, which arrives after the first submit?
    Thanks for any help,
    Thorsten.

    Synchronizing on the session is probably your best bet.
    You'll need to do all the data access and manipulation in the servlet. Cache any data you need using request.setAttribute() and then not access the EJB on the JSP page.
    If performance is an issue, you may also want to use create a user transaction to wrap all the EJB access in, otherwise each EJB call from the servlet is a new transaction. Just make sure you use a finally block to properly commit/rollback the transaction before you redirect to the JSP.
    UserTransaction utx    = null;
    synchronized (request.getSession())
      try {
        Context ctx = new InitialContext();
        utx = (UserTransaction) ctx.lookup("javax/transaction/UserTransaction");
        utx.begin();
        // ... Create session bean ...
        request.setAttribute("mydata", sessionBean.getMyData());
        try {
          utx.commit();
        catch (Exception ex) {
          log.warn("Transaction Rolled Back (" + ex.getClass().getName() + "): "
            + ex.getMessage(), ex);
        utx = null;
      } // try
      finally {
        if(utx != null)
          try {
            utx.rollback();
          catch (Exception e) {
            log.warn(e.getMessage(), e);
          } // catch
        } // if
      } // finally
    } // syncrhonized(session)

  • Help: How do you keep the generated source for the servicegen-generated stuff?

    Only the following classes have corresponding Java files:
    <name>Service
    <name>Service_Impl
    <name>ServicePort
    <name>ServicePort_Stub
    I need access to the marshalling code for the DTO java classes (I think there is
    a bug).
    Is there a keepGenerated option?
    Thanks,
    Nick

    I found the problem. I have posted it. See here:
    http://newsgroups2.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.webservices&item=1014&utag=
    Cheers,
    Nick
    "Nick Minutello" <[email protected]> wrote:
    >
    >
    Actually, you are right - the source for the codecs can be found in the
    webservice
    WAR. However, I have a funny feeling that the two are not the same (ie,
    there is
    a difference between the classes in the war, the classes in the client jar
    generated
    by servicegen and the client jar generated by clientgen. I am getting some
    odd behaviour,
    and I havent gotten to the bottom of it yet.
    It seems for the Data Transfer Objects, it makes a difference whether you
    use the
    generated classes or the originals (I am using the useServerTypes="True"
    option in
    the client element of the servicegen task.
    -Nick
    "Neal Yin" <[email protected]> wrote:
    Actually, the behavior right now should be "always keepgenerated". Canyou
    post your EJB/javaclass? We can check it out.
    -Neal
    "Nick Minutello" <[email protected]> wrote
    in message news:[email protected]...
    Actually, I think this is critical that this is done asap.
    It is impossible to debug errors such as this without it!
    java.lang.NoSuchMethodError
    atcom.x.bond.view.BondDetailDTOCodec.typedInvokeSetter(BondDetailDTOCodec.java
    :1214)
    atcom.x.bond.view.BondDetailDTOCodec.invokeSetter(BondDetailDTOCodec.java:964)
    Any chance of a timeframe?
    I dont particularly want to go and use Axis unless I have to... but Iseem
    to be
    spending a lot of time debugging this weblogic soap implementation...
    Thanks.
    Regards,
    Nick
    "Neal Yin" <[email protected]> wrote:
    Sorry, we don't have a keepgenerated option yet. We are adding one.
    Could you post what bug you think we might have? We can help you to
    pass
    though it.
    Thanks,
    -Neal
    "Nick Minutello" <[email protected]>
    wrote
    in message news:[email protected]...
    Only the following classes have corresponding Java files:
    <name>Service
    <name>Service_Impl
    <name>ServicePort
    <name>ServicePort_Stub
    I need access to the marshalling code for the DTO java classes (I
    think
    there is
    a bug).
    Is there a keepGenerated option?
    Thanks,
    Nick

  • Need urgent help how show my placeholder column in my report

    hi master
    sir
    i use report 6i
    i am making report with useing emp table i report i need one formula column and one placeholder column i
    first i mad report by useing report wizard
    after this i go in data modul and select one placeholder column and one formula column i write pl/sql
    :cp_1 := :sal;
    again run wizard and move
    placeholder column and one formula column
    in display item
    but when i run the report give me this error
    rep-1517 column 'cf_1' reffrence column 'sal' which is incompatible frequency
    please give me idea how i print my formula result in report
    thanking you
    aamir
    how show placeholder column in my report

    Hi,
    First create a formula column eg CF_1.
    Then create a placeholder column eg CP_1.
    Write a code in CF_1.
    [eg
    select bolFrValid into :CP_1 from tablename where condition;
    return :CP_1;
    Hope u got it

  • Need urgent help to use or modify the "ultrasonic starter kit"

    Hi, I am a french student, and I am working on an ultrasonic table with Labview 7.1.
    On the one hand, I have done the control of the table that moves the "probe?", and on the other hand I have done the program that read the picture given by EPOCH (an ultrasonic system that detects interfaces into metals).
    So, now my goal is now to mix them to make a map of those interfaces (one gives the position (x,y) of the probe and the other a graph with intensity peaks).
    I have found the "ultrasonic starter kit", and I would like to modify it, but I need help to remove the part that simulates the graph of intensity in order to replace it with mine and to remove the part that simulates (x,y) position to replace it by my positions that are controled in the same order. (y decreases each time x>constant).
    In case you would like to help me and need my work or a better description, please contact me to : [email protected]
    François-Xavier MAYAUD.
    Thank you.

    Hi,
    I think it would be easier for you to start from a blank VI, than modifiying the example you found which is quite complex. Try to use an intensity graph with inputs as your data.
    Regards,
    ClémentG

  • Need urgent help - how to call a procedure from sql returning a rowset

    Hello,
    I need to send a SQL Query from a VB application to let it execute on the oracle DB. This query needs to call a procedure/function, which returns a resultsets, so that i can to a (Where x in ( <call procedure> )). Would result in Where x in (50,100,3094).
    Is this possible in oracle, and how?
    Thanks.
    Daniel Meyer

    Hi Daniel,
    I had a similiar problem yesterday.
    Thanks to the nice people in this forum I was able to figured that out.
    So here is a PL/SQL Oracle 9i code for your reference.
    You can create and test it using the SQL Plus console.
    I used this stored procedure in my VB .NET and worked fine!
    I am enclosing the VB code in this reply as well.
    One last note: in order to test it in the VS .NET, don't forget to download the Oracle ODP driver for .NET
    Good luck!
    Amintas
    create or replace package pkg_emp
    AS
    type rc_emp is ref cursor;
    end;
    create or replace
    procedure SP_GetEmpData(v_empno IN emp.empno%Type,
    v_ename IN emp.ename%Type,
    emp_cur OUT pkg_emp.rc_emp)
    is
    begin
    if v_empno is not null and v_ename is null then
    OPEN emp_cur for
    select empno,ename,sal
    from emp
    where empno=v_empno;
    elsif v_ename is not null and v_empno is null then
    OPEN emp_cur for
    select empno,ename,sal
    from emp
    where ename like v_ename ||'%';
    end if;
    end;
    /* Testing the stored procedure */
    /*#1 */
    var myresultset refcursor;
    execute SP_GetEmpData(7900,null,:myresultset);
    print myresultset;
    /*#2 */
    var myresultset refcursor;
    execute SP_GetEmpData(null,'A',:myresultset);
    print myresultset;
    -x-x-x-x-x-x-x-x-x VB .NET CODE x-x-x-x-x-x-x-xx-x-
    Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnProcurar.Click
    Dim dr As Oracle.DataAccess.Client.OracleDataReader
    Try
    If txtEmpNo.Text <> "" Then
    dr = GetData(CInt(Val(txtEmpNo.Text)), "")
    Else
    dr = GetData(0, UCase(txtEname.Text))
    End If
    txtEmpNo.Text = ""
    txtEname.Text = ""
    Catch ex As Exception
    Response.Write(ex)
    End Try
    drgTest.DataSource = dr
    drgTest.DataBind()
    End Sub
    Private Function GetData(ByVal v_empno As Integer, ByVal v_ename As String) As Oracle.DataAccess.Client.OracleDataReader
    Dim cn As New Oracle.DataAccess.Client.OracleConnection(ConfigurationSettings.AppSettings("ConnectionString"))
    Dim cmd As New Oracle.DataAccess.Client.OracleCommand
    Dim dr As Oracle.DataAccess.Client.OracleDataReader
    cmd.Connection = cn
    cmd.CommandType = CommandType.StoredProcedure
    cmd.CommandText = "SP_GetEmpData"
    cmd.Parameters.Add("v_empno", Oracle.DataAccess.Client.OracleDbType.Int32).Value = IIf(v_empno = 0, System.DBNull.Value, v_empno)
    cmd.Parameters.Add("v_ename", Oracle.DataAccess.Client.OracleDbType.Varchar2, 40).Value = IIf(v_ename = "", System.DBNull.Value, v_ename)
    cmd.Parameters.Add("rc_emp", Oracle.DataAccess.Client.OracleDbType.RefCursor).Direction = ParameterDirection.Output
    Try
    cn.Open()
    dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
    Catch ex As Exception
    Throw ex
    Exit Function
    End Try
    Return dr
    End Function

  • Need urgent help!!!! (combine prompt and formula)

    Hi,
    I am using Oracle Business Intelligence 10.1.3.3.2, and creating some reports from answers. I desperately need to combine
    prompt and formula on some column.
    I need to use prompt in my formula on some column.
    Need urgent help !

    You can use the presentation variables to pass the value of the prompt into the report or any column formula.
    In the dashboard prompt you see an option called "Set Variable" where and you need to give a name to the variable.(Say Var_value)
    Now the value of the variable can be simply referenced using the syntax @{var_name}{10}. Here '10' being the defualt value which is optional you can simply reference using @{var_name} and you have the value of the prompts passed.
    Hope it works
    Thanks
    Prash

  • Need to know how to check the outbound queue in SAP for data flow into CRM

    Hi Specialist's,
    I have changed an entry in Customer Master Data in Sap r/3 and this change has come fine to CRM system.I checked the inbound BDOC in CRM ( Trn:SMW01) and it has come fine into CRM system.I am also able to see the affected field in CRM with new value.
    I need to know how to check this from SAP side i.e. I have checked the outbound IDOC list (WE02) but could not find the record.
    Is there any other way in SAP that i can check?
    Also please let me know if there is any other way except IDOC in SAP to send data from R/3 to CRM?
    Usefull answers will definitely be rewarded with points .
    Thanks,
    Abhinav.

    Hi Abhinav,
    There are no IDOCs generated in R/3 for replication. R/3 system calls BAPI and Function modules remotely on CRM system which are part of the Adaptors provided for middleware.
    Try to deregister the outbound queues in R/3 (Transaction SMQS) and see if you get an entry in the Outbound Queue (Transaction SMQ1). I have not tried this.
    If you don't get any entry in the outbound queue then definitely there would be some FM at R/3 end which would be calling CRM system remotely.
    <b>Reward points if it helps.</b>
    Regards,
    Amit Mishra

  • Need urgent help! - I accidentally sycn my friend's iphone account to my company's phone. I could not swich back to my own icloud account because of the icloud password i enter was incorrect. My friend does not use this icloud account since age.

    Need urgent help! - I accidentally sync my friend's iphone account to my company's iphone. I could not switch back to my own icloud account because of the icloud password i enter was incorrect. My friend does not use this icloud account since age only remember 1 password which i already try but iphone shown that " incorrect password" I checked on icloud ID and try to log in but it shown as " You Apple ID was disable for security reason. To enable your account must reset password" but so bad again, the email address that he used to create icloud ID also lock for security reason. May Apple Supporter please help reset it ASAP? I can verify that I am the iphone's owner, as it belong to company's phone.

    Have your company IT department get proof that the company was the
    original purchaser of the iPhone and visit a physical Apple store with
    proof of original purchase, proof that person is company representative,
    and the iPhone - Apple may be able to help. If no physical Apple store,
    contact Apple - you will still need the same items of proof.

  • Help Needed - FusionFx Style - How do I remove the Dashboard Grey Box Section, so that Dashboard Background is Blank

    Help Needed - FusionFx Style - How do I remove the Dashboard Grey Box Section, so that Dashboard Background is Blank
    We like FusionFx Style but would like to keep the background white like blafp style.

    Can you be a little more descriptive on what you need here and explain what exactly you want to be changed.

  • I have a video in excellent quality (1280x720 23,976 fps) I burn the dvd in encore cs6 with hd menu and I get pixelated.   I've done transcoding but It downgrade to 480   I need urgent help.

    I have a video in excellent quality (1280x720 23,976 fps) I burn the dvd in encore cs6 with hd menu and I get pixelated.   I've done transcoding but It downgrade to 480   I need urgent help.

    Hi,
    first, sorry if my english sucks jajaa i speach spanish, havent practice my english for a while.
    first i edited my video in premier cc
    sequence 1280X720, 59,94 fps
    48000hz - stereo
    the i linked it with dynamik link to after, make some color correction, etc etc etc
    i renderd in quicktime animation
    my video looks fine in my computer, but when i send my .mov video to encore (cs6) in a HD MENU and standard menú, the image sucks.
    i have done the transcoding in encore, but i doesnt work either. i dont know what else to do.

  • I updated to 7.0.2 and read to close an icon to double click home and then sweep up the icon to close it. I need to know how to sweep up the icon since I can't seem to do it. Help  please???

    I updated to 7.0.2 on my iphone and read to close an icon to double click home and then sweep up the icon to close it. I need to know how to sweep up the icon since I can't seem to do it. Help  please???

    Not the icon. Swipe up the preview card.

  • I have an ipad 2 with ios 6 and i want to download ibooks using the itunes on my laptop .but the ibooks is compatible with ios 7 or later.i need ibooks urgently and how do i download the compatible version

    i have an ipad 2 with ios 6 and i want to download ibooks using the itunes on my laptop .but the ibooks is compatible with ios 7 or later.i need ibooks urgently and how do i download the compatible version in my windows laptop.

    Download the iBooks app to iTunes on your computer. Once it's downloaded, go to the Purchased section in the App Store on the iPad, select iBooks and you should be prompted to download a compatible version.

  • I have Mac mini and there is partition of boot camp but some miss understanding the osx 10.8.2 is deleted and while I m going to recovery mode the portition can not removing and the also cant repaired what I do I need urgent help ???? Please ?????

    I have Mac mini and there is partition of boot camp but some miss understanding the osx 10.8.2 is deleted and while I m going to recovery mode the portition can not removing and the also cant repaired what I do I need urgent help ???? Please ?????

    Do you have a Time Machine backup or clone?  If not,
    all is lost if you have in fact deleted your OSX partition
    and you will have to do a reinstall from Recovery HD
    and install all else.

Maybe you are looking for