Skip to main content

Questions tagged [global]

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

0 votes
0 answers
187 views

Using pragma in .c and .h file

I am using pragma like this in .c file: #pragma ghs startdata #pragma ghs section bss=".BSS" static int A; #pragma ghs section bss=default #pragma ghs enddata in .h file: extern int A; ...
Bui Ngoc Minh's user avatar
-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 ...
Steve Newcomb's user avatar
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 ...
johnexpl's user avatar
0 votes
0 answers
21 views

php variable why it is visible in other files without being declared global? [duplicate]

I defined the following files 0.php <?php $v='good'; echo 'In file: '.__FILE__." v={$v}<br>\n"; ?> 1.php <?php require '0.php'; echo 'In file: '.__FILE__." v={$v}<br&...
George Kourtis's user avatar
0 votes
0 answers
74 views

Unexpected global objects in node 18 [duplicate]

When executing with node v18.17.1, why are there different versions of the global object? function foobar() { return this; } console.log(this); // {} console.log(foobar()); // Large output, as below: ...
Beyers's user avatar
  • 21
-1 votes
1 answer
107 views

How do you get all the classes in another package so they can be instantiated in Python3?

I read the question "Importing a whole folder of python files", but it does not include a way to do it without one import per file. Beside the requirement of avoiding several imports, it is ...
John Glen's user avatar
  • 883
-2 votes
2 answers
83 views

How can I "globalize" struct methods?

I have a struct/class and i want to call some (or all) of its methods globally (without writing class_name::func_name() every time. I don't know what to replace on the using namespace foo; line. I ...
midi's user avatar
  • 7
0 votes
0 answers
17 views

In wtforms, how to use one form to set defaults for another

This is my first attempt to use WTF. I would like to collect data from one form and use it to set a default in another. I am using a global to try to do this, because I don't know another way. Here is ...
Sarge Gerbode's user avatar
0 votes
1 answer
101 views

Error deploying global resources into China with Terraform

I'm trying to deploy a cloudfront distribution and a waf into China using Terraform. I get this error: Acquiring state lock. This may take a few moments... ╷ │ Error: error configuring Terraform AWS ...
adminaf's user avatar
  • 58
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(...
sarcastic_pedant's user avatar
0 votes
0 answers
47 views

when importing a function in a different file, the function produces less output

In one file (function_general) I created an function called process_excel. This has as input an Excel file path and a list of dictionaries. As output I have dataframes, the same amount of the length ...
RB_student's user avatar
0 votes
0 answers
83 views

Global vs. local scope at `(new Function()).call(...)`

my Problem seems to be in my module.js. It seems the evaluateJavaScript() function calls my script modules correctly: the this in the module is a reference to the new Module() object (within Module....
Sebastian's user avatar
0 votes
1 answer
242 views

Adding to SwiftData from a global array, not working as expected

This is the most basic of SwiftData setups, I started looking at this after encountering a problem in a much larger app. In the sample below the issue is that if you press the "Zoo" button ...
fuzzygoat's user avatar
  • 26.2k
0 votes
0 answers
120 views

NextJS, global css styles not applying to the elements

I've made a blog using nextJS loading markdown files as posts on the main page. I'm using css modules plus the global.css file. However some of the properties of the global.css file seem to no be ...
ataractic's user avatar
0 votes
0 answers
37 views

Using SentenceTransformer embedder as global variable in pythonanywhere

I want to create a SentenceTransformer embedder as a global variable so that I can use in flask methods. As I know from https://pytorch.org/tutorials/intermediate/flask_rest_api_tutorial.html, model ...
sty2004's user avatar
  • 11

15 30 50 per page