Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
1 answer
127 views

I'm trying to estimate the population growth of a population with different growths rates, shown below r <-c(0.5, 1.0, 1.5, 2, 2.5, 2.6, 2.7, 2.8, 2.9) I'm trying to fill N_List with the ...
Jordan S Davis's user avatar
-5 votes
3 answers
138 views

While practising nested loops in C, I wanted to understand how control flows between an outer loop and an inner loop. I understood that the inner loop runs for each iteration of the outer loop, but ...
xapet's user avatar
  • 39
3 votes
1 answer
89 views

I am trying to re-run a nested for loop within a while loop if the while condition is not met. If the condition is met then I want the inner loop to terminate and proceed to the next iteration of the ...
user3500717's user avatar
0 votes
2 answers
159 views

I have a python code that calculates a function F(X), where both F and X are arrays of the same shape. F(X) uses another function called from a package that only accepts a scalar as an argument, but I ...
Dennis Fr's user avatar
0 votes
4 answers
111 views

I'm trying to fill rows in several columns with dates and time from given start date to given end date to create a schedule. In the first column I want the date displayed as "year", 2nd ...
Gyzmo's user avatar
  • 11
0 votes
1 answer
62 views

I'm trying to figure out how to get this nested loop to work without delayedexpansion. My original block shown below works as intended, but after writing it, I discovered I can't save the changes to ...
AuthG1k2's user avatar
1 vote
1 answer
95 views

I have selected a subset of numerical columns from a database and I want to iterate through the columns selecting a target_column and comparing it with the result of a numerical operation between two ...
Evan Lynch's user avatar
1 vote
1 answer
62 views

I'm trying to determine the time complexity of the following code. It has a nested loop structure, and inside the inner loop, a recursive function is called. I want to understand how the recursive ...
Malik ZiA's user avatar
0 votes
1 answer
60 views

I am not very experienced with coding but I am creating a customtkinter application style script where a user can input a specific type of html that contains diagnostic addresses and various ...
Chickchu's user avatar
0 votes
0 answers
95 views

Lua table (ref) index changes its values without assigning any to them. Why does ref table change its values after assigning it to tab[c] or using string.match()? The actual behavior is that the ref ...
Jepamb's user avatar
  • 1
0 votes
0 answers
135 views

I am making a mockup CPU in VHDL. I am using Vivado for simulation and programming environment. I need help understanding why my simulation won't follow through with the nestled loops. I need ...
Johan Svensson's user avatar
0 votes
0 answers
34 views

Let me preface this with the fact that I am new to ARM templates. I am trying to create a template that will created a bunch of CosmosDB accounts, databases, and containers based on a config file that ...
pauldog90's user avatar
2 votes
1 answer
117 views

Is there a smart way to vectorize a nested for loop of inner products, where the inner index is lower bound by the outer index? Here's a simple example. Say that arr1 and arr2 are numpy arrays each ...
AJoR's user avatar
  • 49
0 votes
1 answer
55 views

