Questions tagged as 'array'

3
answers

Javascript transform an array created from inputs checkbox

I have multiple input checkbox created from a model with angular and ng-repeat, when I select some of it I get this, for example: var accounts: [{'AA764':true}, {'AA324': true}, {'AA234': false}, {'AA553': true}, {'AA7365': false}];...
asked by 02.03.2016 / 04:42
2
answers

How to read .dat file and save it in an array c ++

I have to read a file that has this format: Id: 23 Nombre: Roberto Apellido: MiApellido Id: 24 Nombre: Roberto2 Apellido: MiApellido2 And I have to read that file to be able to work with that data but I do not know how to read. I have...
asked by 05.07.2018 / 18:36
2
answers

Compare a text with a multidimensional array with regular expressions

I have sincerely tried with in_array , array_search and I could not do it. I have, for example, the following Array: $arg = array( "vimeo"=>array( "link" => '/https?:\/\/[w\.]*vimeo\.[^\/]*\/([^?]*)/is' ),...
asked by 15.01.2018 / 21:13
2
answers

PHP How to count the number of Arrays?

I have something similar to this Array( [0] => Array ( [user] => Name 1 [group] => 1 ) [1] => Array ( [user] => Name 2...
asked by 20.06.2018 / 17:19
1
answer

Fill a ["[]" two-dimensional array "from a text file with elements separated by commas and lines

Well as the title says. I have a .txt with things like: . [Without the quotes] It is a list of 4 elements per row, and 150 rows. I imagine adding it to an array or arrayList, but I do not know how to read the .txt to go adding eac...
asked by 13.09.2017 / 07:08
1
answer

Access the daughter class from the father | Java

I have an abstract class Publicaciones and two child classes: Libro and Revista . I have a ArrayList of Publications, where I keep objects Libro and objects Revista , but when accessing the attributes o...
asked by 03.12.2016 / 16:20
2
answers

What difference and benefit does an array have against the listarray

Hi, I'm a java programmer and I'm seeing some that say it's better ArrayList than a Array normal? I honestly do not see difference I see it the same     
asked by 03.02.2017 / 07:03
2
answers

Use FOR in a fix

I have the following answers. How can I use a for to avoid putting [0], [1], [2] etc. console.log("-------------------------------"); console.log(response.output.generic[0].options[0].label); console.log(response.output.generic[0].options[1].l...
asked by 03.12.2018 / 22:11
2
answers

AngularJS filter by arrangement on property of the object

I'm trying to apply a filter inside an ng-if, but I do not come up with the solution. I have an arrangement of objects of this type: tiempos = [ { id: 39, nombre: "Juan", tiempos: [ {...
asked by 05.10.2018 / 15:27
2
answers

Compare images

I'm trying to make an application that takes a random image of an array and displays it in a view image. What I want to do now, and I can not, is that depending on the image that appears, I want different things to happen, try a switch but it do...
asked by 30.06.2016 / 20:45