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,776
questions
1
vote
0
answers
36
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
6
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
22
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
37
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
28
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
3
answers
72
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
90
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
75
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, ...
-1
votes
0
answers
17
views
How can I convert a multidimensional array from x by y to y by x? [duplicate]
Given the 3x2 multidimensional array:
const arr = [
[1, 3, 5],
[2, 4, 6]
]
where (1,2) === 2 and where (3,1) === 5 and etc
How can I convert it to the 2x3 multidimensional array:
const arr = [
[...
-1
votes
3
answers
42
views
Retrieve array data that every nested array contains
The main goal is to select all the colors that every car.colors contain, if there's no color that every car have then the expected output is an empty array.
Having an array that contains text, and a ...
-1
votes
0
answers
20
views
Output an object's value without looping [duplicate]
I'm trying to var_dump the guid value in this object without setting up a foreach loop. I think the ["2"] key is throwing me off. This data is coming from the Toast API. Any help would be ...
0
votes
0
answers
13
views
Google Earth Engine: error "Invalid type. Expected type: Number" trying to compute a Number while performing histogram matching on satellite images
I am working on satellite imagery on Google Earth Engine (JavaScript), and I'm experiencing some issues while I try to perform histogram matching on two images from two different time periods.
In ...
0
votes
1
answer
42
views
How to convert long hex string into byte array (0x69, 0x63, etc. etc.)
I have a long hex string (around 8000 bytes) that I want to convert into what I think is called a byte array. (Please be kind if I've got the name wrong.) In other words, the string begins
69636E etc.
...
0
votes
0
answers
38
views
Leetcode output is different from visual studio code output
I just started on my leetcode exercises and I ran into a bit of a problem. I usually work on the leetcode problems on vsc and then when I got my answer, i just copaste it onto the leetcode answer box.
...
2
votes
1
answer
28
views
Extract Unique Values from a Power BI JSON in Power Automate
I have the following JSON that comes from PowerBI (via the Power Automate button function)
[
{
"entity": {
"Power BI values": [
{
"G-DATEMO":...