How can I write the loop for this?

public void currentConnectedPlayers (String[ ] connectedPLayers)
//connectedPlayers contains the names of players connected to the server.
//Display the list of connected players, but SELF is not included in the display list
how will I be able to identify "self" within the loop, in order to exclude myself from beig listed....

but in coding... i should use "this" instead of
"self"
shoudlnt I?!Never "this" is not a string it is a class, only if it extends String Class,
Since the users are stored in a String array, we need to know what is the information you put in that array is it name, id .
>
otherwise got error

Similar Messages

  • How can we write the code for opening the command prompt and closing the

    how can we write the code in java for opening the command prompt and closing the cmd prompt from eclipse (cmd prompt should close when click on the turminate button in eclipse)

    rakeshsikha wrote:
    how can we write the code for opening the command prompt and closing theBy typing in Eclipse (which you seemingly have)?

  • How can i write the trigger for Global Temporary Table

    Hi Grus,
    How can i write the trigger for Global Temporary Table.
    I was created the GTT with trigger using the below script .
    CREATE GLOBAL TEMPORARY TABLE GLOBAL_TEMP
    EMP_C_NAME VARCHAR2(20 BYTE)
    ON COMMIT PRESERVE ROWS;
    CREATE OR REPLACE TRIGGER TRI_GLOBAL_TEMP
    BEFORE DELETE OR UPDATE OR INSERT
    ON GLOBAL_TEMP
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    INSERT INTO EMPNAME VALUES (:OLD.EMP_C_NAME);
    END;
    trigger was create successfully, but the wouldn't insert into to EMPNAME Table..
    Please guide whether am correct or not? if not kindly give a correct syntax with example
    Thanks in Advance,
    Arun M M

    BEGIN
    INSERT INTO EMPNAME VALUES (:OLD.EMP_C_NAME);
    END;
    you are referencing old value in insert stmt.
    BEGIN
    INSERT INTO EMPNAME VALUES (:new.EMP_C_NAME);
    END;then run ur application it works fine...
    CREATE GLOBAL TEMPORARY TABLE GLOBAL_TEMP
    EMP_C_NAME VARCHAR2(20 BYTE)
    ON COMMIT PRESERVE ROWS;
    CREATE OR REPLACE TRIGGER TRI_GLOBAL_TEMP
    BEFORE DELETE OR UPDATE OR INSERT
    ON GLOBAL_TEMP
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    dbms_output.put_line(:OLD.EMP_C_NAME||'yahoo');
    INSERT INTO EMPNAME VALUES (:new.EMP_C_NAME);
    dbms_output.put_line(:OLD.EMP_C_NAME);
    END;
    create table EMPNAME as select * from GLOBAL_TEMP where 1=2
    insert into GLOBAL_TEMP values('fgfdgd');
    commit;
    select * from GLOBAL_TEMP;
    select * from EMPNAME;
    output:
    1 rows inserted
    commit succeeded.
    EMP_C_NAME          
    fgfdgd              
    1 rows selected
    EMP_C_NAME          
    fgfdgd              
    1 rows selectedgot it Arun
    Edited by: OraclePLSQL on Dec 28, 2010 6:07 PM

  • How Can I change the Authentication for this Dynpage

    Hello ,
    I have created a rss feed in special Dnypage.   When I try to connect with rss reader  to dynpage it occurs an error 500.  The problem is that no logon screen appears and the portal would start the Dynpage with the User Guest.
    How Can I change the Authentication for this Dynpage ? I need a LogonScreen
    RSS URL:
    /irj/servlet/prt/portal/prtmode/rss/prtroot/com.geberit.ep.uwlquick.uwlquickstarter?mode=rss

    Hi ,
    sry the entry in xml does not help. No Logon Prompt
    <?xml version="1.0" encoding="UTF-8"?>
    <application>
      <application-config>
        <property name="SecurityArea" value="NetWeaver.Portal"/>
        <property name="Vendor" value="xx.com"/>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb,com.sap.portal.pcd.glservice,com.sap.portal.ivs.iviewservice,usermanagement,,com.sap.netweaver.bc.uwl"/>
      </application-config>
      <components>
        <component name="uwlquickstarter">
          <component-config>
              <property name="SafetyLevel" value="no_safety"/>
            <property name="ClassName" value="com.xx.portal.uwl.uwlquickstarter"/>   
          </component-config>
              <component-profile>
                   <property name="AuthScheme" value="default"/>
              </component-profile>
        </component>
      </components>
      <services/>
    </application>

  • How can I access the settings for this program.

    How do I access the setting for Adobe Flash player?
    I keep getting a box which asks me to allow or not allow additional storage space, but when I click either box nothing happens.
    When this program was installed it never provided me with a setting screen - so how can I access this information.

    http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.htm l
    Or use the Flash Player Settings Manager.

  • How can i delete the backup for this ipod

    ipod will not sinc, box says deete the backup for this ipod and try again. how? any help please

    Go into the iTunes Preferences>Devices - select your iPod Touch backup and hit delete backup.

  • How can I uninstall the software for this printer?

    I am attempting to remove the software for my 7280 AIO but am unable to.  Help?

    hi there,
    could you provide the community with a little more information to help narrow troubleshooting? Things like your operating system can help out a lot.
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • How can i export the results for this loop

    Hi all 
    i wrote a script to do nslookup for a list of web sites here is the code i wrote 
    $servers = get-content "C:\NSLOOKUP.txt"
    foreach ($server in $servers) {
    $addresses = [System.Net.Dns]::GetHostAddresses($server)
    foreach($a in $addresses) {
    "{0},{1}" -f $server, $a.IPAddressToString
    } | Export-Csv 'C:\scripts\output.csv' -NoType
    but it didn't export shall you support me on this 

    Hi,
    Try it this way:
    Get-Content .\wwwList.txt | ForEach {
    $addr = [System.Net.Dns]::GetHostAddresses($_)
    $props = @{
    Name = $_
    Addresses = $addr.IPAddressToString -join ','
    New-Object PsObject -Property $props
    } | Sort Name | Export-Csv .\wwwList.csv -NoTypeInformation
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • How can i write sql query for this result ?

    Hello Dear,
    Here is the script first.
    CREATE TABLE ACC_TEST(
    AD_ID NUMBER,
    AD_NAME VARCHAR2(50),
    AD_SPM_ID NUMBER);
    /data are
    Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (136,'Saleh Ahmed',129);
    Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (142,'Hamidur Rahman',136);
    Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (124,'Jasim Uddin',null);
    INSERT INTO ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) VALUES (129,'Sazib',124);I Need The Following Result When I Pass A Value Of Ad_Id. For Example I Pass 142 Then Result Should Be
    Select Ad_Id,Ad_Name
    From..
    where ad_id=142
    Ad_Id   Ad_Name
    136     Saleh Ahmed
    129     Sazib
    124     Jasim Uddin
    If I Pass Ad_Id=136 Then Result Should Be
    Ad_Id   Ad_Name
    129     Sazib
    124     Jasim Uddin
    If I Pass Ad_Id=129 Then Result Should Be
    Ad_Id   Ad_Name
    124     Jasim Uddin Database 10G XE
    Any help will be helpful

    Hi,
    HamidHelal wrote:
    WoW ! you acutely got my point. How did you understand that ? lLuck guess. Guessing is usually not the best way to solve problems. It's usually faster and more reliable to say exactly what you want, as well as give an example.
    ittle bit more i want to know, if i want to restrict the output not more then 2, what would be sql ?Now you're not even giviing an example!
    Maybe you want something like this:
    SELECT     ad_id
    ,     ad_name
    FROM     acc_test
    WHERE     LEVEL     BETWEEN 2 AND 3          -- Changed
    START WITH     ad_id     = :target_ad_id
    CONNECT BY     ad_id     = PRIOR ad_spm_id
    ;which will show jsut the parent and the grandparent of the given row.
    I do work with forms developer very much. Sql knowledge is as oracle sql book(cerfitication 9i). But this type of sql isn't available there.
    where can i learn this type of sql ? Different sql then ordinary ?Certification is a different topic entirely.
    There are books and web sites dealing with more advanced techniques. Sorry, I don't know any well enough to recommend them. Some authors (such as Tom Kyte) are consistently good.
    Here are a couple of sites that explain CONNECT BY queries:
    http://www.adp-gmbh.ch/ora/sql/connect_by.html
    http://www.oradev.com/connect_by.jsp

  • How can i write the code for make calendar in sap abap

    hi this aditya  from ongc trainee
    i want design the calendar which is editadle only at present date for tik is it present or not.

    Hi Ajay ,
              You can have Calender in your webdynpro Application by creating Element " DateNavigator" .

  • How can I get the attributes for this tag?

    THis is the tag:
    <InvoiceQueryRs requestID="1" statusCode="0" statusSeverity="Info" statusMessage="Status OK">
    But when I do a nodeType() is returns a "1" which is Element. Shouldn't it return Attribute type?
    org.w3c.dom.Document xDoc = xml.parseXML(false);
    Element el = xDoc.getDocumentElement(); //Using DOM API
    NodeList nl = el.getElementsByTagName("InvoiceQueryRs");
    NodeList nl = el.getChildNodes();
    for(int c = 0; c < nl.getLength(); c++) {
    System.out.println(nl.item(c).getAttributes());
    This code returns a "com.ibm.xml.dom.NamedNodeMapImpl@88f03c" for the attributes. I also tried a NamedNodeMap with similar results. Please help if you can!
    THanks
    Bill

    Nevermind, I got it. Thanks.

  • How can I write a query for this table?

    Dear friends
    I have a table with the following structur and data
    ID Name Value
    1 book 100
    2 book 200
    3 car 25
    4 car 35
    5 book 300
    now I would like write a query with following out put
    Name value
    book 100 , 200 , 300
    car 25 , 35
    (with , Separator) (my oracle version is 10g)
    thanks

    Try this,
    SQL> WITH t AS(SELECT 'book' NAME, 100 VALUE FROM dual UNION ALL
      2  SELECT 'book', 200 FROM dual UNION ALL
      3  SELECT 'car', 25 FROM dual UNION ALL
      4  SELECT 'car', 35 FROM dual UNION ALL
      5  SELECT 'book', 300 FROM dual)
      6      SELECT NAME, LTRIM (MAX (SYS_CONNECT_BY_PATH (VALUE, ',')), ',') VALUE
      7        FROM (SELECT NAME, VALUE, ROW_NUMBER () OVER (PARTITION BY NAME ORDER BY VALUE) rn FROM t)
      8  START WITH rn = 1
      9  CONNECT BY PRIOR rn + 1 = rn
    10             AND PRIOR NAME = NAME
    11    GROUP BY NAME;
    NAME VALUE
    book 100,200,300
    car  25,35
    2 rows selected.
    SQL> G.

  • How can i write the query for the below output

    Hi,
    I need this kind of output for my report.Please suggest me asap.It's urgent.
    Item Description category subinvcode A B C D....................(All Subinventories)
    1 AAAA FFF 5 8 (Quantity Values for the corresponding subinventories)
    Plz help.

    I still don't have a clue what you're going on about, but here's an example of pivoting that I've knocked up based on your scatty bit of data which may give some hint to you as to what to do....
    SQL> create table inventory as
      2  select 1 as item_id, '0016K8731' as item_desc from dual union
      3  select 2, '0014R0181' from dual;
    Table created.
    SQL>
    SQL> create table sub_inventory as
      2  select 1 as item_id, 'FG_IBM' as sub_item_id, 5 as quantity from dual union
      3  select 1, 'FG_HUN', 4 from dual union
      4  select 1, 'FG_PSA', 12 from dual union
      5  select 2, 'FG_IBM', 1 from dual union
      6  select 2, 'FG_HUN', 17 from dual union
      7  select 2, 'FG_PSA', 3 from dual;
    Table created.
    SQL>
    SQL> select item_desc, max(fg_ibm) as fg_ibm, max(fg_hun) as fg_hun, max(fg_psa) as fg_psa
      2  from (
      3    select i.item_desc,
      4           decode(s.sub_item_id, 'FG_IBM', quantity, null) as fg_ibm,
      5           decode(s.sub_item_id, 'FG_HUN', quantity, null) as fg_hun,
      6           decode(s.sub_item_id, 'FG_PSA', quantity, null) as fg_psa
      7    from inventory i, sub_inventory s
      8    where s.item_id = i.item_id
      9    )
    10  group by item_desc
    11  /
    ITEM_DESC     FG_IBM     FG_HUN     FG_PSA
    0014R0181          1         17          3
    0016K8731          5          4         12
    SQL>

  • How can I unlock the cookies for this web browser

    My web browser is locked and I need to unlock it to log in to a web acccount

    Sorry, but I'm not sure what you mean by "locked". Is that a message a web page is giving you, or a pop-up dialog, or ???
    If you want to delete the cookies that are currently in Firefox for Android, they are part of the "Clear Private Data" feature. See this article for detailed steps: [[Clear your browsing history and other personal data on Firefox for Android]].

  • How can I write a query for this?

    I have a table as below ,
    room.........date.............inventory
    A..............01/01.................5
    A..............01/02.................5
    A..............01/03.................5
    A..............01/05.................5
    A..............01/06.................5
    A..............01/07.................8
    I want the output as below
    room.....begin_date........end_date......inventory
    A............01/01.................01/03..........5
    A............01/05.................01/06..........5
    A............01/07.................01/07..........8
    Is there any suggestion?
    Thanks
    null

    with x as
    (select 'A' room, to_date ('01/01/2007', 'mm/dd/yyyy') d, 5 i from dual union all
    select 'A' room, to_date ('01/02/2007', 'mm/dd/yyyy') d, 5 i from dual union all
    select 'A' room, to_date ('01/03/2007', 'mm/dd/yyyy') d, 7 i from dual union all
    select 'A' room, to_date ('01/04/2007', 'mm/dd/yyyy') d, 7 i from dual union all
    select 'A' room, to_date ('01/05/2007', 'mm/dd/yyyy') d, 5 i from dual union all
    select 'A' room, to_date ('01/06/2007', 'mm/dd/yyyy') d, 5 i from dual
    select min (d)
         , max (d)
         , min (i)
      from (
    select room
         , d
         , i
         , max (g) over (order by d) mg
      from
    (select room
         , d
         , i
         , case when lead (i) over (partition by grp order by d) = i
           then rownum
           end  g
    from (
    select room
    , d
    , i
    , d - rownum grp
    from x
    order by d
    group by mg

Maybe you are looking for