36,167 questions
0
votes
1
answer
28
views
How to properly constrain two-dimensional array types to be square in Ada?
I'm trying to create a package of generic adjacency matrices to define graphs, and the first goal is to define a static version based on two-dimensional array:
with Ada.Containers.Vectors;
generic
...
1
vote
2
answers
86
views
How to make it so that the arrays inside the array don't get changed?
I am trying to make a loop that will fill in an array of arrays that will contain every possible colour value in rgb form given the bit depth. However, I have noticed that even after an array is ...
-2
votes
1
answer
128
views
How do I insert a multi-dimensional dictionary into a SQL database in python [closed]
My database schema is as below for sqlite3
sql_create_dynamic_parse_table = """ CREATE TABLE IF NOT EXISTS dynamic_stauts_tags (
key_tag VARCHAR NOT NULL,
tag TEXT NOT NULL,
...
1
vote
1
answer
78
views
How to flatten multidimensional array in Azure Data Factory/Synapse
I want to extract "email" from JSON using ADF/Synapse.
Below is the JSON that I want to flatten and extract all "email" which is in an object in a multidimensional array:
{
"...
2
votes
1
answer
88
views
Convert ADODB RecordSet to a 2 dimensional array
I want to read an Excel file without openening the file and put the result in a two dim. array. For this I use the below code
Sub ReadExcelFileWithoutOpening()
Dim conn As Object
Dim rs As Object
Dim ...
-1
votes
1
answer
159
views
Use of 1D vs. 2D vectors in C++ implementation [closed]
After some extensive search I could not find a clear answer to the following issue. When one is to compare the 1D (vector<type>) vs 2D (<vector<vector<type>>>) vector ...
1
vote
2
answers
157
views
how to efficiently save a large image using stbi_write_png which is stored in a multidimensional array
In my initial question there was some confusion as to what I was really trying to do.
Specifically, when I edit large images i store them in an array of pixels where Pixel image[iwid][ihei] is my ...
1
vote
1
answer
96
views
Is it possible to expand/deduce a parameter pack to/from array dimensions?
I am using the following code for automatic vector/matrix template parameter deduction (I am particullarily interested in automatic deduction from passing initializer lists)
template<class T, ...
1
vote
2
answers
87
views
XML with attributes to array in PHP
I am trying to convert an XML string into multi-dimensioned PHP array. The difficulties are that XML comes with attributes and has nested values. My code works at parent level data but I am not sure ...
2
votes
3
answers
182
views
Is there a performance drawback when declaring 2D arrays using int** compared to int (*)[N] in C?
I have a question about the performance tradeoffs between different ways of storing 2D arrays in memory in C.
I know that if I declare a 2D matrix A with dimensions MxN by the following:
int (*A)[N] = ...
0
votes
0
answers
77
views
I am confused by mdspans' "layout policy", "layout mapping" and "layout mapping policy"
I'm looking at the newly-introduced std::mdspan class template (also described here on SO). One of the template parameters is, according to cppreference:
LayoutPolicy - specifies how to convert ...
0
votes
1
answer
81
views
how to create uniform nested lists and convert them in to multi dimensional arrays?
i would like to create a nested list of arbitrary depth (containing numerical values specifically) with uniform arbitrary lengths at each level and then compress it to a NumPy array of minimum ...
1
vote
2
answers
69
views
Vector from Class objects vector as 2D vector function parameter
Solution requirements:
Pre C++11
Statements:
Function someFunction exists, that accepts 2D vector as vector of string vectors: vector2d.
Class someClass exists, that contains 1D vector of strings: ...
1
vote
1
answer
74
views
Declaring multidimensional arrays in C [duplicate]
#include <stdio.h>
int main() {
int arr[2][3] = {1,2,3,4,5};
printf("%d", (*arr)[4]);
return 0;
}
See the array declaration in the above code. As per my knowledge, this ...
0
votes
1
answer
75
views
Facing issue while with Parse JSON having nested array in TIBCO BW6
In TIBCO BW6, I am trying to parse below JSON having nested array with below XSD.
But getting error : TIBCO-BW-PALETTE-REST-100016: An error occurred while converting json to xml: Content of array ...