Questions tagged [global]
Refers to a space where variables and other items may be accessed from any scope.
global
4,722
questions
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
2
answers
82
views
How to call global static method from class static method in C#?
The following program compiles et executes just fine in recent versions of C#, where a Main function is not necessary:
Module2.SayHelloDouble();
static class Module1
{
public static void SayHello(...
0
votes
0
answers
47
views
Lua error "mutating non-standard global variable 'love'"
I'm starting to code with love2d, so I installed love2d with the love2d support extension, there is no problem running the code and it works perfectly (I can draw hello world and have it appear on a ...
0
votes
1
answer
201
views
rust: static map initialization with enum keys
First up: I am a very newbie with Rust; learning.
This issue arises most probably from thinking in terms of other languages. So most probably the best solution is doing this in a completely different ...
0
votes
0
answers
17
views
Global Variable in Invoke Command
I want to use a global Variable in an Invoke-Command.
In the example below I want to replace the Get-Service with the global variable which will be filled in an earlier Function, $global:ServAction = ...
0
votes
0
answers
41
views
Laravel Inertia-React share function with parameters
In Inertia I know I can share datas via HandleInertiaRequests middleware, can I share a function that gets arguments?
Below code (dummy code) gives the error: TypeError: can is not a function
'can' =&...
-2
votes
1
answer
91
views
Powershell regex replace : string is unchanged
I'm trying to regex replace some groups of charactes in powershell using the following pattern:
/^(thedir[ ]=[ ]")(.)(:[/\])([a-zA-Z0-9])([/\]?.)$/gm
by using this instruction:
$fileContent = Get-...
0
votes
0
answers
39
views
Add persistent global function across pages via window, or localstorage, etc
I am trying to hide an icon on a page I can't edit directly. I need to add a function that has in it document.getElementById('icon').style.display = 'none';. I don't need help with the function.
So ...
0
votes
1
answer
54
views
How to get rid of a global.target within the terminal on MacOS?
I have run into this problem where anything I install with pip installs to my main location of python and not to my virtual environments.
The following line is what I get when I run: python3 -pip ...
0
votes
1
answer
478
views
Can't delete AWS RDS Global database. Deletion protection option missing
Trying to delete a Global RDS database (Postgres 11.9).
I deleted all the instances, and region clusters.
For this Global database cluster, getting error "Cannot delete protected Global Cluster **...
0
votes
3
answers
144
views
Universal function like Start() in Unity C#
I am creating a multiplayer system for unity that is aimed towards people who don't want to mess with anything with networking.
To simplify it, I want to create universal functions (for lack of a ...
1
vote
2
answers
256
views
How can I run a func that lives in a seperate View in SwiftUI?
I have an app wherein once navigated to a second page and shown some results, the user has the option of running the same function but with some different parameters.
I am stuck on figuring out how to ...
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 ...
0
votes
1
answer
60
views
Python logging global variable in an imported library
Can someone explain the behavior of logging behavior in a library which is imported? The log contains a supposedly global variable called trace_id.
I have the following library:
my_library/
__init__....
0
votes
0
answers
11
views
Globals designation is not being recognised in Excel VSTO C#
public CollageAllFunctionsRibbon()
: base(Globals.Factory.GetRibbonFactory())
{
InitializeComponent();
}
I get the message that "Globals" does not ...