Which is better way?

Hi
I have designed a UI in which the panel contains a tabbedPane and in each tabbedPane there are panels.While running the application i am getting the frame in some size that i have set in code.I am manually maximising it.Is there any way in which i can load the frame in maximum size initially.Also i want one tip,whether a application looks good in restored state or maximised state??
thanks for your reply

See Window#setExtendedState. And for which one looks better - that's a matter of taste, really.

Similar Messages

  • Which is better way to place images ?

    I'm making huge catalog with a lot of products.
    Which way is the proper way or better way to do?
    Make individual product image paste on photoshop and bring in to InDesign and lay images (re-sizing smaller, not bigger) and text out.
    or
    Make multiple product images paste on one photoshop document which size to catalog size already, then place into InDesign.
    My thought is, if you don't make images bigger in InDesign, it's easier to make individual images and bring to InDesign and playing around for layout.

    placing many images can go fast, select all (or a part) images you like to import, before placing the first image, hold down COMMAND-SHIFT key, now you can draw a grid for the images, when you are drawing that grid, you can use the UP, DOWN, LEFT or RIGHT keys to increase or decrease the number of collums and/or rows. That way you can place images at high speed.

  • Which is better way of creating BSP iView

    Hi Experts,
    Can you please let me know how I can create BSP iView.
    Approach 1:
    One of creating BSP iView is as follows:
    For this we have to say Create iView --> Select iView Template --> Select SAP BSP iView
    Set following properties:
    System: somesystem
    Business Server Page (BSP) Application: ztest
    Start Page: ztest.htm
    Now we can call the iView in Page etc.
    Approach 2:
    Other way of creating BSP iView is that we can create URL for BPS application.
    For this we should login into SAP BW. Go to transaction code bps_wb and then open the Web Interface. Then we can go to Edit --> Display in external browser.
    Some link will appear. The link will look like:
    http://mycompany:1080/sap(bD1lbiZjPTEwMCZkPW1pbiZpPTEmcz1TSUQlM2FBTk9OJTNhYmF1YzMzZzBfT0JTXzAwJTNhaXg3Sk5aVTV4RDVFWWtKQmFwWGMxTGlSRElJWGphc2x5aEQwYW9jRy1BVFQ=)/bc/bsp/sap/ztest/ztest.htm?bps-design_messages=X
    We can create URL iView. We can directly provide this link in the URL iView.
    I want to know which approach is correct and why? In second apprach we are not providing the details like
    System: somesystem
    Business Server Page (BSP) Application: ztest
    Start Page: ztest.htm
    From the link, iView finds out the entire detail.
    Pls help me.
    Thanks

    Hi Dagfinn,
    Thanks a lot. Can you please help me with answer of following question:
    How to call SAP BSP iView from a  HTML page hyperlink
    The question is as below:
    In my project we have URL iView.
    This iView calls a HTML page stored in KM.
    HTML page has one hyperlink.
    This hyperlink of the HTML page should point to a SAP BSP iView.
    When the user will click on HTML page hyperlink, SAP BSP iView should get open.
    How we can do it?
    We have created SAP BSP iView in following way.
    Create iView --> Select iView Template --> Select SAP BSP iView
    Set following properties:
    System: somesystem
    Business Server Page (BSP) Application: ztest
    Start Page: ztest.htm
    Can you please help me?
    Regards,

  • Upgrade, migrating oracle application. Which is better way?

    We have oracle application 11.5.5 run on Window NT 4 Server.
    We want to upgrade Window NT4 to Window 2000 advanced Server or Window 2003 advanced Server.
    We also want to upgrade oracle application 11.5.5 to 11.5.9 or 11.5.10.
    Since we have a new server, we also want to deploy new production on the new box.
    How should we go about to accomplish this task?
    Is there any good documentation out there we can use to accomplish this task?
    Thank.

    hi
    On windows
    you have to do a upgrade on the server which is having 11.5.4 apply autoconfig enabled patch on it. Ones the autoconfig is enabled then you can start category wise approach and start from cate gory 1 ... in cate gory 2 you have to run rapid install(on new fresh server which is having windows2003) with the option upgrade file system ...thenin thord cate gory you have to upgrade the DB on old server then traanfer the dbf file to the location created by rapid install in category 2 and create the control file and complete the remaining step of category 3 and cateogry 4 ...
    Regards
    Abhishek

  • Option in desktop mac / which is better?

    My husband plays games on his desk top with 17in screen which is not MAC. For his birthday I thought it would be good to give him a 22-27in monitor as I can get a good one for about low $200.00. Than I thought, why not just get a (used) mini mac to go with it. Than I thought again and started wondering is it better to go with used mini and new flat monitor or get a used imac?
    I'm pretty sure that I can get the used mini and new monitor for cheaper price but I really like the wide screen mac monitors... My husband likes to play games, use itunes, burn DVD, Photo... and ect....
    Can anyone tell me which is better way to go and what exactly I should be looking at? I need model number and you need to draw me a picture what I should be pricing or I won't understand...
    Thanks for helping the girl who rides the short bus when it comes to computers.

    Its me... again... to continue the last question, I just read that mac mini is not good for game playing??? because most of the games need xp or some other thing that mac doesn't have?? can u confirm?

  • Better way of populating Z-Table....

    Hi
    I am loading delta from Customer data file to BI DSO & also populating this delta records to some Z-Table (say: Shadow Table) like follows:
    1st way)
    Loopu2026
      u2026..
      u2026u2026     
    MODIFY ZMD_MANUFACTURER FROM WA_SHADOW.
    Endloop.
    2ND Way) We can also follow this method instead of following above mentioned 1st way as:
    Loopu2026u2026
         u2026u2026u2026u2026.
         u2026u2026u2026u2026u2026
         APPEND WA_SHADOW TO ITAB_SHADOW.
    ENDLOOP.
    MODIFY ZMD_MANUFACTURER FROM TABLE ITAB_SHADOW.
    Which is better way in terms of Performance?
    Thanks...

    Hi Harpal,
    The 2nd way should be good in terms of performs and the simple reason behind that is, in first approach everytime you want to update record it will hit to database but in second approach it will hit database only once.
    So 2nd approach would be better from perfromance point of view.
    Regards,
    Durgesh.

  • Is it better for your battery if you let it run down all the way and then charge it? Or to charge it whenever you have the opportunity?  Which is better for the life of the battery?

    I was wondering it the life of the battery would last longer if you let the battery run down all the way and then charge it? Or to charge it whenever you have the opportunity even if it doesn't have a low battery?  Which is better for the life of the battery and prolong the life of the battery?

    I've had a iPhone 4s since March 2012, and it's battery is pretty useless now.  I was using the app Battery Doctor (Battery Saver, Battery Life) by Beijing Kingsoft Internet Security software, which encourages the user to charge more often, whenever battery life drops below 100% full and greater than 20% full, and gives ratings according to the number of full, partial & overcharges done, but I'm concerned that charging like that actually results in worse battery life??
    I now have an new iPhone 5 and don't want the battery to only last as short as the last one did
    Any advice/comments please

  • A better way to Read Bytes until Done ?

    My question involves reading an unknown number of bytes from the serial
    port. One method is to just wait a defined amount of time to receive
    the bytes and hope you caught all of them. Better: count them until
    they are all received. I have attached an image which shows the method
    I use to count bytes until all bytes are received. However, this method
    is rather slow. It's taking me 500mS to read data that I can normally
    read in 230mS. Is the shift register making this loop slow? Is there a
    better way to read the bytes until all bytes are in?
    Richard
    Attachments:
    ReadBytes.gif ‏5 KB

    Thanks for your reply Chilly.
    Actually, you are correct on both accounts, the delay and the wire from
    the output of Write, and in fact, I usually do those things. I was just
    in a hurry to get an example posted and didn't have my real data.
    To put my issue in broader prospective, I have attached an image that shows boh methods I've used to count bytes. One
    shows the method I use to count bytes until all bytes are received. The
    other is a "hard wired" timer method that I try to avoid, but at least
    it is fast. Notice the text in red. Why would I be able to read the
    byes so much faster in the "hard wired" version? It has to be either
    the shift register, the AND, or the compare functions, and I still
    can't beleive these things would be slower than the Express timer
    function in the other method.
    Methodology: The 235mS timer used in the "hard wired" method was
    emperically derived. The 150 bytes are received 100% of the time when
    235mS is allowed. 230mS yields about 90% of the bytes, the it goes down
    exponentially. I found that the shift register method method trakes
    ~515mS avg by putting a tick count on both sides of the loop and
    finding the resulting time. I also did that with the hard wired method
    and found it to be dead on 235mS which at least proves the Express vi
    works very well
    Message Edited by Broken Arrow on 09-05-2005 08:31 PM
    Message Edited by Broken Arrow on 09-05-2005 08:32 PM
    Richard
    Attachments:
    CoutingBytes.GIF ‏25 KB

  • A better way to initialize imported taskflows and BCs with current user

    Hello.
    I'm currently developing a composite application containing one main application and a number of subapplications (modules) packed in adflibs.
    Main application has a side menu and a dynamic region, showing taskflows (on fragments) from adflibs.
    Main application is configured with adf security and it has current login and queries his ID. I would like main application to tell modules current user ID rather than each module to find out current user on their own.
    So there is currentUserID input parameter required in each imported taskflow. And my question is what is a better way to process this ID in the modules?
    What I have previously done is:
    I've created a custom BC classes layer, VOImpl and VORowImpl have getIdUser() method. This method reads currentUserID parameter from pageFlowScope where the taskflow is storing the parameter.
    Top-level View Objects have :IdUser query parameter and corresponding bind variable. This bind variable has value="source.getIdUser()", calling the method from custom VO class.
    This way works fine but here and there I read that it is a bad practice to access pageFlowScope from BCs.
    I could agree with this in case someone could share a better way.
    So what is a good practice?
    Thanks.
    ADF/JDev 11.1.2.3 - 12

    Why don't you use adf security for this? Read Oracle ADF: Security for Everyone which give you an overview and sample on how to implement this.
    Timo

  • A better way to make Automator mount a volume?

    I made an Automator application, using the Record function, to mount a volume on a drive connected to my Mini. I also made a similar one to eject it. I use them as Calendar-triggered events as part of my backup scheme.
    They work well ... until I restart the Mini, when occasionally my two connected drives will mount in a different order. What happens then is that the sequence of mouse clicks recorded in Automator don’t find the correct volume.
    I wonder if there’s a better way to automate the mounting of a currently ejected disc (and later its ejection). Automator, as far as I can see, does not have the actions I need. It has Ask For/Connect to/Get specified Servers, but they seem only to be for network-connected stuff.
    Anyone know a better way?

    Welcome to Unix. 
    The key part of that shell script code is the test for the existence of the mount point (if [ -e /Volumes/dbamp ]), followed by a conditional block that — in the "else" section involved when the mount point wasn't found — creates it, and then mounts an AFP file system on that mount point.  Most of the rest of the baggage in that script is used to get the mysqldump database dumps over onto the target disk, once it's been mounted.
    Here's a very quick overview of the basics of scripting , Apple's introduction to the command line manual, there's a generic bash intro (which is good, but doesn't line up exactly with how bash is implemented on OS X) and O'Reilly has some reasonable books on bash and bash scripting.  Once you know and are comfortable with the basics, there are advanced bash guides available.

  • A better way to delete IT2001 records in batch.,

    Hi Gurus,
    A little problem here. Due to data source error, I need to delete IT2001 records in batch.
    Currently I am using standard report RPUREOPN to do this. But RPUREOPN will not update those deduction in IT2006 quota. So I've to delete & reupload cooresponding IT2006 quota data which is inconvenient.
    Is there a better way to do this job? I mean deleting IT2001 in batch and also update the deductions in IT2006.
    Thanks in adv!
    Br,Kee

    After running the report you mentioned above to delete absences/attn you can try running the report RPTUPD00 to revaluate the attendance and absence.
    Regards,
    Divya

  • Must be a better way...

    Hello Flash Community!
    Thanks in advance for any help/advice.
    So, what I'm looking for here is some high level advice as far as a better way to do things. I feel like so often with programming I'm just breaking my neck to get things working when I know there is a better way (presumably based in OOP) to go about things. I just need someone to look at what I've done and point it out to me.
    So, here's what I've done so far: http://www.catherinemix.com
    And it works pretty well as far as I'm concerned! The app dynamically loads as many images as my client (my mom ) puts on the server, resizes them dynamically, adds L/R arrow buttons dynamically based on how many images are involved, etc... But the downside to all that dynamic flexibility is that I haven't found a way to load the thumbnail images (and their respective full size images) one by one. Instead, I have to load them all together and keeping the user waiting that long is unacceptable to my mom. What I would love is for each thumbnail/full size combo to get its own preloader bar in the location it will eventually be embedded, but I haven't found a way to do that and account for an unknown number of images (as it is determined dynamically.)
    Any ideas here? I would specifically like to know which functions y'all use when you need to load multiple files simultaenously (AttachMovie?)
    I have posted the kluge-y code which handles all of the image gallery functions below.
    Thanks! and Be Well
    Graham
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    var wait:PleaseWait = new PleaseWait();
    wait.x = 400;
    wait.y = 50;
    addChild(wait);
    var waitFadeIn:Tween = new Tween(wait, "alpha", Regular.easeOut, 0, 1, 1, true);
    var titleText:TextField;
    var textSprite:Sprite;
    //thumbH is the ideal height for our thumbnails, and thumbW the ideal width
    var thumbH = 120;
    var thumbW = 170;
    //loadH is the ideal height for our fullsize images, and loadW the ideal width
    var loadH = 500;
    var loadW = 600;
    //some counter numbers
    var thumbNum = 1;
    var loadNum = 1;
    //some Sprites which need to be accessed by more than one function
    var darkStage:Sprite;
    var loadSprite:Sprite;
    //Let's instantiate some Arrays that we can load the images into.
    //Since Arrays of Loaders can't be copied, we have to go through the process twice.
    var thumbArray:Array = new Array();
    var loadArray:Array = new Array();
    firstLoad();
    firstThumb();
    function firstLoad():void {
        trace("firstLoad");
        var loadski = new Loader();
        loadski.load(new URLRequest("images/fulls/0.png"));
        loadski.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
        loadArray.push(loadski);
    //Starting with the above Loader, this function will execute every time the Loader completes
    function loadComplete(e:Event):void {
        trace("loadComplete");
        var loadski = new Loader();
        loadski.load(new URLRequest("images/fulls/" + loadNum + ".png"));
        loadArray.push(loadski);
        loadski.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
        loadski.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
        loadNum++;
    //Once the Loader goes too far by attempting to load an image that doesn't exist on the computer,
    //it will thorw an IOError Event at which point the following function will execute.
    function loadError(e:IOErrorEvent):void {
        trace("loadError");
        loadArray.pop();
        loadNum = 0;
        loadResize();
        //We use the pop function to remove the most recently added Loader instance, since we know it
        //contains a null reference (beacuse the IOError Event is asynchronous.)
        thumbArray.pop();
        //We reset the counter variable.
        thumbNum = 0;
        //Add the little arrows that allow the user to click to see more thumbnails (if there are more
        //than 8 images on the server.)
        removeChild(wait);
        addArrows();
        //Let's resize the images to thumbnail size and add them to the display list.
        thumbResize();
        addClickOnThumb();
    function loadResize():void {
        trace("loadResize");
        for (var ex = 0; ex < loadArray.length; ex++) {
            //If the width of the image is greater than the ideal width, OR the height is greater than the ideal height...
            if ( loadArray[loadNum].content.width > loadW || loadArray[loadNum].content.height > loadH) {
                //And if the width of the image is greater than the height, apply Scaler 1...
                if ( loadArray[loadNum].content.width > loadArray[loadNum].content.height ) {
                    //Scaler 1 is the ratio of the ideal width to the image width
                    var scaler1 = loadW / loadArray[loadNum].content.width;
                    trace(loadNum + " load scaler 1: " + scaler1);
                    //Apply Scaler 1 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler1;
                    //Otherwise, apply Scaler 2
                } else {
                    //Scaler 2 is the ratio of the ideal width to the image height
                    var scaler2 = loadH / loadArray[loadNum].content.height;
                    trace(loadNum + " load scaler 2: " + scaler2);
                    //Apply Scaler 2 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler2;
                    trace("loadArray[loadNum].content.height = " + loadArray[loadNum].content.height);
                    trace("loadArray[loadNum].content.width = " + loadArray[loadNum].content.width);
                //Otherwise... (that is, the image width and height are in both cases less than the ideal)
            } else {
                //And if the width of the image is greater than the heigh, apply Scaler 3
                if ( loadArray[loadNum].content.width > loadArray[loadNum].content.height ) {
                    //Scaler 3 is the ratio of the ideal width to the image width
                    var scaler3 = loadW / loadArray[loadNum].content.width;
                    trace(loadNum + " load scaler 3: " + scaler3);
                    //Apply Scaler 3 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler3;
                } else {
                    //Scaler 4 is the ratio of the ideal width to the image height
                    var scaler4 = loadH / loadArray[loadNum].content.height;
                    trace(loadNum + " load scaler 4: " + scaler4);
                    //Apply Scaler 4 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler4;
            loadArray[loadNum].content.x = - (loadArray[loadNum].content.width / 2);
            loadArray[loadNum].content.y = - (loadArray[loadNum].content.height / 2);
            loadNum++;
    function firstThumb():void {
        trace("firstThumb");
        //Let's populate the first Array with Loaders that load the images Mom has put on the server.
        //We have to do this first Loader object by hand to get the Event.COMPLETE-based-loop going.
        var thumbski = new Loader();
        thumbski.load(new URLRequest("images/thumbs/0.png"));
        thumbski.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbComplete);
        //We add the MouseEvent.CLICK listener to the actual Loader instance so that, later on, in the
        //function enLarge, we can make use of the currentTarget parameter to correlate the Array index of
        //the thumbnail that the user is clicking on with that of the loadArray.
        thumbski.addEventListener(MouseEvent.CLICK, enLarge);
        thumbArray.push(thumbski);
    //Starting with the above Loader, this function will execute every time the Loader completes
    function thumbComplete(event:Event):void {
        trace("thumbComplete");
        var thumbski = new Loader();
        thumbski.load(new URLRequest("images/thumbs/" + thumbNum + ".png"));
        thumbski.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbComplete);
        //We add the IOErrorEvent listener so that as soon as this error is thrown, we will exit this loop
        //and proceed to the next logical step in the program can be taken.
        thumbski.addEventListener(MouseEvent.CLICK, enLarge);
        thumbArray.push(thumbski);
        thumbNum++;
    function addArrows():void {
        //Let's determine how many batches there are. A batch is the minimum amount of thumbnail images
        //mom wants to show up onscreen at a time. In this case, she has decided on 8.
        var batches =  Math.ceil(thumbArray.length / 8);
        //The variable m is part of a kluge fix related to the calculation of startX (explained below.)
        var m = 0;
        //Pseudocode for this loop: If there are at least two batches, then...
        //We do this because less than 2 batches doesn't warrant arrows
        if (batches > 1) {
            for (var k = 1; k < batches; k++) {
                //triW is the desired width of our arrows
                var triW = 20;
                //startX is the x position of the start of our rightward facing triangle(s)
                //The formula says: Our x starting position should be a triangle width shy of the
                //far edge of the stage (multiplying it by k ensures it happens as many times
                //as there are batches, which is why we intialize k = 1.) Every subsequent iteration
                //of the formula has to add a triangle's width worth of distance, except for the
                //very first one, which is why it is multiplied by m, which is initially set to 0.
                var startX = (((stage.stageWidth - triW) * k) + (triW * m));
                //We want the arrows to sit perfectly between the two rows of thumbnails. Since the
                //max height of every thumbnail is thumbW, that would seem to be the natural choice
                //for the starting y position of the arrows. But, we actually have to use thumbW/2
                //because the thumbnails have already been offset by half of thumbW due to being
                //aligned vertically with each other.
                var startY = (thumbW / 2);
                //This is the rightward facing triangle
                var tri:Sprite = new Sprite();
                tri.graphics.beginFill(0xFFFFFF);
                tri.graphics.moveTo(startX, startY);
                tri.graphics.lineTo(startX, (startY + triW));
                tri.graphics.lineTo((startX + triW), (startY + (triW/2)));
                tri.graphics.lineTo(startX, startY);
                tri.graphics.endFill();
                tri.buttonMode = true;
                tri.useHandCursor = true;
                tri.addEventListener(MouseEvent.CLICK, moveLeft);
                addChild(tri);
                //This is the leftward facing triangle
                var tri2:Sprite = new Sprite();
                var startX2 = (startX + (triW * 2));
                tri2.graphics.beginFill(0xFFFFFF);
                tri2.graphics.moveTo(startX2, startY);
                tri2.graphics.lineTo(startX2, (startY + triW));
                tri2.graphics.lineTo((startX2 - triW), (startY + (triW / 2)));
                tri2.graphics.lineTo(startX2, startY);
                tri2.graphics.endFill();
                tri2.buttonMode = true;
                tri2.useHandCursor = true;
                tri2.addEventListener(MouseEvent.CLICK, moveRight);
                addChild(tri2);
                //Increase m (see above)
                m++;
    //This function moves the entire Gallery MovieClip to the left 800 pixels.
    function moveLeft(event:MouseEvent):void {
        var leftTween:Tween = new Tween(this, "x", Regular.easeOut, this.x, (this.x - 800), .5, true);
    //This function moves the entire Gallery MovieClip to the right 800 pixels.
    function moveRight(event:MouseEvent):void {
        var rightTween:Tween = new Tween(this, "x", Regular.easeOut, this.x, (this.x + 800), .5, true);
    //This function resizes the loaded images to the desired thumbnail dimensions and adds them
    //to the display list.
    function thumbResize():void {
        //The highest level of organization of thumbnails is the batch. There are only as many batches
        //as the length of the thumbArray divided by 8 (the max amount of thumbnails in a batch, as determined
        //by mom.)
        for (var batch = 0; batch < Math.ceil(thumbArray.length / 8); batch++) {
            trace("batch " + batch);
            //This Sprite serves as the container that we use to position entire batches
            var batchSprite: Sprite = new Sprite();
            //The logic behind setting the x position of the batchSprite to 800 x batch should be self-evident --
            //we want each new batch to be 800 pixels to the right of the former one -- but the addition of (thumbW
            //divided by 1.5) is a kluge fix for how much space to give the batches on left margin.
            batchSprite.x = (thumbW / 1.5) + (batch * 800);
            addChild(batchSprite);
            //The second highest level of organization for our thumbnails is the row. Our grid of thumbnails is
            //two rows deep.
            for (var row = 0; row < 2; row++) {
                trace("     row " + row);
                //The third highest level of organization for our thumbnails is the column. Our grid of thumbnails is
                //four columns deep.
                for (var col = 0; col < 4; col++) {
                    trace("          col " + col);
                    trace("               thumb " + thumbNum);
                    if (thumbNum < thumbArray.length) {
                        //The following is the logic structure for handling the resizing of images. The goal was to develop
                        //a system robust enough to allow my mom to put whatever size images she wanted on the server and the
                        //app would use them. The logic is explained at each step...
                        //If the width of the image is greater than the ideal width, OR the height is greater than the ideal height...
                        if ( thumbArray[thumbNum].content.width > thumbW || thumbArray[thumbNum].content.height > thumbH) {
                            //And if the width of the image is greater than the height, apply Scaler 1...
                            if ( thumbArray[thumbNum].content.width > thumbArray[thumbNum].content.height ) {
                                //Scaler 1 is the ratio of the ideal width to the image width
                                var scaler1 = thumbW / thumbArray[thumbNum].content.width;
                                trace("               scaler1 = " + scaler1);
                                //Apply Scaler 1 to both the width and height of the image
                                thumbArray[thumbNum].content.scaleX = thumbArray[thumbNum].content.scaleY = scaler1;
                                trace("               image width:" + thumbArray[thumbNum].content.width);
                                trace("               image height:" + thumbArray[thumbNum].content.height);
                                //Otherwise, apply Scaler 2
                            } else {
                                //Scaler 2 is the ratio of the ideal width to the image height
                                var scaler2 = thumbW / thumbArray[thumbNum].content.height;
                                trace("               scaler2 = " + scaler2);
                                //Apply Scaler 2 to both the width and height of the image
                                thumbArray[thumbNum].content.scaleX = thumbArray[thumbNum].content.scaleY = scaler2;
                                trace("               image width:" + thumbArray[thumbNum].content.width);
                                trace("               image height:" + thumbArray[thumbNum].content.height);
                            //Otherwise... (that is, the image width and height are in both cases less than the ideal)
                        } else {
                            //And if the width of the image is greater than the heigh, apply Scaler 3
                            if ( thumbArray[thumbNum].content.width > thumbArray[thumbNum].content.height ) {
                                //Scaler 3 is the ratio of the ideal width to the image width
                                var scaler3 = thumbW / thumbArray[thumbNum].content.width;
                                trace("               scaler3 = " + scaler3);
                                //Apply Scaler 3 to both the width and height of the image
                                thumbArray[thumbNum].content.scaleX = thumbArray[thumbNum].content.scaleY = scaler3;
                                trace("               image width:" + thumbArray[thumbNum].content.width);
                                trace("               image height:" + thumbArray[thumbNum].content.height);
                            } else {
                                //Scaler 4 is the ratio of the ideal width to the image height
                                var scaler4 = thumbW / thumbArray[thumbNum].content.height;
                                trace("               scaler4 = " + scaler4);
                                //Apply Scaler 4 to both the width and height of the image
                                thumbArray[thumbNum].content.scaleX = thumbArray[thumbNum].content.scaleY = scaler4;
                                trace("               image width:" + thumbArray[thumbNum].content.width);
                                trace("               image height:" + thumbArray[thumbNum].content.height);
                        //Here is where we center the images vertically...
                        thumbArray[thumbNum].content.x = - (thumbArray[thumbNum].content.width / 2);
                        //Here is where we center the images horizontally...
                        thumbArray[thumbNum].content.y = - (thumbArray[thumbNum].content.height / 2);
                        //Before placing them in their own container Sprite, so that their relative positions can be
                        //determined accurately (a task that would've been otherwise impossible after the
                        //adjustments to position made above.)
                        var thumby = new MovieClip();
                        thumby.addChild(thumbArray[thumbNum]);
                        //thumbW being the max possible length or width of any one thumbnail (this was done for visual
                        //consistency and codified in the logic tree above), placing two thumbnails thumbW
                        //apart (measuring from center point in either case) will put them edge to edge at best. This is why
                        //we add (thumbW / 8) as additional spacing.
                        thumby.y = (row * (thumbW + (thumbW / 8)));
                        thumby.x = (col * (thumbW + (thumbW / 8)));
                        thumby.buttonMode = true;
                        thumby.useHandCursor = true;
                        var fA:Array = new Array();
                        var dS:DropShadowFilter = new DropShadowFilter(5, 45, 0x000000, 0.33, 5, 5, 1, 1);
                        fA.push(dS);
                        thumby.filters = fA;
                        trace("thumby.width = " + thumby.width);
                        trace("thumby.height = " + thumby.height);
                        batchSprite.addChild(thumby);
                        thumbNum++;
    function enLarge(event:MouseEvent):void {
        var indexNum:Number = new Number();
        indexNum = thumbArray.indexOf(event.currentTarget);
        trace("indexNum = " + indexNum);
        darkStage = new Sprite();
        darkStage.graphics.beginFill(0x333333, .9);
        darkStage.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
        darkStage.addEventListener(MouseEvent.CLICK, reMove);
        darkStage.buttonMode = true;
        darkStage.useHandCursor = true;
        (parent  as  MovieClip).addChild(darkStage);
        loadSprite = new Sprite();
        loadSprite.addChild(loadArray[indexNum]);
        loadSprite.x = (stage.stageWidth / 2);
        loadSprite.y = (stage.stageHeight / 2);
        loadSprite.addEventListener(MouseEvent.CLICK, reMove);
        loadSprite.buttonMode = true;
        loadSprite.useHandCursor = true;
        loadSprite.mouseEnabled = false;
        (parent  as  MovieClip).addChild(loadSprite);
        var urlRequest:URLRequest = new URLRequest("xmls/" + indexNum + ".xml");
        var titleURL:URLLoader = new URLLoader();
        titleURL.addEventListener(Event.COMPLETE, completeListener);
        titleURL.load(urlRequest);
        function completeListener(event:Event):void {
            titleText = new TextField();
            titleText.autoSize = TextFieldAutoSize.LEFT;
            var myFont:Font = new BOF();
            var ttFormat:TextFormat = new TextFormat();
            ttFormat.color = 0xFFFFFF;
            ttFormat.size = 18;
            ttFormat.font = myFont.fontName;
            textSprite = new Sprite();
            textSprite.addChild(titleText);
            (parent  as  MovieClip).addChild(textSprite);
            var titleXML:XML = new XML(titleURL.data);
            titleText.text = titleXML.toXMLString();
            titleText.setTextFormat(ttFormat);
            titleText.embedFonts = true;
            textSprite.y = 570;
            textSprite.x = ((stage.stageWidth / 2) - (titleText.textWidth / 2));
            textSprite.mouseEnabled = false;
            titleText.mouseEnabled = false;
    function reMove(event:MouseEvent):void {
        (parent  as  MovieClip).removeChild(textSprite);
        (parent  as  MovieClip).removeChild(loadSprite);
        (parent  as  MovieClip).removeChild(darkStage);
    function addClickOnThumb():void {
        var cot:ClickOnThumbnail = new ClickOnThumbnail();
        cot.x = 400;
        cot.y = 583;
        (parent  as  MovieClip).addChild(cot);

    Hey Jim
    Wow, that's great; thanks! Can I ask what settings you used to get the files so small?
    Yes, I am familiar with Photoshop and image optimization issues, but I didn't realize that PNG was so much bigger than JPG and that I had so much file size I could shed before I would notice a degradation in image quality. Your advice will certainly help greatly, and I will certainly apply it to the thumbs as well. I think my mom will be very pleased.  : )
    I look forward to hearing what collection of settings you used.
    Thanks and Be Well
    Graham

  • Is there a better way to generate custom timed digital Signals

    I am trying to generate digital output of high and lows with particular delays on different lines. Each daq assistant is activating single line on a port on USB 6501. There more complex high and lows that I need to generate with variable time difference between high and low. There is codebelow which accomplishes what I am trying to achieve but for executing a long pattern of high and low signal is very time consuming to do this way. I am sure there is a better way to do this, I  not a expert on labview so I haven't uncovered its full potential. Can anybody suggest a more effective and a quick way to do this. I would hgihly appreciate. Thanks!
    I have not shown in the code below but through DAQ assistant I have initialized lines to low level logic.
    Solved!
    Go to Solution.

    See the attached file
    Attachments:
    Digital Signal.vi ‏335 KB

  • Is there a better way to deal with Verizon and my DSL issues?

    My family and I have been with Verizon for as long as we've had broadband internet. For the past 5 years or so the internet has been shaky at best. For the most part it works, but a coupe times a year it stops working all together or becomes VERY intermittent (and is usually working by the time I get finished sitting on hold and the test the technician runs shows no problems). Every time I have to wrestle with the "tech support" on the phone and listen to a recording tell me the same things over and over again that never fix my problems.
    Every time my internet gets to this point, it requires a visit from a Verizon technician. Usually they go out into the neighborhood and find a length of cable and replace it. Usually that fixes my issues for a while, but I know it will happen again. It always happens again.  It seems to me that the entire length of line that my internet runs through is old, and needs to be replaced. Instead of fixing the problem before it actually becomes a problem, Verizon continues to leave me and my family without service for periods of time.
    Last week was the most recent time we dealt with this situation, which was fortunately short lived (Only all day Sunday, into Monday when the technician arrived). It's getting VERY tiring dealing with this situation over and over again, and it's getting offensive honestly. To hear the tech support person tell me that I will be charged $91 if the problem is found and is inside my house is ridiculous. I would understand if this was the first time this situation had occurred, or if I frequently reported non-issues. But no, I'm simply reporting the same issue that Verizon has failed to fix MANY times before. 
    Perhaps the most frustrating part of this, is that we've never been compensated for our lost service. Last year we lost service for an entire week. That's an entire week with no internet service at all. After we finally got it back, we spoke with the billing department and they told us that we would be credited for the week we lost service. At this point, we are yet to see any credit for the time we have been without the service we pay for. Perhaps we would have tried dealing with Verizon again to get our weeks credit, but attempting to contact someone in Verizon seems futile. Unless you're calling sales you end up sitting on hold for extended periods of time, only to be bounced from person to person until you get to someone that has no excuse not to pretend to help you. 
    Unless something changes, this is Verizon's last opportunity to keep our service. We have dealt with the loss of service followed by the insult of attempting to deal with Verizon's customer support for the last time. Next time it happens (and I'm sure there will be a next time) unless Verizon shows us that they are actually going to correct the problem, we will cancel our service and give our business to the competitor. This post is being written for a few reasons. I'm hoping that perhaps Verizon can give me a better way to contact someone locally when we have a problem (I would LOVE to speak with a regional manager, or even a local manager of some sort), or at least recognize that there is a problem that will end up costing them money. 
    Thank you,
    A long time customer.

    I've decided to give up the fight and go to another provider.  I have work to do and having to wait at speeds slower than dial up is insane.  At least with dial up I'd have some stability.  I can't even run speedtest because it won't connect.  At hotels, wi-fi, and hanging by blackberry the laptop works fine but to actually use dsl, nope.  Multiple machines and multiple browsers - it's all the same worthless bandwidth.  
    If they won't give you fios then there is no reason to stay.  They've been promising me the service is coming for the last 6 years.  They could have run it here by now for the postage they've spent trying to get me to switch to it even though it isn't available.  Waste, waste, waste ....

  • Is there a better way to stop a Method than Thread.stop()?

    First my basic problem. In one of my programs I am using constraint solver. I call the constraint solver with a set of constraints and it returns a Map with a satisfying assignment. In most cases this works in acceptable time ( less than 1 second). But in some cases it may take hours. Currently I am running the function in a Thread and using Thread.stop(). This look like that:
         public Map<String, Object> getConcreteModel(
                   Collection<Constraint> constraints) {
              WorkingThread t=new WorkingThread(constraints);
              t.setName("WorkingThread");
              t.start();
              try {
                   t.join(Configuration.MAX_TIME);
              } catch (InterruptedException e) {
              if(t.isAlive()){
                   t.stop();
              return t.getSolution();
         }where t.getSolution(); returns null if the Thread was interrupted.
    Unfortunately this sometimes crashes the JVM with:
    # A fatal error has been detected by the Java Runtime Environment:
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006dbeb527, pid=5788, tid=4188
    # JRE version: 6.0_18-b07
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode windows-amd64 )
    # Problematic frame:
    # V  [jvm.dll+0x3fb527]
    # An error report file with more information is saved as:
    # F:\Eigene Dateien\Masterarbeit\workspace\JPF-Listener-Test\hs_err_pid5788.log
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    #Does anyone knows a better way to do it?
    Thank you in advance.
    Note 1: the Constraint solver is a Third Party tool and changing it is unfeasible. (I have tried it already)
    Note 2: Using Thread.stop(Throwable t) only chances the error message.

    In case somebody have the same problem here my code which solves the problem. Note it requires to parameters and the result to be serializable.
    The Class which starts to Process:
    public class Solver{
         public Map<String, Object> getConcreteModel(
                   Collection<Constraint> constraints) {
                   try
                        Process p=Runtime.getRuntime().exec(...); //do not forget the classpath
                        new TimeOut(Configuration.MAX_TIME, p).start();
                        ObjectOutputStream out=new ObjectOutputStream(p.getOutputStream());
                        new ErrReader(p.getErrorStream()).start();//not that std.err fills up the pipe
                        out.writeObject(constraints);
                        out.flush();
                        ObjectInputStream in=new ObjectInputStream(p.getInputStream());
                        return (Map<String, Object>) in.readObject();
                   catch(IOException e)
                        return null;
                   } catch (ClassNotFoundException e) {
                        //should not happen
                        return null;
         // For running in a own process
         static private class TimeOut extends Thread
              private int time;
              private Process p;
              public TimeOut(int time, Process p)
                   this.time=time;
                   this.p=p;
              @Override
              public void run() {
                   synchronized (this) {
                        try {
                             this.wait(time);
                        } catch (InterruptedException e) {
                   p.destroy();
         static class ErrReader extends Thread
             InputStream is;
             ErrReader(InputStream is)
                 this.is = is;
                 this.setDaemon(true);
             public void run()
                 try
                     InputStreamReader isr = new InputStreamReader(is);
                     BufferedReader br = new BufferedReader(isr);
                     String line=null;
                     while ( (line = br.readLine()) != null)
                         System.err.println(line);   
                     } catch (IOException ioe)
                         ioe.printStackTrace(); 
    }And the class which executet the Program
    public class SolverProcess {
          * @param args ignored
         public static void main(String[] args){
              try {
                   ObjectInputStream in =new ObjectInputStream(System.in);
                   SolverProcess p=new SolverProcess();
                   p.constraints=(Collection<Constraint>) in.readObject();
                   p.compute();
                   ObjectOutputStream out=new ObjectOutputStream(System.out);
                   out.writeObject(p.solution);
                   out.flush();
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              //System.err.println("solved");
              System.exit(0);
         private Map<String, Object> solution=null;
         private Collection<Constraint> constraints;
           private void compute()
    }

Maybe you are looking for

  • Ignificance of the Industry Sector selection in the Material Master

    hi all, We need information on the significance of the Industry Sector selection in the Material Master field. I understand that it can influence field selection and the screen sequence of the material master record.  We are particularly interested t

  • Putawy stratagy

    Hi My requirement : we have materilas with batch managed. I want to place the materilas as per the capacity of the bin. Mixed storage is not allowed, but same material with different batches should allow. so I am using Addtion to existing stock strat

  • OSB 11.1.1.5.0 implementation in Eclipse

    Hi Friends, I am very new to OSB. I have the requirement with OSB in my current project. can you please anybody let me know how to implement OSB sample process(just like connect to file/DB Adapters to fetch the data and pass to BPEL like in ESB) and

  • Has anyone noticed that Messages (iChat) is very unstable on OS 10.8.3?

    I have a 27 inch iMac i5 with 4 GB of RAM. Since upgrading to OS 10.8.3, Messages (iChat) has become very unstable, freezing at least once or twice a day. This behavior is mainly associated with my sending iMessages to iPhone users. The problem is so

  • OID installation fail

    Hi all, I'm a beginner of Oracle. When I try to setup OID in Oracle 8i and 9iAS. It cannot success and show "Directory servie error ". Net8 is just work normally. I can't success setup portal in 9iAS. Please help me to solve ? My machine is Windows 2