Skip to main content

All Questions

Tagged with
0 votes
2 answers
90 views

How to keep track of where you are in an Ansible loop?

I need to write some lines in a YAML file for a variable number of times: - name: Retry a task until a certain condition is met lineinfile: path: /root/file insertafter: '^listeners:' ...
محسن عباسی's user avatar
-4 votes
0 answers
58 views

How does Python determine variables? [duplicate]

I've done a lot of R, compiled Arch Linux, used SQL and so on, but I'm starting into Python now, and I understand some of the advantages of a flexible, dynamic, high level language, but sometimes it ...
Sean Lefevre's user avatar
-3 votes
1 answer
69 views

Why is variable passing 'object Text' instead of values? [closed]

I am in a for loop creating a table with radio buttons. I am trying to dynamically create the labels. My created variable will console log the expected values, one line above where I pass the variable ...
2CStarsOnceMore's user avatar
0 votes
1 answer
88 views

Running a 'for' loop for a sequence of numbers but I'm just getting a reprint with the range function

Online course presented this problem and I can't figure it out. What it's supposed to output is at the bottom. def odd_numbers(maximum): return_string = "" # Initializes variable as a ...
Ebo's user avatar
  • 1
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
1 answer
46 views

TCL read variables with a dynamically increasing number

We create dynamic variables in a foreach loop like this: set res01_ipsladata [split [exec "show ip sla history"] \n] set res01_lineindicator 0 foreach line $res01_ipsladata { if {[...
Mario Jost's user avatar
0 votes
0 answers
36 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
1 vote
2 answers
94 views

How to create a FOR loop that will work for calculating instrument scale length and put it in an HTML table?

I am trying to write a JavaScript program that will accept user input, that being the Scale Length used for their guitar, and how many frets it has, then do the necessary calculations to solve for the ...
hjlemon02's user avatar
0 votes
0 answers
47 views

Returning loop counter variables within a stored function created inside aforementioned loop in JavaScript - more details in question body [duplicate]

I am new to JavaScript and I am going through freeCodeCamp. The current lesson has two examples which I tried to describe in the title but easier to just show below: Case 1: Using var for loop counter:...
journeywithjavascript's user avatar
0 votes
1 answer
41 views

Passing Variable to Forloop in Liquid/Jekyll

I'm looking to create an html fragment in liquid/jekyll for the purposes of re-use across different areas. I'm able to pass data successfully from the parent html into the child fragment, but unable ...
Nick B's user avatar
  • 9,307
0 votes
3 answers
65 views

Iterating through values of a two variables

I'm using terraform alb community module to assign IPs to subnets. I managed to do it in three seprate sets (as below). Is there a way to do it one bracket using for or for_each loop? Thanks! ...
jurasjarzyna's user avatar
0 votes
0 answers
11 views

Cycling an external file adding each line into a command as a varable

Im trying to use an external file which has a number of lines, using each line as a variable and completing a simple command in bash and saving into multiple external files. For example, my file ...
john Wallace's user avatar
0 votes
1 answer
94 views

correlated variables from a multivariate normal distribution

I am trying to develop a loop that will help allow me to dynamically control the correlation between two variables, while holding other variables correlations static. I have this completed, but I ...
Edward's user avatar
  • 1
0 votes
2 answers
25 views

The problem of variables not working in the nested for loop

your textHello your textI have a folder that contains a series of files. The file inside is added every day your textNow, I wanted to write a command that every time I run it, it will check the files ...
user22782271's user avatar
-1 votes
1 answer
93 views

Variable get value only after the second run of the macro

My problem is that variable1 does not get the "1" value. I have already checked several times that the investigated cells contain the "1111' value. If I run the macro 2nd time, the ...
FoFE's user avatar
  • 43

15 30 50 per page
1
2 3 4 5
69