Questions tagged as 'loop'

1
answer

Code in infinite loop

I have developed the following código to get the content of a certain webpage: import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; Logger logger= Logger.getLogger("org.bonitasoft"); URL url...
asked by 07.11.2017 / 14:14
1
answer

Accessing sub-tables in a moon table

How do I read a subtable within a table? I tried to return the value with the following function but went wrong. name = {"Lowes", "Renata", "Titia", "Maria"} health = {} posx = {} posy = {} posz = {} players = {name, health, posx, posy, p...
asked by 20.12.2017 / 16:50
1
answer

Is it possible to convert this for loop to a function of the apply family?

df_loop <- data.frame(data1, data2, data3, 0) for (i in 4:nrow(df_loop[1])) { tmp_1 = df_loop[i,1] tmp_2 = df_loop[i,2] tmp_2_lag3 = df_loop[i-3,2] tmp_3 = df_loop[i,3] if (!is.na(tmp_2_lag3)) { if((tmp_1 >...
asked by 06.06.2017 / 09:23
1
answer

Why does this code give no error, but does not return anything?

I'm still learning Haskell (actually only started about 2 days ago) with a basic C # knowledge. In this piece of code the code is supposed to iterate several times in a list and subtract the first value from the second until it finishes. The...
asked by 06.10.2017 / 21:01
1
answer

Python remove () list index out of range

def gera_huffman(simbolosOriginal, probabilidadesOriginal): # gera_huffman(['a', 'b','c', 'd'], [5, 2, 1, 2]) simbolos = simbolosOriginal probabilidades = probabilidadesOriginal lista = [] while (len(simbolos) > 2):...
asked by 05.04.2017 / 19:14
1
answer

How to mount this effect with JS?

I have a list, and I would like to create a loop by passing each of these elements, basically what I want is this effect: $.each($('.elemento'), function(i, el){ $(el).fadeIn(100); $(el).delay(400).addClass("esconder"); /*esperar 400m...
asked by 11.04.2017 / 21:13
1
answer

How can I improve this loop that has one foreach inside another?

I am making this code that has 2 foreach's and loads 350 properties with more or less 3500 image links , in fact I did not call the photos, only the links, this everything loads in half a second . The variable $array stores content...
asked by 20.06.2016 / 20:41
0
answers

Problems generating JSON with JAVA

I'm having trouble generating this json { "receita": [{ "specialtys": [{ "date": "27/01/2016 00:00:00", "itemSpecialtys": [{ "specialtyId": 1, "specialtyName": "Tabelionato de...
asked by 29.01.2016 / 19:47
1
answer

Button that loads 3 more posts

I want my button id="boot" ( <div id="boot"> ) each time it is pressed, press +3 testimonials. <?php query_posts( array ( "category_name" => "depo" )); if (have_posts()) : while (have_posts()) : the_post(); ?> <...
asked by 24.09.2015 / 18:50
1
answer

Stop accepting data to queue

I need to stop queuing when the user types a negative number (-1), check if the queue is empty so that when typing the negative number does not give any error and the main, I need the user to tell what specific value he #include <iostream&g...
asked by 26.11.2014 / 12:59