Questions tagged as 'loops'

2
answers

Go through an array with a FOR loop

I'm trying to repeat N times an array with a FOR loop, but I've been stuck in the last array that contains more elements. This is my code so far. $datos = array(); for ($i = 1 ; $i <= 50 ; $i++) { $medidor = 'medidor'.mt_rand(1,99);...
asked by 12.03.2018 / 16:25
1
answer

Foreach de java me sobre writes the objects

Friends, I have a foreach in java that runs through a list to fill another and send it to my jquery, but I realized that the for is overwriting the objects. Ex: listingMethod (id) [0]) = 'samsung' and listingMethod (id) [0]) = 'iPhone 6...
asked by 29.10.2017 / 02:30
2
answers

Search for different strings between two texts (JavaScript)

I need to find different words and small sentences of up to 5 words long (or could be customizable) from one text to another. The differences I want to keep in an array, so that only the words or phrases are saved without repeating (it is checke...
asked by 09.11.2017 / 11:23
1
answer

wanted to know how to put 2 fixes in 1 [duplicate] array

Here in my program it only takes 1 array that is the a but the b does not take it: c     
asked by 24.05.2017 / 01:42
1
answer

Show an ImageView and TextView Running [duplicate]

Show a ImageView for 1s and after the time the image is deleted and then show a TextView for 1s, and so on until you go through the% List . way to do it: Code: This way it is working: Thanks to the contribution of:...
asked by 16.04.2017 / 08:02
1
answer

How to compare two arrays with text strings and create a new one from repeated words in these

I have two arrays, one with a text with more words and the other with the text that I should compare, the problem is that there is a word that appears twice in each array so when I run the code it repeats itself in the new array, when it should...
asked by 17.04.2018 / 19:56
1
answer

How to take the last element of a list in java?

I have the following list listNivelesPersona2 = nivelesPersonaService.findNivelesPersonaConsultaHorario(cvePersona); I want to recover the last record of the time of entry and exit, I do the following for (NivelesPersona nivelesPerson...
asked by 09.04.2018 / 20:23
1
answer

Join while with for to fill in html table for working hours

I need to create a pdf with the record of a teacher's day. I have the table Schedules with (id, idTeacher, Day, HoraIni, HoraFin, Fecharegis) Being the Dia - > 1 = Monday, 2 = Tuesday, 3 = Wednesday ...) This is the code that I have to genera...
asked by 06.03.2018 / 16:36
1
answer

How to flip the cards in this game if there is no match? It tells me, random is not a function

I would like to know how to do so that the cards are returned IF THERE IS NO MATCH, the game draws cards random once it is clicked. But I do not know why he tells me that mistake. The same if I do cardsInPlay[0].setAttribute('src', 'ima...
asked by 06.12.2017 / 19:51
1
answer

python and date loop

good, I am trying to create a vector that when entering a start and end date, dates are generated in between every 6 months and I can not do it in python :(. for example when I gave the input 01-01-2010 and 01-01-2012 I want the vector to contai...
asked by 19.11.2017 / 06:37