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,336
questions
0
votes
0
answers
27
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;
...
-5
votes
0
answers
19
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
0
answers
14
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
11
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
21
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 =...
-1
votes
0
answers
16
views
Find the average per inex 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
93
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 ...
1
vote
0
answers
32
views
Multiple adding to cart in JavaScript doesn't work
when I add products to the shopping cart at some point it stops updating the table, it is refreshed when I click the previous product and the product I want to add.
Live site: https://frontend-mentor-...
1
vote
0
answers
5
views
Warning: Undefined array key 0 releases/80/vendor/magento/module-configurable-product/Model/Product/Type/VariationMatrix.php on line 47
A configurable in the Product view opens up with the error message, of which I cannot proceed any further. The children attached can open up without issue. There were not any issues with opening up ...
0
votes
1
answer
19
views
LENGTH of ARRAY [42883]: ERROR: function array_length(text[]) does not exist
ON PostgreSQL 9.6.10 (Red Hat 4.8.5-28), 64-bit
select string_to_array('file.name.pdf', '.')
{file,nome,pdf}
select array_length(string_to_array('file.nome.pdf', '.'))
[42883]: ERROR: function ...
0
votes
1
answer
27
views
Checking a candidate majority element: Does my simplification work with all cases?
Here are the details of the problem:
Given a sorted array arr of N elements.
A majority element in an array of size N is an element that appears more than N/2 times.
The task is to write a function ...
0
votes
1
answer
25
views
CSV backslash create issue while procession file data
I am trying to process a CSV file in which one column contains JSON formatted data. In this JSON data, some fields use backslashes, which creates a problem when mapping fields with their values.
Link ...
-1
votes
2
answers
63
views
Todo list using array and loop
I want to create a todo list using array and loop and display the list in div container. I am able to display the list but it is muliplying the same list stored and is displayed.
<body>
<...
0
votes
2
answers
89
views
How to show String of array text in curve shape in SwiftUI?
I need array of text should scroll in curve shape like below:
Code: but with this code i can create green colour curve shape view but how to show array of text in curve shape ? please help me to ...
1
vote
3
answers
67
views
In C, why can a variable holding a char array be assigned to a pointer, but the address of the same pointer cannot?
Consider the following code:
char stringy[] = "There's too much confusion, I can't get no relief!";
char *pStringy;
pStringy = stringy;
This compiles -
stringy is an array of characters, ...