Questions tagged as 'array'

1
answer

Problems with copying an array into another dynamic array

I have a problem with the execution of this program. I do not know why it ends up running so abruptly ("The program stopped working"). The results of it are what I hope, however that happens. And I tried many things to avoid it and found that wh...
asked by 17.04.2018 / 16:09
1
answer

How can I call an array that is inside a method to another method within the same class?

This is what I've been doing so far public class Proyecto_progra1 { public static void main(String[] args) { String opcion; int num = 0; do{ opcion = JOptionPane.showInputDialog("1- Nombre de conductores.\n" +"2-...
asked by 10.03.2018 / 02:59
2
answers

Browse JSON array from PHP

JSON: { "_labels": { "a": "DOLARTODAY", "a1": "DOLAR CUCUTA", "b": "IMPLICITO", "c": "DICOM", "d": "DOLAR BITCOIN", "e": "DIPRO" }, "_timestamp": { "epoch": "1520611865",...
asked by 09.03.2018 / 18:38
2
answers

Doubt about foreach with mysql data

I'm new to php and mysql, I have a database with some fields already created, the idea is to print a ticket like the supermarkets but I want to list the purchased products one by one, so I read that you could use foreach, this it's the code that...
asked by 25.02.2018 / 09:35
1
answer

Create a new array based on another array, but without the repeated data

As the title says, I am trying to create a second array based on an original array, but issuing the values that are repeated. My problem is that the code does not work as I would expect, since whatever I do I can not generate the new array wi...
asked by 09.04.2018 / 04:11
1
answer

Store information in an array and display it

I have a code about movies that have their types in which I try to store their information in an array. At the time of collecting the data I must be doing it wrong since when using the function to show the crashea movies. Sometimes I print...
asked by 15.04.2018 / 21:21
1
answer

Extract result of a function

Good people, I have this function that I use to analyze some texts, the issue is that I need to include the data in an array, I do this within the function using data, which brings this function, but then the variable 'sentiments' is empty, and...
asked by 09.01.2018 / 16:00
1
answer

How to convert elements of an array from string to float?

I have this array (values string ) locations = [ {lat: "-31.563910", lng: "147.154312"}, {lat: "-33.718234", lng: "150.363181"}, {lat: "-33.727111", lng: "150.371124"} ] and I want the array to be like this...
asked by 10.01.2018 / 17:15
3
answers

Save data to array using JQuery

Good morning! I'm trying to create a kind of form. The thing is that the user clicks on a button and different fields appear to fill in (these fields will be text-type inputs *). Once filled out, click on a new button that has appeared...
asked by 21.12.2017 / 11:34
1
answer

Different results when using different ways to traverse an array in JavaScript

The purpose of my program is to create two functions, some() and every() , which emulate the functions Array.prototype.some() and Array.prototype.every() , respectively. My code: function every(array, callback) {...
asked by 21.01.2018 / 18:47