If the replacement of elements is written in two lines, then the matrix is ​​transported incorrectly x=[[i for i in list(map(int,input().split()))] for _ in range(int(input()))] print("Result:...
Kit_kat_rin's user avatar
0 votes
2 answers
118 views

I'm trying to create a file that transpose the data in on row to multiple rows and columns. Currently using an array. I can get the first row to look the way I need in order to load it into our system....
Eriknme's user avatar
  • 37
0 votes
0 answers
298 views

I am working on a Python program that identifies Elliott Wave patterns in cryptocurrency market data. The current implementation uses nested loops and exhaustive searches, which makes it ...
Viraj Tharuka Ranathunga's user avatar
0 votes
0 answers
77 views

How can I print all possible words of a user-specified length "x" in python? I already know how to do it for a specific number of characters like all possible 3 letter words by using for ...
Aarush Ravez's user avatar
0 votes
3 answers
125 views

Could you tell me what is the best way to reduce the calculation time of formulas in nested loops? I have code like this: for k in range(0, 130): for i in range(0, 1600): array2[i,k] = 0 ...
James Jacques's user avatar
2 votes
2 answers
73 views

I was trying this: tuple(map(tuple, tuple(((x,y) for x in range(5)) for y in range(3)))) I got this: (((0, 2), (1, 2), (2, 2), (3, 2), (4, 2)), ((0, 2), (1, 2), (2, 2), (3, 2), (4, 2)), ((0, 2), (1,...
KLc3088's user avatar
  • 167
-2 votes
1 answer
40 views

I am new here and I do not have much experience. I greatly appreciate any advice you may provide. I have a 2D array representing staff scheduled to work on a particular date. The data looks like this ...
Kathryn Kolsky's user avatar
0 votes
1 answer
43 views

set.seed(2024) #conditions b1<-c(-0.3,0.3) b2<-c(-0.3,0.3) conditions <- expand.grid(b1 = b1, b2 = b2) # some other conditions sample_size <- 200 nsim<- 10 #number of simulations #...
Tube's user avatar
  • 195
1 vote
2 answers
127 views

Could some one help me how to implement below version of nested_loops with recursive_loops? I was able to generated the exact output what I want using nested_loops, but it is always limited to 3 loops....
musk's's user avatar
  • 123
0 votes
1 answer
55 views

How to speed up the passage of a nested loop. I am doing browser automation using Selenium and in one section of the code I need to compare coefficients and dates with table cells. The code needs ...
Dourfyt's user avatar
0 votes
0 answers
35 views

For an assignment, I'm making a Blackjack game in Kotlin. The catch is that each player has a player skill that allows them to modify the results of their next draw. Here is the important game loop: ...
ITM_Coder's user avatar
  • 263
0 votes
2 answers
48 views

Hello I'm trying to convert a set of bucket notifications defined as follows to a map: sequence structure so I can iterate over the sequence with a dynamic block in my bucket notifications. ...
Robin Tanner's user avatar
0 votes
1 answer
159 views

I'm trying to figure out how to use what I think might require a nested loop in Terraform. I have a module that creates Azure storage accounts from a list of storage accounts. I would like to extend ...
Scott's user avatar
  • 117
0 votes
3 answers
88 views

i am having trouble creating an efficient code that loops and returns the result for 7 scenarios starting in a particular cell and having each scenario return in the cell immediately below the ...
mr_nane's user avatar
  • 89
1 vote
0 answers
76 views

I am learning omp and came across nested loops involving arrays assignments etc. with details: Loop indices are inter-dependent Arrays a, b, and c have been initialized I am using Visual Studio 2022 (...
ABUL_SALASA's user avatar
0 votes
2 answers
90 views

I've been asked to find the best and worst case time complexity "in terms of their running time as a function of input size, n." I'm pretty new to Big O but I was doing okay will the other ...
Mia Good's user avatar
0 votes
1 answer
68 views

I have a class which has a series of loops inside of it. Each loop uses a pandas.dataframe to add data to a new list that can be called as an instance attribute. data = [player_stats, ...
Brian's user avatar
  • 77
1 vote
4 answers
227 views

#include <iostream> using namespace std; int main() { int count = 1; // Declaring 3D array int array1[3][4][5]; // Initialize 3D array using loop for (int i ...
bashar's user avatar
  • 49
1 vote
2 answers
189 views

Very often I have nested loops at least two-level depth where elements from the same container interact which each other. Imagine interaction of particles in physics. This leads to two cases of the ...
Damir Tenishev's user avatar
0 votes
1 answer
84 views

I am making a fun program to find magic squares of squares. I have 9 nested for_each loops corresponding to each of the 3x3 numbers of the square. I use the constant LIMIT to set how many square ...
figgyfarts's user avatar
0 votes
1 answer
34 views

I've been trying to do this for a few days and really I'm struggling. How do I generate all possible scanned folders from the string below and replace all possible folders in %%%ANY_DIR%%%? $...
Jiri's user avatar
  • 13
1 vote
2 answers
94 views

Want to print a raster of circles in a rectangular frame. Found example of one loop, worked fine. Added a second loop inside, no good; I only get a single column of circles. Suggestions welcome! % ...
Karel Adams's user avatar
2 votes
1 answer
114 views

how to pandas fast nested for loop for "non numeric" columns? because this for loop is way to slow: for i in range(len(df1[column_A]): for j in range(len(df2[column_A]): if df1[...
Bold Ganbaatar's user avatar
0 votes
0 answers
45 views

I wanted to know how to implement nested loop concept to schedule a job in task scheduler which schedules 2 executables, This is my source yaml --- scheduledTasks: # 2 ACTIONS PLEASE CHECK - name: ...
Vivek M's user avatar
1 vote
1 answer
51 views

I was working on the codewars kata Integers: Recreation One: 1, 246, 2, 123, 3, 82, 6, 41 are the divisors of number 246. Squaring these divisors we get: 1, 60516, 4, 15129, 9, 6724, 36, 1681. The ...
Ryan M's user avatar
  • 303
0 votes
0 answers
36 views

My goal is to find the minimum of some function "V" on a condition curve "R=0" V and R are both functions of variables X, Y, D, L. I need as outputs all of {X,Y,D,L,V,R} so i can ...
Theodore Racz's user avatar
0 votes
1 answer
67 views

I need help figuring this out. I need to display different posts and pages in a loop but I am having challenges nesting them. I am not sure that's the right word to Use but I am pasting my code below ...
Senkya Andy's user avatar
-1 votes
1 answer
106 views

So I have a Terraform locals.tf file which has the below content to represent a set of environments I intend to deploy to: locals { environments = [ "sandbox", "test", ...
hitman126's user avatar
  • 969
0 votes
0 answers
48 views

What I want to achieve is 2 loops (anim1 and anim2), while anim2 contains nested loop internalAnim2 The output of the following code should be: anim1 - 4 times (= a1Max) and 5 times (=a2Max) those 3 ...
nie podam's user avatar
1 vote
1 answer
80 views

I am trying to run the following code multiple times with different values for the 'aux' object. time <- seq(0, 30, 1) stock <- c(sK=0, sF=1) aux <- c(aH=0.4, aRel=0.5, aRes=0.5, aS=0.8) ...
user11806155's user avatar
-2 votes
1 answer
110 views

I was trying to speed up some nested for loops with multiple internal loops in python 3.11: for item1 in iterable1: for item2 in interable2: if condition == true: expression1 ...
Apostla's user avatar
  • 127
0 votes
0 answers
23 views

I'm experiencing a strange issue with two similar pieces of C++ code that are supposed to perform the same task but yield different results. The problem is around the inner loop statement . While ...
AyushRaj's user avatar
3 votes
1 answer
86 views

These are my entities: public class Permissions { public string PermissionName { get; set; } public List<Controllers> controllers { get; set; } } public class Controllers { public ...
Yasim Yasin's user avatar
-3 votes
1 answer
88 views

String = 24-06-1966 repetitive Nos to be displayed 6, 6, 6 Non-Repetitive Nos to be displayed 2, 4, 1, 9 Hello If someone can help me to get or displayed Repetitive digits from Numeric String ...
SsD's user avatar
  • 11
-2 votes
3 answers
139 views

I'm trying to replace every letter in string to next letter (a -> b, c -> d, etc.). I get random symbols or XXXX after compiling and running the program. #include <iostream> #include <...
avent's user avatar
  • 27
0 votes
1 answer
146 views

My function is such that it takes the minimum over the range of dataframe which keeps increasing in length and maximum over the dataframe which reduces in length with each iteration. The dataframe ...
driver's user avatar
  • 282
1 vote
1 answer
61 views

I'd like to generate some simple calculations for each combination of two factor variables and store the results in a data frame. Here are the data: df <- data.frame(SPECIES = as.factor(c(rep("...
payne's user avatar
  • 15

1
2 3 4 5
100