Questions tagged [arrays]
An array is an ordered linear data structure consisting of a collection of elements (values, variables, or references), each identified by one or more indexes. When asking about specific variants of arrays, use these related tags instead: [vector], [arraylist], [matrix]. When using this tag, in a question that is specific to a programming language, tag the question with the programming language being used.
arrays
417,343
questions
-2
votes
0
answers
25
views
How do relationships not cause infinite loops?
So I'm still learning SwiftData and the one thing I cannot get my head around is how relationships don't cause infinite loops.
For example, using SwiftData, if you want to list all the films an actor ...
1
vote
2
answers
78
views
C++: array types and new
I'm learning C++. The following program looks nice and generic:
typedef some_type T;
int main() {
T* p = new T;
}
And it indeed works for non-array types like int, etc. However, if I try typedef ...
0
votes
0
answers
40
views
Best practice approach for dynamically loading and referencing large datasets [closed]
I have an analysis framework which operates on large datasets loaded from other workbooks. The sets comprise headered columns each containing a single metric, with multiple columns on each sheet and ...
0
votes
0
answers
6
views
How can we solve this Array to string conversion error in php 8
I have this below code from old theme file. When migrating this to PHP 8, exactly at this line ($$value['id'] = get_option( $value['id'] ); }) it throws an error - [error] 198034#198034: *334 FastCGI ...
-4
votes
0
answers
21
views
Copying bytes with step offsets from one array to another in VB.net [closed]
I have a large byte array that I want to transfer to a smaller array by copying every 6th byte. The VB.net array copy commands do not appear to offer a method of using offsets - is there a way around ...
0
votes
3
answers
57
views
Search for a pattern in a string array
Let's assume I have the following array:
string[] arr = ["Off", "Off", "Off", "Duty", "Off", "Off", "Duty", "Duty", &...
1
vote
2
answers
40
views
How to count values from a column with JSON content?
I have a table with singers and each singer can be linked to many musical styles.
Musical Styles are in a TEXT column, but the content of the column has JSON format.
I want to count the number of ...
1
vote
1
answer
135
views
Can't understand this C syntax. Designated initialization of an array of structs?
Trying to learn the nuances of C, though I was doing well until I found this:
#define SOKOL_IMPL
#define SOKOL_GLES3
#include "sokol_gfx.h"
#include "sokol_log.h"
#include "...
-1
votes
2
answers
50
views
C++ Rectangle 2D Array with numbers beside the rectangle
I've been trying to make a 2D array of rectangle, and i want the number of index x to printed beside the rectangle and index y to be printed below the rectangle..
Here is my code..
int height, width;
...
-8
votes
0
answers
28
views
How to get and sort a string from an array in javascript? [closed]
I have this array with this string:
['MEX-CUN'] ['MEX-MTY']
and I would like a result similar to this:
CUNMEX
MEXMTY
Is it possible to perform this action?
1
vote
1
answer
24
views
Import Array to Godot via CSV
I'm currently making a game in Godot using CSV tables to help keep track of things. Most stuff works, except when I want to import a column as an array. How would I format this array in a CSV so ...
-1
votes
0
answers
13
views
In excel I need a general set of instructions to derive certain sub arrays
enter image description here
Given an array of variable numbers of rows from 5 to 100 and columns from 5 to 26, an example of which is shown in image;
The columns may start in row 2 with a variable ...
0
votes
0
answers
24
views
How to import an array of rows while editing each row of the array
I have a complicated question
I have one table with a bunch of columns and rows. Then on other pages I import filtered data from the first page. That is, I group all the data into separate groups via =...
0
votes
1
answer
32
views
Find the average per index in a matrix
I'm looking to get the average of each index in a matrix row in JS
[1, 2, 3]
[4, 5, 6]
[7, 8, 9]
Then returning a list with the average of each row index : [4, 5, 6]
Would I create a loop, save each ...
2
votes
3
answers
113
views
Converting to char*** from char* [2][2]
I have the following variable
char* a[2][2] = {{"123", "456"}, {"234", "567"}};
I wanted to refer it using another variable. While the cast works, accessing ...