hierarchical-trees

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 for the commenting. Is it doing updates on lots of comments if someone replies to someone...

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 comment. What is the most efficient way to retrieve a comment and all its childs? ...

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 language for generated navigation links...)? What not to separate (a maximum of configuration...

IHierarchicalDataSource, Hierarchy structure, ASP.NET

I am building a hierarchy structure from scratch and I am trying to determine the best route to take. I found the following link below from another StackOverflow question: Nested Set Model I like the idea of nested sets and have begun to build my database, based on this pattern. I am now unsure how to query the data out in such a w...

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':{}, 'Gaming':{}, 'Programming': { 'Python':{},...

How do you create a multi-dimensional array from hierachically stored SQL data using the adjacency list method?

Hierachical 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 hierachy method. All examples of Adjacency list simply output there and then. None try to create a multi dimensional array from the result set. --------------- | id | paren...

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 Explorer Folder tree). At this point the nodes in the tree will be like the flash-cards that...

Create Multi-Dimensional Array With Algorithm Using Data in Single-Dimensional Array

I have an single-dimensional array of PHP objects. Each object has two attributes, one attribute is the object's unique ID and the other is the unique ID of another object in the array that is its parent. For example: array(3) { [0]=> object(stdClass)#1 (2) { ["ID"]=> int(1) ["parentID"]=> int(0) } [1]=> object...

Flex Advanceddatagrid tree drag and drop such that they should maimtain hierarchy

Hi everyone, I have a situation where we have have to implement drag and drop in a AdvancedDataGrid to display the hierarchical data from a XML file. The trickiest part is that when I drag a leaf node (dragSource) and place it on the top of the branch node (dropTarget) the display should adjust the hierarchy so that the dragSource becom...

Creating hierarchy tree from dictionary of pages' contents

The following key:value pairs are 'page' and 'page contents'. { 'section-a.html':{'contents':'section-b.html section-c.html section-d.html'}, 'section-b.html':{'contents':'section-d.html section-e.html'}, 'section-c.html':{'contents':'product-a.html product-b.html product-c.html product-d.html'}, 'section-d.html':{'contents':'pr...

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 levels in unlimited, and we can't escape the slashes. Setting up routes.rb for http://foob...

Tree structure category sum that cascades to root node.

Hi All, I'm going to come right out and say that I am not the worlds greatest Mathematician :D So this problem may well be simple to most of you. Unfortunately it's confusing me and have had several stabs at a workable solutions. As with any tree, one can have many branches, many branches can have more branches and so forth until they ...

Doctrine nestedset delete

Hi there, 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 that code. YAML is here: http://pastie.org/820978 And I am trying with this c...

Structuring leafs in a hierarchical tree

This code fills a tree with values based on their depths. But when traversing the tree, I cannot manage to determine the actual number of children without iterating over the parent node. This is necessary because the subleafs are stored in in the node underneath the current one. Which conceptual changes are necessary to store the leafs d...

Build and render infinite hierarchical category tree from self-referential category table

I have a Categories table in which each category has a ParentId that can refer to any other category's CategoryId that I want to display as multi-level HTML list, like so: <ul class="tree"> <li>Parent Category <ul> <li>1st Child Category <!-- more sub-categories --> </li> <...

How to get an hierarchical php structure from a db table, in php array, or JSON

Possible Duplicate: Turn database result into array Hi guys, can you please help me. How to get an hierarchical php structure from a db table, in php array, or JSON, but with the following format: [{ "attributes" : {"id" : "111"}, "data" : "Some node title", "children" : [ { "attributes" : { "id" : "555"}, "data" : "A sub nod...

nHibernate: Query tree nodes where self or ancestor matches condition

I have see a lot of competing theories about hierarchical queries in fluent-nHibernate or even basic nHibernate and how they're a difficult beast. Does anyone have any knowledge of good resources on the subject. I find myself needing to do queries similar to: (using a file system analog) select folderObjects from folders where folder....

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 display Hierarchical data by using some jQuery plugin and added my own pagination method, but ...