All Questions
1,012
questions
-2
votes
0
answers
50
views
i want to acsess the global variables from a function body in python [duplicate]
I have a very long program and I want to implement a method to access the global variables present in the main program ( main.py ) from within a function called from a library ( file.py ).
main.py :
...
0
votes
0
answers
16
views
MSVC global variables initialization order
MSVC 2022 VERSION.
If i use MFC static lib,i can use #pragma init_seg(lib) to change global variables initialization order. make my local global variables earlier than the lib.
and Now I have to use ...
0
votes
1
answer
17
views
Thymeleaf enums refactoring issues
I encountered difficulties while refactoring a template. I have many references to a limited number of enum values in one template. (in a code snippet i indicated only a short part for clarity)
<...
0
votes
0
answers
22
views
MKDocs - Global Variables Possible Within Page?
Regarding MKDocs, is it possible to set a global macro or variable from within a page? My intent is to have a start page with a drop down menu. The global variables would be set based on the user's ...
-2
votes
2
answers
69
views
Shell script for finding global variables
How would one write a shell script that finds all the global variables in a given C program?
I don't need a long line like
global_vars=$(grep -E '^[[:space:]]*[a-zA-Z_][a-zA-Z0-9_]*[[:space:]]+[a-zA-...
1
vote
1
answer
36
views
global variables get different values (web / terminal)
While learning php I came across the following problem.
I don’t understand why I get different values on my local site and in the terminal when I run the following code:
function scopeTest(): int
{...
1
vote
1
answer
36
views
Global variable not being updated with a thread in python
I have a Thread that is checking every hour of a time and keep updating a global variable, for some reason global statement is not working and it's keeping the same value in the global variable even ...
1
vote
0
answers
36
views
Using a varibale outside of the event listener block
I have been having difficulty accessing the variables populated within an eventlistener which is used to obtain the results from a php query. I tried a number of different ideas but I have been ...
-1
votes
2
answers
73
views
how to create a Python global variable whose name is the value of another variable [duplicate]
Given...
myGlobalVariableName = "zorp"
myGlobalVariableValue = "hello"
, ...how can I use the values of myGlobalVariableName and myGlobalVariableValue to create the global ...
0
votes
0
answers
34
views
Calculated field with usage of global variable on WordPress
I have created a custom global variable using the Custom Global Variables plugin because I want to display this variable in various places on my website and at the same time use it inside a calculated ...
0
votes
0
answers
25
views
Python Global variable clearance
I am confused with the behavior I observe in python (Spyder IDE). I clear all global variables (and delete all variables anyway)
globals().clear()
I could check that nothing remains with
print(...
1
vote
2
answers
91
views
vimscript for managing windows need some review
Could someone check my vimscript below.
I tried to make a key mapping that does:
1. Closes tagbar and/or nerdtree if exist
2. Do <C-W>H or <C-W>J or <C-W>K or <C-W>L
3. Recover ...
4
votes
2
answers
156
views
Should I use global variables in recursion
I created a function in C to find the shortest path out of a triangle maze using recursion. I use 2 global variables in the function, which I want to get rid of because I know that global variables ...
1
vote
1
answer
140
views
Need more understanding of PHP Float CONSTANTS
So, I just came across these PHP float Constants: PHP_FLOAT_DIG and PHP_FLOAT_EPSILON, and I don't understand both constants (even after studying the official documentation https://www.php.net/manual/...
-3
votes
1
answer
109
views
local variables outside a function in python [duplicate]
i have a code that goes like this
def inputs():
q_number = int(1)
number_of_q = int(0)
q = {}
x = {}
y = {}
xxxx = 1
for i in range(4):
C = float(qq[xxxx].get())
...