hierarchy

SQL Server to show a data tree in a specific format

谁说胖子不能爱 提交于 2019-12-01 13:00:51
We have a table like this (simplified version): Items: Itemid Itemname Itemfatherid itemA theitemA null itemB theitemB null itemC theitemC itemA itemD theitemD itemA itemE theitemE itemC itemF theitemF itemE itemG theitemG itemD We need a sql query that gives the following result/format: (Corrected version) Col1 Col2 Col3 Col4 itemA itemC itemE itemF itemA itemD itemG NULL itemB NULL NULL NULL Our ERP would take this resul and convert it to a tree control like this: -itemA -itemC -itemE itemF -itemD itemG itemB The level of the tree is not fixed so the number of columns must be dynamic...

SQL Server to show a data tree in a specific format

时光毁灭记忆、已成空白 提交于 2019-12-01 11:21:38
问题 We have a table like this (simplified version): Items: Itemid Itemname Itemfatherid itemA theitemA null itemB theitemB null itemC theitemC itemA itemD theitemD itemA itemE theitemE itemC itemF theitemF itemE itemG theitemG itemD We need a sql query that gives the following result/format: (Corrected version) Col1 Col2 Col3 Col4 itemA itemC itemE itemF itemA itemD itemG NULL itemB NULL NULL NULL Our ERP would take this resul and convert it to a tree control like this: -itemA -itemC -itemE itemF

Labels on bilevel D3 partition / sunburst layout

最后都变了- 提交于 2019-12-01 11:18:32
问题 I am trying to add labels to the bilevel sunburst / partition shown here - http://bl.ocks.org/mbostock/5944371: I have added labels to the first 2 levels and rotated them correctly. But I cant now add the new level's labels during a transition. To get started I have put ... text = text.data(partition.nodes(root).slice(1), function(d) { return d.key; }); straight after the ... path = path.data(partition.nodes(root).slice(1), function(d) { return d.key; }); line but it throws the following

Unity save everything (snapshot)

社会主义新天地 提交于 2019-12-01 08:20:35
I'm trying to save everything whilst running my program. I want to save every Gameobject with their scripts and variables. I know that it's possible to serialize everything and save it to an XML (and other ways/formats like JSON). This would require alot of work and time. The program may change alot in the future so the upkeep of maintaining this approach would be very time consuming. so I would prefer to use a different approach. In unity it's possible to save and load a scene and I was hoping if someone knows something similair. I know it's possible to save Scenes during runtime like this

Unity save everything (snapshot)

做~自己de王妃 提交于 2019-12-01 06:25:35
问题 I'm trying to save everything whilst running my program. I want to save every Gameobject with their scripts and variables. I know that it's possible to serialize everything and save it to an XML (and other ways/formats like JSON). This would require alot of work and time. The program may change alot in the future so the upkeep of maintaining this approach would be very time consuming. so I would prefer to use a different approach. In unity it's possible to save and load a scene and I was

Spring Security 3.1.4 taglib authorize/authentication are not working with role hierarchy in JSF 2.2 on Tomcat 7

最后都变了- 提交于 2019-12-01 06:09:30
问题 The roleHeirarchies are taken into account for Web Security Expressions defined as intercept URLs via the http namespace but not in expressions using the JSP Authorize taglib. I read a lot of stuffs already... ref1 ref2 ref3 ref4 ref5 ref6 ****EDIT:**** Ref1 and Ref6 mention stuffs about a problem with filters order and security context not available in jsp...(by the way,i'm using jsf2) maybe there is something to dig ... EDIT 2: Is JSF handling security tag lib ? I read this and try that

Collapse/expand child nodes of tree in d3.js?

早过忘川 提交于 2019-12-01 04:35:49
I'm building a tree structure (or rather modifying one of the examples with a set of my own data in my own json) and I'm trying to create some functionality: My tree's layout is that from the tree example: http://mbostock.github.com/d3/ex/cluster.html I am adding (to the circles) an onclick event which I would like to collapse the children of the clicked node. That is to say, when a user clicks the steelblue circle associated with a node, I want that nodes children to disappear. I've scoured the documentation and I haven't turned up anything which would allow me to make nodes collapse or

Collapse/expand child nodes of tree in d3.js?

*爱你&永不变心* 提交于 2019-12-01 02:32:18
问题 I'm building a tree structure (or rather modifying one of the examples with a set of my own data in my own json) and I'm trying to create some functionality: My tree's layout is that from the tree example: http://mbostock.github.com/d3/ex/cluster.html I am adding (to the circles) an onclick event which I would like to collapse the children of the clicked node. That is to say, when a user clicks the steelblue circle associated with a node, I want that nodes children to disappear. I've scoured

SQL Server get parent list

我只是一个虾纸丫 提交于 2019-12-01 00:35:07
I have a table like this: id name parent_id 1 ab1 3 2 ab2 5 3 ab3 2 4 ab4 null 5 ab5 null 6 ab6 null I need to do a query with input id = 1 (for an example) and results will be like this: id name parent_id 5 ab5 null 2 ab2 5 3 ab3 2 1 ab1 3 (List all parents at all level start at item id = 1) Something like this perhaps? WITH parents(id,name,parent,level) AS ( SELECT ID, NAME, PARENT, 0 as level FROM TABLE WHERE ID = 1 UNION ALL SELECT ID, NAME, PARENT, Level + 1 FROM TABLE WHERE id = (SELECT TOP 1 parent FROM parents order by level desc) ) SELECT * FROM parents Use WITH RECURSIVE .

Python: Combinations of parent-child hierarchy

北慕城南 提交于 2019-11-30 18:30:45
问题 For a child-parent relationship table (csv), I am trying to gather possible parent to child relationship combination chains using all data in the table. I am trying against a problem where if multiple sub-parents exist (see rows 3 & 4), the second sub-parent combination (row 4) is not included in the iteration. Data Example: child,parent A,B A,C B,D B,C C,D Expected chain results: D|B|A D|C|B|A D|C|A Actual chain results: D|B|A D|C|A Code find= 'A' #The child for which the code should find