Multidimensional-arrays can be described as "arrays of arrays". Multidimensional-arrays are often used to put values in a table format (e.g. rows and columns).
0
votes
2answers
17 views
Array Indexing in multi dimensional numpy array
I'm new to numpy and trying to understand the following example from here. I'm having trouble understanding the output of
>>> palette[image]
When the indexed array a is multidimensional, ...
0
votes
1answer
41 views
MySQL PHP - SELECT WHERE id = multidimensionalArray
I have 2 table in MySQL:
Expected table matches:
id | idA | idB
1 | 21 | 1
2 | 21 | 2
3 | 22 | 3
4 | 8 | 2
5 | 9 | 21
6 | 10 | 7
Table data:
id | projectId | name
1 | 2 | ...
1
vote
1answer
23 views
how to create multidimensional array / object in jquery and pass via AJAX post
I am creating an order form that has a table of order items users can purchase. The inputs are using data attributes to store the items name and price per piece like so:
<input type="text" ...
0
votes
2answers
57 views
Can I access elements of a 2D array using pointers in C++?
For 1D array, I can use array name as a pointer and add offset to it to access each element of the array. Is there something similar for 2D arrays?
I defined a 2D array as follows
int arr[2][3] = ...
0
votes
0answers
19 views
php compare arrays for pairing people (with conditions)
I am writing a PHP script that is for a essentially a gift grab-bag (pulling names out of a hat). But there's a few conditions:
-You cannot be paired with your spouse
-You cannot have who you had last ...
1
vote
0answers
32 views
PHP creating/pushing to nested array by reference
I have a series of repetitive array rebuilding tasks which look a bit like this:
list($zone, $asset, $combos) = explode(FM_DELIMITER, $ti_data[0], 3);
if( !array_key_exists($zone, ...
0
votes
1answer
14 views
Visual Basic - Storing information from an array to a two dimensional array
I have some code where I have a "map" stored in a string and then I put this into an array. This array has seperated the string into characters for each index position. I now want to put these ...
1
vote
2answers
50 views
2D array as instance variable of class
So if I have a class with a 2D array that I want to initialize with two parameters passed into the constructor, how would I do that, I keep running into errors because it won't let me update the two-d ...
-1
votes
1answer
24 views
How to insert one array one associative array into another associative array in PHP? [closed]
I've a following associative array named $request as follows:
Array
(
[chapter_mcq_que_id] => 9
[chapter_id] => 103
[chapter_mcq_que] => Who is Anand?
...
3
votes
2answers
94 views
Why are these computation speeds different for multi-dimensional array in C++? [duplicate]
This might be a repeat question. So, please feel free to flag it down if you want.
In C++, I learnt that array dimensions are stored consecutively in memory How are 3D arrays stored in C? so i did a ...
0
votes
1answer
33 views
How can I get global arrays across files?
How can I get global arrays across files?
I know that I can use $GLOBALS[''] for variables, but what about arrays or even multidimensional arrays?
I need to get the value of arrays those are not in ...
0
votes
2answers
38 views
Looping over a multidimensional array
For an array within an array in JavaScript (as below),
why can't I loop through like this?
for (var i = 0, len= animation.length;i <len; i++) {
for ( h = 0, len2= animation[i].length;h ...
-1
votes
2answers
69 views
How to manage and sort integers from a loop in java [closed]
So I have a loop which will compare two lines of code depending on how many words match, the output of each loop is a percentage of how many words match.
I need to store all the percentages and the ...
1
vote
0answers
38 views
creating and manipulating 3d arrays
I am (very) new to python, previously a Matlab user.
I try to create code to load times series into the rows of a matrix [serie1, 2, 3, etc.] and then manipulate those time series into a loop (see ...
0
votes
2answers
22 views
How do you a nested value ina multidimensional array in PHP?
I am trying to learn Twitter's API. This is what the server returns when you send a request.
[
{
"coordinates": null,
"favorited": false,
"truncated": false,
"created_at": "Wed Aug ...