Questions tagged [arrayofarrays]
92 questions
0
votes
1 answer
How do I not include duplicate values in a React state array , how to prevent duplication of values in array?
I want to store 15 different questions in items[0].question state
I want to make sure that I can't push a duplicated value into an array in a React state. The duplicated value is still going in the array though.
I have tried using .includes but it…

Shubham Sanchela
- 25
- 8
0
votes
1 answer
Ruby on Rails: combine (or append?) values from array of hashes with an array of arrays
I have an array of arrays, containing aggregated data on total number of clients, total number of orders, total value of orders and location.
current_clients => [
[293, 2846, 28365.00, "Glasgow"],
[958, 8174, 85551.50, "Edinburgh"],
[177, 982,…

Pebbles
- 48
- 7
0
votes
2 answers
Perl: Combining the values of two arrays of hashes and making the values of the second array the keys of the output hash
Sorry if what I'm calling array of hashes is something else. I'll just refer to these things as 'structures' from now on.
Anyways,
Let's say I have two structures:
my @arrayhash;
push(@arrayhash, {'1234567891234' => 'A1'});
push(@arrayhash,…

You Idjit
- 31
- 4
0
votes
0 answers
Need help in display data to a table using reactive angular form
Json Data :
"stocks": {
"stock": [
{
"beginDate":"20190531",
"endDate":"20190619",
"issuedShares":"true",
"totalAssets":"true",…

Umesh
- 1
- 2
0
votes
0 answers
Create array of array in numpy
I am trying to create an empty array of arrays in numpy, and add elements to it an a for loop.
I tried to create it by arr_of_arrs = np.empty(num_of_arrays, dtype=np.array), but I got an error TypeError: data type not understood.
How can I do it?

Dani
- 719
- 1
- 7
- 14
0
votes
1 answer
dynamic array of strings, but i get heap corruption detected
I try to make a dynamic array of char pointer, what means does pointers can be a dynamic memory too, so in the code above I try to allocate one size to the array and in him, allocate to the first object a string. But I get an error "heap corruption…

Artur Karabekov
- 17
- 3
0
votes
3 answers
How can I convert Array of Objects into Array of Array of Array
Hello Everyone I'm beginner in javascript I'm trying to convert from Array of objects into Array of array.I have tried some methods like Object.entries.But I didn't get the output what I expected.If anyone helps It will really helpful to me.Any kind…

Vignesh RaviKumar
- 13
- 3
0
votes
5 answers
Remove an array from an array of arrays
I'm totally new to Javascript. I'm working with data from a business database and I want to remove an array from array of arrays.
I have this array of array:
var results = [ [#null, null], ['miglioramento', 30], ['correttiva',45] ];
I want to…
0
votes
5 answers
php text file to array of arrays
i got a text file that contains
a b c
a c
b
i want to read the text file and convert it to array of arrays like this
array(
array('a', 'b', 'c'),
array('a', 'c'),
array('b'));
i want to split each line in an array and…

Kassem Jeha
- 31
- 3
0
votes
2 answers
Passing array of Arrays to a function
I was trying to pass array of arrays to a function, but I am not getting correct results. I looked at [this SO post][1] for this purpose. I am not getting any warnings and I am using TDM GCC 64 compiler. What could be wrong with this code?
#include…

Rajesh
- 1,085
- 1
- 12
- 25
0
votes
0 answers
What is the syntax for construct array of array using placement new?
i have trying to construct array of array for placement new.
i searching internet only manage to found construct an array using placement new. But what if i want array of array instead?
i not sure how to construct the inner array.
memory manager…

NMT
- 55
- 2
- 9
0
votes
1 answer
PHP How To Turn Nested Foreach Into An Array of Arrays (Multidimensional Array)
I'm sorry because I'm probably not going to use the correct vocabulary here, but I'm trying to figure out "how-to" modify the following code so that it creates the array of arrays (Multidimensional Array). This code creates the structure illustrated…

Mr. B
- 2,677
- 6
- 32
- 42
0
votes
1 answer
How does a pointer to a 2D array work underneath the hood?
I can't understand why this piece of code which is supposed to perform matrix multiplication goes wrong.
Input: 2x2 matrices with elements 1,2,3,4 in both matrices
Expected output: 7 10 15 22
Output given by this code: 15 22 12 16
int a[10][10],…

Manogyana T
- 31
- 5
0
votes
1 answer
N-dimensional array into single array?
I have an array of lists and I want to convert it into single dimensional array. I can do it with 2 "for" loops but one prohibition is that I have to do it as it was N-dimensional array.
original_list = [[2,4,3,[1,2]],[1,5,6], [9], [7,9,0]]

Guja Markozashvili
- 23
- 5
0
votes
1 answer
ngFor - Unable to sort array of objects Angular 5
I have array of array of objects in Angular and I'm trying to sort into HTML.
The output of array is show in chrome console :
With sample inside the array :
in typescript file:
this.results = [
[{score: 0.535632, tone_id: "anger", tone_name:…

Atom
- 421
- 2
- 6
- 16