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,719
questions
2
votes
1
answer
53
views
javascript setting a .map() range and update the range later
I'm building an app with React & JS which returns products from a json list inside a component, the array is outputted on the app using a .map() array. I'm also limiting the amount to return ...
0
votes
0
answers
21
views
C++ Large Heap Array Initialisation
I am writing code which demands a large array. I am told that, due to the size of the array, it is best to store this in Heap Memory. I need this array to be unsigned because I am using it to store ...
2
votes
2
answers
45
views
Angular - Passing a dynamic string property name to Sort and object array
I am trying to dynamically sort a simple object by the property name.
sampleArr: {
name: string;
age: number;
}[ ] = [
{ name: "Michael", age: 21},
{ name: "Adam&...
-2
votes
0
answers
53
views
Sum over arbitrary dimensions of an array fast in C++ with a GPU [closed]
I'm looking for a good (easy to write/debug) way to sum over an arbitrary dimension of an array in CPP using a GPU. I'm particularly interested in the case of summing over the 3rd dimension of a 3D ...
0
votes
0
answers
18
views
Initializing array elements inside a forEach [duplicate]
I declare an array, then set its arr.length property. When I try to initialize its elements inside a forEach loop via arr[index], it doesn't work and only those elements can be accessed/modified which ...
0
votes
0
answers
54
views
Java Market Linked List [closed]
ItemTypesLists.java:79: error: incompatible types: Market cannot be converted to Zip
return ZipList.get(index);
^
ItemTypesLists.java:83: error: incompatible types: ...
0
votes
0
answers
8
views
Initializing an array created with malloc with arbitrary values
I need to create large float arrays using malloc, to be able to free the memory when I don't need the array anymore.
The values are arbitrary, meaning they are not all zeros or ones, much more random ...
1
vote
1
answer
89
views
multidimensional slice access performance in golang
I am working on a little and simple game-of-life in Golang and stumbled on a performance problem during slice access.
This is the primary data structure for the game:
type Neighbor struct {
X, Y ...
1
vote
1
answer
61
views
Converting a flat file into JSON structure using ADF (Azure Data Factory)
I have a flat file which contains information such as names, addresses, mobile numbers, email addresses, etc. We want to convert this into a JSON-structured output. I have created a data flow which is ...
0
votes
1
answer
32
views
Coloured options in a drop down Picker using ForEach in Swift UI
I'm interested in creating menu similar to one displayed in the screenshot below.
This menu is accessible via Rules settings of Mail.app. I'm interested in colouring the symbol on the left hand side. ...
0
votes
0
answers
17
views
How to create a new table containing all unique strings extracted from JSON arrays in the column of another table. SQL
I have table describing music and column genres contains values like ["genre1", "genre2","genre3",..] (multiple genres can belong to one song).
I need to create table ...
-1
votes
0
answers
20
views
understanding json_decode data [duplicate]
When I use json_decode and look at the results, I get a list of objects and arrays. I specifically want to retrieve one piece of information, but I'm not sure how to get it. I seem to have a stdClass ...
-1
votes
0
answers
39
views
How to convert complex JSON with list of arrays to table format in ADF
We have an unusually formatted JSON file to convert into a table format using Microsoft Azure Data Factory (ADF). I've had a few attempts using the flatten and aggregate components, but haven't been ...
0
votes
0
answers
15
views
Pine Script array syntax to display ROC on multiple instruments (BTC, ETH, etc)
The script below displays the rate of change (ROC) for multiple instruments (in this case, four BYBIT alt coins), as well as calculating the average ROC. It works, but I need some help with syntax to ...
-4
votes
0
answers
54
views
how to write this row mapper in better way [closed]
'm working on a Spring Batch application and have implemented a custom Partitioner to divide processing across multiple threads. I'm having trouble writing a JUnit 4 test for my partition method. I've ...