Category "arrays"

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

Why is this 2D array filtering not working?

I have this 2D array and I'm trying to filter it, but it's coming out unfiltered: Data: [ ["Val #","Val #","Val #","Val #","Val #"], ["SO-000379-001A-047-1","

Solidity - Send array of tuple data with address and amount

I'm working on a Solidity Smart Contract for Tron Network. I want the owner can set an array of address => uint. This is the code: pragma solidity ^0.8.0; s

Error: " 'float' object is not subscriptable" whenever I try to print certain values from a list of averafes

I created two variables that give the amount of words in a given context that are both positive and negative respectively within a couple of years. The followin

Data Formulation

I am hoping to get some help formulating an array to more concisely view my data coming in from a google form. Is this something someone can help me with? I'm s

ValueError: shapes and not aligned: (dim 2) != 4 (dim 0)

I am currently working on a script that does some array manipulating and calculations for modeling. I am running into an error and unsure how to solve it. from

Remove and insert element to a specified indices in Numpy array

Suppose I have a numpy array from which I want to remove a specific element. # data = np.array([ 97 32 98 32 99 32 100 32 101]) # collect indices where th

API URL Query to filter the response

So I'm trying to filter the response of my API GET query and can't seem to find a way to access deep enough in Json. My response is like: { "orders": [

Unable to map nested array data in JavaScript?

Here, I have nested array object categories which have nested array objectproduct. product contains name, price, discount, unitsold properties with images array

Reshaping numpy array without changing the data

I'm trying to reshape an array of bitmap images that has a shape of (50,50,90000). How can I modify it so that I can get an array of (90000,50,50)? - I tried ar

Trying to output a custom powershell object where I can align each line of two different variables containing Category:Description

I'm trying to do an network access control audit by grabbing a user's AD groups, their descriptions and then output them in a way shown by this example: [User]

How to check whether all number elements in an array are even numbers with recursion?

I'm currently learning as much as I can about recursion but I'm really stuck on how to use it to check whether all the number elements in an array are even numb

How to convert PHP multidimensional associative array to API http query in the format the API specifies? [duplicate]

I have the following array $folder_data = array( "title" => "Testing API Creation", "description" => "Testing the Wrike API by c