Check input  values are available in Hex

how to check input values are available between 0x0000000000000001 to
0xFFFFFFFFFFFFFFFE
i am using following code. but error will come
public boolean hexCheck16(String hex)
String hex_min = "0x0000000000000001";
String hex_max = "0xFFFFFFFFFFFFFFFE";
     int min1 = Integer.parseInt(hex_min.substring(2).toString(),16);
     int max2 = Integer.parseInt(hex_max.substring(2).toString(),16);
     int num = Integer.parseInt(hex.toString(), 16);
     if(num >= min1 & num <= max2)
     return true;
     else
     return false;
Error is : java.lang.NumberFormatException: For input string: "FFFFFFFFFFFFFFFE"
how to solve?

Use BigInteger (and lose the "0x").

Similar Messages

  • Thanks for the Firefox 4 upgrade. Here is my concern - Previously, the "Check for updates" option is found under the Help menu. In Firefox 4, I cannot find this option; how will we be able to check if there are available updates?

    Previously, the "Check for updates" option is found under the Help menu. In Firefox 4, I cannot find this option; how will we be able to check if there are available updates?
    Can this new version update itself automatically? How do I set this option?

    Why do developers move stuff just to move it?

  • UDF Required for checking input value.

    Hi,
         I'm in need of an UDF for checking the input value and pass constant based on that.
    Requirement.
                        We are having 1 field on the source side which need to be checked.
                        If the first character of the input is alphabet (No case sensitive)
                        then pass a constant "X" to the output field.
                        Other wise donot create that particular element.
    Example : If INPUT = A12345 then OUTPUT = X
                    If INPUT = 12345D then OUTPUT element must not be created.
    Regards,
    Swapna

    use the following code in a udf and then pass the result to createIf standard function to help you with the requirement.
    String chkValue = input.subString(0,1);
    String flag = "false";
    if ((chkValue >= 'A' && chkValue <= 'Z') || (chkValue >= 'a' && chkValue <= 'z')) {
    flag = "true";
                          return flag;
    else
    {return flag;}

  • Check if values are 0.00

    I need to check if the field X in the query is 0.00. If so, then display "HELLO" in the table field Y.
    Thanks,

    Kevin,
    you could add an additional field to the output port of the query (for table field Y), and calculate its value dynamically by using the formula -->if(@x == 0.0, 'Hello','Others')
    prachi

  • SQL function to retrieve records only if all the values are available.

    Hi,
    I have a sales table on which i run a parameterized query.
    We pass a few week IDs to retrieve store sales.
    I need to retrieve only those stores that has sales in all the week IDs passed.
    If i use the in operator, i am getting the store data even if there is sales for only one week.
    Is there a function in oracle to do this?
    Thanks,
    Sharan.

    Hi, Sharan,
    Here's how you could use the analytic COUNT function:
    WITH     got_week_cnt     AS
         select  week_id, store_id, prod_desc, sales_units_raw, sales_value_raw
         ,     COUNT (DISTINCT week_id) OVER (PARTITION BY  store_id)            AS week_cnt
         from     sales_store_dwh
         where      week_id in (&&Week_ID_CSV)
    select  week_id, store_id, prod_desc, sales_units_raw, sales_value_raw
    FROM     got_week_cnt
    WHERE     week_cnt  = 1 + LENGTH ('&&Week_ID_CSV')
                    - LENGTH (REPLACE ('&&Week_ID_CSV', ','))
    ;Notice that the sub-query got_week_cnt is just your original query, with the COUNT function added.
    You didn't post your tables or results, so I can't test it.
    You didn't say what version you're using, so I made a conservative guess (Oracle 9 or higher). In Oracle 11, there's a simpler way to find the number of weeks passed.

  • Input values in the result area

    Hi Bw gurus,
    Could you plz tell me to eliminate the Input values displayed between the Navigation block and the Result area.
    I mean if we give some input range in the variable screen the range(Input)values are displayed in the Result area.Also if we give some 1000 multiple single values in the variable selection screen after executing it displyed
    1000 input values in the result.
    I need to elimeinate this.so how can i do this.
    the requirement is very urgent.
    Regards,
    Rambo.

    Hi Rambo,
    Open query in BEx Analyzer, it'll be embedded into a workbook.
    Use Layout/Dasplay text elements icon or menu path.
    There you'll see the option to show variables. Don't use it and variable's values shouldn't show up!
    And don't use show all.
    Best regards,
    Eugene
    Message was edited by: Eugene Khusainov

  • Authority Check on Value within standard transactions

    Hi Guruus !
    Let's state that a user is allowed and has the profile/role to access a given transaction, let's say MI01, but ME21N will do to !
    Now, actually, users are supposed an that project to be authorized on certain Storage Location (LGORT). How can we set the system so that they can input Storage Location Value they're not authorized on ?
    Is there a standard way to do that ? Or do we have to use some Exit/BAdI in every transactions to check if the input value are correct ?
    I also have the same concern about report transaction, such as ME2K (for example), while executinf (F8) them.
    Thx in advance for your clue,
    N H

    Hi,
    This is a BASIS Issue. Get in touch of your BASIS guy and let him know about anything that you are doing.
    I believe a Standard Authority Object should serve your purpose...Look into the Txn Code SU21 and talk 2 your BASIS Guy.
    Else You can create a Z Authority Object to achieve this Functionality.
    Create an authorization class with SU21 and then create authorization object under it which correspond
    to the your desired tcode. The authorization field is ACTVT. Then go to SE93 and attach the object with the Tocde.
    you have to associate the Authority Object to a role in PFCG.
    Regarding Report Txn, You need to do the same...

  • Authority Check on Value within standard transaction

    Hi Guruus !
    Let's state that a user is allowed and has the profile/role to access a given transaction, let's say MI01, but ME21N will do to !
    Now, actually, users are supposed an that project to be authorized on certain Storage Location (LGORT). How can we set the system so that they can input Storage Location Value they're not authorized on ?
    Is there a standard way to do that ? Or do we have to use some Exit/BAdI in every transactions to check if the input value are correct ?
    I also have the same concern about report transaction, such as ME2K (for example), while executinf (F8) them.
    Thx in advance for your clue,
    N H

    Hi,
    Please get the SU53 screen shot form user when he found error any object value then you will see the su53 screen shot complete path and assign accordingly.
    Anil

  • Xcelsius -webservice-input values

    Hi Experts,
    i have a problem regarding xcelsius dashboard .
    i have done a connection between R/3 and Xcelsius using FM and showing the result in the BSP page. it is working.
    Now i created dashboard, using web service
    here input values are TOLOG, Username and Compif, all are selected single cell on excel.In each input value filed i have a selektion possibility als drop down. By running the dashboard it is not working.
    How i can give the input value by running the dashboard so that the selected value appear?
    It should work like Webservice test
    Thank you in advance

    Hi
    No there isn't.  You have to use additional components like a Spreadsheet or Grid component, or even individual Labels to get the values 'onto' the graphic.
    Regards
    Charles

  • How to check the value from user input in database or not?

    Hello;
    I want to check the value of user input from JtextFiled in my database or not.
    If it is in database, then i will pop up a window to tell us, otherwise, it will tell us it is not in database.
    My problem is my code do not work properly, sometimes, it tell me correct information, sometime it tell wrong information.
    Could anyone help,please.Thanks
    The following code is for check whether the value in database or not, and pop up a window to tell us.
    while( rs.next()) {
                    System.out.println("i am testing");
                    bInt=new Integer(rs.getInt("id"));
                    if(aInt.equals(bInt)){ // If i find the value in data base, set flag to 1.
                  flag=1;  //I set a flag to check whether the id in database or not
                        break;
             System.out.println("falg" + flag);
                if(flag==1){ //?????????????????????
              String remove1 = "DELETE FROM Rental WHERE CustomerID=" + a;
              String remove2 = "DELETE FROM Revenus WHERE CustomerID=" +a;
              String remove3 = "DELETE FROM Customer WHERE id=" +a;
              s.executeUpdate(remove1);
              s.executeUpdate(remove2);
              s.executeUpdate(remove3);
                    JOptionPane.showMessageDialog(null,"you have success delete the value");
              s.close();
             else//???????????????????????????????
                  JOptionPane.showMessageDialog(null,"I could not found the value"); -------------------------------------------------------------------
    My whole program
    import java.sql.*;
    import java.awt.BorderLayout;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JOptionPane;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    public class DeleteC extends JFrame
        public static int index=0;   
        public static ResultSet rs;
        public static Statement s;
        public static Connection c;
        public static  Object cols[][];
        private static JTable table;
        private static JScrollPane scroller;
        private static int flag=0;
        public DeleteC()
            //information of our connection
            //the url of the database: protocol:subprotocol:subname:computer_name:port:database_name
            String strUrl      = "jdbc:oracle:thin:@augur.scms.waikato.ac.nz:1521:teaching";
            //user name and password
            String strUser      = "xbl1";
            String strPass      = "19681978";
            //try to load the driver
            try {
                Class.forName("oracle.jdbc.driver.OracleDriver");
            catch (ClassNotFoundException e) {
                System.out.println( "Cannot load the Oracle driver. Include it in your classpath.");
                System.exit( -1);
            //a null reference to a Connection object
            c = null;
            try {
                //open a connection to the database
                c = DriverManager.getConnection( strUrl, strUser, strPass);
            catch (SQLException e) {
                System.out.println("Cannot connect to the database. Here is the error:");
                e.printStackTrace();
                System.exit( -1);
           //create a statement object to execute sql statements
        public void getData(String a){
            try {
             //create a statement object to execute sql statements
             s = c.createStatement();
                int index=0;
                Integer aInt= Integer.valueOf(a);
                Integer bInt;
                  //our example query
                String strQuery = "select id from customer";
                //execute the query
                ResultSet rs = s.executeQuery( strQuery);
                //while there are rows in the result set
                while( rs.next()) {
                    System.out.println("i am testing");
                    bInt=new Integer(rs.getInt("id"));
                    if(aInt.equals(bInt)){
                  //JOptionPane.showMessageDialog(null,"I found the value"); 
                  flag=1;
                        break;
             System.out.println("falg" + flag);
                if(flag==1){
              String remove1 = "DELETE FROM Rental WHERE CustomerID=" + a;
              String remove2 = "DELETE FROM Revenus WHERE CustomerID=" +a;
              String remove3 = "DELETE FROM Customer WHERE id=" +a;
              s.executeUpdate(remove1);
              s.executeUpdate(remove2);
              s.executeUpdate(remove3);
                    JOptionPane.showMessageDialog(null,"you have success delete the value");
              s.close();
             else
                  JOptionPane.showMessageDialog(null,"I could not found the value");
            catch (SQLException e) {
                 JOptionPane.showMessageDialog(null,"You may enter wrong id");
    My main program for user input from JTextField.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.util.*;
    public class EnterID extends JFrame{
        public JTextField tF1;
        public EnterID enID;
        public String tF1Value;
        private JLabel label1, label2, label3;
        private static JButton button;
        private static ButtonHandler handler;
        private static String aString;
        private static Integer aInteger;
        private static Integer checkV=0;
        public static void main(String args[]){
           EnterID eId= new EnterID();
       public EnterID(){
          handler=new ButtonHandler();
          Container c= getContentPane();
          c.setLayout(new GridLayout(3,1));
          button= new JButton("ok");
          button.addActionListener(handler);
          label1 = new JLabel(" CustomerID, Please");
          label2 = new JLabel("Label2");
          label3 = new JLabel();
          label3.setLayout(new GridLayout(1,1));
          label3.add(button);
          label2.setLayout(new GridLayout(1,1));
          aString = "Enter Id Here";
          tF1 = new JTextField(aString);
          label2.add(tF1);
          c.add(label1);
          c.add(label2);         
          c.add(label3);            
          setSize(150,100);
          setVisible(true);     
       private class ButtonHandler implements ActionListener{
         public void actionPerformed(ActionEvent event){
             tF1Value=tF1.getText();
            //   CheckData cData = new CheckData();
             //  aInteger = Integer.valueOf(tF1Value);      
             if(tF1Value.equals(aString)){
              JOptionPane.showMessageDialog(null,"You didn't type value into box");
              setVisible(false); 
            else {
                DeleteC dC= new DeleteC();
                dC.getData(tF1Value);
                setVisible(false); 
    }

    You may have working code now, but the code you posted is horrible and I'm going to tell you a much much much better approach for the JDBC part. (You should probably isolate your database code from your user interface code as well, but I'm skipping over that structural problem...)
    Do this instead:
        public void getData(String a){
            PreparedStatement p;
            String strQuery = "select count(*) the_count from customer where id = ?";
            try {   
             //create a prepared statement object to execute sql statements, it's better, faster, safer
             p = c.prepareStatement(strQuery);
                // bind the parameter value to the "?"
                p.setInt(1, Integer.parseInt(a) );
                //execute the query
                ResultSet rs = p.executeQuery( );
                // if the query doesn't throw an exception, it will have exactly one row
                rs.next();
                System.out.println("i am testing");
                if (rs.getInt("the_count") > 0 ) {
                // it's there, do what you need to...
             else
                  JOptionPane.showMessageDialog(null,"I could not find the value");
            catch (SQLException e) {
                 // JOptionPane.showMessageDialog(null,"You may enter wrong id");
                 // if you get an exception, something is really wrong, and it's NOT user error
            // always, always, ALWAYS close JDBC resources in a finally block
            finally
                p.close();
        }First, this is simpler and easier to read.
    Second, this retrieves just the needed information, whether or not the id is in the database. Your way will get much much slower as more data goes into the database. My way, if there is an index on the id column, more data doesn;t slow it down very much.
    I've also left some important points in comments.
    No guarantees that there isn't a dumb typo in there; I didn't actually compile it, much less test it. It's at least close though...

  • In iTunes on my windows 7 PC, the Edit/Preferences dropdown window,some of the tab windows are not large enough to see all options that are available.  The borders of the window cannot be draged larger.  As a result, I can not uncheck or check some box's.

    In iTunes on my windows 7 PC, in the Edit/Preferences dropdown window,some of the tab windows are not large enough to see all options that are available.  The borders of the window cannot be draged larger.  As a result, I can not uncheck or check some box's on several of the preferences pages.  The Apple people at the store did not help.  I have lownloaded the latest version of iTunes and this is still an issue.  HELP.

    Is there really nobody else with this problem? Really?

  • Table Parameter Values Are Input To RFC?

    Hi,
    My Requirement is Table Parameter Values are Input RFC.
    We have Table Parameter With Project ID Column and Multiple Rows.
    User Need To Enter Project id's in Table And Submit.The Result can be displayed.
    In My Scenario User Need to enter the values in table.
    I Developed Webdynpro Application and Deployed.
    When i am trying to enter values into a table,table is not taking values.
    Because in My Requirment is the user enter morethan one project id in table.
    Thanks
    SubbaRao Chinta

    Hi,
    Can you please explain more clearly that what is the meaning of "Table not taking values"?
    Did you take the ColumnCellEditor(inputfield) for table column as input field.
    For example, You need to create a value node as below
    ProjectIdsNode (Value node with cardinality 0..n & selection 0...n)
        ---> ProjectId (Attribute)
    And bind this ProjectIds node to table UI element.  And bind ProjectId attribute to ColumnCellEditors(inputfield) value property.
    Now in submit action loop though this node and get all the values entered in ProjectId attribute.
    And set all these values into input of your RFC while executing to store in backend.
    Regards,
    Charan

  • Variable input values in the query are displayed wrong

    Hi experts,
    I executed a report and in the variable input screen it asks for a key date and company code.
    We entered key date and company code and executed the report.
    We want to take a print out of the output. But the variables which we entered in the variable screens are
    dispalying wrong. i.e if we have entered company code as gsml and key date as 01.01.2008.
    In the report output I am getting as:
    Company code: gsml
    Keydate: #..27-11-4745
    But keydate should be displayed as 01.01.2008
    How to solve this ?
    Regards,
    Nishuv.

    Nishuv,
    Please follow below steps:
    1. Open query through Bex - Query Designer
    2. Beneath the Rows Area( where you actually  drag in charactertistics), you'll be finding two tabs Filter and Rows/Columns
    3. Click on Filter Tab
    4.You'll be navigated to a window, there you can trace two Workareas
            a. Characteristic Restrictions: Where drag in the relevant Prompts/Input Variables
            b. Default Vaules
    5.First, Drag the required promts/Input Variables in Characteristics Restrictions.
    6.Click on the varible which was dragged in Characteristic Restriction area and drop it into default values area.
    7.Now you'll have visibility of variable in two regions, Characteristics and Default Values.
    8. Save and Execute the Query
    Regards,
    Yaseen

  • Any function to check the input value is integer?

    May I know if there's any function to check the input value is integer in Form 4.5?
    Thanks.

    just to add :) - (couldn't resist) :
    create or replace function is_integer ( p_number in varchar2 ) return boolean is
      v_return boolean := true;
      v_number number;
    begin
      v_number := p_number;
      if v_number != trunc(v_number) then
        v_return := false;
      end if;
      return v_return;
    exception
      when others then
        v_return := false;
        return v_return;
    end;
    begin
      if not is_integer(1.1) then
        dbms_output.put_line('is not');
      end if;
      if is_integer(1) then
        dbms_output.put_line('is');
      end if;
      if not is_integer('a') then
        dbms_output.put_line('is not');
      end if;
    end;

  • How to check no. of NIC cards which are available in Solaris 9 server.

    How to check no. of NIC cards which are available in Solaris 9 server.
    Regards,
    Dinesh.

    Hi
    For list network cards that was sometime registered in system:
    grep network /etc/path_to_inst | awk ' { print substr($3,2,length($3) -2 ) $2 } '
    ifconfig -a show all network interfaces that curently configured
    For check that interface that was listen at first comand available or not: Try
    ifconfg <interface_name> plumb
    ifconfg <interface_name> unplumb
    Do not touch already configured interface or lost network connection.
    Regards.

Maybe you are looking for