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.

0 votes
0 answers
21 views

Concatenate comma separated strings using regex

I have a utility function that concatenates a few parameters comma-separated to a formattedString const formattedString = StringHelper.format( '{0},{1},{2},{3}', address.Street || '', address....
user avatar
0 votes
2 answers
10 views

PHP - How to combine a list of arrays that are at the same level

After flattening a multidimensional array, I have an array named $array, which running print_r($array) on gives me the following output: Array ( [0] => 999000000 ) Array ( [0] => ...
user avatar
  • 1
-3 votes
0 answers
18 views

Array reduce by Year>Month>Array

sell_id("-MLmq-nIusA3WTORZIaN"):{ year: "2022" card: "undefined" ssn: "31068205865" cupoun: "NAO" day_sell: "undefined" hour_sell: "...
0 votes
1 answer
16 views

Trying to retrieve index from an list using another list in python without pandas

So I have two 1d array, one being a subset of the other. Say, one array is called main with length 600, and the other array called subset with length 230. I'm trying to find the specific index of the ...
user avatar
0 votes
1 answer
13 views

Vue.js Getting the right index from a array to send it to a div with data index

I need to get the index on the @focus (@click would be the same) to send the right text ()title and description in a div. (i'm new to Vue js and searched answer for hours). let arr = [{ "...
user avatar
  • 1,775
0 votes
0 answers
30 views

Name input field from Array Index name and POST the value

I try to make a loop getting data from table and put it in Array, then put the value on an input field and then make the name of the input field based on an increment value. Finally i have a button ...
user avatar
0 votes
0 answers
10 views

How can I filter Google Health Status by Region?

I'm developing a heartbeat for various social media, but in Google, I get a whole list of services statuses and the problem is I get all regions status, so the same service is repeated lot of times. I ...
user avatar
0 votes
0 answers
32 views

Changing or removing properties of type constructors

My task is to get rid of the methods and properties that are inherited by type instances in order to replace them with formal methods that will be void functions. I decided to try to override the ...
user avatar
0 votes
1 answer
20 views

Append and then insert an element in array in the same program

I want to append and then insert an element in an array. Append() function is appending an element at the last index. After that, I want to insert another element in array at a particular position. ...
user avatar
  • 415
0 votes
5 answers
30 views

Retrieve multidimensional JSON data where index number is randomized/unknown

Been delivered some confusing JSON data with a problem I haven't seen before. The JSON is formatted similar to this structure: [ { "title": "Event", "start_date"...
user avatar
  • 65
1 vote
0 answers
25 views

preg_match VS. stripos in PHP

The target is to check a product description and to identify different characteristics/product options. The input data has the following structure: // TABLE WITH INPUT DATA. STRUCTURE: ...
user avatar
0 votes
0 answers
17 views

How do I filter a local JSON in React?

I'm trying to make a React app with search and filter capabilities. Right now it's capable to search, but not to filter. You can see a working snippet here: https://codesandbox.io/s/flamboyant-shadow-...
user avatar
-1 votes
1 answer
45 views

How to compare array before removing its items in SwiftUI?

How can i compare original items of an array before i remove them? I have an array of items that get removed every time they are showed and get added into the empty array... to avoid index out of ...
user avatar
0 votes
2 answers
30 views

Creating a variable array of pointers

I have this piece of code from a program i am writing that doesn't work if i add a condition. All the values are conveniently put based on those the original program would have. I want to create an ...
user avatar
  • 17
-2 votes
0 answers
21 views

Create a function that returns true if the first array can be nested inside the second array [closed]

Arr1 can be nested in Arr2 if: 1- arr1’s min is greater than arr2’s min 2- arr1’s max is less than arr2’s max
user avatar

15 30 50 per page
1
2 3 4 5
26447