Questions tagged as 'array'

1
answer

Print_r () with line break by Array element

I've been looking at some question of this style but I have not seen anything that serves me, so I put my question to you. I have an object called $detalle that has an array with other arrays inside (excuse me, but I do not remember th...
asked by 17.04.2018 / 12:40
3
answers

Java Tell a character other than a word

I know how to count the characters of a word but I do not know how to make it not to repeat itself if that character was already counted The output that I intend to draw would be a "RATA" entry, an exit from R 1, A 2, T 1. public class Main...
asked by 01.03.2018 / 13:56
4
answers

Android: Remove data from an Object ArrayLIst

I have a problem extracting data from an Object ArrayList. This is my object public class ImageData { private int id; private String name; private Bitmap bitmap; private String path; public int getId() { return id;...
asked by 19.12.2016 / 17:13
4
answers

Declare array inside loop vs empty it on each loop

I wonder if in C / C ++ it is better to declare a new array every loop loop: while(true) { char array[255] = ""; // Hacer algo con el array ... } Or empty it every turn of it: char array[255] = ""; while(true) { for(short i = 0; i...
asked by 09.04.2016 / 19:36
4
answers

Count times an item is repeated in a php fix

Is there a function in php that returns me the number of times an element is repeated within a array ? If this is not the case, I will have to go through each element and, through a counter, see how many times it repeats. S...
asked by 03.11.2016 / 04:29
3
answers

Javascript - Find similar words in an Array ()

I have the following Array () palabras = ["anatomia","ana","angie","anatómico","anatómica","análisis","analogía","analizar","anabólico"]; Now, in HTML I have: <!-- Qué complicado, oh mi Dios --> <input type="text" name="palabra"...
asked by 06.12.2016 / 16:02
2
answers

Insert an array in one position within another

I'm doing an exercise of POO but with pointers, and I have to insert an array into another in the position that is requested, without overwriting or losing those that are, just move it. In the function void IntArr::addElement(int po...
asked by 18.04.2018 / 20:00
2
answers

Sort Array using an int variable from another class

I am currently new to this java and I have a question about sorting arrays . I have this code in a previously created class. public class Orden { int value; public Orden(){} public Orden(int value){ this.value= va...
asked by 06.04.2018 / 07:17
5
answers

How to organize an array?

How do I get this program to organize the data in the same Array so that first the numbers are greater than 0 and then the zeros in the Ordenar() method? For example: Entry    (2,3,0,1,0) Exit    (2,3,1,0,0) He...
asked by 02.11.2016 / 18:47
1
answer

Random and arrays

I was working with random and array and I had 2 doubts on the subject. 1) It is possible to create 3 arrays, each one contains images, and with a random one that chooses a random image of the array and at the same time that the array from whi...
asked by 04.07.2016 / 17:05