Skip to main content

All Questions

Tagged with
0 votes
0 answers
84 views

Issue with Inner Loop Modifying Outer Loop Variables in Python

I am having a problem where an inner loop rewrites variables in the outer one, specifically when working with a list representing a Tic-tac-toe board. I want to place "X" in each empty ...
Knedllll's user avatar
-4 votes
1 answer
64 views

in python, why does the input variable make the loop not run but making it a function allows both the input and the loop to run?

I am not too sure how to phrase the title. operation = ("Addition", "Subtraction", "Multiplication", "Division") def choose(): input("Choose an ...
user27414084's user avatar
0 votes
0 answers
27 views

Convert variable (i.e., string) to vector of same name [duplicate]

I'm really struggling with using variables. By "variables" I mean a string that is a substitute for a value, numeric or other. Some of my research found that R calls columns variables. And ...
mperedithe's user avatar
0 votes
1 answer
27 views

How to update declared 'global variable' inside nested WHILE and FOR loops

In a Snowflake stored procedure, I declared a 'global variable' inside the DECLARE block then tried to update the value of the 'global variable' in nested WHILE and FOR loops inside the BEGIN block ...
Kai's user avatar
  • 19
1 vote
1 answer
46 views

Assigning character specific values to many variables utilizing a loop JavaScript

I am trying to figure out a way to assign tile values to my tictactoe cell variables equivalent to the variable characters themselves in a more concise manner. Each variable should be equivalent to ...
lunarofficial's user avatar
1 vote
2 answers
138 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
1 answer
47 views

Problem when using loop-generated variables in ansible

What i'm trying to do is generating lots of similar directory trees. I woul like to set a dict which describes the pattern of the tree. Then i want ansible to generate multiple directory trees with ...
Kirill Zelepukin's user avatar
-1 votes
1 answer
86 views

Iterate through a variable in your SQL table to set ID numbers incrementing by 1 for each record?

WHILE [production].[stocks].[id] = 1 BEGIN update [production].[stocks].[id] set id = id + 1 END I was attempting to loop through the id variable starting with 1 at the first record and then ...
Nathan Shetzler's user avatar
1 vote
3 answers
58 views

Subset by value in columnA and get the value in a columnC that corresponds to the maximum value row of columnB in R? Automate this using loop

The title is rather confusing (apologies), but I will try to explain it here. I have a dataset with multiple names of individuals, the number of coffees they have had on a particular day of the week, ...
Anurag Mishra's user avatar
0 votes
1 answer
39 views

javascript params variable force changing somehow even if a const variable [duplicate]

I'm trying to keep the base value of something but will still not keep its value even if its a const and param? I dont know how it does that but heres my code. function load_descendants(elem,array,...
Victor Avelar's user avatar
0 votes
2 answers
160 views

Input a string to a int variable inside a loop

im new to C++ and i just find out that if i ask a user input for a variable with int data type in a while loop, the loop just keep repeating without asking for another input, why can this happen? #...
Riny Yuvita's user avatar
0 votes
0 answers
39 views

Python Script Issue: Assigning Unique Attributes to Each F5 Pool Member

I'm attempting to update a configuration file from an older F5 system to a newer format by parsing a text file containing pool configurations. I'm reading the file line by line and using the first ...
Amar Ysabie's user avatar
0 votes
3 answers
100 views

How to make this function with parameters that are variables return a list? [closed]

I edited this since someone helped me with the main issue, but for some reason I can't get this thing to print me out the list of the sequence, and I can't figure out why, but I think my validation ...
inversedawn's user avatar
-1 votes
1 answer
54 views

Python spambot code not working becuse of interaction function and loop

I am trying to create a spambot that continously spams text I give it. While I managed to do it just with coding (no GUI) I was now trying to create a GUI with tkinker, but it doesn't seem to work. I ...
Andrea Di Campo's user avatar
0 votes
0 answers
28 views

How to use variables in a loop - Databricks

I have the following code in SAS EG and I need to replicate it in Databricks. I'm still very new to cloud, and spark. Not sure how to use variables in this context. %macro emp_hrchy; proc sql; create ...
Sherif Ebeid's user avatar

15 30 50 per page
1
2 3 4 5
105