Need help creating Vector table for specific class

I am trying to create a Vector table of class Node and I think I understand the concept but in practice I am not
sure why the compiler complains about non-static reference on statement mv.table.add(new Node(names[n]). Please help. I can not get this thing to work.
import java.util.*;
class MyVector {
Vtable table;
public static void main(String[] args){
MyVector mv = new MyVector();
String names[] = {"one","two","three","four","five"};
for (int n;n<names.length;n++)
mv.table.add(new Node(names[n])); //<-ERROR
table.list();
if (table.del("de")) System.out.println("deleted");
table.list();
public MyVector(){
System.out.println("MyVector_C");
table = new Vtable();
public class Node {
private String name;
public Node(){name=new String("Null");}
public Node(String s){name=s;}
public void setName(String s){name=s;}
public String getName(){return name;}
public String toString(){return "[Node:"+name+"]";}
public class Vtable extends Vector {
private Vector v;
public Vtable(){v=new Vector();}
public void add(Node n){v.add(n);}
public Node getNode(String s){
Iterator i=v.iterator();
while(i.hasNext()){
Node n;
n = (Node)i.next();
if (s.equals((String)n.name))
return(n);
return null;
public void list(){
Iterator i=v.iterator();
while (i.hasNext()){System.out.println((Node)i.next());}
public Boolean del(String s) {
Iterator i=v.iterator();
while(i.hasNext()){
Node n = (Node)i.next();
if (s.equals((String)n.name)) {
v.remove(n);
return(true);
return(false);
}

public class Vtable extends Vector {
private Vector v;
public Vtable(){v=new Vector();}
public void add(Node n){v.add(n);}
public Node getNode(String s){
Iterator i=v.iterator();
while(i.hasNext()){
Node n;
n = (Node)i.next();
if (s.equals((String)n.name))
return(n);
return null;
I get ur problem...
When VTable extends Vector all u have to do is...
VTable table=new VTable();
table.add(new node(..));
There is no need to get the Vector obj in picture as VTable extends Vector...
I guess, this helps u.

Similar Messages

  • Need Help creating Icon overlays for my SVN Client

    Hi I am currently writing an cross platform SVN client. I have icon overlay working in windows and linux. This is a small image that sits on top of the normal icon in finder and represents the current state of the file, e.i out of sync, up to date, un-versioned. But am really struggling trying to get it to work in OSX. At this point I only want it to work in snow leopard. This is where I have got to so far.
    I managed to create a QL plugin that worked. The only issue with QL plugins is that you have to specify what file types your plugin works for, (my sample worked for gifs). Unfortunately I don't know that as it needs to work for every file and folder on the system that contains a subfolder called .svn. So with a week of reading I have come to the decision that the only real way around this is to override the QLThumbnailImageCreate function that finder calls and replace it with my own if I find a .svn or call the original if not. However if this is the only route I have not been able to get any code to work that will replace the function with my own.
    If any one can show me an example of switching that function, or has an alternative solution. Or knows the LSItemContentTypes type that means my plugin will fire for every single file, then I would be very happy. I've spent no more than 2 days getting this to work on windows and linux, but I've spent soooo many hours on OSX. Any help would be great.

    DanUK wrote:
    Thanks for your reply etresoft. I know it definitely is possible because the application dropbox does it.
    I'm not so sure. People working on the SC Plugin SVN program have been trying to do that for years. I don't know if they have ever gotten it to work.
    But unfortunately its not open source so I can find out how they did it. The only other way I can do it is to monitor file system changes and then set a custom icon. But this has many draw backs. such as custom icons are persistant and will remain even when my software has been uninstalled.
    I think you should really look into using labels. An SVN/CVS user probably isn't going to be using icon view anyway. Labels will be far more useful in real life. Custom icons are just a gimmick.
    I using QT Creator to write the software so if you fancy a go I can share the project with you.
    Perhaps we should stick to our respective SCM programs. I'm not a fan of QT either

  • Need Help Creating A Script For Labeling Finder Files from Indesign

    Trying to figure out a way to have a script run in InDesign CS4 that will label a text file RED after it's been imported into InDesign.
    We import numerous text files into an InDesign template. Since there are several text files in the same folder, we need to somehow "mark off" that we've imported that file and move to the next one to import. I have created an Automator "service" with a keyboard shortcut to label the file Red in the finder but it would be great if we could have this happen automatically after we import into InDesign.
    If we import the wrong text file by accident and it gets missed in proofing, it costs us a lot of money with the printer.
    Thanks for any ideas.
    Jim

    You know, these guys are absolutely right in their assessment that this is a good place for event listeners. You would need three scripts though.
    Something like...
    Label Placed Files Red.scpt
    --Put this in a folder called IDScripts in your Documents folder
    main(evt)
    on main(myEvent)
    tell application "Adobe InDesign CS4"
    set placedFilePath to full name of myEvent
    set placedFilePath to placedFilePath as alias
    end tell
    tell application "Finder"
    --This turns the file color red
    set label index of placedFilePath to 2
    end tell
    end main
    And these two are in your InDesign scripts folder...
    Start Placed File Finder Labelling.scpt
    --Installs the afterImport event listener for the Label Placed Files Red script.
    tell application "Adobe InDesign CS4"
    set myHandler to path to documents folder
    set myScriptName to "Label Placed Files Red.scpt"
    set myHandler to "" & myHandler & "IDScripts:" & myScriptName
    try
    set myHandler to myHandler as alias
    make event listener with properties {event type:"afterImport", handler:myHandler, captures:true}
    display dialog "Placed File Labelling: ON" buttons "OK" default button 1
    on error
    display dialog "ERROR: Couldn't start handler!" & return & return & "Make sure the \"" & myScriptName & "\" script in a folder called \"IDScripts\" inside your Documents folder and try again" buttons "OK" default button 1
    end try
    end tell
    Stop Placed File Finder Labelling.scpt
    --Removes the afterImport event listener for the Label Placed Files Red script.
    tell application "Adobe InDesign CS4"
    set myHandler to path to documents folder
    set myScriptName to "Label Placed Files Red.scpt"
    set myHandler to "" & myHandler & "IDScripts:" & myScriptName
    set myHandler to myHandler as alias
    set myResult to remove event listener event type "afterImport" handler myHandler with captures
    if (myResult is false) then
    display dialog "ERROR: Couldn't remove handler! Are you sure it is active?" & return & return & "If so, please quit and relaunch InDesign to get rid of it." buttons "OK" default button 1
    else
    display dialog "Placed File Labelling: OFF" buttons "OK" default button 1
    end if
    end tell

  • Help to create a monitor for specific non-windows ID generated by script

    Hello all,
    Do you know how to create a monitor for specific event ID (4,5,6,7 & 8) in SCOM (with alerts) I know how to create a monitor but not how to create it for specific servers. I would like to copy those monitors in the Management Pack that I override (because
    the original was locked).
    Thanks for your help.

    Hi,
    you can create new DISABLED monitor in new management pack.
    After that you will enable this monitor for specific servers using overrides.

  • Help!  Help!~I need to create a room for a Robot to move in!!

    I need to create a room for a robot to move around in. How do I go about doing this?
    Im not sure where to start.
    Thanxs

    Could you define a shape and just have the robot check its proximity to the wall?
    I did something similar a couple of years ago where my hunter bots had to chase the rabbit bots and the rabbit bots ate the grass... you get the picture
    The hunters were able to see the rabbits and they were attracted to the area with most of them. The rabbits were able to see the grass and the hunters and were attracted to grass but if a hunter was in sight, that was overridden and they moved away from the hunters.
    The controllers were simple neural nets which were set up through GAs.
    How will your robot detect the walls? I mean, will it be able to pinpoint its position in the room or will it only have visual info (it will "see" the wall to its right etc)?
    If the first, I would be inclined to use some shape and just check for the position of the robot compared to the boundaries.
    If the second, I would make the shape out of a whole load of Point objects and arrange them in the shape of the room. The benefit is that you will be able to specify some vision function based on how many Points are within his field of vision, and then get the net to learn that the optimum value is x... or something like that. It has been a few years since I did that stuff.

  • Hyperlink table for IO class Issue - DMWB transaction

    Hi,
    We have problems when we want to activate some objects, specifically "ZRM_DOCXX". When we try to activate this object, an popup appears with the next error:
    "There is no active "hyperlink" table for IO class 'ZRM_DOCP05' in 'ZRM_DOC05'
    Message no. MODEL058
    Procedure
    Check the tabulation for the IO class &V2& and correct it if necessary."
    Anyone knows where can we can customize this "hyperlink" table?
    Thanks in advance and regards,
    Sidney

    Hi Raja,
    Thanks for your reply.
    When i entered the code you sent me, i get a hyperling with "Test Link". I am already haveing a link for the production order.
    When i click on the "Test Link", it stays in the same page.
    I sent the code in the forum.
    Is there anything that you can help me?
    I have created a transation ZCUS3 in SAP. The original Transaction code is ZCUS
    In "Services" file,i have :
    ZCUS1.srvc  --> ~transaction    ZCUS
    ZCUS3.srvc--> ~transaction    ZCUS3
                  ~sources        zcus1
    Is the above settings right ?
    Please do help me.
    Thanks ,
    Sathya

  • Do I need to create a view for this?

    Hi Ihave got 2 tables emp and project
    In emp tabe:
    emp_no
    family name
    given name
    In porgect table:
    emp_no
    status(assigned,unassigned)
    start_date
    end_date
    emp_no Family_name given_name
    1 Smith John
    In project table same employee can have many assigement eg
    emp_no status start_date end_date
    1 assigned 01-may-08 01-july-08
    1 assigned 01-sep-08 01-july-09
    1 unassigned 01-july-09 01-oct-09
    In the form:
    there are 2 querable fields "project ends between field1(date) and field2(date)" which is used to
    retrive records which have end date between field1 and field2.
    The following fields are needed to get from database:
    emp.family_name emp.given_name project.start_date project.end_date No.of time assigned
    Requirements:
    1. project.start_date and project.end_date must be the latest project_end_date for the same emp
    so in the above sample date
    2. No. of time assigned is a count of total of number records which have status='assign'
    So for the given sample data the record expected after query would be(field1=01-jun-08 field2=02-july-09)
    emp.family_name emp.given_name project.start_date project.end_date No.of time assigned
    Smith John 01-sep-08 01-july-09 2
    What is the best approach to get:
    1 The lastest project(latest end_date) for the emp
    2. get No.of time assigned.
    Do I need to create a view for this? If yes, any sample sql code this this?
    Thanks for your help

    Hi W1zard,
    Thanks for your reply. Could you clarify the following points for me:
    1.) you could create a master block basing on your emp table and a detail block basing on your project table with the relation over emp_no. set the default_where clause of your detail block programmatically using
    set_block_property('project', default_where, 'status = ''assigned'' and <your_date_criteria>');
    Q1: where I pit this code? in pre-query trigger in detail block?
    2.) Of course you could create a view to join both of your tables if you don't want to use master detail blocks; Also do the join over emp_no
    create or replace force view v_emp as
    select emp.family_name, emp.given_name, project.start_date, project.end_date
    from emp, project
    where emp.emp_no = project.emp_no
    Q2 As I mentioned before, there are multipal entries for the same emp in project table and we only need the maching record from project table which has latest end_date. So I think I need something like
    max(project.end_date) somewhere in create view to make sure only one record for one employee.
    Also is there possible to include the no. of assigned field(select count(*) from project where status='assigned' and emp=emp_no) into the view as well?
    Q3 All the fields mentioned above are diaplay-only. So Can I create a control block which has all the fields from emp and project. Then populate them with my sql. The question is
    where I put this customerised sql so when user click excute query. My sql will run and display one the form?
    REally appreciated your help!
    Michael

  • Need to Create a Check for Plant in WBS & Plant in Network

    Dear Guru's,
    While creating Project (CJ01) my users are creating in a Plant, and while creating network for the same project/WBS, they are using different Plant Code.
    Since my Profit center is related to the plant in CJ01,
    and because of wrong Plant in network, all my PR/ PO is going in a different Profit center, which is creating a huge problem while auditing.
    I need to Create a Check for Plant in WBS & Plant in Network...!!
    Kindly suggest me the ways to do it and how to do it...

    Hi Deepa,
    The Check you are trying to create between Plant defined at Project def and network level that should be same can be achieved through validation at the network level by using a user exit at network level.
                    While creating the network you can change the plant value not equal to the value at proj def/network profile may be one of the reason is since the network type is defined for more than one plant (OPUV).
                    While creating validations at network level we do not have the option of setting the prerequisite/check  using WBS or Proj def fields (i.e. PROJ-, PRPS- fields)    so we need to create a user exit at the network level.
    I am not sure but logically u can have a user exit for both prerequisite and check steps of the validation.
    You need to create the user exit in program ZGGBR000.
    Please take help from your Abaper for the same.
    OPSI-Network header-Validation- Step - Prerequisite u2013 Check u2013 Message.
    Prerequisite
    If Proj Profile = u2018XXXu2019 and Network Profile = u2018XXu2019 (or as per your logic if need be use a exit)
    CHECK.
    PROJ-WERKS = CAUFVD-WERKS   (This logic needs to be defined in user exit and set the same user exit at the check.)
    Once you define the user exit in ZGGBR000, it will be available in the tab u2018exitsu2019 at the Prerequisite and Check levels.
    The name of the form pool (e.g., ZGGBR000) that contains your user exit must be stored in table T80D.
    It is important that you make declare the code generation program for your user exit; how many and what type of parameters you are using for the user exit. You do this by entering your newly defined user exits in the form routine GET_EXIT_TITLES. Found in program ZGGBR000.
    Check with your Abaper to check on all the aboveu2026
    Message:
    Plant at Network level should be same as at Project def level.
    Hope it helps you,All the best..
    Regards
    Vinayak.

  • Uber Noob Needs Help Creating website!

    I need help creating my webpage: It has a textbox on it were
    the user enters a URL and it then redirects the end user to that
    URL when they press the GO Button. It also has a check box saying
    "Hide my IP", If the end user clicks this box and then clicks go
    they will be directed to the website they stateted in the Textbox
    but this time it shall mask there IP Address so they can bypass
    proxys and surf anonomosly. Please can someone give me some HTML
    code i could use for this site or a Link to a website that can give
    me the code.

    I assume the application is connecting to Oracle using an application ID/password. If so, check to see if that user has a private synonyn to the table. If so drop it since you have a public synonym.
    Verify that the public synonym is in fact correct. Drop and recreate the public synonym if you cannot select against the synonym name using an ID that can perform select * from inhouse.icltm where rownum = 1. That is if this other user cannot issue select * from icltm where rownum = 1 without an error.
    Check that the application ID has the necessary object privileges on the table.
    Queries you need
    select * from dba_synonyms
    where table_owner = 'INHOUSE'
    and table_name = 'ICLTM'
    You may find both public and private synonms. Either fix or delete. (Some may reference someelses.icltm table if one exists)
    select * from dba_tab_privs
    where table_name = 'ICLTM'
    and owner = 'INHOUSE'
    Note - it is possible to create mixed case or lower case object names in Oracle by using double quotes around the name. Do not do this, but do look to see that this was not done.
    You could also query dba_objects for all object types that have the object_name = 'ICLTM'
    HTH -- Mark D Powell --

  • Need to create a table

    hi
    i need to create a table emp( eno, ename, salary, address, doj, dob(dd-mm-yyyy), phone, city)
    which datatype suits for the dob column. as we need to enter in the format as 'dd-mm-yyyy'.
    please help.

    Hi,
    1009262 wrote:
    hi
    i need to create a table emp( eno, ename, salary, address, doj, dob(dd-mm-yyyy), phone, city)
    which datatype suits for the dob column. as we need to enter in the format as 'dd-mm-yyyy'.The DATE datatype is best for anything that indicates a point in time. Which format you want has nothing to do with the data type; DATEs can be entered or displayed in virtually any format you wish. I've said it, and the 2 earlier replies said it, but this is important enough to repeat: Always use the DATE datatype for information about dates.
    The only exception is when fractions of a second are significant, or when you need to capture time zone information along with the date. In that case, use the TIMESTAMP data type, but DATEs are a lot easier to use, and there are many more useful built-in functions for manipulating DATEs, so use DATEs whenever possible. For date-of-birth, you probably don't want to record hours, minutes or seconds, let alone fractions of a second, so there's no reason to use a TIMESTAMP, and there is never any reason to use any other datatype, such as VARCHAR2 or NUMBER.

  • What is the field and Table for "Batch Class" and "Class Type" in QM.

    Hi All,
    What is the field and Table for "Batch Class" and "Class Type" in QM.
    Thanks,

    Hi,
      For batch class the class type value is '023' . This you can find from KLAH table and the fileld for class type is KLART..
    And also all the data related to batch class are found in tables INOB, KLAH,KKSK and for the characeteristics of batch materials you can refer AUSP table.
    In INOB table, for batch class, you need to give 023 in KLART field and  value MCH1 in OBTAB filed.
    Please check this and let me know if this you need any more details?

  • What is the need of creating partner functions for sales document type.

    Hi SAP (SD-GURUS),
    Actually we create partner functions  before creating customer ex: sold to party, ship to party, bill to party, and payer.
    These partner functions are going to be copied into sales order while processing sales order.
    Again what is the need of creating partner functions for sales document type.
    Thanks&Regards
    sreenivas peruru

    There are some Partners you could enter at Sales ORder Level. E.g. Sales Person, Employee Responsible, Forwarding Agent, Broker, etc.
    Thus these partner Determination need to be carried out at Sales Order Level & not at Customer Master level.
    So we have to configure partner Determination for various levels e.g. Customer Master, Sales Order, Delivery level etc...
    Hope this helps...
    THanks,
    Jignesh Mehta

  • Need help in SQL table creation

    Hi All,
    I created a table a month back.Now i need to create another table of the same structure.
    Is there any way so dat i can get the script of the table which i created earlier and use the same to create another.
    Or is there another way so that we can create a table with same structure of the existing table.
    Please help.
    Regards,
    Mohan

    Check out the [DBMS_METADATA.GET_DDL|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_metada.htm#i1019414] function.
    Example:
    SQL> SET LONG 5000
    SQL> SELECT DBMS_METADATA.GET_DDL('TABLE','EMP','SCOTT') FROM DUAL;
    DBMS_METADATA.GET_DDL('TABLE','EMP','SCOTT')
      CREATE TABLE "SCOTT"."EMP"
       (    "EMPNO" NUMBER(4,0),
            "ENAME" VARCHAR2(10),
            "JOB" VARCHAR2(9),
            "MGR" NUMBER(4,0),
            "HIREDATE" DATE,
            "SAL" NUMBER(7,2),
            "COMM" NUMBER(7,2),
            "DEPTNO" NUMBER(2,0),
             CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"  ENABLE,
             CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")
              REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"Edited by: Centinul on Jan 11, 2010 8:01 AM

  • Not able to created Number Ranges for Asset Classes in AS08

    Dear Friends,
    I am not able create Number Ranges for Asset Classes in AS08.
    It is giving me an error message as company code does not exist.
    When I Check Consistency under path SPRO -> Financial Accounting -> Asset Accounting -> Preparing for Production Startup -> Check Consistency -> Overview Report: Company Codes. I am getting the following
    RSOL  Reliance Sealink One PLtd                                            
    CoCode no. alloc.    NKTR                                                
    Fiscal Year Variant  V3   Apr.- March, 4 special periods                 
    Start 2nd half month 00                                                  
    Transfer date        31.03.2006                                          
    Chart of dep.        TOLL Chart of Depreciation - For Highway Projects   
    Net worth tax        01   Book depreciation as per Compinies Act 1956    
    Enter net book value                                                     
    Status company code  2                                                   
    Current fiscal year  2007                                                
    Doc. type dep. pstng AF   Dep. postings                                  
    > Number range &1 in co.code &2 for doc.type &3 must be defined as internal
    Calc.insur.value                                                         
    Input tax exempt         
    If you see the above first two line you will find the difference is that Company code RSOL in the first line and NKTR company code in the second line.
    Actually CoCode no. alloc. has been wrongly copied as NKTR while copying CoCode it should be RSOL and not NKTR.
    I think because of this wrong allocation it is giving me an error in AS08. Also it is not showing me CoCode in drop down list in AS08.
    Please help me to resolve the problem.
    Thanks
    Rahul Jain

    Look in TC OAOB if the company code is assigned to a chart of depreciation

  • Need a bapi or table for GL Report

    Hi experts,
    I need a bapi or table for generating report period balance for GL accounts. i found one bapi BAPI_GL_GETGLACCPERIODBALANCES which is closer to my requirement. But i want to get the balances for cost center and particular material. As Cost center and product ranges are in my selection fields.
    Can anyone tell me table or BAPI?

    SAP standard infoset query provides a report STDCOST for this.
    May be this will suit your requirement. It will give material wise costing.
    hope this helps.
    reward if helpful.

Maybe you are looking for

  • Deployment issue in Weblogic 9.2

    Hi, I get the below error while deploying my application in Weblogic 9.2.Guess, it has something to do with class path but am unable to fix it.Any help on this, would be great. Regards, Rahul ###<Oct 3, 2006 8:16:40 PM IST> <Error> <HTTP> <hpuxdhl> <

  • FCC receiver file adapter new line 'nl' is not working

    Hi Experts, I am doing idoc to file scenario,i have to creart a text file in which each line will have a record. i am using Recordset Structure -->DeliveryRecords DeliveryRecords.addHeaderLine 0 DeliveryRecords.fieldFixedLengths 4,25,3,10,10,10,8,18,

  • SAP PRD system installtion on HP-UX   db2 with HA??

    Hi All, I want to install prd system with high availability pls suggest me file systems on virtual and physical host names. I am planning to install Node1: ASCS,CI,ERS instances node2: DB,ERS,Dialog instances and i am some confusing about usr/sap/tra

  • Help with Dreamweaver and appearance

    I'm new at creating websites. I need control of where to place stuff on the page so I'm using layers. I need to know HOW to format my page so that when people increase the font size on their browser, the whole page increases proportionally and doesn'

  • Idoc Missing On the ECC SAP System Side

    Hi All In my case an Idoc is being sent to the SAP ECC system from XI . I can see the message is successful in SXMB_MONI of XI, the message has a chequered flag , I also locate the IDOC in the IDX5 in the outbound entries . But I am not able to locat