Search Results

Search found 4103 results on 165 pages for 'n ary tree'.

Page 15/165 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • sql statement to Expression tree

    - by Joo Park
    I'm wondering how one would translate a sql string to an expression tree. Currently, in Linq to SQL, the expression tree is translated to a sql statement. How does on go the other way? How would you translate select * from books where bookname like '%The%' and year > 2008 into an expression tree in c#?

    Read the article

  • Any tips of how to handle hierarchical trees in relational model?

    - by George
    Hello all. I have a tree structure that can be n-levels deep, without restriction. That means that each node can have another n nodes. What is the best way to retrieve a tree like that without issuing thousands of queries to the database? I looked at a few other models, like flat table model, Preorder Tree Traversal Algorithm, and so. Do you guys have any tips or suggestions of how to implement a efficient tree model? My objective in the real end is to have one or two queries that would spit the whole tree for me. With enough processing i can display the tree in dot net, but that would be in client machine, so, not much of a big deal. Thanks for the attention

    Read the article

  • Eclipse RCP Preferences Dialog Tree Size

    - by nerduban
    In my RCP application, I'm trying to use the Eclipse preferences dialog. I'm adding extensions to the "org.eclipse.ui.preferencePages" and preparing related IWorkbenchPreferencePage implementations. My preference page names are a bit long, so that they are not totally visible on the left side tree of the preferences dialog. Dragging the sash bar to the right increases the width of this tree, but it is resetted after the program is closed and reopened. Is it possible to increase the default width of this tree?

    Read the article

  • Hierarchy inheritance

    - by reito
    I had faced the problem. In my C++ hierarchy tree I have two branches for entities of difference nature, but same behavior - same interface. I created such hierarchy trees (first in image below). And now I want to work with Item or Base classes independetly of their nature (first or second). Then I create one abstract branch for this use. My mind build (second in image below). But it not working. Working scheme seems (third in image below). It's bad logic, I think... Do anybody have some ideas about such hierarchy inheritance? How make it more logical? More simple for understanding? Image Sorry for my english - russian internet didn't help:) Update: You ask me to be more explicit, and I will be. In my project (plugins for Adobe Framemaker) I need to work with dialogs and GUI controls. In some places I working with WinAPI controls, and some other places with FDK (internal Framemaker) controls, but I want to work throw same interface. I can't use one base class and inherite others from it, because all needed controls - is a hierarchy tree (not one class). So I have one hierarchy tree for WinAPI controls, one for FDK and one abstract tree to use anyone control. For example, there is an Edit control (WinEdit and FdkEdit realization), a Button control (WinButton and FdkButton realization) and base entity - Control (WinControl and FdkControl realization). For now I can link my classes in realization trees (Win and Fdk) with inheritence between each of them (WinControl is base class for WinButton and WinEdit; FdkControl is base class for FdkButton and FdkEdit). And I can link to abstract classes (Control is base class for WinControl and FdkControl; Edit is base class for WinEdit and FdkEdit; Button is base class for WinButton and FdkButton). But I can't link my abstract tree - compiler swears. In fact I have two hierarchy trees, that I want to inherite from another one. Update: I have done this quest! :) I used the virtual inheritence and get such scheme (http://img12.imageshack.us/img12/7782/99614779.png). Abstract tree has only absolute abstract methods. All inheritence in abstract tree are virtual. Link from realization tree to abstract are virtual. On image shown only one realization tree for simplicity. Thanks for help!

    Read the article

  • Any tips of how to handle hierarchial trees in relational model?

    - by George
    Hello all. I have a tree structure that can be n-levels deep, without restriction. That means that each node can have another n nodes. What is the best way to retrieve a tree like that without issuing thousands of queries to the database? I looked at a few other models, like flat table model, Preorder Tree Traversal Algorithm, and so. Do you guys have any tips or suggestions of how to implement a efficient tree model? My objective in the real end is to have one or two queries that would spit the whole tree for me. With enough processing i can display the tree in dot net, but that would be in client machine, so, not much of a big deal. Thanks for the attention

    Read the article

  • [Ext.tree.TreePanel] getNodeById does not work

    - by Moon
    Hi, I have a ext treepanel with json. var tree = new Ext.tree.TreePanel({ renderTo:'tree-container', title: 'Category', height: 300, width: 400, useArrows:true, autoScroll:true, animate:true, enableDD:true, containerScroll: true, rootVisible: false, frame: true, root: { text: 'Category', draggable: false, id: '0' }, // auto create TreeLoader dataUrl: $("#web").val() + "/category/index/get-nodes", listeners: { 'checkchange': function(node, checked){ if(checked){ categoryManager.add(node.id); //node.getUI().addClass('complete'); }else{ categoryManager.remove(node.id); // node.getUI().removeClass('complete'); } } } }); dataUrl loads the following json code [{"text":"Code Snippet","id":"1","cls":"folder","checked":false,"children":[{"text":"PHP","id":"3","cls":"file","checked":false,"children":[]},{"text":"Javascript","id":"4","cls":"file","checked":false,"children":[]}]}] when I try to find a node by console.log( tree.getNodeByid(3) ), it shows that it is undefined. Do I have a problem with my code?

    Read the article

  • Git: Find duplicate blobs (files) in this tree

    - by Readonly
    This is sort of a follow-up to this question. If there are multiple blobs with the same contents, they are only stored once in the git repository because their SHA-1's will be identical. How would one go about finding all duplicate files for a given tree? Would you have to walk the tree and look for duplicate hashes, or does git provide backlinks from each blob to all files in a tree that reference it?

    Read the article

  • A question on getting number of nodes in a Binary Tree

    - by Robert
    Dear all, I have written up two functions (pseudo code) for calculation the number of nodes and the tree height of a Binary Tree,given the root of the tree. Most importantly,the Binary Tree is represented as the First chiled/next sibling format. so struct TreeNode { Object element; TreeNode *firstChild; TreeNode *nextSibling; } Calculate the # of nodes: public int countNode(TreeNode root) { int count=0; while(root!=null) { root= root.firstChild; count++; } return count; } public int countHeight(TreeNode root) { int height=0; while(root!=null) { root= root.nextSibling; height++; } return height; } This is one of the problem I saw on an algorithm book,and my solution above seems to have some problems,also I didn't quite get the points of using this First Child/right sibling representation of Binary Tree,could you guys give me some idea and feedback,please? Cheers!

    Read the article

  • Haskell Binary Tree Function (map)

    - by Bizarro
    How can i define a Haskell function which will apply a function to every value in a binary tree? So i know that it is similar to the map function - and that its type would be: mapT :: (a - b) - Tree a - Tree b but thats about it...

    Read the article

  • Rails - how to serialize a tree not in a form

    - by tiny_clanger
    I started with the standard scriptaculous drag and drop tree, and that all works fine. Then started implementing this: http://www.artweb-design.de/2008/5/30/scriptaculous-sortabletree which gives a good drag and drop tree Where I am stuck is how to get serialize the tree (unordered list)? It's not in a form, and I can't find a way to serialize it to move onto setting up the AJAX update.

    Read the article

  • jquery ajaxSubmit jquery file tree

    Hi, I'm using a jquery file tree and I'd like to allow users to upload files to whatever directory they're currently in. I am having an issue binding the form within the tree, though, since the tree is loading dynamically and obviously can't bind a form that doesn't exist. Any ideas would be greatly appreciated!

    Read the article

  • GWT: Editing Text Of Tree Item

    - by kirtcathey
    Hi All. When a user clicks a 'Add Node' button above a tree and the program adds a tree item below the selected node, I would like to insert the new tree item with the text highlight and ready for editing by the user... like labels in GMail. Any ideas? --Kirt

    Read the article

  • Why are trees shining in background?

    - by Kinected
    Currently I am creating a forest scene in the dark, and the trees are shining far away, but when I get close they are fine. I have the shaders set to "Nature/Tree Soft Occlusion [bark/leaves]", but they are still rendering strange far away, but close they are fine. I tried placing the trees in a folder named "Ambient-Occlusion" like said here, but no luck. Also fog is turned off. Thanks in advance.

    Read the article

  • Using C# and gppg, how would I construct an abstract syntax tree?

    - by Rupert
    Is there a way to do this almost out-of-the-box? I could go and write a big method that would use the collected tokens to figure out which leaves should be put in which branches and in the end populate a TreeNode object, but since gppg already handled everything by using supplied regular expressions, I was wondering if there's an easier way? Even if not, any pointers as to how best to approach the problem of creating an AST would be appreciated. Apologies if I said anything silly, I'm only just beginning to play the compiler game. :)

    Read the article

  • How to set initial checked values of rich tree leaf node.

    - by Ajay99
    Hi, How to set the initial the leaf node values. -----------------------Stations.xml AAAAAAAAAAAA BBBBBBBBBBBB CCCCCCCCCC DDDDDDDDDDDD EEEEEEEEEEEEEE Hall Oates - Kiss On My List David Bowie - Let's Dance Lyn Collins - Think (About It) Kim Carnes - Bette Davis Eyes KC the Sunshine Band - Give It Up //inital check values --------------------Libray.java---------------- public class Library { private TreeNode treeData; private List menus=null; public Library()throws Exception { menus=new ArrayList(); //it's initial selection of the check box vardata.attributes.selection("---key1---); vardata.attributes.selection("---key2---); vardata.attributes.selection("---keyn---); yoursuggestedcode.attribute.selection("key"); //I need your suggestion code. FacesContext context = FacesContext.getCurrentInstance(); treeData = XmlTreeDataBuilder.build(new InputSource(getClass().getResourceAsStream("/Stations.xml"))); } public TreeNode getTreeData() { return treeData; } public void setTreeData(TreeNode treeData) { this.treeData = treeData; } public List getMenus() { return menus; } public void setMenus(List menus) { this.menus = menus; }

    Read the article

  • In GWT-EXT checkboxtree how to handle single selection of tree nodes?

    - by RAS
    hi, I'm working on checkBoxTree in GWT-EXT 2.0.3 with Java. My aim is to get a selectionModel which allows me to select(check) only one TreeNode at a time. If I select another TreeNode after selecting one then, the previous one should be unchecked. I've tried using DefaultSelectionModel with TreePanel, but either I've not used it properly or it's working only for selection of TreeNode not for checking a TreeNode. Can anyone help me in this? Thanks in advance.

    Read the article

  • Python - Is there a better/efficient way to find a node in tree?

    - by Sej P
    I have a node data structure defined as below and was not sure the find_matching_node method is pythonic or efficient. I am not well versed with generators but think there might be better solution using them. Any ideas? class HierarchyNode(): def __init__(self, nodeId): self.nodeId = nodeId self.children = {} # opted for dictionary to help reduce lookup time def addOrGetChild(self, childNode): return self.children.setdefault(childNode.nodeId,childNode) def find_matching_node(self, node): ''' look for the node in the immediate children of the current node. if not found recursively look for it in the children nodes until gone through all nodes ''' matching_node = self.children.get(node.nodeId) if matching_node: return matching_node else: for child in self.children.itervalues(): matching_node = child.find_matching_node(node) if matching_node: return matching_node return None

    Read the article

  • tic tac toe game ai as3

    - by David Jones
    I'm looking into creating a simple tic tac toe/noughts and crosses game in actionscript3 and am trying to understand the ideas behind the ai used in a game like this. I've seen some simplistic examples online but from what I've read a game tree or something like minimax is the best way to go about this. Can anyone help explain or reference any good examples of this? I've seen that there is a library called as3ds - data structures for game developers which has a number of classes that might help tie this together? Any info/examples or help is much appreciated

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >