Category "arrays"

Take input from user and verify if it is present in an array. (Javascript)

How can I take input from the user and check if the number is present in my array or not. I need to generate random number from array1 and move it to array2. Th

I'm trying to exclude elements from an Array, but I'm doing somthing wrong

I'm trying to create this script: https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy

how to repeat a numpy vector to create an array with the rest of array being zeros

I would like the create the following numpy array, based on the following vector e = numpy.array([1,0,0,0,0,0]) a = [ [e, 0, ---, 0], [0, e, ---, 0],

How to read a text file into a list or an array with Python

I am trying to read the lines of a text file into a list or array in python. I just need to be able to individually access any item in the list or array after

Insert an element in a descending sorted array and keep array sorted

Assuming we have a sorted descending vector, like: vector<int> array {26,  21,  13,  11,  8,  3,  2}. I would like to inser

Trying to Populate a Grid of Coordinates into a Multidimensional Array Using Nested Array Map Methods

I'm trying to populate a grid of coordinates into a multidimensional array using ES6 nested map methods using this code: var gridSize = 4; var regionA

Extract value from complex array of map type to string

I have a dataframe like below. No comp_value 1 [[ -> 10]] 2 [[ -> 35]] The schema type of column - value is. comp_value: array (nullable = tru

Creating payroll for promotion that is based on two criteria

We have a few coaches who work for us. When a session is booked, the data including the coach's name and student name is pushed to a master sheet. We have crite

how to fill a complete column with arrayformula and containing Vlookup of base on a single cell criterion

I need this exact formula into V1:V column =VLOOKUP('Target Sheet'!$G$1,IMPORTRANGE("MYLIST","FileLInktoAgent!$A$2:$C$45"),2,0) That formula works perfectly fo

I need help understanding a Javascript function used to search a list with a search bar so I can modify it to search a table

I'm working on a college assignment where I use a PHP class to generate table values which a Javascript function then searches with a search bar. It builds off

How to add key and values to anobject by splitting a string inside the object

I have the following array: [ { “Key”: “CUST”, “Segment”: “A;B;C;D;E” } ] I want to transform it to

IndexOutOfRange (IsAllDigits Method)

I am novice in C# and just learning it. I am sure that you will consider this question dumb but I really can't understand the real reason for the following in t

Pass Associative Array from Symfony Controller to Twig and JavaScript

So, I have 2 arrays that I've combined into one array after making sure they're the same length as such. //Fetching Ratings for All Coaches & Making a Key,

Output 2D array to a Matrix as a CSV - Python

I have a 2D array with vectorised rows with each row representing a document in the corpus: array[[ 0.0 0.0 0.4583 0.6584 0.0] ...

Export Struct-like objects for arrays

I have been bashing my head about this and can't seem to figure it out. In another engine, I could make a struct, then make an array of that struct that I could

How to bring data frame into single column from multiple columns in python

I have data format in these multiple columns. So I want to bring all 4 columns of data into a single column. YEAR Month pcp1 pcp2 pcp3 pcp4 1984

What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it?

What does ArrayIndexOutOfBoundsException mean and how do I get rid of it? Here is a code sample that triggers the exception: String[] names = { "tom", "bob",

Array Processing Employee Records output not correct C++

I have an array processing assignment based on C++ by which the records of each employee presented in a given text file should be calculated and printed as Hour

How to convert a array of string to array of float using

I have a array as shown below, in that I am having a variable called f, I need to assign the some value for this variable f say 2 and convert this into a floati

how to add digital signature to hash data in node js use .cer file?

I'm new to digital signatures and how to use them, so I can't complete my task. Sign the hash with the CADES-BES signature. Insert a new element with a Base64