Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
0 answers
43 views

I am working on a program that is supposed to build a tree using nested lists in Racket. I believe I am very close, but I am stuck on one section of my insertion testing process. The syntax for my ...
JoshLeonthe1st's user avatar
3 votes
1 answer
104 views

I am somewhat new to Prolog, having only practised for a few months so far. I am stumped on the following problem and nothing I googled seemed to help. I wrote the following code into a Prolog ...
Ashley Ben Story's user avatar
2 votes
1 answer
66 views

I found some really unexpected behavior today using python 3.12.4. I am trying to sort a list of tuples into 2 different lists in a list of lists based on the first number of the tuple. Instead, each ...
seamus's user avatar
  • 29
-1 votes
1 answer
126 views

I'm working in Python and I'm trying to generate coordinates for circles with their radii being appended after coordinate generation. Once I have the list I want to check it against itself to see if ...
Inquisitor's user avatar
1 vote
1 answer
86 views

My macro accurately creates 2 lists of numerical data based on which group (control or exposed) a subject is in. Dim Subjects As Integer Subjects = Sheets("Participant Info").Range("C4:...
LyleBabcock's user avatar
1 vote
1 answer
36 views

I'm new to ansible so i'll try to explain this as best as I can... I have two lists created from separate json_query results. One of them contains nested lists with two related items each (vm and ...
dhubert27's user avatar
2 votes
1 answer
112 views

How to turn a data frame into a recursive list of lists (tree)? Input roles_data <- data.frame( Child = c("A", "B", "C", "D", "E", "F"),...
Slav's user avatar
  • 539
-4 votes
2 answers
79 views

I have a nested li below, I wanted to return a nested li with the string with and min of the int value within the same string value. Any idea? li=[['a', 10], ['a', 20], ['a', 20], ['a', 40], ['a', 50],...
Liu Yu's user avatar
  • 413
-1 votes
3 answers
151 views

I'm trying to write a code in python that can remove overlapping lists. My lists are in the format [lower_bound,upper_bound,data,data]. These lists are stored in a larger list. I want to iterate over ...
Feynman Cox's user avatar
1 vote
1 answer
91 views

I'm working with the Jira Native API to bring in dashboard data to R for rectangularizing. The max results that can be returned each call is 100. I'm working with a small dashboard atm but am thinking ...
PhDavey's user avatar
  • 438
1 vote
1 answer
54 views

I'm working on a dynamic nested tree structure using Angular CDK Drag & Drop. The drag-and-drop feature works at the first level but fails when trying to drop elements deeper in the hierarchy. The ...
Hung Pham's user avatar
0 votes
0 answers
20 views

If I wanted to make a nested set: nested_set = {{1, 2, 3}, {6, 4, 5}, {12, 8, 5, 7}} It would give the error: TypeError: unhashable type: 'set' However if I wanted to make a nested list: nested_list =...
frix's user avatar
  • 1
1 vote
3 answers
86 views

Suppose we have the list: mylist = [ [ "Hello", [ "Hi" ] ] ] How do I check that list containing "Hello" and "Hi" ...
user29249433's user avatar
-2 votes
1 answer
35 views

I have a value that creates a list with two values. I need to add it as a sublist to another list muptiple times. I need the resulting list to look like this: [["a", 1], ["b", 2], [...
Crip's user avatar
  • 1
0 votes
2 answers
117 views

In an m x n matrix consisting of 0s and 1s, we are tasked with counting the 4-directionally connected islands of 1s. A python implementation is as follows: def numIslands(grid): def sink(i,...
Brendan Langfield's user avatar
3 votes
1 answer
410 views

Given a python list that contains nested lists of arbitrary levels of nesting, the goal is to return a completely flattened list i.e for the sample input [1, [2], [[[3]]], 1], the output should be [1, ...
ariko stephen's user avatar
0 votes
3 answers
1k views

* { outline: 1px solid rgba(255, 0, 0, .2); } ol { *:not(li) { grid-area: none; /* hmmm... this is not right*/ } padding: 0; list-style: none; display: grid; grid-template-...
Adler's user avatar
  • 2,887
0 votes
1 answer
93 views

I need help, for group by my XML object class. Here my data from SQL server, my Query ( select * from TaxXMLdb ) = TIN DocEntryAR BuyerDocNum BuyerName Opt ItemCode Name DocEntryAR2 AAA 100100 5533 ...
valen's user avatar
  • 3
1 vote
1 answer
124 views

Programming a sudoku game and I've got a nested list acting as my board and the logic written out however I am stumped on how to check if a number is specifically within a 3x3 grid within the 9x9 ...
DM23545's user avatar
  • 31
-1 votes
2 answers
48 views

Currently coding a python sudoku game and I've got a nested list acting as my board, however the list when printed prints out all in one single line, how do I get each seperate list within the nested ...
DM23545's user avatar
  • 31
0 votes
1 answer
104 views

I am creating a nested list from an array generated from an hierarchical table of categories, with subcategories having a parent ID of the parent category ID. I am trying to display the list in a ...
midget's user avatar
  • 106
0 votes
2 answers
86 views

My understanding is that if I want to update the items of a list in place, this works, l = [1, 2, 3] for i in range(len(l)): l[i] += 1 and this doesn't, l = [1, 2, 3] for num in l: num += 1 ...
Raymond Li's user avatar
-1 votes
2 answers
176 views

I have two variables with the following structures: # initialization O1 = [[] for g in range(n)] for i in range(n): O1[i] = [[] for g in range(m)] O2 = [[] for g in ...
Sherwin's user avatar
  • 25
0 votes
1 answer
41 views

I am just starting to learn Pandas, and in a piece of code, there is a call to df.iloc[[1][0]] (where df is a pd.DataFrame with a shape of (60935, 54)). From the context of the code, df.iloc[[1][0]] ...
roundless's user avatar
0 votes
0 answers
47 views

I have a function in my JavaScript code which iterates over an array called background_check which has elements which are also arrays. I want to see if any element in this nested array is a 0 (each ...
engef2018's user avatar
2 votes
2 answers
116 views

I have a list of lists of dataframes, where each dataframe has a name according to its position in its list. I want to rbind my dataframes together according to their name. A1 <- data.frame(cars*...
akoontz11's user avatar
3 votes
3 answers
221 views

I have a dataframe that I would like to convert to a nested list, by row. However, I need to group several columns into separate matrices in each nested element. All of the solutions I've seen put ...
scjForR's user avatar
  • 45
3 votes
2 answers
119 views

I have the following data frame. Data_Frame <- data.frame(Factor_1 = rep(LETTERS[1:4], each = 12, length.out = 48), Factor_2 = rep(letters[1:3], each = 4, length.out = 48), Factor_3 = rep(1:2, each ...
David Moore's user avatar
  • 1,026
0 votes
0 answers
51 views

I am using CoLab to prepare some teaching materials. This is great because students do not have to have python (etc.) installed on their machines. (Thanks to google!) I want to embed some math code in ...
Christopher Thompson's user avatar
-1 votes
2 answers
104 views

I am trying to sort a nested list by date (which I can). Then if the list has duplicate dates, sort the duplicate dates by time. The first part of the list is the date or time, second part is the ...
Kelvin Hollander's user avatar
-2 votes
1 answer
93 views

I want to print the first letter of each string in a list on one line, and then the next letter on the next line, etc. When a string runs out of letters, it prints a space instead. Also this is my ...
Ian Pak's user avatar
-1 votes
3 answers
65 views

Suppose I have a list like this: my_list = ['a_norm', 'a_std', 'a_min', 'a_max', 'a_flag', 'b_norm', 'b_std', 'b_min', 'b_max', 'b_flag', 'c_norm', 'c_std', 'c_min', 'c_max', 'c_flag'] I want to ...
gwydion93's user avatar
  • 1,933
1 vote
1 answer
120 views

The following script, in SSMS 19.3, throws this error: JSON text is not properly formatted. Unexpected character '.' is found at position 1. DECLARE @json NVARCHAR(MAX) = '{ "level1": {...
FaCoffee's user avatar
  • 7,979
-1 votes
2 answers
50 views

If I have a dictionary with list values: users = {'first-name': ['Jim', 'John', 'Jane'], 'last-name': ['Boothe', 'Smith', 'Doe'], 'user': ['100', '101', '102']} How can I create a new list of ...
Jim Boothe's user avatar
0 votes
1 answer
59 views

How can I store nested lists in Postgres in way that's easy to use them in my Python program later? I plan to write the lists to the database once and reuse them many times. I've been able to store ...
Python_Learner's user avatar
3 votes
2 answers
79 views

I want to create all nested partitions of an integer - with all possible permutations of numbers and brackets (nests) at all possible positions. For example, for n = 3, I would like to have (3,) (1, 2)...
Jake B.'s user avatar
  • 465
-1 votes
1 answer
43 views

I performed the split.plot analysis using doebioresearch package in R. The result for multiple traits is generated in form of nested lists and the overall structure of the output file is multi-layered....
Maria's user avatar
  • 1
0 votes
2 answers
57 views

I have a nested dataframe where one of the columns (Reviews) is a list containing lists (text, rating, date) as shown below in text format. structure(list(Name = c("Afsondering Clinic", &...
shongololo's user avatar
1 vote
2 answers
77 views

Given an integer list and a key, I am required to group the list by greater than or equal to the key, or less than the key. For example, When key = 6 and lst = [1, 1, 1, 0, 0, 6, 10, 5, 10] Output ...
Eliel Cortes's user avatar
0 votes
0 answers
37 views

I have the following payload: payload = [{ "identification": { "corporationName": "Test", "code": 1234 }, "locations": [ { &...
CooperativistKid's user avatar
0 votes
2 answers
55 views

I wanted to make the line tighter in an ordered list. So I just style it - and it is fine. |This style has always worked well for me. Until I add a nested list, and it is not working well. For some ...
capser's user avatar
  • 2,695
1 vote
3 answers
128 views

I have a mixed list in F# that looks like the following: let list1 = [("a1",[1;2;3;8]);("a2",[2;8;6;10]);("s3",[4;8;5;12])] Is there a way to retrieve [1;2;3;8] if pass ...
Sai Keerthana Krishna Kumar's user avatar
4 votes
3 answers
191 views

Consider the following? ghci> transpose [] [] ghci> transpose [[]] [] ghci> transpose [[[]]] [[[]]] ghci> transpose [[[[]]]] [[[[]]]] ghci> transpose [[[[[]]]]] [[[[[]]]]] ghci> ...
Brendan Langfield's user avatar
0 votes
2 answers
26 views

I have modal in a React app that renders a list of items with a list of nested values and a search bar. When the user types into the search bar, I need to be able to match that input to an item in the ...
Adam Casey's user avatar
0 votes
1 answer
45 views

I have a dataset which is like this. library(dplyr) set.seed(505) tempdf1 <- data.frame( y = rnorm(400), x1 = rnorm(400), x2 = rnorm(400), x3 = sample(1:5, 40, replace = TRUE), ...
Ahir Bhairav Orai's user avatar
2 votes
1 answer
61 views

I have to group sub-lists with a common element in set "p", using python. p elements are not always in 1st or las position on the sub-list. Grouped (result) lists is list r. Result list r is ...
Hernan19's user avatar
3 votes
2 answers
108 views

I have a tibble with a column containing a nested list (<list<list<double>>> data type to be specific). It looks something like the following (but in R/Arrow format): ID nestedvals ...
TDeramus's user avatar
  • 180
0 votes
1 answer
436 views

I tried sorting this challenge in so many ways but this time apparently my script is sorting the wrong way this time. The challenge consists in you inputing the students name and score then the script ...
wazowski637's user avatar
2 votes
2 answers
87 views

I'm an R veteran who usually hates working with nested lists because of how tricky they seem get... but I am not sure I can avoid them here. In this case, I can make the output that I want, but I'm ...
Ryan Utz's user avatar
1 vote
1 answer
3k views

I'm trying this one according to documentation "nested starts at first char", but that doesn't work, falls into quotation mode idk why btw. ## 1. Section 1 1. Step 1.1 2. Step 1....
artk42's user avatar
  • 15

1
2 3 4 5
65