Search Results

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

Page 20/552 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Multiple values for a specif custom variable in Google Analytics

    - by Nicola Pacini
    we're trying to get rid of a this question : would it be possible to setup more than one value in a custom variable in Google Analytics, at page level ? Eg: _gaq.push(['_setCustomVar',3,'Tag','Custom Variables',3]); We'd like to track most popular tags on a web site who publishes news, articles and stuff. Contents are categorized (each content belongs to one category) and tagged (1 or more tags for each article). So, we'd like to apply this code: _gaq.push(['_setCustomVar',3,'Tag','Custom Variables',3]); _gaq.push(['_setCustomVar',3,'Tag','Google Analytics',3]); in a page that shows an article with these two tags assigned. What do you think? Honestly I didn't find anything in documentation from Google and some other example sites. Many thanks! Nicola

    Read the article

  • Create new variable or make multiple chained calls?

    - by Rodrigo
    What is the best way to get this attributes, thinking in performance and code quality? Using chained calls: name = this.product.getStock().getItems().get(index).getName(); id = this.product.getStock().getItems().get(index).getId(); Creating new variable: final item = this.product.getStock().getItems().get(index); name = item.getName(); it = item.getId(); I prefer the second way, to let the code cleaner. But I would like to see some opinions about it. Thank you!

    Read the article

  • Correct place to set $BIBINPUTS environment variable

    - by student
    If I set the $BIBINPUTS environment varibale in my .zshrc, it is recognized by emacs-reftex (via emacsclient), if I start emacs from my zsh commandline. However if I start using the menubar or gmrun it doesn't knot this variable. So where is the correct place to set for the whole user environment? If there are several alternatives, let me know. Also if it changed between differend ubuntu-versions. Edit: I have tried to set it in ~/.pam_environment like BSTINPUTS=.:/home/myuser/BiBTeX/:$BSTINPUTS BIBINPUTS=.:/home/myuser/BiBTeX/:$BIBINPUTS but it seems to have no effect (even after rebooting) and is not listed via printenv. I am currently using ubuntu natty + gdm + xmonad.

    Read the article

  • Powershell Active Directory Account Attribute to a variable

    - by Bill Garrett
    Sorry for the newbie question. I am using Powershell 3 to get a list of all user accounts. I am trying to generate an output for accounts, either "Enabled" or "Disabled". I am able to get the account status code from active directory using: $rc = $Rech.PropertiesToLoad.Add("userAccountControl"); That will display the correct account status code. When I try to use an if statement on the value, I dont get any result. How do I put this value into a variable to use some logic with it? In the end, my requirements are to have the output to an CSV file that I can send to HR and have them examin it and instead of a code I would like to have it say "Enabled" or "Disabled". Thank you.

    Read the article

  • Impact of variable-length loops on GPU shaders

    - by Will
    Its popular to render procedural content inside the GPU e.g. in the demoscene (drawing a single quad to fill the screen and letting the GPU compute the pixels). Ray marching is popular: This means the GPU is executing some unknown number of loop iterations per pixel (although you can have an upper bound like maxIterations). How does having a variable-length loop affect shader performance? Imagine the simple ray-marching psuedocode: t = 0.f; while(t < maxDist) { p = rayStart + rayDir * t; d = DistanceFunc(p); t += d; if(d < epsilon) { ... emit p return; } } How are the various mainstream GPU families (Nvidia, ATI, PowerVR, Mali, Intel, etc) affected? Vertex shaders, but particularly fragment shaders? How can it be optimised?

    Read the article

  • comparison of an unsigned variable to 0

    - by user2651062
    When I execute the following loop : unsigned m; for( m = 10; m >= 0; --m ){ printf("%d\n",m); } the loop doesn't stop at m==0, it keeps executing interminably, so I thought that reason was that an unsigned cannot be compared to 0. But when I did the following test unsigned m=9; if(m >= 0) printf("m is positive\n"); else printf("m is negative\n"); I got this result: m is positive which means that the unsigned variable m was successfully compared to 0. Why doesn't the comparison of m to 0 work in the for loop and works fine elsewhere?

    Read the article

  • IOS Variable vs Property

    - by William Smith
    Just started diving into Objective-C and IOS development and was wondering when and the correct location I should be declaring variables/properties. The main piece of code i need explaining is below: Why and when should i be declaring variables inside the interface statement and why do they have the same variable with _ and then the same one as a property. And then in the implementation they do @synthesize tableView = _tableView (I understand what synthesize does) Thanks :-) @interface ViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> { UITableView *_tableView; UIActivityIndicatorView *_activityIndicatorView; NSArray *_movies; } @property (nonatomic, retain) UITableView *tableView; @property (nonatomic, retain) UIActivityIndicatorView *activityIndicatorView; @property (nonatomic, retain) NSArray *movies;

    Read the article

  • New Pluralsight app for Android will bring variable speed

    Usually, it is very interesting to compare the 'same' software applications and apps between various platforms, and the Pluralsight offline players are an outstanding example to have a closer look at. The original Silverlight desktop offline player, the iOS app of Pluralsight and the new HTML5 online player all have variable playback speed. Just the Android app doesn't. But not for long. A couple of days Pluralsight finally announced that their development department found a reliable solution to provide flexible speeds. For the brave ones among us, please have a look at the public beta they are offering on their blog article.  Please be aware of, that using any Pluralsight offline player requires to have a Plus subscription. Otherwise, you cannot use the application after all.

    Read the article

  • Scope of variables inside of javascript

    - by wcpro
    I have the following code sample that im trying to wrap my head around $(document).ready(function () { test("load json", function () { length = 0; // length = 0 $.getJSON("plugins/form.json", function (data) { length = data.fields.length; // length = 4 }); ok(length == 4, "length = " + length.toString()); // length = 0? wtf? }); }); the 'length' variable does not persist when the $.getJSON runs. I cant figure out if its because its asynchronous or because the variable is out of scope.

    Read the article

  • Passing variable from SharePoint to external website

    - by TechDaddyK
    My company has a SharePoint site that is administered by the IT department (versus the Web Developer... go figure!). We have partnered with a vendor that has built a site for our staff to order customized stationery, etc. I need to create a link on the SharePoint site that will take the user to the external site but identify them individually. The vendor is suggesting this format: https://www.VENDORSITE.com/UI/Profile.hcf?id=a02b8106-4115-47cd-bca7-ce4dd447ef89&username=<user name>&password=<password>&name1=<first name>&name2=<last name>&email=<email> Here's the problem: I don't know how to pass that info, or even a single variable, from the SharePoint site to the external site. I would appreciate ANY suggestions.

    Read the article

  • Editing a command-line argument to create a new variable

    - by user1883614
    I have a bash script called test.sh that uses command-line argument: lynx -dump $1 > $name".txt" But I need name to be created from the argument by specific keywords in the argument. An example is: http://www.pcmag.com/article2/0,2817,2412941,00.asp http://www.pcmag.com/article2/0,2817,2412919,00.asp Both are two separate articles but are the difference can only be seen in those 12 characters. How do I create a variable from a url for those 12 characters? So that when I run test.sh in Terminal: ./test.sh http://www.pcmag.com/article2/0,2817,2412941,00.asp there is a text file saved as 0,2817,2412941,00?

    Read the article

  • Variable names for Contact Information bits

    - by RustyTheBoyRobot
    I am in the middle of refactoring code and would like to get some ideas on variable naming so that my new names clearly represent the data they hold. I have a class called ContactMethod which makes sense to me; each instance is a different way to contact someone. My problem comes when naming the properties of ContactMethod. For example, one instance might be a Fax number of 555-555-5555 while another could be an Email address of [email protected]; I've got a property called contactMethodType to hold the values "fax" or "email", but I don't know what to call the "555-555-5555" or "[email protected]" part. Has anyone here created a good generic name for this piece of contact information? (PS - the old convention was to call it a "Phone" with fields "phoneType" holding the "fax"/"email" value and "phoneId" holding the number/address. Yuck.)

    Read the article

  • variable declaration in javascript [migrated]

    - by ShaggyInjun
    I have been doing something like this for a while and I have never seen any errors. But, unfortunately, I have never been able to explain why this works. The first line creates a variable which points to a function. The second line just adds func2 to func1 separated by a dot and defines a function. If I add a var in front of func1.func2 then I see a compilation error. func1.func2 = function(){}; Error SyntaxError: missing ; before statement var func1.func2 = function(){}; What type was func1 on first line 1 and what did it become on line 2. var func1 = function(){}; func1.func2 = function(){}; Thanks Venkat

    Read the article

  • How to persistently export an environment variable before starting compiz

    - by Dykam
    A few months ago compiz suddenly stopped working. That is, it got to a refreshrate where the redrawing is more than noticeable. It took 5 seconds to redraw a chat window. Ever since I've been using metacity instead, but I've found myself missing some plugins badly. I found the following solution: export __GL_YIELD="NOTHING"; compiz --replace This works fine, everything is fast again with compiz. But how to make sure this variable is always set whenever I run compiz? I'm using standard nVidia drivers, failed to get the open source ones working.

    Read the article

  • When to save a variable in viewstate?

    - by Umut
    Hi, I have searched the web for the answer and saw that mostly variables are saved in viewstate on page.prerender event. However, when I save a variable in viewstate on prerender or load events, how can it store the changed value of the variable? Let's say, after page load, user clicked a button and the value of the variable was changed in onClick event of the button. Then the postback event raised since the button was clicked. According to me, the new value should have been lost and cannot be saved in the viewstate if I save the variable in the viewstate only in prerender event. Shouldn't I save the variable in the viewstate just before the postback event rises? Am I wrong? If so, how can viewstate store the new value of the variable? Thanks for the answer in advance..

    Read the article

  • JsLint 'out of scope' error

    - by Rajat
    function test(){ if(true){ var a = 5; } alert(a); } test(); I keep getting 'out of scope' errors in my JS code when I check with JsLint which make no sense to me.So I quickly created an example. Is there something actually wrong with this code piece, as the variable is eventually hoisted to the top of the function anyways.

    Read the article

  • GHCi error: Not in scope

    - by dmindreader
    I'm trying to compile this function from Learn You a Haskell for Great Good. removeNonUppercase st = [ c | c <- st, c `elem` ['A'..'Z']] by placing it into a removeNonUpperCase.hs file. It compiles fine, but when passing the argument: ghci> removeNonUppercase "Hahaha! Ahahaha!" the compiler says: <interactive>:1:0: Not in scope: 'removeNonUpperCase' Why?

    Read the article

  • Compiler error: memset was not declared in this scope

    - by michael
    Hi, I am trying to compile my c program in ubuntu 9.10 (gcc 4.4.1). I am getting this error: Rect.cpp:344: error: ‘memset’ was not declared in this scope But the problem is I have already included in my cpp file: #include <stdio.h> #include <stdlib.h> And the same program compiles fine under ubuntu 8.04 gcc 4.2.4). Please tell me what am i missing. Thank you.

    Read the article

  • Explicit specialization in non-namespace scope

    - by Mark
    template<typename T> class CConstraint { public: CConstraint() { } virtual ~CConstraint() { } template <typename TL> void Verify(int position, int constraints[]) { } template <> void Verify<int>(int, int[]) { } }; Compiling this under g++ gives the following error: Explicit specialization in non-namespace scope 'class CConstraint' In VC, it compiles fine. Can anyone please let me know the workaround?

    Read the article

  • "session" bean scope in a web application - reliable ?

    - by EugeneP
    Can you rely on this scope and be sure that every time 1) a new session starts, the Spring bean will be initialized with default values 2) while session is kept alive, the current object will store its state during session life, will never be lost or corrupted and can always be got with [webappcontext].getBean ?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >