Top "Global" questions

Refers to a space where variables and other items may be accessed from any scope.

Extending TypeScript Global object in node.js

I have a node.js app that attaches some config information to the global object: global.myConfig = { a: 1, b: 2 } The …

node.js typescript global
Static vs global

If I have a C file like below, what is the difference between i and j? #include <stdio.h&…

c static global
PHP global or $GLOBALS

Is there a best practice / recommendation when I want to use a variable declared outside of a function when it …

php variables function global
how to create global function that can be accessed from any controller and blade file

I have two controller file homecontroller and backendcontroller. What is the best way to create global function and access it …

laravel controller global
Python RegExp global flag

Is there a flag or some special key in python to use pattern multiple times. I used to test http://…

python regex global flags
Python - Easiest way to define multiple global variables

I am trying to look for an easy way to define multiple global variables from inside a function or class. …

python variables global
How to share/export a global variable between two different perl scripts?

How do we share or export a global variable between two different perl scripts. Here is the situation: first.pl #!/…

perl variables export global
How to create global variable in Swift?

I am trying to set a global variable. In my case, just a boolean flag that indicates if a view …

xcode swift global flags viewdidload
Global variable "count" ambiguous

#include <algorithm> using namespace std; int count = 0, cache[50]; int f(int n) { if(n == 2) count++; if(n == 0 || n==1) …

c++ variables global
Access extern variable in C++ from another file

I have a global variable in one of the cpp files, where I am assigning a value to it. Now …

c++ scope global extern