Questions tagged as 'array'

2
answers

Create a new loop array for JS

I'm trying to create a new array for every round of a for. var route = []; for (var i = 0; i < 5; i++) { route[i].push(result.routes[0].overview_path[i].lat()); route[i].push(result.routes[0].overview_path[i].lng()); con...
asked by 03.05.2018 / 11:03
1
answer

Variable arrangement in Java

I need to make the length of the array declared by the user running the program and not established within the code, this is what I'm doing but I got confused and I do not know what to do as soon as I'm learning how to program. import java.uti...
asked by 05.04.2018 / 02:47
1
answer

Create and plot fix of slopes between points

Good afternoon everyone, I'm trying to create an array with numpy that contains the slope between each of the points made with the arrays x e y to finally graph them with matplotlib . These are the steps that I am c...
asked by 25.01.2016 / 00:33
1
answer

Release dynamic array memory from pointers in non-binary tree

I have this structure: typedef struct Nodo { int valor; int numSubNodos; struct Nodo *padre; struct Nodo **hijo; } Nodo; To fill it as a non-binary unbalanced tree, or rather a node can have several children and not all th...
asked by 05.04.2017 / 16:29
2
answers

Compare 2 fixes and assign matching value

I have 2 arrangements of objects The first one called data : const data = [ { id: 1, nombre: 'Piero', }, { id: 4, nombre: 'Nelson', }, { id: 7, nombre: 'Diego' }, ] and the second one called subs :...
asked by 11.05.2018 / 21:27
1
answer

Compare several elements of a matrix

I would like to know if you could help me with this little problem that I have. I'm doing a basic variation of the game tetris in console as part of a task, I'm quite new to Java, I just started and I was stuck in the system of punctuation /...
asked by 03.03.2017 / 05:24
2
answers

Problem when deleting with php in a mysqli database

I am making a form in which you can already save perfectly in the mysqli database, and I already get the data in an html. Now what I want is to erase with a button. The thing is that it deletes, but always the last record, and not which one...
asked by 25.10.2016 / 23:49
3
answers

How to access the contents of an associative array that is inside another array?

I'm trying to create an array of arrays where the arrays inside are associative arrays but I do not know how to access them. This is my code. var meses = {enero:31, febrero:29, marzo:31} var año = []; año.push(meses); cons...
asked by 17.06.2016 / 20:30
3
answers

How to iterate in a dataframe for a certain number of rows?

I have the following dataframe: import pandas as pd import numpy as np data = pd.date_range('20180101', periods=300) df = pd.DataFrame(np.random.randn(300, 5), index=data, columns=['open', 'high', 'low', 'close', 'volume']) I...
asked by 27.12.2018 / 14:54
2
answers

I can not print the string array on the screen

#include <iostream> #include <string> using namespace std; const int NUM = 3; void hola(string &mana[]) { mana[0] = "Hola soy sergio"; mana[1] = "Mamam me quierre"; mana[2] = "Hola como estas"; } int main() {...
asked by 09.03.2017 / 01:23