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
1 answer

Can you do nested parallelization using multiprocessing in Python?

I am new to multiprocessing in Python and I am trying to do the following: import os from multiprocessing import Pool from random import randint def example_function(a): new_numbers = [randint(1, a) for i in range(0, 50)] with…
3
votes
2 answers

extract the same column from all matrices in a nested list

There are many entries on this problem but none has solved mine. I need to extract the first column of all the matrices in a nested list. dput(dlist4) list(A = list(a = structure(1:4, dim = c(2L, 2L)), b = structure(2:5, dim = c(2L, 2L))), G =…
hnguyen
  • 772
  • 6
  • 17
3
votes
1 answer

How can I emit from a nested component to higher parent?

I have a custom event to close a modal window and it works perfectly as long as the component is a direct child of the parent. But when I want to call the event from a deeper nested component it doesn’t work. Here is my parent component:
NicOwen
  • 171
  • 1
  • 3
  • 8
3
votes
2 answers

Simple recursive function to find parent object in nested data not finding parents?

I have a nested data structure, and I want to create a recursive function that, given an object's name parameter, will return the parent object's name paramter. There are several related questions, however, the answers don't explain why my function…
NicoWheat
  • 2,157
  • 2
  • 26
  • 34
3
votes
2 answers

Generalized function to merge a variable number of nested dictionaries

I want to make a generalized function to merge n nested dictionaries in python. I have created a function to merge three dictionaries, but I want to generalize it for n nested dictionaries. The function that I have created is: def mergedicts(dict1,…
Noorulain Islam
  • 343
  • 2
  • 9
3
votes
1 answer

How to structure a pandas dataframe for plotting nested pie/donut charts?

This is similar but it is dated and the code doesn't work with the current version of Pandas: Hierarchic pie/donut chart from Pandas DataFrame using bokeh or matplotlib Here's a common example of what I'm trying to achieve; though it doesn't have to…
O.rka
  • 29,847
  • 68
  • 194
  • 309
3
votes
1 answer

Nested Attributes in Delphi

Is there a way to use nested attributes in Delphi? At the moment I'm using Delphi XE. For example: TCompoundAttribute = class (TCustomAttribute) public constructor Create (A1, A2 : TCustomAttribute) end; And the usage would be […
Christian Metzler
  • 2,971
  • 5
  • 24
  • 30
3
votes
4 answers

Too much nesting in ruby?

Surely there must be a better way of doing this: File.open('Data/Networks/to_process.txt', 'w') do |out| Dir['Data/Networks/*'].each do |f| if File.directory?(f) File.open("#{f}/list.txt").each do |line| out.puts File.basename(f)…
Steve C
  • 33
  • 1
  • 2
3
votes
2 answers

Openmp nested loop

just playing around with openmp. Look at this code fragments: #pragma omp parallel { for( i =0;i
Biler
  • 41
  • 1
  • 1
  • 6
3
votes
1 answer

Using nested data with D3.js

I am trying to display a beautiful line graph using D3. The problem I have is with the format of the data. I have the following data (as an example): var data = [ { label: "name", data: [[14444123, 0.012321312], …
TheThing
  • 160
  • 1
  • 11
3
votes
3 answers

Aggregate over similar columns from different lists in a nested list object

I have a list of many iterations of simulated data. Each iteration is in its own data.frame, and saved in a named list. I need to aggregate, for example, the first column of each data.frame in each list, and the second column of each, and the third,…
Adam
  • 33
  • 5
3
votes
1 answer

Explode multiple columns from nested JSON but it is giving extra records

I have a JSON document like below: { "Data": [{ "Code": "ABC", "ID": 123456, "Type": "Yes", "Geo": "East" }, { "Code": "XYZ", "ID": 987654, "Type":…
3
votes
1 answer

Python 3.8+ Nested data objects type validation with dacite

I have a question regrading nested data objects. As suggested in other post (Creating nested dataclass objects in Python), we can use dacite package to create nested data objects. This works on handling the data that we nested dictionary…
Nathan
  • 43
  • 5
3
votes
2 answers

Nesting closure templates within another template

I'm sure there should be some way to render another template from within a template so I don't have to copy paste similar looking blocks. I'm just not able to figure it out.
IsmailS
  • 10,797
  • 21
  • 82
  • 134
3
votes
1 answer

Elements from collection get truncated when printing - Smalltalk

I am extremely new to Smalltalk, so please excuse me if I am implementing this solution incorrectly. I'm reading a table from a txt file that looks like this: 1 3 5 2 4 7 55 30 50 I am reading the file through an readStream as follows: inStream :=…
WKGuy
  • 79
  • 7