All Questions
209
questions
1
vote
1
answer
23
views
React Native trying to use same array globally
I am trying to learn React Native and am wondering if there is a way to store an array, say in a constant file or something, and reuse it in different components. States will be one, as an example. I ...
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 ...
0
votes
0
answers
9
views
How to get Global list into HTML dropdown
I am trying to create a dropdown in the google sheets sidebar that is linked to the list in the globals.gs so it is not hard coded in the html. anyone have any suggestions on how to this or where to ...
1
vote
3
answers
109
views
Initializing global arrays after declaration in C
I need a global array whose size depends on the user. The problem is I don't know how to declare an array globally but initialize it later after getting a user input to know the size. I am not even ...
0
votes
0
answers
37
views
How do I pass arrays through a function resulting in storing local arrays into a global array in python?
I have a function, that passes 2 arrays and then produces a further 2 arrays. I am trying to repeat this multiple times taking the following two values of the input array, so say the input arrays 10 ...
-3
votes
1
answer
65
views
Why is there no difference in the two results between the global array and the local array?
I turned global arrays into local arrays in the main() function to solve my homework for C++. I expected the program to produce an error, but it outputs the same result without any error.
What's the ...
-2
votes
1
answer
107
views
Is it possible to pass a global char variable as a parameter in a function?
So I have a global variable called char words[10]. I would like to pass it as a parameter as in a function.
This is the code I have so far and it does not compile obviously. I just do not know how ...
1
vote
2
answers
55
views
Global constant declared but cannot be used in given function for declaring array length [duplicate]
See line 91 of code,
array<double,size1> poundData; //PROBLEM HERE array declared
Global constant size1 can be used to represent integer value 5 everywhere else in code but returns an error if ...
0
votes
1
answer
40
views
VBA How to work with global arrays- it doesn't return data from function
I've got a global array - I declare it in declarations
Public iPick1() As Variant
Public count6 as Long
Sub MainMacro()
for i=1 to count2
If <something> Then
count6=...
0
votes
2
answers
97
views
numpy delete not deleting the rows from arrays
I am trying to perform the following: I generate 4 4 by 4 arrays with random values:
scan_plus_1 ... scan_plus_4
Next I want to remove rows from each of the previously generated arrays using the numpy....
0
votes
1
answer
44
views
Array in Struct Pointer Only Updates Locally
I am trying to implement a very basic physics system, specifically gravity, in C. I have structured the individual components as follows:
typedef struct Gravity {
float force[2];
} Gravity;
typedef ...
0
votes
4
answers
440
views
Access data from inside a function in the global scope
I'm still learning JS and I'm currently struggling with this problem. I want to be able to access the data from ordArray in the global scope. How do I do this ? I've tried with returns but struggling ...
-2
votes
1
answer
57
views
Free local pointer to global pointer array in ansi c
I just wonna ask do I need free local ptr in function in in this case:
char *ptr_array[];
void fnx(...) {
char *local_ptr = &ptr_array[0];
}
0
votes
1
answer
57
views
Why do some functions recognize this global variable but others don't?
So I have the following JS function that adds rows to a table based on a global list, events. Events starts out empty and I have another function pushing dict object into it. Items are pushed to the ...
0
votes
1
answer
242
views
Passing variables (array index) from remote ssh to global function
BASH
I'm writing a script to check services on a selection of hosts for a selection of users. The selected users are stored in an array. The script connects via ssh to each selected host and would go ...