Creating many arrays with different names

I'm trying to create many arrays with a different names by calling this method:
n=name of array
c= some string
public Array[] newArray(String n, String c)
n[n.length]= new String();
n[n.length]= c;
As you experts might guess this does not compile. Is it even possible to do this?

no, you cannot make a dynamic variable like that.
and no, that is not the way to make arrays.
and no, there is no such thing as "Array[]" ( unless u have made an "Array" object ).
code for a new array is as such
public Object[] newArray(int size){
  return new Object[size];
}called as such:
String[] strings = (String[]) newArray(10);
strings[0] = "hmmm";mmmmm

Similar Messages

  • Creating Multiple Files with different name at Receiver side

    Gurus -
    Can anybd tell me how to generate multiple files at the Receiver side in the given target directory with different file names?
    One source message will contain number "N" using which we have to generate files "N" number of times at the Receiver side.
    Kindly help.

    hi,
    are you following this blog?
    provided you have SP>14 and no IDOC/HTTP involved.
    and have you got the error you mentioned when testing with sample payload?
    from where did you take the payload? if is from SXMB_MONI make sure you dont have <MESSAGE> tags in the payload,generally systems adds <MESSAGE> tags when you do multi mapping.
    get the payload from SXMB_MONI right click ->view source payload(this is raw data) and test it.
    it should be ok now.
    and refer my discussion in the thread ,as I got he same error.
    Split mapping created no messages -Mluti Mapping

  • Create .Mac website with different name?

    My dot Mac account uses my name -- convenient for email. When I go to create a blog, which I'd rather not do under my name, iWeb publishes to a url with my dot Mac ID as part of the path. Is there some way to change that?

    You can obtain a "Personal domain" and redirect or assign your web.mac.com account as a CNAME. I use www.ipower.com for $6.50 a year and a lot of people pay godaddy.com $9.99 a year for the same thing. Although with ipower I use a masking redirect (which always shows the domain you choose) and haven't seen if they offer the CNAME option. .Mac has instructions if you go to your account settings and click on "Personal Domain". But don't actually go through the process until you've set up on your domain provider's site because it will make your site inaccessible if it's not set up right (which can be fixed by deleting the Personal domain settings on .Mac).
    Good luck!

  • Create n tables with different number names

    Hi guys, I work with SQL Server 2008 and OS Windows Server 2008 R2 64 bits. I have to create 10 tables with different names e.g. 'Image1', 'Image2', and so on. For this goal, I use a loop and concatenation. Here is the code:
    DECLARE @i INT
    DECLARE @v_table_n CHAR
    SET @i=1
    SET @v_table_n='Image'
    WHILE (@i<=10)
    BEGIN
        DECLARE @STR VARCHAR(100)
           SET @STR = 'CREATE TABLE SQL_DB_Filestream.dbo.Image1' + @v_table_n + CAST(@i AS VARCHAR(10)) + ' (
           [ID_RowFeatVec] INTEGER NOT NULL PRIMARY KEY,
           [CF1] FLOAT,
           [CF2] FLOAT,
           [CF3] FLOAT
           EXECUTE @STR
        SET @i = @i + 1;
    END
    GO
    As a result, an error message appears:
    "The name 'CREATE TABLE SQL_DB_Filestream.dbo.Image1I1 (
        [ID_RowFeatVec] INTEGER NOT NULL PRIMARY KEY' is not a valid identifier."
    I have tried a lot of versions but it doesn't work.
    What am I doing wrong?
    Best wishes
    SV_proj

    >> I have to create 10 tables with different names e.g. 'Image1', 'Image2', and so on. For this goal, I use a loop and concatenation. Here is the code: <<
    1) An SQL Programmer would write ten CREATE TABLE statements. Are you old enough to know about Rube Goldberg? He was a cartoonist who invented inanely complex device for simple task!
    2) Ten identical tables is a huge design flaw. It is so awful I want to use it in one of my books. Tables are sets. A set is completed whole, or as Cantor said “a many that is treated as a one” (it sounds cool in German or Esperanto). 
    3) We hate loops in SQL. This is a declarative language. I will bet you have no idea what that means. 
    What you want to do is mimic a magnetic tape file system from the 1950's. We used to put a label on the tapes based on the date or a sequence number. Not a completed whole. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Is it posible to create objects with different names dinamically?

    Hi,
    I'm creating an app that manages different wireless nodes in a network and I was thinking that I could create a class called Node which would have a constructor that every time I created an object Node, I would pass the address and some other data about the Node and the constructor will save all that data and also create a unique ID for every Node object.
    Now the problem is that I need to be able to discover all the nodes in my network every time the user clicks a Ping button. So every time the users clicks Ping I need to do a ping and create as many Node objects as nodes I have in my network. The thing is I don't know how to make it create the node objects with different names so after I've created all the nodes objects I can refer to one of them.
    Something like this.
    int Id=0;
    id++;
    Node node+Id = new Node();
    I think its not possible to do something like that. If it isn't how can I do to refer to one of the objects I've created?
    Thanks.

    Twistx77 wrote:
    Thanks to both of you. I'll check out the Link and if I can't find the solution there I'll make the array , I don't know how I didn't think about doing that. There are two collections you should study specifically:
    First you have the ArrayList which in essense is a growable array. This means you don't have to decide in advance how big it can be.
    Second there's the HashMap. It's sometimes called an associate array. Such an array doesn't have fixed position indexes like an ordinary array. Instead each index (called key) is associated with a value but the keys don't have any particular order. Still, given a certain key, finding the corresponding value in a HashMap is almost as fast as an array access.

  • Install many executable on the same PC with different names

    Hello,
    I'm trying to install several executables with different names in the same computer but at the end of install process the message is : "an higher  or existing version is already installed in this computer"
    I create the Executable and Setup with LabVIEW Application Builder and install the executable in the same Program Files root directory with a different sub-directory for each executable as this : Program Files-->MyProject-->SubProjet1 with exe1/SubProject2 with exe2 etc...
    My OS is WinXP pro SP2 and I work with LabVIEW 8.5.
    Thanks and regards,
    Armindo PINTO

    Hi Armindo,
    Thank you for using the NI forums! 
    From what I understand, you are trying to create multiple executables of a vi project to co-exist on the same PC. Any time you re-use the LabView 8.x project file, it will generate
    install package with the same product ID number. That means, if the
    deployed PC has the previous version installed, which had been
    generated from the same project file, the new install package will
    remove the previous version and overwrite it with the new version. Or as in your case, not allow you to install lower versions of the executable. That
    means, the previous version will be no longer available on the deployed
    PC. If you are creating an upgraded version to the product this is
    fine.
    However, if you need to re-use the LabView 8.x project
    file and generate a new product, which can potentially co-exist with
    the previous on the end user PC, you need to generate a new installer
    with a different product ID number. One of the way to do it:
    Copy existing project file (e.g. "name1.lvproj") under a different name (e.g. "name2.lvproj")
    Open the new instance of the project
     Expand the "Build Specifications"
     Right click on the installer specification, e.g. "name1 Installer"
    Select "Duplicate" from the menu
    You can now delete the instance "name1 Installer" and rename the "Copy of name1 Installer" to a suitable name, e.g. "name2 Installer"
     Make changes that are needed between the two versions, for example:
    Select a new source VI
    Build a new exe file
    Reflect the new exe file in the "name2 Installer"
    Make
    any other changes needed in "name2 Installer", for example different
    documentation files included in install, change in the target install
    directories, changes in the start menu shortcuts. etc.
    Build the install.
    Please let me know if this solves the issue, and let me know how you get on.
    Kind regards,
    Ashish Naik
    Field Sales Engineer
    National Instruments UK

  • Is it possible to create a Synonym with different column names

    Hi,
    I want to create a Synonym with different columns names (Columns not in original table) . I am not sure if this can be done . Any suggessions...
    Thanks in advance....

    Synonyms are not limited to tables. Accroding to the SQL Reference, a synonym is:
    an alternative name for a table, view, sequence, procedure, stored function, package, materialized view, Java class schema object, user-defined object type, or another synonym.
    In fact, synonyms are not even validated until they are used:
    SQL> create synonym my_synonym for table_which_does_not_exist;
    Synonym created
    SQL> select * from my_synonym;
    select * from my_synonym
    ORA-00980: synonym translation is no longer valid

  • To create multiple files with same content but with different names

    Hi SapAll.
    here i have got a tricky situation on Idoc to File Scenario.
    in my interface of an Idoc to file ,there  is requirement to create multiple files with different file names but with same content based on one Idoc Segment.
    which means there will be one Zsegment with two fields in the idoc,where one field with (content refers to the name which file name should start with .so lets say if this segment is repeated for 3 times then PI should create 3 files in the same directory with same content but with different file names (from the filed).
    so here for now iam using one reciever file communication channel.
    can any body give me the quick answer.
    regards.
    Varma

    What do you mean by different names?
    when i make proper setting in the Receiver Channel....on how to create the filename (what to append) like add Timestamp, counter, date, messageid.....even in this case you will ahve file with different names and that too from same File channel.
    You can perform multi-mapping in XI/ PI and then your File channel will place the files in the target folder with relevant names. You cannot use Dynamic Configuration with Multi-Mapping!
    If you intend to use different File channels, then do the configuration as required (normal)...even over here you can follow multi-mapping.
    Do not use a BPM!
    Regards,
    Abhishek.

  • Export schema and import with different name

    Hi ,
    I need your assistance guys,
    I need to export a schema from a database and then import it with different name to another database. How can I do that?
    I export it with the following command:
    exp userid=system/PW file=May_02_Export.dmp log=May_02_Export.log owner=schema_name statistics="none"
    Now I want to import it but with different name (schma_name).
    Regards

    Did you try FROMUSER and TOUSER option ?
    E:\oracle\product\10.2.0\db_1\install>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Sat May 2 20:01:09 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL> startup
    ORACLE instance started.
    Total System Global Area  167772160 bytes
    Fixed Size                  1247900 bytes
    Variable Size              71304548 bytes
    Database Buffers           92274688 bytes
    Redo Buffers                2945024 bytes
    Database mounted.
    Database opened.
    SQL> create user fromuser identified by fromuser;
    User created.
    SQL> grant resource, create table, create session to fromuser;
    Grant succeeded.
    SQL> create user touser identified by touser;
    User created.
    SQL> grant resource, create table, create session to touser;
    Grant succeeded.
    SQL> conn fromuser/fromuser
    Connected.
    SQL> create table export_table(a char);
    Table created.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    E:\oracle\product\10.2.0\db_1\install>exp fromuser/fromuser file=e:\a.dmp
    Export: Release 10.2.0.1.0 - Production on Sat May 2 20:03:06 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user FROMUSER
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user FROMUSER
    About to export FROMUSER's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . about to export FROMUSER's tables via Conventional Path ...
    . . exporting table                   EXPORT_TABLE          0 rows exported
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting operators
    . exporting referential integrity constraints
    . exporting triggers
    . exporting indextypes
    . exporting bitmap, functional and extensible indexes
    . exporting posttables actions
    . exporting materialized views
    . exporting snapshot logs
    . exporting job queues
    . exporting refresh groups and children
    . exporting dimensions
    . exporting post-schema procedural objects and actions
    . exporting statistics
    Export terminated successfully without warnings.
    E:\oracle\product\10.2.0\db_1\install>imp help=y
    Import: Release 10.2.0.1.0 - Production on Sat May 2 20:03:47 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    You can let Import prompt you for parameters by entering the IMP
    command followed by your username/password:
         Example: IMP SCOTT/TIGER
    Or, you can control how Import runs by entering the IMP command followed
    by various arguments. To specify parameters, you use keywords:
         Format:  IMP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
         Example: IMP SCOTT/TIGER IGNORE=Y TABLES=(EMP,DEPT) FULL=N
                   or TABLES=(T1:P1,T1:P2), if T1 is partitioned table
    USERID must be the first parameter on the command line.
    Keyword  Description (Default)       Keyword      Description (Default)
    USERID   username/password           FULL         import entire file (N)
    BUFFER   size of data buffer         FROMUSER     list of owner usernames
    FILE     input files (EXPDAT.DMP)    TOUSER       list of usernames
    SHOW     just list file contents (N) TABLES       list of table names
    IGNORE   ignore create errors (N)    RECORDLENGTH length of IO record
    GRANTS   import grants (Y)           INCTYPE      incremental import type
    INDEXES  import indexes (Y)          COMMIT       commit array insert (N)
    ROWS     import data rows (Y)        PARFILE      parameter filename
    LOG      log file of screen output   CONSTRAINTS  import constraints (Y)
    DESTROY                overwrite tablespace data file (N)
    INDEXFILE              write table/index info to specified file
    SKIP_UNUSABLE_INDEXES  skip maintenance of unusable indexes (N)
    FEEDBACK               display progress every x rows(0)
    TOID_NOVALIDATE        skip validation of specified type ids
    FILESIZE               maximum size of each dump file
    STATISTICS             import precomputed statistics (always)
    RESUMABLE              suspend when a space related error is encountered(N)
    RESUMABLE_NAME         text string used to identify resumable statement
    RESUMABLE_TIMEOUT      wait time for RESUMABLE
    COMPILE                compile procedures, packages, and functions (Y)
    STREAMS_CONFIGURATION  import streams general metadata (Y)
    STREAMS_INSTANTIATION  import streams instantiation metadata (N)
    The following keywords only apply to transportable tablespaces
    TRANSPORT_TABLESPACE import transportable tablespace metadata (N)
    TABLESPACES tablespaces to be transported into database
    DATAFILES datafiles to be transported into database
    TTS_OWNERS users that own data in the transportable tablespace set
    Import terminated successfully without warnings.
    E:\oracle\product\10.2.0\db_1\install>imp system/oracle fromuser=fromuser touser=touser file=e:\a.d
    Import: Release 10.2.0.1.0 - Production on Sat May 2 20:04:20 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export file created by EXPORT:V10.02.01 via conventional path
    Warning: the objects were exported by FROMUSER, not by you
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    . importing FROMUSER's objects into TOUSER
    . . importing table                 "EXPORT_TABLE"          0 rows imported
    Import terminated successfully without warnings.
    E:\oracle\product\10.2.0\db_1\install>sqlplus touser/touser
    SQL*Plus: Release 10.2.0.1.0 - Production on Sat May 2 20:04:36 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> desc export_table
    Name                                      Null?    Type
    A                                                  CHAR(1)
    SQL>HTH
    Aman....

  • How to create two employees with same name as supplier record?

    Dear all,
    We need to create a supplier record for an employee so that we can issue invoice for pretty cash payment. If there are 2 employees with same name, how can we create supplier records for these 2 employees? The system does not allow duplicate supplier name.
    Please advise.
    Regards,
    HY

    Hello,
    In R12 it is possible to create 2 employee with same name but different employee number.
    And also possible to create these 2 employees as suppliers in Payables.
    HTH,
    Vik

  • How to create logical directories with same name on two databases

    Hi,
    OS: Windows
    Oracle Version : 10g
    I have to databases in one oracle home. I have created some logical directories in one database. When I am trying to create logical directories with same name in another database, it is overwriting the first database directory paths with the second one
    Can't we create directories with same name but different path in two databases on one machine?
    Pls suggest me on this
    Regards,
    Vijay

    I am trying to create logical directory using CREATE
    DIRECTORY statement. I am very much aware that the
    create directory statement doesn't create directory
    on OS. But we can attach the physical directory on OS
    to logical directory in oracle
    My requirement is to create logical directories in
    oracle mapping the OS directories. Both the
    databases, wil have same logical directory names but
    different OS directory mappingsIf I understand you correctly, you can do this:
    On DB 1
    CREATE OR REPLACE DIRECTORY same_dir_name as 'C:\myoracle\mydir1';
    On DB 2
    CREATE OR REPLACE DIRECTORY same_dir_name as 'D:\myoracle\mydir2';
    What stops you from doing that ?
    Note: If what you have is one database but different connections, then you are connecting to one database. The above second statement will drop and replace with the first one

  • Unable to copy database with different name in the same instance

    I had a huge database and wanted to try some change optimization changes.
    So wanted to make a copy of the database along with data in the same instance.
    I have tried copy database wizard several times but always see the error as in attachment.
    Can someone let me know how to troubleshoot further?
    If this is not the correct way please suggest how do i copy a database with different name in the same instance along with data.

    Hi Nandu,
    From the screenshot, the error 1813 happens when corrupt database log is attempted to attach to the SQL Server. To work around this issue, please preform the following steps, for more details, please review this
    blog.
    1. Create a new database with same name which you want to recover. Make sure that the MDF file and LDF file have same name with previous database data and log file.
    2. Stop SQL Server. Move original MDF file from old location to new location by replacing just created MDF file. Delete the LDF file of new location just created.
    3. Start SQL Server. At this point, the database is in suspect status.
    4. Make sure that system tables of Master database allows to update the values. Please note that you will be performing this in query window.
    Use Master
    go
    sp_configure 'allow updates',1
    reconfigure with override
    go
    5. Change database mode to emergency mode.
    SELECT *
    FROM sysdatabases
    WHERE name = 'DatabaseName'
    BEGIN
    UPDATE sysdatabases
    SET status = 32768
    WHERE name = ' DatabaseName '
    COMMIT TRAN
    6. Restart SQL Server. Then execute the following DBCC command in query window to create new log file.
    DBCC TRACEON (3604)
    DBCC REBUILD_LOG(databasename,'c:\yourdatabasename_log.ldf')
    GO
    7. Reset the database status using following command.
    sp_RESETSTATUS yourdatabasename
    GO
    8. Turn off the update to system tables of Master database running following script.
    USE MASTER
    GO
    sp_CONFIGURE 'allow updates',0
    RECONFIGURE WITH OVERRIDE
    GO
    9. Reset the database status to previous status.
    BEGIN
    UPDATE sysdatabases
    SET status = (value retrieved in first query of step 5)
    WHERE name = 'DatabaseName‘
    COMMIT TRAN
    GO
    Make sure that you have done all the steps in order and restarted SQL Server where it is mentioned. Also run SQL Server Management Studio as administrator.(Right click-> Run as Administrator)
    Thanks,
    Lydia Zhang

  • Copying a script name with different name

    Hi,
    I want to copy my script form which has name zform1. Now i want to copy the same script form with different name i.e zform2 in the same client.
    in my se71 window i do not have a copy icon on the toolbar.
    pls. help me on how to do this.
    Thanks,
    Rose.

    Hi,
    Please follow the steps below :-
    1. Create a SCRIPT with the new name and just save it ( No need of defining any windows, just shot description is enough).
    2. Open the newly created script in change mode and go to the tab 'Form' and press 'Copy from..' .
    3. A small wondow will pop up, wherein you need to enter your previous SCRIPT name.
    4.Once done, your script will be copied.
    Please reward points if helpful.

  • Same SKU with different names in 2 systems

    Hello All,
    I am wokring on a SNP scenario. We have a finished sku A and its sub component sku C.
    <b>A (FERT) ---> C (RM)</b>
    We have forecast on sku A and want to find dependent demand in sku C thru SNP
    <b>Forecast A -
    > Find Dependent Demand C</b>
    <b>sku A maintained in ERP1 R/3 system as FERT
    sku C maintained in ERP 1 R/3 system with different name sku B as Raw material
    sku C maintained in ERP2 R/3 system as FERT</b>
    Now product A is maintained in one R/3 system and product C is in another R/3 system. Both these R/3 systems are connected to APO and both these materials are also in APO now.
    After heuristic planning in SNP, we want to pass the dependent demand to ERP2 system as Sales Order.
    My concern is if sku C has different name in 2 systems, how should I pass the demand to other system?
    Please advice.
    Thanks,
    Sanju
    Message was edited by:
            Sanju

    Maybe you can create SKU D in APO (and R3)  which is lined through PPMs or PDS to SKU B from ERP1 and SKU C from  ERP2 and aggregate  the dependent demand generated during Heuristics to SKU D
    then you can only transfer only SKU D to ERP2? Am not sure how important it is for you to hav the link between SKU D and SKU c in ERP2
    Alternately
    Dont transfer SKU C from ERP2 to APO. Only create Dependent demand for SKU C from ERP1 and transfer it to ERP2. You can run MRP again in ERP1 for the aggregated requirement (unless you want some APO specific functionality, the result must be close to what you will get in APO)

  • Saving png photos with different names..

    Hello guys,
    I am not not so familiar with Labview so i would like some help. I have a Vi which is actually controlling 32 RBG lights.We use DMX protocol..everytime one led is on then we take a picture and then the led goes off..Then the second goes on end so on..we have 8leds in 4corners..So we have corner1_led1,corner1_led2 untill corner4_led8 .So in the end we have 32 png photos saved.What i want is to save the photos with different names and the numbers to start from 1 instead of 0.. For example if we select white light and  save the images as "new" the images are going to be named "new_white_0_0" instead of "new_white_1_1" . Do you have any idea how i can change it?
    Attached current photos names and Vi. 
    Any comment would be helpful.
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    14_07_21_WMS_RGB LED panel.vi ‏162 KB
    names.png ‏127 KB

    The indexing terminal (the [ i ] in the for loop) starts at 0. When creating your filename, use the "increment" primitive from the numeric palette. Then your file names will start at 1 instead of 0.
    I noticed from your VI that you do a lot of string concatenation to build the file name/path, you can use the format into string and build path VIs to make the block diagram look a little simpler. You could also update the deprecated functions (e.g. the open file) with the modern equivalents.
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

Maybe you are looking for

  • Using a variable in communication channel

    Hi, I have a lot of Communication Channels looking for files in the same directory. This directory's path will be changed soon and so I assume I'll have to change all my Communication Channels. I was wondering whether there was a means of using a var

  • TS1717 itunes will not open in windows 7 and it did in the past?

    Two months ago I was able to open itunes with my Windows 7 PC and now it will not open.  Can anyone provide me any assistance?

  • OC4J + Apache

    hi! i currently have in my system, a running apache working hand in hand with OC4J. I'm trying to distribute the webserver load of my system by limiting all the static elements (eg, html, images) to apache and leaving all dynamic elements (servlets,

  • How to restrict decimal values upto two decimal places?

    Hi all, I want to restrict decimal figures upto two places. How to do that? Help will be appreciated. atanu [email protected]

  • Roaming Profiles over NFS

    Does anyone know if it is possible to use Windows roaming profiles on an NFS share using Microsoft's Client for NFS?