Questions tagged [hierarchical-trees]
44 questions
8
votes
5 answers
Converting tree list to hierarchy dict
I have a list of elements with attrs: parent, level, is_leaf_node, is_root_node, is_child_node.
I want to convert this list to hierarchy dict.
Example of output dict:
{
'Technology':
{
'Gadgets':{},
…

Alexandr
- 381
- 1
- 5
- 13
7
votes
1 answer
I Want to draw a hierarchial tree in a browser
I want to draw a hierarchial tree in a browser. I have used CSS and HTML and Javascript to play with some basic UI stuff in Browser. But I want to draw cool nodes and awesome connectors and come up with an aesthetic hierarchial tree (not Windows…

Sridhar Visvanath
- 71
- 3
5
votes
2 answers
Recommendations with hierarchical data on non-relational databases?
I'm developing an web application that uses a non-relational database as a backend (django-nonrel + AppEngine).
I need to store some hierarchical data (projects/subproject_1/subproject_N/tasks), and I'm wondering which pattern should I use. For now…

Lucian
- 3,981
- 5
- 30
- 34
4
votes
2 answers
Creating a tree data structure (Has to be native) in Perl to represent a call tree that is located in a external file
Here is an example of the file.
powrup.asm POWER_UP
......EXTERNAL_RAM_ADDRESSING_CHECK powrup.asm:461
......EXRAM powrup.asm:490
......INRAM powrup.asm:540
…

Paul
- 198
- 1
- 9
- 22
4
votes
1 answer
Reddit's commenting system (hierarchial)
For those of you who have looked at Reddit's source code, where exactly is the logic where it manages the comments hierarchial structure?
I downloaded the code, but couldn't even find the database structure let alone where the reads and writes are…
AnonymousCow
3
votes
3 answers
Need an Oracle hierarchical query that returns only full trees for records where children match a search string
Here's the full example data set for this query without any pruning of trees where no node matches the search string:
Level parent id text
---------------------------------------------
0 0 1 toplevel
1 1 2 …

bchesley
- 151
- 1
- 3
- 8
3
votes
1 answer
How to maintain several translations of a documentation set written with Sphinx?
I am starting a personal project and I'd like to provide documentation for my French speaking fellows as well as for the English speaking others.
So how should I organize my directories?
What to separate (I guess sources, some conf items like…

Gra
- 1,542
- 14
- 28
3
votes
1 answer
Best way to retrieve hierarchical data from database
I have to store blog style comments in a database. Each comment can have a parent one.
I am doing it with a column called "parentComment" that has a null value when it is a top level comment or have a value if it is a response to another…

Santiago Corredoira
- 47,267
- 10
- 52
- 56
3
votes
1 answer
JQuery, Hierarchical Table pagination
Hierarchical Table and table pagination is asked several times. But I am looking for both of them together. Am already using JQuery in my application so plugin using same will be useful, but I am open for any suggestion. At present I managed to…

BigBoss
- 413
- 8
- 23
3
votes
2 answers
Ruby on Rails: Routing for a tree hierarchy of places
So we've got a legacy system that tracks places with IDs like "Europe/France/Paris", and I'm building a Rails facade to turn this into URLs like http:// foobar/places/Europe/France/Paris. This requirement is not negotiable, the number of possible…

lambshaanxy
- 22,552
- 10
- 68
- 92
3
votes
1 answer
How to get parent id(root parent) from child id
Possible Duplicate:
function returning only once, why?
my Database structure looks like
id|parent|
1 | 0 |
2 | 0 |
3 | 0 |
4 | 1 |
5 | 4 |
6 | 5 |
I am in need of a function that gets parent(i.e parent=0) for a id as…

Bikal Basnet
- 1,639
- 1
- 21
- 31
3
votes
2 answers
How do you create a multi-dimensional array from hierarchically stored SQL data using the adjacency list method?
Hierarchical Data from SQL
Adjacency List Model
In my model I have a series of objects, each stored with their parent id. I am using the Adjacency list model as my hierarchy method.
All examples of Adjacency list simply output there and then. None…

Jon Winstanley
- 23,010
- 22
- 73
- 116
3
votes
2 answers
PostgreSQL Hierarchical, category tree
ENV : postgresql-8.4
I'm trying to build a category tree . Basically I'm expecting a final output such :
categoryName
categoryPath
leafcategory
e.g. :
Digital Camera
Electronics ::: Digital Camera
true
The table structure is
CREATE TABLE…

themihai
- 7,903
- 11
- 39
- 61
2
votes
0 answers
Find nested hierarchies using boolean matrix
I have a created a Node Builder to fetch how n elements are connected to one another. It is a parent child hierarchy represented in Node Tree.
I am using tree builder like below code to find best two chains.
Below is the code:
public class…

AntCatcher
- 21
- 2
2
votes
3 answers
Doctrine nestedset delete
I have some models witch are using Doctrine nestedset feature.
I want to add delete functionaly of elements from tree since that is required in my application. I was trying with snippets from documentation but I am getting a very strange error with…

Splendid
- 1,317
- 4
- 20
- 41