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

I have the following python script that I would like to modify in order to create a new nested for loop inside the for j in i["attributes"] loop to retrieve dynamically for each customer_id ...
Alessandro's user avatar
0 votes
2 answers
137 views

I was trying to do one coding questions solve, that says: Write an alternate version of squeeze(s1, s2) which deletes each character in s1 which matches any character in the string s2.". Well i ...
Haru Hoshizora's user avatar
0 votes
1 answer
185 views

I have an array of elements that contains a nested array of other elements inside. When deleting a row of an array, sometimes a crash occurs with the message 'Swift/ContiguousArrayBuffer.swift:600: ...
Mad Man's user avatar
  • 41
0 votes
3 answers
166 views

C++ version for project is 20. Suppose we have some service class template: template<int someSegmentSize> class SomeAbstractFileService { public: void init() { std::cout << &...
AlecadM's user avatar
0 votes
1 answer
35 views

I run into a stale element reference every time I run this double for loop and the page refreshes after I click the back element. I tried to call the driver again in the for loop and pull up the ...
user23568016's user avatar
0 votes
0 answers
64 views

I have a list of generators L = [gen_1,...,gen_n] with variable length n. How can I implement in a compact way the following: for el_1 in gen_1: for ... for el_n in gen_n: ...
Radio Controlled's user avatar
0 votes
0 answers
168 views

I'm doing an art project on sacred geometry and want to create my own flower of life pattern on p5.js. After a lot of trial and error I've managed to get 6 circles intersecting evenly while rotating ...
Arthr Gray's user avatar
1 vote
1 answer
66 views

In views.py I have the variable mylist = zip(set1,set2,set3) In templates I do {% for val1, val2, val3 in mylist%} {% endfor %} It works fine. However, if I duplicate the condition it fails. Is it ...
christian ortiz's user avatar
0 votes
2 answers
78 views

How can I make it so that the right number is always greater than or equal to the left number? for i in range(5): for j in range(5): # Right (j) should be greater than or equal to left (i) # ...
user avatar
0 votes
2 answers
402 views

I have an exercise that requires me to use a for loop to iterate through the object 'tutorPetTypes' and calculate the collective total number of cats owned by the tutors. Here's my current code. It ...
Zac's user avatar
  • 21
0 votes
1 answer
26 views

league_size = int(input("How many teams are in the league?")) match_no = int(input("How many maches are played?")) team_points = [[0]*match_no] * league_size for i in range(len(...
jannik thome's user avatar
-3 votes
2 answers
111 views

Given a 9x9 Sudoku grid with a valid solution. I am trying to code a method that validates (in other words, checking for duplicates or out of range values) in the Sudoku 'box' (which in this case ...
yanasf's user avatar
  • 13
0 votes
1 answer
28 views

I have a dictionary that is made up of nested dictionaries and lists. I need to search it and pull out selected sub elements. Everything is working fine but I feel like there a better way to drive it. ...
fallingdog's user avatar
0 votes
0 answers
117 views

I have been trying to use ChatGPT to write and troubleshoot this Script with no luck. I have tried so many things and it always just returns data from the first sheet that matches the condition, and ...
Lauren F's user avatar
0 votes
1 answer
123 views

I want to generate a panel data sets with 5 units and 10 observations in r and get the test statistics. However, my problem here is to do this process 1000 times. For each id I need to restart the ...
bbkl's user avatar
  • 1
0 votes
3 answers
201 views

I am leaning Java, trying to solve the patterns in Java using for loop Solid Rhombus. Print Format: line 1 :5 Spaces *****(5 Stars) then Line 2 :4 Spaces ***** line 3 :3 Spaces ***** Line 4 :2 Spaces ...
Gangadhar Yande's user avatar
3 votes
1 answer
1k views

I've applied a function to create a multi-layer SpatRaster using terra. It's worked find, but now I'd like to separate each layer and name the new SpatRaster after the layer name. For three layers it'...
Chris Stantis's user avatar
0 votes
2 answers
295 views

I'm trying to create a "Buy Again" list in Shopify. My coding skills are very basic, but I know enough to get by. I can loop through a customer's previous 10 orders, but that's not really ...
kcm's user avatar
  • 1
0 votes
4 answers
738 views

You are given an integer array digits, where each element is a digit. The array may contain duplicates. You need to find all the unique integers that follow the given requirements: The integer ...
m.shahzad's user avatar
1 vote
1 answer
39 views

Solving the problem of taking stars in Java. The questions are as follows. Print out a square with a width and length of 10*10 using *. The columns that match the x and y coordinates in the ...
WHEEW's user avatar
  • 21
0 votes
2 answers
44 views

I'm new to programming and am taking an intro to programming class which focuses on java. I have an assignment that have been working on but can't seem to get the last portion of the requirements. I ...
omarviz's user avatar
0 votes
1 answer
90 views

I am trying to loop through a column full of dates, and for each tax year in the column create a copy of a template Worksheet and rename it to the tax year. The loop for finding and returning the tax ...
Captain Kriegwurst's user avatar
1 vote
1 answer
142 views

I apologize in advance for this headache, and in particular, the minimum amount of data I need to give you to reproduce my situation. I have two data frames that look like: > dput(df_long[1:60,]) ...
grace.cutler's user avatar
1 vote
1 answer
1k views

I hope this message finds you well. I am writing to bring to your attention an issue I have encountered while working with nested iterations in Azure Logic Apps. I believe there might be a bug or ...
Shubham Vashisht's user avatar
0 votes
1 answer
30 views

glas <- vector() ess <- vector() sal <- vector() deep <- vector() bdate_group <- vector() doy_group <- vector() for (bdate_group_num in 1:8) { #repeats same values for corresponding ...
nick p's user avatar
  • 1
0 votes
1 answer
599 views

I have two arrays of objects that I'm going to compare. If the values in all properties are the same then I want to remove the property in arr1. Below is the arrays with objects. They have the same ...
Henry's user avatar
  • 269
0 votes
1 answer
52 views

I'm trying to make a hangman word-guessing game. I have come this far. The only problem now is that I would like to insert a statement of "There is no {0} in the word", playerGuess when the ...
diogenes31's user avatar
-2 votes
3 answers
1k views

I'm trying to create a function that takes a table and returns a list containing the sum of each row. E.g. func([[0.2,0.1],[-0.2,0.1],[0.2,-0.1],[-0.2,-0.1]]) returns [0.3, -0.1, 0.1, -0.3]. I know ...
CNG09d's user avatar
  • 17
0 votes
1 answer
59 views

I am fetching responses from thousands of API calls, each of which is a new JSON, as the api is paginated. The result I get is a list of lists, with each inner list the JSON of one page. The following ...
Brian - RGY Studio's user avatar
1 vote
1 answer
110 views

Introduction Hello everyone. This is my first post here - I am trying my best to give you everything needed to be able to help me, hopefully I do not forget anything. I am trying to build a loop that ...
skylight's user avatar
1 vote
2 answers
475 views

I am very new to for looping in R and could use your help. Say a dataset as below: dog <- c("Dog1","Dog1","Dog2","Dog2","Dog3","Dog3", &...
Rabin KC's user avatar
-6 votes
1 answer
69 views

all_folders is nested list of interest as below: all_folders = [['\\\\1234\\Costing\\Folder1\\', '\\\\4567\\Costing\\Folder1\\', '\\\\8910\\Costing\\Folder1\\', '\\\\1112\\Costing\\Folder1\\', '\\\\...
daredevil's user avatar
0 votes
0 answers
99 views

this working for-loop creates a single output list of 10 dataframes each containing a random sample of two rows from my input dataframe. dat <- iris lst_2 <- list() for (i in 1:10){ ...
Mark's user avatar
  • 137
1 vote
1 answer
102 views

I was coding a Java program for AP CSA that took the max value from the columns of a two dimensional array, and it was used to determine and print out which area of a brand was the most popular/or had ...
Rohith's user avatar
  • 13
3 votes
1 answer
1k views

For a C++17 restricted project I would like to have a standalone implementation of C++20 std::views::join(). I am aware of the existence of range-v3 but unfortunately the person in charge is unwilling ...
joscao's user avatar
  • 35
-2 votes
3 answers
101 views

This is my data set: q1 q2 q3 q4 0 a a a a 1 b a a a 2 c c b a 3 d d b a 4 a a a a 5 b c b a 6 b a b a 7 c c b a 8 d d b ...
Ashok Behara's user avatar
0 votes
1 answer
50 views

I have a method that's supposed to go through an ArrayList of words and put them in order alphabetically using .compareTo(). This is the testing text in a txt document: environment,city,character,road,...
N3wb1e's user avatar
  • 1
0 votes
2 answers
46 views

I have a method thats supposted to go through an ArrayList of words and put them in order alphabetically using .compareTo(). However I get this message when the program is run Exception message: java....
N3wb1e's user avatar
  • 1
-2 votes
1 answer
125 views

For a school task I need to display a nxn matrix depending on users input: heres an example: 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 (users input: 5) And here is my code until now: n = ...
FabiCode's user avatar
0 votes
1 answer
117 views

I have a dict from a json API call that looks like this: { 'id': '63d08d5c57abd98fdeea7985', 'pageName': 'Some Page Name', 'bodyContent': [{ 'children': [{ 'alpha': 'foo foo foo'...
Jeff's user avatar
  • 2,872
0 votes
3 answers
259 views

I have two lists: headers = [Header1, Header2, Header3] data = [(1, 'Name1'), (2, 'Name2'), (3, 'Name3'))] I need to combine the lists into a dictionary into the format: database = {Header1 : [1, 2, ...
charlie s's user avatar
0 votes
1 answer
128 views

I'm New To angular. In a Milestone section there is a year and month loop. In the month loop the month name should be displayed only once for the specific year. please help me to find the possible ...
Rishf P's user avatar
  • 49
-1 votes
2 answers
53 views

As part of a homework assigment I was tasked to printout this shape here: LinkToTask But in the code I made which can be found below, the nested for loop seems to loop infinetley and after reading ...
Alex Brosnan's user avatar
0 votes
0 answers
40 views

I'm new to R (and coding in general). The data itself is taken from lead isotope analysis and are lead isotopes. I was hoping to create a nested for loop which compared the output of an equation to a ...
dphin's user avatar
  • 1
0 votes
3 answers
365 views

I'm quite new to Python and struggling to get my head round the logic in this for loop. My data has two values, a city and a temp. I would like to write a "for loop" that outputs the maximum ...
angeliquelinde's user avatar
0 votes
1 answer
220 views

How can i make a matrix as the one seen below, but with simply 1 for loop (instead of two): 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 ...
WouterJohannes's user avatar
0 votes
1 answer
93 views

I am fairly new to coding in general and to Python in particular. I am trying to apply a weighted average scheme into a big dataset, which at the moment is taking hours to complete and I would love to ...
Francesco's user avatar
0 votes
1 answer
181 views

I am trying to build a stock portfolio. I have mainly 2 dfs: 1 with my transactions and 1 with the stock prices of the individual stocks. My transactions df looks like this: Date Ticker ...
kruimel_dief's user avatar
3 votes
3 answers
115 views

I'm trying to find a way to make nested for loops work, but this iteration is different than the most popular results (where an OP is looping through directories, or using a numerical for /l loop, etc....
k1dfr0std's user avatar
  • 602
1 vote
1 answer
96 views

Input: 3 7 4 Output: XXXY XXYY XYYY XXXXXXXY XXXXXXYY XXXXXYYY XXXXYYYY XXXYYYYY XXYYYYYY XYYYYYYY XXXXY XXXYY XXYYY XYYYY I have an idea that involves 2 for loops nested in another for loop that ...
realBunger's user avatar

1
2 3 4 5 6