Need some help understanding the last portion of this simple loop.

public static void main(String[] args)
        int j = 3;
        for(int i = 5; i > j; i -= 3)
            do
                    System.out.printf("%-+3d, %-+3d\n", j, i);
            while(j-- >= 3);
    }Here is what I understand:
the for loop starts, with int i equal to 5 and j equal to 3. Since i > j, it runs the statement (Do While loop). The Do While loop prints the values to the screen. Then since j is equal to 3, it will do the Do While loop again, first decrementing j by 1. So j is 2 and i is 5.. those get printed. Then since j is not >= to 3, the loop ends and backs out to the For loop.
Here is where I am confused. I know that j gets decremented to 1 before it backs to the For loop. I understand everything so far. However, I know that the Do While loop runs again, printing 1 for j and 2 for i. So I gather that since i was greater than j, 3 was subtracted from i... then the Do While ran, printing the new values... and stopped because j isn't >=3. So j becomes zero (though it won't ever print that) but I don't understand how the loop finally ends.
Any hints? I tried looking at code examples in several books but none have that kind of thing.. only ones that talk about when i is less than a value to stop when that boolean is false. However in this code, i so far has always been greater than j.
What makes the loop end?
Thanks in advance,
SYD
Edited by: SYD527 on May 15, 2008 1:29 AM

Well this has to do with the fact that a do while loop checks its condition after running the content of the loop, so even
do  {
/* some code */
} while (false); will atleast run once.
Each time the for loop goes into a new iteration the do while loop is excecuted atleast once.
HTH
Lima

