Search Results

Search found 13794 results on 552 pages for 'variable scope'.

Page 6/552 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • PHP scope question

    - by Dan
    Hi, I'm trying to look through an array of records (staff members), in this loop, I call a function which returns another array of records (appointments for each staff member). foreach($staffmembers as $staffmember) { $staffmember['appointments'] = get_staffmember_appointments_for_day($staffmember); // print_r($staffmember['appointments'] works fine } This is working OK, however, later on in the script, I need to loop through the records again, this time making use of the appointment arrays, however they are unavailable. foreach ($staffmembers as $staffmember) { //do some other stuff //print_r($staffmember['appointments'] no longer does anything } Normally, I would perform the function from the first loop, within the second, however this loop is already nested within two others, which would cause the same sql query to be run 168 times. Can anyone suggest a workaround? Any advice would be greatly appreciated. Thanks

    Read the article

  • C pointer array scope and function calls

    - by juvenis
    I have this situation: { float foo[10]; for (int i = 0; i < 10; i++) { foo[i] = 1.0f; } object.function1(foo); // stores the float pointer to a const void* member of object } object.function2(); // uses the stored void pointer Are the contents of the float pointer unknown in the second function call? It seems that I get weird results when I run my program. But if I declare the float foo[10] to be const and initialize it in the declaration, I get correct results. Why is this happening?

    Read the article

  • Global JavaScript Variable Scope: Why doesn't this work?

    - by CoryDorning
    So I'm playing around with JavaScript and came across what I think to be an oddity. Is anyone able to explain the following? (i've included the alerted values as comments) Why is the first alert(msg) inside foo() returning undefined and not outside? var msg = 'outside'; function foo() { alert(msg); // undefined var msg = 'inside'; alert(msg); // inside } foo(); alert(msg); // outside Considering these both work fine: var msg = 'outside'; function foo() { alert(msg); // outside } alert(msg); // outside and: var msg = 'outside'; function foo() { var msg = 'inside'; alert(msg); // inside } alert(msg); // outside

    Read the article

  • Accessing variables with different scope in C++

    - by Portablejim
    With #include <iostream> using namespace std; int a = 1; int main() { int a = 2; if(true) { int a = 3; cout << a << " " << ::a // Can I access a = 2 here? << " " << ::a << endl; } cout << a << " " << ::a << endl; } having the output 3 1 1 2 1 Is there a way to access the 'a' equal to 2 inside the if statement where there is the 'a' equal to 3, with the output 3 2 1 2 1 Note: I know this should not be done (and the code should not get to the point where I need to ask). This question is more "can it be done".

    Read the article

  • Coffeescript getting proper scope from callback method

    - by pandabrand
    I've searched for this and can't seem to find an successful answer, I'm using a jQuerey ajax call and I can't get the response out to the callback. Here's my coffeescript code: initialize: (@blog, @posts) -> _url = @blog.url _simpleName = _url.substr 7, _url.length _avatarURL = exports.tumblrURL + _simpleName + 'avatar/128' $.ajax url: _avatarURL dataType: "jsonp" jsonp: "jsonp" (data, status) => handleData(data) handleData: (data) => console.log data @avatar = data Here's the compiled JS: Blog.prototype.initialize = function(blog, posts) { var _avatarURL, _simpleName, _url, _this = this; this.blog = blog; this.posts = posts; _url = this.blog.url; _simpleName = _url.substr(7, _url.length); _avatarURL = exports.tumblrURL + _simpleName + 'avatar/128'; return $.ajax({ url: _avatarURL, dataType: "jsonp", jsonp: "jsonp" }, function(data, status) { return handleData(data); }); }; Blog.prototype.handleData = function(data) { console.log(data); return this.avatar = data; }; I've tried a dozen variations and I can't figure out how to write this? Thanks.

    Read the article

  • Uiimport does not save variable to base workspace

    - by Tim
    I tried using uiimport to load a file to the base workspace.....It worked first time....but after trying again after a while...I wasnt seeing the variable in the base work space. I used the default variable name which is given by 'uiimport". This was the command I used: uiimport(filename) And two variables where created by default..."data" and "textdata"(which is the header)....but now when i run it is no longer saved in the base workspace I do not want to assign a variable to the uiimport like so... K = uiimport(filename) assignin(base,'green',K) I do not want to do that because My dataset has a text header and the data itself, and doing this would assign both "textdata" and "data" to "green" variable How would I be able to get the dimensions of ONLY the "data" in green and how would I pass only "data"(which is in the green variable in the workspace.."rmbr"...the green variable holds both "data" and "textdata") to another function. I was able to do all this when the uiimport automatically saved the variables in the base workspace....but somehow now it doesn't. I would appreciate any help or tips on this matter

    Read the article

  • variable in variable in batch and delayed expansion

    - by rezna
    Hi, I'm trying to use variable in variable in conjunction with delayed expansion but still no luck. SETLOCAL EnableDelayedExpansion SET ERROR_COMMAND=exit /B ^!ERRORLEVEL^! This is my last try. I want to setup an ERROR_COMMAND to be called when one of the steps in batch file crashes. The command is supposed to be: IF ERRORLEVEL 1 !ERROR_COMMAND! or IF ERRORLEVEL 1 %ERROR_COMMAND% The thing is, I'm not able to find out, how to SET properly the ERROR_COMMAND variable, so that ERRORLEVEL is not evaluated at the time of assignment, but at the time of evaluating the variable Of course I can copy&paste the code all over the batch file, but using the variable just seems a bit prettier... Anyone? Thanks, Milan

    Read the article

  • How to get the original variable name of variable passed to a function

    - by Acorn
    Is it possible to get the original variable name of a variable passed to a function? E.g. foobar = "foo" def func(var): print var.origname So that: func(foobar) Returns: >>foobar EDIT: All I was trying to do was make a function like: def log(soup): f = open(varname+'.html', 'w') print >>f, soup.prettify() f.close() .. and have the function generate the filename from the name of the variable passed to it. I suppose if it's not possible I'll just have to pass the variable and the variable's name as a string each time.

    Read the article

  • Using xsl:variable in a xsl:foreach select statment

    - by Nefariousity
    I'm trying to iterate through an xml document using xsl:foreach but I need the select=" " to be dynamic so I'm using a variable as the source. Here's what I've tried: ... <xsl:template name="SetDataPath"> <xsl:param name="Type" /> <xsl:variable name="Path_1">/Rating/Path1/*</xsl:variable> <xsl:variable name="Path_2">/Rating/Path2/*</xsl:variable> <xsl:if test="$Type='1'"> <xsl:value-of select="$Path_1"/> </xsl:if> <xsl:if test="$Type='2'"> <xsl:value-of select="$Path_2"/> </xsl:if> <xsl:template> ... <!-- Set Data Path according to Type --> <xsl:variable name="DataPath"> <xsl:call-template name="SetDataPath"> <xsl:with-param name="Type" select="/Rating/Type" /> </xsl:call-template> </xsl:variable> ... <xsl:for-each select="$DataPath"> ... The foreach threw an error stating: "XslTransformException - To use a result tree fragment in a path expression, first convert it to a node-set using the msxsl:node-set() function." When I use the msxsl:node-set() function though, my results are blank. I'm aware that I'm setting $DataPath to a string, but shouldn't the node-set() function be creating a node set from it? Am I missing something? When I don't use a variable: <xsl:for-each select="/Rating/Path1/*"> I get the proper results. Here's the XML data file I'm using: <Rating> <Type>1</Type> <Path1> <sarah> <dob>1-3-86</dob> <user>Sarah</user> </sarah> <joe> <dob>11-12-85</dob> <user>Joe</user> </joe> </Path1> <Path2> <jeff> <dob>11-3-84</dob> <user>Jeff</user> </jeff> <shawn> <dob>3-5-81</dob> <user>Shawn</user> </shawn> </Path2> </Rating> My question is simple, how do you run a foreach on 2 different paths?

    Read the article

  • How can I timeout Client-scoped variables in Coldfusion?

    - by Joshua Carmody
    I apologize if this is a "duh" question. It seems like the answer should be easily googleable, but I haven't found it yet. I am working on a large Coldfusion application that stores a large amount of session/user data in the Client scope (ie <cfset Client.UserName = "JoshuaC"> ). I did not write this application, and I don't have the luxury of significantly refactoring it. I've been given the task of setting the Client variables to time out after 72 hours. I'm not entirely sure how to do this. If I had written the application, I would have stored the variables in the Session scope, and then changed the sessiontimeout attribute of the CFAPPLICATION tag. As it is though, I'm not sure if that timeout affects the Client variables, or what their level of persistence is. The way the application works now, the Client variables never time out, and only clearing the user's cookies, or visiting a logout page which sets all the Client-scoped application variables to "", will clear the values. Of course, I could create some kind of timestamp variable like Client.LastAccessDateTime, and put something in the Application.cfm to clear the client variables if that datetime is more than 72 hours prior to Now(). But there's got to be a better way, right?

    Read the article

  • What is the JavaScript variable scope in a switch / case statment?

    - by Todd Moses
    While creating JavaScript with ASP.NET MVC I noticed several scope warnings and realized that I am missing something with understanding the variable scope inside the switch / case statement. Warning: 'i' is already defined referring to case b and case c My code looks similar to this: switch(element) { case 'a': for(var i=0; i < count; i++){ do something } break; case 'b': for(var i=0; i < count; i++){ do something } break; case 'c': for(var i=0; i < count; i++){ do something } break; } I thought scope ended with each break statement but it seems that scope does not end until the end of the switch/case. Is scope for the entire switch/case?

    Read the article

  • Variable Scoping in a method and its persistence in C++

    - by de costo
    Consider the following public method that adds an integer variable to a vector of ints(private member) in a class in C++. KoolMethod() { int x; x = 10; KoolList.Add(x); } Vector<int>KoolList; But is this a valid addition to a vector ??? Upon calling the method, it creates a local variable. The scope of this local variable ends the moment the execution control leaves the method. And since this local variable is allocated on a stack(on the method call), any member of KoolList points to an invalid memory location in deallocated stack which may or may not contain the expected value of x. Is this an accurate description of above mechanism ?? Is there a need for creating an int in heap storage using "new" operator everytime a value needs to be added to the vector like described below ????: KoolMethod() { int *x = new int(); *x = 10; KoolList.Add(x); } Vector<int*>KoolList;

    Read the article

  • Defining scope for Record Count functoid:

    - by ArunManick
    Defining scope for Record Count functoid: Problem: One of the most common scenarios in BizTalk is calculating the record count of repeating structure. BizTalk has come up with an advanced functoid called Record Count functoid which will give the record count for the repeating structure however you cannot define the scope for a Record Count functoid. Because Record Count functoid accepts exactly one parameter which can be repeating record or field element.   If somebody don’t know what “scope” means I will explain with a simple example. Consider that we have a source schema having a structure Country -> State -> City. Country will have various states and each state will have different cities. Now you want to calculate no. of cities present in each state. Here scope is defined at the parent node “State”. Traditional Record Count functoid will give the total no. of cities present in the source message and not the State level city count.   Source Schema:   Destination Schema:   Soultion #1: As the title indicates we are not going to add one more parameter to the record count functoid. Instead of that, we are going to achieve the solution with the help of Scripting functoid with Inline XSLT script. XSLT is basically the transformation language used in the mapping.     “No.OfCities” indicates the destination field name to which we are going to send the value. In count(City), “count” refers to built in XPath function used in XSLT and “City” refers to source schema record name. Here you can find the list of built-in functions available in XSLT.   The mapping will look like as follows:   The 2 Record Count functoids used in this map will give the total number of states and total number of cities as that of input message.   Soultion #2:  If someone doesn’t like XSLT code and they wish to achieve the solution using functoids alone, then here is another solution.   Use logical Existence functoid to check whether “City” exist or not Connect the output of Logical Existence functoid to the Value Mapping functoid with second parameter as constant “1”. Hence if the first parameter is TRUE it will give the output as “1”. Connect the output of Value Mapping functoid to the Cumulative Sum functoid with scope as “1”   This will calculate the City count at the state level. The mapping will look like as follows:     Let us see the sample input and the map output.   Input: <?xml version="1.0" encoding="utf-8"?> <ns0:Country xmlns:ns0="http://RecordCount.Source">   <State>     <StateName>Tamilnadu</StateName>     <City>       <CityName>Pollachi</CityName>     </City>     <City>       <CityName>Coimbatore</CityName>     </City>     <City>       <CityName>Chennai</CityName>     </City>   </State>   <State>     <StateName>Kerala</StateName>     <City>       <CityName>Palakad</CityName>     </City>   </State>   <State>     <StateName>Karnataka</StateName>     <City>       <CityName>Bangalore</CityName>     </City>     <City>       <CityName>Mangalore</CityName>     </City>   </State> </ns0:Country>     Output: <ns0:Country xmlns:ns0="http://RecordCount.Destination">           <No.OfStates>3</No.OfStates>           <No.OfCities>6</No.OfCities>           <States>                    <No.OfCities>3</No.OfCities>           </States>           <States>                    <No.OfCities>1</No.OfCities>           </States>           <States>                    <No.OfCities>2</No.OfCities>           </States> </ns0:Country>   Conclusion: This is my first post and I hope you enjoyed it.   -Arun

    Read the article

  • Why do you have to explicitly specify scope with friendly_id?

    - by nfm
    I'm using the friendly_id gem. I also have my routes nested: # config/routes.rb map.resources :users do |user| user.resources :events end So I have URLs like /users/nfm/events/birthday-2009. In my models, I want the event title to be scoped to the username, so that both nfm and mrmagoo can have events birthday-2009 without them being slugged. # app/models/event.rb def Event < ActiveRecord::Base has_friendly_id :title, :use_slug => true, :scope => :user belongs_to :user ... end I'm also using has_friendly_id :username in my User model. However, in my controller, I'm only pulling out events pertinent to the user who is logged in (current_user): def EventsController < ApplicationController def show @event = current_user.events.find(params[:id]) end ... end This doesn't work; I get the error ActiveRecord::RecordNotFound; expected scope but got none. # This works @event = current_user.events.find(params[:id], :scope => 'nfm') # This doesn't work, even though User has_friendly_id, so current_user.to_param _should_ return "nfm" @event = current_user.events.find(params[:id], :scope => current_user) # But this does work! @event = current_user.events.find(params[:id], :scope => current_user.to_param) SO, why do I need to explicitly specify :scope if I'm restricting it to current_user.events anyway? And why does current_user.to_param need to be called explicitly? Can I override this?

    Read the article

  • How to send keypresses from qt application to libvlc

    - by anon
    I need to send keypresses from my application window to libvlc, how do i do that? I tried using varSetInteger but then i got the following error error: ‘var_SetInteger’ was not declared in this scope so i searched for the file in which var_SetInteger was defined and found that it was defined in vlc_variables.h so in included it and got the following error. What am i missing? ../vlc-0.9.10/include/vlc_variables.h:121: error: ‘__var_Create’ has not been declared ../vlc-0.9.10/include/vlc_variables.h:121: error: expected identifier before ‘(’ token ../vlc-0.9.10/include/vlc_variables.h:121: error: expected )' before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:121: error: expected ‘,’ or ‘...’ before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:121: error: expected constructor, destructor, or type conversion before ‘)’ token ../vlc-0.9.10/include/vlc_variables.h:122: error: ‘__var_Destroy’ has not been declared ../vlc-0.9.10/include/vlc_variables.h:122: error: expected identifier before ‘(’ token ../vlc-0.9.10/include/vlc_variables.h:122: error: expected )' before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:122: error: expected ‘,’ or ‘...’ before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:122: error: expected constructor, destructor, or type conversion before ‘)’ token ../vlc-0.9.10/include/vlc_variables.h:124: error: ‘__var_Change’ has not been declared ../vlc-0.9.10/include/vlc_variables.h:124: error: expected identifier before ‘(’ token ../vlc-0.9.10/include/vlc_variables.h:124: error: expected )' before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:124: error: expected ‘,’ or ‘...’ before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:124: error: expected constructor, destructor, or type conversion before ‘)’ token ../vlc-0.9.10/include/vlc_variables.h:126: error: ‘__var_Type’ has not been declared ../vlc-0.9.10/include/vlc_variables.h:126: error: expected identifier before ‘(’ token ../vlc-0.9.10/include/vlc_variables.h:126: error: expected )' before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:126: error: expected ‘,’ or ‘...’ before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:126: error: expected constructor, destructor, or type conversion before ‘)’ token ../vlc-0.9.10/include/vlc_variables.h:127: error: ‘__var_Set’ has not been declared ../vlc-0.9.10/include/vlc_variables.h:127: error: expected identifier before ‘(’ token ../vlc-0.9.10/include/vlc_variables.h:127: error: expected )' before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:127: error: expected ‘,’ or ‘...’ before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:127: error: expected constructor, destructor, or type conversion before ‘)’ token ../vlc-0.9.10/include/vlc_variables.h:128: error: ‘__var_Get’ has not been declared ../vlc-0.9.10/include/vlc_variables.h:128: error: expected identifier before ‘(’ token ../vlc-0.9.10/include/vlc_variables.h:128: error: expected )' before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:128: error: expected ‘,’ or ‘...’ before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:128: error: expected constructor, destructor, or type conversion before ‘)’ token ../vlc-0.9.10/include/vlc_variables.h:131: error: ‘__var_Command’ has not been declared ../vlc-0.9.10/include/vlc_variables.h:131: error: expected identifier before ‘(’ token ../vlc-0.9.10/include/vlc_variables.h:131: error: expected )' before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:131: error: expected ‘,’ or ‘...’ before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:131: error: expected constructor, destructor, or type conversion before ‘)’ token ../vlc-0.9.10/include/vlc_variables.h:133: error: expected constructor, destructor, or type conversion before ‘(’ token ../vlc-0.9.10/include/vlc_variables.h:171: error: ‘__var_AddCallback’ has not been declared ../vlc-0.9.10/include/vlc_variables.h:171: error: expected identifier before ‘(’ token ../vlc-0.9.10/include/vlc_variables.h:171: error: expected )' before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:171: error: expected ‘,’ or ‘...’ before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:171: error: expected constructor, destructor, or type conversion before ‘)’ token ../vlc-0.9.10/include/vlc_variables.h:172: error: ‘__var_DelCallback’ has not been declared ../vlc-0.9.10/include/vlc_variables.h:172: error: expected identifier before ‘(’ token ../vlc-0.9.10/include/vlc_variables.h:172: error: expected )' before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:172: error: expected ‘,’ or ‘...’ before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:172: error: expected constructor, destructor, or type conversion before ‘)’ token ../vlc-0.9.10/include/vlc_variables.h:173: error: ‘__var_TriggerCallback’ has not been declared ../vlc-0.9.10/include/vlc_variables.h:173: error: expected identifier before ‘(’ token ../vlc-0.9.10/include/vlc_variables.h:173: error: expected )' before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:173: error: expected ‘,’ or ‘...’ before ‘*’ token ../vlc-0.9.10/include/vlc_variables.h:173: error: expected constructor, destructor, or type conversion before ‘)’ token ../vlc-0.9.10/include/vlc_variables.h:201: error: ‘__var_SetInteger’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:201: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:201: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:201: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:201: error: expected primary-expression before ‘int’ ../vlc-0.9.10/include/vlc_variables.h:201: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:202: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:215: error: ‘__var_SetBool’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:215: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:215: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:215: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:215: error: expected primary-expression before ‘bool’ ../vlc-0.9.10/include/vlc_variables.h:215: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:216: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:229: error: ‘__var_SetTime’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:229: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:229: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:229: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:229: error: expected primary-expression before ‘i’ ../vlc-0.9.10/include/vlc_variables.h:229: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:230: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:243: error: ‘__var_SetFloat’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:243: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:243: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:243: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:243: error: expected primary-expression before ‘float’ ../vlc-0.9.10/include/vlc_variables.h:243: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:244: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:257: error: ‘__var_SetString’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:257: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:257: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:257: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:257: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:257: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:258: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:270: error: ‘__var_SetVoid’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:270: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:270: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:270: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:270: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:271: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:302: error: ‘__var_GetInteger’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:302: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:302: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:302: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:302: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:303: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:317: error: ‘__var_GetBool’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:317: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:317: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:317: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:317: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:318: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:332: error: ‘__var_GetTime’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:332: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:332: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:332: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:332: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:333: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:347: error: ‘__var_GetFloat’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:347: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:347: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:347: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:347: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:348: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:362: error: ‘__var_GetString’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:362: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:362: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:362: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:362: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:363: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:371: error: ‘__var_GetNonEmptyString’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:371: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:371: error: ‘obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:371: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:371: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:372: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:412: error: variable or field ‘__var_IncInteger’ declared void ../vlc-0.9.10/include/vlc_variables.h:412: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:412: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:412: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:424: error: variable or field ‘__var_DecInteger’ declared void ../vlc-0.9.10/include/vlc_variables.h:424: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:424: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:424: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:437: error: ‘__var_CreateGetInteger’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:437: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:437: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:437: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:437: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:438: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:449: error: ‘__var_CreateGetBool’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:449: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:449: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:449: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:449: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:450: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:461: error: ‘__var_CreateGetTime’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:461: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:461: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:461: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:461: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:462: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:473: error: ‘__var_CreateGetFloat’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:473: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:473: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:473: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:473: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:474: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:485: error: ‘__var_CreateGetString’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:485: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:485: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:486: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:486: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:487: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:492: error: ‘__var_CreateGetNonEmptyString’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:492: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:492: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:493: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:493: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:494: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:527: error: ‘__var_CreateGetIntegerCommand’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:527: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:527: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:527: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:527: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:528: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:540: error: ‘__var_CreateGetBoolCommand’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:540: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:540: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:540: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:540: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:541: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:553: error: ‘__var_CreateGetTimeCommand’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:553: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:553: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:553: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:553: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:554: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:566: error: ‘__var_CreateGetFloatCommand’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:566: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:566: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:566: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:566: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:567: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:579: error: ‘__var_CreateGetStringCommand’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:579: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:579: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:580: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:580: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:581: error: expected ‘,’ or ‘;’ before ‘{’ token ../vlc-0.9.10/include/vlc_variables.h:587: error: ‘__var_CreateGetNonEmptyStringCommand’ declared as an ‘inline’ variable ../vlc-0.9.10/include/vlc_variables.h:587: error: ‘vlc_object_t’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:587: error: ‘p_obj’ was not declared in this scope ../vlc-0.9.10/include/vlc_variables.h:588: error: expected primary-expression before ‘const’ ../vlc-0.9.10/include/vlc_variables.h:588: error: initializer expression list treated as compound expression ../vlc-0.9.10/include/vlc_variables.h:589: error: expected ‘,’ or ‘;’ before ‘{’ token src/transcribeWidget.cpp:859: warning: unused parameter ‘bytesSent’ src/transcribeWidget.cpp:859: warning: unused parameter ‘bytesTotal’ ../vlc-0.9.10/include/vlc_variables.h:201: warning: ‘__var_SetInteger’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:215: warning: ‘__var_SetBool’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:229: warning: ‘__var_SetTime’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:243: warning: ‘__var_SetFloat’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:257: warning: ‘__var_SetString’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:270: warning: ‘__var_SetVoid’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:302: warning: ‘__var_GetInteger’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:317: warning: ‘__var_GetBool’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:332: warning: ‘__var_GetTime’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:347: warning: ‘__var_GetFloat’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:362: warning: ‘__var_GetString’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:371: warning: ‘__var_GetNonEmptyString’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:437: warning: ‘__var_CreateGetInteger’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:449: warning: ‘__var_CreateGetBool’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:461: warning: ‘__var_CreateGetTime’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:473: warning: ‘__var_CreateGetFloat’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:485: warning: ‘__var_CreateGetString’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:492: warning: ‘__var_CreateGetNonEmptyString’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:527: warning: ‘__var_CreateGetIntegerCommand’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:540: warning: ‘__var_CreateGetBoolCommand’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:553: warning: ‘__var_CreateGetTimeCommand’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:566: warning: ‘__var_CreateGetFloatCommand’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:579: warning: ‘__var_CreateGetStringCommand’ defined but not used ../vlc-0.9.10/include/vlc_variables.h:587: warning: ‘__var_CreateGetNonEmptyStringCommand’ defined but not used

    Read the article

  • Are variable length arrays possible with Javascript

    - by Ankur
    I want to make a variable length array in Javascript. Is this possible. A quick google search for "Javascript variable length array" doesn't seem to yield anything, which would be surprising if it were possible to do this. Should I instead have a String that I keep appending to with a separator character instead, or is there a better way to get a varible length array-like variable.

    Read the article

  • PHP class constant string variable spanning over multiple lines

    - by ebae
    I want to have a string variable for a PHP class, which would be available to all methods. However, this variable is quite long, so I want to separate it into multiple lines. For example, $variable = "line 1" . "line 2" . "line 3"; But above doesn't work. I tried EOD, but EOD is not allowed within class. And when I declare it outside the class, I can't access the variable from within the class. What is the best way?

    Read the article

  • LIKE operator with $variable

    - by skarama
    This is my first question here and I hope it is simple enough to get a quick answer! Basically, I have the following code: $variable = curPageURL(); $query = 'SELECT * FROM `tablename` WHERE `columnname` LIKE '$variable' ; If I echo the $variable, it prints the current page's url( which is a javascript on my page) Ultimately, what I want, is to be able to make a search for which the search-term is the current page's url, with wildcards before and after. I am not sure if this is possible at all, or if I simply have a syntax error, because I get no errors, simply no result! I tried : $query = 'SELECT * FROM `tablename` WHERE `columnname` LIKE '"echo $variable" ' ; But again, I'm probably missing or using a misplaced ' " ; etc. Please tell me what I'm doing wrong!

    Read the article

  • Bash: Variable substitution in variable name with default value

    - by krissi
    i have the following variables: # config file MYVAR_DEFAULT=123 MYVAR_FOO=456 #MYVAR_BAR unset # program USER_INPUT=FOO TARGET_VAR=<need to be set> If the USER_INPUT is "foo", I want TARGET_VAR to be the value of MYVAR_FOO (TARGET_VAR=456). If USER_INPUT is "bar" I want TARGET_VAR to be set to MYVAR_DEFAULT (123), because MYVAR_BAR is unset. I prefer it to be sh-compatible and as a substitution string. But it might also be bash compatible and/or in a function. I got these snippets: # Default values for variable (sh-compatible) echo ${MYVAR_FOO-$MYVAR_DEFAULT} # Uppercase (bash compatible) echo ${USER_INPUT^^} I would need something like this: TARGET_VAR="${MYVAR_${USER_INPUT^^}-$MYVAR_DEFAULT}" # or somecommand -foo "${MYVAR_${USER_INPUT^^}-$MYVAR_DEFAULT}" This is to switch a bunch of variables between multiple "profiles". In the example, FOO and BAR are profiles. New profiles should be added easily, in this example there would be an implicit profile named BAZ, too, all variables to their default values. Unfortunately it is not that easy. Do you have an idea to solve this? Thanks in advance, krissi

    Read the article

  • Apache RewriteRule with a RewriteMap variable substitution for the VAL argument to environment variable

    - by Eric
    I have an Apache server that serves up binary files to an application (not a browser). The application making the request wants the HTTP Content-MD5 header in HEX format. The default and only option within Apache is Base64. If I add "ContentDigest on" to my VirtualHost, I get this header in Base64. So I wrote a perl script, md5digesthex.pl, that gives me exactly what I want: MD5 in HEX format but I'm struggling with the RewriteRule to get my server to send the result. Here is my current Rewrite recipe: RewriteEngine on RewriteMap md5inhex prg:/www/download/md5digesthex.pl RewriteCond %{REQUEST_URI} ^/download/(.*) RewriteRule ^(.*) %{REQUEST_URI} [E=HASH:${md5inhex:$1}] Header set Content-MD5 "%{HASH}e" env=HASH The problem is that I can't seem to set the HASH environment variable based on the output of the md5inhex map function. It appears this behavior is not supported and I'm at a lost as to how to formulate this...

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >