2d object with multiple primitive types

I've done some research and tried a few options and finally decided that I want a two dimensional object to handle several different types of primitives. My current plan is to just put them all in a 2d String array, then parse them to whatever type I need when I need to do calculations with the integers or doubles. But I also wanted to ask if there was already an object type that could handle this for me without the parsing. I need more than one value per key, so I don't think that a map will work (although I've admittedly never used one before and may not fully understand how it operates).
My other thought was to just make a new object with several different arrays of different types and to use the indices to relate one to another. This would at least clean up my code and take out some repetitive parsing steps, but it seems a very roundabout way to handle the situation.
Any suggestions?
Should I just use a 2d String array?
Should I make a new object?
Does an object already exist for this application?
Also, if I muddied any of this up by using improper word choice, please let me know so that I can try to clarify.

Fair enough. I'm working on analyzing some data for a videogame. I want to find the optimal set of items on a character by trying every combination and analyzing it's effectiveness. In order to do this, I want to store about a dozen different stats (some integers, some doubles) for about 30 different items along with the item's name, then use some nested loops to evaluate each combination. There is no 'perfect answer', so I need to perform this process multiple times under varying circumstances. I figure this would be easiest to accomplish if every stat is associated with an x value and every item is associated with a y value because I could then use the index of a for loop to process the information.
In short, I have several different data types that I want to store in a manner that allows me to load and retrieve all the information using loops. Each set of data has the exact same format (String, int, int, double, double, double...).
I know it doesn't sound like an important project, but I like to take any opportunity I can to practice my programming. I think it's an important skill in today's world and I'm always trying to improve.

Similar Messages

  • Object with multiple states and slider in folio are rasterized, settings seem correct.

    I am having trouble keeping An object with multiple text states from being rasterized, as well as a slider that is also rastering.
    I have read that you are supposed to set the folio and article up to be .pdf and that the slider should have the vector option chosen.
    I haven't found anything for the multi state object to for these settings.
    What happens is when I output the folio to Adobe Content Viewer, only the text in those items is rasterized. All other text is crisp. Tested on both iPad Mini and iPad Retina and the both are blurry.
    Is there a way to force the vector option? It seems even with the correct options selected it is still rastering the test in interactive elements.
    Thanks!

    Here is the MSO with the folio.
    Here is the Slider with folio overlays panel.

  • Flat File with multiple record types (OWB 10.2.0.2)

    Hi!
    I`m using OWB 10.2.0.2 and I`m trying to load a flat file with multiple record types, using SQL LOADER.
    In the flat file editor in the Record tab, I`ve set the type values and the corresponding record names like this:
    Type Value Record Name
    ======== ===========
    T TRAILER
    0 DETAILS
    1 DETAILS
    2 DETAILS
    When using this flat file in a mapping to load the data in a staging table, the generated code looks like this:
    INTO TABLE TRAILER
    TRUNCATE
    REENABLE DISABLED_CONSTRAINTS
    WHEN (1:1) = 'T'
    INTO TABLE DETAILS
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    WHEN (1:1) = '0,1,2'
    The above clause (WHEN (1:1) = '0,1,2') is wrong as I expect one "INTO TABLE..." clause for each record type.
    Could this be a bug or am I doing something wrong?
    Thanks a lot for your help,
    Yorgos

    We`re using two target tables, one for the trailer record and the other for the details records.
    We are facing this problem from the moment we upgraded from OWB 10.1 to OWB 10.2.0.2, so we think it must be something with the way the sql loader code is generated in the new version.
    As our data sources are mainly flat files coming from mainframes, this is a huge problem for us. We even asked an expert in DW from Oracle to help us on this, but still haven`t found a solution.
    Is there any workaround for this or should we forget sql loader and go with an external tables + custom PL/SQL code solution?
    Your help is greatly appreciated Jean-Pierre.
    Regards,
    Yorgos

  • Implementing a view Object with Multiple Updateable Dependent Entity Objects

    Hello,
         I want to implement view object with multiple updateable entity object,
         i have refered this link its good https://forums.oracle.com/thread/63721
         here they have explained with 2 table,
         but when we have more then 5 tables and each table have Primary keys , Foreign key , Sequence and  trigger created on it. Then whats steps should i want to fallow.
         if possible some please provide the link or some one help me out how to do this .
         thanks in advance
         cheers

    Has the Advanced View Object Techniques been referred?

  • Implement a View Object with multiple entity objects

    Hi
    In 'How to' section on the 'otn.oracle.com' (Jdeveloper) web site is tutorial how to implement a View Object with multiple updateable dependent entity objects.
    It allows user to insert an employee and a department at the same time.
    But I would like to change this example to insert a new department only if it does not already exist. How to change this sample?
    Is there any other way to this?
    Thanks
    Regards
    Gorazd

    Once again the structure, sorry.
    ViewObject
    |-ParentEntityObject
    ..|-PId
    ..|-PAttribute
    ..|-CId (FK)
    |-ParentChildAssociation
    |-ChildEntityObject
    ..|-CId
    ..|-CAttribute
    Christian

  • To get Class object representing the primitive type by a String

    for classes,I can use
    classNameString = "java.lang.String"
    Class c=Class.forName(classNameString);
    to get Class object representing the classNameString.
    but to get Class object representing the primitive type ,I have to use something like :
    Class c=Integer.TYPE;
    is there any way to get Class object representing the primitive type by a String?

    not using Class.forName(). you'll just need to key off the String passed to see whether it names a primitive:class ClassUtilities {
       * Gives the <code>Class</code> corresponding to a named class or primitive.
       * @param  name  FQN of a class, or the name of a primitive type
       * @param  loader  a {@link java.lang.ClassLoader ClassLoader}
       * @return  the <code>Class</code> for the name given.  This method
       * converts primitive type names to their particular <code>Class</code>
       * object.  <code>null</code>, the empty string, <code>"null"</code>, and
       * <code>"void"</code> yield {@link java.lang.Void#TYPE Void.TYPE}.  If any
       * classes require loading because of this operation, the given
       * <code>ClassLoader</code> performs the loading.  Such classes are not
       * initialized, however.
       * @throws  ClassNotFoundException  if the name names an unknown class
       * or primitive
       * @see  java.lang.Class#getName
      static Class classForNameOrPrimitive( String name, ClassLoader loader )
        throws ClassNotFoundException {
        if ( name == null || name.equals( "" ) || name.equals( "null" ) || name.equals( "void" ) ) {
          return Void.TYPE;
        if ( name.equals( "boolean" ) )
          return Boolean.TYPE;
        if ( name.equals( "byte" ) )
          return Byte.TYPE;
        if ( name.equals( "char" ) )
          return Character.TYPE;
        if ( name.equals( "double" ) )
          return Double.TYPE;
        if ( name.equals( "float" ) )
          return Float.TYPE;
        if ( name.equals( "int" ) )
          return Integer.TYPE;
        if ( name.equals( "long" ) )
          return Long.TYPE;
        if ( name.equals( "short" ) )
          return Short.TYPE;
        return Class.forName( name, false, loader );
    }

  • One Output with multiple communication types

    Hello,
    My requirement is to print the document as well as send an email to the customers from the same output.  Basically One output with multiple communication types ( PRINT  & EMAIL).  How to configure this in the output type configuration area? Please reply. Thanks

    This should be possible with the same output type,
    have the output type defined with multiple medium in NACE under processing routines. (say print out in one line & external send in another).
    have the condition record maintained appropriately for different customers with different medium.
    Note: if your access has customer, dont think you can maintain both 1 & 5 for the same access.
    if this functionality is required, i think you can acheive this by maintaining the output under different access, but this will not ensure the same condition type flowing into the document unless the earlier condition type goes to processed status.
    Thanks & Regards
    Ilango

  • Flex services with multiple return types

    Hello,
    We are creating a webapplication with flex and php.
    Everything is working very good, until we got to the library part of the application.
    Every service so far had only 1 return type (eg: User, Group, ...)
    Now for the library we want to return a ArrayCollection of different types of objects. To be more specific the LibraryService should return a ArrayCollection containing Folder and File objects.
    But how to configure this in Flex (Flash Builder 4 (standard))?
    So far it converts every object to the type Object, i would really like it to be Folder or File
    The only solution we can think of right now is to create a new object Library that will contain 2 ArrayCollections, one of type Folder and one of type File. This could work ofcourse, but I wonder if there is a better solution for this OR that i can configure multiple return types for a service.
    Any ideas/advice is greatly appreciated.

    Normally if you are using Blazeds(Java stuff, i'm sure there should be something similar for php), you can map java objects to that of the AS objects, when you get the data back you are actually seeing the object which is a Folder or a File object rather than just a Object.

  • Passing vector of object with multiple datatype

    Hi
    I want to pass vector of objects to stored procedure and I am facing some problem
    please suggest is it possible or I need to follow some other way.
    I have one class detail with two attributes i.e int ID and string course
    In main I have created 1000 objects of different ID and course and pushed back the objects to avector of detail and passed to a function my function is
    void bulkdatainsert(vector<detail>rec)
    stmt = conn->createStatement ("begin storeBulk(:1);end;");
         stmt->setMaxIterations(rec.size());
         stmt->setMaxParamSize(1,1024);
         setVector(stmt,1,rec,"course"); // The error coming here
    The error is due to the type rec .
    I want to know can we pass objects of multiple data to stored procedure through OCCI ?
    If not do we need to break every attribute and make vector of corresponding attributes and pass to stored procedure?
    please suggest me
    Thanks

    I think Custom objects are not supported directly.
    Following are the normal ones which you can use
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector< T > &vect,
    const string &schemaName,
    const string &typeName);
    Intended for use on platforms
    where partial ordering of function
    templates is not supported, such
    as Windows NT. Multibyte
    support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<T* > &vect,
    const string &schemaName,
    const string &typeName);
    Intended for use on platforms
    where partial ordering of function
    templates is supported. Multibyte
    support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<BDouble> &vect
    const string &sqltype);
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Bfile> &vect,
    const string &schemaName,
    const string &typeName);
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<BFloat> &vect
    const string &sqltype);
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Blob> &vect,
    const string &schemaName,
    const string &typeName);
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Blob> &vect,
    const UString &schemaName,
    const UString &typeName);
    Sets a const Blob vector; UTF16
    support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Clob> &vect,
    const string &schemaName,
    const string &typeName);
    Sets a const Clob vector;
    multibyte support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Clob> &vect,
    const UString &schemaName,
    const UString &typeName);
    Sets a const Clob vector; UTF16
    support.
    void setVector(
    Statement *stmt,
    unsigned int paramIndex,
    const vector<Date> &vect,
    const string &schemaName,
    const string &typeName);
    Sets a const Date vector;
    multibyte support.

  • BPEL Process with multiple file types using one FTP adapter is not working

    i created a bpel process which will fetch the files from remote location using FTP adapter.
    Now the process works for only one format or file type like *.xls.
    How can i use more than one file format in one FTP adapter.
    OR
    is there any other way to do it.
    file type assignation is 5th step in FTP adapter configuration.
    i have tried *.xls,*.csv and *.xls;*.csv and *.xls:*.csv by seperating with comman, colon, space... still not working.
    i read the documentation *.* will not work.. for one file format it's working fine.
    looking forward for reply as soon as possible.

    Are you positive that it is not working? I'm not sure how you can use one FTP adapter for multiple file types unless the underlying data is exactly the same format or you are processing it as opaque data. Sometimes when a FTP adapter chokes on a file with a bad structure it doesn't create a BPEL instance, it simply moves the bad file to a separate folder.
    So I assume you are using opaque as the data type instead of using an XSD element?
    That said, I don't think you can put two separate file types in the filter. Is it possible for you to do something like: CommonFileName*.* or do you have similar files with other extensions?
    I know the above probably isn't of much help, but I had so many problems with the FTP adapter and its lack of features that I am writing my own. Unfortunately that is a large undertaking and there isn't any good documentation of JCA resource adapter / BPEL PM integration.

  • View Object with User Defined Type input

    I am trying to use a View Object with a query that requires a user defined object as an input parameter.
    I have the query working with a PreparedStatement, but would like to use a View Object.
    When I use the PreparedStatement, I prepare the user defined type data like this:
    // get the data into an object array
    Object[] wSRecObjArr = wSRec.getObjectArray();
    // set up rec descriptor
    StructDescriptor WSRecDescriptor = StructDescriptor.createDescriptor("WS_REC",conn);
    // populate the record struct
    STRUCT wSRecStruct = new STRUCT(WSRecDescriptor,conn,wSRecObjArr);
    Then I can use this in the PreparedStatement like this:
    OraclePreparedStatement stat = null;
    ResultSet rs = null;
    stat = (OraclePreparedStatement)conn.prepareStatement("Select test_pkg.test_function(?) FROM DUAL");
    stat.setSTRUCT(1, wSRecStruct);
    rs = stat.executeQuery();
    I would like to do the same process with a View Object instead of the PreparedStatement.
    My question is "How do I create the input objects"?
    I obtain the View Object from the Application Module using findViewObject(). I don't actually have a connection object to pass into the StructDescriptor.createDescriptor method.
    I have tried just using Java Object Arrays (Object[]) to pass the data, but that gave an error:
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.
    Any help or pointers are greatly appreciated.
    Thank you.
    Edited by: 942120 on May 1, 2013 8:45 AM
    Edited by: 942120 on May 1, 2013 8:46 AM
    Edited by: 942120 on May 1, 2013 9:05 AM
    Edited by: 942120 on May 1, 2013 9:06 AM

    Custom domains are the way to go.
    When I try to pass custom domains that represent my user defined types - it works.
    However, one of the functions requires a table of a user defined type be passed in.
    I tried creating a domain of the table type. It forces me to add a field during creation (in JDEV), so I tried adding a field of type Array of Element of the domain representing the user defined type.
    I populate the table by setting the field I created, but the table is empty in PL/SQL (TEST_TAB.COUNT = 0).
    I also tried passing the oracle.jbo.domain.Array object, but that produced an error:
    java.sql.SQLException: ORA-06553: PLS-306: wrong number or types of arguments in call
    I also tried passing Object[], but that produced an error:
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation.
    How do I properly create, and pass an domain that represents a table of a user defined type?
    When I use a OraclePreparedStatement, I can pass a oracle.sql.ARRAY using stat.setARRAY.
    Thank you for the help you have provided, and any future advice.
    JDEV 10.1.2.3
    JDBC 10.2.0.5
    Edited by: 942120 on May 13, 2013 7:13 AM
    Edited by: 942120 on May 13, 2013 7:16 AM

  • Managed metadata columns in document information panel with multiple content types

    Hi everyone,
    The problem I have is that for custom content types not all managed metadata columns are displayed in Document Information Panel (DIP) for the document in the Office client application. 
    However, everything works fine with 1 specific content type. Even though the others using exactly the same site columns. The content types are deployed using visual studio to the content type hub, and after this the content types are correctly published to
    the site collections, there are no publish issues here. 
    When I create a document based on the second content type in the same library, all fields are showed in the document information panel, except the managed metadata columns.
    Detailed explanation:
    Library: procedures
    Content types:
    - simple procedure (with 4 managed metadata fields and some other text fields)
    - procedure with approval (with the same 4 managed metadata fields and some other text fields)
    Scenario 1: I add the 'simple procedure' content type to the procedures library as only content type. Everything works fine, and all fields show correctly in the document information panel in Word.
    Scenario 2: I add the 'procedure with approval' content type to the procedures library as only content type. Everything works fine, and all fields show correctly in the document information panel in Word.
    Scenario 3: I add the 'simple procedure' and 'procedure with approval' content types to the document library procedures (added simple procedure first). When I create a new document based on the 'simple procedure'
    content type, everything works fine and he shows all metadata fields. When I add a new document based on the 'procedure with approval' content type, the document information panel shows correctly, except all managed metadata fields. These are not visible at
    all. Though they worked perfectly in scenario 1 and 2.
    Is this a known issue or is there a workaround for this? 
    Thanks in advance! 
    Kind regards, Davy

    Yes!
    This problem is solved right now.
    My issue was that I'm using custom content types deployed by Visual Studio in the content type hub. To create a managed metadata site column in visual studio, you need to have first of all your managed metadata field, but also a hidden field accompagnied
    to make the actual mapping like the example below:
    <Field ID="{B654D984-187A-471B-8738-F08F3356CFDA}"
    Type="TaxonomyFieldType"
    DisplayName="Countries"
    ShowField="Term1033"
    EnforceUniqueValues="FALSE"
    Group="Demo"
    StaticName="Countries"
    Name="Countries">
    <Customization>
    <ArrayOfProperty>
    <Property>
    <Name>TextField</Name>;
    <Value xmlns:q6="http://www.w3.org/2001/XMLSchema" p4:type="q6:string" xmlns:p4="http://www.w3.org/2001/XMLSchema-instance">{67308AC2-9556-456B-BF9E-43E8F23EBEE6}</Value>
    </Property>
    </ArrayOfProperty>
    </Customization>
    </Field>
    <Field Type="Note"
    DisplayName="Countries_0"
    StaticName="CountriesTaxHTField0"
    Name="CountriesTaxHTField0"
    ID="{67308AC2-9556-456B-BF9E-43E8F23EBEE6}"
    ShowInViewForms="FALSE"
    Required="FALSE"
    Hidden="TRUE"
    CanToggleHidden="TRUE"
    Group="Demo"
    RowOrdinal="0"
    />
    </Elements>
    VERY important here is that when you create your content type using visual studio, you not only have to add the managed metadata site column in your xml (which let the content type work already perfectly) but also add the hidden field to your content type
    xml !! This way, SharePoint knows that when you have multiple content types with the same site columns in the same library, the second content type also need to get the hidden field from this site columns like in the example below!
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Parent ContentType: Document (0x0101) -->;
    <ContentType ID="0x010100571ebc0f478a49d5a775039347ee1535"
    Name="Document Location"
    Group="Demo"
    Description="A content type containing Managed Metadata Column."
    Inherits="TRUE"
    Version="0">
    <FieldRefs>
    <FieldRef ID="{B654D984-187A-471B-8738-F08F3356CFDA}" Name="Countries"/>
    <FieldRef ID="{67308AC2-9556-456B-BF9E-43E8F23EBEE6}" Name="CountriesTaxHTField0"/>
    <FieldRef ID="{f3b0adf9-c1a2-4b02-920d-943fba4b3611}" Name="TaxCatchAll"/>
    <FieldRef ID="{8f6b6dd8-9357-4019-8172-966fcd502ed2}" Name="TaxCatchAllLabel"/>
    </FieldRefs>
    </ContentType>
    </Elements>
    I'm very happy I found this solution, because in the whole project i'm implementing, this was used a lot!
    Special thanks to the blog of @cann0nf0dder (http://cann0nf0dder.wordpress.com/2013/04/01/creating-a-site-column-with-managed-metadata) which let me think about this! 
    This ticket is answered now! :-)
    Kind regards,
    Davy

  • How to create the query with multiple node types

    Hi,
    I am having an issue in creating a query to search multiple node types.
    The requirement is to query documents/pages of the type dam:Asset and cq:Page present under a path.
    I tried the following code snippet with no luck .
    path=/content
    1_type=cq:Page
    2_type=dam:Asset
    property=jcr:content/metadata/@cq:tags
    property.1_value=<tag Name>
    I was able to write a query with single type. However i could not find any documents/ materials with multipe types as shown above.
    Thanks in advance.
    Regards
    Sudhi

    I don't think multiple type is possible. Instead use super type like nt:base that will cover both page and asset.
    Yogesh
    www.wemblog.com

  • Conversion error with non-primitive types

    I'm wondering if anyone else is seeing this problem or has a potential solution.
    The problem, in a nutshell:
    I have beans that use non-primitive types (Float instead of float) in the getters and setters. However I keep getting conversion error problems. If I switch to primitive types, I don't get conversion errors. The built-in FloatConverter says (in the documentation at least) that it supports both primitives and boxed types. This was all working in EA4, though. I am discovering this problem as I migrate from EA4 to 1.0.
    The code is pretty straightforward:
    public class Bean implements Serializable {
    public float getProp() {...}
    public void setProp(float) {...}
    public Float getPropOld() {...}
    public void setPropOld(Float) {...}
    <!-- works -->
    <h:inputText id="floatinput" value="#{BeanInstance.prop}"/>
    <!-- doesn't work -->
    <h:inputText id="floatinputold" value="#{BeanInstance.propOld}"/>
    Any ideas? I have tried explicitly calling the FloatConverter but that gave the same problems.

    Okay, I figured out my problem.
    The JSF spec implies that f:convertNumber may be used inside an h:inputText tag. The early versions of Core JSF go further and show f:convertNumber being used inside an h:inputText tag in one of the examples. (Chapter 7, conversions).
    However, this has been the source of my problem. When using f:convertNumber, the converter would automatically determine the data type without regard to the data type in the backing bean. Hence, it would try to pass Longs or Doubles to the bean instead of Floats.
    I believe this may be an issue in the 1.0 FR release.

  • BC4J: problems creating view object with multiple entity objects

    Hi,
    I working with a view object which contains two entity objects with parent-child relationship like this:
    ViewObject - ParentEntityObject - PId
    PAttribute
    CId (FK)
    (- ParentChildAssociation)
    - ChildEntityObject - CId
    - CAttribute
    The 'Read Only' and 'References' options are checked for the association in the view object.
    I'm creating a new row using this view object. The parent object should be created new and the child object already exists in the database, so I'm setting only the attributes of the parent object (including foreign key).
    After creating the row I display it in a jbo:DataTable and only those attributes coming from the parent object are displayed. The attributes of the child object are not set. After a commit all attributes appear.
    The problem is, that I want to display the new row with all attributes to the users BEFORE they commit.
    I tried to set the child attributes, but they are read only by definition and even when I unchecked the 'Read Only' option and set the attributes to 'Always Updateable' in the view object it is giving me
    JBO-27008: Attribute set for CAttribute in view object ViewObject failed.
    Is there a way to make all attributes of the child object visible in the view object without committing changes?
    (JDev 9.0.2.822)
    Any help would be appreciated.
    Regards,
    Christian

    Once again the structure, sorry.
    ViewObject
    |-ParentEntityObject
    ..|-PId
    ..|-PAttribute
    ..|-CId (FK)
    |-ParentChildAssociation
    |-ChildEntityObject
    ..|-CId
    ..|-CAttribute
    Christian

Maybe you are looking for

  • Desktop.ini on desktop windows 7 after update to FF17.0

    2 updates (quicktime) FF popup for update to 17.0 After auto update to FF 17.00 icon desktop.ini appeared on desktop and cannot get rid. Have Norton Inet Sec 12 up to date. How to get rid would be nice Thank you

  • How do I export an album with all the identifying information?

    When I export photos, I only get the jpg file.  I want the ablum with names of all the people.  I have made the album to remember great grandparents, grandparents etc.  Without the names, the pictures will soon become worthless.

  • Need service process for offsite vendor repair of goods

    Hi, Our vendor repair process is as follows, and needs to be mapped to SRM. The vendor repair business process starts when an estimate for a repair is taken from the vendor for repair of a product . If the estimate is acceptable, a PO is created and

  • Oracle Equivalent of MySQL's TEXT type

    Does Oracle have an equivalent column type to MySQL's TEXT type? I tried "long" data type . In php , it shows the warning " illegal use of long " please help me to fix this problem.

  • Bought a SSD today for my MacPro 5,1, need a little .help

    Hi, Today I bought a 512GB Samsung SSD 850 PRO for my MacPro late 2012 (5,1). However it does not fit in the drive holder tray thing(s) for the 3.5 HDDs, so I put it where a second Optical Drive would go for the moment until I get my self one of thos