sorting table, how to get the new index of the last value?

Hi all!

I use a Subvi, which adds a cluter of the parameters to an array and then sort this table by one of the parameters in clusters.

It works very well, with examples, that I found in this forum

but now, I would like to know if it is possible to obtain at the end of the new cluster index first added.

See attached VI

Thank you

You take the size of the table and insert the new element to this level is anything other than the table of construction and a simple construction would do that.

In your question, I assume you're asking on the index of the item that you inserted after the sorting of the table, right? In this case, you can compare the cluster element that you introduce to the initial with the cluster table you get after a sorting of the table. This will give you the index of the item that you insert at the start.

Tags: NI Software

Similar Questions

  • How to get the last value

    Hi I have a senerion in which I want to get the last value: -.
    CREATE TABLE T1
    (NAME VARCHAR2(10), NO NUMBER, NO2 NUMBER);
    
    INSERT INTO T1 VALUES('A',10,20);
    INSERT INTO T1 VALUES('C',100,2);
    INSERT INTO T1 VALUES('B,124,5);
    INSERT INTO T1 VALUES('A',1,400);
    INSERT INTO T1 VALUES('B,2,234);
    INSERT INTO T1 VALUES('B',2,7);
    INSERT INTO T1 VALUES('C',21,12);
    INSERT INTO T1 VALUES('A',3,300);
    INSERT INTO T1 VALUES('B,55,1);
    INSERT INTO T1 VALUES('C',234,1);
    INSERT INTO T1 VALUES('B',20,72);
    INSERT INTO T1 VALUES('A',200,0);
    INSERT INTO T1 VALUES('B',546,32);
    INSERT INTO T1 VALUES('C',89,888);
    
    INSERT INTO T1 VALUES('B',485,12);
    INSERT INTO T1 VALUES('C',1,77);
    INSERT INTO T1 VALUES('B',339,12);
    INSERT INTO T1 VALUES('A',0,300);
    {\code}
    
    Now for all  A i want the value (order by name,no,no2) i.e value of no2 0
    for all b i want 32
    and for all c i want 1
    
    i.e last value in order by clause.
    
    i tried this 
    
     select name,no,no2,last_value(no2)
     over(PARTITION BY  name order by no,no2) nm
     from t1
    
    can anyone please help me?
    
    Thanks
    
    Edited by: vinod on Jan 6, 2012 8:58 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

  • DVT:pivotFilterBar - how to get the selected values of the filter

    Hi all

    I have a question: how to get the selected values from the pivot table filter bar programmatically?

    I tried to use
    pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);
    but to the edge of the side DATA INCORRECTESdeclarations page, it seems that it will return the cached values.

    Environment: JDev 11.1.1.3.0 without tasks.

    Thank you
    Miroslaw

    Hello

    You can retrieve the value selected in the PivotFilterBar through the PivotFilterBar model, instead of dataaccess:

    Download the template of the bar pivot filter instance
    QueryDescriptior queryDescriptor = (QueryDescriptor) pivotFilterBar.getValue ();

    retrieve a list of criterion, each of them is used to fill each lov in the pivot filter bar
    ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion ();
    List criterionList = conjunctionCriterion.getCriterionList ();
    for (int i = 0; i)<_criterionList.size(); i++)="">
    AttributeCriterion = (AttributeCriterion) criterionList.get (i) criterion.

    _selected is the currently selected value
    Selected object = criterion.getValues () .get (0);

    System.out.println (_selected);
    }

    Hope that helps,
    Chadwick

  • How to get the RGB value of a pixel in a psd document using scripting Photoshop

    Hi, guys!    Does anyone know how to get the RGB value of a pixel in a psd document using scripts in Photoshop?  I myself have missed for a long time and could not resolve. I am very happy to hear your voice as soon as possible!

    Here is an example...

    var originalUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var doc = activeDocument;
    var Colour1 = GetHexColour(eyeDropperRGB(1,doc.height-1));
    var Colour2 = GetHexColour(eyeDropperRGB(20,doc.height-5));
    var Colour3 = GetHexColour(eyeDropperRGB(40,doc.height-14));
    alert("Colour 1 = " +Colour1 + "\rColour 2 = " +Colour2 + "\rColour 3 = " +Colour3);
    var decColour = eyeDropperRGB(40,doc.height-14);
    alert("Red = " +decColour[0] + "\rGreen = " +decColour[1] + "\rBlue = " +decColour[2]);
    app.preferences.rulerUnits = originalUnits;
    function GetHexColour(reqHex){
    var out='';
    for(No in colours = reqHex){
     out = out.concat(zeroPad(d2h(reqHex[No]),2));
     }
    return out;
    };
    function eyeDropperRGB(x,y) {
     var x2 = x + 1;
     var y2 = y + 1;
     var out = new Array(3);
     activeDocument.selection.select([[x,y], [x2,y], [x2,y2], [x, y2]], SelectionType.REPLACE, 0, false);
     for(ch in list = ["Red", "Green", "Blue"]) {
     histogram = activeDocument.channels[list[ch]].histogram;
      for (i = 0; i <= 255; i++) {
       if (histogram[i]) {
        out[ch] = i;
        break;
       }
      }
     }
      return out;
    };
    function d2h(d) {return d.toString(16);}
    function zeroPad(n, s) {
       n = n.toString();
       while (n.length < s)  n = '0' + n;
       return n;
    };
    
  • How to get the return value from Java runtime.getRuntime.exec?

    I am running shell from a (GR 11, 2) Oracle database commands on aix.
    But, I would get a return value of a shell comand... as you get with "echo $?"

    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
    
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
    }
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        }
        return retval;
    };
    /
    but I do not get a return value... because I don't know how to get the return value...

    Published by: user9158455 on 22-Sep-2010 07:33

    Hello

    Your pr.exitValue () has tried?

    I think you also need a finally block that destroys the sub-process

    Concerning
    Peter

  • How to get the decimal value of a string of international currency

    Hi all

    How to get the decimal values to a string of international currency.

    Finally, we get to the real problem.

    You can use location functions or write your own using string functions already mentioned...

    http://developer.BlackBerry.com/native/documentation/Cascades/device_platform/internationalization/

  • How to get the last date of 3 days for the current month?

    Hello. Guy

    How to get the last date of 3 days for the current month?

    MY OUTPUT WOULD LOOK LIKE THIS

    JANUARY 29, 2016

    JANUARY 30, 2016

    JANUARY 31, 2016


    GUYS HELP ME / / /...

    SQL > select last_day (sysdate) - level + 1 double connect by level<= 3="" order="" by="">

    LAST_DAY)

    ---------

    29 JANUARY 16

    30 JANUARY 16

    31 JANUARY 16

  • How to get the last day of a month for every 2 months for a given period?

    Hello

    Can is it some please let me know how to get the last day, last day of the week, the weekend last day, last Monday, one month for every 2 months for a given period?

    Thanks in advance.

    Try the below

    SELECT LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))) lastday.

    BOX WHEN TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') = 'SAT '.

    SO LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))-1

    WHERE TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') = 'Sun '.

    THEN LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))-2

    Of OTHER LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))

    END as lastweekday,

    BOX WHEN TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') IN ('Sam', 'SUN')

    THEN LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))

    Of OTHER LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))

    -(TO_NUMBER (TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))),' from)) - 1).

    END as lastweekendday,

    BOX WHEN TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') = 'MY

    THEN LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))

    Of OTHER NEXT_DAY (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), "LUN")-7

    END AS lastmonday

    FROM (SELECT SYSDATE startdate,

    SYSDATE + 300 enddate

    THE DOUBLE)

    CONNECT BY LEVEL<=>

  • How to get the last day of the week?

    HII

    I can get the week number of calendar for a given date using

    SELECT to_char (to_date('04/04/2011','MM/DD/YYYY'), 'WW') FROM dual

    can any body tell me, how to get the last day of the week?

    and the answer should be: 04/08/2011(8th april)
    Thank you
    San

    Published by: sandeep9 on April 4, 2011 03:50

    Perhaps this...

    SQL> select trunc(sysdate,'WW')+6 from dual;
    
    TRUNC(SYSDATE,'WW')+
    --------------------
    08-APR-2011 00:00:00
    
    SQL>
    
  • How to get the internal values of Photoshop one ID assigned

    I have difficulties to obtain values for the internal settings.  It's less hard to set, you can use the Listener Script to get the code to use.  Presumably, you use executeActionGet() with an ActionReference.  The problem is to know how to build the ActionReference.  It doesn't seem to be a lot of documentation on that.

    My immediate problem is how to get the parameters of the 3D camera. I know this requires Photoshop Extended, but the principle must be the same.  This code sucessfully defines these parameters:

    < code >

    function setPhotoshopCamera (angleX, angleY, angleZ, posX, posY, posZ) {}
    Camera
    var idGet3DCamera = stringIDToTypeID ("get3DCamera");
    var idSet3DCamera = stringIDToTypeID ("set3DCamera");
    var descCamera = new ActionDescriptor();

    Camera position
    var idKey3DCurrentCameraPosition =
    stringIDToTypeID ("key3DCurrentCameraPosition");
    var descCameraPosition = new ActionDescriptor();

    var idkeythreeDXPos = stringIDToTypeID ("key3DXPos");
    descCameraPosition.putDouble (idkeythreeDXPos, posX);
    var idkeythreeDYPos = stringIDToTypeID ("key3DYPos");
    descCameraPosition.putDouble (idkeythreeDYPos, posY);
    var idkeythreeDZPos = stringIDToTypeID ("key3DZPos");
    descCameraPosition.putDouble (idkeythreeDZPos, posZ);
    var idkeythreeDXAngle = stringIDToTypeID ("key3DXAngle");
    descCameraPosition.putDouble (idkeythreeDXAngle, angleX);
    var idkeythreeDYAngle = stringIDToTypeID ("key3DYAngle");
    descCameraPosition.putDouble (idkeythreeDYAngle, angleY);
    var idkeythreeDZAngle = stringIDToTypeID ("key3DZAngle");
    descCameraPosition.putDouble (idkeythreeDZAngle, angleZ);
    descCamera.putObject (idKey3DCurrentCameraPosition,
    (idKey3DCurrentCameraPosition, descCameraPosition);

    These must be defined in the ActionDescriptor to make it work,

    // , but we do not have them
    var idkeythreeDCurrentFStop = stringIDToTypeID ("key3DCurrentFStop");
    descCamera.putDouble (idkeythreeDCurrentFStop, 0.000000);
    var idkeythreeDCurrentFDist = stringIDToTypeID ("key3DCurrentFDist");
    descCamera.putDouble (idkeythreeDCurrentFDist, 0.500000);
    var idkeythreeDCurrentFocalPointX = stringIDToTypeID ("key3DCurrentFocalPointX");
    descCamera.putDouble (idkeythreeDCurrentFocalPointX, 0.500000);
    var idkeythreeDCurrentFocalPointY = stringIDToTypeID ("key3DCurrentFocalPointY");
    descCamera.putDouble (idkeythreeDCurrentFocalPointY, 0.500000);
    var idkeythreeDCurrentFOV = stringIDToTypeID ("key3DCurrentFOV");
    descCamera.putDouble (idkeythreeDCurrentFOV, 30.000000);
    var idkeythreeDOrthographic = stringIDToTypeID ("key3DOrthographic");
    descCamera.putBoolean (idkeythreeDOrthographic, false);
    var idkeythreeDOrthographicScale = stringIDToTypeID ("key3DOrthographicScale");
    descCamera.putDouble (idkeythreeDOrthographicScale, 6.928203);
    var idkeythreeDViewIndexString = stringIDToTypeID ("key3DViewIndexString");
    descCamera.putString (idkeythreeDViewIndexString, "");
      


    var / / desc = executeAction (idSet3DCamera, descCamera, DialogModes.ALL);
    return of ESCR;
    }

    < code >

    The problem is that it does not work unless you also set the lower elements.  I want to leave what they are currently defined, but I don't know how to get these values.  Apart from that, I'll get the values of position of camera beforehand.  9 ID, string or otherwise, this should be necessary are known from the top.

    I assume you are using something like:

    < code >

    Var ref = new ActionReference();
    ref.putIndex (idkeythreeDCurrentFStop, idkeythreeDCurrentFStop);
    var / / desc = executeActionGet (ref);
    < code >

    However, I was unable to get something to work.  I am not sure

    1. That of the putXXX method to use.
    2. What to use for the desiredClass, which is the first argument.

    Any help would be appreciated.

    That you will get the 3DCurrentCameraPositon

    var ref = new ActionReference();
    ref.putEnumerated( zTID("Lyr "), zTID("Ordn"), zTID("Trgt") );
    var desc = executeActionGet(ref).getObjectValue(stringIDToTypeID('layer3D')).getObjectValue(stringIDToTypeID('key3DState')).getObjectValue(stringIDToTypeID('key3DCurrentCameraPosition'));
    

    Which returns a descriptor with the following keys.

    Key 0 = key3DXPos: DescValueType.DOUBLETYPE
    1 key = key3DYPos: DescValueType.DOUBLETYPE
    2 = key3DZPos key: DescValueType.DOUBLETYPE
    3 = key3DXAngle key: DescValueType.DOUBLETYPE
    Key 4 = key3DYAngle: DescValueType.DOUBLETYPE
    5 = key3DZAngle key: DescValueType.DOUBLETYPE

    At least with my sample 3D layer. I don't really do a lot with the 3D, so there may be other keys.

  • How to get the peak value

    Can I know how to get the 2 peak values v1 and v2 and 2 duration times t1 t2.

    Since there is a small amplitude noise, difficult to use the Max simplely.

    May need to use a filter such as wavelets or TREE to Denoise it first. Can I know how to use, any Toolbox in labview. How do the curve smooth first.

    Thank you.

    I can't watch your vi now (I'm at work), but if your signals are long enough, you might consider a median filter.  You can set the number of points before and after use.  I found that it is useful for some smoothing problems (not all).

  • How to get the parameter values of a step type custom when I create file and adding a type of step seq

    I use lv 8.5 and teststand 4.0.

    I did a step type custom and recorded at the MyTypes.ini in pallets of type.

    I specified a default module by opening the properties of the custom step of *.ini type window, then I put some values of the parameters.

    T1) when I open teststand and I add the custom step type manaully in seq file, the labview module parameter values are represented.

    But, if to use file (create and add support prototype stage), the labview module parameter values has the default value.

    Using joint file, how to get the setting custom step type values I put in *.ini?

    Q2) each type of step are automatically by name through the use of LoadTypePaletteFilesEx. When I open teststand and I add the custom step type manaully in seq file, the module is loaded automatically. Inside the attachment, I use a prototype of charge and a fixed path where the module labview is to load the labview module.

    Can I load module automatically without using a prototype of charge or how can I get a dynamic path of type step?

    I solved Q1 for myself by using the mapping tab of the parameter within the configuration to the default module window.

    Everyone knows Q2?

    Thank you.

  • How to get the last message received in the Inbox?

    Currently I am using the following code to the list of messages in the Inbox.

    Folder[] folders = store.list(Folder.INBOX);Folder inbox = folders[0];Message[] msgs = inbox.getMessages();
    

    But, how could I do the last message that was received in my inbox at the moment?

    I have a lot of unread messages in my Inbox and I can even receive the same message from sender twice at the same time, but I need access to the last message you received.

    Thank you

    As I have a implements FolderListener, I need to get the last message of FolderEvent object. But, I tried to access the last Inbox message, which will not always be there!

    Thanks Deepesh

  • How to get the last access to the workflow? (OM, WMS) release 11.5.9

    Hello my friends.

    I am looking for information on how to get the date of the access and the user name who did use some WFs in OM and last WMS.

    If it is through the application or running in the background via SQL for the information is not important to me.

    Could you help me with this?.

    Thank you

    the 'item_type' attribute must match the name of the WF?

    Yes (internal name. For example OEOL).

    The custom of those who will not be affected by the upgrade.

    You must run the query that I provided before to identify if the workflow is used or not.

    For the workflow of order lines, it is intended to be used as you use the order management.

    Kind regards

    Bashar

  • How to get the last business day of the previous month?

    Hi all

    We need the user as below,

    If the user select 18 June 2015 ' quick dashboard as the input value, and then they want to see last month last day of work (business date: 29-may-2015) amount in report, if you have an idea please share with us.thanks

    Note:

    use under request we can able to get the last day of the previous month, we want to for the last business day of the last month, based on the date of entry of the user?

    TIMESTAMPADD (SQL_TSI_DAY,-(1), TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH ("DIM_TIME". ("" DataDate ") *-(1) + 1,"DIM_TIME ". (("" DataDate "))

    Thank you

    Deva

    Try this,

    case when Dayofweek (timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15')) = 1 then timestampadd (sql_tsi_day, (Dayofmonth(Date '2015-06-15') *-1)-2, Date '' 2015-06-15) when Dayofweek (timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15')) = 7 then timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1-1, Date '' 2015-06-15) another timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15') end

    As Ftsiot said in this post, it will work only to exclude the sat and Sun. Another one if you want to exclude regional holiday, you may need a calendar in DB table.

    Thank you

    AJ

