Resizing tables "dynamically".

Hello

I have a test taken that step of an array of containers.

Suppose I have an array passed to me as a sequence of local variable:

Locals.NumericalMappings

And let's say that I have create an empty array.

If I want to create a 1 d table tell the size of 3 elements

I came up with a way to do it in an expression:

Locals.NumericalMappings.GetPropertyObject("",0). Type.ArrayDimensions.SetBoundsByStrings("[0]","[2]")

Is there a more elegant way?

Maciej

I guess you wrote this form the top of your head, as the signature of the method, I found SetNumElements (digital, digital).

The actuall call is:

Locals.NumericalMappings.SetNumElements (3.1)

And me where I wanted thansks for poinitng me in the right direction!

See you soon,.

Mac

Tags: NI Software

Similar Questions

  • Rename the name of the table dynamically in a loop

    Hi all

    It might not be the best solution, but it is a starting point for me. I have tables: x1_old, x2_old... x1_new, x2_new...
    When I receive new tables, it's x 1, x 2... You need 3 things:
    1 x1_old, x2_old must be removed
    2 x1_new, x2_new must be renamed to x1_old, x2_old
    3 x 1, x 2 tables can be renamed to x1_new, x2_new.

    I hope this makes sense.

    I managed to drop the tables dynamically(step 1). But impossible to apply a similar approach to rename (step 2 and 3).

    Following the code gives an error: ORA-00900: invalid SQL statement

    DECLARE
    x NVARCHAR2 (50): = ";
    y NVARCHAR2 (50): = ";
    BEGIN

    -Rename tables ending in 'NEW' for 'OLD '.
    FOR x IN (SELECT table_name
    From all_tables
    Owner WHERE to = "OWNER_X."
    AND SUBSTR (table_name,-3) = 'NEW')
    LOOP
    y: = SUBSTR (x.table_name, 1, INSTR (x.table_name, 'NEW') - 1) | 'OLD ';
    EXECUTE IMMEDIATE 'Rename ' | x.table_name | « à » || y;
    END LOOP;
    END;
    /

    I read that I can't use DOF with Execute imeediate. No work around? Or different approach?

    Thank you

    I had where you went wrong.

    SQL> ed
    Wrote file afiedt.buf
    
      1  DECLARE
      2  x NVARCHAR2(50) := '';
      3  y NVARCHAR2(50) := '';
      4  BEGIN
      5  --Rename tables that end with 'NEW' to 'OLD'
      6  FOR x IN (SELECT table_name
      7  FROM all_tables
      8  WHERE owner = 'HR'
      9  AND SUBSTR(table_name, -3) = 'OLD')
     10  LOOP
     11  y := SUBSTR(x.table_name, 1, INSTR(x.table_name, 'OLD') - 1) || 'NEW';
     12  dbms_output.put_line('ALTER TABLE ' || x.table_name || ' rename to ' || y);
     13  EXECUTE IMMEDIATE 'ALTER TABLE ' || x.table_name || ' rename to ' || y;
     14  END LOOP;
     15* END;
    SQL> /
    ALTER TABLE X1_OLD rename to X1_NEW
    DECLARE
    *
    ERROR at line 1:
    ORA-00900: invalid SQL statement
    ORA-06512: at line 13
    

    Now updated the code

    SQL> ed
    Wrote file afiedt.buf
    
      1  DECLARE
      2  x VARCHAR2(50) := '';
      3  y VARCHAR2(50) := '';
      4  BEGIN
      5  --Rename tables that end with 'NEW' to 'OLD'
      6  FOR x IN (SELECT table_name
      7  FROM all_tables
      8  WHERE owner = 'HR'
      9  AND SUBSTR(table_name, -3) = 'OLD')
     10  LOOP
     11  y := SUBSTR(x.table_name, 1, INSTR(x.table_name, 'OLD') - 1) || 'NEW';
     12  dbms_output.put_line('ALTER TABLE ' || x.table_name || ' rename to ' || y);
     13  EXECUTE IMMEDIATE 'ALTER TABLE ' || x.table_name || ' rename to ' || y;
     14  END LOOP;
     15* END;
    SQL> /
    ALTER TABLE X1_OLD rename to X1_NEW
    ALTER TABLE B_OLD rename to B_NEW
    ALTER TABLE A_OLD rename to A_NEW
    
    PL/SQL procedure successfully completed.
    
  • Automatically resize Tables

    I'm tired of always having to resize my window to get tables to resize. A small example

    If I do a table 2 x 2, put a dozen back in a cell, the table expands to reflect this large cell is filled back. Now, if I select and remove all these returns, the table will remain large. To get it to resize, I can resize my window at the bottom right. Or, I can use the clear column height and width buttons to take the new kid.

    What I really want time real table resizes. I am certain that in earlier versions, there was a preference that says 'automatically resize tables. I can't find it. Y at - it a shortcut keyboard, or automatically to get there?

    I use DW 8 on a mac.

    brand

    > If I make a table 2 x 2, put a dozen back in a cell, the table expands
    > to
    > reflect this large cell is filled back. Now, if I select and delete all these
    > returns, the table will remain large. To get it to resize, I can resize my
    > window
    > bottom right. Or, I can use the height and width of clear column
    > keys in order to
    > Get it new.

    To update cell of table in Design view rendering, just click in one
    adjacent table cell or table, or another part of the page.

    Or press F5.

    > I really want time real table resizes. I am sure in past
    > versions,.
    > There was a preference that says 'automatically resize tables. I can't
    > find
    > this. Y at - it a shortcut keyboard, or automatically to get there?

    Used to be called faster preference editing Table (postponed the update)
    which you can untick to get an update in real time.

    They have now compromised by not offering is not an update in real time of the table cell
    (too memory intensive, as I understand it) that you are editing, but he is going to update
    Once you click anywhere on the page outside this (even just by clicking on a cell
    an adjacent cell) or manually refresh (F5).

    --
    Concerning

    John Waller

  • tables dynamic thread-safe

    Hi all

    trying to convert my application single-threaded for multithreading, that I met a new obstacle:

    I would like to have a global data structure. This structure must be dynamically allocated and reallocated as the number of threads (and thus the size of the structure) depends on the program execute / user.

    The main thread as long as secondary threads should be able to access this structure, so I need to use a variable in thread safe, somehow. All the samples I've traveled so far, either use a single variable using the DefineThreadSafeScalarVar macro, or an array of size fixed by using the DefineThreadSafeArrayVar macro.

    I haven't found an example of this type of a dynamic array, unfortunately... Some kind soul would be willing to teach me how to proceed?

    Thank you

    Wolfgang

    In your case, you must use a TSV scalar that contains the pointer is allocated/re-allocated. See the following example of a TSV that mimics a dynamic array of integers. In some cases, a better solution would be to have a TSV scalar that contains a list, say, box tools ListType.

    #include

    DefineThreadSafeVar (int *, DynMem);

    void main (void)
    {
    int * pDynMem, i.;
       
    Initialize the TSV
    InitializeDynMem();
       
    Define HSV 'table' to hold 10 integers
    SetDynMem (malloc (10 * sizeof (int)));
       
    Set and get the 'elements' of TSV
    pDynMem = GetPointerToDynMem();
    for (i = 0; i< 10;="">
    {
    (* pDynMem) [i] = i;
    printf ("DynMem [%d] = %d\n", (* pDynMem) [i], i);
    }
    ReleasePointerToDynMem();
       
    Resize the TSV "array".
    pDynMem = GetPointerToDynMem();
    * pDynMem = realloc (* pDynMem, 20 * sizeof;)
    for (i = 10; I)< 20;="">
    (* pDynMem) [i] = i;
    for (i = 0; i< 20;="">
    printf ("DynMem [%d] = %d\n", (* pDynMem) [i], i);
    ReleasePointerToDynMem();
       
    Free TSV "array".
    pDynMem = GetPointerToDynMem();
    Free(*pDynMem);
    ReleasePointerToDynMem();
       
    Cancel initialization of TSV
    UninitializeDynMem();
    }

  • Loss of data when resizing table 2D

    I data collection and insert in a table I did great I know will be used.  I then resize the table using SetArrayBounds, because I now know the number of iterations that have been executed.  I find myself with an array of correct size, but the data consist of the first line with only the first column is missing.  All other elements are 0 (matrix of numbers).  Any idea what's going on?

    I wanted to start with an empty array, resize to any line and the number of columns before you start the iterations, then add a line at the beginning of each iteration.  I was shot on this, but it seems that it works better.

    Kelly Bersch

    Hi Kelly,

    Could you show us the code you used to implement? Specifically, the resizing of the table? http://forums.NI.com/T5/NI-TestStand/what-is-the-syntax-for-SetArrayBounds-for-a-multi-dimensional/t... This thread shows the correct syntax for the command and its implementation.

    If I understand correctly that you slowly fill this table which has been initialized to 100 x 100. The first thing we should do is to initialize the array to 100xthe number of columns if at least we can stop worrying about the columns since you already know how many settings you are testing. Then at the end of the sequence, you can resize the lines using the above command.

  • Select items in a table dynamically

    Hello...

    I am writing a program where you can choose the elements of the array dynamically from the Panel when the VI is in run mode.

    So far, that ic_opendevice.VI gives me different video formats [it is a 1 d array], at the moment, I guess as the penultimate among this table as an example. But, I want to design the program so that the user can select any Format of video of the façade. How to achieve this?

    Block diagram:

    Front panel:

    Why you did not update in video format in the structure of the event?  You can use the 'video 2' Format: value change event.  Then, everything is in a single loop.

    And you don't need to wait in your upper loop because the event structure will take care of your timing.

  • table dynamic allocation labwindows CVI

    LabWindows CVI there a way to create a dynamic table? A table that contains a variable amount of memory.

    calloc () can be used in CVI to dynamically create a table of desired size, or a standard data type (int, double...) or a data type custom as a struct.

    Dynamically allocated memory must be released with free () when it is no longer used.

    Double * array = NULL;    Set the table pointer

    Array = calloc (numElements, sizeof (double));    Allocate memory and elements of al inizialize 0

    ... to use the elements in the array

    free (matrix);     Allocated dynamically free memory

  • Resizing tables

    Hello!

    Im working in a sensitive site for a conference and Im having problem of resizing a table inside one of my html pages. I'm not an expert in DW or web development but Im a little more each day, I tried to solve the problem but I didn't how = (...

    Is the Web site: http://www.plea2016.org and the html page is named tournee.html (depending on the option of meeting place). I hope someone can give some tips.

    Thank you very much

    Maria

    Add a selector for the images you want to target as in

    class = "reactive" src = "images/Mayne1.jpg" alt ="Caltrans District 7" > ""

    and to add a rule

    IMG.responsive {}

    Width: 100%;

    }

  • Resizing table lift error


    Dear all,

    We use jdeveloper 11.1.1.4.0 and have a behavior strange table recognized in our application. Not on all pages, but on some, we have the following scenario:

    -adf table with toolbar + the edit button

    -selection of a line and pressing the edit button-> works very well

    -RESIZE a column and pressing the button edit-> exception.

    does anyone have a tip?

    < 4 March 2014 13:46:54 THIS > < opinion > < Stdout > < BEA-000000 > < < 4 March 2014 13:46:54 THIS > < error > < oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator > < BEA-000000 > < ADF_FACES - 60096:Server Exception during the PPR, #59

    java.lang.IllegalArgumentException: t1

    at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:615)

    at org.apache.myfaces.trinidad.change.SessionChangeManager._applyComponentChanges(SessionChangeManager.java:386)

    at org.apache.myfaces.trinidad.change.SessionChangeManager.applyComponentChangesForCurrentView(SessionChangeManager.java:73)

    to org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ ChangeApplyingVDLWrapper.buildView (ViewDeclarationLanguageFactoryImpl.java:343)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:990)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:342)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:236)

    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:509)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)

    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)

    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)

    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:468)

    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:468)

    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)

    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)

    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

    at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:65)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:119)

    at java.security.AccessController.doPrivileged (Native Method)

    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)

    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)

    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)

    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)

    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3730)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3696)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)

    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)

    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

    and

    < 4 March 2014 13:49:34 THIS > < opinion > < Stdout > < BEA-000000 > < < 4 March 2014 13:49:34 THIS > < WARNING > < oracle.adf.view.rich.component.fragment.UIXRegion > < ADF_FACES-00009 > < error treatment viewId: / manage URI: /TaskFlows/manage/edit.jsff real-URI: TaskFlows/manage/overview.jsff.

    javax.el.PropertyNotFoundException: inaccessible target identifier 'vs' resolved to null

    at com.sun.el.parser.AstValue.getTarget(AstValue.java:84)

    at com.sun.el.parser.AstValue.isReadOnly(AstValue.java:149)

    at com.sun.el.ValueExpressionImpl.isReadOnly(ValueExpressionImpl.java:248)

    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer._getUncachedReadOnly(EditableValueRenderer.java:476)

    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:390)

    at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputDateRenderer._hasPopupChooser(SimpleInputDateRenderer.java:862)

    at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputDateRenderer._setupPopupChooser(SimpleInputDateRenderer.java:1394)

    at oracle.adfinternal.view.faces.renderkit.rich.SimpleInputDateRenderer.decodeInternal(SimpleInputDateRenderer.java:75)

    at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.decodeInternal(LabeledInputRenderer.java:56)

    at oracle.adf.view.rich.render.RichRenderer.decode(RichRenderer.java:342)

    at org.apache.myfaces.trinidad.render.CoreRenderer.decode(CoreRenderer.java:292)

    at org.apache.myfaces.trinidad.component.UIXComponentBase.__rendererDecode(UIXComponentBase.java:1334)

    at org.apache.myfaces.trinidad.component.UIXComponentBase.decode(UIXComponentBase.java:865)

    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:965)

    at org.apache.myfaces.trinidad.component.UIXEditableValue.processDecodes(UIXEditableValue.java:287)

    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:1204)

    at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:1190)

    at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:962)

    to oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer$ UIXColumnFilterWrapper.processDecodes (BaseColumnRenderer.java:2162)

    at org.apache.myfaces.trinidad.component.UIXCollection.processComponent(UIXCollection.java:1087)

    to org.apache.myfaces.trinidad.component.TableUtils$ 1.process(TableUtils.java:238)

    at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:55)

    at org.apache.myfaces.trinidad.component.TableUtils.processFacets(TableUtils.java:232)

    to org.apache.myfaces.trinidad.component.TableUtils$ 2.process(TableUtils.java:261)

    at org.apache.myfaces.trinidad.component.ChildLoop.runAlways(ChildLoop.java:55)

    After some research deep I found the error, the following edit.jsff contains a component named as t1 but wasn't an array element. I changed the ID of the element to something else and the error has been corrected. Seems to be a bug of the ADF (or at least some sort of bug that has appeared since our last migration)

  • How to resize a dynamic image to fit rectangle

    Hi - I have a series of small rectangles that I create dynamically using this:

    var s = sym.createChildSymbol ("example", "Stage");

    s.$("smallpic"). CSS({"background-image":"URL('"+example+"')"});)

    works well - but how do I automatically resize the background picture to the size of my rectangle (this example is 'smallpic')

    Thank you!

    Hi, skotch99-

    Try to use the CSS background-size property.  There are many options to size your image to fit your container.

    Thank you

    -Elaine

  • [JS IDCS5] Proportionally resize Tables

    Hey,.

    When I use:

    myTable.width = "200mm"; 

    table sizes to 200mm wide, but resets all the column for the same widths including widths.

    How to resize a table so keep the proportional width columns hers?

    Best regards, Sjoerd

    Strange, somehow it happened to me that this could 've/should 've/would have worked! I'm even sure that I used, in the past. But I can't make it work on my CS4 is!

    You will have to use this workaround:

    myTable = app.selection[0].parent;
    factor = 115/myTable.width;
    for (col=0; col
    

    (Edit: you need to replace the "115" in ln 2 the width of your own objective, of course)

  • Problem with resizing table InDesign CS5

    I have problems with resizing of tables in InDesign CS5.

    The width can be entered and a decrease, but the right height do move up nor down when you pull in the lower right corner or anywhere else on the base of the columns.

    Does anyone else have this problem?

    Is it a bug or maybe just me not understanding things correctly in the help...?

    Any contribution is appreciated if you knock out. :-)

    Document corruption is sometimes disabled by exporting for Exchange. See remove minor corruption by exporting

  • Table dynamic line breaks only on the first page (not on the second)

    Hello

    I have to biuld a dynamic array with Livecycle.

    If the text in the last field is long, the table expands automatically.

    If the end of the first page is reached, the line breaks above the first page to the second (= 1st break)

    This method works correctly.

    But if the text is longer, and the field at the break of the second to the third page, the field does not break!

    Please see the attachment.

    The settings should be correct, because the break (from the 1st to the 2nd page) works.

    But why, it's 'dynamic behavior' limited to a SINGLE page?

    Can you help me please?

    Thank you...

    DAS Problem kommt von der vektorielle Textausrichtung, die bei be Formularfeldern immer mittig ist.

    Of the deine Textfelder "oben ausrichten" musst, damit der text auch nach unten so sauber.

  • We can change the advance in the region of the table dynamically properties

    Hello

    I'm changing region of type advance table properties dynamically. I need to change the name of VO dynamically and execute the vo.executequery. Is this possible?


    Thank you

    Re: Instance of the View object

    Thank you
    -Anil

  • Pivot table dynamic table - chart axis of the show as "percent".

    Hi all

    I have a pivot table is generated, with the lines as year/month and columns like web browser. However I only watch 5 albums used, browsers so that used columns are dynamic.

    I would like to show the graph as a 'percentage of line. I know that I can turn this on the data in the table, but it does not filter although in the graph. Does anyone know how to get there? Can you add the total of a line and use it in a formula?

    Thanks in advance

    Hello
    Not sure how the PivotTable, however we have may be able to pull this back as a separate column in the criteria tab which you can then use.
    What is your metric name?

    Lets say you have Time.YearMonth, browser, count

    Add another column, change the fx for this column and use sum (time.yearmonth County) - this will give you the total amount for the year regardless of browser.
    Add another column and simply count / sum (time.yearmonth County) * 100 to get the percentage of the total for the year - plays about with using them in the pivot or you might get away with a straight table view?

    Hope this helps, another solution would be to implement a shaved basic measure to the RPD.

    Published by: Alastair_PeakIndicators on March 31, 2010 08:26

Maybe you are looking for