Questions tagged [nested]

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

This tag relates to any of various nested entities in programming, including but not limited to:

  • Nested data structures
  • Nested queries
  • Nested calls to a procedure, subroutine, method or operation

For example, nesting queries in SQL means to create a subquery. Its result is used in the query itself and provides a query order and subsets.


Related tags :

16389 questions
3
votes
2 answers

Removing columns in a nested struct in a spark dataframe using PySpark (details in text)

I know that I've asked a similar question here but that was for row filtering. This time I am trying to drop columns instead. I tried to implement Higher Order Functions such as FILTER and others for a while but could not get it to work. I think…
3
votes
2 answers

Looking for an apply, tidyr or dplyr solution to a nested for loop situation in R

Weirdly for this one, I think its easier to start by viewing the df. #reproducible data quantiles<-c("50","90") var=c("w","d") df=data.frame(a=runif(20,0.01,.5),b=runif(20,0.02,.5),c=runif(20,0.03,.5),e=runif(20,0.04,.5), …
LauraR
  • 181
  • 1
  • 2
  • 12
3
votes
3 answers

Java 8 - triple nested for loops

I have written the below code in Java and trying to convert the same to Java 8. The code works as expected for the input (a List created by createTempList method) and output(a map whose key is the 1st decimal of the string and value is the other…
Tiya
  • 553
  • 8
  • 26
3
votes
3 answers

Combining multiple dictionaries into a nested dictionary (Python)

Say I have two dictionaries: animal = { "CA": "Grizzly Bear", "ID": "Appaloosa", "NY": 'Beaver' } flower = { "CA": "tulip", "ID": "syringa", "NY": 'rose' } How can I combine these two dictionaries into a nested dictionary with the…
jhwaffles
  • 31
  • 3
3
votes
5 answers

Get key value from nested dict python

I have class with a nested dictionary data object. I need to get all the key values from it. What's the best efficient way to do this? I'm stuck with following: for k,v in data.items(): print v.keys() This is the data: data = { "BANK": { …
sg_sg94
  • 2,248
  • 4
  • 28
  • 56
3
votes
3 answers

Conditional Subsetting of a Nested List

I have a nested list where ach sub list has two lists. A simplified output of this list is below: nested.list <- list(`1` = structure(list(lengths = c(325L, 18L, 1L, 7L, 1L, 10L, 1L, 35L, 1L, 1L, 152L, 1L, 1L, 37L, 1L, 33L, 1L, 15L, 2L, 1L, 47L,…
MCG
  • 35
  • 4
3
votes
2 answers

Can we nest two OptionMenu widgets in tkinter?

Just like the famous example of having Continent names in one dropdown and display country names related to selected Continent. How to achieve this using Tkinter? I have Continent list in first dropdown and list of all countries related to…
shubhasreepv
  • 51
  • 1
  • 6
3
votes
1 answer

Nested query using while condition - sql

I need to do a nested query on a single table. Each row is potentially the parent or child of another row. Is it possible to do this with a single select statement? Ive started using this statement but it only goes down one level. select * from…
cdugga
  • 3,849
  • 17
  • 81
  • 127
3
votes
2 answers

Reverse lookup a nested dictionary

Dictionary...> nestedDictionary; Above Dictionary has a one-to-many relationship at each level from top to bottom. Adding an item is pretty easy since we have the leaf object and we start from bottom, creating…
Xaqron
  • 29,931
  • 42
  • 140
  • 205
3
votes
2 answers

Using a designated initializer to initialize nested struct with a `char []` member

I have the following nested struct definition: typedef struct { int count; float cash; char item[50];//switch between array and pointer for testing initializers //char *item; }Purchase; typedef struct { int accnt; char…
ryyker
  • 22,849
  • 3
  • 43
  • 87
3
votes
2 answers

How do I retrieve values from a nested Oracle procedure?

I have kind of a tricky Oracle problem. I am trying to select one set of data, we'll call items. For each item I want to call another procedure and return an Inventory Item. I have two operations I am not sure on how to perform. How do I retrieve…
user526892
3
votes
1 answer

Generate getters returning value of nested object

How can I replace the getters in the following example using Lombok? import lombok.Builder; public class MyClass { private MyBasicDataClass basicData = MyBasicDataClass.builder().myInt(10).myBool(true).build(); public Integer getMyInt() { …
Wiebke
  • 1,006
  • 8
  • 13
3
votes
2 answers

How to modify a list value in a nested custom datatype?

Say I've made a new data type as follows: data Typex = Typex { level :: Int, coordinate :: (Int, Int), connections :: [(Int,(Int,Int),Double)] -- edited to be a tuple } deriving Show I want to modify the connections from an…
LHurttila
  • 37
  • 6
3
votes
1 answer

Laravel 6.x - Cannot update form in Controller method(Nested-Child)

Im new in Laravel. Currently im facing a problem where I am stuck in the middle of updating details from all child but was fine in updating parent's details. So here i'll show one of the child which is Staff(Process as Parent) 1) StaffController.php…
3
votes
1 answer

ElasticSearch 2.4 - Query String OR between main type and nested

I'm using ElasticSearch 2.4 I need to create a search query between main object and nested object, if I use the AND condition it works correctly, but the problem is if I try to use OR conditional between main object and nested object: Please review…
1 2 3
99
100