hierarchy

Self-referencing hierarchy in GridView

Hi, I recently read that self-referencing hierarchy is now supported by Telerik's radGridView. Unfortunately, I have been unable to locate any demos, tutorials, or sample code to look at. Is this information available? Here is my current code that I'm working with: private void SetupElementsGrid(){ radGvElements.Columns.Clear(); rad...

Infinitely Deep Recursive Children

I have a single-table with the following (relative) structure: foo_id, parent_foo_id, foo_name I would like to build an (effectively) infinite-depth recursive array with these entities, and consequently output them into a tree menu. Nodes with no "parent_foo_id" would be considered at the top of the heirerchy, while all successive n...

I need to implement C# deep copy constructors with inheritance. What patterns are there to choose from?

I wish to implement a deepcopy of my classes hierarchy in C# public Class ParentObj : ICloneable { protected int myA; public virtual Object Clone () { ParentObj newObj = new ParentObj(); newObj.myA = theObj.MyA; return newObj; } } public Class ChildObj : ParentObj { ...

Does ruby provide a method to show the hierarchy calls?

That's all, i want to see what are the clases that inherits a fixed class. There is a method for this in RUBY? Aptana offers an option that shows this, but is there any method? Thanks ...

Locking hierarchy of objects in .NET

I have a class that represents the "state of the world". The class has many collections of many other objects which in turn have references to more objects and collections of objects, sometimes even references to their ancestors in the "world hierarchy". To simplify what's being said, here is an example (transformed into XML, details omi...

MySQL Nested Sets - How to find parent of node?

I have your run of the mill nested set hierarchy type setup with the following columns: table name: myset columns: id, name, lft, rgt Does anyone know a query to determine the parent of a node? I read a couple places that it's handy to also have a *parent_id* column in your table to keep track of this, but it seems redundant and ...

Walking a tree, parent first

What is the best way to visit all the nodes of a linked tree (all nodes have references to parent and all children, root nodes have null as parent), so that no node is visited before any of its ancestors? Brownie points for non-recursive. ...

Storing Directory Hierarchy in a Key-Value Data store?

What is a clean/efficient method for storing the directory Hierarchy/tree in a Key-Value database (in my case MongoDB but any of them). For example a tree structure - Cars + Audi + BMW - M5 + Ford - Color + Red - Apple - Cherry + Purple - Funny The method I am using now, each object links to it's p...

reparenting hierarchyid values

If I have the following rows set up in a SQL Server 2008 table: Row Hierarchy 1 1/ 2 2/ 3 1/1 4 1/2 5 2/1 6 2/2 7 2/1/1 Currently row 5 is parented to row 2. I want to reparent row 5 to row 1, so it would now become 1/3 instead of 2/1. That much I have working so ...

SQL Server: How to get all child records given a parent id in a self referencing table

Hi I have a which references itself and I need to be able to select the parent and all it's child records from a given parent Id. My table is as follows: ID | ParentID | Name ----------------------- 1 NULL A 2 1 B-1 3 1 B-2 4 2 C-1 5 2 C-2 So ...

create hierarchy in non parent child dimensions

I am creating a user hierarchy for product dimension with AdventureWorksDW in a cube. I have added Product Key, ProductCategory Key and Product Subcategory Key attributes. But, its always giving me a warning "create hierarchy in non parent child dimensions" as a tooltip as I hover my mouse pointer over the Dim Product in Attributes windo...

Organizational chart represented in a table

HI, I have an Access application, in which I have an employee table. The employees are part of several different levels in the organization. The orgranization has 1 GM, 5 department heads, and under each department head are several supervisors, and under those supervisors are the workers. Depending on the position of the employee, the...

OLAP: Many-to-many relationship between products and parent-child hierarchy of categories

Hello. I need a help with creating OLAP cube which allows to analyse many-to-many relationship between products and parent-child hierarchy of categories. I have next relational structure: table "Products": "ProductID", "Name" table "Categories": "CategoryID", "Name", "ParentID" (where "ParentID" has FK reference to "CategoryID") table...

Storing files on the filesystem

I have an application that stores images in a database. Now I have learned that this isn't the best way to do this because of performance. I've started extracting all the "blobs" out of the database and added them (through a virtual folder) into the data folder the problem is that I allready have 8000 blobs stored and if I put them in ...

Oracle Hierarchical Query

Using Oracle 10g. I have two tables: User Parent ------------- 1 (null) 2 1 3 1 4 3 Permission User_ID ------------------- A 1 B 3 The values in the permissions table get inherited down to the children. I would like to write a single query that could return me something like this: User P...

Inserting a Hierarchy with Subsonic 3

I have used the Subsonic3 Linq T4 templates to generate data access code for my database. The one table I have so far represents a class very much like the following. public class NavigationItem { int ID {get;set;} // Auto generated field in database int ParentId {get;set;} // equal to ID if this is a top level navigation string ...

How to build an hierarchy?

I want to analyze a piece of document and build an ontology from it. There could be many characteristics of this document, and it could be a hierarchy. What is the best programming method to build this hierarchy with unlimited height? A tree? I am looking for a broad "way" of programming, not necessary code. ...

iPhone - calling a method in parent view controller

Hi, have hunted around for an answer to this one, but can't seem to find a definitive solution - hoping someone can help here! I'm building a multiview app for the iPhone. I've created a UIViewController called "MainViewController", which loads in other views as required. There's quite a lot of navigation between screens, so what I'd ...

Maintaining xml hierarchy (ie parent-child) information in objects generated by XmlSerializer

Hello all, for some time now I have been trying to solve the following problem and I'm starting to run out of ideas: I have generated a set of C# classes from an xsd schema using the xsd.exe tool and deserializing xml files works fine. The problem is that apart from the convenience and safety of using the auto generated classes, I also...

Python QtreeWidget: return tree hierarchy

Hi Everybody, I got stuck in trying to obtain the hierarchical view of a widget tree. The code works fine and generates a nice tree like that: ROOT(Animal): | | |___Not extinct: . | (red) . |_____BIRD--------------(blue) . | (green) | | ...