Category "arrays"

Optimized way to implement XOR between floats for huge 2D array data

I need to implement xor between floats in python for huge 2D array data (like thousand row by thousand column matrix). I use the following implementation: impor

Convert String array to an Int array and total it

I need to create a program that accepts input from a file. I need to ask the user to enter two(2) variables, the interest rate and months for the loan. I then c

JSON parse a property of an object inside an object?

I'm trying to JSON.parse(nodeInfluxSeries) a property that is in an object, that is also in an object and in an array. Like so: Array [ Object { "id": 1,

Getting duplicate results from DB

let absent_remove = result_database.filter(item => item.absentday != absent_days) console.log("absent_remove", absent_remove); I got this piece of code, I h

How does the axis parameter from NumPy work?

Can someone explain exactly what the axis parameter in NumPy does? I am terribly confused. I'm trying to use the function myArray.sum(axis=num) At first I t

Javascript: How would you get the highest rated product category based on these 2 arrays

Assuming I have 2 arrays: const products = [ { name: 'prod1', category: 'Meat' }, { name: 'prod2', category: 'Meat' }, { name: 'pr

Auto-increment row number from another sheet in INDIRECT formula

I'm working in a google spreadsheet with multiple sheets. This is a situation where I can mess around in a sheet (I call it Sandbox) that I make but can't do an

Can't seem to identify the issue (splitting an array in chunks)

So this function is supposed to split the array into chunks the size of the second argument, e.g. [1, 2, 3, 4] with the second argument 2 would return [[1, 2],

Unchecked Input For Loop Condition while running checkmarx on angular 13 project

While running the checkmarx on angular 13 project the report results a 'Unchecked Input For loop Condition' medium issue. Even after limiting the object length

Selecting From multidimensional Numpy array with multidimensional mask

I am trying to build an example to understand image segmentation, you are given an image of shape (1,2,2,3) it's a 2x2 image where each pixel has 3 numbers indi

in the program below I have to pass 2 parameters as in update method 1st one to check the stored value & second to update the value in Javascript

how can I update a value in the array of objects? class Person{ data = [] // defining an array constructor(fname, lname, gender){ this

Correct way to pass multiple values for same parameter name in GET request in javascript or nodeJs

I wanted to write the response like this using nodeJs: http://server/action?id=a&id=b Or http://server/action?id=a,b

Find the maximum number of distinct elements that can be achieved in array a after at most k operations

My assignment: Consider two arrays a and b where each consists of n integers. In one operation: Select two indices i and j (0 <= i,j < n) Swap integers a

How to add multiple array items as HTML content?

I need to extract some words from a string of text, insert every character of that words inside a span element and then replace the extracted words with the spa

c# - clone array of list of objects not working [duplicate]

I'm trying to clone array of list of objects. the clone modified when the original list modified (one of the properties of Page object). how d

TypeScript function that works on all numerical array types

I am trying to write a function that works on all of the JavaScript array types, e.g. on number[], Float32Array etc. It should return the same type that it gets

How can I get all the object inside an object which is present inside an array and add the result into another array

I am struggling with an issue that is bugging me a lot. I am not good with JSON data manipulation. So the issue is I have an Array of multiple Object which cont

How do i get the values of object in arrays react js

Object { rows: (1) […], count: 3 } ​ My api is giving me this count: 3 ​rows: Array [ {…} ] ​​0: Object { ELIGIBILITATE: "

Google Script: Sort Array of Email Addresses to Remove Duplicates

I pull data from a Google Event Calendar. The events include multiple point of contact e-mails (Primary, Secondary, etc.) I am currently able to collect ALL of

Outer Join in Google Sheets

I have 2 sets of data that I want to do an outer join on (basically include all data from both sets, with empty cells where data is in one set but not the other