If a variable is declared in d for loop, can it be used afterloop exits?

pls someone explain this to me!

Do you remember The Green Phantom?i know a girl who has one..
its long, vibrates at 4 speeds?Well, I suppose your breath is fresher when she uses it versus when ...
No, I can't post that. [CANCEL]

Similar Messages

  • If I buy Lightroom for PC, can I still use it if I switch to a Mac in the future?

    If I buy Lightroom for PC, can I still use it if I switch to a Mac in the future?
    I want to use Lightroom now, but don't want to pay for it again if I start using a Mac.

    Yes, LR is cross-platform.
    Mylenium

  • If I purchase an app for iphone can that be used for ipad as well?

    If I purchase an app for iphone can that be used for ipad as well? or viceversa..? If yes, can I retrieve the same app when I purchase a new iphone (ofcourse I maintain the same app id) free of cost?

    Some can, some cannot. Most iPhone apps can be used on an iPad (though not all), but the reverse is true less often. Check the specifications and system requirements for the app you're interested in. You can easily add the app, presuming it's compatible, of course, to any new iPhone without additional charge either by synching it from iTunes or by downloading the app again from the iTunes Store.
    Regards.

  • I have license for cs5.5 for mac  - can I also use this same license to install cs5.5 on a windows pc?

    I have license for cs5.5 for mac  - can I also use this same license to install cs5.5 on a windows pc?

    No. Serial numbers are platform specific and you can't have both with a single license. Only Creative Cloud is cross-platform.
    Mylenium

  • Initializing more than one variable of different types in for-loop

    I know it is possible to initialize two variables of the same type in a for-loop like this:
    for(int i=0, j=0;i<=word.length/2;i++){}
    However, I'm trying to initialize two variables of different type in the initialization of for-loop. And the IDE won't let me do it..
    for(int i=0, double j=0;i<=word.length/2;i++){}
    Is it even possible to do initialize two variables of different type?

    Well, just for fun, you can write very generalized for loop. you can do it in a complicated way though.
    But, for god sake, why would you do that?
                 boolean someboolean = true;
              for(Object i=new Integer(0),j=new Double(1);someboolean;i=(Integer)i+1){
                   j =(Double)j + 1;
                   if((Double)j>3)
                        someboolean = false;
                   System.out.println("i: "+i+" j: "+j+" someboolean:"+someboolean);
              }

  • Variable not defined after running for() loop.

    Hi,
    I have a little problem, I have created a for loop, which seems to work, except that a variable within the for() loop gets lost, because if I try to call the variable after the loop, it says it's not there. anyway, here is my code, followed by the error. Thanks!
    <%
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:testdb");
    Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
    String sql_count = "SELECT COUNT(*) FROM users";
    ResultSet cn = stmt.executeQuery(sql_count);
    cn.first();
    int row_count = cn.getInt(1);
    int num = (int)(Math.random() * (row_count));
    int inum;
    for (inum=0; inum<row_count; inum++)
    int jnum = inum + num;
    if (jnum >= row_count) { jnum = 1; }
    String sql = "SELECT * FROM users WHERE ID = "+jnum+"";
    ResultSet rs = stmt.executeQuery(sql);
    int ce = rs.getInt("cr_earned");
    int cu = rs.getInt("cr_used");
    if ((ce-cu) > 0) { inum = row_count + 1; }
    String sql = "SELECT * FROM users WHERE ID = "+jnum+"";
    ResultSet rs = stmt.executeQuery(sql);
    rs.first();
    String url = rs.getString("url");
    con.close();
    %>
    ***********************ERROR***********************
    Generated servlet error:
    C:\tomcat\jakarta-tomcat-4.0\work\localhost\examples\gtt\surf$jsp.java:93: Undefined variable or class name: rs
    rs.first();
    ^
    An error occurred between lines: 17 and 43 in the jsp file: /gtt/surf.jsp
    Generated servlet error:
    C:\tomcat\jakarta-tomcat-4.0\work\localhost\examples\gtt\surf$jsp.java:94: Undefined variable or class name: rs
    String url = rs.getString("url");
    ^

    now i've defined them all before the loop and I get this error. Error is following modified code below.
    <%
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:testdb");
    Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
    String sql_count = "SELECT COUNT(*) FROM users";
    ResultSet cn = stmt.executeQuery(sql_count);
    cn.first();
    int row_count = cn.getInt(1);
    int num = (int)(Math.random() * (row_count));
    int inum;
    int jnum;
    ResultSet rs;
    for (inum=0; inum<row_count; inum++)
    jnum = inum + num;
    if (jnum >= row_count) { jnum = 1; }
    String sql = "SELECT * FROM users WHERE ID = "+jnum+"";
    rs = stmt.executeQuery(sql);
    int ce = rs.getInt("cr_earned");
    int cu = rs.getInt("cr_used");
    if ((ce-cu) > 0) { inum = row_count + 1; }
    rs.first();
    String url = rs.getString("url");
    con.close();
    %>
    ***********ERROR***************
    An error occurred between lines: 17 and 45 in the jsp file: /gtt/surf.jsp
    Generated servlet error:
    C:\tomcat\jakarta-tomcat-4.0\work\localhost\examples\gtt\surf$jsp.java:95: Variable rs may not have been initialized.
    rs.first();
    ^
    Thanks anyone.... ;-)

  • Passing a variable's associated number between "for" loops & functions?

    Hi,
    I seem to be having a problem understanding how variable information can be passed between functions and arrays.
    I have variable "grab" set up as a Number.
    var grab:Number;
    My intent (I'll do my best to explain) is to have a number "attached" to grab when it is first mentioned in this function, itemClick.
    These should be all the relevant arrays:
    clickItemArray = [scene_Camp.wood, scene_Ax.ax]
    itemUsableArray = [wood2, ax2]
    sceneGuyArray = [scene_Camp.guy_Camp, scene_Ax.guy_Ax]
    function itemClick(event:MouseEvent) {
                    for (grab = 0; grab<clickItemArray.length; grab++) {
                            if(clickItemArray[grab].hitTestPoint(mouseX, mouseY, true)) {
                                    addEventListener(Event.ENTER_FRAME, itemRemoval);
                                    sceneGuyArray[grab].gotoAndPlay("guy_Notice");
                                    trace("guy_Notice");
    I would like to have the number established with grab (it would either be a 0 or 1, as clickItemArray,  sceneGuyArray, and itemUsableArray) be able to be passed into the next relevant function, itemRemoval. I was hoping to use variables so I could use the same function for whatever item was clicked upon. For example, if the clickItemArray item was 1 (the ax), then sceneGuyArray[grab] would = 1, and the right frame would play. That number 1 would be transferred to function itemRemoval, where it would constantly be listening for sceneGuyArray[1] also (where "1" would have been established through the initial "grab" in the first function), and react accordingly.
    function itemRemoval(event:Event) {
                    for (var grab2:uint = grab; grab2<sceneGuyArray.length; grab2++) {
                        if (sceneGuyArray[grab2].currentLabel == "guy_NoticeDone") {
                            //removeEventListener(Event.ENTER_FRAME, itemRemoval);
                            trace("cheese");
    I can't get the trace working, though. I'm sure I'm doing something wrong with "for" loops or the if statement.
    Naturally, help would be appreciated.

    I do have an unrelated question, if you happen to see this...
    Is there a way to "nest" for loops? (maybe there's a better term)
    For example, this is part of a function I have
    } else if (canClickBoo == false) {
                            //for the click array
                            for (var u:uint=0; u<clickToXArray.length; u++) {
                                //disable the mouse
                                clickToXArray[u].mouseEnabled = false;
                                clickToXArray[u].buttonMode = false;
                            for (var l:uint=0; l<clickFromXArray.length; l++) {
                                clickFromXArray[l].mouseEnabled = false;
                                clickFromXArray[l].buttonMode = false;
                            for (var o:uint=0; o<clickItemArray.length; o++) {
                                //enable items to be clicked
                                clickItemArray[o].mouseEnabled = false;
                                clickItemArray[o].buttonMode = false;
    Obviously each "for" loop does the same thing, set the items of each array "false" (make them unclickable if "canClickBoo" is false). In case each array has a different length, though, I can't just use a single "for" loop (afaik).
    I'm wondering if, based on what you see (naturally I can post more), I can simplify the code.

  • No active internet for ATV can i still use it?

    Im in Afghan and our internet is ********, so we cant connect ipod's, phones ect. can i still use apple tv by just plugging in a cat 5 cable to it and just stream what i have on my itunes?

    Unfortunately if these items have been purchased at itunes store and have DRM it won't work as AppleTV 2 needs to authorise across the internet for playback which is highly inconvenient when they'll play on iTunes in the  computer fine.  Airplay from an Ipad or iPhone won't work for the same reasons.
    If they are non-DRM protected 'home made' content it might work but cannot be guaranteed.
    AC

  • Append string to variable in each iteration of for loop in Powershell.

    Thanks so much I was able to get it working with the following command!
    PowershellGet-Mailbox | where {$_.Name -eq "admin"} | foreach-object {Set-Mailbox -Identity $_.Name -DisplayName "$($_.DisplayName) ABBREVIATION"}
    As for their reasoning behind wanting multiple mailboxes, they seem to be wanting to operate as 2 separate entities still. So their old clients still work with them under the old company name and they are paranoid about having names crossover mistakenly. We did try to get them to switch over to 1 mailbox and demonstrated it for them, but this is what they requested.

    I have to ask - why keep two separate mailboxes for each user rather than just have one mailbox with multiple addresses?But yes, you can concatenate just like other languages. You have two problems currently -
    1. You aren't referencing anything with "$.DisplayName". You need to use "$_.DisplayName" and you need to use it in a Foreach-Object script block.2. You need to pass the concatenated string as a single argument to the -DisplayName parameter. There are several ways to do this but the problem you're having is because there is whitespace in your argument.
    PowershellGet-Mailbox | where {$_.Name -eq "admin"} | foreach-object {Set-Mailbox -DisplayName ($_.DisplayName + ' ABBREVIATION')}#ORGet-Mailbox | where {$_.Name -eq "admin"} | foreach-object {Set-Mailbox -DisplayName "$($_.DisplayName)ABBREVIATION"}

  • Catch problem for JSPs, can't i use Oracle9iAS for our  Application ?

    Hi,
    I have deployed .ear file by using OC4J. I am facing catch problem, in defferent situations.
    1. We used pager tag library for search nagivation, it is not working proper.
    2. 'Creation of new object(in my case enterprise,certificate,role etc.)' is not working
    properly. What ever i try to create it is giving Error in
    TrainiumPKCallBean :javax.ejb.DuplicateKeyException: Entity already exists
    3. And some of my pages not giving proper results, but if i edit that .jsp file, then it
    gives correct request for that time. If i want correct result, then again i have to edit and
    save that page.
    I belive all the above problems are coming due to catch.
    If this problem continues, we can't use Oralce9iAs.
    please give me solution..
    thanks in advance
    srinivas.

    Hi Srinivas,
    I must admit, I had difficulty understanding your question. With your
    permission, I'll try and rephrase it. Hopefully I have understood it
    correctly, and can offer something constructive.
    I assume that "TrainiumPKCallBean" is a CMP entity bean. You are invoking
    the "create()" method in that bean's home interface from your JSP, correct?
    When you invoke the "create()" method of a CMP entity bean's home interface,
    OC4J will try and insert a row into the relevant database table(s).
    A "DuplicateKeyException" means that OC4J is trying to insert a row
    that has a primary key of an already existing row in the database
    table. The only way to avoid the "DuplicateKeyException" is either
    try to use a different primary key value, or delete the row from the
    database table with the primary key that you are trying to insert.
    So I suppose that by editing the JSP, you are changing the primary
    key value to something that doesn't already exist in the database.
    Unfortunately, based on the (lack of) information you have supplied,
    I can't offer anything else -- sorry {:-(
    If you wouldn't mind supplying the following information -- it may
    help me to help you solve your problem(s).
    1. Version of OC4J
    2. JDK version
    3. Operating system
    4. Complete error message and stack trace
    5. Part(s) of the code that are causing the problem
    Good Luck,
    Avi.

  • Didn't update my Leopard for long, can I just use the latest update?

    Hi guys, I'm not so long on Mac, so don't know the details, i work with music offline on my Leopard, and didn't update it for long, now wanna do it, can I just download the latest update or I should have all the previous ones, as my system now is 10.5.2?
    Thank you

    Hi Eustace, I believe that it should be possible to download a dmg on a Windows machine and then transfer it to a Mac and run it, although I must admit I've never done it--I have downloaded Windows installers on my Mac and transferred them to WindowsXP and Vista, and run them without a problem (although some sites make it difficult because they check your OS and send you to the downloader for the OS you are booted in--I seem to recall one where it simply would not ever let me download what I wanted). I wouldn't recommend this for the OP though--I really think the best bet is to have the Mac connected to the Internet and run Software Update, so that all the updates needed are available and get run. Once the first batch are run and the computer restarts, one would then run Software Update again to see if other updates then become available...something that happens quite often. The OP would have to know all the updates that are available and needed on the Mac beforehand, then find the stand-alone updaters for each one and download them, and still wouldn't find out what other ones might be needed after running the first batch.
    Francine
    Francine
    Schwieder

  • Bought CS6 for mac, can I also use it on my windows laptop?

    Hello,
    I bought CS6 for my mac desktop and was wondering if I can also install it on my windows 8 laptop? If this is possible, how would I go about this?
    I use my laptop for uni and have recently found out it would be a great help if I had CS6 when I'm on the go.
    Cheers.

    Hi Emmma_
    Welcome to Adobe Forums
    In order to use CS6 for Windows , we need a Platform Swap .
    You can follow the below mentioned link and it will give a clear information about the same -
    http://helpx.adobe.com/x-productkb/policy-pricing/order-product-platform-language-swap.htm l
    You can also contact Adobe via the link mentioned below  for performing Swap .
    http://www.adobe.com/support/download-install/supportinfo/
    Let us know if that helps !
    Thanks
    Garima

  • Buy an App for iPhone can i also use it on iPad ?

    At the moment i have my Mac Book Pro and an iPad2, i am soon to get an iPhone as well ....
    I have been browsing through the iTunes App Store i fancy buying Pages and Numbers, i already have and use these on my MacBookPro, so if i buy these two apps for my (soon to be mine) iPhone can i use the same apps on my iPad2 as well, without buying them again ?
    I bet this is the dumbest question of the day, because i would hope that one copy of each should be enough !.  It must surely work along the same lines as buying music albums in iTunes, i can share the same albums across all of my devices !!!!!
    tim

    There is no device limit for the number of iPods, iPads, and iPhones that can be synced with the same iTunes library and iTunes account on the same computer, and this included 3rd party apps for the iPod Touch, iPad, and iPhone.

  • T500 - HDD for Ultrabay - can it be used for Recovery Media & Backups & Page File & data?

    I'm learning to check first before buying things.
    I am considering getting a generic ultrabay SATA adapter
    http://cgi.ebay.com/SATA-adapter-IBM-THINKPAD-43N3412-R400-W500-X200S-R500-/130441260492
    and a WD 7,200 HDD
    http://www.newegg.com/Product/Product.aspx?Item=N82E16822136278
    Can the ultrabay HDD be used for Recovery Media, and also Backups, page file, and other data?
    And can the Backups on this HDD be deleted, so only the last backup is present?
    Also, is it possible to use a HDD in the ultrabay slot, without an adpater?  My T500 is a desktop replacement currently, so the HDD wouldn't need to be protected from movement or bumps.
    Thanks for any ideas

    For all of you who know less than I do,  a HDD in the ultrabay slot can be used as a Recovery boot, and for the R&R backups.
    These must both be put on the primary partition of the HDD.
    I believe, but can't test or confirm, that another partition (logical partition) could be added to the drive and used for page filing and data.

  • So close but need help comparing strings in different subforms with for loop - Livecycle ES

    For some reason I was not able to post this in the Livecycle ES forum, even though I've posted there often in the past.
    I have created a form that I almost have working and I'm hoping someone can help me.
    We have eight billing teams in our company and each team works anywhere from 1 - 4 different clients. The form is used to track, per Billing Rep, the number of items of mail that each billing r5ep works each day. What I'm needing to add at the bottom is a subform that tracks the totals by client. So I'm trying to get the form to loop through all of the existing subforms (and the subforms within them) and compare a cell int he bottom subform to a cell in the other subforms, which are dynamically added, and then total ONLY those items. My script however is not working.
    What I have now is:
    var repCount = form1.P1._rep.count
    var itemCount = form1.P1.rep._ItemSet.count
    for (x=0; x<repCount; x++)
         for (i=0; i<itemCount; i++)
              if(clientName.rawValue == P1.rep[x].ItemSet[i].client.rawValue)
              this.rawValue = this.rawValue + P1.rep[x].ItemSet[i].corresp.rawValue;
    It seems like this should work but I'm getting the following error:
    P1.rep[x] is undefined
    So what it looks like is I'm missing is the proper way to reference the objects in these subforms.
    The form is here: https://acrobat.com/#d=20gWXZ4sBm4OPV6oO76zSg
    If someone could take a look at it I would be so grateful.
    Thanks,
    Jo

    I don't know that anyone else will ever have a similar problem as what I was having, but I figured I would go ahead and post the solution, just in case....
    The error I was getting (P1.resolveNode("rep[" + j + "].ItemSet[" + i + "]") is null) was occuring because the variable itemCount needed to be referenced within the repCount For Loop. I also needed to resolve the node for the itemCount, which I wasn't doing.
    So...my old code was this:
    var repCount = P1._rep.count;
    var itemCount = P1.rep._ItemSet.count;   //this part was throwing the error. Needed to use resolveNode...and needed to not declare the variable until inside the first For Loop.
    var nTotal = 0;
    for (var j=0; j<repCount; j++) {
        for (var i=0; i<itemCount; i++)    {
            if (P1.resolveNode("rep["+ j +"].ItemSet["+ i +"]").client.rawValue == clientName.rawValue) {
                nTotal = nTotal + P1.resolveNode("rep["+ j +"].ItemSet["+ i +"]").corresp.rawValue;
    this.rawValue = nTotal;
    ...which wasn't working because it was trying to reference the count of the ItemSet right up front...but it needed to wait until it got inside the first iteration of the repCount subfields...AND it needed to have resolveNode used.
    The corrected code is:
    var repCount = P1._rep.count;
    this.rawValue = 0;
    for (var j=0; j<repCount; j++) {
        var itemCount = P1.resolveNode("rep["+j+"]")._ItemSet.count;  //corrected code...node is resolved and variable is declared within the first subform repCount.
        for (var i=0; i<itemCount; i++)    {
            if (P1.resolveNode("rep["+ j +"].ItemSet["+ i +"]").client.rawValue == clientName.rawValue) {
                this.rawValue = this.rawValue + P1.resolveNode("rep["+ j +"].ItemSet["+ i +"]").corresp.rawValue;
    ...which now works perfectly...and I'm throwing a party to celebrate! LOL
    Jo

Maybe you are looking for

  • IPhone stolen less than 24 hours after taking it out of the box

    Hello, Thursday night I took my brand-new iPhone 4S out of its box. Later that night, I was out with a friend at a bar. Someone must have seen me using it at some point during the evening; . I was ambushed in a bathroom stall, assaulted and had my ph

  • Why your backups are so slow and what you can do about it.

    So you know your backup us slow and want to know what's wrong. Here it is: 1) Transferring files from the iPad to your computer happens at an unacceptably slow rate of ~100 KBytes per second, even though it is connected via USB2. (You are using a USB

  • I purchased my membership, can't get my site to launch.

    Muse is asking me to buy a new membership to get 5 sites with Adobe business Catalyst, but I already paid for a membership this year. How do I fix this problem?

  • USB Printing - client-error-request-value-too-long

    A little while back, my iSight suddenly stopped working and so I did a full format and reinstall to 'fix' the problem. The problem wasn't 'fixed' through this action. Instead, I had to disconnect power and let the computer sit there for a bit and thi

  • What can i do for creating view on a public synonym?

    Hi people, I have create a public synonym for other users object as, SQL> create public synonym pdep for scott.dept; Synonym created. then i tend to create a view on this public syn as, SQL> create view vpdep as select * from pdep; create view vpdep