Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey

All Questions

Tagged with
0 votes
1 answer
80 views

For loop for every two files in an array using SLURM

I have a list of files I store in an array : file1.txt file2.txt file3.txt file4.txt file5.txt file6.txt file7.txt file8.txt declare -a files=( *.txt ) I need to iterate every two files. I ...
pedro's user avatar
  • 505
0 votes
2 answers
47 views

SAS dynamically convert all columns but one into numeric (missing values included)

I'm trying to convert all my columns to numeric except the first column which I want to keep character. They are currently character-based and are missing. I tried the following code below. /*fake ...
Health_Code13's user avatar
0 votes
0 answers
18 views

How do I return Error with non-integer parameters? [duplicate]

const sumAll = function(x, y) { let sum = 0; if (x < 0 || y< 0 || isNaN(x) || isNaN(y) || Number(x) !== x || Number(y) !== y ) { return "ERROR"; } else { if (x > y) { ...
transcenddev's user avatar
-1 votes
1 answer
54 views

Generate and loop through pairs in a code block [duplicate]

I am trying to generate a list of unique pairs from two ranges. I then want to use this list of unique pairs as part of a URL in a loop to download a large batch of data. I have managed to generate my ...
Stephen Washburn's user avatar
0 votes
2 answers
72 views

Loop through a state array in React and switch each item to true using setTimeout

I have an array in state: const [show, setShow] = useState([false, false, false, false]) These affect whether or not an image is displayed. I'd like to iterate through them one by one, using a delay ...
Maccles's user avatar
  • 131
0 votes
1 answer
78 views

Parsing a multi-line YML array into a loop

I've been scouring the web to help point me in the right direction but to no avail. I'm trying to take multi-line array from one YML file and parse the values into a different ansible playbook: ...
Ben Young's user avatar
0 votes
1 answer
56 views

Quickly load paragraphs into an array

My Word VBA sub adds paragraphs of the active document to an array, one at a time. It adds the style name to a parallel array. It's really slow, even with ScreenUpdating turned off. (If it matters, I ...
Shawn V. Wilson's user avatar
0 votes
1 answer
71 views

Assembly: calculation of string index

As a beginner to Assembly, I've been practicing disassembling and reverse engineering on Intel x86 assembly in IDA. The current program I'm trying to figure out validates the user given password by ...
TasH's user avatar
  • 13
0 votes
1 answer
100 views

bash adding values and iterating an array [duplicate]

For the below script, list of elements in bash array is printed as expected within the loop, but when the same is printed outside the loop, its not. Can you please provide pointers on what is being ...
madmatrix's user avatar
  • 265
0 votes
1 answer
70 views

Creating a 'for' or 'if-else' selector for checking dynamically sized python List

I'm trying to mask 8752 images with transformers like this from transformers import pipeline from PIL import Image import requests import cv2 import numpy as np from matplotlib import pyplot as plt ...
RedSean's user avatar
  • 47
-4 votes
1 answer
71 views

Making a List with Arithmetic Progression [duplicate]

[Doing an assignment where I have to have to run the formula a(n) = 2*n - 5 (n>=1)] 100 times and have those in a list so that I can grab terms and compare and bunch of other stuff. This is what my ...
Jide Fadairo's user avatar
-2 votes
1 answer
83 views

modifying items in byte[] arrays using loops (C#)

I got a byte[] array from an input file (ASCII text file) and I'm trying to delete all bytes of a pre-set hex value, without converting the array to string and without using lists. This is the code I ...
maykuul's user avatar
  • 13
0 votes
2 answers
68 views

Manipulating 2d arrays in C++ and having trouble iterating through all of the data to create new arrays / go through the loops for the operation

I am writing a program for C++ that takes the user input with the first line containing the n integer ranging from 1-9 that informs on the grid size for the following data. then the grid with n number ...
gem's user avatar
  • 1
1 vote
3 answers
72 views

Looping with Multiple Arrays

i am having trouble creating an efficient code that loops and returns the result for 7 scenarios starting in a particular cell and having each scenario return in the cell immediately below the ...
DR21's user avatar
  • 23
1 vote
1 answer
58 views

Bash array value different inside while loop [duplicate]

I have a pretty simple shell script that uses a while loop to read values from a file, place them into an array and then print the content of the array. It correctly displays the content of the array ...
L.Ray's user avatar
  • 127

15 30 50 per page
1
2 3 4 5
781