Category "loops"

Converting text file to all uppercase letters

I have an assignment for class and I have to make a program that takes an existing file and converts all the letters to uppercase. Below is part of the code (sp

vba vlookup does not work in loop

I am working on a tool to analyse data. The data to be analyzed is manually copied into the first sheet, then I am planning to run a macro which analyzes the da

Sum of odd numbers until reached limit in Javascript

While I was solving a question saying "add odd numbers from 1 to 20", I coded this: var i, sum=0; for (i=2; i<=20; i*2){ sum=sum+i; } document.write(sum);

Is it possible to step through a row of data and sum every n-th cell using a Lambda function?

I have a model that produces an array of values that can be several hundred columns wide. Every 25th column contains a number that I need to add to the total. I

using cursor attributes in a CURSOR FOR LOOP

I am running the following in the Scott schema: SET serveroutput ON; BEGIN FOR c_Emp IN (SELECT * FROM emp) LOOP dbms_output.put_line('The record processed by

Looping through a list in Python

Trying to loop through a list of numbers so that the output reads the result on a seperate line. Instructions Given: - Store numbers 1-9 in a list. - Loop thro

kattis problem ABC with python3. Works fine in local compiler, but when on submission getting partially right

I am trying the kattis problem ABC (https://open.kattis.com/problems/abc). It works fine on my local compiler, but when I submit, I can't pass all the cases. Ca

When do I need to use hasOwnProperty()?

I read that we should always use hasOwnProperty when looping an object, because the object can be modified by something else to include some keys we don't want.

Looping through Angular QueryList

So I want to get all the images in my component in an array, so I am using Angular's @ViewChildren which returns a QueryList of ElementRef: @ViewChildren('img

How to use loops in JasperReports .jrxml file?

I am using iReport Designer to design the .jrxml file. How can I use the for loop or if loop in .jrxml file? Is it possible? If yes how?

How do I loop an input box one additional time if criteria is not met?

I’m trying to create a series of input boxes that will prompt for more information before executing the rest of the code. I’m stuck on the looping a

Javascript (firebase): how can the firebase database key of a clicked item be obtained?

I have a firebase database structure like this and I have a loop function var jobTitle = document.getElementById('jobTitle'); var jobDescription= doc

increment variable value in spark view engine

I try to go through a for each loop and increment value of variable to name my label with below code <set i="0"/> <div each="var x in Model"> <

onTap in GestureDetector is taking a value less, but Text is taking correct, both used in the same loop

In the following code, Text(subjects[address]) is printing the correct value, but GestureDetector( onTap: is taking the same value for the whole Row, and increm

Loop not working for urls from csv file

Here, the loop not working, only the first url from the csv file is working.I want to run this for all the urls in the csv file, can anyone help me please... M

Subplot for seaborn boxplot

I have a dataframe like this import seaborn as sns import pandas as pd %pylab inline df = pd.DataFrame({'a' :['one','one','two','two','one','two','one','one','

how to repeat a task maximum five times using apache camel

I want to repeat a task (calling external API) till either of following condition is satisfied. Response code is success(200) Tried 5 times. For repeating a ta

How can I get a list of child groups in Ansible?

I have an inventory file that looks like this: [master] host01 [nl] host02 [us] host03 [satellites:children] nl us How can I get a list of groups that hav

How to split the elements in a list according to range of numbers in flutter

Am working on a project and I need to break down a list to a new list eg I need to break down this kind of list [{ name: rice, quantity: 87, price: 8700}, {name

Python: Make class iterable

I have inherited a project with many large classes constituent of nothing but class objects (integers, strings, etc). I'd like to be able to check if an attribu