Category "arrays"

How to convert List<Integer> into JSONArray of Integers, using stream() method in Java

I'm trying to find best way to convert List of Integers to JSONArray of org.json.JSONArray library for API call. For that purpose I'm trying to implement stream

Attempting to 'permanetly' save two user inputs into two seperate arrays, and display the array data in a listbox on a different form

Apologies I am a newbie, ill try to explain as best as I can. Im creating a game for a university assignment. My game is a maths game that asks the user maths q

create a binary file after sorting a numbers with names

I'm trying to wirte a C Program, which sorting list of numbers with names from txt file and write it in a bin file but the problem is that i can't write the bin

Google Sheets Split function with Array

I have a table of current work hours in column A. Column B has newly assigned work hours. Column C just sums up the first two columns to show the new work hours

Cypress won't show an array contents into the console

I'm trying to add the titles of an iframe header into an array to then print the array with it's element into the console. The elements are added just fine, the

Regexextract multiple <a> links from HTML

I have an extract from a description off a webpage which contains multiple links to other pages the whole string is in a single cell. The string below is along

Writing an array to a file in javascript [duplicate]

I have an array of 32 strings called "arr" and I'm trying to save it to a file (like a txt file). I'm doing this in javascript because I'm get

How to create a nested data structure from 2 arrays?

Hi guys I get confused trying to qcheave this, so any help would be great! I have two arrays from which I need a specific object. Source arrays: 1-Types (1D):

How to update XML with reading it only once with PowerShell?

Can someone please help me to do the following more efficiently? I am running this code 4 times for updating specific below protocols/file types. I would like t

Reshape of dataset (Time Series) after filtering?

i am using HampelFilter to detect outliers by SKTIME on my dataset but i faced a problem after applied the filter . My dataset contains Timeseries (signals) the

Loop numbered variables in Excel VBA - [duplicate]

How can I loop through a set of variables which are numbered consecutively (Bay1, Bay2, Bay3, etc.)? I have 10 variables and I need to examine

Array merge anomaly

I don't understand why the below solution doesn't return the anticipated result. Use case: nums1: [1,2,3,0,0,0], nums2: [2,5,6], m:3, n:3 Expected result: [1,2,

JavaScript: Best way to add custom properties/methods to built-in objects (e.g. arrays)

It is known that you should not customize the built-in prototypes in JavaScript. But, what is the best way to add custom properties/methods to specific instance

javascript split array in two arrays

I am trying to split this array into two different arrays using the values inside the first array. This is my initial array: "carList": [ { "b

JavaScript - How do I print an input inside an array? [closed]

I already tried many ways to solve this, but it always returns undefined. What should I do to solve this issue? function printThreeFavoriteCol

Javascript: check multiple elements in array [closed]

I have an array: a=[10,11,12,13]. How can check elements from a[0] to a[2] if they >0 in the shortest way and don't use for loop? Does anyo

Swapping individual lines of two dimensional arrays

so I have a question in school I've been trying to solve for a while now, but I just can't figure it out how do do it right. So the task at hand hand is to swap

Why does my Clear TexBox command makes the rest of my number in the listbox zero?

Every number is zero. Hi, I’m fairly new to VisualStudio and I have this problem in my code: What I have to do, is to fill an array (all the variables hav

Sort an Array of objects on the basis of value of array inside object [duplicate]

I am looking for better approach to sort an array of objects on the basis of array elements inside the object. I have an array of objects to b

Forming a 3D np array from a 2D array

Let's say I have a 2D array: L = np.array([[1,2,3], [4,5,6], [7,8,9]]) I would like to make a 3D array from this, using a parameter