Checking for string

i now doing a student system.
Accepting student number ....
do
System.out.println("Student Number:");
s =in.readLine();
student_no =Integer.parseInt(s);
if(student_no<10000||student_no>100000)
System.out.println("Invalid student number.");
studentNo_valid = true;
else break;
}while(studentNo_valid);
Student had to enter their student number between 10000 - 99999
my Question is how to use try and catch to check if that when student enter string .. it will give warning to student

Look at
Integer.parseInt
new Integer(String)
and java.text.DecimalFormat
and pick the one that works for you.

Similar Messages

  • Checking for an element in a string from another string

    Hi Guru's,
    I have 2 comma seperated strings. Say like this.
    a VARCHAR2(100) := '1,2,3,4,5,6,7,8,9,10';
    b VARCHAR2(100) := '2,6,9';
    My requirement is like I want to check the string a, whether it has any of the element in b. I am trying to use the regular expression. But I was not able to do it.
    Kindly help me.
    Regards,
    VJ

    SQL> var cur refcursor
    SQL> declare
       a              varchar2 (100) := '1,2,3,4,5,6,7,8,9,10';
       b              varchar2 (100) := '2,6,9';
    begin
       open :cur for 'select column_value common
            from table (sys.dbms_debug_vc2coll (' || a || ') multiset intersect sys.dbms_debug_vc2coll (' || b || '))';
    end;
    PL/SQL procedure successfully completed.
    SQL> print
    COMMON                                                                                                                           
    2                                                                                                                                
    6                                                                                                                                
    9                                                                                                                                
    3 rows selected.

  • Best Way to Check for same Word in string?

    If I have an array of words, would the best way to check for the same word be to use 2 for loops?

    Huh?
    Sounds like homework...
    What is a word? Presumably a String.
    For equality of Strings you use...
        String s1 = ....
        String s2 =....
        if (s1 == s2) { equal depending on null case
        else if ((s1 != null) && (s1.equals(s2))) { equal }
    For the case of checking one array to another....
          while items in array1
                 get itema from array1
                      while items in array2
                           get itemb array2
                                  is itemb equal (see above) to itema
                                         yes - then do something

  • To check the string for a particular character

    i want to check the string contains ',' (comma) or not. can anyone help me?

    i want to check the string contains ',' (comma) or
    not. can anyone help me?you can use 'indexOf' method at string object
    String s1 = "test,tet1";
    boolean bfind = s1.indexOf(',') > -1 or
    boolean bfind = s1.indexOf(",") > -1

  • Check for null and empty - Arraylist

    Hello all,
    Can anyone tell me the best procedure to check for null and empty for an arraylist in a jsp using JSTL. I'm trying something like this;
    <c:if test="${!empty sampleList}">
    </c:if>
    Help is greatly appreciated.
    Thanks,
    Greeshma...

    A null check might not be you best option.  If your requirement is you must have both the date and time component supplied in order to populate EventDate, then I would use a Script Functoid that takes data and time as parameters.
    In the C# method, first check if either is an empty string, if so return an empty string.
    If not, TryParse the data, if successful, return a valid data string for EventDate.  If not, error or return empty string, whichever satsifies the requirement.

  • Checking for PDF 1.7 compatibility in Preflight (Acrobat 9 Pro)

    Hi,
    I've noticed that in the given Preflight profiles in Acrobat 9 there is no compatibility check for PDF 1.7, only 1.6. is there a profile i can load? or a set of checks i can make a profile in order to determine 1.7 compatibility?
    Thanks,
    Yair Agmon.

    Hi,
    Knowing a PDF file's version premits deduction of what version "compatibility" is present.
    Version 1.7 (Acrobat 8.x) lacks compatibility for Acrobat 9.x specific features.
    Version 1.6 (Acrobat 7.x) lacks compatibility for Acrobat 8.x specific features.
    And so forth.
    Certainly, not an elegantly simple approach; but, nevertheless it is functional.
    Using Acrobat Professional/Extended 9.x -
    Open the Preflight dialog.
    Advanced > Preflight
    From the Options drop-down menu, Select "New Preflight Profile".
    The Prefight: Edit Profile dialog opens.
    A default profile name is provided (New Profile <number>).
    Initially, Click the Save button to save the profile. You can rename it later.
    Note that "New Profile" is placed in "Custom
    Now, locate your "New Profile" in the column at the left of the dialog and select
    "Custom checks".
    The available custom checks list loads in the pane to the right.
    Above and to the right is a "Find" field.
    Enter the string "version".
    A filtered list appears.
    A custom check is available for "versions newer than":
    1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7
    and there is a custom check for "version older than 1.3".
    Add the desired custom check to the profile. Save.
    Configure the check for Error | Warning | Info
    Info is "Notification" in the report that can be provided.
    Once you have configured "New Profile" it can be used by a Batch Sequence to check multiple files.
    When a Preflight is selected for use by a Batch Sequence you can configure for a "on success" and/or "on error" report.
    Be well...

  • Failing all pre-requisite checks for 11.2.0.2.0 RAC on HP-UX Itanium 64

    Hi Guys,
    For Typical OR Advanced Grid Installation (GUI), all pre-requisites are failing on both nodes, like memory, swap, node reachability, groups, user & lot more.....
    But when I try to check Pre-requisite from command line, everything seems to be ok.
    This is what the output...
    $ ./runcluvfy.sh stage -pre crsinst -n sph1erp,sph2erp -fixup -verbose
    Performing pre-checks for cluster services setup
    Checking node reachability...
    Check: Node reachability from node "sph1erp"
    Destination Node Reachable?
    sph1erp yes
    sph2erp yes
    Result: Node reachability check passed from node "sph1erp"
    Checking user equivalence...
    Check: User equivalence for user "oracle"
    Node Name Comment
    sph2erp passed
    sph1erp passed
    Result: User equivalence check passed for user "oracle"
    Checking node connectivity...
    Checking hosts config file...
    Node Name Status Comment
    sph2erp passed
    sph1erp passed
    Verification of the hosts config file successful
    Interface information for node "sph2erp"
    Name IP Address Subnet Gateway Def. Gateway HW Address MTU
    lan2 10.10.16.51 10.10.16.48 10.10.16.51 10.10.1.12 78:AC:C0:8A:07:76 1500
    lan900 10.10.1.174 10.10.0.0 10.10.1.174 10.10.1.12 78:AC:C0:8A:07:6E 1500
    Interface information for node "sph1erp"
    Name IP Address Subnet Gateway Def. Gateway HW Address MTU
    lan2 10.10.16.50 10.10.16.48 10.10.16.50 10.10.1.12 3C:4A:92:48:71:BE 1500
    lan900 10.10.1.173 10.10.0.0 10.10.1.173 10.10.1.12 3C:4A:92:48:71:B6 1500
    Check: Node connectivity of subnet "10.10.16.48"
    Source Destination Connected?
    sph2erp[10.10.16.51] sph1erp[10.10.16.50] yes
    Result: Node connectivity passed for subnet "10.10.16.48" with node(s) sph2erp,sph1erp
    Check: TCP connectivity of subnet "10.10.16.48"
    Source Destination Connected?
    sph1erp:10.10.16.50 sph2erp:10.10.16.51 passed
    Result: TCP connectivity check passed for subnet "10.10.16.48"
    Check: Node connectivity of subnet "10.10.0.0"
    Source Destination Connected?
    sph2erp[10.10.1.174] sph1erp[10.10.1.173] yes
    Result: Node connectivity passed for subnet "10.10.0.0" with node(s) sph2erp,sph1erp
    Check: TCP connectivity of subnet "10.10.0.0"
    Source Destination Connected?
    sph1erp:10.10.1.173 sph2erp:10.10.1.174 passed
    Result: TCP connectivity check passed for subnet "10.10.0.0"
    Interfaces found on subnet "10.10.0.0" that are likely candidates for VIP are:
    sph2erp lan900:10.10.1.174
    sph1erp lan900:10.10.1.173
    Interfaces found on subnet "10.10.16.48" that are likely candidates for a private interconnect are:
    sph2erp lan2:10.10.16.51
    sph1erp lan2:10.10.16.50
    Result: Node connectivity check passed
    Check: Total memory
    Node Name Available Required Comment
    sph2erp 63.9GB (6.7004024E7KB) 4GB (4194304.0KB) passed
    sph1erp 63.9GB (6.7004024E7KB) 4GB (4194304.0KB) passed
    Result: Total memory check passed
    Check: Available memory
    Node Name Available Required Comment
    sph2erp 53.3556GB (5.5947372E7KB) 50MB (51200.0KB) passed
    sph1erp 52.2323GB (5.47695E7KB) 50MB (51200.0KB) passed
    Result: Available memory check passed
    Check: Swap space
    Node Name Available Required Comment
    sph2erp 188.7773GB (1.97947352E8KB) 4GB (4194304.0KB) passed
    sph1erp 188.7773GB (1.97947352E8KB) 4GB (4194304.0KB) passed
    Result: Swap space check passed
    Check: Free disk space for "sph2erp:/var/tmp/"
    Path Node Name Mount point Available Required Comment
    /var/tmp/ sph2erp /var 13.8074GB 1GB passed
    Result: Free disk space check passed for "sph2erp:/var/tmp/"
    Check: Free disk space for "sph1erp:/var/tmp/"
    Path Node Name Mount point Available Required Comment
    /var/tmp/ sph1erp /var 13.8158GB 1GB passed
    Result: Free disk space check passed for "sph1erp:/var/tmp/"
    Check: User existence for "oracle"
    Node Name Status Comment
    sph2erp exists(199) passed
    sph1erp exists(199) passed
    Checking for multiple users with UID value 199
    Result: Check for multiple users with UID value 199 passed
    Result: User existence check passed for "oracle"
    Check: Group existence for "oinstall"
    Node Name Status Comment
    sph2erp exists passed
    sph1erp exists passed
    Result: Group existence check passed for "oinstall"
    Check: Group existence for "dba"
    Node Name Status Comment
    sph2erp exists passed
    sph1erp exists passed
    Result: Group existence check passed for "dba"
    Check: Membership of user "oracle" in group "oinstall" [as Primary]
    Node Name User Exists Group Exists User in Group Primary Comment
    sph2erp yes yes yes yes passed
    sph1erp yes yes yes yes passed
    Result: Membership check for user "oracle" in group "oinstall" [as Primary] passed
    Check: Membership of user "oracle" in group "dba"
    Node Name User Exists Group Exists User in Group Comment
    sph2erp yes yes yes passed
    sph1erp yes yes yes passed
    Result: Membership check for user "oracle" in group "dba" passed
    Check: Run level
    Node Name run level Required Comment
    sph2erp 3 3 passed
    sph1erp 3 3 passed
    Result: Run level check passed
    Check: Hard limits for "maximum open file descriptors"
    Node Name Type Available Required Comment
    sph2erp hard 63488 63488 passed
    sph1erp hard 63488 63488 passed
    Result: Hard limits check passed for "maximum open file descriptors"
    Check: Soft limits for "maximum open file descriptors"
    Node Name Type Available Required Comment
    sph2erp soft 1024 1024 passed
    sph1erp soft 63488 1024 passed
    Result: Soft limits check passed for "maximum open file descriptors"
    Check: Hard limits for "maximum user processes"
    Node Name Type Available Required Comment
    sph2erp hard 3687 3686 passed
    sph1erp hard 3687 3686 passed
    Result: Hard limits check passed for "maximum user processes"
    Check: Soft limits for "maximum user processes"
    Node Name Type Available Required Comment
    sph2erp soft 3687 2047 passed
    sph1erp soft 3687 2047 passed
    Result: Soft limits check passed for "maximum user processes"
    Check: System architecture
    Node Name Available Required Comment
    sph2erp ia64 ia64 passed
    sph1erp ia64 ia64 passed
    Result: System architecture check passed
    Check: Kernel version
    Node Name Available Required Comment
    sph2erp HP-UX B.11.31 B.11.31 passed
    sph1erp HP-UX B.11.31 B.11.31 passed
    Result: Kernel version check passed
    Check: Kernel parameter for "ksi_alloc_max"
    Node Name Configured Required Comment
    sph2erp 32768 32768 passed
    sph1erp 32768 32768 passed
    Result: Kernel parameter check passed for "ksi_alloc_max"
    Check: Kernel parameter for "executable_stack"
    Node Name Configured Required Comment
    sph2erp 0 0 passed
    sph1erp 0 0 passed
    Result: Kernel parameter check passed for "executable_stack"
    Check: Kernel parameter for "max_thread_proc"
    Node Name Configured Required Comment
    sph2erp 1024 1024 passed
    sph1erp 1024 1024 passed
    Result: Kernel parameter check passed for "max_thread_proc"
    Check: Kernel parameter for "maxdsiz"
    Node Name Configured Required Comment
    sph2erp 1073741824 1073741824 passed
    sph1erp 1073741824 1073741824 passed
    Result: Kernel parameter check passed for "maxdsiz"
    Check: Kernel parameter for "maxdsiz_64bit"
    Node Name Configured Required Comment
    sph2erp 2147483648 2147483648 passed
    sph1erp 2147483648 2147483648 passed
    Result: Kernel parameter check passed for "maxdsiz_64bit"
    Check: Kernel parameter for "maxssiz"
    Node Name Configured Required Comment
    sph2erp 134217728 134217728 passed
    sph1erp 134217728 134217728 passed
    Result: Kernel parameter check passed for "maxssiz"
    Check: Kernel parameter for "maxssiz_64bit"
    Node Name Configured Required Comment
    sph2erp 1073741824 1073741824 passed
    sph1erp 1073741824 1073741824 passed
    Result: Kernel parameter check passed for "maxssiz_64bit"
    Check: Kernel parameter for "maxuprc"
    Node Name Configured Required Comment
    sph2erp 3686 3686 passed
    sph1erp 3686 3686 passed
    Result: Kernel parameter check passed for "maxuprc"
    Check: Kernel parameter for "msgmni"
    Node Name Configured Required Comment
    sph2erp 4096 4096 passed
    sph1erp 4096 4096 passed
    Result: Kernel parameter check passed for "msgmni"
    Check: Kernel parameter for "msgtql"
    Node Name Configured Required Comment
    sph2erp 4096 4096 passed
    sph1erp 4096 4096 passed
    Result: Kernel parameter check passed for "msgtql"
    Check: Kernel parameter for "ncsize"
    Node Name Configured Required Comment
    sph2erp 35840 35840 passed
    sph1erp 35840 35840 passed
    Result: Kernel parameter check passed for "ncsize"
    Check: Kernel parameter for "shmmax"
    Node Name Configured Required Comment
    sph2erp 1073741824 1073741824 passed
    sph1erp 1073741824 1073741824 passed
    Result: Kernel parameter check passed for "shmmax"
    Check: Kernel parameter for "shmmni"
    Node Name Configured Required Comment
    sph2erp 4096 4096 passed
    sph1erp 4096 4096 passed
    Result: Kernel parameter check passed for "shmmni"
    Check: Kernel parameter for "shmseg"
    Node Name Configured Required Comment
    sph2erp 512 512 passed
    sph1erp 512 512 passed
    Result: Kernel parameter check passed for "shmseg"
    Check: Kernel parameter for "tcp_smallest_anon_port"
    Node Name Configured Required Comment
    sph2erp 9000 9000 passed
    sph1erp 9000 9000 passed
    Result: Kernel parameter check passed for "tcp_smallest_anon_port"
    Check: Kernel parameter for "tcp_largest_anon_port"
    Node Name Configured Required Comment
    sph2erp 65500 65500 passed
    sph1erp 65500 65500 passed
    Result: Kernel parameter check passed for "tcp_largest_anon_port"
    Check: Kernel parameter for "udp_smallest_anon_port"
    Node Name Configured Required Comment
    sph2erp 9000 9000 passed
    sph1erp 9000 9000 passed
    Result: Kernel parameter check passed for "udp_smallest_anon_port"
    Check: Kernel parameter for "udp_largest_anon_port"
    Node Name Configured Required Comment
    sph2erp 65500 65500 passed
    sph1erp 65500 65500 passed
    Result: Kernel parameter check passed for "udp_largest_anon_port"
    Check: Package existence for "OS-Core-B.11.31( ia64)"
    Node Name Available Required Comment
    sph2erp OS-Core-B.11.31-0 OS-Core-B.11.31( ia64) passed
    sph1erp OS-Core-B.11.31-0 OS-Core-B.11.31( ia64) passed
    Result: Package existence check passed for "OS-Core-B.11.31( ia64)"
    Check: Operating system patch for "Patch PHKL_38938"
    Node Name Applied Required Comment
    sph2erp Patch PHKL_39646 Patch PHKL_38938 passed
    sph1erp Patch PHKL_39646 Patch PHKL_38938 passed
    Result: Operating system patch check passed for "Patch PHKL_38938"
    Check: Operating system patch for "Patch PHKL_39351"
    Node Name Applied Required Comment
    sph2erp Patch PHKL_40207 Patch PHKL_39351 passed
    sph1erp Patch PHKL_40207 Patch PHKL_39351 passed
    Result: Operating system patch check passed for "Patch PHKL_39351"
    Check: Operating system patch for "Patch PHSS_36354"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_40546 Patch PHSS_36354 passed
    sph1erp Patch PHSS_40546 Patch PHSS_36354 passed
    Result: Operating system patch check passed for "Patch PHSS_36354"
    Check: Operating system patch for "Patch PHSS_37042"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_37042 Patch PHSS_37042 passed
    sph1erp Patch PHSS_37042 Patch PHSS_37042 passed
    Result: Operating system patch check passed for "Patch PHSS_37042"
    Check: Operating system patch for "Patch PHSS_37959"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_40804 Patch PHSS_37959 passed
    sph1erp Patch PHSS_40804 Patch PHSS_37959 passed
    Result: Operating system patch check passed for "Patch PHSS_37959"
    Check: Operating system patch for "Patch PHSS_39094"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_40538 Patch PHSS_39094 passed
    sph1erp Patch PHSS_40538 Patch PHSS_39094 passed
    Result: Operating system patch check passed for "Patch PHSS_39094"
    Check: Operating system patch for "Patch PHSS_39100"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_40540 Patch PHSS_39100 passed
    sph1erp Patch PHSS_40540 Patch PHSS_39100 passed
    Result: Operating system patch check passed for "Patch PHSS_39100"
    Check: Operating system patch for "Patch PHSS_39102"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_41496 Patch PHSS_39102 passed
    sph1erp Patch PHSS_41496 Patch PHSS_39102 passed
    Result: Operating system patch check passed for "Patch PHSS_39102"
    Check: Operating system patch for "Patch PHSS_38141"
    Node Name Applied Required Comment
    sph2erp Patch PHSS_38141 Patch PHSS_38141 passed
    sph1erp Patch PHSS_38141 Patch PHSS_38141 passed
    Result: Operating system patch check passed for "Patch PHSS_38141"
    Check: Operating system patch for "Patch PHCO_40381"
    Node Name Applied Required Comment
    sph2erp Patch PHCO_40381 Patch PHCO_40381 passed
    sph1erp Patch PHCO_40381 Patch PHCO_40381 passed
    Result: Operating system patch check passed for "Patch PHCO_40381"
    Check: Operating system patch for "Patch PHKL_38038"
    Node Name Applied Required Comment
    sph2erp Patch PHKL_41005 Patch PHKL_38038 passed
    sph1erp Patch PHKL_41005 Patch PHKL_38038 passed
    Result: Operating system patch check passed for "Patch PHKL_38038"
    Checking for multiple users with UID value 0
    Result: Check for multiple users with UID value 0 passed
    Check: Current group ID
    Result: Current group ID check passed
    Starting Clock synchronization checks using Network Time Protocol(NTP)...
    NTP Configuration file check started...
    Network Time Protocol(NTP) configuration file not found on any of the nodes. Oracle Cluster Time Synchronization Service(CTSS) can be used instead of NTP for time synchronization on the cluster nodes
    No NTP Daemons or Services were found to be running
    Result: Clock synchronization check using Network Time Protocol(NTP) passed
    Checking Core file name pattern consistency...
    Core file name pattern consistency check passed.
    Checking to make sure user "oracle" is not in "root" group
    Node Name Status Comment
    sph2erp does not exist passed
    sph1erp does not exist passed
    Result: User "oracle" is not part of "root" group. Check passed
    Check default user file creation mask
    Node Name Available Required Comment
    sph2erp 022 0022 passed
    sph1erp 022 0022 passed
    Result: Default user file creation mask check passed
    Checking consistency of file "/etc/resolv.conf" across nodes
    Node Name Status
    sph2erp passed
    sph1erp passed
    The DNS response time for an unreachable node is within acceptable limit on all nodes
    File "/etc/resolv.conf" is consistent across nodes
    Check: Time zone consistency
    Result: Time zone consistency check passed
    Checking settings of device file "/dev/async"
    Node Name Available Comment
    sph2erp yes failed (incorrect setting for minor number.)
    sph1erp yes failed (incorrect setting for minor number.)
    Result: Check for settings of device file "/dev/async" failed.
    Starting check for The SSH LoginGraceTime setting ...
    WARNING:
    PRVE-0038 : The SSH LoginGraceTime setting on node "sph2erp" may result in users being disconnected before login is completed
    PRVE-0038 : The SSH LoginGraceTime setting on node "sph1erp" may result in users being disconnected before login is completed
    Check for The SSH LoginGraceTime setting passed
    Fixup information has been generated for following node(s):
    sph2erp,sph1erp
    Please run the following script on each node as "root" user to execute the fixups:
    '/tmp/CVU_11.2.0.2.0_oracle/runfixup.sh'
    Pre-check for cluster services setup was unsuccessful on all the nodes.
    What could be the issue ????
    Any help would be appreciated...
    Regards,
    Manish

    Started with Grid Installation. Copying Software to remote node & linking libraries were successfully without any issue (upto 76%). But got issue while executing root.sh on Node1
    sph1erp:/oracle/11.2.0/grid #sh root.sh
    Running Oracle 11g root script...
    The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME= /oracle/11.2.0/grid
    Enter the full pathname of the local bin directory: [usr/local/bin]:
    Copying dbhome to /usr/local/bin ...
    Copying oraenv to /usr/local/bin ...
    Copying coraenv to /usr/local/bin ...
    Creating /etc/oratab file...
    Entries will be added to the /etc/oratab file as needed by
    Database Configuration Assistant when a database is created
    Finished running generic part of root script.
    Now product-specific root actions will be performed.
    Using configuration parameter file: /oracle/11.2.0/grid/crs/install/crsconfig_params
    Creating trace directory
    LOCAL ADD MODE
    Creating OCR keys for user 'root', privgrp 'sys'..
    Operation successful.
    OLR initialization - successful
    root wallet
    root wallet cert
    root cert export
    peer wallet
    profile reader wallet
    pa wallet
    peer wallet keys
    pa wallet keys
    peer cert request
    pa cert request
    peer cert
    pa cert
    peer root cert TP
    profile reader root cert TP
    pa root cert TP
    peer pa cert TP
    pa peer cert TP
    profile reader pa cert TP
    profile reader peer cert TP
    peer user cert
    pa user cert
    Adding daemon to inittab
    CRS-2672: Attempting to start 'ora.mdnsd' on 'sph1erp'
    CRS-2676: Start of 'ora.mdnsd' on 'sph1erp' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'sph1erp'
    CRS-2676: Start of 'ora.gpnpd' on 'sph1erp' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'sph1erp'
    CRS-2672: Attempting to start 'ora.gipcd' on 'sph1erp'
    CRS-2676: Start of 'ora.gipcd' on 'sph1erp' succeeded
    CRS-2676: Start of 'ora.cssdmonitor' on 'sph1erp' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'sph1erp'
    CRS-2672: Attempting to start 'ora.diskmon' on 'sph1erp'
    CRS-2676: Start of 'ora.diskmon' on 'sph1erp' succeeded
    CRS-2676: Start of 'ora.cssd' on 'sph1erp' succeeded
    ASM created and started successfully.
    Disk Group OCRVOTE created successfully.
    clscfg: -install mode specified
    Successfully accumulated necessary OCR keys.
    Creating OCR keys for user 'root', privgrp 'sys'..
    Operation successful.
    CRS-4256: Updating the profile
    Successful addition of voting disk ab847ed2b4f04f2dbfb875226d2bb194.
    Successful addition of voting disk 85c05a5b30384f8dbff48cc069de7a7c.
    Successful addition of voting disk 649196fbdd614f9cbf26a9a0e6670a6e.
    Successful addition of voting disk 8815dfcee2e64f64bf00b9c76626ab41.
    Successful addition of voting disk 8ce55fe5534f4f77bfa9f54187592707.
    Successfully replaced voting disk group with +OCRVOTE.
    CRS-4256: Updating the profile
    CRS-4266: Voting file(s) successfully replaced
    ## STATE File Universal Id File Name Disk group
    1. ONLINE ab847ed2b4f04f2dbfb875226d2bb194 (/dev/oracle/ocrvote1) [OCRVOTE]
    2. ONLINE 85c05a5b30384f8dbff48cc069de7a7c (/dev/oracle/ocrvote2) [OCRVOTE]
    3. ONLINE 649196fbdd614f9cbf26a9a0e6670a6e (/dev/oracle/ocrvote3) [OCRVOTE]
    4. ONLINE 8815dfcee2e64f64bf00b9c76626ab41 (/dev/oracle/ocrvote4) [OCRVOTE]
    5. ONLINE 8ce55fe5534f4f77bfa9f54187592707 (/dev/oracle/ocrvote5) [OCRVOTE]
    Located 5 voting disk(s).
    Start of resource "ora.cluster_interconnect.haip" failed
    CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'sph1erp'
    CRS-5017: The resource action "ora.cluster_interconnect.haip start" encountered the following error:
    Start action for HAIP aborted
    CRS-2674: Start of 'ora.cluster_interconnect.haip' on 'sph1erp' failed
    CRS-2679: Attempting to clean 'ora.cluster_interconnect.haip' on 'sph1erp'
    CRS-2681: Clean of 'ora.cluster_interconnect.haip' on 'sph1erp' succeeded
    CRS-4000: Command Start failed, or completed with errors.
    Failed to start Oracle Clusterware stack
    Failed to start High Availability IP at /oracle/11.2.0/grid/crs/install/crsconfig_lib.pm line 1046.
    /oracle/11.2.0/grid/perl/bin/perl -I/oracle/11.2.0/grid/perl/lib -I/oracle/11.2.0/grid/crs/install /oracle/11.2.0/grid/crs/install/rootcrs.pl execution failed
    sph1erp:/oracle/11.2.0/grid #
    Last few lines from CRS Log for node 1, where error came
    [ctssd(6467)]CRS-2401:The Cluster Time Synchronization Service started on host sph1erp.
    2011-02-25 23:04:16.491
    [oracle/11.2.0/grid/bin/orarootagent.bin(6423)]CRS-5818:Aborted command 'start for resource: ora.cluster_interconnect.haip 1 1' for resource 'ora.cluster_int
    erconnect.haip'. Details at (:CRSAGF00113:) {0:0:178} in */oracle/11.2.0/grid/log/sph1erp/agent/ohasd/orarootagent_root/orarootagent_root.log.*
    2011-02-25 23:04:20.521
    [ohasd(5513)]CRS-2757:Command 'Start' timed out waiting for response from the resource 'ora.cluster_interconnect.haip'. Details at (:CRSPE00111:) {0:0:178} in
    */oracle/11.2.0/grid/log/sph1erp/ohasd/ohasd.log.*
    Few lines from */oracle/11.2.0/grid/log/sph1erp/agent/ohasd/orarootagent_root/orarootagent_root.log.*
    =====================================================================================================
    2011-02-25 23:04:16.823: [ USRTHRD][16] {0:0:178} Starting Probe for ip 169.254.74.54
    2011-02-25 23:04:16.823: [ USRTHRD][16] {0:0:178} Transitioning to Probe State
    2011-02-25 23:04:17.177: [ USRTHRD][15] {0:0:178} [NetHAMain] thread stopping
    2011-02-25 23:04:17.177: [ USRTHRD][15] {0:0:178} Thread:[NetHAMain]isRunning is reset to false here
    2011-02-25 23:04:17.178: [ USRTHRD][12] {0:0:178} Thread:[NetHAMain]stop }
    2011-02-25 23:04:17.178: [ USRTHRD][12] {0:0:178} thread cleaning up
    2011-02-25 23:04:17.178: [ USRTHRD][12] {0:0:178} pausing thread
    2011-02-25 23:04:17.178: [ USRTHRD][12] {0:0:178} posting thread
    2011-02-25 23:04:17.178: [ USRTHRD][12] {0:0:178} Thread:[NetHAWork]stop {
    2011-02-25 23:04:17.645: [ USRTHRD][16] {0:0:178} [NetHAWork] thread stopping
    2011-02-25 23:04:17.645: [ USRTHRD][16] {0:0:178} Thread:[NetHAWork]isRunning is reset to false here
    2011-02-25 23:04:17.645: [ USRTHRD][12] {0:0:178} Thread:[NetHAWork]stop }
    2011-02-25 23:04:17.645: [ USRTHRD][12] {0:0:178} Thread:[NetHAWork]stop {
    2011-02-25 23:04:17.645: [ USRTHRD][12] {0:0:178} Thread:[NetHAWork]stop }
    2011-02-25 23:04:17.891: [ora.cluster_interconnect.haip][12] {0:0:178} [start] Start of HAIP aborted
    2011-02-25 23:04:17.892: [   AGENT][12] {0:0:178} UserErrorException: Locale is
    2011-02-25 23:04:17.893: [ora.cluster_interconnect.haip][12] {0:0:178} [start] clsnUtils::error Exception type=2 string=
    CRS-5017: The resource action "ora.cluster_interconnect.haip start" encountered the following error:
    Start action for HAIP aborted
    2011-02-25 23:04:17.893: [    AGFW][12] {0:0:178} sending status msg [CRS-5017: The resource action "ora.cluster_interconnect.haip start" encountered the foll
    owing error:
    Start action for HAIP aborted
    ] for start for resource: ora.cluster_interconnect.haip 1 1
    2011-02-25 23:04:17.893: [ora.cluster_interconnect.haip][12] {0:0:178} [start] clsn_agent::start }
    2011-02-25 23:04:17.894: [    AGFW][10] {0:0:178} Agent sending reply for: RESOURCE_START[ora.cluster_interconnect.haip 1 1] ID 4098:661
    2011-02-25 23:04:18.552: [ora.diskmon][12] {0:0:154} [check] DiskmonAgent::check {
    2011-02-25 23:04:18.552: [ora.diskmon][12] {0:0:154} [check] DiskmonAgent::check } - 0
    2011-02-25 23:04:19.573: [    AGFW][10] {0:0:154} Agent received the message: AGENT_HB[Engine] ID 12293:669
    2011-02-25 23:04:20.510: [ora.cluster_interconnect.haip][18] {0:0:178} [start] got lock
    2011-02-25 23:04:20.511: [ora.cluster_interconnect.haip][18] {0:0:178} [start] tryActionLock }
    2011-02-25 23:04:20.511: [ora.cluster_interconnect.haip][18] {0:0:178} [start] abort }
    2011-02-25 23:04:20.511: [ora.cluster_interconnect.haip][18] {0:0:178} [start] clsn_agent::abort }
    2011-02-25 23:04:20.511: [    AGFW][18] {0:0:178} Command: start for resource: ora.cluster_interconnect.haip 1 1 completed with status: TIMEDOUT
    2011-02-25 23:04:20.512: [ora.cluster_interconnect.haip][8] {0:0:178} [check] NetworkAgent::init enter {
    2011-02-25 23:04:20.513: [ora.cluster_interconnect.haip][8] {0:0:178} [check] NetworkAgent::init exit }
    2011-02-25 23:04:20.517: [    AGFW][10] {0:0:178} Agent sending reply for: RESOURCE_START[ora.cluster_interconnect.haip 1 1] ID 4098:661
    2011-02-25 23:04:20.519: [ USRTHRD][8] {0:0:178} Ocr Context init default level 23886304
    2011-02-25 23:04:20.519: [ default][8]clsvactversion:4: Retrieving Active Version from local storage.
    [   CLWAL][8]clsw_Initialize: OLR initlevel [70000]
    Few lines from */oracle/11.2.0/grid/log/sph1erp/ohasd/ohasd.log.*
    =====================================================================================================
    2011-02-25 23:04:21.627: [UiServer][30] {0:0:180} Done for ctx=6000000002604ce0
    2011-02-25 23:04:21.642: [UiServer][31] Closed: remote end failed/disc.
    2011-02-25 23:04:26.139: [ CLSINET][33]Returning NETDATA: 1 interfaces
    2011-02-25 23:04:26.139: [ CLSINET][33]# 0 Interface 'lan2',ip='10.10.16.50',mac='3c-4a-92-48-71-be',mask='255.255.255.240',net='10.10.16.48',use='cluster_int
    erconnect'
    2011-02-25 23:04:26.973: [UiServer][31] CS(60000000014b0790)set Properties ( root,60000000012e0260)
    2011-02-25 23:04:26.973: [UiServer][31] SS(6000000001372270)Accepted client connection: saddr =(ADDRESS=(PROTOCOL=ipc)(DEV=92)(KEY=OHASD_UI_SOCKET))daddr = (A
    DDRESS=(PROTOCOL=ipc)(KEY=OHASD_UI_SOCKET))
    2011-02-25 23:04:26.992: [UiServer][30] {0:0:181} processMessage called
    2011-02-25 23:04:26.993: [UiServer][30] {0:0:181} Sending message to PE. ctx= 6000000001b440f0
    2011-02-25 23:04:26.993: [UiServer][30] {0:0:181} Sending command to PE: 67
    2011-02-25 23:04:26.994: [   CRSPE][29] {0:0:181} Processing PE command id=173. Description: [Stat Resource : 600000000135f760]
    2011-02-25 23:04:26.997: [UiServer][30] {0:0:181} Done for ctx=6000000001b440f0
    2011-02-25 23:04:27.012: [UiServer][31] Closed: remote end failed/disc.
    2011-02-25 23:04:31.135: [ CLSINET][33]Returning NETDATA: 1 interfaces
    2011-02-25 23:04:31.135: [ CLSINET][33]# 0 Interface 'lan2',ip='10.10.16.50',mac='3c-4a-92-48-71-be',mask='255.255.255.240',net='10.10.16.48',use='cluster_int
    erconnect'
    2011-02-25 23:04:32.318: [UiServer][31] CS(60000000014b0790)set Properties ( root,60000000012e0260)
    2011-02-25 23:04:32.318: [UiServer][31] SS(6000000001372270)Accepted client connection: saddr =(ADDRESS=(PROTOCOL=ipc)(DEV=92)(KEY=OHASD_UI_SOCKET))daddr = (A
    DDRESS=(PROTOCOL=ipc)(KEY=OHASD_UI_SOCKET))
    2011-02-25 23:04:32.332: [UiServer][30] {0:0:182} processMessage called
    2011-02-25 23:04:32.333: [UiServer][30] {0:0:182} Sending message to PE. ctx= 6000000001b45ef0
    2011-02-25 23:04:32.333: [UiServer][30] {0:0:182} Sending command to PE: 68
    2011-02-25 23:04:32.334: [   CRSPE][29] {0:0:182} Processing PE command id=174. Description: [Stat Resource : 600000000135f760]
    2011-02-25 23:04:32.338: [UiServer][30] {0:0:182} Done for ctx=6000000001b45ef0
    2011-02-25 23:04:32.352: [UiServer][31] Closed: remote end failed/disc.
    2011-02-25 23:04:36.155: [ CLSINET][33]Returning NETDATA: 1 interfaces
    2011-02-25 23:04:36.155: [ CLSINET][33]# 0 Interface 'lan2',ip='10.10.16.50',mac='3c-4a-92-48-71-be',mask='255.255.255.240',net='10.10.16.48',use='cluster_int
    erconnect'
    2011-02-25 23:04:37.683: [UiServer][31] CS(60000000014b0790)set Properties ( root,60000000012e0260)
    2011-02-25 23:04:37.683: [UiServer][31] SS(6000000001372270)Accepted client connection: saddr =(ADDRESS=(PROTOCOL=ipc)(DEV=92)(KEY=OHASD_UI_SOCKET))daddr = (A
    DDRESS=(PROTOCOL=ipc)(KEY=OHASD_UI_SOCKET))
    2011-02-25 23:04:37.702: [UiServer][30] {0:0:183} processMessage called
    2011-02-25 23:04:37.703: [UiServer][30] {0:0:183} Sending message to PE. ctx= 6000000002604ce0
    2011-02-25 23:04:37.703: [UiServer][30] {0:0:183} Sending command to PE: 69
    2011-02-25 23:04:37.704: [   CRSPE][29] {0:0:183} Processing PE command id=175. Description: [Stat Resource : 600000000135f760]
    2011-02-25 23:04:37.708: [UiServer][30] {0:0:183} Done for ctx=6000000002604ce0
    2011-02-25 23:04:37.722: [UiServer][31] Closed: remote end failed/disc.
    2011-02-25 23:04:41.156: [ CLSINET][33]Returning NETDATA: 1 interfaces
    2011-02-25 23:04:41.156: [ CLSINET][33]# 0 Interface 'lan2',ip='10.10.16.50',mac='3c-4a-92-48-71-be',mask='255.255.255.240',net='10.10.16.48',use='cluster_int
    erconnect'
    What could be the issue ????
    Experts Please help me. Doing setup for the PRoduction Env...
    Do response ASAP...... Thanks
    Regards,
    Manish

  • Check for null or empty in the functoid

    I want to check for null and empty values on input source node. If there exists a null or empty in the input source node, I should not pass that to output destination node. Does the
    following attachment work? I want to check for null or empty in the date and time and then concatenate them to send to output. If any of them is null or empty, the other should not fail. In the Not Equal Functoid I am checking for blank, but how to check for
    null?

    A null check might not be you best option.  If your requirement is you must have both the date and time component supplied in order to populate EventDate, then I would use a Script Functoid that takes data and time as parameters.
    In the C# method, first check if either is an empty string, if so return an empty string.
    If not, TryParse the data, if successful, return a valid data string for EventDate.  If not, error or return empty string, whichever satsifies the requirement.

  • How to check empty string and null? Assign same value to multiple variables

    Hi,
    1.
    How do I check for empty string and null?
    in_value IN VARCHAR2
    2. Also how do I assign same value to multiple variables?
    var_one NUMBER := 0;
    var_two NUMBER := 0;
    var_one := var_two := 0; --- Gives an error
    Thanks

    MichaelS wrote:
    Not always: Beware of CHAR's:
    Bug 727361: ZERO-LENGTH STRING DOES NOT RETURN NULL WHEN USED WITH CHAR DATA TYPE IN PL/SQL:
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is NOT null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> alter session set events '10932 trace name context forever, level 16384';
    Session altered.
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Check for empty visa resource?

    When I am developing the VI at my desk and not a the test station PC, the VISA resource name is empty.
    Once the VI is moved to the test station PC, the user can select a VXI board.
    How do I make sure the user has selected a VISA resource before continuing?
    I can wire a Comparision to check for Empty String, and that works. But is there any method that I should use?
    Solved!
    Go to Solution.

    Additionally, you can limit the selectable items by interface type. Right-click VISA Resource Name Control and select I/O Name Filtering.
    National Instruments
    Product Support Engineer

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

  • Checking for null value in arraylist

    Hi
    i have an excel file which i i am reading into an arraylist row by row but not necesarrily that all columns in the row mite be filled. So how do i check for null values in the array list.
    try
                        int cellCount = 0;
                        int emptyRow = 0;
                        HSSFWorkbook workbook = new HSSFWorkbook(new FileInputStream(file));
                        HSSFSheet sheet = workbook.getSheetAt(0);
                        Iterator rows = sheet.rowIterator(); 
                        myRow = new ArrayList();
                        int r = 1;
                             while (rows.hasNext())
                                  System.out.println("Row # " + r);
                                  HSSFRow row = (HSSFRow) rows.next();
                                  Iterator cells = row.cellIterator();          
                                  cellCount = 0;
                                  boolean isValid = false;
                                  while (cells.hasNext())
                                       HSSFCell cell = (HSSFCell) cells.next();
                                       switch (cell.getCellType())
                                            case HSSFCell.CELL_TYPE_NUMERIC:
                                                 double num = cell.getNumericCellValue();     
                                                 DecimalFormat pattern = new DecimalFormat("###,###,###,###");     
                                                 NumberFormat testNumberFormat = NumberFormat.getNumberInstance();
                                                 String mob = testNumberFormat.format(num);               
                                                 Number n = null;
                                                 try
                                                      n = pattern.parse(mob);
                                                 catch ( ParseException e )
                                                      e.printStackTrace();
                                                 System.out.println(n);
                                                 myRow.add(n);                                             
                                                 //myRow.add(String.valueOf(cell.getNumericCellValue()).trim());
                                                 //System.out.println("numeric: " +cell.getNumericCellValue());
                                                 break;
                                            case HSSFCell.CELL_TYPE_STRING:
                                                 myRow.add(cell.getStringCellValue().trim());
                                                 System.out.println("string: " + cell.getStringCellValue().trim());
                                                 break;
                                            case HSSFCell.CELL_TYPE_BLANK:
                                                 myRow.add(" ");
                                                 System.out.println("add empty:");
                                                 break;
                                       } // end switch
                                       cellCount++;
                                  } // end while                    
                                  r++;
                             }// end while
                   } myRow is the arrayList i am adding the cells of the excel file to. I have checked for blank spaces in my coding so please help with how to check for the black spaces that has been added to my arraylist.
    I have tried checking by looping through the ArrayList and then checking for null values like this
    if(myRow.get(i)!=null)
      // do something
    // i have tried this also
    if(myRow.get(i)!="")
    //do something
    }Edited by: nb123 on Feb 3, 2008 11:23 PM

    From your post I see you are using a 3rd party package to access the Excel SpreadSheets, you will have to look in your API for you 3rd party package and see if there is a method that will identify a blank row, if there is and it does not work, then you have to take that problem up with them. I know this is a pain, but it is the price we pay for 3rd party object use.
    In the mean time, you can make a workaround by checking every column in your row and seeing if it is null, or perhaps even better: check and see if the trimmed value of each cell has a lenth of 0.

  • Want to know how to check for new line character in text file

    Hi All,
    I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
    Thanks
    static int readandwriteFile(Logger logger,String filepath){
              BufferedWriter out = null;
              BufferedReader in = null;
              File fr = null;
              int get_count = 0;
              try     {
              if(new File(filepath).exists())
              fr= new File(filepath);
                        System.out.println("FileName: "+fr);
                   if(fr != null){
    in = new BufferedReader(new FileReader(fr));
                             String text = in.readLine();
                             if(text != null){
                             get_count = Integer.parseInt(text);
                             in.close();
                             else{
                                  get_count = 0;
         else{                    
    out = new BufferedWriter(new FileWriter(filepath));
         out.write("0");
                out.close();
                   }          //Reading of the row count file ended.
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try{               if (in != null) {
                             in.close();
              if (out != null) {
                             out.close();
              catch(Exception e) {
                        e.printStackTrace();
              return get_count;
         }

    You are calling the readline() only once which means you are reading only the first line from the file...
    Use a loop (Do-While preferably)
    do{
    //your code
    }while(text == "")

  • Touch Events: How can I check for a button being pressed while another button is being held down?

    Hello,
    I'm trying to check for a button being pressed while another is down through Touch.  In my case, I' m making a game and I need for a button to make the character jump.  However, when I hold down right, I notice that the jump button becomes somewhat unresponsive and I have to press it twice or more to get it to trigger, as opposed to just pressing the jump button by itself with nothing held down which works fine.  I'm testing this on my Motorola Droid 2.
    Here is some of my code that demonstrates text instead of my character moving around:
    package  {
         import flash.events.TouchEvent;
         import flash.ui.Multitouch;
         import flash.ui.MultitouchInputMode;
         public class Document extends MovieClip {
               Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
               private var controls:BottomBar;
               private var debugText:String;
               public function Document() {
                    addIngameGUI();
               private function addIngameGUI(){
                    controls = new BottomBar();
                    controls.y = stage.stageHeight - controls.height;
                    addChild(controls);
                    controls.aBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.bBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.leftArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.rightArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
             private function testBtns(event:TouchEvent){
                   debugText.text = event.target.name;
    What am I doing wrong?  Is there a better approach?
    Thank you in advance.

    Hello,
    I'm trying to check for a button being pressed while another is down through Touch.  In my case, I' m making a game and I need for a button to make the character jump.  However, when I hold down right, I notice that the jump button becomes somewhat unresponsive and I have to press it twice or more to get it to trigger, as opposed to just pressing the jump button by itself with nothing held down which works fine.  I'm testing this on my Motorola Droid 2.
    Here is some of my code that demonstrates text instead of my character moving around:
    package  {
         import flash.events.TouchEvent;
         import flash.ui.Multitouch;
         import flash.ui.MultitouchInputMode;
         public class Document extends MovieClip {
               Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
               private var controls:BottomBar;
               private var debugText:String;
               public function Document() {
                    addIngameGUI();
               private function addIngameGUI(){
                    controls = new BottomBar();
                    controls.y = stage.stageHeight - controls.height;
                    addChild(controls);
                    controls.aBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.bBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.leftArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.rightArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
             private function testBtns(event:TouchEvent){
                   debugText.text = event.target.name;
    What am I doing wrong?  Is there a better approach?
    Thank you in advance.

  • How can I check for directory creation?

    Hi,
    I want to check whether I can create a directory at a particular location.
    Let's say at c:\windows, can create a directory called c:\windows\mydir. But I won't be knowing the parent location (i.e., c:\windows here) at compile time.
    And I would also like to check for creating a directory like c:\windows\mydir1\mydir2 (mydir1 may not even exist).
    What I was doing was, I created the file object for my new directory (i.e., mydir here) and used the canWrite() method on the parent directory. But this method worked only when the parent directory existed. But how can check for a directory path like c:\windows\mydir1\mydir2 where I have to create both mydir1 for mydir2.
    Is there any other methods that I can use to perform this kind of a check.
    Thank you

    I finally figured out a workaround, but i don't know whether this is a good way of checking. :)
    import java.io.File;
    public class TryMKDIRs {
         public static void main(String[] args) {
              File file = new File("c:\\mydir1\\mydir2\\mydir3");
              boolean canICreateDir = false;
              if(false == (canICreateDir = file.canWrite())) {
                   System.out.println(file.getAbsoluteFile() + " cannot be created.");
                   File fileparent = file.getParentFile();
                   while(fileparent != null && (canICreateDir = fileparent.canWrite()) == false) {
                        System.out.println(fileparent.getAbsoluteFile() + " cannot be created.");
                        fileparent = fileparent.getParentFile();
              if(canICreateDir) {
                   file.mkdirs();
                   System.out.println("Directory can be created. . .");
    }

Maybe you are looking for