Maybe you are looking for

  • Automatic rotation of the order

    Hello I Iphone5s using last year, but now, suddenly, auto-rotation doesn't work on my phone can someone pls suggest me how to get this resolved? Concerning GO

  • Z6200: z6200 constantly squeak when the printhead moves back

    Someone had this problem? It drives me crazy, whenever the printer moves it squeaks like crazy. I tried to tighten all bolts and screws I can find, even tried to tie the rope around two cross bars below, which helped a bit, but whatever I do nothing

  • Satellite A300-1MC, does not need the recovery cd

    Hi all. My friend has a laptop Satellite A300-1MC that no longer works. When the laptop is on, it indicates that the hal file is missing. I know that we need to buy the recovery cd, since she did not have one when she bought the laptop. Can someone d

  • What to do with driver downloads - SP 6100

    I have recently reinstalled Win XP on my Satellite Pro 6100. I downloaded the WiFi and the Toshiba SD reader drivers support website but can someone please tell me what to do with the files once extracted.Also, just because the laptop has the switch

  • ThinkPad Edge 530 C13 / 3120M

    I have the laptop above: Serial number: * I want to add more memory and the detailed specifications for this model (E530) indicates that the maximum memory is 8GB I looked and talked to two reliable suppliers of memory who indicate on their Web sites