Skip to main content

Questions tagged [global]

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

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) <...
Pavel Mihnenkov's user avatar
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 ...
Robb's user avatar
  • 1
-1 votes
1 answer
34 views

difference between local and global dependencies in angular

What is the difference between downloading local and global dependencies? For example, if I run "npm i bootstrap" in the project folder, will I download it from the location?, and if I want ...
Vini dev's user avatar
-1 votes
1 answer
90 views

Global file pointer in C

I'm having a problem with a global file pointer in C with Visual Studio 2022 in a solution involving a large number of files that are compiled and linked using the "Build" command. Based on ...
csharp's user avatar
  • 522
1 vote
1 answer
47 views

Caching previous values in solve_ivp

I want to use the temperature at the previous timestep when evaluating the next timestep. I don't want to use global, because I think it slows down the code and it is not very clean. I use scipy....
Jop Vianen's user avatar
0 votes
0 answers
35 views

How to get position of a rectangle which I draw using Custom Paint in flutter

I am creating a waste management app where user can take image then this Image is shown in a screen where user can draw rectangles around trash. I am using Stack with Custom Paints for doing this. But ...
Muhmmad Nawaz Shah's user avatar
1 vote
1 answer
38 views

using eval() inside function with input of function as part of string

I have this code: def system(into): global sys x = into sis = [eval(i) for i in sys] return sis if __name__ == "__main__": sys = ['x[0]+x[1]','2*x[0]-3*x[1]'] I would ...
Fernando Chueca's user avatar
-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-...
user24644517's user avatar
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 {...
user24477696's user avatar
0 votes
2 answers
40 views

How to solve this global is not defined problem?

This is the error image I'm working on a project and suddenly caught this error , I don't know where the error came from and it didn't have any information, please help me <script> var ...
VIKRAM V J's user avatar
4 votes
2 answers
75 views

Python global variables in recursion get different result

I have this code, which prints 1: s = 0 def dfs(n): global s if n > 10: return 0 s += dfs(n + 1) return n dfs(0) print(s) If I modify dfs like this: def dfs(n): ...
ValueError's user avatar
0 votes
1 answer
49 views

Why do different delivery methods have different results when applying PHP's global keyword?

PHP implements the static and global modifier for variables in terms of references. For example, a true global variable imported inside a function scope with the global statement actually creates a ...
wdm_wcy's user avatar
  • 17
1 vote
0 answers
34 views

Changing PHP code which uses PHPs $_REQUEST super global

New to php and have read up on $_REQUEST being strongly discouraged, due to the fact that it makes it nearly impossible to determine the source of the data, and also being a security risk as well. Not ...
php1's user avatar
  • 23
0 votes
1 answer
60 views

Global event monitoring with WPF

I would like to ask for help in this matter: in WPF, I would like to monitor the keydown, mousedown and mousewheel events even if the window is not currently active.I use c# with WPF. I tried many ...
RyuuDark's user avatar
-4 votes
1 answer
98 views

What functions can access a global variable that appears in the same file with them?

I asked ChatGPT and Google Bard a C++ question that "What functions can access a global variable that appears in the same file with them?" They answered that "Any function within the ...
MudassaRXaeed's user avatar

15 30 50 per page