Questions tagged as 'array'

1
answer

The split ("") method of an array returns the messy array

I want to save the value of a text area in an array and I am doing it with a let array = texto.split(" ") , but when doing console.log(array) it returns it messy. What can I do? Here is the code: let t_Area = document.que...
asked by 19.09.2018 / 01:13
2
answers

Work with three arrays and insert with PHP in MySQL database

I have the following code: foreach ( $_POST["num_cod"] as $num_cod) { echo $num_cod; } foreach ( $_POST["fec_cod"] as $fec_cod ) { echo $fec_cod; } foreach ( $_POST["nro_oper"] as $nro_oper ) { echo $nro_oper; } Wher...
asked by 20.09.2018 / 16:50
1
answer

The first time you enter the for loop iterates twice

That said, the first time you enter the for loop, you iterate it twice. Then it's still normal but that's not how the first one tells me. public static void main(String[] args) { //a uno se le van presentando personas desconocidas exactas...
asked by 19.09.2018 / 12:56
2
answers

Fill an array with objects from other classes

I need a method of name "submitBanda" that will receive a Band type object with 5 musicians and print a message. How can I fill an array with objects from other classes, and use it as a method? My code is the following. package presentarban...
asked by 01.08.2018 / 23:19
1
answer

Doubt about Kotlin language

Why and for what the function main is written in the following way: fun main(args: Array<String>) { println("Hello, World!") }     
asked by 27.10.2018 / 02:53
1
answer

Error on Vector in Java

I would appreciate if someone can help me with the following error:    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException   at folder.ConfigTeclado.guardaConfig (ConfigTeclado.java:91) The code (only the parts where I u...
asked by 01.08.2018 / 20:26
2
answers

Result in Ajax multiplying the array values

When making a query to the database, it generates a response that is received by the success function of ajax, but when I want to put $. each , it is not that I have a problem with that, no and no, the json is parsed, everything is fine, only t...
asked by 24.07.2018 / 02:41
2
answers

In an array [] I have to extract the maximum and if another position is also maximum concatenate it

1.- The following countries participate in a championship: "Spain", "France", "United Kingdom", "Italy", "Germany" and "Denmark". Each country gets a score (between 1 and 10 that is generated randomly). It is requested to calculate the countries...
asked by 31.05.2018 / 01:14
1
answer

Compare two PHP objects

I have a problem, I am currently trying to compare two objects, one object is cash sales and the other is card sales.    Cash sales [ { "ventas": 1, "dia": 7, "total": 120 }, { "ventas": 1, "dia": 8, "total":...
asked by 08.09.2018 / 18:49
1
answer

I lose 2 records when opening an ofstream C ++

I have a serious problem that I can not solve. I do not understand why, when opening an output file I am losing 2 positions of a record vector that I do not touch anywhere. The problem, I think, I hope you can correct me, is in the module Lis...
asked by 07.08.2018 / 07:57