Category "arrays"

Click HREF to display specific Array Content?

Is it best if I use HREFs to display specific array content? Should I use a button instead? I am trying to filter and I am new to arrays and javascript, so I am

SpringBoot | Getting null after success response body when request with token

Returning a response in SpringBoot project like this: @GetMapping("/users") public ResponseEntity<List<UserDto>> getUsers() { return ResponseEnt

How to covert labels array into one vector of letters

I have the labels as the following: array([[1., 0., 0., 0.], [1., 0., 0., 0.], [1., 0., 0., 0.], ..., [1., 0., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]], dty

If statements within a Query

I'm using a query & importrange combo like this: =IFERROR(QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1EizWsVwZfUy1NDRwmmWEpj2OxTGvBjP9-YBbds9

Code exiting when Dynamic Array of class allocated

I am trying to dynamically allocate an array and whenever it gets to the part where it dynamically allocates the program exits. I would rather not use vectors a

How to create a for loop that reads each character in ksh

I'm unable to find any for loop syntax that works with ksh for me. I'm wanting to create a program that esentially will add up numbers that are assigned to lett

Array gives different values in main() and in a function() [closed]

I am trying to store a 1d array that stores random numbers into another 2d array. So as you can see, I am trying to store the passed random ar

App Script Array Push() in loop Optimization

I'm looking to improve my array push inside loops but I noticed that every time my function is being called (in a loop manner) and executing this lines of code,

Add array of objects as elements to existing table td

I have an existing table. I have the td cells displayed as blocks intentionally. :) My goal is to add labels inside each of the td's by creating spans with a sp

Split Datasets per labels

I want to split some datasets such as CIFAR10 or MNIST in a non-iid way: basically I am doing Federated Learning experiments, in which I want that each client h

Match variable value to array's index to get month

example of getDepart date format getDepart = 2022-04-29 desired result 29 APR, 2022 const getStringDepart = () => { const months = ["JAN", "FEB", "MA

I'm trying to make a function that takes a 2d array as a parameter and outputs a normal array containing every unique number, in java

The function needs to have a 2d array as a parameter and then return a normal array with all the unique numbers. If the 2d array is [ [1,1], [4,2] ] then it sh

C code collecting info through a function and passing it back, of datatype struct

//Program is to collect input from user so that can pass the array of inputs from the user to another print function but that are quite some Errors in the code

How to delete a heap allocated std:::array

I have this pointer in a class: std::array<std::array<std::array<Item*, XSize>, YSize>, ZSize>* Items; In the constructor: Items = new std::a

Sort a subArray by based on order of Array in php?

I have a big array as $orderArr: $orderArr = array("IZQ", "AOH", "VNP", "ICW", "IOQ", "BXP", "SHH", "EAY", "ZAF", "CUW"); which looks like Array ( [0] => IZ

Convert image in list of coordinates in Julia

I have this short code img_lab = rand(Lab, 10, 10) where I just have created an image of random colored pixels. Probably this question is trivial but how do I c

Inserting a new entry into a 1 dimensional numpy array without distrubing other entries [duplicate]

Consider the following: If I have a 1 dimensional array like the following import numpy as np x=np.array([1,2,4,5]) Say now that I have the n

Updating 2D array in python [duplicate]

size = 10 table = [[0] * size] * size for iter in range(size): table[iter][iter] = 9 for iter in range(size):

array.slice strange behaviour with nuxt-edge

EDIT AND SOLVED: I've found the origin of the problem: I thought arr.slice returned the new array but, actually, it returns the deleted element. See the documen

I’m trying to sum the return value of 2 threads together but it return -1 saying error

I’m trying to make a program which sums the numbers in an array, the first half of the array by the first thread and the second half by the second thread