combine two matrices

Hi all

1. I want to combine two matrices with the help of the loop.

2 remove duplication

Combine myParray and myCarray.

~ var myFinal = myParray.concat (myCarray)

~ alert ("myFinal:" + myFinal)

var myDoc = app.activeDocument;

var myPStyles = myDoc.allParagraphStyles;

myParray = new Array();

for(i=0; i<myPStyles.length; i++)
{
    myParray.push(myPStyles[i])
    }
alert("myParray: " + myParray)

var myCstyles = myDoc.allCharacterStyles;
myCarray = new Array();

for(k=0; k<myCstyles.length; k++)
{
    myCarray.push(myCstyles[k])
    }

alert("myCarray: " + myCarray)

//Combine Two Arrays

for(i=0; i<myParray.length; i++)
{
    for(k=0; k<myCarray.length; k++)
    {
        myParray[i].push(myCarray[k])
        }
    }

alert("myFinalParray: " + myParray)    //Need output here

Thank you

Beginner_X

var doc = app.activeDocument,
        psNames = doc.paragraphStyles.everyItem().name,
        csNames= doc.characterStyles.everyItem().name,
        allNames = [],
        allNames0 = {},
        z = 0, n, lp = psNames.length, lc = csNames.length;
while (lp--) allNames0[psNames[lp]] = psNames[lp];
while (lc--) allNames0[csNames[lc]] = csNames[lc];
for (n in allNames0) allNames[z++] = allNames0[n];
allNames.reverse();
alert (allNames.join("\r"));

Tags: InDesign