Similar Messages

  • Need some help understanding the way materialized views are applied through

    Hi, I need some help understanding the way materialized views are applied through adpatch.
    In patch 1, we have a mv with build mode immediate. When applying it PTS hang due to pool performance of mv refresh.
    So we provide patch 2, with that mv build mode deferred, hoping it'll go through. But patch 2 hang too on the same mv.
    How does this work? Is that because mv already exists in the database with build immediate, patch 2 will force it to refresh first before changing build mode? How to get over this?
    Thanks,
    Wei

    Hi Hussein,
    Thank you for the response.
    Application release is 11.5.10.
    Patch 1 is MSC11510: 8639586 ASCP ENGINE RUP#38 PATCH FOR 11.5.10 BRANCH
    Patch 2 is MSC11510: 9001833 APCC MSC_PHUB_CUSTOMERS_MV WORKER IS STUCK ON "DB FILE SEQUENTIAL READ" 12 HOURS
    The MV is APPS.MSC_PHUB_CUSTOMERS_MV
    This happens at customer environment but not reproducable in our internal environment, as our testing data is much smaller.
    Taking closer look in the logs, I saw actually when applying both patch 1 and patch 2, MV doesn't exist in the database. So seems my previous assumption is wrong. Still, strange that patch 2 contains only one file which is the MV.xdf, it took 7 hours and finally got killed.
    -- patch 1 log
    Materialized View Name is MSC_PHUB_CUSTOMERS_MV
    Materialized View does not exist in the target database
    Executing create Statement
    Create Statement is
    CREATE MATERIALIZED VIEW "APPS"."MSC_PHUB_CUSTOMERS_MV"
    ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 10 MAXTRANS 255 LOGGING
    STORAGE(INITIAL 4096 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 4 FREELIST GROUPS 4 BUFFER_POOL DEFAULT)
    TABLESPACE "APPS_TS_SUMMARY"
    BUILD IMMEDIATE
    USING INDEX
    REFRESH FORCE ON DEMAND
    WITH ROWID USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE
    AS select distinct
    from
    dual
    AD Worker error:
    The above program failed. See the error messages listed
    above, if any, or see the log and output files for the program.
    Time when worker failed: Tue Feb 02 2010 10:01:46
    Manager says to quit.
    -- patch 2 log
    Materialized View Name is MSC_PHUB_CUSTOMERS_MV
    Materialized View does not exist in the target database
    Executing create Statement
    Create Statement is
    CREATE MATERIALIZED VIEW "APPS"."MSC_PHUB_CUSTOMERS_MV"
    ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 10 MAXTRANS 255 LOGGING
    STORAGE(INITIAL 4096 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 4 FREELIST GROUPS 4 BUFFER_POOL DEFAULT)
    TABLESPACE "APPS_TS_SUMMARY"
    BUILD DEFERRED
    USING INDEX
    REFRESH COMPLETE ON DEMAND
    WITH ROWID USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE
    AS select distinct
    from dual
    Start time for statement above is Tue Feb 02 10:05:06 GMT 2010
    Exception occured ORA-00028: your session has been killed
    ORA-00028: your session has been killed
    ORA-06512: at "APPS.AD_MV", line 116
    ORA-06512: at "APPS.AD_MV", line 258
    ORA-06512: at line 1
    java.sql.SQLException: ORA-00028: your session has been killed
    ORA-00028: your session has been killed
    ORA-06512: at "APPS.AD_MV", line 116
    ORA-06512: at "APPS.AD_MV", line 258
    ORA-06512: at line 1
    Exception occured :No more data to read from socket
    AD Run Java Command is complete.
    Copyright (c) 2002 Oracle Corporation
    Redwood Shores, California, USA
    AD Java
    Version 11.5.0
    NOTE: You may not use this utility for custom development
    unless you have written permission from Oracle Corporation.
    AD Worker error:
    The above program failed. See the error messages listed
    above, if any, or see the log and output files for the program.
    Time when worker failed: Tue Feb 02 2010 19:51:27
    Start time for statement above is Tue Feb 02 12:44:52 GMT 2010
    End time for statement above is Tue Feb 02 19:51:29 GMT 2010
    Thanks,
    Wei

  • Need some help with the Select query.

    Need some help with the Select query.
    I had created a Z table with the following fields :
    ZADS :
    MANDT
    VKORG
    ABGRU.
    I had written a select query as below :
    select single vkorg abgru from ZADS into it_rej.
    IT_REJ is a Work area:
    DATA : BEGIN OF IT_REJ,
            VKORG TYPE VBAK-VKORG,
            ABGRU TYPE VBAP-ABGRU,
           END OF IT_REJ.
    This is causing performance issue. They are asking me to include the where condition for this select query.
    What should be my select query here?
    Please suggest....
    Any suggestion will be apprecaiated!
    Regards,
    Developer

    Hello Everybody!
    Thank you for all your response!
    I had changes this work area into Internal table and changed the select query. PLease let me know if this causes any performance issues?
    I had created a Z table with the following fields :
    ZADS :
    MANDT
    VKORG
    ABGRU.
    I had written a select query as below :
    I had removed the select single and insted of using the Structure it_rej, I had changed it into Internal table 
    select vkorg abgru from ZADS into it_rej.
    Earlier :
    IT_REJ is a Work area:
    DATA : BEGIN OF IT_REJ,
    VKORG TYPE VBAK-VKORG,
    ABGRU TYPE VBAP-ABGRU,
    END OF IT_REJ.
    Now :
    DATA : BEGIN OF IT_REJ occurs 0,
    VKORG TYPE VBAK-VKORG,
    ABGRU TYPE VBAP-ABGRU,
    END OF IT_REJ.
    I guess this will fix the issue correct?
    PLease suggest!
    Regards,
    Developer.

  • Need some help in the login form ???!?!?!?!!

    can any one help me with correcting the code or can any one give me another code for using it in the login form.
    this is my problem:-
    i had make a login form using in oracle 9i form builder >>>in this form i have three text boxes one for intering user name and the second one for entering the password and the third text box is not visible and it is used for counting the tries.
    In addition i have a three buttons , one is for login and the two others are not visible and they are a show main menu button and a exit button. For login button i had put a WHEN-BUTTON-PRESSED trigger in the login button and it must check if the user name and the password match what it is on the login table so it allow the user to see the show main menu button otherwise if the user name or the password are wrong and has been putted wrong for 3 times of trying then it will show the exit button.
    and this is a picture of the login form in the design view.
    http://www.al7loh.com/uploader/uploads/login.JPG
    and this is the code for theWHEN-BUTTON-PRESSED trigger on the login button
    declare
         alertNum number;
    dummy1 tbl_login.USER_NAME%type;
         dummy2 tbl_login.PASS%type;
    begin
         select tbl_login.USER_NAME, tbl_login.PASS into dummy1, dummy2 from tbl_login where tbl_login.USER_NAME = :LOGIN.USER_NAME and
         tbl_login.PASS = :LOGIN.PASS;
         if :LOGIN.TRIES<3 then
         if sql%found
              then
              set_item_property('LOGIN.SHOW_MENU', visible, property_true);
                                                                               set_item_property('LOGIN.SHOW_MENU', enabled, property_true);
                                                                               else
                                                                               message ('Invalid password....try again');
                                                                               :LOGIN.TRIES := :LOGIN.TRIES+1;
                                                                               :LOGIN.USER_NAME := null;
                                                                               :LOGIN.PASS := null;
                                                                                    end if;
         else
         message ('Exceeded Number of tries..press exit button');
              set_item_property('LOGIN.EXIT', visible, property_true);
                   set_item_property('LOGIN.EXIT', enabled, property_true);
         end if;
         end;
    can any one help me correcting the code of the WHEN-BUTTON-PRESSED trigger on the login form or can any one give me another code for using it in the login form.
    i hope to get some help from the experts>>> ??!?!?!?!?!

    Something like this
    declare
      alertNum number;
      dummy1 tbl_login.USER_NAME%type;
      dummy2 tbl_login.PASS%type;
    begin
      Begin
        select tbl_login.USER_NAME, tbl_login.PASS
        into   dummy1, dummy2
        from   tbl_login
        where  tbl_login.USER_NAME = :LOGIN.USER_NAME
        and    tbl_login.PASS = :LOGIN.PASS;
        set_item_property('LOGIN.SHOW_MENU', visible, property_true);
        set_item_property('LOGIN.SHOW_MENU', enabled, property_true);
      Exception
        When no_data_found Then
          if :LOGIN.TRIES<3 then
            message ('Invalid password....try again');
            :LOGIN.TRIES := :LOGIN.TRIES+1;
            :LOGIN.USER_NAME := null;
            :LOGIN.PASS := null;
            Go_Item( 'LOGIN.USER_NAME' ) ;
          else
            message ('Exceeded Number of tries..press exit button');
            set_item_property('LOGIN.EXIT', visible, property_true);
            set_item_property('LOGIN.EXIT', enabled, property_true);
          end if;
      end;
    end;Francois

  • Need some help from the management : A deeply dissatisfied customer

    Hi,
    I hope I am one of the very dissatisfied customers of you company. I bought a new T715 and it has already gone for a repair twice. I gave it for repair for the first time in october (ETA was 20 days and told by the service centre) and I got the phone after some 30days only after an intervention of a manager. Prior to that the customer care was saying that they do not have the parts and they have no idea about how much time the repair is gonna take. Surprisingly it took only 2day once the manager intervened.
    When I was submitting the phone on jan 14th 2011(work order number SE311MM110015), they again said that I'll get my phone back in 20 days. This time I expected that the service center guys will learn some thing from the past incidents and provide me a better service. But this time it was even worse. I did not hear from them for 35 days. So I called the customer care and had a long conversation with them on the service that is being provided but no-one including the floor supervisor(nishant) had a clue about what happening with my phone. I was startled by thier reply that they will start working on it as I have registered the complaint. Then I asked them what were they doing till now for which they had no idea. I asked for an escalation of this case to a manager which they refused. They said that I'll get an update after 48 working hours(5days).
    The episode continues. I called the help desk after 5days. Now their reply is that I will get my phone back on march 10 2011. So, it is some 57 days since the day i submitted the phone which is 3 times the ETA they promosed. Now when I ask them why is it taking so long I get the same reply as I got for the first time that they do not have parts. The I told them I cannot accept this kind of service from a company like sony erricsson for the second time. For this the floor supervisor harish said that If I want my phone back earlier they'll return the piece back to me without repairing and they are not responsible for this. This time I again asked for a managerial escalation which they again refused and asked me to call after 2 days. Can I atleast hope for a positive reply this time??
    I am perfectly okay with one device out of a lakh being defective. I understand this is the reason that you provide the customers a warranty. But I have some issues with the support which you are providing:
    1) Managerial escalations : I think I am entitled to talk to some one who can actually solve my issue when the lower level doesn't solve it in time. I do not understand why I am being denied the escalation which I did not find in any other support. They do not even provide me an email ID of a manager.
    2) Support process : What is the use of those processes in place where the people I am talking have no idea of what the next step should be. They do not have the database or knowledge of the previous cases. Even the floor supervisor have no aswers to the legitamate questions that the customer poses, they talk as if they are not responsible for these issues.
    3) Time taken: Taking some  days to provide the customer a mere update is not how a 21st century support should work.
    I hope you people agree with my ideas. And please I request all the managers who stumble upon this thread to reply and guide me about my next action.
    Thanks and Regards
    PRakash Josyula
    Work order number : SE311MM110015

    @management : Please help me... I did not get my phone back yet... this time they were saying that they will investigate into this case and this process can take 10 more days... When I asked for a manager escalation they dropped the call... And surprisingly they started dropping my calls which is not at all acceptable...
    Please managers... I need to talk to you... I need my phone back repaired....
    @others... Please lemme know a contact of a person in managerial cadre if you are ware of one...
    Plleeeeeeeeeeeeeeeeeeeeeeeeeese

  • HELP I need some help choosing the right laptop

    Hello there. I am a student and I am looking to buy a Apple laptop. I have around 700GBP to spend, but I do not wish to spend all of that. As I do not use Macs that often I dont think I need the newer Macbooks or the Macbook Pros as I feel that it is a waste of power. My friend said the 12" Powerbook was the way to go. There are several different models out there and I was wondering if anyone could help me choose one. It will be used mostly for word processing and admin based work, but I would like to have enough power to be able to run some graphic based activities. I wont be using high level apps that much but it would be nice to know if the opportunity was there, then i I have sufficient power to be able to run them. My friend said an 867mhz G4 with upgraded hdd and ram would do the trick, but I have found out that the specs range all the way up to 1.5ghz. I like the look of the powerbook and I have heard they are more reliable than an ibook which is why I dont really want to choose one of those. Thanks for any help!

    The biggest advantage of the 12PB is its portability, but you didn't include that in your specs.
    The graphics are very good for the small screen. If you need more intense graphics you should consider a larger screen.
    I use mine for mostly word processing and e-mail. I am also the IT guy in my small office and I manage networked PCs from my PB. I use an external monitor and screen spanning for extra work area. I thought long and hard before I bought my PB, as I had used PCs extensively all my life. The configuration that was recommended to you will work fine.

  • Need some help with the DOF Min Max Planning Logic

    Hello All,
    Morning...could someone please help us with this issue which we are facing in our production system.
    We are running the Dof Min Max Planning Report at the Subinventory level and for a given item.
    This item setup in this sub inventory has the Min qty : 2 , Max qty :2.
    --We don't see any open orders/ requisitions in the system for this item.
    --We also don't see any expected receipts for this item coming to this org/subinventory.. All the shipment lines are in Fully Received status.
    --We dont see any stuck supply records in mtl_supply table as well..and also checked for the Inv Transactions interface tables as well ( MTI , mtl_material_transactions_temp)..we dont find any stuck transactions for this item, subinventory & org.
    Now when we are running the Dof Min Max report is is showing the Supply Quantity as 2 and Available Quantity as 2.
    Hence the Reorder quantity is coming as Zero..basically it is not re stocking the item again for this subinventory level.
    Could someone please assist as to what could be reason why this Supply Quantity is showing some value when we dont see any stuck supply / expected open receipts..
    What else we need to check here to get this issue resolved and to know the source of the Supply Quantity.
    thanks

    In the report run, what parameters are considered as Supply?, Also did you check the supply data considering your cutoff dates offset?, the item what you are talking about is a buy item? check if there were requisitions already created.

  • I need some help on the mac mini...

    Ok I am almost completely sold on the Mac Mini... I just need a little help on
    the configureations. I want to know how big of a hard drive I should go with, and how much memory to get. I would mainly be using this Mac for my music collection (500 songs max) and a movie collection (20 movies). Any ideas? Thanks.

    What may be more cost effective is to get the smaller hard drive in the mini and get 2 external drives. It will 1) be much cheaper than getting a large internal HD for your comp 2) it will give you the opportunity to back up all your stuff, considering you should always have a backup 3) these external drives run at 7200rpm, whereas the drive in your mini runs at only 5400 rpm, thus meaning that you can access your files more quickly and your system will run faster. you can keep all your system stuff on the internal and if you get two external HD's, you can use one of them as the main drive to store your movies and such, and the second to back it all up. Bestbuy has 250GB firewire Western Digial Mybook external drives for $110 each, like
    http://www.bestbuy.com/site/olspage.jsp?skuId=7643071&type=product&productCatego ryId=pcmcat107700050005&id=1134698030480
    Also, I don't agree with the poster who said get as fast of a CPU as you can afford. The difference between the 1.66 and the 1.83 is negligible at best. The average user would never be able to tell the difference. The premium you are paying for is the upgrade from the combo drive to the superdrive. So, unless you plan on burning a bunch of DVD's, you don't really need the superdrive. AND if you plan on burning a lot of DVD's, you'd be better off with an external FW media drive anyways, because the superdrives are very finnicky.
    Buying two of these drives costs you less than upgrading to a 160 GB internal HD in the mini. SO, my advice would be to get the lower end model, with 2GB of RAM. Buy two of the external HDD's that I linked, and if you need a DVD burner, buy one like this
    http://www.newegg.com/Product/Product.aspx?Item=N82E16827136112
    To compare, Option 1 would be the 1.83 Mini with 2 gigs of RAM and the 160GB hard drive for $1249
    Option 2 would be the 1.66 Mini with 2 gigs of RAM and stock HD for $849 + $220 for two 250 GB external Firewire Hard drives + $65 for an external FW DVD burner = $1134
    In my opinion, option 2 blows option 1 out of the water. Also, i always recommend 2GB of RAM, but 1GB will probably be sufficient if you need to save some money.

  • Need some help understanding plugin for Outlook

    Testing out the 7.3 plugin for Outlook. I am not clear on how the flagging of spam/not spam etc. works. We have local IronPort devices. We are not cloud based. When a user flags a message as spam in the Inbox, the Admin Guide says Cisco updates the anti-spam filters so the user will not receive emails like this in the future. Not clear how this works. I understand the email is getting submitted to Cisco for analysis but how do they update spam filters for just that one user? I can understand if we were using a cloud device but as I said we have local hardware. Need to understand this process and the Admin Guide falls short of explaining it.

    Reporting spam/phish from Outlook via the plug-in only does that.  It is packaging up the message and sending the message example off to our @access.ironport.com address for submission from that end-user.  The plug-in itself is not actually doing any work to update the anti-spam on your appliance.  These submissions are a work by themselves that is submitted and then reviewed from the rules writing process.  In time, these submissions are scored, updated, and then written into the current IPAS (IronPort Anti-Spam) rules sets that are published back out to the ESA(s) themselves.  So - as long as your ESA is set to get updates (by default, each 5 minutes), then you will get the updated rules --- and these rules are for everyone globally.  
    Hope that helps!  If not - let me know.
    -Robert

  • Need some help with the colour profile please. Urgent! Thanks

    Dear all, I need help with the colour profile of my photoshop CS6. 
    I've taken a photo with my Canon DSLR. When I opened the raw with ACDSee, the colour looks perfectly ok.
    So I go ahead and open in photoshop. I did nothing to the photo. It still looks ok
    Then I'm prompt the Embedded Profile Mismatch error. I go ahead and choose Discard the embedded profile option
    And the colour started to get messed up.
    And the output is a total diasater
    Put the above photo side by side with the raw, the red has became crimson!!
    So I tried the other option, Use the embedded profile
    The whole picture turns yellowish in Photoshop's interface
    And the output is just the same as the third option.
    Could someone please guide me how to fix this? Thank you.

    I'm prompt the Embedded Profile Mismatch error. I go ahead and choose Discard the embedded profile option
    always use the embedded profile when opening tagged images in Photoshop - at that point Photoshop will convert the source colors over to your monitor space correctly
    if your colors are wrong at that point either your monitor profile is off, or your source colors are not what you think they are - if other apps are displaying correctly you most likely have either a defective monitor profile or source profile issues
    windows calibrate link:
    http://windows.microsoft.com/en-US/windows7/Calibrate-your-display
    for Photoshop to work properly, i recall you want to have "use my settings for this device" checked in Color Management> Device tab
    you may want to download the PDI reference image to check your monitor and print workflows
    and complete five easy steps to profile enlightenment in Photoshop
    with your settings, monitor profile and source profiles sorted out it should be pretty easy to pinpoint the problem...

  • Need some help tweaking the supersized jquery plugin

    Hi, I'm using this plugin http://www.buildintearnet.com/2010/11/supersized-3-0-full-screen-background-slideshow-jque ry-plugin/ on my site here - http://www.blackpaint.co.uk/new/
    The plugin cycles through as many images as yuo tell it to, when it reaches the last image it starts from the beginning again. I would like to make it through 3 images and then stop on the last.
    here is the code:
    <!--START SCRIPT FOR BG IMAGES CHANGE -->
         <script type="text/javascript" src="supersized3/supersized.3.0.js"></script>
         <script type="text/javascript"> 
              $(function(){
                   $.fn.supersized.options = { 
                        startwidth: 640, 
                        startheight: 377,
                        vertical_center: 1,
                        slideshow: 1,
                        navigation: 0,
                        thumbnail_navigation: 0,
                        transition: 1, //0-None, 1-Fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left
                        pause_hover: 0,
                        slide_counter: 0,
                        slide_captions: 0,
                        slide_interval: 200,
                        slides : [
                             {image : 'supersized3/slides/1.jpg'},{image : 'supersized3/slides/2.jpg'},
                             {image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},{image : 'supersized3/slides/3.jpg'},
                 $('#supersized').supersized();
         </script>
        <!--END SCRIPT FOR FONT BG IMAGES CHANGE -->
    As you can see, my clunky work-around is to simply to repeat the last image over and over again - not very elegant and I imagine it uses up the users RAM.
    Any suggestions of how to go about fixing this? Please note, I'm terrible with javascript syntax as of yet.
    Many thanks for any help,
    Luke

    I have an altered version of the .js file that is meant to be able to control playback etc. But it's not working for me if I just replace my existing file with this one (obviously).
    Any ideas on how to control this code? Here it is:
    (function($){
         //Resize image on ready or resize
         $.fn.supersized = function() {
              $.inAnimation = false;
              $.paused = false;
              var options = $.extend($.fn.supersized.defaults, $.fn.supersized.options);
              $.currentSlide = options.start_slide - 1;
              /******Set up initial images -- Add class doesnt work*****/
              //Set previous image
              var imageLink = (options.slides[options.slides.length - 1].url) ? "href='" + options.slides[options.slides.length - 1].url + "'" : "";
              $("<img/>").attr("src", options.slides[options.slides.length - 1].image).appendTo("#supersized").wrap("<a " + imageLink + "></a>");//Doesnt account for start slide
              //Set current image
              imageLink = (options.slides[$.currentSlide].url) ? "href='" + options.slides[$.currentSlide].url + "'" : "";
              $("<img/>").attr("src", options.slides[$.currentSlide].image).appendTo("#supersized").wrap("<a class=\"activeslide\" " + imageLink + "></a>");
              //Set next image
              imageLink = (options.slides[$.currentSlide + 1].url) ? "href='" + options.slides[$.currentSlide + 1].url + "'" : "";
              $("<img/>").attr("src", options.slides[$.currentSlide + 1].image).appendTo("#supersized").wrap("<a " + imageLink + "></a>");
              $(window).bind("load", function(){
                   $('#loading').hide();
                   $('#supersized').fadeIn('fast');
                   $('#controls-wrapper').show();
                   if (options.thumbnail_navigation == 1){
                        /*****Set up thumbnails****/
                        //Load previous thumbnail
                        $.currentSlide - 1 < 0  ? prevThumb = options.slides.length - 1 : prevThumb = $.currentSlide - 1;
                        $('#prevthumb').show().html($("<img/>").attr("src", options.slides[prevThumb].image));
                        //Load next thumbnail
                        $.currentSlide == options.slides.length - 1 ? nextThumb = 0 : nextThumb = $.currentSlide + 1;
                        $('#nextthumb').show().html($("<img/>").attr("src", options.slides[nextThumb].image));
                   $('#supersized').resizenow();
                   if (options.slide_captions == 1) $('#slidecaption').html(options.slides[$.currentSlide].title);//*********Pull caption from array
                   if (options.slide_autoplay == 0) $('#pauseplay').hide();
                   if (options.navigation == 0) $('#navigation').hide();
                   if (options.thumbnail_navigation == 0){ $('#nextthumb').hide(); $('#prevthumb').hide(); }
                   //Slideshow
                   if (options.slideshow == 1){
                        if (options.slide_counter == 1){ //Initiate slide counter if active
                             $('#slidecounter .slidenumber').html(options.start_slide);
                            $('#slidecounter .totalslides').html(options.slides.length); //*******Pull total from length of array
                        if (options.slide_autoplay == 1) slideshow_interval = setInterval(nextslide, options.slide_interval);
                        function resetSlideInterval() {
                             if (options.slide_autoplay == 1){
                                  clearInterval(slideshow_interval);
                                  if(!($.paused)) slideshow_interval = setInterval(nextslide, options.slide_interval);
                        if (options.thumbnail_navigation == 1){
                             //Thumbnail Navigation
                             $('#nextthumb').click(function() {
                                 if($.inAnimation) return false;
                                 nextslide();
                                 resetSlideInterval();
                                 return false;
                            $('#prevthumb').click(function() {
                                 if($.inAnimation) return false;
                                prevslide();
                                resetSlideInterval();                      
                                return false;
                        if (options.navigation == 1){ //Skip if no navigation
                             $('#navigation a').click(function(){ 
                                     $(this).blur(); 
                                     return false; 
                             //Slide Navigation
                            $('#nextslide').click(function() {
                                 if($.inAnimation) return false;
                                 nextslide();
                                  resetSlideInterval();
                                 return false;
                            $('#prevslide').click(function() {
                                 if($.inAnimation) return false;
                                prevslide();
                                resetSlideInterval();
                                return false;
                            $('#nextslide').mousedown(function() {
                                     $(this).attr("src", "images/supersized/forward.png");
                             $('#nextslide').mouseup(function() {
                                 $(this).attr("src", "images/supersized/forward_dull.png");
                             $('#nextslide').mouseout(function() {
                                 $(this).attr("src", "images/supersized/forward_dull.png");
                             $('#prevslide').mousedown(function() {
                                 $(this).attr("src", "images/supersized/back.png");
                             $('#prevslide').mouseup(function() {
                                 $(this).attr("src", "images/supersized/back_dull.png");
                             $('#prevslide').mouseout(function() {
                                 $(this).attr("src", "images/supersized/back_dull.png");
                             if (options.slide_autoplay == 1){
                                  //Play/Pause Button
                                  $('#pauseplay').click(function() {
                                       if($.inAnimation) return false;
                                       var src = ($(this).attr("src") === "images/supersized/play.png") ? "images/supersized/pause.png" : "images/supersized/play.png";
                                       if (src == "images/supersized/pause.png"){
                                            $(this).attr("src", "images/supersized/play.png");
                                            $.paused = false;
                                            slideshow_interval = setInterval(nextslide, options.slide_interval); 
                                       }else{
                                            $(this).attr("src", "images/supersized/pause.png");
                                            clearInterval(slideshow_interval);
                                            $.paused = true;
                                       $(this).attr("src", src);
                                       return false;
                                  $('#pauseplay').mouseover(function() {
                                       var imagecheck = ($(this).attr("src") === "images/supersized/play_dull.png");
                                       if (imagecheck){
                                            $(this).attr("src", "images/supersized/play.png");
                                       }else{
                                            $(this).attr("src", "images/supersized/pause.png");
                                  $('#pauseplay').mouseout(function() {
                                       var imagecheck = ($(this).attr("src") === "images/supersized/play.png");
                                       if (imagecheck){
                                            $(this).attr("src", "images/supersized/play_dull.png");
                                       }else{
                                            $(this).attr("src", "images/supersized/pause_dull.png");
                                       return false;
              $(document).ready(function() {
                   $('#supersized').resizenow();
              if (options.slide_autoplay == 1){
              //Pause when hover on image
                   $('#supersized').hover(function() {
                        if (options.slideshow == 1 && options.pause_hover == 1){
                             if(!($.paused) && options.navigation == 1){
                                  $('#pauseplay').attr("src", "images/supersized/pause.png");
                                  clearInterval(slideshow_interval);
                        if($.inAnimation) return false; //*******Pull title from array
                   }, function() {
                        if (options.slideshow == 1 && options.pause_hover == 1){
                             if(!($.paused) && options.navigation == 1){
                                  $('#pauseplay').attr("src", "images/supersized/pause_dull.png");
                                  slideshow_interval = setInterval(nextslide, options.slide_interval);
                             //*******Pull title from array
              $(window).bind("resize", function(){
                  $('#supersized').resizenow();
              $('#supersized').hide();
              $('#controls-wrapper').hide();
         //Adjust image size
         $.fn.resizenow = function() {
              var t = $(this);
              var options = $.extend($.fn.supersized.defaults, $.fn.supersized.options);
                return t.each(function() {
                   //Define image ratio
                   var ratio = options.startheight/options.startwidth;
                   //Gather browser and current image size
                   var imagewidth = t.width();
                   var imageheight = t.height();
                   var browserwidth = $(window).width();
                   var browserheight = $(window).height();
                   var offset;
                   //Resize image to proper ratio
                   if ((browserheight/browserwidth) > ratio){
                       t.height(browserheight);
                       t.width(browserheight / ratio);
                       t.children().height(browserheight);
                       t.children().width(browserheight / ratio);
                   } else {
                       t.width(browserwidth);
                       t.height(browserwidth * ratio);
                       t.children().width(browserwidth);
                       t.children().height(browserwidth * ratio);
                   if (options.vertical_center == 1){
                        t.children().css('left', (browserwidth - t.width())/2);
                        t.children().css('top', (browserheight - t.height())/2);
                   return false;
         function resetSlideInterval() {
              if (options.slideshow == 1){
                   clearInterval(slideshow_interval);
                  if(!($.paused)) slideshow_interval = setInterval(nextslide, options.slide_interval);
         //Slideshow Next Slide
         function nextslide() {
              if($.inAnimation) return false;
              else $.inAnimation = true;
             var options = $.extend($.fn.supersized.defaults, $.fn.supersized.options);
              var currentslide = $('#supersized .activeslide');
             currentslide.removeClass('activeslide');
             if ( currentslide.length == 0 ) currentslide = $('#supersized a:last'); //*******Check if end of array?
             var nextslide =  currentslide.next().length ? currentslide.next() : $('#supersized a:first'); //*******Array
             var prevslide =  nextslide.prev().length ? nextslide.prev() : $('#supersized a:last'); //*******Array
              $('.prevslide').removeClass('prevslide');
              prevslide.addClass('prevslide');
              //Get the slide number of new slide
              $.currentSlide + 1 == options.slides.length ? $.currentSlide = 0 : $.currentSlide++;
              /**** Image Loading ****/
              //Load next image
              loadSlide=false;
              $.currentSlide == options.slides.length - 1 ? loadSlide = 0 : loadSlide = $.currentSlide + 1;
              imageLink = (options.slides[loadSlide].url) ? "href='" + options.slides[loadSlide].url + "'" : "";
              $("<img/>").attr("src", options.slides[loadSlide].image).appendTo("#supersized").wrap("<a " + imageLink + "></a>");
              if (options.thumbnail_navigation == 1){
              //Load previous thumbnail
              $.currentSlide - 1 < 0  ? prevThumb = options.slides.length - 1 : prevThumb = $.currentSlide - 1;
              $('#prevthumb').html($("<img/>").attr("src", options.slides[prevThumb].image));
              //Load next thumbnail
              nextThumb = loadSlide;
              $('#nextthumb').html($("<img/>").attr("src", options.slides[nextThumb].image));
              currentslide.prev().remove(); //Remove Old Image
              /**** End Image Loading ****/
              //Display slide counter
              if (options.slide_counter == 1){
                  $('#slidecounter .slidenumber').html($.currentSlide + 1);//**display current slide after checking if last
              //Captions
             if (options.slide_captions == 1){
                  (options.slides[$.currentSlide].title) ? $('#slidecaption').html(options.slides[$.currentSlide].title) : $('#slidecaption').html('') ; //*******Grab next slide's title from array
             nextslide.hide().addClass('activeslide')
                  if (options.transition == 0){
                       nextslide.show(); $.inAnimation = false;
                  if (options.transition == 1){
                       nextslide.fadeIn(750, function(){$.inAnimation = false;});
                  if (options.transition == 2){
                       nextslide.show("slide", { direction: "up" }, 'slow', function(){$.inAnimation = false;});
                  if (options.transition == 3){
                       nextslide.show("slide", { direction: "right" }, 'slow', function(){$.inAnimation = false;});
                  if (options.transition == 4){
                       nextslide.show("slide", { direction: "down" }, 'slow', function(){$.inAnimation = false;});
                  if (options.transition == 5){
                       nextslide.show("slide", { direction: "left" }, 'slow', function(){$.inAnimation = false;});
             $('#supersized').resizenow();
         //Slideshow Previous Slide
         function prevslide() {
              if($.inAnimation) return false;
              else $.inAnimation = true;
              var options = $.extend($.fn.supersized.defaults, $.fn.supersized.options);
             var currentslide = $('#supersized .activeslide');
             currentslide.removeClass('activeslide');
             if ( currentslide.length == 0 ) currentslide = $('#supersized a:first');
             var nextslide =  currentslide.prev().length ? currentslide.prev() : $('#supersized a:last'); //****** If equal to total length of array
             var prevslide =  nextslide.next().length ? nextslide.next() : $('#supersized a:first');
              //Get current slide number
              $.currentSlide == 0 ?  $.currentSlide = options.slides.length - 1 : $.currentSlide-- ;
              /**** Image Loading ****/
              //Load next image
              loadSlide=false;
              $.currentSlide - 1 < 0  ? loadSlide = options.slides.length - 1 : loadSlide = $.currentSlide - 1;
              imageLink = (options.slides[loadSlide].url) ? "href='" + options.slides[loadSlide].url + "'" : "";
              $("<img/>").attr("src", options.slides[loadSlide].image).prependTo("#supersized").wrap("<a " + imageLink + "></a>");
              if (options.thumbnail_navigation == 1){
              //Load previous thumbnail
              prevThumb = loadSlide;
              $('#prevthumb').html($("<img/>").attr("src", options.slides[prevThumb].image));
              //Load next thumbnail
              $.currentSlide == options.slides.length - 1 ? nextThumb = 0 : nextThumb = $.currentSlide + 1;
              $('#nextthumb').html($("<img/>").attr("src", options.slides[nextThumb].image));
              currentslide.next().remove(); //Remove Old Image
              /**** End Image Loading ****/
              //Display slide counter
              if (options.slide_counter == 1){
                  $('#slidecounter .slidenumber').html($.currentSlide + 1);
              $('.prevslide').removeClass('prevslide');
              prevslide.addClass('prevslide');
              //Captions
             if (options.slide_captions == 1){
                  (options.slides[$.currentSlide].title) ? $('#slidecaption').html(options.slides[$.currentSlide].title) : $('#slidecaption').html('') ; //*******Grab next slide's title from array
             nextslide.hide().addClass('activeslide')
                  if (options.transition == 0){
                       nextslide.show(); $.inAnimation = false;
                  if (options.transition == 1){
                       nextslide.fadeIn(750, function(){$.inAnimation = false;});
                  if (options.transition == 2){
                       nextslide.show("slide", { direction: "down" }, 'slow', function(){$.inAnimation = false;});
                  if (options.transition == 3){
                       nextslide.show("slide", { direction: "left" }, 'slow', function(){$.inAnimation = false;});
                  if (options.transition == 4){
                       nextslide.show("slide", { direction: "up" }, 'slow', function(){$.inAnimation = false;});
                  if (options.transition == 5){
                       nextslide.show("slide", { direction: "right" }, 'slow', function(){$.inAnimation = false;});
                  $('#supersized').resizenow();//Fix for resize mid-transition
         $.fn.supersized.defaults = {
                   startwidth: 4, 
                   startheight: 3,
                   vertical_center: 1,
                   slideshow: 1,
                   navigation:1,
                   thumbnail_navigation: 1,
                   transition: 1, //0-None, 1-Fade, 2-slide top, 3-slide right, 4-slide bottom, 5-slide left
                   pause_hover: 0,
                   slide_counter: 1,
                   slide_captions: 1,
                   slide_interval: 5000,
                   start_slide: 1,
                   slide_autoplay:0,
    })(jQuery);

  • Need some help regarding the backgrounds

    I am new to adobe dreamweaver & I would like to ask some sort of a stupid question
    When I save a website over the net, the folder always contains the background & the other images as small tiny images while when using Dreamweaver if I want to use a background image, I just load it.
    My question is do they actually load the background image as small parts or the browser devides the image to smaller parts when saving the page?
    Thanks for ur help & I hope some 1 gonna answer me soon enough.

    If you (or someone else) use a repeating background image (128X128 for instance) the browser, per instructions from the HTML or CSS, will "tile" the same image over and over to create the background. This doesn't display multiple copies of the image, but references it over and over alongside and below itself until the page reaches it's end.
    One exception to this is when there is a single large image (1024X768 for instance) used as a background, which usually doesn't repeat. In that case, if you were to download it, it would download as the one large image.
    Another exception is if the image is cut into pieces and put back together in divs inside the page. Often this is done to create the illusion of an image in a layer above the page, unrestricted by the square dimensions of HTML layout.

  • Holla, I need some help with the mess I have created on my Mac.I deleted Mackeeper...now I have problems everywhere :/

    So the story goes, I for some reason thought it'd be smart to delete mackeeper, I guess not. Since I have done this, I now get survey pop ups, slow slow navigation of my mac and some of my itunes files have entirely vanished.... I put Mackeeper in the trash and deleted it along with the few things in there... before this started happening... I now apparently have to pay to have Mackeeper again? I thought Mac was great in the no virus department or am I an undercover genius and figured out how to properly mess up my Mac to the point that virus's have taken over? I also noticed I had a file convertor where I was able to watch my avi files through has disappeare, entirely no trace of the program.. Is this something I may be able to do or is the shop best off having it?

    Maybe the uninstalling wasn't done correctly. Did you follow these instructions?
    http://applehelpwriter.com/2011/09/21/how-to-uninstall-mackeeper-malware/
    If you didn't, you may need to re-install the dreaded MacKeeper and then uninstall it again following the above.

  • Need some help changing the Home icon name in Lion

    OK, I want to change the home icon name in Lion, I've been following these instructions to enable root user, BUT
    How to enable the root user
    OS X Lion
    From the Apple menu choose System Preferences....
    From the View menu choose Users & Groups.
    Click the lock and authenticate as an administrator account.
    Click Login Options....
    Click the "Edit..." or "Join..." button at the bottom right.
    Click the "Open Directory Utility..." button.
    Click the lock in the Directory Utility window.
    Enter an administrator account name and password, then click OK.
    Choose Enable Root User from the Edit menu.
    Enter the root password you wish to use in both the Password and Verify fields, then click OK.
    After I get to step 6, the director utility opens... the lock is already unlocked, I click it and it locks, click it again, enter my admin password... but there is no option to "Enable Root User" I only see a list of services "Active Directory", "LDAPv3" & "NIS". I'm lost, and I don't want to screw anything up here! Thanks for the help!
    Dan O

    You're looking in the wrong place. After you click the padlock, forget about that window and go to the menubar, top of your screen where it says
    Directory Utility | File | Edit | Help
    From the Edit menu choose 'enable root user'
    Message was edited by: softwater

  • Need some help regarding the component usage

    Dear ALL,
    I have one scenario something like this .
    I have a main component say ZComp1  and in it i have created one view in which we two drop downs and i have 28 view containers depending upon the drop down values these view containers will be visible here all the view container i am using for displaying by means of component usage (i.e 28 compoenents i am calling into my main ). So now when i run my main application it is taking minimu of 2 mins to display the screen .  To test whats the problem i have written some code in the handle default of main window and  set the break point what i observed is quite surprising that when i run the apllication it takes hardly 2 mins of time to reach my handledefault method (which is the first one to trigger when i run the apllicatin) . Please suggest me what can be doen to overcome this issue. or suggest some alternative to improve  performance.
    Note : When there is less amount of data in the screen then it takes less time to execute or else it takes hell lot of time plz suggest :(.
    Awaiting for your valuable suggestions.
    Regards,
    Sana.

    Hi Misbah,
    28 VCO are too much in  a view.
    So, try to revamp teh design and reduce the VCO's in a view.
    Another thing would be, Every WDDOINIT, and WDDOMODIFY view of the used components would be called when you try to load the component at first.
    In your case that is happening, and please check and confirm it.
    A proper modular design would be a better approach in handling the situation.
    Good day!
    Regards,
    Shashikanth. D

Maybe you are looking for

  • Reboot at a specific time not working in Yosemite?

    Since moving a couple of our servers to Yosemite I have been unable to get them to actually reboot at a specific time as requested via System Preferences > Energy Saver > Schedule. 10.9 servers reboot on their own fine. 10.10 has required a manual re

  • SAx Output non XML Compliant (Part 2)

    This is the question I asked before: http://forum.java.sun.com/thread.jsp?forum=34&thread=471553&tstart=0&trange=15 my doubt is: what happens when the & character appears in the input data? I.e. not written by me in the XSLT styleSheet. Is there anyt

  • Database hangs after retrieving some records....

    hi, I create a two level B+-tree index, for the first level i'm using key as logical database name, for the second level B+-tree i'm using some other field in my data. I am retrieving the records based on logical database name. I am using C++ to impl

  • How do I burn a pdf file onto a CD?

    I have tried to export a pdf file created in pages to a CD in order to take to a local kinkos for printing. I am a new apple (macbook) owner and just can't figure out how to do it. Any suggestions? thanks

  • Content window not opening in Firefox 11

    Firefox 11.0. Windows XP. I open the options under tools. I can open all the tabs except for the 'content' window. I click on it and the last opened window (advanced or any others) stays. It will not open. Tried opening and closing the window and sti