Combination/Matrix Generation Automation?
Hi everyone:
The current problem in front of me is that I have a set of string elements, say N of them, while the task is to automatically generate ALL combinations with length ranging from 1 to (N-1). If, for example, given 'a, b, c, d', the following output is desirable:
a, b, c, d, e, ab, ac, ad, bc, bd, cd, abc, abd, acd, bcd
I attempted nested loops but so far unsuccessful unfortunately. How can this be done? Many thanks in advance!!
Regards,
Thanks for the URL. It lists what I basically want to
achieve...except the order should not matter in my
case, i.e. 'abc' = 'cba' and only 1 of the two should
stay. Can you please give out a bit more hints on
adjustment of the CombinationGenerator source code on
that link?Look at the first example on the link where the class is used. I tested using it for getting combinations of three characters with abcdef as input String. Here's the output I get.
abc
abd
abe
abf
acd
ace
acf
ade
adf
aef
bcd
bce
bcf
bde
bdf
bef
cde
cdf
cef
def
I think that's what you are expecting.
public class TestCombo {
public static void main(String[] args) {
char[] elements = {'a', 'b', 'c', 'd', 'e', 'f'};
int[] indices;
CombinationGenerator x = new CombinationGenerator (elements.length, 3);
StringBuffer combination;
while (x.hasMore ()) {
combination = new StringBuffer ();
indices = x.getNext ();
for (int i = 0; i < indices.length; i++) {
combination.append (elements[indices]);
System.out.println (combination.toString ());
Similar Messages
-
Is there a way to combine matrix data?
If anyone can, please help me. Linear algebra is not my
specialty.
I am trying to make a function using the BitmapData.hitTest()
to see if two sprites on screen are hit.
I have got it working for sprites that are direct siblings
(ie they are on the root stage layer). However, if I nest sprites,
things get messy. The reason I want to test nested objects is so I
can test for collision with *parts* of other visual components, not
the whole thing as one.
I can get a proper tx, ty value for nested sprites by using
the localToGlobal functions, but these do not take into
consideration rotation. Is there something like localToGlobal that
works for an object's entire transform matrix (and if not, why
not?!)?
Does anyone have any advice?
The only thing I can think of is to go through a given
sprite's parents until it reaches the top (root) layer and collect
the matrix data on the way. But even if I do that, I don't know how
to add the matrices together properly. I am convinced I need to do
this. If I don't use the actual transform matrix, I cannot take
into account skewing, rotation, etc.Well, I seem to have found a way to at least combine matrices
using the concat() method. Still, I have to cycle through each
parent matrix from the target sprite to the top level (stage) to
get a universal comparison. -
Combine PDF Pages automator step strips annotations
Oh, I was so excited when I noticed the Combine PDF Pages command in Automator.
Then I was less excited when I discovered that if any of the pages has annotations created in Acrobat Pro, those annotations are removed from the newly combined PDF.
Since Preview, for some strange reason, is not AppleScript-able, Automator is the only way I see to do this.
Acrobat is somewhat scriptable to a degree but does not have a combine PDFs command in the dictionary.
So, has anyone figured out a way to automate the merging of PDFs via a script, workflow, app, etc -- while RETAINING the annotations? I am triggering this from FileMaker as part of a work process we're developing, so manually merging the PDFs kind of defeats the purpose.
Anyone have any suggestions?
Thanks,
JeffFound It!
Ok, so it seems "insert pages" is in the Acrobat dictionary; I was looking for an equivelant of "Combine Files into Single PDF". Anyway, here's draft one of the script. I'll probably make it less clunky next week, but this is basically how it works:
set nFile to ""
set pCount to 0
set pdfList to {}
set pdfNameList to {}
set sourcePath to "SL:Users:joeuser:Desktop:fix ccd:Source:"
set targetPath to "SL:Users:joeuser:Desktop:fix ccd:Target:"
set coverFileName to "cover.pdf"
tell application "Finder"
move file (sourcePath & coverFileName) to folder targetPath
set my pdfList to every file in folder sourcePath
repeat with f in pdfList
set pdfNameList to pdfNameList & (name of f)
end repeat
end tell
tell application "Adobe Acrobat Pro"
--activate
open (my targetPath & my coverFileName) with invisible
set targetDoc to last document
set my pCount to (number of pages) of targetDoc
get my pdfNameList
repeat with f in my pdfNameList
set c to number of documents
open (sourcePath & f) with invisible
repeat until c < (number of documents)
end repeat
set newDoc to last document
set nPages to (number of pages) of newDoc
insert pages targetDoc after my pCount from newDoc starting with 1 number of pages nPages
set my pCount to (my pCount) + nPages
close newDoc
end repeat
save targetDoc
close targetDoc
end tell
tell application "Finder"
set f to file (my targetPath & my coverFileName)
set name of f to "New Merges PDF.pdf"
end tell -
How do I combine PDF's trough the Automator - Step for Step.... thx alot
Greets SimonSimply double-click or drag the "Combine PDF Pages" action from the "PDF" action library into your workflow. Then do the same for Finder's "Open Finder Items" action. Click File > Save As Plug-in, give it a name, confirm that it's a plug-in for Finder, and click Save.
Now whenever you control-click on a selected group of PDFs in Finder, you can click Automator > [your workflow] and it will open them as a combined document. -
Combining Workflows in Automator
I am trying to figure out if there is a way to combine workflows in Apple's Automator application. Basically I saved out the automation as an application and it works like this: I can drag a folder of images onto it and it scales and renames them. At the end of the automation I would like to trigger another workflow. The issue is that the previous workflows images are taken as input to the new workflow. How can I run multiple workflows without using the output of the previous workflow as the input for the current. Thanks
Is there some reason why the standard method - right-click on the Run Workflow action and choose Ignore Input from the popup - doesn't work?
-
Combining Text in Automator for Excel import.
I'm attempting to create an automator workflow that will string some text together so that it can be imported into an Excel worksheet. Here's my workflow so far.
• New Text File
Creates file temp.txt
• Run AppleScript
Opens file temp.txt
• Get Specified Text (specified text below)
Read Today
Read Tomorrow
Read This Week
Read This Month
• Filter Paragraphs (needed so the text is not treated as one big line of text and is displayed in the next step correctly)
Return Paragraphs that are not empty
• Choose from List (all 4 items displayed correctly, all selected by default)
Select one item
• Set Contents of TextEdit Document (temp.txt) (append)
• Get Specified Text (specified text below (a semi-colon))
• Set Contents of TextEdit Document (temp.txt) (append)
• Get Specified Text (specified text below)
keywords go here
• Set Contents of TextEdit Document (temp.txt) (append)
• Get Contents of TextEdit Document (results below)
Read Today
keywords go here"
(Once I get this part working, I will add a URL onto it also).
So, all my content has arrived here, but on three different lines. But because it is on three different lines, it does not import into Excel correctly. I can't concatenate this using the usual AppleScript method because I would have to declare these items as variables. I've tried various ideas, but I cannot get the three above to append to one line, like this…
Read Today;keywords go here
without manual intervention, which sort of defeats the reason for trying to automate this.
I hope I've explained this well enough that it makes sense.
Any help or ideas are appreciated.Well, it is good to know that it can be done in Applescript, though I have not found a way to accomplish this. All examples I have seen (Googling and AppleScript 1-2-3 book) use set statements using static strings, and then concatenating those statements together. Since my values are dynamic, those examples don't help.
What I have to work with are these lines of text in a new document.
Read Today
keywords go here
The text will vary from run to run.
What I need to end with is… (for use in Excel, import text files action)
Read Today;keywords go here (line1 & line2 & line3)
So, I don't know how to proceed from here, unless I can do something like set var1 to line1 of temp.txt, set var2 to line2 of temp.txt, etc. -
File system usage report chart generation - automated via reports and email
Hello,
I have requirement where I have to generate a monthly file system usage chart (just like a tablespace total_mb, used_mb, free_mb....) and mail it directly to the client.....
Any ideas or suggestions would be welcome....
Thanks,
S.It's a pretty open-ended question, because a number of things can be causing slow performance. You mention needing to look at ODBC connection performance - I found that using ODBC drivers for iSeries was very slow in the past. You might want to look at using the JDBC driver in the IBM JTOpen Toolkit - it made a big difference for us when we were querying iSeries in the past.
When you refer to "reports" in this thread's title, do you mean reports from ColdFusion Report Builder? Or to just ColdFusion .cfm pages? How complex are these reports? How much information is displayed, especially in tabular form? Just rendering huge HTML tables (as in thousands of rows of data) will often cause browsers to become temporarily unresponsive or hang. If you provide more details, we might better be able to target where the "pain point" really is.
-Carl V. -
Report generation only one time successfull
Hi @all,
we are facing the problem that the report generation process is only working one time successfully, the next time it ends with error. After restarting the service on the WWI server the next generation is successfull, but the second one will be "Error" again.
Does anybody faced this issue before and can provide a solution?
Thank you in advance for all contributions!!!
Best regards,
Christoph
PS: in the meantime we created the respective service again on the server - no result, still only one successfull run at a time.
Edited by: Christoph Giehl on Sep 6, 2011 5:18 PMHello Christoph
we never have had similar problems. May be these hints might help:
a.) check wich generation server is used during the generation and if any of the potential servers "stop" (WWI process does not proceed etc as explained by you).
b.) check if "report from template" works (assuming that use use the "old" fashioned client WWI version) => if this works than there might be a problem with SAP <=> connection (RFC) ...
c.) check please if only this WWI report (more precisely combination of generation variant and language) gives result to the "crash" of WWI process and no other one => in this case you should check WWI template
Reading you explanation I assume:
1.) there was no change in SAP set up
2.) there was no change in WWI set up (number of servers, WWI version etc.)
and we are talking (??) about a new generation variant/language combination which has never been used before (?).
With best regards
C.B.
PS: Check Marketplace. You will fond there an OSS note called "WWI Cookbook" and furthere related OSS notes poviding FAQs etc. regarding WWI topics.
Edited by: Christoph Bergemann on Sep 6, 2011 9:00 PM -
Document for PPDS Optimizer Setup Matrix
Dear All,
Can I have a document or an implementation guide for PPDS Optimizer Setup Matrix?
I have already checked the SAP help and Certification Material about this topic. But there is no more information on this topic. It will be great if you provide a document where I can learn from the scratch.
Thanks a lot.
Regards,
Ram.Hi Ram,
See wiki page:
General PPDS wiki page
http://wiki.sdn.sap.com/wiki/display/SCM/APO-PPDS
Setup Matrix Generation in a Complex Manufacturing Evironment
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00a618c4-8aad-2b10-6ebb-f70cb4470195
Oficial doc
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00a618c4-8aad-2b10-6ebb-f70cb4470195?quicklink=index&overridelayout=true
Hope this help.
Luiz Giani -
Generate automation from Environment ?
Is it possible to generation automation from within the Environment ?
I've set up a rather extensive Environment for mapping MIDI footswitch commands into Logic, using cable switchers, transformers, and faders to bypass, mute, control faders, etc. This is for live use, so I need everything to happen in real-time.
It's all working great, but I'd like to control a few things in plug-ins that aren't accessible via MIDI--in particular, the stomp box bypasses in Amplitube2.
I could use controller assignments to perform these actions, but it wouldn't work well with the rest of my Environment, since I use cable switchers to route MIDI to different places--a controller assignment would intercept ALL messages from that controller, so I couldn't use the controller for other functions.
The controls I need are easily accessible via automation--is there any way to use the Environment to generate automation data ? Maybe with SysEx or Meta events ? What I'd like to do is create a transformer that turns a controller message into an automation event that I can route into a particular object (Amplitube on an insert).
Possible ?
Thanks for any help!
James
[email protected]The other thing you could try is to record your
MIDI-based "automation" and then use the Options >
Automation function to convert region automation to
track automation. See how that works.
Cool! This worked. When I moved the controls in the plug-in, I didn't get any output from the fader, so I assumed there was no MIDI-like info related.
But... as you suggested... I created track automation, converted to region automation, copied the data from the Event Editor, and pasted into an Environment fader as SysEx... bingo! Works great!
That is, as long as I've got the Environment...
Thanks, again, iS!
James
[email protected] -
Linking Keys to Automator Applications
Is it possible to link a key (or key combination) to an Automator Application if the key is not currently assigned to something else? Many PCs have Internet Connect buttons, and I’d like to set up my “Home” key to do the same since it currently does nothing when pressed. If that isn't possbile, I'd at least like to have a key combination that could lauch Automator when it is needed.
You have some flexibility within the Keyboard and Mouse panel of System Preferences but I have done a search at VersionTracker and found lots of them.
http://www.versiontracker.com/php/search.php?mode=basic&action=search&str=hot+ke ys&srchArea=mac%7Cosx&x=0&y=0
I personally use Spark and find it works fine. -
I loaded some projects that we're created in logic 7 and was going to edit them using some of the new features in 8. the first thing I notice is that all of my aux sends are still going to logic 7 style busses ( no aux sends on these busses !). Is there an easy way to change this? I have automation on a lot of these tracks and was wondering if there was an easy way to do thiswith out having to create new aux tracks and copy all my automation over.
ThanksWell if you leave the automated Busses as they are but assign them to Auxes (select the Bus as an Input for the Aux in the second slot above the channelfader - before that turn Bus output to "no output" other wise the signal doubles) you can use the sends on the Auxes in combination with the automated Busses.
Was I clear enough? -
I'm looking for a document management system
Hi there,
I'm looking for a way to organize, sort, and make searchable about 1200 Microsoft Word Documents. The way our company uses them is to search for individual documents, and also to group them to create customized packets that are used for training.
Once a group is created, I need a way to print easily. The other problem is that 60% of the documents are designed for learning so they have an instructors filled in part, and a learners blank part.
Question 1: Should I separate each document, make the instructor version a separate file? Today, it is one file, with page 1 for the instructor and page 2 for the learner (some docs have more than one page.
Question 2: Does anyone know of a web plugin or app that will take a collection of word documents, and automatically combine them into 1?
2 years ago, we created a php searchable system and uploaded all docs into it. It workds pretty well for organizing, searching, grouping, and adding comments about the docs... BUT when it comes time to print, it only downloads a folder filled with all the SEPARATE word files. They are numbered, but because they are not one doc, page numbering is a bear, and each doc has a instructor and learner page... for printing, the trainer needs to tell the office staff which page to print for each handout. the instructor copy or leaner copy. Once a master is made, we photocopy it. So the question: Is there an easier way to create 1 file with all the pages? Like convert to PDF or to a single MS Word document?
Any suggestions are welcome!
PS: while we are an all mac shop, we do have a dedicated webserver running linux that we could use.
PPS: I will have interns this summer, so if the solution involves converting all of our MS word docs into something else like pages, I'm all for it...It sounds to me like DevonThink might just replace the php system that you already have.
One way to tackle this might be to look at automating the combining process, rather than changing the overall management system. Various thoughts:
If the docs were pdfs, a program like CombinePDFs would let you drag and drop all the files onto a screen, re-order them if necessary, and then hit Merge (actually, I think Preview would let you do this, in Leopard). That might help. However, I don't think it would put on page numbers.
I'm pretty sure Acrobat would let you combine the PDFs and add page numbers, or perhaps take the combined pdf file and just add page numbers to that. (Not sure if this might require Acrobat for Windows)
Alternatively, you could tweak the docs themselves so that they use a form of chapter numbering, eg: "PDF Introduction-1, PDF Introduction-2" and "PDF-Advanced-1, PDF-Advanced 2" and then not worry about the page numbers. I wouldn't exactly recommend this, as it's pretty useless to say "turn to page PDF-Intermediate 3" and have people find that page, but it's been done.
Since they are already Word docs, though, it might be best to stick with Word. Word 2008 has Automator and Applescript, and it should be possible to write an Automator or Applescript such you just drop the documents on an Automator app, and it combines them, adds or updates the page numbers, maybe creates a Table of Contents, and spits out an assembled document.
That said, I don't know how to do that. There is a Combine Word Documents automator action, certainly. You could try asking over in the Word forums:
http://www.officeformac.com/ProductForums/Word/
Or here's a macro that should work in Word 2004 (but not 2008)
http://www.gaebler.com/How-to-Combine-Multiple-Word-Documents-into-One-Document. htm
This will work best if all the docs are formatted consistently, based on the same template. If they are not consistently formatted, then the formatting will probably change when you combine them in Word, and that would be an argument for converting them to PDF before combining them. It should also be possible to create an Automator action that will convert all the docs in a folder to PDF.
I doubt there is going to be anyway to automate the instructor/learner copy--someone will have to do that manually, but it does suggest that if you create separate files for each one, it will be easier to do the search, download the found files from the resulting folder, and then manually just delete the learner file from the folder rather than having to open up the instructor file and delete part of it.
So, some potential experiments to try. Hope that helps.
Automator to convert the docs to PDF and then Acrobat to combine and number the pages might be your best bet. -
Compose/Edit Locally then publish to SharePoint Site
Sorry for the cross-posting ... This applies to both/either SP 2010 or 2013
Here is our current process.
Our Technical Writer creates MSWord-document job-aids with headings, tables, lists and screenshots to show the steps to complete common procedures (e.g. How to fill out an expense report). Screenshots are captured and altered using desktop software,
then pasted into the Word file.
The document is saved locally, converted to PDF and the PDF saved to a SharePoint Document Library
Either:
Users visit our internal company SharePoint site Document Library and download the PDF Documents, or
We send out links to documents in newsletters, personal emails or Lync chats
In the past, these documents would have also been printed, bound together and used as part of training. We are quickly progressing past that paradigm. Our users are much more comfortable with accessing documentation online. I want to get
out of the "PDF" and printing business all together.
We have looked into re-creating all of these job-aids in SharePoint's KnowledgeBase template but due to the significant number of screenshots that we employ having to save each screenshot separately, upload to a folder, then to embed in the Knowledgebase
template article is a significant increase in total effort.
Ultimately what I want is a solution where:
Our Technical Writer can create a procedure locally including cut/paste images
The procedure can be saved/published to our SharePoint site with images being named/saved/uploaded automatically
Users can search/browse/link to the procedure
If changes need to be made, the Technical writer can open it in the local application (return to Step 1).
Having some workflow (such as copy editing or manager approval stages), user ratings/comments, metadata/keywords, etc. would be icing on the cake.
In the "old days" I would be able to crack open Adobe Dreamweaver or MSFrontPage, set up a site template and do almost all of this except the images still had to be saved first -- but that was when there were a million variables in terms of the
webserver. With a fully integrated Microsoft set of tools, I am hoping there is some combination of Sharepoint, Word, Sharepoint Designer and/or InfoPath that can meet my needs.
BTW, we are currently using SharePoint 2007, but will be upgrading to 2013 soon (OR I can migrate to SP2010 if it will work, too) -- which if I can find a workable solution, I can start budgeting my team's time for the migration to a new paradigm. Thankslots of options here. first, you could just use publishing and then the only thing standard users can view are published documents, whereas site owners can edit pages/documents and work with the unpublished draft and publish when wanted.
also, if you want to automate the word-pdf process, 2010/2013 have word automation service app. the demo and code sample for using automation services is a snippet that does word-pdf conversions:
http://msdn.microsoft.com/en-us/library/office/ff181518(v=office.14).aspx
ideally, in 2013, you have cross site publishing abilities. you could basically allow your writer to edit the list items in the source site and when published, they are presented in any way you like using display templates on the destination:
http://technet.microsoft.com/en-us/library/jj635883(v=office.15).aspx
...realistically, for your current process, I think just enabling publishing would work for what you want. sharepoint only indexes fully published content and users only see published content (unless they have perms ot edit it), so it should work great.
combined with word automation(requires 2010+, but the same code/config either way), you could keep the docs as pdfs for archival purposes if desired. although sharepoint will keep previous versions if you want, so keeping the pdfs for archive isn't as
necessary.
Christopher Webb | Microsoft Certified Master: SharePoint 2010 | Microsoft Certified Solutions Master: SharePoint Charter | Microsoft Certified Trainer| http://christophermichaelwebb.com -
Equivalent tables for MARA, MAKT and MCH1 in the EWM system
Hi,
I would like to construct a report using the existing tables in EWM. But it turns out that it's somewhat different from the ECC system.
The material tables, MARA and MAKT and the batch table, MCH1 table are not there. I need the material number( like MARA-MATNR), material description/name(MAKT-MAKTX), the division ( MARA-SPART) and the batch number(MCH1-CHARG) and expiration date(MCH1-VFDAT).
Could someone provide the EWM equivalent for these tables and fields?
Thank you.
Best Regards,Table Name Short text
/SAPAPO/MAT_MTRX Matrices for Rules of Matrix Generation
/SAPAPO/MAT_RULE Rules for Setup Matrix Generation
/SAPAPO/MATAPN Alternative Product Number
/SAPAPO/MATBOD Product BOD Assignment
/SAPAPO/MATEXEC Product: Execution Data
/SAPAPO/MATGPVAL Product Group Values
/SAPAPO/MATGROUP Product Grouping
/SAPAPO/MATINFO Product Information
/SAPAPO/MATKEY Product
/SAPAPO/MATLANE TS: Master Data Table Product/Lane
/SAPAPO/MATLARES TS: Master Data Table Product/Lane/Resourc
/SAPAPO/MATLCP Materials Lifecycle Stages
/SAPAPO/MATLOC Location Product
/SAPAPO/MATLOCPR Partner-Dependent Location Product Attribu
/SAPAPO/MATLOCTD Time-Dependent Location Product Fields
/SAPAPO/MATLORES TS: Master Data Table Product/Location/Res
/SAPAPO/MATLOTSZ Lot Sizes & Days' Supplies for Material Ma
/SAPAPO/MATLPL Location Product Planner (with Planner Typ
/SAPAPO/MATLSIM Location Product with Planning Version
/SAPAPO/MATLSINH Location Product with Inheritance
/SAPAPO/MATLSPP SPP Relevant Location Product Attributes
/SAPAPO/MATLWH Location Product for Location Warehouse
/SAPAPO/MATLWHST Location Product for Location Whse and Sub
/SAPAPO/MATMAP Mapping Table for Products
/SAPAPO/MATMOD Model assignment of location product
/SAPAPO/MATNR_V MATNR for Foreign Key Checks
/SAPAPO/MATPACK Product: Packing/Packaging Data
/SAPAPO/MATPPM TS: Master Data Table Product/PPM
/SAPAPO/MATPRIO Product Priority Time & Version-Dependent
/SAPAPO/MATPRMRM Alternative units of measure for partner p
/SAPAPO/MATPRT Partner Product Master Data
/SAPAPO/MATPRTXT Partner product description
/SAPAPO/MATRELH Product-Relevant Hierarchies and Hierarchy
/SAPAPO/MATREPC Replenishment Control
/SAPAPO/MATREPCT Replenishment Control
/SAPAPO/MATRES TS: Master Data Table Location/Resource
/SAPAPO/MATRGPT Product Regional Pattern Assignment
/SAPAPO/MATRQ Requirement Profile in Material Master
/SAPAPO/MATRULET Text Table of Rules for Setup Matrix Gener
/SAPAPO/MATSBOD Product BOD Assignment with Planning Versi
/SAPAPO/MATSTOCK Stock Information
/SAPAPO/MATTXT Material Descriptions
Maybe you are looking for
-
Can no longer access home movies from imovie theater on atv. Keep seeing the circle while waiting.
-
I can't get Illustrator CC to launch
I can't get Illustrator to launch. It just bounces in the dock. I've also tried launching straight out of the Application folder, the same thing. I also tried updating it through the App Manager, and this hasn't made any difference. Thanks
-
Java Install, Cannot insert a key value pair into the secure store fails,
Dear All, I'm doing Java Intallaion in BI7 on CI and in the midle of installtions we encounter, TRACE [iaxxejsexp.cpp:199] EJS_Installer::writeTraceToLogBook() NWException thrown: nw.secureStore.cannotInsertIntoSecureStore: Cannot ins
-
DMVPN w/ Multicasting setup/questions
Hello I have a lot of questions, so bare with me as i puke them out of my head. I have been doing some testing with DMVPN inconjuction with multicasting video (Hub and spoke, w/ no spoke to spoke). The test setup is using 2 cisco 2811 w/out the vpn m
-
ActiveDirectory module doesn't support Contacts in Distribution Groups
Hi, In my AD I have several groups, of the Distribution type, whose members are a combination of Contact objects and other Distribution groups. If I use the Get-ADGroupMember cmdlet, the members which are Contact objects are not returned. If I use th