Similar Questions

  • Combine two matrices to a string and save in file

    Hello

    I am trying to record a picture 2D data as well as the time stamp of a .txt file event. I've formatted each table (table 2D and table of channels time stamp), and then I write it to file. The result of the combination is bad, the time stamp should be in a column of its own instead of at the bottom of the file. How can I fix?

    Thank you

    So I would propose to convert the table of data in an array of strings 2D 2D (using the desired number of string function). Then add the timestamp (in the format of both string) column to table 2D. Then use the table to a string of spreadsheet on the 2D string array.

  • How can I multiply two matrices together in number?

    How can I multiply two matrices together in number?

    Well, there is a function in numbers call sumproduct() that can help you.  Post a screenshot of what you will help us to better help you.

    real matrix operations are not supported in number.

  • Combine two jpg images

    I try to combine two JPGs as two PDF files into one.

    I have a PDF file with more pages and just add a page at the end. It seems to work. And when I save me it also includes the addition of the page.

    However, I'm now trying to merge two files jpg in the same style. This doesn't seem to work. Why?

    Thank you

    With the help of Pages ' 09 v4.3, you can combine two images, select both, group them, copy to the Clipboard and select new in the Clipboard in preview. They are now in PDF in preview, where you can save, export to other formats or copy/paste in Pages in PDF format.

    I reference the older Pages, because in the Pages v5.6.2, your travel Pages from the Clipboard to the product overview a file of Graphics PNG 72 dpi - not PDF and not the two combined images JPG.

    If you don't have a Pages ' 09 v4.3, you should combine your images in a graphics program dedicated (for example GIMP (free), Photoshop, designer of affinity, etc.).

    You cannot combine images in preview, as you can the PDF. The combination of the image seems to work until you save and view this content, to see that it did not work after all.

  • How to combine two user accounts

    I created a user account on my new MBP (os x 10.11.3) before using the migration assistant to transfer the data from my old MBP.

    Now I have 2 user accounts I need to merge into one

    Any advice for how to fix the welcome.

    THX & br - gerhard

    lookie here

    Combine two + accounts on the same machine

  • combine two daq physical channels in a single task

    Hi all!

    I use a PCI-6120 with a BNC-2120 to generate two signals: one is used to control an optical device which must be characterized, and the other signal is sent to a digital video camera to trigger the acquisition so that it is synchronized with the first signal. Everything is controlled with Labview.

    I want to give the possibility to the user to choose which channel to use for the first signal and channel to use for the second signal, depending on how the devices connected to the BNC-2120. So I would like to put two different "physical channel" screws on the Labview command window.

    My question is:

    What I need to create two different tasks to the signals to be generated on the appropriate channel, or can I combine two channels (and how?) think I handle only a single task to two channels always but do not forget that each signal is generated on the corerct channel, depending on the channel selected for each of the two signals...?

    Thanks a lot for your answers.

    Nice day.

    Luke

    Hi LucG,

    If you use only a single Council to create only a single task for two generations.

    You can choose several channels by clicking on "Restaurants" in the channel control physical choice multiple channels thanks ctr + click, or by concatenating multiple channels with a comma as on arrival at the VI.

    Then, when you provide data to the VI of writing, the data should be organized in a table, each channel is on a line and the order of the channels is the same as in the control of the physical channels.

    I hope this can help!

    Thank you

  • Combine two tables 1 d in a 2D array

    Hi all

    Maybe I forget what is obvious, but I can't find a solution to combine two tables 1 d in a 2D array AND (it is the impossible part for me) using the tables columns instead of lines.

    Example:

    Table 1:1, 2, 3, 4

    Table 2:5, 6, 7, 8

    Result: 1, 5

    2, 6

    3, 7

    4, 8

    The 'build array' function seems to add all tables as lines... I guess I could transpose the table, but I want it runs in a Subvi in constructions of different loop and I feel a little uncomfortable with it - I guess one would be left with a completely mixed table. I was maybe blind just to find the right function?

    Cheers, Jessi

    Hi Jessi,

    by default, LV is combining tables in rows. So when you need columns you must transpose the sets or use a different indexing scheme...

  • If I have two modems in the same office... windows xp can combine two connections at higher speed dial... my question is can I do the same thing for the dsl if I have two lan cards?

    If I have two modems in the same office... windows xp can combine two connections at higher speed dial... my question is can I do the same thing for the dsl if I have two lan cards?

    Hi cliffwho

    You can fill with connections to the LAN. However I recommend you read this first to understand what it is that you do. I hope this helps.
  • How to combine two video projects in Windows Movie Maker?

    How to combine two projects?

    I started a project and I would like to import and more old project to combine.

    I guess that you are referring to the project .mswmm files?

    The following steps may be worth a try:

    Reach... File / open project... Select a project file.
    When the project appears on the timeline... go to...
    Edition / select all.

    Open a different project... to... Editing / paste.

    Now the content of the two projects should be on
    the chronology.

    To add more doing the same thing...

    Edition / select all... open a project... Editing / paste

    Another method would be to publish (save) each
    the project in film WMV format and then re-import
    both WMV clips and slide both to the
    timeline. Then, you could publish it as a simple video.

  • Can I download the Stock Images I paid for to photo sites such as imgur of sharing and so on, so that I declare that copyright law and they are not downloadable etc.? Secondly, can I modify Stock photos, for example the combination two photos, change temp

    Can I download the Stock Images I paid for to photo sites such as imgur of sharing and so on, so that I declare that copyright law and they are not downloadable etc.? Secondly, can I modify Stock photos, for example the combination two photos, change templates?

    Hello

    Please see Stock Licensing & conditions FAQ: where can I find the terms and the license information for Adobe Stock?

    Hope that helps!

    Kind regards

    Sheena

  • How can I combine two PDF files on the same page?

    How can I combine two PDF files on the same page? Please share any ideas you may have. Thank you.

    The term for what you want to do is called "page imposition.  There are third party tools that can do it for you like this: quite large: home page

  • Need to combine two .ai docs in Illustrator CS6... help!

    Hello.  I would like to combine two existing .ai into one docs.

    I know that you can create a new document with several work plans for a document of several pages, but I don't want to recreate the two pages from scratch.

    How can I take two pages full .ai and combine them into a single document of two pages?

    Thank you!

    It is in the drop down palette layers

  • Can combine two separate the AE project files to become a 'real' individual project?

    Can combine two separate the AE project files to become a 'real' individual project? I know that you can import a project into AE. But if you delete the original project your imported (outside), you also delete the project imported into your new project. I could have sworn there was a script or function that does this somewhere...

    Any help would be greatly apprecated.

    Thank you

    Thanks Rick,

    Bad choice of words on my part that I meant what you just described. Thanks for your clarification. However, I found the script I mentioned that if anyone is interested. It's called rd_MergeProjects

    http://Provideocoalition.com/mchristiansen/story/after_effects_script_of_the_week_rd_merge projects

    Kind regards

    Louis

  • How to combine two annexes to function as one in a single file

    I don't know how to combine two calendars in a single file. I want to eliminate the process of selection of the two annexes and pulling them upward at the same time. They need to exist as a single file. I do this using the export and import function? Copy paste perhaps? Your help will be very appreciated.

    Thank you

    You can export a calendar in a SET, then import it back and add, in the second schedule. In order to develop more... you have two appendices A and B. Export to a file SET. Open B, then import the x from A to B. Under Options project to import in the import, import action Wizard, choose Add in the existing project.

    I hope this helps!

  • combine two conditions

    Hello

    I want to combine two conditions. For example:


    var a = this.getField("ComboBox").value;
    var b = this.getField("ComboBox1").value;

    If (a == 1, b == 1) this.getField("Text").value = "1";
    If (a == 1, b == 2) this.getField("Text").value = '2 ';

    ...

    If (a == 2, b == 1) this.getField("Text").value = '3 '.
    If (a == 2, b == 2) this.getField("Text").value = '4 ';
    ...

    ...

    where is the problem?

    Is

    If (a == 1 + b == 1) this.getField("Text").value = "1";

    right?

    Thanks in advance for helping me!

    If (a == 1 & b == 1)...

    etc.

Maybe you are looking for

  • iMac in suspension after restoring from Time Machine

    Sorry - closed my previous thread by mistake then publish again for assistance: Hi - I had a late 2012 27 "IMac El Capitan 10.11.4 A few days ago a reboot is required after (I think) an upgrade of the El Capitan, but the machine hanging after the reb

  • RadioButton

    HY all, I have a small question about the RadioButton control. How can I call a radiobutton to an another dlg. I have a file SOUTH, 2 GSD and 2 radiobutton controls, 1 radiobutton on a GSD and an another radiobutton on other Dlg, and I want to use a

  • How to open/access my web cam in windows 8.1? (yoga of lenovo 13)

  • microSD and integration internal memory

    Hello I wanted to know if we can play the mixed songs of microSD + total internal memory in the same joint session. If the songs/playlists in the microSD space have the same reading and navigation also has available for songs to internal memory. (The

  • Screensavers included with Windows Vista Home Premium?

    My motherboard is dead, so I want to find the screensavers and put them on my new computer.  I found Aurora, but I don't know the names of the other screen savers that were on my computer Windows Vista Home Premium.  I just need a list of the names o