皇冠hg0088代理网址

Questions tagged [arrays]

An array is an ordered linear data structure consisting of a collection of elements (values, variables or references), each identified by one or more indexes. When asking about specific variants of arrays, use these related tags instead: [vector], [arraylist], [matrix]. When using this tag, in a question which is specific to a programming language, tag the question with the programming language being used.

Filter by
Sorted by
Tagged with
0
votes
0answers
3 views

TypeError: Object of type 'Add' is not JSON serializable - Python Graph

I am working on trying to create a tangent approximation of a function. However, trying to find a way to graph it on top of the graph. Both functions work, but when I graph the functions, I come up ...
-1
votes
1answer
18 views

How do I calculate the speed, distance and time?

Write a short Java program that asks a user, via a command line interface, for: Their name Their distance travelled to university The time taken in minutes And which calculates their speed on the way ...
0
votes
0answers
14 views

Numpy string array and nulls?

is there any way to have a numpy array with string or object elements, and have nulls be recognized? np.isnan(array) will only work on numeric arrays. But curious if there is something possible in ...
-1
votes
1answer
19 views

Issues with setting up a two dimenstial array of pointers

Im trying to setup a two dimensional array of pointers but, i'm having issues actually allocating the memory. Whenever I try to write values to the array im getting access writing location error. Grid....
0
votes
1answer
29 views

Collapsing an array

I need to have this method take in an array and add every 2 numbers together(doesn't add the same number twice) and make a new array to return, if there is an an odd number of elements the odd number ...
1
vote
2answers
25 views

Most efficient way to check array based on other array limitation

I have the following set of arrays and I want to check which array meet the condition by the following arrays must_inculde, optional_include, must_not_include Each array must include the the letters ...
0
votes
1answer
13 views

Combining 2d numpy array “row-wise”

I have two 2d-arrays (but rows doesn't have same length) created with numpy: a = [[1,2,3,4,5], [6,7,8,9]] b = [[1,2,30,40,50], [6,7,80,90,100]] I would like to combine this two arrays into ...
0
votes
0answers
9 views

HTML populating dropdown list from array created in Python - cs50 Finance

I am working on the cs50 Finance problem and need to create a dropdown list that is dynamic and changes depending on the user. The goal is to get the user's stocks from a database and put those ...
0
votes
0answers
23 views

Laravel return array and object together and cause error in vuex

This is my vuex store file: export const posts = { namespaced: true, state: { currentPost: '', posts: [], }, mutations: { SET_POSTS(state, posts) { ...
0
votes
0answers
8 views

Why is my canvas not clearing after drawing an arc? [duplicate]

I do not understand why my canvas is not clearing for the arc. code: function game() { // draw border (clear canvas) ctx.fillStyle = "white"; ctx.fillRect(0,0,canvas.width,canvas.height); ...
0
votes
0answers
9 views

React render table - match body data to heading data order?

In React, I am rendering a table where the table headings are the "id" values of: "header": [ {"id": "a"}, {"id": "b"}, {"...
-4
votes
0answers
23 views

Why is this not the correct way to create an array of a struct I made? [closed]

I am receiving an error saying app_main.cpp:48:1: error: ‘sectors’ does not name a type 48 | sectors[0].CenterX = -0.6666; | ^~~~~~~ app_main.cpp:49:1: error: ‘sectors’ does not name a type ...
0
votes
2answers
23 views

How to iterate through json array in scala

I have a json array like below which is fetched from a database column into scala jsonArrayString = "[{"firstName": "Harry", "lastName": "Smith"}, {"...
0
votes
1answer
26 views

PHP variable not adding to array

I have the below code. Everything is working fine, and $thumb when echoed is outputting the correct value (a URL), however when I am adding it to this array category_image is just a blank value. ...
-1
votes
0answers
16 views

Finding a Winner Through Array of Objects in Java

I was wondering how to traverse through my array of diver objects to retrieve the diver with the highest score. I tried using for loops and if statements to try and catch the object with the highest ...

15 30 50 per page
1
2 3 4 5
23085