remove duplicate in the table items

I use under the code to two areas of clips. On the left 10 clips consisting of 2 columns and 5 rows. On the right an exact replica. It starts with the clip 1 on the left, as it is duplicated on the right, then clip 2 on the left, as it is duplicated on the right etc. Until the left and right are the exact same 10 clips in the same order.

Now, I've added an event listener. The way I'd like it works when I click on for example the clip 4 left, not only this clip should be removed, but also his counterpart cut 4 right. And even the opposite effect: by clicking on the clip on the right 4 should remove both the right claw 4 as the left clip 4.

The way I work now is is that if clicking the clips on the left. Who removes this clip and the clip on the right. I use indexOf to mid-range. By removing the clip on this site indexOf, which would be a clip on the left and the right clip by adding 1 to that indexOf. Since in the table, the clip of law (duplicate) immediately follows the left (foreground).

Of course this does not the other way, when I click on a good clip first. Because I then have to subtract 1 from the location of indexOf to get the left clip version. But I can't think of a way to determine if the item clicked on is on the box on the right or left. I commented on this second line removeChild since it does not work when you click on a clip to right.

Can anyone thing of the kind?

var clipcopies:Array = new Array();

for (var: lines: uint = 0; lines < 5; lines ++)

{

for (var cols: uint = 0; < 2; passes passes ++)

{

for (var: Cops: uint = 0; < 2; cops cops ++)

{

var character: clips = new clips();

persona.scaleX =. 5;

persona.scaleY =. 5;

persona.gotoAndStop(cols+1+rows*2);

Persona.x = (COL * (persona.width + 20) + 10) +(cops*300);

Persona.y = (lines * (persona.height + 20) + 10);

persona.addEventListener (MouseEvent.CLICK, clickPersona);

addChild (persona);

clipcopies.push (Persona);

}

}

}

function clickPersona(e:MouseEvent):void

{

var thisclip:uint = clipcopies.indexOf (e.target);

trace (thisclip);

removeChild (clipcopies [thisclip]);

removeChild (clipcopies [thisclip + 1]);

}

use:

var clipcopies:Array = new Array();

for (var: lines: uint = 0; rows)<5; rows++)="">

for (var cols: uint = 0; cols)<2; cols++)="">

for (var: Cops: uint = 0; cops)<2; cops++)="">

var character: clips = new clips();

persona.scaleX =. 5;

persona.scaleY =. 5;

persona.gotoAndStop(cols+1+rows*2);

Persona.x = (COL * (persona.width + 20) + 10) +(cops*300);

Persona.y = (lines * (persona.height + 20) + 10);

Persona.Name = line + "," + COL + "," + cops;

persona.addEventListener (MouseEvent.CLICK, clickPersona);

addChild (persona);

clipcopies.push (Persona);

}

}

}

function clickPersona(e:MouseEvent):void {}

removeChild (MovieClip (e.currentTarget));

removeChild (getChildByName (e.currentTarget.name.split (",") [0] + ',' + (1 - int (e.currentTarge t.name.split (",") [1])));)

}

Tags: Adobe Animate

Similar Questions

  • Remove duplicates from the oracle table using 2 columns

    Hello

    I need to remove the duplicates of an oracle table based on 2 columns in the table.i tried to remove duplicates using the join, but get the error like sql error ora-00933

    Thank you

    Hello

    Here's one way:

    DELETE FROM table_x

    WHERE ROWID NOT IN)

    SELECT MIN (ROWID)

    FROM table_x

    Col_1, col_2

    );

    I hope that answers your question.

    If this isn't the case, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and the results you want from this data.

    In the case of a DML operation (for example, REMOVE) the sample data should show what look like the paintings before the DML, and results will be the content of the or the tables changed after the DML.

    Explain, using specific examples, how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: Re: 2. How can I ask a question on the forums?

  • JS: How to remove duplicates in a table?

    JS: How to remove duplicates in a table?

    I guess there's a simple solution...

    Hey!

    Maybe something like this:

    Array.prototype.unique = function (){
        var r = new Array();
        o:for(var i = 0, n = this.length; i < n; i++){
            for(var x = 0, y = r.length; x < y; x++){
                if(r[x]==this[i]) continue o;}
            r[r.length] = this[i];}
        return r;
    }
    

    Use:

    var myArray = ["a","b","c","c","a","d","b","b"];
    alert(myArray.unique());
    

    Hope that helps.

    --

    tomaxxi

    http://indisnip.WordPress.com/

  • Add / remove rows from the Table

    Hello

    I'm really new to LiveCycle ES 8.2 (= non-existent knowledge of JavaScript) and has difficulties to create a table that can add / remove lines.

    I found a model that has the feature I need, but am unable to reproduce the table. (Ref. "Fax Cover Sheet_SW.pdf' http://forums.adobe.com/message/2561553#2561553)

    Even when I create a new blank form, and then copy / paste the table (subforms: 'detailHeader' + "detal") in the new, blank forms, the table stops working. The buttons are more clickable in the LiveCycle 'Preview PDF'

    In the new, blank forms, the 'Paging' and 'Binding' tabs have some or all of their features grayed out.

    I tried the following:

    1. Save the form as an "Adobe Dynamic form XML (pdf)"
    2. Make sure all of the 'content' subform fields were set to "Position" instead of "Flowed".

    What am I missing, like all JavaScript copied on, but for some reason any does not work.

    4 things you need to correct your form...

    (1) Page1 subform needs tobe Flowed the value.

    (2) then the link to the Subform1 tab will be active. You must check the box "subform to repeat for each item of data.

    (3) in the Add button to Subform1 you missed 'instanceManager' in the code...

    Subform1.instanceManager.addInstance (1);

    (4) in the same way in the button Delete

    Subform1. instanceManager. removeInstance (this.parent.index);

    Thank you

    Srini

  • How to remove columns from the table on the master 1-0?

    I have an array of 96 columns with strings. I also have the array of int 96-elemets (mask) with 1 and 0.

    What I want to do is to is to remove (or hide - but I read that it is not possible) all the columns with index corresponding to 0 in the mask table.

    example:

    columns in the table

    1 2 3 4 5

    mask

    0 1 0 0 1

    I want to remove the columns 1, 3 and 4 and leave only 2 and 5 in my table.

    How can I do?

    If I create loop for with i as the index of the column, when I do DeleteTableColumns() columns number decreases, and I get an error of range out of

    Or do I have an option to hide the unnecessary columns (not set their width to 1, it's very ugly-looking)?

    Please help me (())

    Hello rovnyart!

    1. removal of columns in the table:

    I suspect that the reason why you get the out-of-range error is due to fact that in your loop, you delete the columns in the table, you'll eventually end up by referring to a column that no longer exists, because the other columns before it have been deleted. While you remove each column of your table in the loop for example, the column index number will move, because you deleted the other columns in front of her.

    To resolve this, even if you delete a column in your loop, make sure that you take also into account that the index of the column is moved because of the removed columns.

    2 hide columns in table:

    You can use the ATTR_COLUMN_VISIBLE attribute to hide columns in the table:

    http://forums.NI.com/T5/LabWindows-CVI-idea-exchange/add-attr-column-visible-attribute-for-table-Col...

    http://zone.NI.com/reference/en-XX/help/370051Y-01/CVI/uiref/cviattrcolumnvisible_column/

    3 alternatives:

    Note that another alternative would also use a tree instead, control as the tree control also supports the hidable columns:

    http://forums.NI.com/T5/LabWindows-CVI/table-hide-column/TD-p/569773

    Best regards!

    -Johannes

  • Remove multiples of the table

    Hello

    I am trying to remove multiples of a fundamental frequency of a table of frequency points.  An additional question with this deletion, is the multiple of the fundamental frequency of the table may be within a range, as at ± 1 k.  Any help will be greatly appreciated.

    Thank you

    hiNi.

    This give a try.  Want to watch the rest and then configure a few beaches based on the desired accuracy.

  • Add and remove users from the table

    Hi, guys. I do a system that allowed admin in the user control.

    The ID is = admin

    The neck is = 6649481

    Can someone help me to check add it and remove the part.

    Actually, it may work, but I would like to make he repeats no is allowed, but it works on the index of '0' and then index 1, it will not stop the user to add id repeated.

    Delete if I had to remove the loop will be fine and work well, but it can only remove the top. It's like first first concept but I would like to do as a function of the ID given to remove from the table.


  • Cannot remove duplicate in the people application contacts

    I have three cases of a person in my application of people, but when I go to the bar of the App on two of them, there is no clear list button. None of these two bodies have all the data in their profiles and they cannot be changed. I don't know how these contacts two thugs got there, but I would like to get rid of them.

    Hello

    Thanks for posting in the community of Microsoft Windows.

    I understand that you are unable to remove the duplicate in the people application contacts.

    I imagine the inconvenience that you are experiencing. I will certainly help the question of fixing.

    To help you suggest several steps to solve the problem, I would appreciate if you could answer the following question:

    . You have several configured accounts that have the same contacts?
     
     
    If you have the Microsoft account, then try to remove duplicates by following the steps in the link below:
     
    I hope that the information above helps you.
  • Remove duplicates of the chain

    Hello

    I need help to remove duplicates from a string that contains years and ' - '. Example: 1988-1997-2000-2013-1998-1965-1997-1899

    I know it can be done in regular expressions, but have no experience in this area.

    Select REGEXP_REPLACE (...) of double;

    Thank you

    SQL >-example of production line

    SQL > with t (select ' 1988-1997-2000-2013-1998-1965-1997-1899' double Str)

    2  --

    3 - actual query:

    4  --

    5 Select listagg (str, '-') within the Group (order by null)

    6 from select (separate str

    7 in (select regexp_substr (str, ' [^-] +', 1, rn) str)

    8 t

    9 cross join (select rownum rn

    10 in (select max (length (regexp_replace (str, ' [^-] +'))) + 1 mx)

    11                                    from   t

    12                                  )

    13 connect by level<=>

    14                           )

    15 where regexp_substr (str, ' [^-] +', 1, rn) is not null

    16              )

    17       );

    LISTAGG(STR,'-') WITHINGROUP (ORDERBYNULL)

    -------------------------------------------------------------------------------------------------------------

    1899-1965-1988-1997-1998-2000-2013

    1 selected line.

  • How to find duplicates in the table

    I have a table with 3 columns

    name of the table - used

    empcode firstname lastname
    XYZ 123 pk
    yzz 456 pk
    101 kkk jk


    ALTER TABLE employee
    ADD (CONSTRAINT PRIMARY KEY employee_PK
    (empcode, firstname, lastname))


    all the three columns are as key to porimary, we are migrating the data, there are problems with the data as the cobination of all three, resulting in duplicate, in the last column is supposed to be duplicates but first two columns will not have the duplicate and a complete line of the table (combination have no duplicates)

    a query need to find duplicates to validate the whole lines

    (B-)

    select empcode,firstname,lastname,count(*)
    from employee
    group by empcode,firstname,lastname
    having count(*)>1;
    
  • Bigger disk-swapping, but down two, possible to remove them from the table, and then expand?

    I have a R710 with a PERC 6 / i, Win 2008 R2 running. I have a small disk for the operating system, the other 5 bays are filled with 1 TB disks in a RAID array-5.

    I need to add more storage, so I want to buy three discs of 3 TB. I plan on the withdrawal of old readers, and then put it in the new, bigger. I assume that it will take 1 of the 3 TB and repair. Leaving free 2 TB disk. Repeat this step twice more, which will result in three discs of 3TO with 6 TB of disk space not used in the RAID.

    Is it possible to have the controller expand storage in my table of RAID-5 existing free space, and then delete the two remaining 1 TB disks in the array?

    Who is? Is it still possible? Or do I have to backup the data on another storage device and delete the table and simply start a new one with the three discs of 3 TB and copy the data back?

    This will not work:

    (1) the PERC 6 won't take 3 TB drives; the maximum size is 2 TB.

    (2) you cannot delete records in a table - your RAID 5 5x1TB must always have records of 5 or more (you can add without deleting).  Even when using the same number of disks, isn't it possible to do the smaller table/VD.

    (3) even if you used 2 TB disks, there is no way to expand the RAID 5 using the extra space on the disks - with 5 disks in RAID 5, it will remain the same size. The only thing you can do with the new space is to create a second RAID array on the disks (called "slice").  This new VD is handled by the operating system as another "drive."

    Keep in mind if backup and restore in a larger painting, as if the VD ('disc') is greater than 2 TB, the disc "" MUST be converted to GPT and active UEFI bootmode (instead of BIOS).  Make sure that your backup software is capable of restoring one using the BIOS install on a system UEFI (and the 'disc' TPG 'disc' MBR).

  • update of the value entered in the report to the table item

    Hi all


    I want to change the dnom report... and wt never dept I checked shud update the db...



    I've created a report in the

    Select apex_item.checkbox(1,deptno) "Select", apex_item.text(2,dname) "dname" of the Department;


    and submitt I m writing a process as


    Start
    BECAUSE me IN 1.APEX_APPLICATION. G_F01. COUNTY
    loop
    update the set dname = apex_application dept. G_F02 (i) where deptno = apex_application. G_F01 (i);

    -I want to update the text entered in the table report.
    commit;
    end loop;
    end;

    Hello

    You get an error? Or how it will not work?

    BR, Jari

  • How to remove duplicates from the PL - SQL table?

    Hi gurus,

    I have a PL - SQL table with the following structure
    Authors (SR_NO, Auth_Code, Change_Date, cost)

    This table is filled using a slider. However, this table can have a few lines in double (for column (Auth_Code)
    for example
    SR_NO      Auth_Code       Change_Date                       Cost
    1               A1             14-FEB-09 08.18.47 AM          11.00
    2               A2             14-FEB-09 08.18.56 AM       2839.00
    3               A1             15-FEB-09 08.00.02 AM      1299.00
    4               A1             15-FEB-09 07.00.00 AM        789.00
    5               A3             14-FEB-09 08.18.56 AM        312.00
    6               A4             14-FEB-09 08.19.02 AM        233.00
    I need to get the above result set select the separate lines of Auth_Code including the Change_Date is maximum (and store in another PL - SQL table for treatment later or even the removal of this table will be also!)

    of the data A1 is duplicated and a maximum Change_Date above = 15 February 09 08.00.02 AM.
    Where my PL - SQL Table that results must have given below
    SR_NO      Auth_Code       Change_Date                       Cost
    2               A2             14-FEB-09 08.18.56 AM       2839.00
    3               A1             15-FEB-09 08.00.02 AM      1299.00
    5               A3             14-FEB-09 08.18.56 AM        312.00
    6               A4             14-FEB-09 08.19.02 AM        233.00
    I'm not very aware of the PL - SQL tables and there is no chance to change the existing cursor that fills the data in this table PL - SQL.
    I guess that I need to compare each record of PL - SQL table with others, but do not know how to do this.

    Could you please help?

    Hello

    Like this?:

    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    
    SQL>
    SQL> with data as(
      2  select 1 as SR_NO, 'A1' as Auth_Code, to_date('14-FEB-09 08.18.47', 'dd-mon-yy hh24:mi:ss') as change_date,    11.00 as cost from dual union all
      3  select 2 as SR_NO, 'A2' as Auth_Code, to_date('14-FEB-09 08.18.56', 'dd-mon-yy hh24:mi:ss') as change_date,  2839.00 as cost from dual union all
      4  select 3 as SR_NO, 'A1' as Auth_Code, to_date('15-FEB-09 08.00.02', 'dd-mon-yy hh24:mi:ss') as change_date,  1299.00 as cost from dual union all
      5  select 4 as SR_NO, 'A1' as Auth_Code, to_date('15-FEB-09 07.00.00', 'dd-mon-yy hh24:mi:ss') as change_date,   789.00 as cost from dual union all
      6  select 5 as SR_NO, 'A3' as Auth_Code, to_date('14-FEB-09 08.18.56', 'dd-mon-yy hh24:mi:ss') as change_date,   312.00 as cost from dual union all
      7  select 6 as SR_NO, 'A4' as Auth_Code, to_date('14-FEB-09 08.19.02', 'dd-mon-yy hh24:mi:ss') as change_date,   233.00 as cost from dual)
      8  select * from data d where change_date = (select max(change_date) from data d2 where d.auth_code = d2.auth_code);
    
         SR_NO AUTH_CODE CHANGE_DATE       COST
    ---------- --------- ----------- ----------
             2 A2        14/02/2009        2839
             3 A1        15/02/2009        1299
             5 A3        14/02/2009         312
             6 A4        14/02/2009         233
    
    SQL>
    

    Kind regards

  • How can I remove duplicate in the massive window music player songs

    In the music player files window, I have several duplicate songs.  It's frustrating because he keeps doing again and again.  Help.  What can we do?  What is an upcoming update?  I can't stand this more

    Hi Kathleen,.

    How can I prevent double or invalid entries to be added to my library when I play music files?

    When you move digital media files on your computer, the file name and file path information remain unchanged in your library. Then when you select a file to play to its new location, a new entry is created in your library if you select the option automatically added to your library when played. As a result, your library can quickly contain a large number of entries, duplicate or invalid.

    To prevent music files to be automatically added to your library:

    1. in Windows Media Player, click the Tools menu, Options.

    2. on the Player tab, clear music to add to the library when played check box.

    Now, when you play music on your computer or the Internet, the file will not be added automatically to your library.

    If you have problems, try these methods and check if it helps.

    Method 1: Clear database of Windows Media Player cache files.

    a. exit Windows Media Player.
    b. press the Windows key + R, type %LOCALAPPDATA%\Microsoftand then click OK.

    c. Select the Media Player folder, and then delete.

    d. restart Windows Media Player.

    Method 2: Delete the Windows Media Player database and check.

    a. exit Windows Media Player.
    b. press the Windows key + R, type %LOCALAPPDATA%\Microsoft\Media Player, and then click OK.
    c. Select all files in the folder, and then click delete on the file menu.
    Note: You don't have to remove the folders that are in this folder.
    d. restart Windows Media Player.
    Note: Windows Media Player automatically rebuilds the database.

    Please post back with the results and we will be happy to help you further.

  • Remove duplicates from the result set

    Here's a challenge question that I was playing with a my free time during the work.

    I assume you have the basic HR example somewhere around (I hope is not in production).

    Let's say you want to get employees from the employees table whose name is similar to another employee last name.
    The easiest way is to join the two tables with a join condition that checks for the name and employee id. Here's what I came with.

    *************

    Select e1.last_name, e1.first_name b, e2.last_name c, e2.first_name d
    employees employees join e1 e2
    on (e1.last_name = e2.employee_id <>e2.last_name and e1.employee_id)
    order by one;

    ************

    The above query returns 10 rows. The first and the second are essentially the same. It is similarly, 3 & 4, 5 & 6, 7 and 8 and 9 and 10. The question is: is there a way that allows me to get rid of using only sql duplicate rows from the result set of this query. I sat on it for 15 minutes and I couldn't know. I'll try to watch my completed work once again.

    Example:

    SQL> column a format a10
    SQL> column b format a10
    SQL> column c format a10
    SQL> column d format a10
    SQL>
    SQL>
    SQL> select e1.last_name a , e1.first_name b, e2.last_name c, e2.first_name d
      2  from employees e1 join employees e2
      3  on ( e1.last_name = e2.last_name and e1.employee_id != e2.employee_id)
      4  where e1.employee_id < e2.employee_id
      5  order by a;
    
    A          B          C          D
    ---------- ---------- ---------- ----------
    Cambrault  Gerald     Cambrault  Nanette
    Grant      Kimberely  Grant      Douglas
    King       Steven     King       Janette
    Smith      Lindsey    Smith      William
    Taylor     Jonathon   Taylor     Winston
    
    SQL>
    

Maybe you are looking for