Large integer values

 

You could use DecimalData with scale 0.
Alexis Hassler
OOsphere France
(33) 4 37 49 01 28
-----Message d'origine-----
De: Kasrul Islam [SMTP:kasrul.islamchordiant.com]
Date: vendredi 3 mars 2000 21:04
A: kamranaminyahoo.com
Objet: (forte-users) Large integer values
Hi,
Can anyone out there help with a little problem, I have string of numbers
that I have extracted out of a file, the numbers are all over 10 digits
when I try to convert this string into a Integer the number gets changed to
something weird for example.
Txt : TextData = new(Value = '12345');
mInt : IntegerData = new(Value = Txt.IntegerValue);
this works fine but when I try a number like this :
Txt : TextData = new(Value = '951475978067');
mInt : IntegerData = new(Value = Txt.IntegerValue);
then I get the following value in my integerdata object : 2147483647 any
help will be appreciated, I really need to get the above value as an
integer because I need to do some calculations with it.
Thanks in advance.
Kasrul Islam.
<< Fichier: ATT00000.html>>

Similar Messages

  • Assigning enum a integer value

    hellow, please is there any way to assign items of enum type a integer value.
    I have enum SizeOfGrid
    9x9,
    16x16,
    25x25,
    and i need to assign an integer value to each items
    so i can create new grids like new Grid(9x9.value) or something
    and not using switch each time like:
    Switch(sizeOfGrid)
    case 9x9:
    value = 9;
    etc.
    I need to preserve the type enum, because i need it to be type-safe.
    So please is there any way to do that? Thanks a lot.

    does your code even compile right now? i thought enum values could not start with a number.
    when you declare an enum it gets compiled to a class, and the values that you specify are instances of that class, so you can give it any methods you like, for example:
    enum SizeOfGrid {
        SMALL(9),
        MEDIUM(16),
        LARGE(25);
        private int size;
        private SizeOfGrid(int size) {
            this.size = size;
        public int getSize() {
            return size;
    }Then to get back the size you can do:
    int size = SizeOfGrid.SMALL.getSize();

  • Getting integer values from a JTable

    Hello
    The table's cells contain integer values. I would like to save each one of theme them in an array of integers.
    The problem is, I don't know how to do so. I tried to use the getValueAt method, but I always get error messages.
    I tried something like:
    Object o = table.getModel().getValueAt(i, j);
    a[x]=Integer.parseInt(o.toString());Please help.
    Thank you. :)

    WalterLaan wrote:
    The next line in the exception stacktrace contains a class name and a line number. So go to that class source file and that line number and fix the problem there.Yes, guenouni, we're not mind readers. You need to be clearer and give precise details. The single best way to get the most useful possible help is to take a few minutes and write and post a SSCCE . If you do that, it will show your serious.

  • Passing multiple integer values as parameter in SSRS

    Hello,
    I am trying to pass a comma separated multiple integer value parameter in SSRS report and it errors out complaining that it is not able to convert the nvarchar value to datatype int. But it works fine when I pass a single value. Here is the code I am using
    for the report and I am stuck at passing multiple values.
    SELECT
    id,count(*) as cnt
    from table
    and ID in (@id) group by id
    eg: if I pass 10,20,30 then I would get error however if I pass 10 then it works fine
    Is there a different method to pass multiple integer values?
    Thanks for your help.

    A comma is, of course, a textual character and not an integer, thus the error you are getting. Multi-value parameters can be used for this.
    Select "Allow multiple values"and set data type to Integer. Multi-value parameters deliver the values as an array. The query interface is smart enough to convert them to the proper syntax (comma-delimited) automatically so a statement like:
    WHERE Field IN (@id)
    where the parameter has an array of values {1, 2, and 3} is interpreted as:
    WHERE Field IN (1,2,3)
    You do not need to manually convert it in a transact SQL query. That is not the case for displaying the value array in your report. If you wish to display the array (described above) in your report as "1, 2, 3", you will need to use a join expression:
    =Join(@id, ", ")
    As DJ described, the other part to a multivalue parameter is the Available values. These can be set explicitly but given your example, I think it would be best to create a new dataset that retrieves a distinct list of the IDs that can be retrieved, perhaps
    something like:
    SELECT DISTINCT GroupName, GroupID
    FROM table
    WHERE [criteria]
    Set the available values to use this query with GroupName (or whatever user-friendly field you choose for your dataset) as the label and the id as the value. The label field should be something the the target report user can easily identify the correct group
    using.
    If you don't want to or can't use a multivalue parameter for some reason then you will need to manipulate your parameter value prior to consuming it in your query. When you add the parameter to the TSql query and save the dataset, SSRS adds it to the Parameters
    property of the dataset. Open the dataset properties and select the parameters tab. You should see your parameter in the list. click the expression builder (fx) button next to the value and enter this expression:
    =Split(@id,",")
    Note that the second element of the expression is the delimiter. If your text input has comma-space as a delimiter (1, 2, 3 vs 1,2,3) then that element must include ", ". My example just has comma so if you use that with a string "1, 2, 3"then
    the resulting array will still have 3 elements but the 2nd and 3rd elements of the array will have a preceding space which will cause your dataset to error with the same error. As long as there are no non-numeric characters in any of the elements, the split6
    will create the text array, SSRS will dynamically generate the correct "IN"syntax (comma separated) and SQL will convert the elements from VARCHAR to INT on the fly.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • Help with passing integer value in A.S.S

    I get an NSinternal script error while trying to pass this value can anyone help?
    Also I wonder if it is possible to pass the value to a matrix
    on clicked theObject
    tell button "checkbox" of window 1
    if integer value = 1 then
    set button "checkbox2" of window 1 to integer value = 1
    else
    set integer value to 0
    end if
    end tell
    end clicked
    I also tried:
    if state of button "checkbox" of window1 is 1 then
    set the state of button "checkbox2" of window1 to 1
    end if
    Message was edited by: Doug Bassett

    I've been following this thread and trying to figure out how to make this work. I was getting inconsistent results or errors with most of the code that has been posted. But I finally got it working... at least on a Leopard machine (not sure if this could have changed between Tiger and Leopard so your mileage may vary).
    What I found was that a checkbox button that's located directly in a window seems to have a state that's equal to 0 when it's unchecked and 1 when it's checked. But a checkbox cell that's contained within a matrix seems to have a state that's set to either _off state_ or _on state_. Trying to set a cell's state to 0 or 1 simply wasn't working right for me. So I get the state of the "selectall" checkbox button (which is a 0/1) and transform it to either "off state" or "on state" before setting the states of the checkbox cells in the matrix.
    Here's my code:
    on clicked theObject
    set n to name of theObject
    if n = "selectall" then
    set s to state of theObject
    log "state: " & s
    if s = 0 then
    set newState to off state
    else
    set newState to on state
    end if
    repeat with i from 1 to count of cells of matrix "directories" of window "main"
    tell cell i of matrix "directories" of window "main"
    set state to newState
    end tell
    end repeat
    return
    end if
    if n = "logStatesBtn" then
    logStates()
    return
    end if
    end clicked
    on logStates()
    log "Logging states:"
    set s to state of button "selectall" of window "main"
    log "selectall checkbox: " & s
    repeat with i from 1 to count of cells of matrix "directories" of window "main"
    tell cell i of matrix "directories" of window "main"
    set s to state
    end tell
    log "Cell " & i & ": " & s
    end repeat
    end logStates
    Note the "logStates" handler is just something I connected up to a "logStatesBtn" button in my window that lets me spit out the states of all the checkboxes into the console log. This is how I actually discovered that the cells were set to "off state" or "on state".
    Steve

  • How to set a default integer value in a form

    I have a form defined as follows:
    =================================================
    public static class ProjectForm extends FormData
    private int idx;
    private String name;
    private String projectNumber;
    private String description;
    public void setIdx(int index)
    this.idx = idx;
    public int getIdx(){
    return this.idx;
    public void setName(String name)
    this.name = name;
    public String getName()
    return this.name;
    public void setDescription(String description)
    this.description = description;
    public String getDescription()
    return this.description;
    public void setProjectNumber(String projectNumber)
    this.projectNumber = projectNumber;
    public String getProjectNumber()
    return this.projectNumber;
    ======================================================
    When I add a new entry into the database, I have no issues. However, when I want to modify an entry I run into some issues with the idx entry. For some reason, I cannot set a default value into the netui:label tag. My jsp code is as follows:
    ===================================================
    <tr valign="top">
    <td>
    Index:
    </td>
    <td>
    <netui:label value="{actionForm.idx}"
    defaultValue="{pageFlow.project.idx}"/>
    </td>
    </tr>
    <tr valign="top">
    <td>
    Name:
    </td>
    <td>
    <netui:textBox dataSource="{actionForm.name}"
    defaultValue="{pageFlow.project.name}"/>
    </td>
    </tr>
    <tr valign="top">
    <td>
    ProjectNumber:
    </td>
    <td>
    <netui:textBox dataSource="{actionForm.projectNumber}"
    defaultValue="{pageFlow.project.projNum}"/>
    </td>
    <tr valign="top">
    <td>
    Description:
    </td>
    <td>
    <netui:textBox dataSource="{actionForm.description}"
    defaultValue="{pageFlow.project.description}"/>
    </td>
    </tr>
    ======================================================
    The the project class is passes into the page and has the appropriate values. The name, project number and description fields work as I would expect. However, the idx value is alway '0'. If I print out pageFlow.project.idx it has the correct value.
    How do I fix this? My feeling is that it is related to the form field being an int and not a string. The default parameter indicates that is only works with null values, and ints default to zero. Do I need to use an Integer value instead in the form, or just stay away from non-string form fields.
    Thank for the help!!
    --John                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    In the action which displays the edit page just set the form idx value before displaying the jsp.

  • Jvm startup fails with error when using large -Xmx value

    I'm running JDK 1.6.0_02-b05 on RHEL5 server. I'm getting error when starting the JVM with large -Xmx value. The host has ample memory to succeed yet it fails. I see this error when I'm starting tomcat with a bunch of options but found that it can be easily reproduced by starting the JVM with -Xmx2048M and -version. So it's this boiled down test case that I've been examining more closely.
    host% free -mt
    total used free shared buffers cached
    Mem: 6084 3084 3000 0 184 1531
    -/+ buffers/cache: 1368 4716
    Swap: 6143 0 6143
    Total: 12228 3084 9144
    Free reveals the host has 6 GB of RAM, approximately half is available. Swap is totally free meaning I should have access to about 9 GB of memory at this point.
    host% java -version
    java version "1.6.0_02"
    Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
    Java HotSpot(TM) Server VM (build 1.6.0_02-b05, mixed mode)
    java -version succeeds
    host% java -Xmx2048M -version
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    java -Xmx2048M -version fails. Trace of this reveals mmap call fails.
    mmap2(NULL, 2214592512, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)
    Any ideas?

    These are the relevant java options we are using:
    -server -XX:-OmitStackTraceInFastThrow -XX:+PrintClassHistogram -XX:+UseLargePages -Xms6g -Xmx6g -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=128m -XX:MaxPermSize=192m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:+ExplicitGCInvokesConcurrent -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.awt.headless=true
    This is a web application that is very dynamic and uses lots of database calls to build pages. We use a large clustered cache to reduce trips to the database. So being able to acces lots of memory is important to our application.
    I'll explain some of the more uncommon options:
    We use the Concurrent Garbage collector to reduce stop the world GC's. Here are the CMS options:
    -XX:+UseConcMarkSweepGC
    -XX:+CMSClassUnloadingEnabled
    -XX:+CMSPermGenSweepingEnabled An explicit coded GC invokes the Concurrent GC instead of the stop the world GC.
    -XX:+ExplicitGCInvokesConcurrentThe default PermSizes where not large enough for our application. So we increased them.
    -XX:PermSize=128m
    -XX:MaxPermSize=192mWe had some exceptions that were omitting their stack traces. This options fixes that problem:
    -XX:-OmitStackTraceInFastThrowWe approximate between 10% to 20% performance improvement with Large Page support. This is an advance feature.
    -XX:+UseLargePagesUseLargePages requires OS level configuration as well. In SUSE10 we configured the OS's hugepages by executing
    echo "vm.nr_hugepages = 3172" >> /etc/sysctl.confand then rebooting. kernel.shmmax may also need to be modified. If you use Large Page be sure to google for complete instructions.
    When we transitioned to 64bit we transitioned from much slower systems having 4GB of ram to much faster machines with 8GB of ram, so I can't answer the question of degraded performance, however with our application, the bigger our cache the better our performance, so if 64bit is slower we more than make up for it being able to access more memory. I bet the performance difference depends on the applications. You should do your own profiling.
    You can run both the 32bit version and the 64bit version on most 64bit OSes. So if there is a significant difference run the version you need for the application. For example if you need the memory use the 64bit version if you don't then use the 32bit version.

  • Read integer values from spreadsheet and display the values in a table

    Hi all,
    I have integer values to read from a spreadsheet and display them in a table. I am using 'Read from spreadsheet file' in 'integer' mode. I would like to display these values in a table. The problem is that the table takes only 2d-array of string as input but not integer.  
    It works fine if I change the mode of 'Read from spreadsheet file' from 'integer' to 'string' but I want to read integers and have to use the integer values for further calculations. Please give any suggestions on displaying integers to a table.
    Thank you. 
    Solved!
    Go to Solution.

    No don't take element by element just convert as a whole. See the attached example
    Good luck
    The best solution is the one you find it by yourself

  • Why do i get integer values instead of decimals when selecting a mysql table through an oracle xe DB?

    Hi
    My company just started a new project that implies migrating every hour operational data from a mysql database located at another company to our main DB (oracle10gR2). Between these two DB, we have an oracle XE DB which contains the database links to both DB and a procedure to get (from mysql) and insert (oracle10g) the values. What happens is that in the mysql DB, the values have decimals and, when i select the table in oracle, i only see integer values (no decimals). Here is an example of the select i use:
    SELECT "v_hour", "v_date", "v_type", "v_tabstamp","v_value"
    FROM "tab1"@mysql;
    How can i work around this problem?
    Many thanks!

    Maybe just a HS_LANGUAGE setting issue.
    You could try that:
    1a) in the gateway init file, please set HS_LANGUAGE=GERMAN_GERMANY.WE8ISO8859P1
    2a) now open a new SQL*Plus session ans select from your table using the gateway based database link
    => if the values are now including the decimal part then your foreign database is set up to use a comma as the decimal separator and you have to make sure that the HS_LANGUAGE contains a territory that uses as decimal separator a comma.
    If you still do not get the decimal values, then change it to:
    1b) HS_LANGUAGE=american_america.we8iso8859P1
    2b) Make sure you start again a new SQL*Plus session (the gateway init file is only read when you use the database link in your session for the first time (or explicit closed it before). Select again from your table.
    => is the decimal part now visible?
    More details can be found in the gateway note: Gateway and Decimal Digits(Doc ID 1453148.1) available from My Oracle Support portal.
    - Klaus

  • Insert Large Binary Values

    Hi all.,
    I want to insert a very large binary value of about 40000 character into database table i have tried by using clob datatype and blob datatype but all my efforts where ended in vain..
    So can any one help me on this......
    Thanks In advance

    You should use the dbms_lob package.
    RTM first, then ask.

  • Convert an integer value that was created with the Excel DATEVALUE formula to a valid date?

    Hello everyone,
    How can I convert an integer value that was created with the Excel DATEVALUE formula to a valid date in SSIS?
    Is this even possible?
    For example:
    =DATEVALUE("8/22/2008") will format the cell to display 39682.
    Reading the column as a string to get the int value (39682) - how can I turn this into a valid date using SSIS and then importing the real date to sql server?
    Thank you!

    You can use Script component for this and convert your integer values to Date. An example here is following:
    CultureInfo provider = CultureInfo.InvariantCulture;
    string dateString = "08082010";
    string format = "MMddyyyy";
    DateTime result = DateTime.ParseExact(dateString, format, provider);
    Source: http://stackoverflow.com/questions/2441405/converting-8-digit-number-to-datetime-type
    Vikash Kumar Singh || www.singhvikash.in

  • Change integer value to string?

    Hi all,
    I was wondering if it is possible to change an integer value to a string. I saw in this forum that a string can be changed to an integer using parseInt and I was wondering if there is a similar method for going the other way.
    Regards.

    try this
    Integer.toString(intvalue);
    where intvalue is an int like 5.
    hope this helps.
    Takis

  • How to display integer values and decimal values in same column in a table

    hi 
    in my report amount column is there in that column integer values (2234) and decimal values (3562.34) 
    i want to print this values as 1000 separate as like 2,234 as integer and 3,562.34 as decimal
    but this values print like 2,234.00 as integer and 3,562.34 as decimal

    Hi akilreddy,
    Per my understanding you have an field which data type may be "float" in the DB, so it have value which format like "2234" and "3562.34" in the same column, now you want to format them differently in the report, right?
    I have tested on my local environement and you can use the expression in the custom format in the Textbox properties to do this:
    Right click the field which you want to add the format and select the "Text Box Properties"
    Select the "Number" on the left pane and using expression below in the Custom format:
    =IIF(Split(Fields!yourfieldname.Value,".").Length=2,"#,###.##",Nothing)
    Or you can just use "#,###.##" in the format.
    Preview you will go the result like below:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Putting integer value of 163 into byte array

    I have an integer value of 163. I need to put that into a byte array. When i do, it puts it as -93. Whats wrong? and how can i put it in correctly?

    Hi,
    You cannot store 163 in a byte variable. In Java a byte variable will have only 8 bits and its value range will be from -128 to +127. In a byte variable you cannot store a value which is out of this range. If you try to cast an integer value which is out of this range to byte then you will get unexpected results (But you can find what the result will be).

  • Wanna send integer value by reference in function

    I wanna send integer value by reference thro' function. Here's the code going.
    class test
    basic b = new basic();
    test()
    test2.Fuction(b.value);
    class basic
    int value;
    basic(){}
    //////here i want value to be affected by Function.I don't want it affected by value, but by reference.
    class test2
    public static void Function(int value)
    value++;

    If you want to update the value in your b object, then you have to pass the reference of that object to test2.Function(..). Here is one way to do it:
    class test {
      basic b = new basic();
      test() {
        test2.Function(b);
    class test2 {
      public static void Function(basic b) {
        b.value++;
    }It's a good idea to follow the java naming convention. Classes should begin with an upper case letter. Methods and variable names with a lover case letter (but final static variables with all upper case letters).

Maybe you are looking for

  • Mac OS X 10.4.11 - Safari Version Issue

    Hello Everyone, This is my first post into this forum. so let me tell you something about my profession. Basically i am an interactive developer working on HTML, CSS & javascript, AJAX with some graphic desgining on tools like photoshop and flash on

  • Touchpad detected as PS/2 Logitech Wheel Mouse

    Hi, The touchpad on my Asus U46SV laptop is being detected as a PS/2 Logitech Wheel Mouse. Therefore no touchpad driver is loaded and all fancy features (two-finger scrolling, disable while typing, etc) are unavailable. How can I fix this? $ xinput l

  • Is it possible to import fast a word.doc into Indesign

    Hallo, I am producing department documents. Now I have some problems because I created them in word from microsoft. Is it possible to import the word documents into the indesign format in an easy way? It should be time safing and effective. I would b

  • HTTP Sessions...help

    dere r 2 servlets and sessions are created in each. Now when i try to retrive d attributes set in first servlet in the second servlet, d attributes set in d first servlet r not getting retrived in d 2 servlet. can some1 pls tell me y this happens?

  • Still can't pair iPad Air to keyboard from older iMac.  Shut off blue tooth on older iPad

    Still doesn't see it (keyboard) to pair with...maybe not to be. mizzou