Search Results

Search found 6103 results on 245 pages for 'logical tree'.

Page 6/245 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Spanning-Tree and redundant links

    - by Franko
    I have 2 switches which have redundancy between them, meaning fa0/1 on SW1 is connected to fa0/1 on SW2, and fa0/2 on SW1 is connected to fa0/2 on SW2. Both of the switches have the same BID, however the MAC address of SW1 is numerically lower, hence making it the root bridge. Now my question is, on SW2, what determines which of fa0/1 and fa0/2 becomes the RP (Root Port) and the other on blocking state?

    Read the article

  • UVA #10410 Tree Reconstruction

    - by Vincent
    I have worked on UVA 10410 Tree Reconstruction several days. But I can't get the correct answer unitl now. I have used an algorithm similar to the one which we always use to recovery a binary tree through the preorder traversal and the inorder traversal. But it can't work. Can anyone help me? Thanks in advance.

    Read the article

  • How to add a new node to a dijit.Tree

    - by Larry Bergman
    I want to add a new node to a dijit.ree as a sibling of the currently selected node. I've found sample code (I'm new to dojo) that adds a new item to the tree using the newItem method of ItemFileWriteStore, but the new item always appears at the bottom of the tree. How would I add to the store at a specified position, in particular the position corresponding to the current selection? Pointers to sample code would be welcome :) Thanks, Larry

    Read the article

  • Behavior Tree Implementations

    - by Hamza Yerlikaya
    I am looking for behavior tree implementations in any language, I would like to learn more about how they are implemented and used so can roll my own but I could only find one Owyl, unfortunately, it does not contain examples of how it is used. Any one know any other open source ones that I can browse through the code see some examples of how they are used etc? EDIT: Behavior tree is the name of the data structure.

    Read the article

  • drawing hierarchical tree with orthogonal lines

    - by user267530
    Hi I need to work on drawing a hierarchical tree structure with orthogonal lines(straight rectangular connecting lines) between root and children ( like the following: http://lab.kapit.fr/display/visualizationlayouts/Hierarchical+Tree+layout ). I want to know if there are any open source examples of the algorithm of drawing trees like that so that I can implement the same algorithm in actionscript. Thanks Palash

    Read the article

  • Setting dijit.Tree cookie for all pages

    - by peirix
    I'm using the same dijit.Tree view over several pages in our application, and I'd like to have the cookie saved for the server name, instead of the folder name. Right now I've got 3 pages and 3 cookies, which each hold their own information on the state of the Tree, which is kinda annoying. Any ways to accomplish this? The only thing I've found on cookies in the API, is that I can set the cookieName and turn cookies on/off.

    Read the article

  • C++ R - tree implementation wanted

    - by Kotti
    Hi, Does anyone know good and simple to use in production code R-tree (actually, any implementations - R*, R+ or PR-tree would be great)? It doesn't matter if it is a template or library implementation, but some implementations that google found look very disappointing... Thanks in advance.

    Read the article

  • Flex Tree leaf-element highlighting while drag&drop

    - by sani4xl
    Hi, i have TileList from which i'm dragging some stuff(image) to Tree (something like dragging sounds into playlist in iTunes), but when i can drop this stuff, i see only underline, this mean i can drop it only under or above some leaf-element in that Tree. How can i force it to hide this black underline and highlight leaf-element to which i wanna drop my stuff. Thanks

    Read the article

  • Tree data structure gems compared?

    - by huug
    I want to you use a tree structure for my navigation. I was thinking about using Ancestry, but then I found this article about 7 plugins for providing a tree structure to your models. What are the pros/cons for each plugin/gem and above all: which one do you recommend? Tnx!

    Read the article

  • Estimating the size of a tree

    - by Full Decent
    I'd like to estimate the number of leaves in a large tree structure for which I can't visit every node exhaustively. Is this algorithm appropriate? Does it have a name? Also, please pedant if I am using any terms improperly. sum_trials = 0 num_trials = 0 WHILE time_is_not_up bits = 0 ptr = tree.root WHILE count(ptr.children) > 0 bits += log2(count(ptr.children)) ptr = ptr.children[rand()%count(ptr.children)] sum_trials += bits num_trials++ estimated_tree_size = 2^(sum_trials/num_trials)

    Read the article

  • POV Christmas Tree Is a Holiday-Themed DIY Electronics Project

    - by Jason Fitzpatrick
    If you’re looking for an electronics project with a bit of holiday cheer, this clever POV Christmas tree combines LEDs, motors, and a simple vision hack to create a glowing Christmas tree. POV (or Persistence Of Vision) hacks rely on your visual circuit’s lag time. By taking advantage of that lag POV displays can create the illusion of shapes and words where there are none. In the case of this Christmas tree hack a spinning set of LED lights creates the illusion of a Christmas tree when, in reality, there is just a few LEDs suspended in space by wire. It’s not a beginner level project by any means but it is a great way to practice surface mounting electronics and polish up your PCB making skills. Hit up the link below for the full tutorial. POV Christmas Tree [Instructables] HTG Explains: Do You Really Need to Defrag Your PC? Use Amazon’s Barcode Scanner to Easily Buy Anything from Your Phone How To Migrate Windows 7 to a Solid State Drive

    Read the article

  • T-4 Templates for ASP.NET Web Form Databound Control Friendly Logical Layers

    - by joycsharp
    I just released an open source project at codeplex, which includes a set of T-4 templates to enable you to build logical layers (i.e. DAL/BLL) with just few clicks! The logical layers implemented here are  based on Entity Framework 4.0, ASP.NET Web Form Data Bound control friendly and fully unit testable. In this open source project you will get Entity Framework 4.0 based T-4 templates for following types of logical layers: Data Access Layer: Entity Framework 4.0 provides excellent ORM data access layer. It also includes support for T-4 templates, as built-in code generation strategy in Visual Studio 2010, where we can customize default structure of data access layer based on Entity Framework. default structure of data access layer has been enhanced to get support for mock testing in Entity Framework 4.0 object model. Business Logic Layer: ASP.NET web form based data bound control friendly business logic layer, which will enable you few clicks to build data bound web applications on top of ASP.NET Web Form and Entity Framework 4.0 quickly with great support of mock testing. Download it to make your web development productive. Enjoy!

    Read the article

  • dijit tree and focus node

    - by user220836
    Hello, I cannot get focusNode() or expandNode() get working. I also tried switching back to dojo 1.32 and even 1.3, no difference to 1.4. And I debugged with firebug, the node is a valid tree node and no errors occur but the node wont get focused. Help is VERY appreciated! <head> <script type="text/javascript"> dojo.declare("itcTree",[dijit.Tree], { focusNodeX : function(/* string */ id) { var node=this._itemNodesMap[id]; this.focusNode(node); } }); </script> </head> <body class="tundra"> <div dojoType="dojo.data.ItemFileReadStore" jsId="continentStore" url="countries.json"> </div> <div dojoType="dijit.tree.ForestStoreModel" jsId="continentModel" store="continentStore" query="{type:'continent'}" rootId="continentRoot" rootLabel="Continents" childrenAttrs="children"> </div> <div dojoType="itcTree" id="mytree" model="continentModel" openOnClick="true"> <script type="dojo/method" event="onClick" args="item"> dijit.byId('mytree').focusNodeX('AF'); </script> </div> <p> <button onclick="dijit.byId('mytree').focusNode('DE');">klick</button> </p> </body>

    Read the article

  • Parsing an arithmetic expression and building a tree from it in Java

    - by ChocolateBear
    Hi, I needed some help with creating custom trees given an arithmetic expression. Say, for example, you input this arithmetic expression: (5+2)*7 The result tree should look like: * / \ + 7 / \ 5 2 I have some custom classes to represent the different types of nodes, i.e. PlusOp, LeafInt, etc. I don't need to evaluate the expression, just create the tree, so I can perform other functions on it later. Additionally, the negative operator '-' can only have one child, and to represent '5-2', you must input it as 5 + (-2). Some validation on the expression would be required to ensure each type of operator has the correct the no. of arguments/children, each opening bracket is accompanied by a closing bracket. Also, I should probably mention my friend has already written code which converts the input string into a stack of tokens, if that's going to be helpful for this. I'd appreciate any help at all. Thanks :) (I read that you can write a grammar and use antlr/JavaCC, etc. to create the parse tree, but I'm not familiar with these tools or with writing grammars, so if that's your solution, I'd be grateful if you could provide some helpful tutorials/links for them.)

    Read the article

  • How to create a Binary Tree from a General Tree?

    - by mno4k
    I have to solve the following constructor for a BinaryTree class in java: BinaryTree(GeneralTree<T> aTree) This method should create a BinaryTree (bt) from a General Tree (gt) as follows: Every Vertex from gt will be represented as a leaf in bt. If gt is a leaf, then bt will be a leaf with the same value as gt If gt is not a leaf, then bt will be constructed as an empty root, a left subTree (lt) and a right subTree (lr). Lt is a stric binary tree created from the oldest subtree of gt (the left-most subtree) and lr is a stric binary tree created from gt without its left-most subtree. The frist part is trivial enough, but the second one is giving me some trouble. I've gotten this far: public BinaryTree(GeneralTree<T> aTree){ if (aTree.isLeaf()){ root= new BinaryNode<T>(aTree.getRootData()); }else{ root= new BinaryNode<T>(null); // empty root LinkedList<GeneralTree<T>> childs = aTree.getChilds(); // Childs of the GT are implemented as a LinkedList of SubTrees child.begin(); //start iteration trough list BinaryTree<T> lt = new BinaryTree<T>(childs.element(0)); // first element = left-most child this.addLeftChild(lt); aTree.DeleteChild(hijos.elemento(0)); BinaryTree<T> lr = new BinaryTree<T>(aTree); this.addRightChild(lr); } } Is this the right way? If not, can you think of a better way to solve this? Thank you!

    Read the article

  • Saving tree-structures in Databases

    - by Nina Null
    Hello everyone. I use Hibernate/Spring and a MySQL Database for my data management. Currently I display a tree-structure in a JTable. A tree can have several branches, in turn a branch can have several branches (up to nine levels) again, or having leaves. Lately I have performanceproblemes, as soon as I want to create new branches on deeper levels. At this time a branch has a foreign key to its parent. The domainobject has access to its parent by calling getParent(), which returns the parent-branch. The deeper the level, the longer it takes to create a new branch. Microbenchmark results for creating a new branch are like: Level 1: 32 ms. Level 3: 80 ms. Level 9: 232 ms. Obviously the level (which means the number of parents) is responsible for this. So I wanted to ask, if there are any appendages to work around this kind of problem. I don’t understand why Hibernate needs to know about the whole object tree (all parents until the root) while creating a new branch. But as far as I know this can be the only reason for the delay while creating a new branch, because a branch doesn’t have any other relations to any other objects. I would be very thankful for any workarounds or suggestions. greets, jambusa

    Read the article

  • Permuting a binary tree without the use of lists

    - by Banang
    I need to find an algorithm for generating every possible permutation of a binary tree, and need to do so without using lists (this is because the tree itself carries semantics and restraints that cannot be translated into lists). I've found an algorithm that works for trees with the height of three or less, but whenever I get to greater hights, I loose one set of possible permutations per height added. Each node carries information about its original state, so that one node can determine if all possible permutations have been tried for that node. Also, the node carries information on weather or not it's been 'swapped', i.e. if it has seen all possible permutations of it's subtree. The tree is left-centered, meaning that the right node should always (except in some cases that I don't need to cover for this algorithm) be a leaf node, while the left node is always either a leaf or a branch. The algorithm I'm using at the moment can be described sort of like this: if the left child node has been swapped swap my right node with the left child nodes right node set the left child node as 'unswapped' if the current node is back to its original state swap my right node with the lowest left nodes' right node swap the lowest left nodes two childnodes set my left node as 'unswapped' set my left chilnode to use this as it's original state set this node as swapped return null return this; else if the left child has not been swapped if the result of trying to permute left child is null return the permutation of this node else return the permutation of the left child node if this node has a left node and a right node that are both leaves swap them set this node to be 'swapped' The desired behaviour of the algoritm would be something like this: branch / | branch 3 / | branch 2 / | 0 1 branch / | branch 3 / | branch 2 / | 1 0 <-- first swap branch / | branch 3 / | branch 1 <-- second swap / | 2 0 branch / | branch 3 / | branch 1 / | 0 2 <-- third swap branch / | branch 3 / | branch 0 <-- fourth swap / | 1 2 and so on... Sorry for the ridiculisly long and waddly explanation, would really, really apreciate any sort of help you guys could offer me. Thanks a bunch!

    Read the article

  • Delete on a very deep tree

    - by Kathoz
    I am building a suffix trie (unfortunately, no time to properly implement a suffix tree) for a 10 character set. The strings I wish to parse are going to be rather long (up to 1M characters). The tree is constructed without any problems, however, I run into some when I try to free the memory after being done with it. In particularly, if I set up my constructor and destructor to be as such (where CNode.child is a pointer to an array of 10 pointers to other CNodes, and count is a simple unsigned int): CNode::CNode(){ count = 0; child = new CNode* [10]; memset(child, 0, sizeof(CNode*) * 10); } CNode::~CNode(){ for (int i=0; i<10; i++) delete child[i]; } I get a stack overflow when trying to delete the root node. I might be wrong, but I am fairly certain that this is due to too many destructor calls (each destructor calls up to 10 other destructors). I know this is suboptimal both space, and time-wise, however, this is supposed to be a quick-and-dirty solution to a the repeated substring problem. tl;dr: how would one go about freeing the memory occupied by a very deep tree? Thank you for your time.

    Read the article

  • Oracle logical standby fails with ORA-01919

    - by DCookie
    I have an Oracle logical standby database being managed via data guard. Just this morning the redo apply process began failing with an ORA-01919 error, indicating one of our application roles did not exist. However, I can see the role on both primary and standby databases. We also have a physical standby that has long since applied the redo where this is happening on the logical, without issue. I have opened an SR with Oracle. I was wondering if anyone out there has seen this before. I guess I should mention: Oracle 10.2.0.4, Win2003 Server SP2. UPDATE: So far, Oracle Support has not provided an answer. I thought I'd post here what I have learned so far. It appears that a grant of DBA on the primary host to a role works fine for users granted the role. It does not work on the logical standby. IOW: create role TEST; grant dba to TEST; grant TEST to auser; connect auser set role TEST; grant <existing role> to <existing user>; This works on the primary instance but fails on the logical. A workaround appears to be to grant each role on the primary to the role TEST with admin option in the logical: grant <existing role> to TEST with admin option; <== do this on the logical standby Then the command works on the logical standby.

    Read the article

  • Removing extended partition without deleting logical in it

    - by HisDudeness
    I'm running a Linux-based laptop, and in order to multi-boot several distros in it, I created an extended partition which contains a bunch of logical ones with GParted. Now, after quite a long time with this setup, I've changed my mind because of the consequent lack of storing space for my data partition. Now I want to keep one distro alone like it's normal, and eventually have some other operating systems stored in external supports to plug in and use if I want. Obviously, also this partition I want to keep (and to enlarge a little too) is just a logical inside the extended I want to keep. For what concerns the number I'm ok, meaning I currently have this big distro dedicated extended, the swap and the data partitions, so there's space for another primary before I delete the extended, but I don't know how to delete it without touching the logical in it, I don't want to reinstall the system losing all changes and settings, and I don't want to keep an extended partition for a logical alone. How can I do? Do I have to create a new primary, copy the logical content in it and then delete everything? Will the system boot and maintain exactly all the features it has now? Or is there a way to convert an extended into a primary once it contains just one logical? Or can I directly move a logical out of an extended turning it into a primary? Or, again, am I screwed?

    Read the article

  • How to determine if binary tree is balanced?

    - by user69514
    It's been a while from those school years. Got a job as IT specialist at a hospital. Trying to move to do some actual programming now. I'm working on binary trees now, and I was wondering what would be the best way to determine if the tree is height-balanced. I was thinking of something along this: public boolean isBalanced(Node root){ if(root==null){ return true; //tree is empty } else{ int lh = root.left.height(); int rh = root.right.height(); if(lh - rh > 1 || rh - lh > 1){ return false; } } return true; } Is this a good implementation? or am I missing something?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >