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.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

How do you split the string using specific number?

I'm trying to split numbers using the specific digit "11". For example, "1110110011" is a string and I want to create an array of these strings like this, "11, 1011, 0011"...
0
votes
3answers
27 views

Validate an array of array

It is possible to validate an array like this: const Array = [[1, 2], ['hello', 'hi'], []] I need to kwon when one array is empty or is ".length === 0" but only if one of the array is empty ...
0
votes
0answers
7 views

How can I solve getting undefined length and entries when I acess array in Angular?

I do an http.get of a JSON in this format (to get it as an array of strings): [{"_id":"605399e2d8be7837b42a4de7"},{"_id":"605399e2d8be7837b42a4de8"}] with this ...
-1
votes
0answers
20 views

What's causing java.lang.ArrayIndexOutOfBoundsException here? [duplicate]

I wanted to do a simple code, that displays 6 random numbers (from 1 to 49) via arrays. Everything works fine here, but at the end there's always java.lang.ArrayIndexOutOfBoundsException. How can I ...
0
votes
0answers
12 views

Can't seem to get an output? I do not know why [closed]

I have written a bit of javascript code that I am trying to get if the # is Armstrong it would show true or false. however for some reason my output will not show, It will not show me any errors. ...
0
votes
0answers
6 views

Trying to create a array with the intersection of two arrays but fails at creating array with the proper structure

So, I am trying to create 2 randomly generated arrays,(a, and b, each with 10 unique whole numbers from 0 to 20), and then creating 2 arrays with the info of the last two. One containing the numbers ...
1
vote
0answers
11 views

Why isn't the spread operator passing my array by value instead of by reference?

Sorry for the vague title. In the function below: 1 function updateArray(data, columns, rows){ 2 let returnData = [...data]; 3 for(let i = 0; i < rows; i++){ 4 for(let j = 0; j <...
0
votes
1answer
12 views

How do I select 3 character in a string after a specific symbol

Ok, so let me explain. I have some string like this : "BAHDGF - ZZZGH1237484" or like this "HDG54 - ZZZ1HDGET4" I want here to select the triple Z (that are obviously 3 differents ...
1
vote
1answer
22 views

React Loop through array and render

I am trying to display both of these arrays. Everytime you click the button a new user is generated and I added to the array. I would like for it to render the entire array and not only the newest ...
-1
votes
0answers
13 views

Filtering two lists of objects with same props in Python

I have two lists of objects: 1 - list_one {'name': 'Jhon', 'OS': 'Android', 'impact': '1'} {'name': 'Jhon', 'OS': 'Iphone', 'impact': '1'} {'name': 'Roger', 'OS': 'Android', 'impact': '1'} {'name': '...
-1
votes
2answers
25 views

How to print different items in an array with a while loop

I am creating a lotto number generator, with the powerball number at index zero in my array. however I am supposed to print all items in the array with the powerball nuber printing last. If it didn't ...
0
votes
0answers
9 views

How how to display lifespan in codeigniter

how to display the lifespan in codeigniter 4 based on tgl_lhir I found this code in php but I'm confused about implementing it in builder form is code here $query = $this->table($this->table) ...
-1
votes
0answers
16 views

Change Strings in C [duplicate]

I'm trying to output the swapped strings in the main function, but it only works when I put printf in the change_String method. I really want to print it out up there. Can anyone see what I'm missing ...
0
votes
0answers
19 views

I want to find the strings with the placeholders from a given string in JavaScript [duplicate]

I have a string as below string = "my name is [name] and Birtday is [birthday]" I want to get all the words inside the placeholders into an array. The following shows the array. array = [ &...
1
vote
1answer
31 views

Get unique values from an object of arrays (complex)

var myObject = { word1: { a: ['1.json', '2.json'] b: ['3.json', '4.json', '5.json'] }, word2: { x: ['1.json', '3.json'], y: ['2.json', '4.json'], z: ['5.json'] } } So the ...

15 30 50 per page
1
2 3 4 5
24174
久草视频新免费_日韩视频一中文字暮_欧美三级片