Skip to main content

Questions tagged [for-loop]

A for loop is a control structure used by many programming languages to iterate over a range. It is a way of repeating statements a number of times until the loop ends. Depending on the language this may be over a range of integers, iterators, etc.

for-loop
-1 votes
2 answers
57 views

Todo list using array and loop

I want to create a todo list using array and loop and display the list in div container. I am able to display the list but it is muliplying the same list stored and is displayed. <body> <...
Sam Sandy's user avatar
0 votes
0 answers
1k views

Iterations and multi-replacement

I have a file named file.in that contains 6 columns of data. One of the columns contains the mean and another contains the error. File.in is around 900 lines long with a different value for mean and ...
Allyand Camshow's user avatar
-1 votes
1 answer
50 views

Get the list of nested folders in directory and filter by name in batch script

I am trying to write a batch function where i need exclude some folders while searching in directory Main Folder --ProjA Folder --A Folder --A.csproj --Aa Folder -Aa.csproj ...
AMDI's user avatar
  • 963
0 votes
0 answers
36 views

Speed up for loop to merge two dataframes in pandas

This is my code: import time st = time.time() # Determine the smaller DataFrame if len(purp_expanded) <= len(demog_expanded): smaller_df = purp_expanded larger_df = demog_expanded ...
Muhammad Kamil's user avatar
0 votes
0 answers
50 views

Labels in Python Tkinter frames not being updated in for loop

I created a dictionary of python tkinter frames and when I try to loop through the frame to call a functions which updates the labels in each frame, only the last frame gets updated and rendered to ...
Ebs's user avatar
  • 3
0 votes
2 answers
61 views

Is the & operator is essential to use as address operator [duplicate]

#include<stdio.h> int main() { int a[5]={5,10,15,20,25}; int *p; int i; p=a; for (i=0;i<=5;i++) { printf("the address of the %d is = %d\n",*p,p); ...
khushal dak's user avatar
0 votes
2 answers
66 views

Bash loop on two sets of files simultaneously

I have two sets of files in the same directory : 1.bam 2.bam 3.bam and 1.txt 2.txt 3.txt I need to run a command where 1.bam and 1.txt are interpreted together, and so on.. I tried looping through ...
pedro's user avatar
  • 443
-3 votes
2 answers
61 views

How to skip first element of each row in csv file without changing csv file

I am using a for loop in python to convert the values from the csv file into integer and float then putting them in a list in the code itself but the problem is with that the csv file doesn't only ...
aaa bbb's user avatar
0 votes
0 answers
44 views

How can I get my for loop to work in R to count occurrences? [closed]

I am running a for loop in R for a data frame "WOS" searching in its columns "Article Title" and "Abstract" for specific terms listed in the data frame "Combined_633&...
Dry-Appointment-1582's user avatar
0 votes
1 answer
30 views

For loop in react using cards

I'm working on recipe project . I have fetch the all data from an API like image ,video ,ingredients into the react cards. Now i want to the Ingredients for each card as per need . For example card1 ...
Priya Prajapati's user avatar
0 votes
0 answers
52 views

VBA Looping with multiple variables

I have a worksheet with multiple tabs. What’s the best method to loop through multiple iterations of variables. I’m showing the code I have for one iteration and would like to repeat that code ...
BernE's user avatar
  • 1
0 votes
1 answer
26 views

BigQuery: input parameter used for dataset name in for loop

I have a stored procedure that uses a for loop to read through the records in a table and carry out some actions. Is it possible to use an input parameter to specify the dataset and table names? For ...
user21920847's user avatar
1 vote
2 answers
34 views

postgresql - get cumulative count, in for loop?

In postgresql, how to get cumulative count? I wanted to get a cumulative count of customers enrolled between 01-01 and 02-01, 01-01 and 03-01, 01-01 and 04-01 etc., Not sure if we can do for loop like ...
Joseph Yang's user avatar
0 votes
2 answers
39 views

How do I list certificates in personal store across all servers in domain

I need to get a list of all of the certificates in the personal store across all of the servers in my domain. I am currently using the following powershell command which provides the desired results ...
NullCool's user avatar
-4 votes
2 answers
36 views

Repeated result for if statement in python [duplicate]

token_list = ['lg', 'was', 'beaten'] defined_words = ['hand', 'leg', 'head', 'arm', 'finger', 'wrist', 'thigh'] for i in range(0, len(token_list), 1): if token_list[i] in defined_words: ...
Oghenetejiri Obesare's user avatar

15 30 50 per page
1
2 3 4 5
4804