All Questions
418,060 questions
-4
votes
1
answer
41
views
How do you re-initialize an <input type="file" name="photos[]"> using javascript/jQuery? [closed]
Definition of "file" element:
<input type="file" id="photos" name="photos[]" class="form-control mt-4 row-gap" multiple>
-6
votes
1
answer
58
views
Why does my JavaScript map() return undefined instead of the expected values? [duplicate]
I’m trying to use the map() function to transform an array of numbers, but I keep getting undefined for each element. Here’s my code:
javascript
const numbers = [1, 2, 3, 4];
const doubled = numbers....
Best practices
1
vote
5
replies
95
views
incompatible types: unexpected return value, void cannot be converted to int
Return keyword doesnot supported by vs code while written java programif at the place of return keyword we used system.out.println program are run but I want to run program by the help of return ...
-3
votes
1
answer
154
views
How to do hierarchical queries with arrays [closed]
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
111
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 ...
5
votes
3
answers
248
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
1
answer
78
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
2
replies
65
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
64
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
108
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 ...
14
votes
1
answer
677
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
87
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
136
views
Why is there a low limit to size of array which one can write to address received from outside of the function?
I was solving some problems, so was doing the following (putting simplified code here):
#include <stdio.h>
int verbalize(int arr[], char** words, int size);
int main(void)
{
int size = 3;
...
0
votes
0
answers
47
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
102
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 ...