365体育足球滚球比分

Questions tagged [arrays]

365体育足球滚球比分 An array is an ordered 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 which is specific to a programming language, tag the question with the programming language being used.

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

How to do iterated moves of items in an array in Swift

Let's say we have an array: var scrambledAlphabet = ["B", "C", "D", "E", "H", "F", "G", "A"] and we want sort it by moving two items: item 7 ("A") to location 0, and item 4 ("H") to 7, described ...
0
votes
3answers
30 views

How to you put more words in a string as a value in an array?

function = input('Enter function') a = input('do you want to enter another function') b = [function] if a.lower() == 'yes': while True: function1 = input('Next Function') b += ...
-1
votes
1answer
14 views

Java - Group and Sort Array of Objects by property

I have got an array of objects of the form: [ { "id": "id_1", "type": "A", "value": "value_1", "label": "label_1" }, { "id": "id_2", "type"...
0
votes
0answers
6 views

VBA - Probabilistic Random Selection from Dynamic Array

I'm new to VBA here. I have 2 lists, a list of price, and a list of the probabilities assigned to the price. I need to generate a list of 300 numbers based on the probability group. However, I can't ...
0
votes
1answer
22 views

Updating value in array updates all values with the last inserted value PHP

I have two arrays, one with quantities called aantal and one with products called producten. Producten: Array ( [0] => Array ( [0] => 2 [1] => Tegel ...
0
votes
0answers
22 views

counting Tasks/Users - easier/more efficient way?

Im working on a simple Task Scheduler, the code is working, but im not satisfied with it, especially with the count-function. It counts the Task of every User, so new Tasks can get distributed ...
0
votes
6answers
57 views

Removing duplicate objects from array by property

so i have an array of objects, there are duplicate objects that contain the same id, i want to receive the first object with a unique id each time and then store that in a separate array. I Thought a ...
0
votes
0answers
10 views

Median of multiple arrays in Julia

It's related to this question I want to know how to calculate median along specific dimension on huge array, for example with size (20, 1920, 1080, 3). I not sure whether there is any practical ...
0
votes
0answers
11 views

In react native, conditionally render an item in an array

I have a Formik form in react native where I have a field array that has a series of questions. One of the questions has a custom component that the user can select from and if they select 'changed ...
0
votes
0answers
18 views

Swift, make array index out of range Optional [duplicate]

I have a array of with 3 items, but when I print the item with the index greater than it's count, the app crashed, How can Make it print nil instead of crashing the app? var arr = ["a", "b", "c"] ...
1
vote
2answers
29 views

Laravel make array of another array objects

I have general data array and I need to get array of specific data inside this general array so I can match it against my database. Code $nums = []; foreach($request->phones as $phone) { ...
0
votes
0answers
13 views

Generating random mock data with specific time range using javascript

I wanted to generate mock data with the below structure. Conditions, Start time and end time interval should be 30 Mins or 1 Hr. 2-3 mocks for the same day with different time intervals [{ ...
0
votes
0answers
19 views

Different file byte array in C# and VB.NET

I have an issue with a byte array from a file. I get the byte array from a file in C# and VB.Net but it´s different in both languajes. It´s a minimal different but it produces a failure. This is my ...
1
vote
1answer
33 views

One liner to get an array of positions form NUMPY array in python

I have the following numpy array named histarr with the shape 1, 13 array([0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0], dtype=uint32) I want to get an array that gives me positions where 1's are, hence I ...
0
votes
1answer
22 views

Pivot array based on row count

I have the following: $array = array(1,2,3,4,5,6); I need to "pivot" it to get : Array ( [0] => 1 [1] => 4 [2] => 2 [3] => 5 [4] => 3 [5] => 6 ) by "pivot" I mean, let's imagine ...

15 30 50 per page
1
2 3 4 5
22297