96,604 questions
0
votes
2
answers
83
views
A global array passed between several subs
Good day,
Something interesting I hope you may help me solve.
I have a global variable FlowTable() as Variant. I'm deleting rows in it within a loop. Each time it runs, it should update the Ubound(...
1
vote
1
answer
52
views
Selenium nested for loop iteration in iteration over urls [closed]
I am trying to iterate through a list of Urls find some elements, one of which is a list of other Urls.
I then want to, in the same overarching loop iterate through the second list of Urls and find a ...
1
vote
1
answer
113
views
C console program not producing correct output [closed]
I am trying to recreate YSAP Terminal Christmas Tree in C instead of in Bash. I know there's a bunch of weird code as I don't do a lot of C programming, so a lot of it is mashed together from what I ...
2
votes
2
answers
69
views
How can I run multiple separate loops independently from one another in Arduino IDE?
I'm trying to make 3 LEDs (a red, a green, and a blue) flash simultaneously. The blue one should flash slowly, the green one should go quicker, and the red should be fastest. I tried putting multiple ...
0
votes
2
answers
76
views
Gnuplot 2D histograms bins in loop
This is a follow up to a similar question Plot with 2D histograms bins answered by @theozh. I've been trying to modify the linked code to work in a loop. However I've encountered a few problems ...
-2
votes
3
answers
89
views
Click event works only for first element in loop in a Django template [duplicate]
I am looping around a cart dictionary that is in the session and I have defined a product for all the items. When each cart item button is clicked, they are sent via ajax, but only the first item is ...
1
vote
2
answers
79
views
Why doesn't sh's continue remember the command's exit status
Why doesn't continue remember the command's exit status in sh?
Given this loop:
#!/bin/sh
for i in 0; do
false || continue
done
echo $?
Output: 0
#!/bin/sh
for i in 0; do
false
done
echo $?
...
Best practices
0
votes
4
replies
128
views
Best method to loop a list while removing items
I have a list of ranges that consist of a start and end value. I need to optimise the list by identifying any overlapping ranges and merging them so that there is no duplication on the list.
I have ...
6
votes
4
answers
225
views
awk command to subtract constant from a column and print results
I was working on a one-liner to subtract a constant value (e.g. 100 in this case) from a specific column using awk. So far I can manage to get to where I can print the last iteration only – which ...
0
votes
0
answers
171
views
As part of a function, how could I create a variable number of sums one inside another based on a parameter?
I'm currently struggling on an assignment (probability class) which require creating a function (VBA excel) that contains a variable number of sums one inside the other based on a parameter. I'm not ...
Advice
1
vote
8
replies
148
views
Making a palindrome out of a string of random letters (or any given value type inputs)
Found this code exercise on W3R. Been trying to figure out the relationship between the outer and inner loop (i and j), but can't seem to wrap my head around it. If anyone could walk me through this ...
Best practices
1
vote
0
replies
77
views
Ansible: mysql_query loop and some rows for each
How can I manage a mysql_query result when query is looping a list and if each queries iteration returns some rows?
I want the results to be stored in a dictionary. Then I will check if each perm is ...
Best practices
0
votes
2
replies
133
views
Looping Datasets in R
Essentially I am trying to create a dataset that is dependent on prior rows to generate values for any given row. I then would like to run this loop over many IDs for an entire dataset. Current set up ...
0
votes
2
answers
133
views
Loop through all worksheets in workbook to return data to one sheet
I enter a worksheet name on the first active sheet, then run the macro via a linked button.
The code loads data from the worksheet into the first empty row of the active sheet.
I need to repeat the ...
3
votes
1
answer
130
views
How can I plot diagonals of matrix?
I want to plot all the diagonals of a matrix. In the matrix row 1 contains information of time 1, row 2 of time 2 etc etc. Each diagonal presents the evolution of the number of fishes in a cohort that ...