building tables and compare content

Hi team,

build a flash drag and drop activity with a button of control responses, having trouble getting tables to compare... Here is my code (below)

Why my work table uanswer properly used and when I compare the tables how can I make them "match" or == if they have the same content in different order? Is how important it?

Also can I get a number reutrned on the number of items matching there even if they do not completely match?

See you soon

void

ans1.ans1text.text = "beans";

ans2.ans1text.text = "Chicken";

ans3.ans1text.text = "Rice";

ans4.ans1text.text = "Rocks";

ans5.ans1text.text = "Dirt";

incorrect var: number = 0;

var right: number = 0;

trace (getRect (destination1));

var rightanswers:Array = ["years1, years2, years3"];

for (var i: int = 0; i < rightanswers.length; i ++)

{

var response: String = rightanswers [i];

}

var useranswers:Array;

for (var j: int = 0; j < useranswers.length; j ++)

{

var uanswer:String = useranswers [j]

}

This.ans1.addEventListener (MouseEvent.MOUSE_DOWN, pickMe1);

This.ans1.addEventListener (MouseEvent.MOUSE_UP, dropMe1);

function pickMe1(event:MouseEvent):void {}

event.target.startDrag ();

}

function dropMe1(event:MouseEvent):void {}

event.target.stopDrag ();

var myTargetName:String = "years1" + event.target.name;

If ((event.target.hitTestObject (destination1) == true)) {}

useranswers.push ("years1");

trace (useranswers);

} else {}

var ians1:Number = useranswers.indexOf ("years1");

trace (ians1);

useranswers.splice(ians1,1);

trace (useranswers);

}

}

This.ans1.buttonMode = true;

This.ans2.addEventListener (MouseEvent.MOUSE_DOWN, pickMe2);

This.ans2.addEventListener (MouseEvent.MOUSE_UP, dropMe2);

function pickMe2(event:MouseEvent):void {}

event.target.startDrag ();

}

function dropMe2(event:MouseEvent):void {}

event.target.stopDrag ();

var myTargetName:String = "years2" + event.target.name;

If ((event.target.hitTestObject (destination1) == true)) {}

useranswers.push ("years2");

trace (useranswers);

} else {}

var ians2:Number = useranswers.indexOf ("years2");

trace (ians2);

useranswers.splice(ians2,1);

trace (useranswers);

}

}

This.ans2.buttonMode = true;

This.ans3.addEventListener (MouseEvent.MOUSE_DOWN, pickMe3);

This.ans3.addEventListener (MouseEvent.MOUSE_UP, dropMe3);

function pickMe3(event:MouseEvent):void {}

event.target.startDrag ();

}

function dropMe3(event:MouseEvent):void {}

event.target.stopDrag ();

var myTargetName:String = "years3" + event.target.name;

If ((event.target.hitTestObject (destination1) == true)) {}

useranswers.push ("years3");

trace (useranswers);

} else {}

var ians3:Number = useranswers.indexOf ("years3");

trace (ians3);

useranswers.splice(ians3,1);

trace (useranswers);

}

}

This.ans3.buttonMode = true;

checker.addEventListener (MouseEvent.CLICK, checker1);

function checker1(event:MouseEvent) {}

trace (response);

trace (uanswer);

That's where I want to get my two tables to compare, but my table of uanswer does not work

}

function matchesF(a1:Array,a2:Array):int {}

var n: int = 0;

If (a1.length<>

var has:Array=a1.slice();

var:Array=a2.slice() b;

} else {}

a = a2. Slice();

b = a1. Slice();

for (var i: int = 0; i<>

{if (b.IndexOf (a [i]) >-1)}

n ++ ;

}

}

return n;

}

Tags: Adobe Animate

