All Questions
Tagged with static-array or arrays
418,061 questions
-3
votes
2
answers
85
views
How to do hierarchical queries with arrays
I have an JavaScript array like this:
let myArray = [
{ name: 'Alice', children: ['Bob', 'Bill'] },
{ name: 'Bob', children: 'Cindy' },
{ name: 'Bill', children: [] },
{ name: 'Cindy', ...
Best practices
1
vote
4
replies
65
views
How can one create mini quiz app project with pure vanilla JavaScript. i'm a learner, after the structuring the html / css i couldn't continue
How can i create a mini quiz app with pure vanilla JavaScript which takes questions and presents options which include the correct answer and output the scores with a next button which switches the ...
4
votes
2
answers
133
views
Type of the array extension in C++
As far as I know, the type of N in T[N] is std::size_t. I'm using C++17, in case it matters.
template<class T, T N>
void check(char const (&)[N])
{ std::cout << std::is_same_v<std::...
3
votes
0
answers
59
views
Trying to write a code that gets an array of random temperature readings for 14 days. Then outputs the high/low temps and averages on those days
I am trying to write a code that generates a random array of 14 day temperature readings; 11 readings per day. Then calculate the daily high/low temperatures for each day and calculate the average ...
Best practices
0
votes
1
replies
48
views
How do I weight certain array comparisons more heavily than others when matching input across an answer key?
I'm making a quiz-type program and I have 8 preset answer keys that each have an array of 15 binary values. User answers the same 15 questions, I compare their array against all 8 and then return the ...
Advice
0
votes
4
replies
45
views
I need to create an array from a foreach iteration from a lower value
I know that seasoned PHP would do this easily. My background is more from Obj-C/Swift, and I haven't been able to come up with an elegant/optimal solution to this issue without iterating three times ...
Advice
0
votes
3
replies
99
views
Displaying information from php arrays in html
I have an apache webserver and a browser plugin. The Plugin does check form which website something is downloaded from and checks if it is downloaded from a specific domain. If so it fetches some data ...
13
votes
1
answer
611
views
Why is nonzero(arr != 0) faster than nonzero(arr) in python?
It doesn’t make sense to me. It looks like nonzero(arr != 0) just creates an intermediate array, allocating more memory. No way it is faster, otherwise why doesn’t NumPy optimize it? But here is my ...
0
votes
2
answers
83
views
A global array passed between several subs
Good day,
Something interesting I hope you may help me solve.
I have a global variable FlowTable() as Variant. I'm deleting rows in it within a loop. Each time it runs, it should update the Ubound(...
Advice
0
votes
26
replies
127
views
(Solved) Why is there a low limit to size of array which one can write to address received from outside of the function?
Answer: I was doing things the wrong way, as I had misunderstood what my code was actually doing.
The undefined behavior was "working" up to a limit, and not beyond that.
I am new to C, I ...
0
votes
0
answers
46
views
Is it possible to resolve Bellhop module 'readshd' TypeError?
My Question: I am trying to run an acoustic program with Python. I have encountered an error in the file bellhop_block_tl.py, which the below directory PyAT-main reccomends running first. I am looking ...
3
votes
1
answer
101
views
Why does isMissing(array()) return true?
When testing a variable v that contained an empty array, I found that isMissing(v) unexpectedly returns true. I can't see why that should be.
' in a module
function test(optional v)
debug.print ...
0
votes
1
answer
67
views
how to get List of GID numbers and List of Sheet Names in Google Sheets?
I tried CELL, ADDRESS and INDIRECT, but gids are elusive. how would one get the list of sheet gids, and sheet names that are not tainted by JS-style hexadecimal escape sequence (so they could be ...
0
votes
2
answers
103
views
Assign Normal Distribution Function to an Array
Does anyone know how to assign embedded Excel statistical methods (like in this case Normal Distribution) to an array?
Function NormDistr(r As Range, average As Double, std As Double) As Variant
...
0
votes
0
answers
52
views
for loop counter gives error for array index [duplicate]
Strangely, the following code returns an error stating that the array key 11 or 12 does not exist for the playersPool[$x]['gender']. When dumping the $playersPool array it usually returns a count of 9:...