hierarchy

Getting a call hierarchy in java

那年仲夏 提交于 2019-12-04 06:26:46
I am having real trouble tracking down a bug and it would help be a lot to know which method called a certain method. Is there an easy way to get a call hierarchy from java? Java is a small part of the app so I cannot compile and run the whole app in eclipse/net beans so I don't have access to an IDE debugger's call hierarchy. Thread.currentThread().getStackTrace(); or Exception ex = new Exception(); ex.printStackTrace(); It's fairly slow, but fine for debugging purposes. API docs here . Java is a small part of the app so I cannot compile and run the whole app in eclipse/net beans so I don't

Returning the parent/ child relationship on a self-joining table

一笑奈何 提交于 2019-12-04 05:29:07
问题 I need to be able to return a list of all children given a parent Id at all levels using SQL. The table looks something like this: ID ParentId Name --------------------------------------- 1 null Root 2 1 Child of Root 3 2 Child of Child of Root Give an Id of '1', how would I return the entire list...? There is no limitation on the depth of the nesting either... Thanks, Kieron 回答1: To get all children for a given @ParentId stored in that manner you could use a recursive CTE. declare @ParentId

Active Directory: Convert canonicalName node value from string to integer

断了今生、忘了曾经 提交于 2019-12-04 04:28:55
问题 Are there any methods available to convert the string text value contained within the AD canonicalName attribute to an incremented integer value? Or, does this need to be performed manually? For example: canonicalName (what I am getting) hierarchyNode (what I need) \domain.com\ /1/ \domain.com\Corporate /1/1/ \domain.com\Corporate\Hr /1/1/1/ \domain.com\Corporate\Accounting /1/1/2/ \domain.com\Users\ /1/2/ \domain.com\Users\Sales /1/2/1/ \domain.com\Users\Whatever /1/2/2/ \domain.com\Security

Question about SQL Server HierarchyID depth-first performance

让人想犯罪 __ 提交于 2019-12-04 03:59:11
I am trying to implement hierarchyID in a table (dbo.[Message]) containing roughly 50,000 rows (will grow substantially in the future). However it takes 30-40 seconds to retrieve about 25 results. The root node is a filler in order to provide uniqueness, therefor every subsequent row is a child of that dummy row. I need to be able to traverse the table depth-first and have made the hierarchyID column (dbo.[Message].MessageID) the clustering primary key, have also added a computed smallint (dbo.[Message].Hierarchy) which stores the level of the node. Usage: A .Net application passes through a

Type Hierarchy in Agda

[亡魂溺海] 提交于 2019-12-04 03:08:19
I am trying to figure out how type hierarchies work in Agda. Assuming I define a set type X: X : Set and then proceed to constructing an inductive type data Y : X -> Set where What is the type of X -> Set ? Is it Set or Type? Thank you! Well, why not ask Agda itself? I'm going to use excellent Agda mode for Emacs. We start with: module Hierarchy where postulate X : Set data Y : X → Set where -- empty We have to load the file using C-c C-l ; this typechecks the file, turns ? s into holes, does syntax highlighting and so on. Now, there is a command "Infer (deduce) type" available via C-c C-d ,

Use d3 log scale instead of linear scale

£可爱£侵袭症+ 提交于 2019-12-04 02:26:39
I'm trying to do a chart based on http://mbostock.github.com/d3/talk/20111116/bar-hierarchy.html , the only difference being that I'd like to use a log scale for the x-axis. Here's my fiddle: http://jsfiddle.net/JhDVC/5/ As you can see, the x-axis is defined at line 4: x = d3.scale.linear().range([0, w]), If I change it for x = d3.scale.log().range([0, w]), Then it doesn't work (nothing is rendered), throwing these error messages: Error: Invalid value for <rect> attribute width="NaN" Changing the domain setting from x.domain([0, root.value]).nice(); to x.domain([1, root.value]).nice(); shows

Inno Setup - Show children component as sibling and show check instead of square in checkbox

我是研究僧i 提交于 2019-12-04 02:19:38
问题 I'm trying to have a children component to be shown as sibling. I'm making a installer for a Game which can have multiple versions of the game coexisting in the same installation folder. Now I want to have the ability to install optional mods which require to have a specific version of the game installed (dependency). So when the user clicks on a mod, the required game gets selected, and if the game is deselected, all the mods get deselected. The code as is is working as expected and behaves

How to store and then retreive parent-child dependency data (Maya MEL/Python script)

拈花ヽ惹草 提交于 2019-12-04 02:00:35
问题 I have a hierarchy that I need to: break apart doSomething() put it back together the same way it was before. I know how to break things for sure, and have plan about what I need to do when they are flat in hierarchy. The problem is how do I parent them back? Details This is related to my previous question: Freeze scale transform on a parent object with animated child (MAYA MEL/Python script) I need to freeze scale transforms on all nodes in a hierarchy. Problem is that nodes have translate

how to get the hierarchical menu from mysql

爱⌒轻易说出口 提交于 2019-12-03 20:41:37
I have a table having hierarchical menus like "id" "parent_id" "name" 1 0 menu 2 1 item1 3 2 item1_1 4 1 item2 5 4 item2_1 ... ... and I have 100s of menu items here. In order to get all items in an array I have to write a recursive function like this getmenu function(parent_id = 1) { $items = mysql_query("SELECT id FROM table WHERE parent_id = " + parent_id); while ($item = msyql_Fetch_assoc($items)) { ...here I put them in array and call recursive function again to get sub items... getmenu($item['id']); } } but this executes 100s of queries. Is this the best way to do this, to get

Traverse hierarchy object c#

跟風遠走 提交于 2019-12-03 17:41:39
If I have a Class like below. How do i traverse through it until its property SomeObjects.count = 0 public class SomeObject { public String Name { get; set; } public List<SomeObject> SomeObjects { get; set; } } Many Thanks Here is a generic example of how you can traverse a composite object: public static class TraversalHelper{ public static void TraverseAndExecute<T>(this T composite, Func<T,IEnumerable<T>> selectChildren, Action<T> action) where T: class { action.Invoke(composite); composite.TraverseAndExecute(selectChildren, action, new List<T>{ composite }); } private static void