Comparison of the tables to find items that differ - JS?

I think I have my all wrong logic.

I'm trying to compare two tables, with the result that I get a new array with the elements in the first, which do not appear in the second.

Array1 - a, b, c and d, e

table 2 - a, b, c

new table must contain d, e

THIS IS WHAT I'M TRYING...

-Function to get graphics-

function getGraphicsFunc()

{

-tests of graphics in library-

MyLib = app.libraries.item var (0);

the list of graphics in the library

var libGraphicList = mylib.assets.everyItem () .name;

Alert (libGraphicList);        <-- IT WORKS very WELL

-Get a list of all the charts for CID on Pulse_OPI-

var graphicFolder = the folder (basegraphpath + lastdigits + "/");

var theGraphics = graphicFolder.getFiles ();

var allGraphics = [];

a content ID match files

for (i = 0; i < theGraphics.length; i ++)

{

Assuming 8 sequence of numbers is a static number.

You can also use grep to match 8-digit >

If (theFiles [i]. Name.match(/^\d{8}/);

If (theGraphics [i].name.indexOf (adCID) == 0)

{

allGraphics.push (theGraphics [i] .name);

}

}

Alert (allGraphics);        <-- This WORKS FINE - the following comparison is the problem...

Compare graphic tables to see which are NOT in the library

var missingGraphics = [];

for (j = 0; j < allGraphics.length; j ++)

{

if (toString (libGraphicList).indexOf(allGraphics[j]) is-1)

{

missingGraphics.push (allGraphics [j]);

}

}

Alert (missingGraphics);        <-- THIS ALWAYS PRODUCES THE SAME "MISSING GRAPHICS" EVEN IF THEY ARE IN the INDL

var graphicsFound = (missingGraphics.length)

Alert ("On" + graphicsFound + "graphics found and imported into the library")

}

Many thanks in advance and Merry Christmas everyone...

Which if statement says:

If (String (libGraphicList). IndexOf(allGraphics[j]) is-1)

or toString is a function you wrote, but not included?

I would have probably used:

If (libGraphicList.Join("|"). indexOf(allGraphics[j]) is-1)

I thought of doing it this way. It is probably that the calculation of the loop by the string before the declaration and comparing with that.

Dave

Tags: InDesign

Similar Questions

  • Fragmentation of the table to find Oracle 8.1.6.3.0

    Hi all

    I just want to find the fragmentation of the table for a table named LOG I used under query to find this...
    SQL> select table_name,round((blocks*8),2)||'kb' "size"
    from dba_tables
    where table_name = 'LOG' and owner='AMRWF1';  2    3
    
    TABLE_NAME                     size
    ------------------------------ ------------------------------------------
    LOG                            6301408kb
    
    SQL> select table_name,round((num_rows*avg_row_len/1024),2)||'kb' "size"
    from dba_tables
    where table_name = 'LOG' and owner='AMRWF1';  2    3
    
    TABLE_NAME                     size
    ------------------------------ ------------------------------------------
    LOG                            1468846.2kb
    And tablespace infromation is lower.
    SQL> select bytes/1024/1024,TABLESPACE_NAME,EXTENTS,MAX_EXTENTS from dba_segments where owner='AMRWF1' and segment_name='LOG';
    
    BYTES/1024/1024 TABLESPACE_NAME                   EXTENTS MAX_EXTENTS
    --------------- ------------------------------ ---------- -----------
         6154.16406 WFMKTLEAST                          12214  2147483645
    
    
    SQL> sho parameter block
    
    NAME                                 TYPE    VALUE
    ------------------------------------ ------- ------------------------------
    db_block_buffers                     integer 100000
    db_block_checking                    boolean FALSE
    db_block_checksum                    boolean FALSE
    db_block_lru_latches                 integer 3
    db_block_max_dirty_target            integer 100000
    db_block_size                        integer 8192
    db_file_multiblock_read_count        integer 8
    hash_multiblock_io_count             integer 0
    sort_multiblock_read_count           integer 2
    Thanks to mention if I put aside an appropriate method to find the fragmentation of the table and this table is severely fragmented or not?

    -Yasser

    Published by: YasserRACDBA on May 12, 2009 19:17

    I don't know how the histogram got there - in fact, did you check that there is a histogram. Do not forget that I pointed out that your version is so old that people will easily make mistakes on its operation.

    Select * from user_tab_histograms where table_name =... and column_name =...;
    A histogram will give you over 2 lines.

    The query uses the wrong index because the DENSITY on ID is too high; and the density is probably too high because it was settled as part of the process of creation of the histogram. So my assumption is that if you get rid of the histogram the index on ID will be used.

    Note: you can test the impact of the indices of switching by implementing indicators that Sean Kim noted, so you wouldn't need to drop thei histogram.

    A short note on OTN will not really you help. Items to check on
    www.centrexcc.com (Wolfgang Breitling)
    Pick up anything by Christian Antognin http://antognini.ch/blog/ - and buy his book (Troubleshooting Oracle Performance)
    Get a copy of my book (cost based Oracle Fundamentals)

    Concerning
    Jonathan Lewis
    http://jonathanlewis.WordPress.com
    http://www.jlcomp.demon.co.UK

    "All experts it is a equal and opposite expert."
    Clarke

  • Name of the table to find the workbook columns

    Hello

    I'm working on an implementation project legacy 11.5.10 and discoverer 4 version R12 system. I'm looking in the discoverer workbooks and I need the name of the table to determine the COLUMNS in a workbook.
    Any help is appreciated.

    Billa

    Hello

    Unfortunately, this information is not available in the EUL. The workbooks are stored in the EUL4_DOCUMENTS table in a column of type LONG. It uses a binary format and means that you can not query the structure of the workbook.

    Rod West

  • Find items, that those containing 'insert into a table.

    Hi, I have a table, say T, and I want to know what object in my database insert record in table T. What is SQL? TX in advance.

    Maybe something like

    with x as
     (select '   /* comment */ insert ' || chr(13) || ' /*+ APPEND */ into ' || chr(13) || 't values(' text
        from dual
      union
      select '   /* comment */ insert ' || chr(13) || ' /*+ APPEND */ into ' || chr(13) || 'table1 values(' text
        from dual)
    select *
      from x
     where regexp_like (text, '^.*insert.*into.*t\W', 'cn');
    

    that also avoids picking up 'insert into table1. I ' ts not perfect but should work in most cases. I would be interested
    see if someone can come with a relentless example that would always pick up the required
    string and never pick up a false positive.

    Of course, I forget what user_source distinguish the source lines in any case - scrub as well as.

    Published by: Paul Horth on February 23, 2012 00:55

  • Open the folder crashes finder after that put 10.11.4 at level

    After the installation of El Capitan, the viewfinder must be restarted after I get the beachball when I try to open a new finder window or try to open any folder on the desktop. How can I fix? I'm on an iMac 27 ".

    Please launch the Console application in one of the following ways:

    ☞ Enter the first letters of his name in a Spotlight search. Select from the results (it should be at the top).

    ☞ In the Finder, select go utilities ▹ of menu bar or press the combination of keys shift-command-U. The application is in the folder that opens.

    ☞ Open LaunchPad and start typing the name.

    The title of the Console window should be all Messages. If it isn't, select

    SYSTEM LOG QUERIES ▹ all Messages

    in the list of logs on the left. If you don't see this list, select

    List of newspapers seen ▹ display

    in the menu at the top of the screen bar.

    Click on the clear view icon in the toolbar. Then take an action that does not work the way you expect. Select all of the lines that appear in the Console window. Copy to the Clipboard by pressing Control-C key combination. Paste into a reply to this message by pressing command + V.

    The journal contains a large amount of information, almost everything that is not relevant to solve a particular problem. When you post a journal excerpt, be selective. A few dozen lines are almost always more than enough.

    Please don't dump blindly thousands of lines in the journal in this discussion.

    Please do not post screenshots of log messages - text poster.

    Some private information, such as your name or e-mail address, can appear in the log. Anonymize before posting.

    When you post the journal excerpt, an error message may appear on the web page: "you include content in your post that is not allowed", or "the message contains invalid characters." It's a bug in the forum software. Thanks for posting the text on Pastebin, then post here a link to the page you created.

    If you have an account on Pastebin, please do not select private in exposure menu to paste on the page, because no one else that you will be able to see it.

  • Comparison of the table?

    Hello

    I have a table that has strings for the key instead of numbers, e, g;

    product ['id'] = 1;

    product ['option'] = "option";

    product ['price'] = 1.99;

    When I use. toString() on this table, it does not produce a string, leading me to believe that m:System.NET.SocketAddress.ToString only works if you have digital keys. Is there an easy way, I compare two of the above tables?

    Thank you

    I think is right, all inhierts Kglad form object in flash, so it of always an object if you declare it as a table or not. I think that you need to compare each element to get the desired result.

  • State of the mouse with menu items that overlap control

    Hello

    I have a problem with the recovery of the location of the mouse using GetGraphCoordsFromPoint...

    I use the return status of GetGraphCoordsFromPoint to determine if the mouse cursor is over the plot of my graph control area (1) or not (0) to switch between styles of mouse (VAL_DEFAULT_CURSOR against VAL_CROSS_HAIR_CURSOR).

    It works in most cases...

    Above the Panel, there is a bar menu, located below is the xy graph. Now, if the mouse opens a menu and is the style of mouse on the menu (and also on the chart) depends on history of mouse:

    If the mouse has always been above the menu, it is not recognized by GetGraphCoordsFromPoint be loacted in the graph - which is what I would like to see, in this case of the style of the cursor is always the default style.

    Now, if the mouse leaves the menu for a short distance, the menu does not disappear (only if the mouse is to a greater distance) and acccordingly GetGraphCoordsFromPoint realizes that the mouse is over the chart. It is correct and as expected, too. (the style of the mouse is replaced by a sight then)

    Now, if I move the mouse over the menu, it is not recognized by GetGraphCoordsFromPoint, unfortunately, and the style of the mouse is not being in default.

    Am I missing something, or is there a way to fix this behavior? Styles different from the mouse on a menu is confusing for the user, and I would avoid it, of course

    Thank you...

    Hi Wolfgang,.

    It is not a very good way to work around this problem. As you found, Panel moving events are sent to the callback of the Committee even a menu is followed, and when you change the cursor of the mouse that it also affects any menu that can be active at a time.

    If the cursor changes do not at all while the menu is active, even if the user moves on the graph, there is a possible strategy don't mind you can pursue to remedy the situation. It consists of trying to detect if a menu is active, so that you do not change the cursor when the menu is active. Unfortunately, this is easier said than done. Although it is easy to be notified whenever a new menu is activated (via a menu drive recall) there is no right way to be notified when the menu disappears. And there are several ways in which it can disappear. So it is not possible to set an internal flag that tracks when the menu is active.

    However, it is possible to know if the menu is active at the time you receive the Panel move event (or in the timer tick event, although I'm not completely sure why you also use a timer). You can't do it with the UI CVI library, but you can, using the Windows SDK, in a way a little round point.

    The idea is to know which window is the top-level window. And if she is not the window of the Control Panel, then you should be able to assume that a menu is active and therefore refrain from changing the cursor. Note that you must also make sure that the active window belongs to your process, because there could be a number any other windows that might be the 'top' window at any time. But if it belongs to your process and it is not your Panel, then presumably it's the menu.

    I did a quick test with the following code and it seems to work, although you might want to test more thoroughly I did:

    topHwnd = GetTopWindow (NULL);
    GetWindowModuleFileName (topHwnd, topHwndModule, MAX_PATHNAME_LEN);

    GetPanelAttribute (Panel, ATTR_SYSTEM_WINDOW_HANDLE, (intptr_t *) & panelHwnd);
    GetWindowModuleFileName (panelHwnd, panelHwndModule, MAX_PATHNAME_LEN);

    If (! strcmp (topHwndModule, panelHwndModule) & panelHwnd! = topHwnd)
    return 0; do not change the cursor, unless the Panel is really on top

    Good luck

    Luis

  • Vista, broken beginning a number of questions, how can I find items that are broken

    I ran AT & T PC Maintenance tool (Performance).  One of the questions was 'broken startup objects - required Assistance.  There was a multitude of articles that have been re software, hardware, registry problems, etc.  But I'm not a teckie and articles, pages of subheadings sometimes, but nothing specific on how to identify what broken start points are being called, etc, etc, etc.  Bottom line, I'm totally lost.  All of these articles... it's too.  I want to just fix the problem.  ????  Is there a reasonably "simple solution" for us novices?  Knew not yet precisely what subheading below to select.

    Hello

    • What is the problem you are having with your Windows Vista computer?
    Example: Slow to start, the mistakes of performance issues.
    • Do you have Service pack 2 installed on your Windows Vista computer?
    • Facing errors of start when you log on Vista?
     
    Please follow the links below to solve the problem.
     
    Method 1
     
    Run the troubleshooter of performance and look for automated solutions (KB959062)
     
    Optimize the performance of Microsoft Windows Vista

     
     
     
    Method 2
     
    a.Optimize Windows Vista for better performance

     
     
    If you still face any questions, please refer to,.
     
    b.Get Windows Vista performance

     
     
    Method 3
     
    Difficulty of broken desktop shortcuts and common system maintenance tasks
     
     
     
    I hope this helps.
  • Program hearts cheats! Specifically, I took the game of cheating. Past Ace & King stings right & they ended up on the table. I think that is BULL, I expect a program to read the rules!

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Please send your comments to the games and the components of Windows 7 at the following URL:
    http://mymfe.Microsoft.com/Windows%207/feedback.aspx?formid=195

    Thank you

    Marilyn

  • Haw to find the element in the table that appears only once

    I have a table like this 2d:

    1 2 3 4 5 0

    5 6 2 4 7 2

    8 3 6 0 9 4

    5 6 7 7 3 2

    And I need to find items that appear only once in this table

    In this case, 8 and 9

    I also need this elements (row and column) position

    Are integers

    I tried to remodel the table and use the find but no result.

    Your best bet is to remodel a table 1 d do your seaching and use 'Quotient & rest' to convert location (index) in the table 1 d back to the index in table 2D. Use "Array Size" to get the number of rows and columns of the table 2D.

    The histogram only works on 1 d arrays.

    Or reshape a 1 d table. For each digit (0-9), use 'Search 1 D Array' twice. If the first 'search' finds a match (does not =-1), use the offset to start the 2nd search beyond the 1st index discovery. If 2nd 'search' returns-1, then one and the SAME time happens

    The index of the first 'search' to calculate the index (Quotient & rest") line and collar of the 2D array.

  • I use Windows 7 and even though I'm logged in as an administrator, I can't use any of the items that have the logo of the administrator beside them.

    I have a problem with the help of any item that requires to have the level of use of the administrator when you use the C: drive, who runs the Windows program. I am logged on as administrator and the screen shows me as one, but when I click on any of these items that I just get the hourglass that just stays there and nothing happens.

    The closure is often slow (7 to 10 minutes or more)

    I use a Toshiba laptop that came with a Windows disc. I can not get the ERD that I did for work.

    Sounds a little like a virus... but nothing for some.

    Try to run the System File Checker:

    http://support.Microsoft.com/kb/929833/en-us

    Also run a full scan of the system with your AntiVirus software.

    Let me know how it goes!

    Mithrandir

    Hello Mithrandir,

    Thanks for the suggestions. I had already done without success, but I did a scan of the entire computer again (without threats found). I was then able to run sfc/scannow, which reported no cases of violation of integrity. To my surprise, I was able to use the service administrator - but not for long.

    Later the same day I lost the function of administrator, but repeating the above got running again. The next day, I lost the function again and this time that the above did not work.

    While I had the opportunity to use the administrator function I created a second user as an administrator, so I went to that user to see if I could use that one - but no, who had also lost an officer.

    I checked the documentation that came with my Toshiba laptop, I remembered that there was some sort of possible recovery system, but I don't have a lot of attention to it when I got the laptop first. I found that by pressing F8 during the boot he took in what looked like a BACK based program that allowed me to do a system restore without being an administrator.

    I tried the most recent restore point, but it did not work. I went with each successive restore point, but all failed until I came to that before I installed Microsoft Silverlight. It worked and my laptop starts normally. For the last two days he works normally and shut down normally. sfc/scannow and an analysis of the entire system show no problems with viruses etc. So, it looks like the Silverlight installation caused the problem.

    I don't know if all laptops have this 'F8' facility, but for me, it meant a relatively quick fix (once I had remembered to this topic) in a situation which cannot be easily rectified through normal Windows programs.

    Thanks a lot for your help.

    Ste

  • Table of content items to be revealed when the learner is over each topic?

    We are still using Captivate 5. Is it possible in one of the versions Captivate to set up the table of contents so that a topic is active (available) in the table of contents only after the learner has completed pages in this topic?

    We envisage that a learner has not completed a topic, the name of the topic would say dimmed, which indicates that the learner could not confirm yet. But after one of the learner, it is available in the table of contents where he would like to return to this topic to examine something.

    It would be a means of encouraging learners to work through each page and not jump all the headings.

    Thank you!

    -Jan

    Hello

    That feature is not there in Captivate 5, but he's here in versions of Captivate of Captivate 5.5, then you will get in the last version of Captivate also (Captivate 7).

    The function is "Visited Navigate slides only" (you will need to check that) within the project framework > Table of contents > settings.

    This feature will allow you to do the same thing you mentioned in your query.

    Thank you.

  • How to access the table cell script plugin c labels

    Hello

    We have a plugin written in actionscript, which prepares data in labels of each cell in a row of a table, when the user has their cursor in this line:

    var: a cell = getSelectedCell();

    for each {(var childCell:Cell in cell.parentRow.cells)

    childCell.insertLabel (labelName, theString);

    }

    public function getSelectedCell (): cell

    {

    ...

    var selectedLayers:Array = doc.selection in the table;

    var selectedLayers = obj:Object [0];

    If (obj have PointInsertion! = null) {}

    var ip:InsertionPoint = obj as PointInsertion;

    If (ip.parent cell) {}

    return ip.parent as cell;

    }

    } else if (obj as cell! = null) {}

    return items as cell;

    }

    Returns a null value.

    }

    I am now writing a C plugin that needs to read data using IScriptLabel: once again, when the user has a cursor in the same row.

    My problem is that I can't find (via the C code) against that UIDRefs the labels would have been stored by the script that the table does not seem that the objects of the cell in the same way as the script only.

    Any ideas on how to get the relevant UIDRefs?

    Thank you

    I found the answer:

    1) go to SnpIterTableUseDictHier.cpp.

    (2) go to the function void SnpIterTableUseDictHier::inspectThreadDict (const InterfacePtr& textStoryThreadDict).

    (3) add this code after the line after the line InterfacePtrMyCell (textStoryThread, UseDefaultIID());

    #define Solutiontotheproblem 1

    #if Solutiontotheproblem

    InterfacePtr iscript (textStoryThread-> QueryParent (ScriptInfo::RequestContext ()), IScript::kDefaultIID);

    {if (iscript)}

    Tags IScriptLabel::ScriptLabelKeyValueList is iscript-> GetTags();.

    IScriptLabel::ScriptLabelKeyValueList:iterator iter;

    If (!) Tags.Size ())

    {

    PMString return ("no labels found.");

    returnVal.SetTranslatable (kFalse);

    }

    for (iter = tags.begin (); iter)< tags.end();="">

    {

    PMString returnVal ((*iter).) Key());

    Return +=("::");

    Return += ((*iter).) Value();

    CAlert::InformationAlert (returnVal);

    }

    }

    #endif

    (3) voila!

    Hope that helped. If your question is the answer, please mark my solution as correct

    I used this link for the answer. The main thing to find was finding what associated text interface was IScript is associated with.

  • remove the table select row

    Hello

    I'm trying to find a way to delete a selected line in a text file. You can find a classic text file that join this message.

    I first try to insert the text file in the command using node property value drop-down list box, but I see that the first line. I did the same thing with a command table and it works! Now, I need to select a row and delete it. I try to use the node property of the active cell, but I always get (0,0). Why? Someone knows how to do?

    Better idea to do the same task is also welcome.

    LabVIEW 8.5 windows XP

    Thank you

    Francis

    Hi Francis,.

    You should try using the attribute SelStart to the table rather than the property of the Active cell.  Active cell is just used to set the active cell.  Here is a quick change that I made to your code that deletes the selected table row when you press the button Delete and resulting out of the table.  I hope that you should get pointed in the right direction.

  • Insert tables in the tables

    Well, it is a Board problem.  I have an experience that changes the parameter 1 (temp), then parameter change 2 (v) a number of times, with data output.  the process is then repeated.  I would like to get a picture that looks like

    V1 T1 data table

    V2 T1 data table

    V3 T1 data table

    V1 T2 data table

    V2 T2 data table

    V3 T2 data table

    V1 T3 data table

    etc.

    'case 2' is my first attempt at implementation of the table in the data stream to write the file.  Clearly, this does not work and does not the data of the most recent temperature.

    'case 4' is my last attempt.  I enter all the data in a table, but it seems that it is an array of 3 - d when the schema specifies only 2D table.

    The problem is at the end of the block diagram.  Any advice on cleaning the other parts of the program are also accepted (Note: the interface should avoid visa - for reasons that I won't go in).  I'm sure it's a quick fix and thank you for taking the time to help me.

    Some ideas I had, but has failed to implement create a sub-table and inserting them in a main draw (4 cases).  Creation of 2D (outside the cycle of volt) tables and add them.  Insertion of simple elements in arrays of brute force (I know not how to do this, but there must be an easier way, it comes to Labview).

    Maybe you are frustrated to see the table reset with each iteration, showing that the current measure. Shift registers are your solutions:

    Of course, as Jorn wrote, if you have a large number of measures you should initialyze the table with the appropriate number and the use of 'replace' instead of 'Building the table', but it seems that this is not your case.

    LVM/TOC files are not Excel files, but can be imported using TDM Excel Add - In. In addition, you can write directly to Excel using automation or screw of Report Generation Toolkit, if you (search in the finder of the example excel).

Maybe you are looking for