Category "loops"

C text formatter characters count is off

So I have an assignment to format text according to rules and eventually print out the number of characters in the string (including \n and spaces, anything but

Looping a function/analysis in R by unique column values

I am trying to sort people in my dataset into three body-size categories (Small, Medium, Large). Consider the toy example below: library(ggplot2) library(dplyr)

How to skip an item in nested map based on When()

I want iterate over items's data and create a a new list of SomeData based on item.type however when type is UNKNOWN I need skip that element and not add to lis

Could using native browser modal dialogs in a loop lead to potentially infinite execution?

I was trying some code at JSBin and got weird results. This should work - it's a simple loop that uses Window.prompt. It does execute the correct number of time

How do I average the elements that are above a threshold in an array?

I am trying to average all the elements that are above 150 in an array. I can't figure out how to make it all work out and output the correct numbers. Can anyon

How do I average the elements that are above a threshold in an array?

I am trying to average all the elements that are above 150 in an array. I can't figure out how to make it all work out and output the correct numbers. Can anyon

Instancing objects with loop and get one dataframe from it

I have defined a class "Scraper" and the method "scraping" contained in it outputs a list with price information ("results"). My objects are several online shop

Extract ID from multiple fasta file and save in seperate text file with existing name using python

I am having multiple fasta file with extension .fna, I want to extract Id only and save in multiple text file respectively, how it can be done using python, Fil

How to use tqdm in bash for loops?

I have this for loop for example that takes so much time to finish so I want to use tqdm to have a nice progress bar like in python. But I can't find any way to

Are infinite for loops possible in Python?

Is it possible to get an infinite loop in for loop? My guess is that there can be an infinite for loop in Python. I'd like to know this for future references.

The loop over two arrays take LONG

Thanks for your helps, I have two arrays: A (100k row, 10 col) and B (100k row, 12 col) The following code (thanks to BSALV) loop through A and B => It takes

Target Individual Form Instance/Counter Inside A PHP While Loop

I have a PDO prepared statement that I use on a single-image page where a user is going to be able to download that specific image. I currently have a counter t

How can i use loop in aiml pandorabots for countries population?

i am creating a chat bot with aiml in pandorabots who knows the population of all countries and cities . How can i ask the chat bot "tell me the 10 countries wi

How to reset this string scanning code for a new letter?

I'm in the middle of homework and nearly finish. This is my code #include <stdio.h> #include <stdlib.h> void main() { char word[100],*ptr,input

Calculate the sum of values within an array of objects [duplicate]

I am trying to find the total sum for each item sold inside an array, like so: The array looks like this: [ { 'Some Title Item', '22',

Getting "throw new Error('Callback was already called.')"

I've been getting this bizarre error out of the blue when I run npm run build (built the program many times before). C:\Users\PomoJota\node_modules\neo-async\as

Confusion with an infinite while loop, concerning Scanner.nextInt();

I am having problems with understanding why code is not working. My objective is to keep reading the input of the user until the user finally enters "5", to whi

Create li from loop through array and display to HTML as a list

I am learning javaScript and I want to loop array and display to HTML as a list. How can I do that? Array: var array = ['Slide 1', 'Slide 2', 'Slide 3', 'Slid

Return the first word with the greatest number of repeated letters

This is a question from coderbyte’s easy set. Many people asked about it already, but I’m really curious about what’s wrong with my particular

Make calculations across multiple tables based on the table suffix in Bigquery

I have a database of daily tables (with prefixes formatted as yyyymmdd) with customers info, and I need to get a 90 day timeline of 90 day ARPUs (average revenu