Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [loops]

Loops are a type of control flow structure in programming in which a series of statements may be executed repeatedly until some condition is met.

loops
0 votes
0 answers
13 views

Accessing the previous rows of the same calculating column in dax

I am creating a new calculated column called Final_Value in my calculated table called INDEX_1. The condition is I have three columns called Kombi,JJJJ_MM, Value. Each kombi consists one row entry for ...
Pramoth's user avatar
-1 votes
1 answer
44 views

How to get next user input in python for while loop? [duplicate]

I am currently in school taking a python course in this lab it is asking me to create a loop that outputs the users input into a sentence until user enters quit Ex: If the input is: apples 5 shoes 2 ...
Sonia Acosta's user avatar
0 votes
0 answers
66 views

How can it be executed one? [closed]

I have this C# code, but there's a small issue, it repeatedly terminates and runs the "bubbles.scr" process every 0.01 second (I know the 'System.Threading.Thread.Sleep(1000);' is ...
FancyDoggy's user avatar
0 votes
1 answer
34 views

Create a new column based on other columns for time series data in pandas

I have the following pandas dataframe with columns May, June, and July. Month June July Aug June a d g July b e h Aug c f i I want to create a several new columns with a 1 month forecast, 2 month ...
kmm2204's user avatar
0 votes
0 answers
17 views

Does the FOCAL language allow breaking out of a FOR loop?

I don't have an interpreter handy to try this out. I'm wondering whether FOCAL allows the use of IF inside a FOR line to break out of the loop. Would something like the following code run, or is it ...
Carl Witthoft's user avatar
-1 votes
2 answers
40 views

creating a looped stacked barplot with ggplot in R

I am trying to create a stacked barplot with ggplot in R. I have the following dataframe: Sample Date Organism Antibiotic Resistance 1 01/01/2020 E Coli Amoxicillin S 1 01/01/2020 E Coli Gentamicin ...
code_rookie's user avatar
-8 votes
0 answers
70 views

None in Python. How does it work and what does it symbolize?

So I'm currently learning Python and I came across a problem with a None value. I'am asking myself what does it mean in the context of the short program and is there any way to visualize it? list = ...
Jujuthecoder's user avatar
1 vote
2 answers
67 views

How do I get my For Next loop to actually loop

I have a loop, however it only finds the first iteration and doesn't loop onto the next iteration. I've set up a loop. So far, it opens a worksheet called Names, counts rows containing IMP and EXP and ...
One foot in the Grave's user avatar
-4 votes
0 answers
27 views

Java Script Nested Loop [closed]

How can I achieve this achieve this using nested Loop in Javascript. I've been trying to get it done, I was stocked I don't know much about nested loop, just learning. It was an assignment. I would ...
AYANDOKUN AMOS's user avatar
0 votes
1 answer
27 views

loop to select the date closest to another date, for multiple variables [closed]

For each MRN ID, I would like to select the date (in OBSERVATION_DATE), in association with various columns (i.e. hdl, ldl, and vldl) that is closest to the dates listed in multiple other columns (i.e....
stephr's user avatar
  • 113
0 votes
2 answers
15 views

ggplot2 plot title based on other variable then the one used to iterate the loop

I would like to title each plot with an other variable then the one which is used to iterate the loop My data Id Month Day_available Soil_type Id 1 July 7 loam Id 1 Aug. 5 loam Id 1 Sept. 14 loam ...
Pauline Lefranc's user avatar
-1 votes
0 answers
20 views

I'm getting type error in python while calculating factorial using recursive Function [duplicate]

def calc_fact(n): if (n == 1 or n == 0): return 1 else: n * calc_fact(n-1) print(calc_fact(5)) Was trying to create function to calculate factorial facing type error operand not ...
Mudasir Ahmed's user avatar
0 votes
0 answers
33 views

JQuery - How to append to element during each iteration of a loop

This is a question that seems to have been asked a number of times here by different people using a number of different coding languages, but no one seems to have come up with a clear definitive ...
Graphic Detail's user avatar
1 vote
2 answers
103 views

How to declare variable by using for-next loop

The following code is very good. Sub Macro1() 'Convert plain excel data to Excel Table. (Excel workbook consist of 3 sheets) For i = 1 To 3 Worksheets(i).Select Worksheets(i).ListObjects.Add ...
Dr. Somebody's user avatar
0 votes
0 answers
30 views

Is there a better way to reduce number of iterations without missing a given condition?

I'm working on a project which requires a lot of iterations and calculations. We're speaking about something around 2000 iterations, each of them doing between 15 and 40 different calculations. This.. ...
as0d's user avatar
  • 9

15 30 50 per page
1
2 3 4 5
6439