Category "arrays"

C# array issue due to indexing of int

I am fairly new to this and trying to learn. I am struggling trying to make a loop to find the max value in an array. I am not sure what I am doing wrong. I hav

React Native FlatList Items Disappearing

I have a Modal that the user selects categories from, and then that category loads into a FlatList on their profile page. When the first category is selected, i

Including a specific field from a specific item from an array

I have the following function: function processMegaventorySalesOrder(salesOrder) { let endUser = salesOrder["SalesOrderContactPerson"] let clientName = sale

how to alter reduce function so it produce different result

I have this array: data: [ '+section1+', 'big text 1 here.', 'big text 2 here followed by list:', '-this is list item;', '-this is another list item;'

How can I compute a very big digit number like (1000 digits ) in c , and print it out using array

how to print a number in C with 1000 digits same as 31000 ? using arr[1000], every position in the arr gets a digit. void main() { unsigned int Base, Power

codewars Array.diff javascript

this is my first question as I'm learning programming for few days but now and I'm stuck Task: Your goal in this kata is to implement a difference function, wh

How can I rotate this array?

I have this code that works perfectly but in the opposite direction ( left ) I would like to rotate this array to the right, how can I do this? public int[] Ro

How to ensure I can't add in integers or any numbers into an array via user input for ruby

I'm trying to create an array that only allows strings to be passed through, no numbers at all. Is there a way to make this possible? I've tried the below expec

How do I tell my program to go back to a certain point after the wrong answer is selected?

In my midterm CYA game, you come across 2 staircases, left and right. You have the option to choose which one you go to, the right advancing you and the left (e

Generating List Items from an Array with Javascript [duplicate]

I am trying to generate a list of names from an Array with this piece of script const names = ["John", "Hanna", "Luis", "Halley", "Maive"] con

Grid from a set of arrays - how to cut execution time?

I have a wide set of splines, and at each point (x,z) of these splines is associated to a field value. I need to map all these points and relevant field values

How to convert binary into sign representation?

If an array consist of decimal number which represents as blocks('#') or empty(' '). For example. A = [31,21,29,19,31] represents['11111', '10101', '11101', '

Transform array into object with custom properties

I have this array myarr = [ '=title1', 'longText0...', 'longtText1...', '=title2', 'longTextA...', 'longtTextB...', 'longtTextC...' ]; symbo

Calculate length of string object using pointers instead of char arrays

I'm working on an exercise to calculate the length of a string using pointers. Here's the code I've written below: int main() { std::string text = "Hello W

How can I set one array as a value of another array in PHP? [duplicate]

I have the following array: Array ( [0] => James [1] => Mike [2] => Liam [3] => Shantel [4] => Harry ) Arra

Problems concatenating arrays by session

I apologize in advance for the title, my question is not that easy to explain on it. What I mean by that is the following: Having an array of type, 4x4, it has

Using python and suds, data not read by server side because element is not defined as an array

I am a very inexperienced programmer with no formal education. Details will be extremely helpful in any responses. I have made several basic python scripts to c

C++ : How to create a copy constructor of array that has a pointer?

I have template <class T> class arrList: public linearList<T> { public: arrList() {} arrList(const arrList<T>& List); ~

Non contiguous array pointer traversing issue in pybind11?

Please does anyone have any idea why when I pass my 2 dim Numpy float64 (Double) array normally it prints row by row correctly, col1, col2, col3, col4 as I trav

Get "corners" of a 2d array

Alright, I've got a real stupid question. I have a two-dimensionial array of nullable integers. I wanna get the non-nullable corners of that array - so like, th