Top "Scope" questions

Scope is an enclosing context where values and expressions are associated.

Why aren't variables declared in "try" in scope in "catch" or "finally"?

In C# and in Java (and possibly other languages as well), variables declared in a "try" block are not in …

c# java exception scope language-design
What is the difference between @ApplicationScoped and @Singleton scopes in CDI?

In CDI there is the @ApplicationScoped and the (javax.inject) @Singleton pseudo-scope. What is the difference between them? Besides the …

java scope cdi
javascript- Uncaught SyntaxError: Identifier * has already been declared

console.log(a) //output:ƒ a(){} var a = 1; function a(){}; var a = 10; console.log(a) //output:10 ==================== var a = 1; if(true){ function …

javascript scope var hoisting
UnboundLocalError on local variable when reassigned after first use

The following code works as expected in both Python 2.5 and 3.0: a, b, c = (1, 2, 3) print(a, b, c) def test(): print(…

python variables scope
javascript: recursive anonymous function?

Let's say I have a basic recursive function: function recur(data) { data = data+1; var nothing = function() { recur(data); } nothing(); } How …

javascript recursion scope anonymous-function
Controlling the value of 'this' in a jQuery event

I have created a 'control' using jQuery and used jQuery.extend to assist in making it as OO as possible. …

jquery scope this
In Java, are enum types inside a class static?

I can't seem to access instance members of the surrounding class from inside an enum, as I could from inside …

java enums scope
Angularjs, passing scope between routes

I have a situation with a form that stretches over several pages (might not be ideal, but that is how …

scope routes angularjs controllers
Access scope variables from a filter in AngularJS

I am passing date value to my custom filter this way: angular.module('myapp'). filter('filterReceiptsForDate', function () { return function (input, …

javascript angularjs scope
Private inner classes in C# - why aren't they used more often?

I am relatively new to C# and each time I begin to work on a C# project (I only worked …

c# scope inner-classes