Similar Questions

  • analysis of the table and compare

    Hello

    I have a fixed table and would like to extract the .txt file that corresponds to the first component-data + / 5 x-data value compared to the entry level.  The output file must contain the original table and the corresponding digitized value y - data.

    I am stuck at the point indicated on the attachment VI and would get all the help that you can offer.

    I'm using LabView 8.5

    Thank you

    hiNi


  • Content of the table and other content not displayed

    mobile Adobe Reader does not display the content of the (a) tables and other graphics.image.png

    Hello Marco,.

    Please contact us for the detailed report. This is much like a bug we have identified in our latest release and are about to get a fix for. I'll send you an invitation to the beta. If you want to join and try it, you should see that the content is fixed. If this isn't the case, I'd obviously love to hear. You are also welcome to send me the file so I can confirm that he has set myself at [email protected].

    Thank you!

    Pat

  • After the reopening of the dreamweaver files, the table and its contents do not appear in design mode

    I had a problem with the deisgn opinion that caught me all week. I designed a Web page with dreamweaver CS4. After having reopened this Web page, I got the problem to see the tables and images inserted in dreamweaver (the images cut into slices of Fireworks works well). Somehow this problem existed only in design, but is NOT seen on browser / see live.  I thought that it is the problem of adjustment, but I tried to reopen the Web page I designed earlier... you have no problem in design or mode live view. I also tried to start another file, same problem existed (tables/images do not display in design) I'm really confused. Any thoughts?

    I've already done my research in the world, but cannot find solution.

    You closed the first cell in what appears to be your content area.

    />

    Must be:

    Write it down / at the end of the

    is removed from the version "should be."

    Enjoy.

    _T

  • Problem: Build a VI to display a string in the table of the lights. Each letter must be posted in a separate table and letters must move from one table to the other in the direction from left to right.

    Hi all

    Problem: Build a VI to display a string in the table of the lights. Each letter must be posted in a separate table and letters must move from one table to the other in the direction from left to right.

    I did program mentioned above but it does not work. Can you tell me what is the problem?

    There is no error is indicated in the program. If someone knows about it please try to find solutions and help me out of this problem.

    I have attached my program with this message.

    Thank you in advance!

    (1) FOR loops are your friend here.  You can make a slight restructuring using loops, and then you will have less mess to deal with, the inner loop through tunnels of autoindexing to make it even simpler.

    (2) I would only treat the numeric values of the characters.  So go terminal of control of the chain, the capital letters and byte array to before the outer loop.  You can use a size of Board over there to tell how many times the outer loop to iterate.

    (3) the Index table is extensible.  So you only need over the index of the first, and it will increment itself, as it develops.

    (4) you need to finish the lookup table (table 3D)

  • Dimension to build using the SQL table and process to populate the SQL table

    I have a dimension in a cube that is manually* built by one of our power users. Now, I have to get all the information of members of this dimension in a SQL table (example: with columns... Level0, level0property, level1, level1property etc...) to use this table in the STUDIO for the responsibility of the Member.

    Is there any easy process to do this? Currently I am building each line manually in the SQL table and there are 1100 + members in that manually built dimension. Please advice.

    Look at the outline of applied olap Extractor is a free utility

  • Comparing the sum of the two tables and correct by difference of amount in its second t

    Hello guys,.

    I have a very difficult task that I can't get my head around.
    The sample data looks like this:

    Master table
    Request - booking - debit - credit - MasterAmout
    1------------1----------------D---------------------------------15.3
    1------------2----------------D---------------------------------480.6
    1------------3------------------------------C-------------------496.8
    ------------------------------------------- 0.9


    The slave table
    Demande---reservation---debit---credit---slaveamout---slavecorrection
    1------------1------------D------------------------------------15.3---------------14.5
    1------------2------------D------------------------------------480.6-------------480.6
    1------------3-----------------------------C-------------------496---------------496
    -------------------------------------------0.1--------------------------------------0.9


    The reservation have a total amount of 0.1, but must be corrected to 0.9 because the main table has 0.9.

    Reservation 1 requires a correction so the slave table also has a total of 0.9 (business rule is, only corrections on the first booking). So we have
    to change the amount of 15.3 to 14.5. I plan my SQL like this:

    1 reservations sum of two tables for each claim. Compare the two for each individual claim.
    2. If Captain sum the amount shows a difference between master / slave
    2.1 select top 1 table reservation slave for the specific claim and increase/decrease by the difference of these two amounts.

    Who is?

    Hello

    Use MERGE to actually do the UPDATE.
    The ROW_NUMBER analytic function to identify the first booking in slave (unless you can count on which the reservation = 1).

    MERGE INTO     slave     dst
    USING     (
         WITH     master_summary     AS
         (
              SELECT       claim
              ,       SUM ( master_ampount * CASE
                                       WHEN  debit  = 'D'  THEN -1
                                       WHEN  credit = 'C'  THEN  1
                                   END
                         )     AS balance
              FROM       master
              GROUP BY  claim
         )
         SELECT     s.claim
         ,     s.booking
         ,     SUM ( s.slave_amount * CASE
                                WHEN  s.debit  = 'D'  THEN -1
                                WHEN  s.credit = 'C'  THEN  1
                               END
                  ) OVER (PARTITION BY  claim) - m.balance     AS diff
         ,     ROW_NUMBER () OVER ( PARTITION BY  claim
                             ORDER BY        booking
                           )     AS r_num
         FROM     master_summary     m
         JOIN     slave          s  ON     m.claim     = s.claim
         )          src
    ON     (     src.claim     = dst.claim
         AND     src.r_num     = 1
         )
    WHEN MATCHED THEN UPDATE
    SET     dst.debit      = CASE
                        WHEN src.diff      <  0 THEN 'D'
                                       ELSE NULL
                     END
    ,     dst.credit      = CASE
                        WHEN src.diff      <  0 THEN NULL
                                       ELSE 'C'
                     END
    ,     dst.slaveamount = ABS (src.diff)
    ;
    

    If you would care to CREATE TABLE and INSERT statements for the sample data (showing the two tables, as they exist before the DML) then I could test this.

    The design of history seems very uncomfortable. Instead of the debit and credit columns, it would be much simpler to have positive and negative amounts. Is it really worth now both not corrected and corrected the amounts in the table on the slave, especially if you keep only versions corrected debit and credit columns?

  • COMPARING TWO ROWS IN THE SAME TABLE AND DELETE THEM USING DELETION BLOCK

    Hi all
    I have a problem. I have an Employee table

    employee

    Emp_name Emp_id Emp_status Emp_date

    John 1 P 11-27-2010

    Mike 2 26/11/2010 S

    Simon P 3 22 / 11 / 2010

    Dennis C 4 25/11/2010...


    I compare the rows in the table and their employee_status if 'P', should I remove the... Here, I should delete lines 1 and 3 as their Emp_status is 'P '. I only use BULK DELETE... I tried to use the join query internal and deletion, but it does not work... Can someone help me...

    Ooops, it should be:

    and e2.emp_status in ('P', 'C')

    not

    and e2.emp_status in ('P', 'A')

    Here it goes:

    SQL> select  *
      2    from  employees
      3  /
    
    E EMP_NAME      EMP_KEY          X
    - ---------- ---------- ----------
    C John              123          1
    P Mike              123          2
    P Paul              123          6
    C Harry             124          5
    A Gass              125          7
    C Gass              125          7
    
    6 rows selected.
    
    delete  employees e1
      where 2 = (
                 select  count(distinct e2.emp_status)
                      from  employees e2
                      where e2.emp_key = e1.emp_key
                        and e2.emp_status in ('P','C')
                   )
    /
    
    3 rows deleted.
    
    SQL>
    

    SY.

  • compare two tables and update the differences

    Hi all
    Sorry for the newbie question, but I am a beginner in the present.

    I have two tables, both have same structure-

    CODE - code NUMBER (6,0) store is the primary key does not change and is unique
    ADDRESS1
    ADDRESS2
    ADDRESS3 - all VARCHAR2 (100)

    One of the tables is named MASTER, the other being updated. MASTER contains hundreds of lines, while the table of UPDATES may have anywhere from zero to 10 or more.
    I want to compare the table of UPDATES against the MASTER of the table and if there is a difference, ask the differences in the table in UPDATES to the MASTER of table - so if the address of an Exchange store, then the change is reflected in the MASTER table by crushing with the data contained in the UPDATES table.

    I thought that maybe using sliders and compare each field but there must be a more efficient way.

    I hope that I have explained quite clearly... any help would be greatly appreciated.

    Thank you
    Bill

    Education MERGE, assuming that your version supports supported the MERGER.

    SY.

  • How to compare two TABLES and different lines of list?

    I have two structural equal paintings aaa and bbb
    that (could) have different lines.

    How can I compare the tables and display different lines?

    Peter

    Something like this->

    SELECT aaa.*,'bbb' "Not present in" FROM aaa
    MINUS
    SELECT bbb.*,'bbb' "Not present in" FROM bbb
    UNION ALL
    (
    SELECT bbb.*,'aaa' "Not present in" FROM bbb
    MINUS
    SELECT aaa.*,'aaa' "Not present in" FROM aaa
    )
    

    Kind regards.

    LOULOU.

  • Window and rescheduling content in accordance with the resolution of the screen

    Hello

    I wrote a program LabWindows and drew a UI according to him. The software is now used on another computer which is much lower display resolution. This leads to the problem that not all content is visible.

    Is it possible for the scale of the user interface compared to the available resolution without writing a lot of code?

    Thanks in advance,

    Christoph

    You can use the resolution setting and scale content on resize the attributes of the Group of experts, as well as SetPanelSize, to get the full scale of the Panel and controls according to the display resolution you use. See this knowledge base entry for more details.

  • issue with tables and clusters

    Hello

    Another issue with the tables and clusters. I have three engines thatI move on XYZ and then measure something. I need to draw on the 3D, the result of the measurement. How to draw real XYZ and not the index of the data table positions? (I can't actully how to build the matrices 2D forX, Y and Z). In the figures, I give an example of what I need.

    Concerning

    You have to break the data out of the cluster and to present them to the graph 3d to a separate bays for X, Y, Z and W where 'W' is your values measured at the locations described by X, Y, Z.

    This thread shows how trace readings in space 3. The following image shows the data that the original author wanted to draw.

    Have fun

    Ben

  • I am facing a problem with the beep.vi. I have a DAQ program, which acquired the signal and compare it to a threshold value. When a signal is out of range, a Visual and sound alarm has occurred. I use the VI beep.vi to generate the sound.

    I am facing a problem with the beep.vi.  I have a DAQ program, which acquired the signal and compare it to a threshold value. When a signal is out of range, a Visual and sound alarm has occurred. I use the VI beep.vi to generate the sound. Everything works fine except the sound alarm. It gives the table 1 d of type mismatch. I tried to fix this by placing it in a box structure. But it still does not work. If someone could help? Please find attached my VI. Best wishes to all visitors to the Forums of Discussion OR.

    Ihab El-Sayed

    published here: http://forums.ni.com/t5/LabVIEW/Playing-sound-based-on-exceeding-a-threshold-value-1D-array-data/m-p...

  • How can I read items in four tables and store them in variables?

    Greetings,

    I have 4 tables which I read to control an autonomous robot vehicle as instructions.

    I must be able to read the first elements of each table and store in separate variables 4 (direction, speed, angle, distance). Wait until the first statement has been executed. Then I move on to the second elements of each array. I'll repeat this until I went through all the elements. I am struggling to figure out how to do this?

    Please note:

    -The number of items in the tables is always the same, although the number of items varies as can be less instructions or more.

    For example, a full trial takes 1st element of table 1, table 2, table 3 and table 4 and it builds something like: forward, 10, 20, to the left. This will then be the robot moving forward at a speed of 10 over a distance of 20 and then turn left. Once this done then it contains the elements 2 and so on.

    Please find attached my VI that reads a text file and creates 4 berries.

    Thank you.

    stanm13 wrote: Unfortunately, I don't think you understood my question.

    Then, I would say a) you don't understand the answer or b) you explain well enough.

    To make each element of an array, using a loop FOR with autoindexing entered is the way to go.

  • Build tables then again

    Hi all

    I know that you are reading these words a lot here, sorry, I'm new to labview and I want someone to help me in vi that I'll explain now.

    I have a while loop with a variable inside (local variable or a random variable in this example), the loop has timeout of 1000 ms, so each one second there is a new value.

    After a time, I want to record what the output variable into an array and then summarize all these values and then display.

    I trigger the recording process manually by using a Boolean trigger, so, no need for a timer or something, I have you just press a button then values begin at accomulate in the table and then when I release the button, I want these values to summarize and display, then I have another RESET Boolean, I press reset the values of the transom zeros in order to press the key once more again later in and then the process is repeated again.

    I did the vi in the way I write now that I can start only the vi so the values accomulate and then when I press the Boolean value affects the loop stops and then the table is summed up and display.

    the problem is that I can not reset the values or repeat once again because when I press the Boolean value, stop the loop and I cannot start over once again.

    I'll be very grateful if someone helped me with that.

    Thanks in advance

    Concerning

    Shady

    Hey shady,

    It is always advisable to use the registry to offset for building tables. Using a while loop within a Structure of matter is not a good programming practice. Check out the attached VI. This should help you.

    Best regards,
    NitZ

    (Bravo to give good answers, mark it as a Solution If your problem is resolved)

