Category "arrays"

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

add Array using for loop (JS)

I'm recreating a hangman game where I create a random word and conceal this with "". i.e if the word is "monkey" then the array should be ["", "", "", "", "", "

Stack the same row in each layer of a 3D numpy array

Hi is there a way to efficiently stack the same row in each layer of a 3D numpy array? I have an array like this: a = np.array([[["a111","a112","a113"],

Could you share with me information about [...] in Dart?

I've solved several solutions on Codewars and saw that one solution uses [...], I tried to google what it is, but google only finds how to create arrays (List a

Adding a value to a range of values in an array in Python without using a for loop

I'm trying to learn Python and I have run into a problem. I am attempting to complete the Array Manipulation challenge on hackerrank. A part of solving it requi

PHP foreach loop on unknown depth multidimensional array

I have a multidimensional array consisting of a directory structure or a tree if you want, but how can I loop through this data when I don't know the depth of t

I am trying to add an object to the end of an array inside said object

I have some code that creates a bunch of Creatures(cells) and they move around the screen and eat food. They all have an age variable so once they become a cert

Deleting node in list

*x = L->list[i]; /* Save the deleted element to parameter x */ for(j = i+1; j <= L->size-1; j++) L->list[i] = L->list[i+1]; L->size--;

save map bookmark for each user login using .net and javascript

I want to create Bookmark widget, and I want each user can save his own bookmarks. and when login to the application can see only his bookmarks. for this I have

Javascript - Giving alert for string input but number

Hi recently I was writing a code which basically askes users to input a cost for any item. The item name or price are not important so far. How the system works

function which tells whether an array is subsequence of another but 1 of the loop isnt working

def is_subsequence_array(array, sequence): for num in sequence: if array.count(num) != 1 : output = False for i in range(len(sequence) - 1