Category "arrays"

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

Assigning to a double-indexed numpy array

I know that when assigning to a double indexed-array gives bad results because you're assigning to a view rather then to an array directly, but I cannot figure

How to traverse memory for the Fibonacci sequence in ARM assembly

I must write the following function in its own assembly file: void fillFibonacciArray(int *array, int n); The function writes into the array the first n Fibonac

How to know when a char* library function arg needs an array it can modify, not a char pointer

I am new to C programming. and I know char * and char[] array are different. Yet, you can deduct the char[] to char * when it comes to a function param. So func

Remove the values from array1 by referring to array2

I have two arrays and I want to remove the values from array1 by referring to array2. The expected result is ["b", "c",]; array1 = ["aa", "bb", "b", "c",]; ar

How can I access and process nested objects, arrays or JSON?

I have a nested data structure containing objects and arrays. How can I extract the information, i.e. access a specific or multiple values (or keys)? For examp

how to parse yaml file that contains dictionary and structure at multiple levels in C++

I am trying to parse a yaml file that likes like below in C++: test_case_0: - input: a: 10 b: 5 - output: area: 50 delta: 5 test_case_1: - input

How to group subarrays by a column value?

I have the following array Array ( [0] => Array ( [id] => 96 [shipping_no] => 212755-1 [part_no] =>

building a nested JSON

Some data files that I need to read / parse have headers in the style: level0var = value0 level0var.level1field = value1 level0var.level1array[11].level2field

Parse/Display nested JSON array with Jquery

I am looking to pull data from a job board API. I'd like to have headings for the departments (pulled from JSON level 1) and under each department the current o

How can an object reference in java hold the reference to a primitive double dimensional int array [duplicate]

I have a piece of code- public class Sudoku { static int[][] game; public static void main(String[] args) { int [][] games= n