Dynamic size

hello here is my code ...
db[] dbapp = new db[];
compile:
[javac] Compiling 12 source files to D:\PADMA\work\APPLIC~1\PRINTING\SOURCE~
1\build
[javac] D:\PADMA\work\APPLIC~1\PRINTING\SOURCE~1\Source\DbController.java:15
6: array dimension missing
[javac] DbApplication[] dbapp = new DbApplication[];
here my db array may be dynamically changes.... so how would declare the array
plz help me asap

but plz write a code for that.... here i am unable to initialise the array
DbApplication[] dbapp = new DbApplication[];
here compiler is asking for dimension.... but i do not want to provide the dimension since it will change dynamically....
plz asap

Similar Messages

  • How to crate a dynamic size array, collection

    Hi,
    Can someone point me to some tutorial on how to create a dynamic size array. Actually I have multiple cursors and on different tables and want to loop through each cursor and get some values from each cursor and put it in an array. But don't know how to create or initialize an array as I don't know the size. Is there any other way.
    Here is what I am doing I have 6 cursors on different tables, I loop through each cursor and get some specific data that I need to place at one place after looping through all the cursors which then finally needs to be inserted in one table. But before the insert I need to validate each data so want to have all the data in some array or some other place for temporary storage from it's easier to do the validate and insert rather than while looping through the cursors as there may be duplicates which I am trying to remove.
    As this procedure will be called multiple times so wanted to save the cursor data in temporary array before inserting in the final table. Looking for some faster and efficient way.
    Any help is appreciated.
    Thanks

    guest0012 wrote:
    All the 6 cursors are independent and no relation i.e. can have a join and have one sql as no relationship in tables.If there is no relation, then what are your code doing combining unrelated rows into the same GTT/array?
    Now using GTT when I do an insert how do I make sure the same data doesnot already exists. i.e. GTT will only have one column. Then create a unique index or primary key for the GTT and use that to enforce uniqueness.
    So everytime I iterate over a cursor I have to insert into GTT and then finally again have to iterate over GTT and then do an insert in the final table which maybe a performance issue Which is why using SQL will be faster and more scalable - and if PL/SQL code/logic can be used to glue these "no relationship" tables together, why can't that not be done in SQL?
    that's why i was wondering if can use any kind of array or collection as it will be a collection of numbersAnd that will reside in expensive PGA memory. Which means a limit on the size of the collection/array you can safely create without impacting server performance, or even cause a server crash by exhausting all virtual memory and causing swap space to trash.
    and finally will just iterate ovr array and use FOR ALL for insert but don't know what will be the size of the array as I only know after looping the cursors the total number of records to be stored. So wondering if how to do it through collection/array is there a way to intialize the array and keep populating it with the data with defining the size before hand.You cannot append the bulk collect of one cursor into the collection used for bulk collecting another cursor.
    Collections are automatically sized to the number of rows fetched. If you want to manually size collection, the Extend() method needs to be used, where the method's argument specifies the number of cells/locations to add to the collection.
    From what you describe about the issue you have - collections are not the correct choice. If you are going to put the different tables's data into the same collection, then you can also combine those tables's data using a single SQL projection (via a UNION for example).
    And doing the data crunching side in SQL is always superior in scalability and performance, than doing it in PL/SQL.

  • Dynamically size movieclip to fit text's string height and width

    Hello,
    I am trying to dynamically size a movieclip to fit the size of a text's string height and width (This text is inside the movieclip)
    here is my code so far..
    var Font1_ = new Font1();
    var Format2:TextFormat = new TextFormat();
    Format2.size = 36;
    Format2.align = TextFormatAlign.CENTER;
    Format2.font = Font1_.fontName;
    var MessageBox:MovieClip = new MessageBoxMC();
    MessageBox.Text1.defaultTextFormat = Format2;
    MessageBox.Text1.embedFonts = true;
    MessageBox.Text1.antiAliasType = AntiAliasType.ADVANCED;
    MessageBox.Text1.wordWrap = true;
    MessageBox.Text1.width = 800;
    MessageBox.Text1.height = 400;
    MessageBox.Text1.textColor = 0xFFFFFF;
    MessageBox.Text1.cacheAsBitmap = true;
    MessageBox.Text1.mouseEnabled = false;
    MessageBox.Text1.text = String("Use the Arrow Buttons to move");
    MessageBox.width = MessageBox.Text1.width;
    MessageBox.height = MessageBox.Text1.height;
      MessageBox.x = 400;
      MessageBox.y = 200;
      addChild(MessageBox);
    this isn't working for me.. anyone know the best way to do this?
    I also want the text to be centered in the movieclip, with a border of around 2-4 pixels
    I am also not sure if i should be using text.length? any advice and input is greatly welcomed.
    thanks in advance!

    Essentially, you need to check for a change in .textWidth or .textHeight, which are different from .width and .height.
    This code works for me (assumes a background box called bg and a foreground text instance fg inside a moveclip and an X and Y bounds offset variable to say how far away you want the box from the text and a textFrameNudge to provide a tweak value).
         // Resize background box
         thisBox.bg.x = thisBox.fg.x - boundsOffsetX + textFrameNudge; // I'm using .4 as the tweak value for textFrameNudge
         thisBox.bg.y = thisBox.fg.y - boundsOffsetY;
         thisBox.bg.width = thisBox.fg.textWidth + boundsOffsetX*2 +textFrameNudge*thisBox.fg.getTextFormat().size;
         thisBox.bg.height = thisBox.fg.textHeight + boundsOffsetY*2;

  • Dynamic size of column header

    How do I make the header row of a column in a Jtable to dynamically adjust it's size to it's contents??
    Need this
    |HEADER COL1||HEADER COL2.....|H C3|
    Have this
    |HEADER C||HEADER C|H C3|
    Thanks!

    You need to get the column model and each column in turn and then set the width there.

  • Dynamic size box in Java 3D

    Hi,
    I have two problems regarding the dynamic box in java 3D:
    1. how can I change size of the box during runtime? I want to draw a 3D bar chart like using box.
    2. what is "Exception in thread "AWT-EventQueue-0" javax.media.j3d.BadTransformException: TransformGroup: non-affine transform"? I encountered this when using a percentage (a value / max value) to create a box.
    below is my portion of code:
    I have methods to set the propValue, maxValue, sideX and sideZ. I update these values using setter to change the Box, but I think I need to have one more method to update the box (calling createSceneGraph() ).
    protected Group createSceneGraph()
    visualRep = new BranchGroup();
    float scaleFact = 1.0f; // scaleFact is used only for debugging purpose
    float percentage = propValue / maxValue;
    // I want to move the height to half of its height, they are different for each
    // module since the height is affected by the percentage. But, every time I add
    // percentage to the "itsHeight", it gives me error : Exception in thread
    // "AWT-EventQueue-0" javax.media.j3d.BadTransformException:
    // TransformGroup: non-affine transform
    //float itsHeight = ( HEIGHT * percentage );
    float itsHeight = ( HEIGHT );
    // 1. Create the box
    Box vis = new Box(
    sideX * percentage * scaleFact,
    itsHeight * scaleFact,
    sideZ * percentage * scaleFact,
    Box.GENERATE_NORMALS,
    LCMPlanning.getInstance().getAppearance( this.getModule(),
    LCMPhysical.DEFAULT_WALL ) );
    vis.setCapability( Box.ENABLE_APPEARANCE_MODIFY );
    // 2. Move the first box to the top of the ground level
    Transform3D t3d = new Transform3D();
    t3d.setTranslation( new Vector3f( 0.0f, itsHeight, 0.0f ) );
    TransformGroup tg = new TransformGroup( t3d );
    tg.addChild( vis );
    tg.setCapability( TransformGroup.ALLOW_TRANSFORM_WRITE );
    visualRep.addChild( tg );
    return visualRep;
    thanks a lot.
    Daniel

    Hi,
    Nobody answered your questions so far? Here's my take.
    Changing the size of the box at runtime:
    The easiest way to do that is to scale the transform using transformName.set(double scale) or transformName.setScale(double scale).
    Non-affine transform error:
    I get this error every once in a while. With me it happens when I try to assign a value of infinity or a NaN (not a number) to one of the params in the transform. I suggest printing the params you are using to create the box.
    sideX * percentage * scaleFact,
    itsHeight * scaleFact,
    sideZ * percentage * scaleFact,
    You may not be specifying what you think you are specifying.
    Hope that helps.

  • Adding dynamic size table to Interactive Form

    Hello everyone,
    I have a node with multiple elements that i would like to show in an interactive pdf form.
    I'm using the Adobe LiveCycle Designer to do it, but i'm only managing to bind "solo" variables, not tables.
    How can i associate dynamically a table with several lines to a pdf interactive form ? I tried a list box but i still only get the first element shown in the box. Am i doing anything wrong ?
                 Thank you in advance.
                           Nuno Santos

    Hi,
    Basically the general way to add a table to INteractive form is by adding a subform elemet to a subform element and(i mean subform in a subform), now map the fields u want to be displayed as a table.
    For the fisrt subform set the LayoutType-Flow Content,Flow DirectionTable.
    Then select the allow page breaks within the content option.
    And the binding should be Normal.
    for the second subform:
    LayoutType-Flow Content,Flow DirectionTable row.
    Now also select the option allow page breaks.
    Then for Binding tab: select the Repeat Subform for each data Item, then min count=1.
    And now if ur table columns contain names like abc, def and xyz.
    Then in the script editor code something like this
    abc[*]; under show: initilaze, language: Formcalc and Run at: client
    Hope this should work out for you.
    let me know if u have any more queries.
    Thanks,
    Lohi

  • Multi-dimensional array with dynamic size - how to?

    Hi
    I have a CONSTANT number of buckets. Each of them has to take a VARIOUS number of data series. The data series have one VARIOUS length per bucket. I'd like to index the buckets like an array to loop over them.
    So basically I need something like a multidimensional array with constant first dimension (bucket index), but dynamic second (data series index within bucket) and third (data point index within data series) dimension. What's the best way to do so?
    I should also remark that data series can get really big.
    Thanks in advance and best regards,
    Michael

    Hi Michael,
    the usual way is to use an array of cluster.
    Put your "2nd" and "3rd" data into a cluster and then make an 1D array of that cluster...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Dynamically Size a div ?

    Hello~
    I have a CSS-based navigation bar that is populated from a database. Right now, I am hard-coding the width of each button (using a 1-image as a repeating background) in the CSS file, but I was wondering if anyone had an idea of how to set that div width for each button based on how many links are found in the database? FOr example, the containing div is 710 pixels wide, and right now I have 6 divs that contain a nav button and link, but they are each hard-coded to be 116 pixels wide. If I change the number of links in the database, I will have to change the CSS code as well. I would love to find a way around this! Thanks for any suggestions!
    KC

    Ummm...  Use a CFML variable to define the desired width of the div.  Use whatever logic you want to calculate the value of that variable?
    This is no different then dynamically generating any other content to send to a client browser.
    The only gotcha there maybe here is if you have all your CSS seperated into a css file.  This is, of course, because a CSS file is not normally passed to ColdFusion by a web browser for processing of dynamic content.
    You have several choices on how to handle this.
    1) Include a small portion of the CSS in the regular CFM file.  You do not need to include all your css, just the part you want to make dynamic.
    2) Make your CSS file a CFM file.  There is nothing illeagal about naming your css file something like 'myCSS.cfm'.  And then linking to that in your HTML content.  This file will then be process by ColdFusion.  This can cause issues where a browser may or may not cache a dynamic cfm file the same as it would a static css file loosing some of the benifit of seperating the style content.  This can be mitigated by providing the proper headers to the css content with <cfheader...> tags so that the browser will cache the content as desired.
    3) Configure your system to pass css files to ColdFusion for processing.  This has the same caching issues with nameing your file with a cfm extension with the same solution.  It also has the added benifit that your files will have a normal css extension so that many editors will knwo how to propelry highlight and code hint the file that often does not work correctly with files ending in cfm.  But it can lead to uncessary server load if little of the CSS is dynamic as well as will not be allowed with most shared hosting providers.

  • Picture with dynamic size?

    Hello,
    I post a Picture (OLE) on an CR Page. Depending on the parameters in the report, differnt pictures with different Sizes are selected. Now I want to fix the maximal hight and width of the space I reserve for the picture but keep the ratio between hight and width of the original. How can i do this?

    To achieve
    "Depending on the parameters in the report, differnt pictures with different Sizes are selected."
    Use conditional hiding in sections or in object hiding. Formula you can write.
    Right click any object  and select 'size and position'. There also you can write formula .
    or
    format the object you can find hieght widht write formula to meet the requirement.
    Regards
    Usma

  • How to have dynamic size of the content area

    Hello everyone
    I am trying to create a printable adobe form using Adobe LiveCycleDesiner 8.
    Here is my problem.
    The PageMaster is containing the company Logo, Address and the ship to address.
    The ship to address can be composed by up to 11 lines. Those lines are not always used. Some addresses have only 5 lines.
    If I am reserving those 11 lines before the content area, we are loosing alot of space that can be used for the body page.
    So the question is:
    Is it possible to have a flowed content area? Where the size of the content area would be driven by the available space of the PageMaster?
    Regards
    stjacqd

    Hello Carsten
    The subform has no impact to the content area size.
    The subform has an impact only inside the content area or inside another  form.
    My point is:
    PageMaster
    |  Logo                                          |
    | Address1                   Address      |
    | Address2                   Address      |
    | Address3                   Address      |
    | Address4                   Address      |
    | Address5                   Address      |
    | Address6                   Address      |
    | Address7                   Address      |
    | Address8                   Address      |
    | Address9                   Address      |
    | Address10                 Address      |
    | Address11                 Address      |
    |---------------------------------------------------|
    | Content area                               |
    |                                                   |
    So, inside the Page Master there is 11 lines reserved for the addresses,
    But at the printout, if there are only 3 lines used for the address, I would like to reassign the space used by the address4 through adderss11 to the content area.
    So the result at printout will look like:
    |  Logo                                          |
    | Address1                   Address      |
    | Address2                   Address      |
    | Address3                   Address      |
    |---------------------------------------------------|
    | Content area                               |
    |                                                   |
    Instead of:
    |  Logo                                          |
    | Address1                   Address     |
    | Address2                   Address     |
    | Address3                   Address     |
    |                                                   |
    |                                                   |
    |                                                   |
    |                                                   |
    |                                                   |
    |                                                   |
    |                                                   |
    |                                                   |
    |---------------------------------------------------|
    | Content area                               |
    |                                                   |
    Regards

  • JScrollPane dynamic size

    I have JscrollPane on that I am placing some JGraph symbols.When I drag that symbol towards right and down side of scrollpane,horizontal or/and vertical scroll bar appears.But when I drag symbol towards left and up side of scrollpane,scrollbar doesn't appear and that symbol hides.Symbol is present on the screen but I am not able to see it because scrollbar doesn't appear.
    Anybody have solution for this?Or Is that bug in JScrollPane?
    Thanks.

    Reposted verbatim from
    [http://forums.sun.com/thread.jspa?threadID=5364807]
    completely ignoring Maxideon's response on that thread.
    db

  • Dynamic Size of Class

    Hi again. I really don't know why this happens and i need your help here. I have this class:
    static public class Data{
            static String subfolder = "";
            static String[] citation = new String[2000];
            static String[] reference = new String[2000];
        }And i create a new variable for this class like this:
    Data[] SubFolder = new Data[2000]; Because i need to have, the class organized like this:
    SubFolder[0].subfolder = Year0;
    SubFolder[0].citation[0] = CITATION1;
    SubFolder[0].reference[0] = REFERENCE1;
    SubFolder[0].citation[1] = CITATION2;
    SubFolder[0].reference[1] = REFERENCE2;
    SubFolder[0].citation[2] = CITATION3;
    SubFolder[0].reference[2] = REFERENCE3;
    SubFolder[1].subfolder = Year1;
    SubFolder[1].citation[0] = CITATION1;
    SubFolder[1].reference[0] = REFERENCE1;
    SubFolder[1].citation[1] = CITATION2;
    SubFolder[1].reference[1] = REFERENCE2;
    ....now, the strange is, when i test the following code:
    SubFolder[0].subfolder = "test";
    SubFolder[1].subfolder = "test1";
    System.out.println(" Position 0 = " + SubFolder[0].subfolder);
    System.out.println(" Position 1 = " + SubFolder[1].subfolder);and i print out to console the result is the same! The result is:
    Position 0 = test1
    Position 1 = test1what i'm doing wrong?? Thanks for your help!

    static String subfolder = "";
    static in this context means there is only one subfolder value, no matter how many Data objects you create. It belongs to the Data class, not to each instance.
    SubFolder[0].subfolder = "test";
    SubFolder[1].subfolder = "test1";So the above lines are actually equivalent to:
    Data.subfolder = "test";
    Data.subfolder = "test1";

  • Dynamically controling the size (in pixels) of array elements?

    Hey Everyone,
    I am writing a large vi where front panel space is becoming a limitation.   One of the elements that I want to display is a 2-D array of boolean indicators (rectangular LEDs).  Is there any way to dynamically resize the elements in the array so that regardless of the number of elements, the entire array is always visible and has a constant footprint.  For example, say the array is 8 x 8 elements, and takes up 160x160 pixels on the front panel so each element is roughly 20x20 pixels.  Then the number of elements shifts to 4x4.  I want the display to stay 160x160 pixels, but the size of each element to double to 40x40 pixels.  Is this possible?
    Thanks all,
    Matt
    Solved!
    Go to Solution.

    So thank you for two great ideas/examples.  Definitely think I have a couple of very workable approaches.  I have a follow on question about using the intensity graph approach.
    First some background.  This indicator is going to show the progress of a sorting operation, 1-4 copies of 1-8 unique items are being sorted into 1-32 containers.  The items arrive at the sorter in random order, are identified, and then placed into the container where they are still needed.  The point of this indicator is to show the user, at a glance, how full each container is andwhich componenets are missing.  I want the elements (columns) to appear different for the unique items, which I know you can't do in an array of booleans.  So I had already dumped the boolean approach for an array of colorboxes, and it was the color boxes that I was trying to dynamically size. There is still a boolean array to keep track of if an item has arrived, but that array drives the array of colorboxes where each type of item is color coded by assigning a gray value to colorbox for false, and a particular color if true.  See attached, which works pretty well (detailed adjusts will make it just right).
    I think the intensity graph will look much nicer though, so here is the question:
    How do I map the different colors onto the intensity graph so it looks like the colorbox array without the lines?  The attached get vi puts out a different value for each yes/no, which is to say I already know how to take the boolean and convert the 1 state to a unique number, what I don't know how to do is map that number into a particular color on the intensity graph.
    Thanks guys.
    Super helpful as always!
    Matt
    Attachments:
    Puzzle_MM.vi ‏42 KB

  • Photo Gallery w/ Images adjusting size based on Browser size.

    I'm new to web design but I'm trying to create a photo gallery with images that dynamically size based on the size of the browser window. Similar to this http://pageduke.com/#/Residential/Colonial%20Revival-Nashville1/1. I know th is a flsh site, but is there a way yo do it in HTML in Dreamweaver, maybe using Spry. I don't know Jquery, but is it possible that way.
    Thanks

    Nancy,
    Woo is not a gallery. It's just a slider - a panel widget, which should
    be adaptive/responsive by default. The problem is that for years, the
    typical jQuery plugin writer simply copies stuff done by others so
    someone finally realized you don't have to fix a width and a height if
    you know how to write a stub script
    Galleries are totally different. To do a responsive gallery is not so
    easy and the only ones that come remotely close - using open source
    scripts - do require an initial width. They will not scale both up and down.
    I gusess it depends on what the original poster wants and/or cares about
    in terms of efficiencies and functionality.
    [External commercial link removed]
    Message was edited by: Sudarshan Thiagarajan. Please refrain from posting external links advertising/ promoting products & services.

  • Dynamic sizing of RAW datatype

    Hi All,
    I want to read BLOBs out of a table using the DBMS_LOB package
    I would like to do something like...
    my_blob_length := DBMS_LOB.GETLENGTH(my_blob);
    DECLARE
    my_buffer RAW(my_blob_length); -- this is the bit I'm stuck with ;-)
    DBMS_LOB.READ(my_blob, my_blob_length, 0, my_buffer);
    But I don't know how to dynamically size the RAW buffer. Any advice gratefully received.
    Cheers,
    Ewan

    But I don't know how to dynamically size the RAW buffer. Any advice gratefully received.The only way (I can think of) that you can dynamically declare length, precision, or scale for a PL/SQL variable is to do within an anonymous PL/SQL block of Native Dynamic SQL.
    Doing this is probably more of a headache than it is worth - very impractical to code/debug/maintain/scale.
    Michael

Maybe you are looking for

  • I want this on Scott McNealy's desk by tomorrow

    The java technology has evolved nicely over the years. It is doing very well on the server side; on the mobile side all the major players are announcing java enabled devices. But on the side where you expect people to really get acquainted with the j

  • RAID 0 Roaming Disk Problem -  Way To Recover?

    I have the problem generally described in this archieved thread [RAID 0|discussions.apple.com/thread.jspa?threadID=2041271&tstart=-3] and will describe it below, the thread is more for point of reference. A few days ago the RAID went down (RAID 0)alo

  • I recently moved from one country to another

    I bought my iPod in Germany and was using iTunes there until recently when I moved to London. iTunes will let me change the billing address but NOT the country. This is utterly infuriating. I am also about to move to Melbourne Australia. Is there any

  • Nokia 101 music player play only first 20 songs

    hi friends ... i have a problem...whenever i download songs in my memory card,my music player play only first 20 songs,and other songs show me format error.... please help me what can i do with this ???? Moderator's notes: Moved into it's own thread

  • Additional Ways to Load Balance????

    We are currently using the following configuration for a number of situations on our 11501 (No SSL module). content webapps443 protocol tcp port 443 balance leastconn vip address 192.168.2.106 add service webapps1 add service webapps2 add service web