Questions tagged [nested]

This tag relates to any of various nested entities or operations in programming.

0
votes
1answer
30 views

Nested function won't execute when calling it in HTML

I'd like to create a navbar that will collapse when the screen is below a certain size, using jQuery, HTML and CSS, the website uses Wordpress, hence the jQuery(function($) {... Here's my code : &...
0
votes
3answers
30 views

Accessing enum variable declared within a Structure in C++

This is the structure, defined as shown in the following code snippet. struct EPSecODSStat { uint64 flags; uint32 maxPause; uint32 timeToAutoFinish; uint64 scanned; uint64 ...
0
votes
1answer
31 views

Kotlin declare nested array

How can nested lists be declared in Kotlin? I'm looking for something in the form of: var nestedList:List = [1,[2,[3,null,4]],[null],5] so that I can flatten it later on (result should be nestedList ...
0
votes
0answers
12 views

Are nested doctree supported in Sphinx?

I did some search but looks like there's trouble when doing a nested TOC. Is toc nesting supported in Sphinx and if so, can I go more than 2 levels of nesting?
0
votes
2answers
22 views

Create files inside folders with nested loops and arrays

I am trying to create 2 folders and some files inside them. But it can't create more than the 1st folder and the 1st file. Code says it can't create the 1st folder since it is exist. Don't even try to ...
0
votes
1answer
37 views

Getting the 5 most occuring elements in a nested list (of strings) with collections.Counter

i have a list like this L = [['16.37.123.153','119.222.456.130','38673','161','17','62','4646'], ['16.37.456.153','119.222.123.112','56388','161','17','62','4646'],..] And i want to get the 5 most ...
0
votes
1answer
35 views

Kotlin nested class extensions

does Kotlin compiler allow extending classes with inner and/or nested classes and if so what's the correct syntax? in EnclosingClass.java class EnclosingJavaClass { class NestedJavaClass1 {} ...
0
votes
1answer
19 views

Flutter: How do ListViews and other Scrollables determine their size?

I took some time to understand the layout behavior of Container, which I do now. But I just can't figure how ListViews determine their size. I know that shrinkWrapping works in the main axis, but what ...
0
votes
0answers
5 views

Sum rows that match a condition and the others that dont in the same query

I am trying to summarize in a table all the rows that match a condition as OpenOrder and the ones that dont. For now, I have a query that shows all the conditions select count(fk_OrderType)...
0
votes
0answers
28 views

Nested Loop Python - unexpected EOF while parsing [duplicate]

Having a problem with the following code. When I run the first for loop, there is an error which reads "unexpected EOF while parsing". I've looked this up and not understanding where I am going wrong....
0
votes
1answer
29 views

P5 loop length by length

I'm looping through a .csv and it works. The problem is that i need to slow down my Loop, because the server (later in my code) has a request limit. I tried delay()-functions like this, but they just ...
0
votes
1answer
22 views

Mongodb - Take only one element in nested array

I'm using mongodb to store my data. My collection consists in a list of objects identified by a type a list of other objects for each of them. An example of my collection is: [ { "type": "a", ...
0
votes
1answer
18 views

Flutter: GestureDetector apparently doesn't receive Drag events when it has a ListView in it

Am I missing something? The documentation says that events bubble up from the innermost child to the ancestors, but below code will not print "dragged" to the console. It does print "tapped" though. ...
0
votes
0answers
48 views

PostgreSQL : Is there a way/easier way to write a SQL query inside a case statement?

Problem : Current implementation has only one metric(avg) based on which it shows results. Required implementation needs to accommodate other metric's as well. However, I can't just place them in ...
0
votes
0answers
23 views

Flutter: Wrapping PageViews without size constraints in ListViews?

Is: In the code below, the example with the GridView on the top level works, but not with the ListView. Wanted: What I am trying to realize is a scrollable page that has a number of Containers in ...
3
votes
3answers
40 views

How to (or is it possible to) use a list to extract nested dictionary in Python?

I have a dictionary like this in Python: d = { "k1": "v1", "k2": { "nk1": "v2" }, "k3": "v3" } I have a list which stores which key I want to extract and some of them are ...
0
votes
2answers
26 views

Python remove JSON properties in nested JSON data (or dict)

I have some nested JSON data structure like this: my_dict = { "audits": [ { "id": 1, "author_id": 15, "events": [ { ...
0
votes
0answers
6 views

Negative log-sum coefficient in nested logit

Can log-sum coefficients in nested logits (in my case with a separate log-sum coefficient for each nest) be negative and highly significant? How do you interpret them in such a case? Thanks!
1
vote
0answers
17 views

How to approach unbalanced Model II and Model III analysis with some nested factors in R?

I have inherited a data set for analysis which, due to logistics and an abrupt end to the project fieldwork, is rather messy… it is very unbalanced! I’m super lost on how to deal with it in R as I’ve ...
0
votes
0answers
26 views

Spring Data JPA Query by Example with access to nested Objects Attributes

I use Query by Example and want to know how I can find objects with certain properties in the nested objects. A plan anyone? Here is my example Code: ExampleMatcher matcher = ExampleMatcher....
1
vote
2answers
37 views

Images not uploading in Database Rails 5 | Paperclip

I'm unable to upload an image in my nested scaffold form. All other fields are getting in the database except the image. Please help! I am on rails 5.2 and using paperclip for image uploading and ...
-1
votes
0answers
22 views

Change list in for loop

i need to write function that allows to change nested list. I don't understand difference between this two implementations. seq = [[1,1], [1,1]] def change_work(seq): for i, s in enumerate(seq[:]...
-2
votes
2answers
48 views

nested scopes in java

when we try out this code it doesn't work. public class f { public static void main(String[] args) { { // aussen int a = 1; int b = 2; { // innen ...
1
vote
1answer
23 views

Display properties of nested GeoJson in Mapbox

I am unable to query nested properties feature, which is imported from a geojson source and displayed on a mapbox map. I am able to get the feature with an on click listener, but as soon as the ...
0
votes
0answers
11 views

Nested IIF Statement Failing to Show All Results

I am trying to add text to a data field based on the beginning text of that data field. However, the results it generates is the first results of the Iif statement (HYCORR PRT& DC MSF GOAL 100) - ...
0
votes
0answers
13 views

Three-way anova with repeated measures and nesting: define the aov() error term

I want to compare the variable "PC" (continuous dependent variable) between 3 factors (categorical independent variables: "Redes", "ambiente" and "sensibilidade"). The "paisag" variable serves only to ...
-1
votes
1answer
23 views

Difference in structure nested lists and nested dictionaries

I was trying to get a nested dictionary comprehension to work after I found out how a nested list comprehension worked. I succesfully created the nested dictionary comprehension, although I'm still ...
1
vote
1answer
28 views

BeautifulSoup find - exclude nested tag from block of interest

I have a scraper that looks for pricing on particular product pages. I'm only interested in the current price - whether the product is on sale or not. I store the identifying tags like this in a JSON ...
0
votes
2answers
27 views

MongoDB using parameter for nested location

have a little newbe problem although I couldn't find a solution for similar problems, that worked for me. Here is my collection: { "_id": ObjectId("5bc712851224ceec702d9bdf"), "index": "123456",...
0
votes
1answer
61 views

How to create a neste array and transform to a nested hash?

I am trying to create a nested hash in ruby. The following is the code I am using to first create a nested array and then nested hash. r=[] y=[] z={} r= [["1776"], ["1094"], ["1666", "1077"]] i=1 ...
0
votes
0answers
41 views

JavaFX: how to use one Controller class in other Controller class of the same level?

I have a project, where I want to send a specific email to some users. I have a TabView with some tabs, especially with tab, where user has possiblility to create email content, and other tab, where ...
0
votes
1answer
26 views

how to access a value inside a nested structure

I am having problems how do you access a definition inside a structure inside of a structure? (define-struct health (maximum current)) ;; A Health is a (make-health Nat Nat) ;; Requires: ;; ...
0
votes
2answers
22 views

Parametric nested loops in Python

One parameter in my model controls the dimension of arrays; it can vary from 1 to any positive integer: for my purposes this can be up to 20. The flow of the program goes through a number of loops ...
0
votes
0answers
28 views

Batch nested loop doesn't work properly with errorlevel

I have a problem with a nested loop and usage of errorlevel. I want to delete files on multiple computers with batch files. For this I have a batch file that iterates through the computers and calls ...
1
vote
1answer
35 views

Aerospike - add new key/value pair in nested object

In Aerospike, how can I add a new key/value pair in nested object stored in bins of type map? For ex, I have a bins of type map against which I need to store below key/value pairs. { "a" : "apple",...
0
votes
1answer
29 views

Angular 6: Send click event in child to parent

EDIT: It still don't work and not throw any errors. I edited the code and added partial code from parent.component.ts I have parent component of a side nav-bar and child component which is nested in ...
0
votes
1answer
32 views

One liner using j to make nested lists into one list

j= lambda l:reduce(lambda a,b:a+b,l) k= lambda l:map(lambda z:j(z),map(lambda x:k(x) if type(x)==list else [x],l)) Type Error: it prints [1, 14] for print k([1,[2,[3,4],5]])
0
votes
2answers
19 views

List of tuples into list of lists, with element grouping

I have a list of tuples: start_list = [(A99, 2, 3 B1), (A21, 3, 4, B1), (A123, 4, 5, B2), (A22, 3 6, B2), (A12, 4, 6, B1)] and I want to group all tuples with the same last element into lists of the ...
2
votes
3answers
23 views

Combine nested list into unique combinations of sublists

I have a nested list of the form: [[[a, [a1, a2, a3]],[b, [b1, b2, b3]], [c, [c1, c2, c3]]] How can I get this into unique combinations of the initial elements, of the form: [[[a, b],[a1, a2, a3, ...
0
votes
1answer
39 views

I cant add any key value to my nested arrays

I have $monTab, an array with nested arrays like this in php : array (size=12) 0 => array (size=2) 'mon' => string '2018-01-01 00:00:00' (length=19) 'nb_argus' => string '...
1
vote
0answers
51 views

Iterate over indices of a list automatically

I created code that allows me to create a csv file based on data. import csv with open('GoodContigs.csv','wb') as fp: a = csv.writer(fp, delimiter =',') l = [final_positions,...
0
votes
0answers
11 views

javascript how to use $.get inside async .once(“value” function [duplicate]

I'm using firebase realtime database and i find myself using this async function ref.child(userId).orderByChild('c').equalTo(content).once("value", function(snapshot){ if (snapshot.exists())...
4
votes
2answers
110 views

How to get a subsequence of items across multiple lists from a list of lists?

I am trying to get subsequence of items between 2 lists in a list of lists. For example, if I have list=[[1,2,3,4],[],[6,9],[2],[3],[4]] I want to extract the items ranging from list[0][1] until ...
1
vote
1answer
42 views

Use output text from recursive batch

I am trying to get the ONLY the bitrate from each .mp3 in folder F:\t\m. Here is the batch file for getting the bitrate from each file in the folder: @ECHO Off FOR /R "F:\t\m\" %%i in (*.mp3) DO ...
0
votes
1answer
19 views

updating mongoose json object doesn't seem to work

I am not getting any errors or faults, but with the schema below I can't seem to update the fact1.nested1. If not using a nested Json it works, so I manage to update nested1 by using $set: {'...
0
votes
0answers
17 views

How to loop through a random nested list in Python? [duplicate]

I'm very new to Python and haven't yet found the answer to this question. I'm trying to write a function that gets a random nested list, like:[[['Apples'],['Pears']],[Oranges]], or [[[['Cherries'],['...
-2
votes
1answer
48 views

Create array from hierarchy javascript

Please if anyone can help me with the issue I'm struggling. I have this hierarchy: A -Aname -B --Bname --B1 ---B1name ---B11 ----B11name --B2 ---B2name ---B21 ----B21name -C --Cname --C1 ---C1name ...
0
votes
0answers
21 views

(Python) Get most frequent List out of a nested List filled with Strings

i'm trying to get the 5 most frequent lists out of a nested list in the form of: [['16.37.123.153','119.222.456.130','38673','161','17','62','4646'] ['16.37.456.153','119.222.123.112','56388','161','...
0
votes
0answers
25 views

Elasticsearch how to query nested range

Having some data in my ES (6.4) like: "hits": { "total": 1, "max_score": 1, "hits": [ { "_index": "tracking", "_type": "activity", "_id": "u9hzd2YB_M8C5mR3Zhkn", "_score": 1, "...
2
votes
0answers
30 views

Nested Drag and Drop with react-beautiful-dnd

I'm creating vertical nested drag and drop with react-beautiful-dnd. I have referred some answers in github I have forked from sandbox and created new one for vertical nested drag and drop. When I ...