What's the best way to coordinate loading multiple modules.

I have a number of resource modules that I'd like to load before loading my main UI module.
I'm doing this now, but to make sure that everything loaded OK, I need to have a chain of Event.COMPLETE callbacks for every resource module load.
In other (threaded) languages, I'd set a flag and run a wait on my main loop before loading the UI module.
Is there a good compact way to wait for n modules to load in Flex?

I don't think you need a chain if load order doesn't matter.  Just keep a
Dictionary of them and remove them from the Dictionary as they load.  Then
run a quick test of the Dictionary has any items left.

Similar Messages

  • In Acrobat Professional 8, what is the best way to insert/combine multiple pdf's together in a large

    In Acrobat Professional 8, what is the best way to insert/combine multiple pdf's together in a large volume?
    We have 300 pdf reports and need to insert a 2 page cover page infront of each report. Not sure if Batch processing is best???
    Thanks for any tips.

    Probably each cover page is different too. I would probably just bite the bullet and do each individually. I would create the 2 cover pages in WORD or other word processor and print to cover.pdf. Then open a PDF and Pages>Insert Pages or the cover.pdf to the front of the open PDF and save as to the current PDF. Then repeat 299 times. Each time you would make the appropriate change to the DOC file and print a new cover.pdf file (you might want to turn off open in Acrobat for this processing in the printer properties to save time). Probably a good idea to keep a list of the files to check off what has been done (you can generate a list in DOS by Start>cmd, change the directory to your location [cd path], and do "dir >>list.txt". That will give you a list to use.). There may be an easier way, but by the time you get it figured out you might be done this way.

  • What is the best way to work on multiple songs in one long recording?

    I often record the local open-mic nights and generally just leave logic recording the entire night so i end up with lots of songs/bands in one big recording.
    What is the best way to work with such a recording? Is there a better way than just using the event marker when a new band plays?
    Also once i get home id like to save each band to a separate project but i cant seem to find an easy way to do this?
    Obviously each band needs a different mix hence needing separate projects? or am i missing a much better work method?
    any help greatly appreciated!
    many thanks

    As for your second point, just do a "save as" new file name and cut and erase any unwanted audio from the arrange window (ie. the bits that aren't in the song you want separate). You can do this for as many songs as there are and create a different mix for each one no problem. You multiple select and drag all the regions to the beginning of the arrange window (make sure you do them at the same time so's they don't go out of synch. All the separate songs and mixes can be saved in the same project folder as the original audio files are stored in (the folder structure should be there already if you started a new logic project, so no need to change that.
    I would think using markers so you know where each song begins during the show, and the above method after, would be a very good way of organizing things. You may want to stop actually recording between bands too though I expect you are already doing this.
    Its really as easy as that. Sometimes things just are.

  • What is the best way to set up multiple Apple devices ?

    Lime many of us here I have quite a few apple devices and I just wondered whet the best way to set them up with itunes / Apple
    my Apple gear:
    Mac mini 2.53 with Mountain Lion
    Mac Mini 1.6 duo Snow Leopard
    Iphone 5c (mine) running 8
    Iphone 5c (wifes) running 8
    iPad 2 (old)  64 GB  running 8
    iPad Mini 2 retina  32 GB running 7
    g3 iMac (running Tiger) Juke box (semi retired ;-) now)
    At the moment all devices (apart from new Mac mini 2 and the old G3) are set up under my Apple ID ... (1 Apple ID for all devices) ... obviously this has problems : my wife downloads an App it will appear on my phone; we have had to disable some of the messaging systems as at one point my wife was getting my messages et ... is there a better way to do this? 

    cosmiconion wrote:
    one drawback of same Apple ID for store is that what she downloads will automatically appear on all devices
    Do you mean the visibility of the purchase in the App Store (under purchases) or the installation of the app automatically on the other devices?
    In the App Store on the device (under iOS 8 at least on the iPad, I couldn't get it to work on my iPhone 5 under iOS 8), you can hide purchases...just swipe it to the left in the Purchased list. You can then unhide the hidden purchase(s) if desired by using iTunes on the PC/Mac under your iTunes account.
    Auto App updates (Automatic Downloads) can be controlled under: Settings/iTunes & App Store, scroll down to Automatic Downloads and disable those that you do not want.

  • What is the best way to handle executing multiple packages from the Agent?

    I have several packages that have to be executed in sequence. I thought the best way to do that was by creating a job for each package then have a master job that executes the other packages. In my master job,  I'm using sp_start_job to call the other
    jobs. The problem is, the master job moves from step to step without waiting for the child jobs to finish; basically they all execute together.
    That is the way I've seen it done in other places so I feel like I'm doing something wrong. In the alternative, I know it's possible to set the individual steps up so they execute the packages directly without calling an external job. I prefer the first
    way though.
    Which way should I jump on this?

    So basically what I'm hearing is just call the packages in a mulit step job. Creating a master package and calling child packages sounds a little crazy and unscaleable especially considering that the packages have master child relationships
    within themselves. It's SSIS Package Inception. 
    Sorry whats the issue with that?
    Provided you're setting the package sequence correctly based on your dependency it will work fine as loop gets iterated based on how you set the package list.
    What we have is a audit and control mechanism which even have details on the dependency so based dependency set only the packages gets ordered and listed for the loop to iterate through and executing. Also tomorrow if a new package comes into being, all
    it takes for us is to tweak the audit table to add a new entry for the package and set the dependency and it will continue to work fine including the new package without touching the existing job for any modification whatsoever.
    Another advantage of this table is we also capture audit details in it like date when package got last executed, its status of execution,rows processed (insert,modified, deleted) etc which can be used for easy monitoring of the data processing tasks as well.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • What is the best way to write management pack modules?

    i have written many modules using powershell script but when i deploy that management pack on SCOM it is throwing so many errors saying powershell script has dropped due to timeout.
    My Mp has lot of powershell script which gets the data from the service which executes for each and every instance the mp certainly has around 265 Instances and the powershell have to execute for each and every instance.
    how can i improve the scripts?
    do i need to use someother scripting language like javascript or VBScript in the management pack to execute different modules.
    what is the best practice to write Modules
    i have useed even the cookdown for multi instance data gathering
    Thanks & Regards, Suresh Gaddam

    One thing you have not mentioned is how you are consuming the data after you save it.  Your solution should be compatible with whatever software you are using at both ends.
    Your data rate (40kS/s) is relatively slow.  You can achieve it using just about any format from ASCII, to raw binary and TDMS, provided you keep your file open and close operations out of the write loop.  I would recommend a producer/consumer architecture to decouple the data collection from the data writing.  This may not be necessary at the low rates you are using, but it is good practice and would enable you to scale to hardware limited speeds.
    TDMS was designed for logging and is a safe format (<fullDisclosure> I am a National Instruments employee </fullDisclosure> ).  If you are worried about power failures, you should flush it after every write operation, since TDMS can buffer data and write it in larger chunks to give better performance and smaller file sizes.  This will make it slower, but should not be an issue at your write speeds.  Make sure you read up on the use of TDMS and how and when it buffers data so you can make sure your implementation does what you would like it to do.
    If you have further questions, let us know.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • What is the best way to repeatedly load random commercials?

    Hi Everyone,
    Any help with the above question would be useful.  Here's my end goal: I want to display commercials on a screen at my wife's bakery.  The script should load one commercial, play it, then unload it, randomly load another, and so on.
    I am completely new to as3 and have unsuccessfully been following several online tutorials.  My first attempt had code in each commercial file (swf), that randomly called up another commercial, which in turn called up another file, and so on--but this became a memory hog and crashed the program after a few minutes.
    Since then I have created one main swf file that loads an xml file, which holds all the information for the commercials.  However, when the swf commercials are loaded according to the xml file, they don't play properly: when the first commercial finishes playing, the next one is already partially done.  Obviously it started playing earlier.  The swfs should unload and load the next according to a timer, with the length of the timer being different for each swf according to the xml data.  Even with this, the first swf didn't always stop when it should.  My code is getting complicated and the display looks sloppy.
    I think something like this should be a simple way to display media such as these commercials, but I still haven't found a working solution.  Now I'm wondering if I'm even approaching this wisely.
    Would it be better to convert the swf to flv and create an flv player that has 'continuous play' and 'shuffle' features?  Would it be better to convert each swf into movieclips and put them all into one swf?  (I like the manageability of using an external xml file; I will be adding and removing commercials frequently and want to keep this as simple as possible.)
    Please let me know what you think is the wisest approach and refer me to any relevant tutorials.
    Peace,
    Trevor

    Thanks again kglad,
    I followed your advice, but it is still not working properly.  Here's my problem:
    The external swfs continue playing in the background.  Consequently, the event "playcomplete" was dispatched not only at the end of the swf that is being shown, but also at the end of the looping, previously loaded swfs that are not visible; this made the next swf play before the one being shown finished.  That seemed easy enough to fix by adding stop(); to each external swf on the last frame.  I thought everything was fixed -- but those swfs must still be there and are hogging memory before they can be collected for garbage. I've developed a loop that continues to load swfs, taking more and more memory, eventually causing a crash.  So:
    After a swf is loaded, how do I completely remove it to free up memory?  I'll attach the code I'm using, but I've made some adjustments to your previous examples (using a string with a random number instead of an array, using different variable names, etc).  Would I still have this memory problem if I used an array?  I have tried to remove eventListeners, to use weak eventListeners, and to remove the loaded Child as best as I know how, but I need some guidance on memory management before I can use this.
    Peace,
    Trevor
    var swfLoader:Loader = new Loader();
    var klaesiSwfs:XMLList;
    var totalSwfs:Number;
    //var swfArray:Array = ["swfs/movie1.swf", "swfs/movie2.swf", "swfs/movie3.swf", "swfs/movie4.swf", "swfs/movie5.swf"];
    //loads xml//
    var klaesiXmlLoader:URLLoader = new URLLoader ();
    klaesiXmlLoader.load(new URLRequest("xml/swf_depot.xml"));
    klaesiXmlLoader.addEventListener(Event.COMPLETE, processXML, false, 0, true);
    //finds how many swfs are on xml//
    function processXML (e:Event):void{
         var klaesiXml:XML = new XML(e.target.data);
         klaesiSwfs=klaesiXml.ID;
         totalSwfs=klaesiSwfs.length();
         //trace ("Total is " + totalSwfs);
         loadRandomSwf();
         klaesiXmlLoader.removeEventListener(Event.COMPLETE, processXML)
         klaesiXmlLoader = null;
    //loads swfs//
    function loadRandomSwf():void {
         var num:Number = (Math.floor(Math.random() * totalSwfs) + 1);
         var swfName:String = "swfs/movie"+ num +".swf";
         var requestSwf:URLRequest = new URLRequest (swfName);
         swfLoader.load(requestSwf);
         addChild(swfLoader);
         swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, playComplete, false, 0, true);
    //listens for the end of each swf//
    function playComplete(e:Event){
         MovieClip(swfLoader.content).addEventListener("playNextCommercial", nextSwf, false, 0, true);
         swfLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE, playComplete)
    //removes old swf, starts new swf//
    function nextSwf(e:Event){
         MovieClip(swfLoader.content).removeEventListener(Event.COMPLETE, nextSwf);
         removeChild(swfLoader);
         loadRandomSwf();

  • What is the best way to switch between multiple image buffers? AND How to synchronize saves?

    Hello,
    I'm trying to flip-flop between two buffers and wondering the best possible solution for this.  I'd like to acquire an image in one buffer, send that off to be processed, and then while that's being processed acquire a second image.  Right now I have a "Create IMAQ vi" in a for loop and have it creating 10 image locations.  I'm using a non-NI framegrabber (shame I know) which makes things a bit more difficult to replicate.  I have two while loops.  One while loop currently grabs images from the framegrabber and places in the 10 different locations.  The other while loop currently holds a case structure that does the processing.  I have created a local variable that holds all of the image locations and reads those to be processed.  I don't know if this is actually making things faster or if it's better to just make one image location.
    I have two images attached.  One image is the Grab While loop.  Since I have an array of locations, I have to use a for loop and index each one out to my display. I then have a shift register to carry the image location info over to the next iteration of the while loop.
    The second attachment is the bulk of the main while loop.  It shows what happens to the image while it's being fully processed in the left case structure.  I know it does not look like much but one of the cases (which is called by Boolean Image FFT) is a subVI that does most of the processing.  I believe that is what really slows it down because of how that program is written. 
    The right case structure shows my saving mechanism.  I have two file paths. One to save the image and the other to save the processed image.  I have a sequence to make sure they save at the same time once it gets to that point. 
    The problem though is the following:
    In the grabwhileloop.png, you can see that I have a timing to see how fast the images are being acquired.  This value is approximately 60 fps (which is the rate of the Basler camera).  There is a similar set up in the main loop case structure. This processes very slowly and is approximately 1.04 fps.  Which would mean that the image I turn into an array in the left case structure in the main while loop image is more than likely different than the image I'm trying to save off in the right case structure since the grab is occurring at the same time.  I'd like to have the processed image to save alongside the image I am processing.
    Sorry for the big bulk of text.  This code has come a long way as it is.  If you have any suggestions on making it faster or more efficient please feel free to chime in.
    Thanks,
    Rob
    Attachments:
    GrabWhileLoop.png ‏34 KB
    MainWhileLoop.png ‏68 KB

    Thanks for the comment.  I have looked into the producer/consumer architecture, but to be honest, I'm not quite sure how everything will work while doing that. I have seen the example codes, and I have thought about implementing (or at least attempting to) but I'm still unconvinced that it will run that much more efficiently.  There is other setup outside of the images that had to be done outside of either while loop. Also, I don't know where I would put both loops.
    Last time, I attempted to put the grab while loop inside of the state machine.  Things got chopped because it took so long to go through the main while loop's "acquisition" state (which is really the processing state).  I needed both to simultaneously run.  The grab reset every time it went to the "grab" state which is not what I wanted.  The only way I can thing to have combatted this was to combine the grab and acquisition in the same state.  If that were to happen, I'd take out the for loop and grab one image at a time.  However, that would still probably make things even slower than they already are.
    In terms of the doing something before an image is assigned in for loop, I don't need that pixel sum value to refresh too quickly.  As it is already, the main while loop is slow enough as it is, so I am more afraid that everything will run too slowly the more I do.  I know where the bottleneck is in my code, but I can't really see a way to "even out the flow".  Even if I moved to the other architecture, I feel it'd take the same amount of time that it does already.
    From my debugging, the Image local variable in the main while loop seems to refresh as quickly as the grab while loop spits it out.  Granted once the main while loop finally completes, main images have gone by.  This is what has to be though because it just take up so much processing power to run through the main while loop state.
    As a side note, does labview have an issue with acquiring images in real-time that you have heard of?  I ask because when I run the code, there is a solid white line that I'm supposed to see in my display.  Every time things either time out or something, the line moves which is not supposed to happen.  The line also moves every time I place my mouse cursor in the display or if I spin the mouse wheel to scroll.  If I don't do either of those things, it'll eventually move on its own.

  • What is the best way to set up multiple devices in the same household?

    Our family has a bunch of devices (phones,pads,pods) all set up under the same appleID.  The idea was to be able to share iTunes content among devices.  The problem is that there is personalized data merging between devices (address book, apps, etc).  Is there a way to set up multiple devices under the same account while maintaining their own identity so that Each user can have their own apps, addresses, etc without having to sift through everyone else's stuff?

    Continue to share your iTunes ID, but use different IDs for other services such as FaceTime, iMessage and iCloud.  (When you share the same iCloud account across multiple devices, any synced data is merged and the merged list appears on all devices sharing the account.)
    To change the ID For:
    iMessage, go to Settings>Messages>Send & Receive (Receive At in iOS 5), tap the ID sign out, sign back in using the other ID.
    FaceTime, do the same thing in Settings>FaceTime.
    iCloud, you'll have to delete the account, create a new account with the other ID, and migrate your data to the new account.  Before deleting the account, if you have any photos in photo stream that are not in your camera roll or backed up somewhere else save these to your camera roll or you will lose them.  To do this, open the photo stream album in the thumbnail view, tap Edit, tap all the photos you want to save, tap Share, then tap Save to Camera Roll.  Once this is done, go to Settings>iCloud, scroll to the bottom and tap Delete Account. When prompted about what to do with the iCloud data, be sure to select Keep On [iDevice].  Next, set up a new iCloud account using a different Apple ID (if you don't have one, tap Get a Free Apple ID at the bottom).  Then turn iCloud data syncing for contacts, etc. back to On, and when prompted about merging with iCloud, choose Merge.  This will upload the data to the new account.  Finally, to un-merge the data you will then have to go to icloud.com on your computer and sign into each iCloud account separately and manually delete the data you don't want in each account (such as deleting the other person's contacts from your account, and vice versa).
    This article may be of interest: http://www.macstories.net/stories/ios-5-icloud-tips-sharing-an-apple-id-with-you r-family/.

  • What Is the best way to upload and download psd files from Photoshop to Photoshop Touch? [was:Re]

    What Is the best way to up load and down load psd files from desktop photo shop to photo shop touch? For on the go touch up or. I'm using psd files at 90 percent 300 depi when in photo shop on desktop. To ps touch

    Hi Bford225,
    I'd recommend using your favorite web browser and going to https://creative.adobe.com/files for uploading from the computer.
    Keep in mind tablet capabilities are much less than a computer, so large files might take a long time to download and be very system intensive to work on. Although you can import files up to 12 megapixels I'd recommend something more mid range, like 6 or 7 megapixels, ie 2880 x 2160 or 3072 x 2304.
    Also, PSD files are flattened when imported into Photoshop Touch.
    Hope that helps,
    -Dave 

  • What is the best way to kill/stop a data load?

    Hi.
    What is the best way to kill/stop a data load?
    I have a data load from my QA R/3 system that is extracting 115.000.000+ records. The problem is that the selection in the function module used in the data source does not work, and the problem was not detected because of the nature of the data on the development system.
    I could kill processes owned by my background user (on both R/3 and BW) but I risk killing other loads, and sometimes the job seems to restart if I just try to kill processes. If I remove transactional RFCs in SM58 the load does not terminate; I only skip one or more datapackages. I have also tried to change the QM-status in the monitor to red, but that does not stop the load either...
    So isn't there a nice fool-proof way of stopping a dataload?
    Best regards,
    Christian Frier

    Hi,
    There r 2 ways to kill the job.
    One is using transation RSMO locate the job and display the status tab double click on the yellow light that is shown on the line total, a pop will come 'set overall status ' is displayed select the desired status that is red and save it. Then return to the monitor page and select the header tab double ckick on the data target right click and then goto 'manage',there should be request sitting there probably with yellow lights , highlight the line with the faulty request click the delete button then click refresh button.
    Second is goto SM37 and click on the active selection and enter the jobname and then click excute the particulr job should appear highlight the jobname then click on the stop iconthat appears on the taskbar( 3 rd from left)
    hope it is clear.
    Regards-
    Siddhu

  • What's the best way to load balance multiple protocols on one vserver?

    Hi,
    We have a CSM blade on a 6513, in bridge mode. I'm just wondering what is the best way to serve HTTP and HTTPS (or any two or more ports) from the same group of servers. As I see it, we have two options:
    1. Don't set a port on the vserver, so it is load balancing "any" or "tcp". This is easy but I want to be sure there isn't a downside to this, other than the obvious security issue.
    2. Create multiple vservers and point them at the same serverfarm. I tried this and I got some odd results with the health checks.
    Any ideas? Thanks a lot.

    you listed the only 2 options available.
    The advantage of solution #2 is that you can apply specific config for each protocol ie: for HTTP you can turn 'persistent rebalance' if needed.
    If you want to use specific probes [not icmp], it is also a good practice to create a different serverfarm for each protocol.
    Like this, if the HTTP service goes down but not the server, you can still have other protocols loadbalanced.
    Regards,
    Gilles.
    Thanks for rating this answer.

  • What's The Best Way to Load a Replacement iPod Touch?

    I just received a replacement iPod Touch 3G for my daughter. Her iTunes library for the Touch that we returned to Apple is on her MacBook Pro. What is the best way to load the new Touch? She plans on using the same name for it. Should I restore from a previous backup or just plug it in and let in sync? Do I need to set anything on iTunes for disk management?
    Thank you,
    Bruce

    If she wants it like her old one the previous backup, if there is anything she wants to change though, now would be a perfect time to just resync it and start over. It really depends on what she wants.

  • [SOLVED] What is the best way to load iptables/nftables on boot?

    Hi -
    New arch user migrating from Ubuntu/debian.  I'm used to loading netfilter iptable rules using an /etc/network/interfaces file.  What is the best way to do this using netctl/systemd?
    An RTFM of the wiki and a Google search didn't provide an answer, but maybe I'm just looking in the wrong places.
    Last edited by pgoetz (2014-06-21 08:32:01)

    Ah, OK -- got it.  I can just blindly enable the iptables.service, and systemd will make sure the interfaces are up before running the service.  How cool.  I'm still getting used to the luxury of not having to worry about stuff like this myself.  The only minor issue is it looks like I'll have to get the systemd nftables service out of AUR.
    Last edited by pgoetz (2014-02-24 19:58:53)

  • What is the best way to back-up and load Hi-8 video onto my i-Mac so I can edit it on i-movie? A camera store will convert it to DVD for $32/120min.ll

    What is the best way to back-up my Hi-8 video tapes and then load them onto my i-Mac so I can edit them on i-movie? A camera store will convert them to DVD for $32/120min. Will I lose a lot of quality that way?

    Quality is not much of an issue with Hi8, the main issue is age of the tapes.  The older the tapes, the more degraded the images are going to be.  Regardless of how you transfer the video, the quality is going to be pretty much the same.
    The "best" way depends on how valuable the images are to you and how many tapes you have.  I did a similar project last winter with a collection of 14 Hi8 tapes that dated from 1994 to 2002.  I bought a converter bridge (Canopus), maximum RAM for my Mac, and a huge hard drive.  I also decided to get Final Cut Express because it had more ability to enhance the pictures after downloading them.  I am very happy with the results, but it cost me nearly $1200 for the upgrades, equipment, and software.
    The only other thing to consider is to be sure that if you go with an outside vendor (like the Camera Store) that the files they provide for you will be in a format that iMovie can recognize.
    Good luck.

Maybe you are looking for

  • I just bought a used iPod Touch, 2nd gen. How do I create a new Apple ID. I have an iTunes account.

    I just bought a used 2nd generation iPod Touch. The previous owner did not delete his Apple ID. I don't know his password. Meanwhile, I have a Apple ID and password from my previous Nano and iTunes library. How do I hook my new iPod Touch with my exi

  • Song can not be used because Original file can not be located  - HELP

    Hi - Newbie here and I have run into and error and don't know how to fix it. When I try to play a large number of songs from Itunes I get the following message. "The Song (NAME) could not be used because the original file could not be found. Would yo

  • 9-pin mini DIN socket

    Does NX7950GT-VT2D512EZ-HD have a 9-pin mini DIN socket? I want to connect the card to my televison via s-video. Is this the correct cable: http://www.hama.de/portal/articleId*125830/action*2563/searchMode*1/bySearch*34098#1 ?? Does anybody know wher

  • Change country of apple id

    Hi there My good old apple id was created when I lived in denmark. Now I live in greece. How do I change my account info? There is no option for changing the country. Only address change inside the current country

  • Adobe Reader + IE, caching fails

    Here is the problem: http://stackoverflow.com/questions/1807753/enable-pdf-caching-in-ie Before I renamed viewFile to viewFile.pdf, the caching didn't work anywhere with adobe reader. But it worked with https://addons.mozilla.org/en-US/firefox/addon/