Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
52 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
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 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
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
-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
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
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
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
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
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
0 votes
1 answer
105 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
-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
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
3 votes
3 answers
223 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
0 votes
0 answers
52 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
-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 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
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
-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
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
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
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
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
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
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
2 3 4 5
65