Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

unable to update rows of information

Please direct me to another tread if there is a similar one already. This an enquiry for Data Scripts for Google Sheets I am unable to input the data in the cells I would like to. Below is the ...
Kok Yan Rong's user avatar
0 votes
1 answer
36 views

bulk operation with reformat.sh (bbmap)

I have a folder with paired-end sequencing data in the following format: Bk1-ITS2_S102_L001_R1_001.fastq.gz Bk1-ITS2_S102_L001_R2_001.fastq.gz Bk2-ITS2_S103_L001_R1_001.fastq.gz Bk2-...
PhageCR21's user avatar
0 votes
0 answers
41 views

Speeding up recursive function with Numba

I have some code that uses a lot of nested loops to perform some computation, and wanted to rewrite this code to use recursion for two reasons: 1) readability and 2) generalized functionality. The ...
Varun Maheshwari's user avatar
-4 votes
0 answers
35 views

Strange behaviour between Python append and pop [closed]

Is there some strange interaction here? On the surface these two blocks of code should do the same thing but interchanging them causes very large output differences later in the program. Is there ...
operator's user avatar
  • 187
0 votes
1 answer
42 views

Go through my dataframe and separate it into different dataframes by incrementing +1 of column x at each level [closed]

Go through my dataframe and separate it into different dataframes by incrementing +1 of column x at each level. For example 0 to 61, 0 to 82 ... 13 to 82, 13 to 107 so on I need to optimize the code ...
user21482806's user avatar
0 votes
0 answers
16 views

GNU Radio - loop output tags back to flowgraph input

I'm new to GNU Radio. I have a fairly simple flow graph that generates a signal, then a Python block analyses the signal and adds a tag to the peak values. At the moment, the output passes a message ...
B Petit's user avatar
-2 votes
0 answers
44 views

Solve this error " 'break' is only allowed inside a loop, if, do, or switch " [closed]

As I am learning swift programming in Playgrounds, so while learning there's a challenge provided in Playgrounds and they have not provided a solution, so I am trying to collect gems and toggle switch,...
Murtaza Khanpurwala's user avatar
0 votes
2 answers
42 views

How do I make a GUI which asks the user how many loops the script should do in AutoHotkey V2

I want to make a Program which asks the user how many times the inner loop should loop. It should also ask only once and then run indefinitely with the number of loops the user set. Here is the code: ...
Maximilian Wonschik's user avatar
0 votes
0 answers
26 views

Smooth Carousel Not Looping Properly - Jumps After Last Image

I'm working on creating a smooth carousel, but I'm running into an issue. After the last image is displayed, the website background shows up before it jumps back to the first image. I want the ...
Junior Vasconcellos's user avatar
1 vote
1 answer
79 views

Is there a way in assembly to change an array's variables?

I found some solution but it doesn't work. I'm not sure if what I found is really possible. In that part of the code I tried to do the change: mov al, [bx+si] inc ax mov [bx+si], al but when I looked ...
omer GUR's user avatar
-2 votes
1 answer
58 views

How to load once and run many times? [closed]

Now I have an app on linux and I want to run it 100 times, so I use below command: for i in {..100}; do ./app; done I would delete the app at once after I run above command on linux; if this, the app ...
Henry's user avatar
  • 81
-7 votes
0 answers
86 views

How do I use a thread inside a while loop? [closed]

