Search Results

Search found 13563 results on 543 pages for 'condition variable'.

Page 13/543 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • flex debugger (how to retrieve a session variable set by a browser)

    - by Rees
    hello, i'm creating a flex application and trying to debug using the "Network Monitor" view. The script i'm debugging fetches a PHP session variable (the PHP outputs xml) and the actionscript retrieves the value from the HTTPService event. if I am using say a chrome browser, i can correctly retrieve the session variable ANY TIME. if I switch to say a firefox browser, then clearly the chrome session variable is unavailable to firefox. My issue is that I create the session variable with say chrome, and then try to retrieve my session variable from my FLEX application debugger (which always returns null) -when I really want it to return my session variable. is there a way for my flex debugger to retrieve this session variable set by chrome (or any browser)? (I'm even using chrome as my debugging browser for flex)

    Read the article

  • xsl - multiple xsl:if with the same condition

    - by mickthomposn
    Newbie question on xslt. I've multiple xsl:if checks like <xsl:if test="node/node1"> ...</xsl:if> ... <xsl:if test="node/node1"> ...</xsl:if> ... <xsl:if test="node/node1"> ... </xsl:if> Is there a way to parameterize the test condition to make the code more readable and easy to maintain? Maybe with a variable or something like <xsl:variable name="node1Present" select="true()"/> <xsl:if test="$node1Present"> ... </xsl:if> I don't understand how to construct the variable to reflect the 'test a node exist' (test="node/node1")

    Read the article

  • What's the scope of a Python variable declared in an if statement?

    - by froadie
    I'm new to Python, so this is probably a simple scoping question. The following code in a Python file (module) is confusing me slightly: if __name__ == '__main__': x = 1 print x In other languages I've worked in, this code would throw an exception, as the x variable is local to the if statement and should not exist outside of it. But this code executes, and prints 1. Can anyone explain this behavior? Are all variables declared in a module global/available to the entire module?

    Read the article

  • What exactly is a variable in C++?

    - by FredOverflow
    The standard says A variable is introduced by the declaration of an object. The variable's name denotes the object. But what does this definition actually mean? Does a variable give a name to an object, i.e. are variables just a naming mechanism for otherwise anonymous objects? Or is a variable the name itself? Or is a variable a named object in the sense that every variable is also an object? Or is a variable just a "proxy" with a name that "delegates" all operations to the real object? To confuse things further, many C++ books seem to treat variables and objects as synonyms. What is your take on this?

    Read the article

  • Good abbreviations for XML ... things

    - by Peter Turner
    I've never been very good at maintaining a coherent bunch of variable names for interfacing with XML files because I never name the variables in my interfaces the same way across my source. There are Elements, Attributes, Documents, NodeLists, Nodes, DocumentFragments and other stuff. What's a good scheme for keeping track of this stuff as variables? Is there a standard in regard to Hungarian notation? Do you even put anything signifying that the data is actually XML, is this bad practice?

    Read the article

  • Is there an excuse for short variable names?

    - by KChaloux
    This has become a large frustration with the codebase I'm currently working in; many of our variable names are short and undescriptive. I'm the only developer left on the project, and there isn't documentation as to what most of them do, so I have to spend extra time tracking down what they represent. For example, I was reading over some code that updates the definition of an optical surface. The variables set at the start were as follows: double dR, dCV, dK, dDin, dDout, dRin, dRout dR = Convert.ToDouble(_tblAsphere.Rows[0].ItemArray.GetValue(1)); dCV = convert.ToDouble(_tblAsphere.Rows[1].ItemArray.GetValue(1)); ... and so on Maybe it's just me, but it told me essentially nothing about what they represented, which made understanding the code further down difficult. All I knew was that it was a variable parsed out specific row from a specific table, somewhere. After some searching, I found out what they meant: dR = radius dCV = curvature dK = conic constant dDin = inner aperture dDout = outer aperture dRin = inner radius dRout = outer radius I renamed them to essentially what I have up there. It lengthens some lines, but I feel like that's a fair trade off. This kind of naming scheme is used throughout a lot of the code however. I'm not sure if it's an artifact from developers who learned by working with older systems, or if there's a deeper reason behind it. Is there a good reason to name variables this way, or am I justified in updating them to more descriptive names as I come across them?

    Read the article

  • Generalise variable usage inside code

    - by Shirish11
    I would like to know if it is a good practice to generalize variables (use single variable to store all the values). Consider simple example Strings querycre,queryins,queryup,querydel; querycre = 'Create table XYZ ...'; execute querycre ; queryins = 'Insert into XYZ ...'; execute queryins ; queryup = 'Update XYZ set ...'; execute queryup; querydel = 'Delete from XYZ ...'; execute querydel ; and Strings query; query= 'Create table XYZ ... '; execute query ; query= 'Insert into XYZ ...'; execute query ; query= 'Update XYZ set ...'; execute query ; query= 'Delete from XYZ ...'; execute query ; In first case I use 4 strings each storing data to perform the actions mentioned in their suffixes. In second case just 1 variable to store all kinds the data. Having different variables makes it easier for someone else to read and understand it better. But having too many of them makes it difficult to manage. Also does having too many variables hamper my performance?

    Read the article

  • If Variable = True show this, else show this [on hold]

    - by Tim Marshall
    If my variable of $userLoggedIn is true, the <?php if ($userLoggedIn == 'true') : ?> works perfect, however if the variable is false, the <?php if ($userLoggedIn == 'false') : ?> does not work at all. How do I resolve this problem? <?php $EditingWagesPage = false; $userLoggedIn = false; ?> <!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]--> <!-- BEGIN HEAD --> <?php if ($userLoggedIn == 'true') : ?> <head> ** HEADER STUFF ** </head> <body> ** BODY STUFF ** </body> <?php endif;?> <?php if ($userLoggedIn == 'false') : ?> <head> </head> <body> hiya </body> <?php endif;?> </html>

    Read the article

  • What is The Loop Variable After a For Loop in Delphi?

    - by Andreas Rejbrand
    In Delphi, consider var i: integer; begin for i := 0 to N do begin { Code } end; One might think that i = N after the for loop, but does the Delphi compiler guarantee this? Can one make the assumption that the loop variable is equal to its last value inside the loop, after a Delphi if loop? Update After trying a few simple loops, I suspect that i is actually equal to one plus the last value of i inside the loop after the loop... But can you rely on this?

    Read the article

  • Condition in ASP Repeater

    - by Abdel Olakara
    Hi all, I am trying to put a condition into my ASP repeater tag. I have a table being created and one of the td items is a link. The problem is I need to create a link upon checking the value in one the variable that is in the repeater container. Here is my code: <td><%#((VWApp.Code.TrackDM)Container.DataItem).CdNo%></td> <td><%#((VWApp.Code.TrackDM)Container.DataItem).ShippingNo%></td> Now i need to check the value of ShippingNo and rather than displaying it need to display a link. i tried to write an if condition like this: if(((VWApp.Code.TrackDM)Container.DataItem).ShippingNo. .. ) { // do processing and generate a link that needs to displayed } But i get error when trying to do this. Can anybody guide me to the right way of doing this? Any ideas and suggests are highly appreciated.

    Read the article

  • can i separate JavaScript If condition?

    - by Abdulrahman Ishaq
    in PHP we can put HTML between codes like this: <?php if (condition) { ?> <p>True</p> <?php } else { ?> <p>True</p> <?php } ?> can we do this in javascript ? like this ? <script language='JavaScript'> if (condition) { </script> <p>True</p> <script language='JavaScript'> } else { </script> <p>True</p> <script language='JavaScript'> } </script>

    Read the article

  • Array.BinarySearch where a certain condition is met

    - by codymanix
    I have an array of a certain type. Now I want to find an entry where a certain condition is met. What is the preferred way to do this with the restriction that I don't want to create a temporary object to find, but instead I only want to give a search condition. MyClass[] myArray; // fill and sort array.. MyClass item = Array.BinarySearch(myArray, x=>x.Name=="Joe"); // is this possible? Maybe is it possible to use LINQ to solve it?

    Read the article

  • In MSSQL, how do I create a reference variable to a table?

    - by Jón Trausti
    Hello. I'm currently using sp_executesql to execute a T-SQL statement with a dynamic table name. However, it is really ugly to see something like: set sql = 'UPDATE '+Table_Name+' SET ... WHERE '+someVar+' = ... AND '+someVar2' = ...' sp_executesql sql What I would rather like to have is a TABLE variable of which is a reference to a table, so I could do for example: UPDATE TableRef SET ... WHERE ... Because when I have really long T-SQL statements it gets really hard to read due to the format of it within a string. Any suggestions would be helpful. Thanks!

    Read the article

  • How to give the condition for EventTrigger?

    - by Prabu
    Is it possible to give the condition within the EventTrigger?? I have written a following EventTrigger (Mouse.MouseLeave) for Radio button. I want this should not be trigged for an item which is in Checked condition (IsChecked=True). <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="border"> <BeginStoryboard Name="out_BeginStoryboard" Storyboard="{StaticResource out}" /> <RemoveStoryboard BeginStoryboardName="over_BeginStoryboard" /> </EventTrigger> Please let me know how can I achieve this? Thanks in advance.

    Read the article

  • How to get a variable name as a string in Python?

    - by e-satis
    I would like to be able to get the name of a variable as a string but I don't know if Python has that much introspection capabilities. Something like: >>> print(my_var.__name__) 'my_var' I want to do that because I have a bunch of vars I'd like to turn into a dictionary like : bar=True foo=False >>> my_dict=dict(bar=bar, foo=foo) >>> print mydict >>> print my_dict {'foo': False, 'bar': True} But I'd like something more automatic than that. Python have locals() and vars(), so I guess there is a way.

    Read the article

  • Can we use (id) in if- else condition ?

    - by srikanth rongali
    I have written my code in following way in cocos2d. id actionTo = [CCFadeOut actionWithDuration:4.0f]; id actionTo0 = [CCSequence actionWithDuration:2.0f]; if (m < enemyNumber) id actionTo1 = [CCCallFunc actionWithTarget:self selector:@selector(goToNextScene)]; else id actionTo1 = [CCCallFunc actionWithTarget:self selector:@selector(goToEndScene)]; id actionSeq = [CCSequence actions:actionTo, actionTo0, actionTo1, nil]; [targetE runAction: [CCSequence actions:actionSeq, nil]]; error: expected expression before 'id' I am getting the above error. Should not we use (id) in if condition ? I want to get called two selectors by using the if- else condition. How can I make it ? Thank You.

    Read the article

  • rewrite condition for directory along with file

    - by RHR
    Any one please help me.I am new to .htaccess I want to check the following condition RewriteCond : IF !index.html AND !app/facebookapp/{[a-zA-Z0-9-/]}.html RewriteRule : ..... My code is RewriteCond %{REQUEST_URI} !index\.html RewriteCond %{REQUEST_URI} app/facebookapp/^([a-zA-Z0-9-/]+).html$ RewriteRule ...... its not working And one more question if the request url is header.html RewriteCond %{REQUEST_URI} header.html$ RewriteRule ^([a-zA-Z0-9-/]+).html$ position.php?position=$1 [L] $l will return header. if the request url is app/facebookapp/header.html we write the same above condition $l will return app/facebookapp/header.my question is how to get only the filename ?? thanks

    Read the article

  • Bind Variable and SQL error during statement preparation

    - by Abhishek Dwivedi
    Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}  I was getting the following exception at run-time. JBO-27122: SQL error during statement preparation. Statement: SELECT AxEO.A_ID, AxEO.B_ID, AxEO.C_ID, ByEO.A_ID, ByEO.B_ID, ByEO.C_ID, Cz.A_ID, Cz.B_ID, Cz.C_ID FROM ABC_x AxEO, ABC_y ByEO, ABC_z CzEO WHERE AxEO.A_ID = ByEO.A_ID AND  CzEO.A_ID = :Bind_PId I copied and pasted the query on SQL worksheet, replaced :Bind_PId with a valid id, and executed the query. The query worked alright, implying the query was alright. I tried to connect to different DBs but the issue persisted, meaning it was not a DB issue either. Finally, the root cause was found to be in the concerned VO; one of the bind variables (say Bind_TId) was marked "Required". De-selecting the Required check-box resolved the issue. In retrospect, the issue looks to be rather straight-forward. However, the error message is not very helpful, if not misleading. Besides, it's counter-intuitive to think that a bind variable which is not being used in a query can cause error while statement preparation. The other bind variable - Bind_TId - was being used in other view criteria, not the view criteria involved in the given query. Still, it was required.

    Read the article

  • how to set environment variable in eric IDE

    - by ng0323
    I have no problem running a python script from the terminal, but in eric IDE, I am getting this error: ImportError libcudart.so.6.0: cannot open shared object file: No such file or directory Perhaps it's an enviroment variable that needs to be set. In eric, when I run script, I filled in the environment option as follows. I tried set PATH = usr/local/cuda-6.0/bin or PATH = /usr/local/cuda-6.0/bin or just /usr/local/cuda-6.0/bin and they all didn't work.

    Read the article

  • Parent variable inheritance methods Unity3D/C#

    - by Timothy Williams
    I'm creating a system where there is a base "Hero" class and each hero inherits from that with their own stats and abilities. What I'm wondering is, how could I call a variable from one of the child scripts in the parent script (something like maxMP = MP) or call a function in a parent class that is specified in each child class (in the parent update is alarms() in the child classes alarms() is specified to do something.) Is this possible at all? Or not? Thanks.

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >