72,069
questions
0
votes
2
answers
46
views
Copying a range of values from row 1 to 250 in increment of 250 till the end
I am new to writing VBA codes. I'm trying to copy a range of values from range B1 to 250 and paste into another sheet and repeat from range B251 in increment of 250, until the last row.
But cant ...
-1
votes
2
answers
42
views
how to prevent this list from being updated? [duplicate]
my program:
num_cards=8
list1=[1,2,3,4,5,6,7,8]
shuffle_cards=list1
for j in range(0,num_cards//2):
shuffle_cards.insert((2*j)+1,shuffle_cards[(num_cards//2)+(2*j)])
shuffle_cards=shuffle_cards[0:...
0
votes
1
answer
44
views
Creating test for date columns incorrectly throwing error
I want to run a test to verify that all date columns in a df are in the 'ymd' order.
I'm using the code below (data given at the end)
date_stop = function(df_date, date_order){
#get only date ...
1
vote
0
answers
28
views
OpenMP deadlock when it has a omp for loop insed a normal loop
Simple problem, when I try to run the following code I have a deadlock.
#include <omp.h>
#include <stdio.h>
#define MAX_KEY 1000
int main(int argc, char const *argv[]) {
int i, k;
...
0
votes
0
answers
15
views
Remove SPEI message in a loop
An example of SPEI calculation:
library(SPEI)
library(lmomco)
library(zoo)
library(ggplot2)
library(lubridate)
years <- 1961:1965
months <- 1:12
time <- seq(as.Date("1961/1/1"), as....
-3
votes
1
answer
82
views
For loop not writing images [closed]
I'm attempting to write a for loop that opens each image in a folder, processes it, and then outputs it back into the same folder. The problem is, when I run the script, nothing happens. I just see ...
-9
votes
0
answers
66
views
Java nested loops execution process [closed]
public void deploy() {
while (true) {
if (isFrontClear() && !isBoundary()) {
move();
System.out.println("basic ...
-4
votes
0
answers
38
views
how to do cpu comparison between for and while loop in python [closed]
I was working to create program for seeing CPU consumption while running loops but I am not getting appropriate results.
I tried to check it from youtube, chatgpt and consulted various employees and ...
-1
votes
0
answers
26
views
Execute a command for all subfolders in a specific folder?
Let's say I have a main folder called C:\Users\USERNAME\Desktop\MAIN. Inside of MAIN are 3 subfolders each with different names containing a random assortment of .jpg, .mp4, and .txt files.
Example:
C:...
1
vote
4
answers
125
views
Increase speed of two for loops in Python
I have a double for loop in a Python code. I want to increase the execution speed, but the matrix is built using data from the previous row and column. How can I achieve this?
import numpy as np
...
0
votes
2
answers
42
views
Changing the Class of Multiple Dataframes' Columns with For Loop in R [duplicate]
I have many dataframes imported from csv files, all having one similar column name: ActivityHour. Its class was imported as character, but I want to change it to date and time with the lubridate ...
-6
votes
0
answers
66
views
Efficiently create a checkerboard pattern of asterisks [closed]
Question: Am I being the most efficient with this for loop, or would a While loop or other type of looping work better here?
I get the following output: a checkboard size two by two.
I'm expecting the ...
0
votes
0
answers
51
views
why is my program not giving any results? [closed]
so, i have made a program to check if a number is armstrong or not. it takes the input but does not give any answer. the console doesnt even say "press enter to continue" and instead gets ...
-1
votes
0
answers
62
views
Move file with en-dash using for loop (cmd.exe)
I have file (including en-dash in name):
"C:\folder1\backup – Todoist.html"
And I run this command via cmd.exe in Windows 10:
for /f "delims=|" %a in ('dir "C:\folder1" /...
-1
votes
0
answers
51
views
Why is my code not running in my for await function [closed]
So I am calling this function from a useEffect hook in React Native, the issue is within the function as the function contains a for await loop. The console.log outside the function works but all of ...