edit: i found bug i forgot to do thr.join(); I have a thread with a function. When the thread is in a while loop, it gives me a debug error. thread: thread thr(print); function: void print() { cout ...
boobooplucker5's user avatar
0 votes
0 answers
41 views

Loop through a comma-separated shell variable, n items at a time [duplicate]

I have a comma-separated bash variable like FOO=ab,cd,ef,gh,ij and I want to iterate over every item, n at a time like n=2 for i in {get every n $FOO items}; do echo i done and get the result: ab,...
Mike S's user avatar
  • 1,573
0 votes
0 answers
17 views

Skip n rows within an iterrows loop based on some condition [duplicate]

I'm using the iterrows method to loop through processing on a dataframe. I'd like to check for a condition and if met, skip the next n rows of processing. Is there a way for iterrows, or otherwise, ...
Chris's user avatar
  • 1,634
0 votes
0 answers
55 views

Loop over the CSV and generate dataframe

We are looping over the CSV file process the CSV and store the result into string variable . string is in below format Loop iteration 1 -- string1--> CS,20,20021988,Ind Loop iteration 2 -- string2-...
Gourav Joshi's user avatar
1 vote
1 answer
57 views

How use loop variable in column or row number?

I wrote a simple apps script to repeat set formula: for (var i=157;i<=160;i++) { spreadsheet.getRange('E'+i).activate(); spreadsheet.getCurrentCell().setFormula('=concatenate(F&i:AG&i)')...
Edward Chuang's user avatar
0 votes
1 answer
19 views

Repeated MySQL Select statement based on integer in a record

I have a table that looks something like the following. letter count A 5 B 3 How can I do a SELECT in MySQL that would produce something like the following output? column1 column2 A 1 A 2 A 3 ...
Tim's user avatar
  • 1
0 votes
1 answer
49 views

filter map objects using javascript

I have a map object with key value pair as shown below const input = new Map([ [ 0, { testErrorSummary: "ServiceC\nV4/\n\tcom.dmv.smp", appErrorSummary: '{&...
Aren Trot's user avatar
  • 473
1 vote
4 answers
74 views

How does one read the input values in a single line to a bash script without using the "read" keyword?

I have a script that looks like the following: #!/bin/bash # Usage: viewer.sh <file> counter=1 while [ $counter -le $# ] do string1="$" FILE="$counter" string3="...
Dabu's user avatar
  • 19
0 votes
0 answers
18 views

How to get a chi2 for every cell of my contingency table in R

I am starting from this contingency table: mat <- matrix(c(58, 60, 29, 190, 87, 22, 167, 53, 123, 79, 80, 36, 2, 65, 24, 312, 131, 39, 178, 85, 37, 151, 129, 27, 0, 10, 14, 104, 87, 60, 106, 78, 34,...
mb_1's user avatar
  • 1
-3 votes
0 answers
25 views

Do while loop in cypress [closed]

How can I run the same test cade many times till I get a user message in cypress I have a delete records rest case. I need it to be executed till I get a message says that no records exist
Moataz Selim's user avatar
1 vote
2 answers
75 views

Bash multi-ping script has empty variables if ran under crontab

I scraped together a bash script to do multi-ping logging on Centos/Debian, when run from console it works fine, but run under crontab, the variable $NUM is left blank which should be a number such as ...
SmplJohn's user avatar
0 votes
0 answers
39 views

Excel VBA Code - Inserting selected value from list

I'm having issues trying to get the selected worksheet to be inputted in the line of code Set ws=ThisWorkbook.Sheets(SheetArray()) I'm new to coding especially in excel VBA and tried to merge two ...
Destini B's user avatar
0 votes
0 answers
21 views

Invalid from expression in the loop statement Power Automate [closed]

Running into the below error message with a loop statement I am trying to use in Power Automate Desktop. The image is of the loop action I currently have in the flow. The task entries variable is a ...
casecha's user avatar
  • 11
1 vote
2 answers
46 views

How can I write a loop to execute a command for each file as specified by user input?

Below is part of a script to execute a command on a file defined by the variable DSpath. There are several of these files distinguished by the number at the end of the filename "_01". The ...
Jeff Tenney's user avatar
-3 votes
0 answers
37 views

Iterators Vector Struct [duplicate]

I have written a function to a solve a problem similar to the knapsack problem. However, the loop inside the function does not terminate. I am not sure where I went wrong. Any help? struct items { ...
MANOJKUMAR's user avatar
1 vote
2 answers
113 views

Comparing counters and pointers in string loops in C

I write these codes to read characters in a string The first use Counter: const char str[] = "Hello World!"; for (unsigned short i = 0; str[i]; i++) { char c = str[i]; } The second use ...
M 027's user avatar
  • 75
-4 votes
3 answers
104 views

C# How to use this while loop? [closed]

I'm a beginner to programming and have this task I want to complete. Task at hand: Write a program where the user is allowed to enter their name, then (in a while loop) the program prompts the user to ...
KennyG's user avatar
  • 13
-4 votes
0 answers
57 views

Is there any ways to count string characters without using string api? [closed]

Develop a Java program to find the number of occurrences of a given character in a string input by the user. This is my question. I need to know if there is any methods to count or print one by one ...
Umesh Isanka's user avatar
0 votes
0 answers
24 views

Implementing nested loop in Ansible

I wanted to know how to implement nested loop concept to schedule a job in task scheduler which schedules 2 executables, This is my source yaml --- scheduledTasks: # 2 ACTIONS PLEASE CHECK - name: ...
Vivek M's user avatar
-2 votes
0 answers
179 views

Fortran loop constructs and avoiding a goto

The Fortran source code snippet below contains a goto, a label, a possibly superfluous logical variable going, an exit statement just before end do, and possibly other undesirable characteristics. How ...
Peter McGavin's user avatar
-2 votes
0 answers
36 views

How to optimize this Python loop with list comprehensions? [duplicate]

Here's my current code: result = [] for item in my_list: if condition(item): result.append(transform(item)) I'm trying to optimize a Python loop that iterates over a list, checks a ...
Prinan-99's user avatar
0 votes
1 answer
60 views

Counter that starts over for a specific variable

I'm writing a script to identify clusters of data in one dimension (depth) defined by a user specified gap in depth for multiple oil wells. The script looks at the difference in depth (d_dep) and then ...
Dave's user avatar
  • 51
-4 votes
0 answers
49 views

Loop with Delay in ubuntu

Hi I used this Code by run loop with delay in .sh file in ubuntu every line echo number and wait 40 minutes from 1 to 100 and try again Now with Run .sh file only run loop (do not wait for sleep ) and ...
Ramin Malekghasemi's user avatar
-2 votes
1 answer
88 views

Access VBA For Loop throwing error of "No Current Record" after 1 iteration of code

I have an Access database with a list of supervisors and employees. I would like to add a specific number of task records (number housed in a config table) for each employee. I loop through the table ...
designspeaks's user avatar
0 votes
4 answers
157 views

Iteration over rows and apply function based on condition

I am learning iteration and apply function in pandas. I have an example below. for every 4 rows apply a function (1st row + 0 , 2nd row + 0, 3rd row = 0, 4th row = 0) and so on. Any link resources to ...
stvlam22's user avatar
  • 147
2 votes
2 answers
176 views

Iterating over each dataframe in a list of dataframes and changing name of first column

I'm trying to iterate through a list of datraframes and do two things, replace blanks with "_" (which I've done) and add a suffix to the first column of each dataframe. I know I can access ...
bigjdawg43's user avatar
0 votes
2 answers
160 views

Finding the highest key and value in a dictionary

I'm doing a task for a Python course, a 'blind auction', where each user inputs their name and bid into an empty dictionary. The idea is then that you loop through the dictionary, and find the highest ...
Gusm98's user avatar
  • 23
-2 votes
0 answers
26 views

Adding second variable to bash loop [duplicate]

Struggling a bit with a script that requires a second variable because of the way Trimmomatic (0.39) is used. It requires java trimmomatic-0.39.jar {variable 1} {variable 2} {output 1}.... Files are ...
Dan Pritchard's user avatar
0 votes
1 answer
63 views

Merge multiple columns based on match rows using loop by Python

I have two excel files: excel file 1 which is shown on image 1, contains standard time series data. excel file 2 which is shown on image 2, contains time series recording of different geographical ...
Kaiyuan Zheng's user avatar
0 votes
0 answers
54 views

how to set a loop to ignore rows 1-3

my data validation code works I just can't get it to ignore rows 1-3. I'm fairly certain its to do with my rng1 code but I cant figure it out. Any help would be much appreciated. Thanks :) Module Code ...
Natasha Newell's user avatar
-3 votes
0 answers
26 views

My php code can not loop through a nested array, tried with for loops, and the data did not save [duplicate]

I have a foreach loop in the example i have provided. It calculates from an nested array the total income, total expenses, and at the end the net total. It works just fine, BUT i need to make sure it ...
Adrians Straume's user avatar
0 votes
1 answer
77 views

Iterating Across Files and Directories to Clean Avro Data in Python

Good evening Python experts, I am trying to implement a python pipeline that will preprocess .avro data files across multiple dates, subjects (i.e., participants), and timestamps. Note that the data ...
Linda Jasmine Hoffman's user avatar
1 vote
1 answer
107 views

Code to handle arbitrary number of for loops in Python/Numba

I have a function compiled under the 'njit' framework in Numba. It looks like this: import numpy as np from numba import njit, types, prange from numba.typed import List @njit(cache=CACHE_FLAG) def ...
Varun Maheshwari's user avatar
-1 votes
0 answers
50 views

Python Menu Navigation

I have this work for school. I need to navigate through menu...back..do the crud..be able to "emulate" that.Do I need to try Loops ? Functions together ? Anyone could help me with that ? ...
Patrick Arinelli Rodrigues's user avatar
1 vote
2 answers
61 views

In a long table for a longitudinal study, how to loop efficiently across a large number of individuals?

I work on sexually transmitted diseases, such as gonorrhoea, and their possible consequences, such as ectopic pregnancy in women. I have a first dataset (df_gono) that contains whether and how many ...
Fabrice Helfenstein's user avatar
0 votes
1 answer
54 views

Overwrite files msgbox within a loop using Solidworks vba

I have a script that saves x amount parts of a SW assembly into step/xt, based on the input of a userform. This works really well. However, I want to add a messagebox that asks "Do you want to ...
JetskiS's user avatar
  • 89
0 votes
1 answer
22 views

Is it possible to mimic LOOP control structure in NiFi?

I have more than hundreds of tables coming from different databases or API. Dependencies exist among some of those data sources, so I have ordered them and design the whole flow as linear mode: I let ...
Willi's user avatar
  • 377
0 votes
0 answers
24 views

Getting level counts from 2 variable+ glm output

I need to get the counts of all levels in a model with 2 or more levels. Someone helped me get the counts for when there was only one variable in the model with "n" = table(output[[i]]$model[...
Newtostats_24's user avatar
2 votes
1 answer
53 views

NES 6502 assembly: CMP in NMI doesn't work

I have an NES program that does the following in an infinite loop: Checks the controller input of both controllers for the A button If the A button is pressed, it branches to a label that sets a RAM ...
user17512255's user avatar

1
2 3 4 5
1933