Category "arrays"

Calculate length of string object using pointers instead of char arrays

I'm working on an exercise to calculate the length of a string using pointers. Here's the code I've written below: int main() { std::string text = "Hello W

How can I set one array as a value of another array in PHP? [duplicate]

I have the following array: Array ( [0] => James [1] => Mike [2] => Liam [3] => Shantel [4] => Harry ) Arra

Problems concatenating arrays by session

I apologize in advance for the title, my question is not that easy to explain on it. What I mean by that is the following: Having an array of type, 4x4, it has

Using python and suds, data not read by server side because element is not defined as an array

I am a very inexperienced programmer with no formal education. Details will be extremely helpful in any responses. I have made several basic python scripts to c

C++ : How to create a copy constructor of array that has a pointer?

I have template <class T> class arrList: public linearList<T> { public: arrList() {} arrList(const arrList<T>& List); ~

Non contiguous array pointer traversing issue in pybind11?

Please does anyone have any idea why when I pass my 2 dim Numpy float64 (Double) array normally it prints row by row correctly, col1, col2, col3, col4 as I trav

Get "corners" of a 2d array

Alright, I've got a real stupid question. I have a two-dimensionial array of nullable integers. I wanna get the non-nullable corners of that array - so like, th

Pyspark: Extract Json Objects from Array

I need to extract objects from an array, where there's more than one object in that array I need to repeat for every id and if the field is null then I want to

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