Maybe you are looking for

  • MacBook Pro gets really hot when you run several programs

    When running iMovie or QuickTime player with another program (such as Safari or notes) my macbook pro gets really hot with the fans, sounding like a madman and untouchable until the programs are closed and it is cooled. Y at - he of the good solution

  • How can I change the name of the hard drive

    I recently had a hard drive failure and had a new hard drive installed. I restored Time machine and everything works except that Time Machine didn't and said both internal as external and external drives have the same name.  How can I change the name

  • Reset the bios on my 240 ca Presario CQ56.

    ICAN can't see my new ram and ssd. I did not the admin p/w, but now it's looking for one. I jumped the CCF twice and it did not reset it. Hashtag # 77912413. Help, please.

  • Wireless Zero Configuration Error 1068: the dependency service couldn't start.

    I recently updated my network card of a TP-Link TL-WN353G to a DWA-552. Now whenever I start, I have to manually configure my wireless car does not start the automatic configuration service. When I try to start the service manually, I get the above e

  • Port of h.323 using VirtualCenter Consolidation

    Salvation communities,.I would like to know if anyone knows what h.323 port, we must open inside the firewall to communicate with a demilitarized zone. We open almost the mention of different ports elsewhere...Domain TCP/UDP 53Kerberos TCP/UDP 88UDP