Category "arrays"

How to count an element that exceed our criteria in a list that is in a list that is also in a list (a list with a depth of 4 lists (?))?

I'm trying to count how many element that is exceed some criteria (for exemple: 0.7) and then convert them into percent, the element is in a multiple list that

Add data from second 2d array to first 2d array based on related id columns

I have two arrays $a and $b $a = [ '0' => [ 'name'=>'Apple', 'id' => 1 ], '1' => [ 'name'=>'Banana',

How to add items to array of objects using loops

I've got a multiple student objects I want to write into with a CSV file containing their details. I've set each row of the CSV file to an array then was going

How can i use reduce or any other array method, to count and sum up specific properties?

I try to learn more about the array methods and also working with objects. I come up with this dummy example that simulate an incoming data. const data = [

How to flatten a nested Json struct using Python databricks

Trying to flatten a nested json response using Python databricks dataframe. I was able to flatten the "survey" struct successfully but getting errors when i try

randomize Background image in an array for a button for AS3

I have a sample code: backgroundChange_btn.addEventListener(MouseEvent.CLICK, randomBG); function randomBG(e: MouseEvent): void { var Background = new Array

PHP conditionally pass nested arrays as function argument

I got two nested index arrays, which I want to populate with values using a function. But on a conditional basis: if this, populate the first array; if that, po

my copy array function didn't work. i didn't understand why

This code has to copy one array to another via void copy function. But I don't understand why it doesn't work. #include <stdio.h> void copy(int func_arra

How to work with column containg array in H2 database to get n 1 row

I am new to H2 database. I have 3 tables in database for example, table t1 : ID desc something condition_id 1 EN 142868 151508 XYZ [4686, 4687] table condition

Faster method to delete a range of rows other that using union

I am using the below code to: Delete the similar rows, keeping only one and combine cells values in the range "N", separated by vbLf it works ,but with big rang

Build cluster array only produce 1 element

I've been trying to make an array of clusters in LabVIEW, I know I can make it in the front panel but I need to make it from the block diagram because I want to

how to copy github's overview page

For a project we are replicating githubs profile page. My question is how would I get the customize my pin link module to show my data? its rendering 4 buttons

I have an array of items inside a list from firebase. I want to display those array elements inside my flutter app but I have failed

Inside of my firebase collection (which is a list elements) I have arrays as well. I am failing to display the elements inside the array in my flutter app. Here

PHP8 - SplFixedArray iterator's next() doesn't move key pointer

Please take a look at this code: <?php $array = new SplFixedArray(1); print "\nKey1: " . $array->getIterator()->key(); $array->setSize(5);

Filtering out rows in multidimensional numpy arrays

Let's say that I have an array like this: array([[ 1, 2], [-1, -2], [ 0, 0], [-1, 2], [ 2, -1]]) I want to filter out all rows t

How to convert a json response into a callable object in php?

I'm trying to convert the json response below in $response variable to a callable function like $response->getStatus() so it can return failed. Here's the re

php Keeping only 1 date occurence in multi-dimensional array

I have this array with certain brand_ids, within these brands I have an array of dates in which a sale occured but these are based on the products in sale so th

Can't Print array with multiple data types

I created a struct named products that contains multiple data types: struct products{ int ID; string Name; double Price; int Quantity; }; Then

How to select 3d array elements with another 3-d array of coordinates?

Let's say I have two array, one with all zero elements and the second one with indices that should be filled with 1. This can be done with the following code: A

google sheet : How to find the length of array?

I try to query from other sheet using vlookup() or something similar. I want to count how many array it will produce. How can i find the length of the output or