Search Results

Search found 235 results on 10 pages for 'leaf'.

Page 1/10 | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • ?12c????RAC Cluster Hub Node-Leaf Node

    - by Liu Maclean(???)
    ?12c?cluster?????????????,?????????????flex cluster?flux asm?? ??Hub Node?Leaf Node,?????Hub Node?Leaf Node. Hub Node????: A node in and Oracle Flex Cluster that is tightly connected with other servers and has direct access to a shared disk. Leaf Node????: Servers that are loosely coupled with Hub Nodes, which may not have direct access to the shared storage. ?????????? Leaf Node??????shared storage ,????leaf node??share disk?? ??Hub Node?12c?????cluster node???, ?Leaf Node????? Leaf Node???: ? Hub Node?? ?????cluster?? ????????Hub Node ????Hub Node????? Hub Node????????????Leaf Node??? ??????????? ?Hub Node????? ??Leaf Node??Flex Cluster???????: hub-and-spoke???cluster?????????? ????Hub Node????OCR?Votedisk ????HUB node???,???????clusterware?????,??ocr?Votedisk ? ?????????????? ??????????,???????? ????????,12???Flex cluster??12?????, ???????? [ n * (n-1)]/2?66?????? ???1000?????,?????????????40?Hub Node,???Hub Node??24?Leaf Node,?Flex Cluster???1740??????  ????,??Cluster??499500?????? ?Flex Cluster??????????????,??cluster software????? ??Hub Node ?? ????????? , ??????????relocate???Hub Node ?Hub Node???Leaf Node??????,????????relocate???Leaf Node? ??Leaf Node?? ?????????,????????relocate????Leaf Node?

    Read the article

  • Binary Trees in Scheme

    - by Javier
    Consider the following BNF defining trees of numbers. Notice that a tree can either be a leaf, a node-1 with one subtrees, or a node-2 with two subtrees. tree ::= (’leaf number) | (’node-1 tree) | (’node-2 tree tree) a. Write a template for recursive procedures on these trees. b. Define the procedure (leaf-count t) that returns the number of leaves in t > (leaf-count ’(leaf 5)) 1 > (leaf-count ’(node-2 (leaf 25) (leaf 17))) 2 > (leaf-count ’(node-1 (node-2 (leaf 4) (node-2 (leaf 2) (leaf 3))))) 3 Here's what I have so far: ;define what a leaf, node-1, and node-2 is (define leaf list) (define node-1 list) (define node-2 list) ;procedure to decide if a list is a leaf or a node (define (leaf? tree) (number? (car tree))) (define (node? tree) (pair? (car tree))) (define (leaf-count tree) (cond ((null? tree) 0) ((number? tree) 0) ((leaf? tree) 1) (else (+ (leaf-count (car tree)) (leaf-count (cdr tree)))))) It looks like it should run just fine, but when I try to run it using a simple test case like (leaf-count '(leaf 5)) I get the following error message: car: expects argument of type pair; given leaf What does this error message mean? I am defining a leaf as a list. But for some reason, it's not seeing that and gives me that error message.

    Read the article

  • Gnome 3 and compiz, everything works except Explode and Leaf Spread animations

    - by Erik
    I am using 11.10 with Gnome 3, I have installed Compiz, and have got it functioning almost how I want it. I want my windows to Leaf Spread, which seems to work fine for a few minutes after I enable it and restart my machine. However, over the time of a few window closes, I notice that the objects are not showing up little by little until the Leaf Spread just doesn't show at all? This really isn't a big deal, but I'd like things to work properly. Can anyone shed some light on this?

    Read the article

  • Nested Entities and calculation on leaf entity property - SQL or NoSQL approach

    - by Chandu
    I am working on a hobby project called Menu/Recipe Management. This is how my entities and their relations look like. A Nutrient has properties Code and Value An Ingredient has a collection of Nutrients A Recipe has a Collection of Ingredients and occasionally can have a collection of other recipes A Meal has a Collection of Recipes and Ingredients A Menu has a Collection of Meals The relations can be depicted as In one of the pages, for a selected menu I need to display the effective nutrients information calculated based on its constituents (Meals, Recipes, Ingredients and the corresponding nutrients). As of now am using SQL Server to store the data and I am navigating the chain from my C# code, starting from each meal of the menu and then aggregating the nutrient values. I think this is not an efficient way as this calculation is being done every time the page is requested and the constituents change occasionally. I was thinking about a having a background service that maintains a table called MenuNutrients ({MenuId, NutrientId, Value}) and will populate/update this table with the effective nutrients when any of the component (Meal, Recipe, Ingredient) changes. I feel that a GraphDB would be a good fit for this requirement, but my exposure to NoSQL is limited. I want to know what are the alternative solutions/approaches to this requirement of displaying the nutrients of a given menu. Hope my description of the scenario is clear.

    Read the article

  • PHP Flatten Array with multiple leaf nodes

    - by tafaju
    What is the best way to flatten an array with multiple leaf nodes so that each full path to leaf is a distinct return? array("Object"=>array("Properties"=>array(1, 2))); to yield Object.Properties.1 Object.Properties.2 I'm able to flatten to Object.Properties.1 but 2 does not get processed with recursive function: function flattenArray($prefix, $array) { $result = array(); foreach ($array as $key => $value) { if (is_array($value)) $result = array_merge($result, flattenArray($prefix . $key . '.', $value)); else $result[$prefix . $key] = $value; } return $result; } I presume top down will not work when anticipating multiple leaf nodes, so either need some type of bottom up processing or a way to copy array for each leaf and process (althought that seems completely inefficient)

    Read the article

  • DrScheme versus mzscheme: treatment of definitions

    - by speciousfool
    One long term project I have is working through all the exercises of SICP. I noticed something a bit odd with the most recent exercise. I am testing a Huffman encoding tree. When I execute the following code in DrScheme I get the expected result: (a d a b b c a) However, if I execute this same code in mzscheme by calling (load "2.67.scm") or by running mzscheme -f 2.67.scm, it reports: symbols: expected symbols as arguments, given: (leaf D 1) My question is: why? Is it because mzscheme and drscheme use different rules for loading program definitions? The program code is below. ;; Define an encoding tree and a sample message ;; Use the decode procedure to decode the message, and give the result. (define (make-leaf symbol weight) (list 'leaf symbol weight)) (define (leaf? object) (eq? (car object) 'leaf)) (define (symbol-leaf x) (cadr x)) (define (weight-leaf x) (caddr x)) (define (make-code-tree left right) (list left right (append (symbols left) (symbols right)) (+ (weight left) (weight right)))) (define (left-branch tree) (car tree)) (define (right-branch tree) (cadr tree)) (define (symbols tree) (if (leaf? tree) (list (symbol-leaf tree)) (caddr tree))) (define (weight tree) (if (leaf? tree) (weight-leaf tree) (cadddr tree))) (define (decode bits tree) (define (decode-1 bits current-branch) (if (null? bits) '() (let ((next-branch (choose-branch (car bits) current-branch))) (if (leaf? next-branch) (cons (symbol-leaf next-branch) (decode-1 (cdr bits) tree)) (decode-1 (cdr bits) next-branch))))) (decode-1 bits tree)) (define (choose-branch bit branch) (cond ((= bit 0) (left-branch branch)) ((= bit 1) (right-branch branch)) (else (error "bad bit -- CHOOSE-BRANCH" bit)))) (define (test s-exp) (display s-exp) (newline)) (define sample-tree (make-code-tree (make-leaf 'A 4) (make-code-tree (make-leaf 'B 2) (make-code-tree (make-leaf 'D 1) (make-leaf 'C 1))))) (define sample-message '(0 1 1 0 0 1 0 1 0 1 1 1 0)) (test (decode sample-message sample-tree))

    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

  • t-sql getting leaf nodes

    - by stackoverflowuser
    Based on following table (I have kept spaces between the rows for clarity) Path ----------- \node1\node2\node3 \node1\node2\node3\node5 \node1\node6\node3 \node1\node4\node3 \node1\node4\node3\node7 \node1\node4\node3\node8 \node1\node4\node3\node9 \node1\node4\node3\node9\node10 I want to get all the paths containing leaf node. So for instance, following will be considered leaf nodes for path \node1\node4\node3 \node1\node4\node3\node7 \node1\node4\node3\node8 \node1\node4\node3\node9\node10 The following will be the output: Output --------------------------- \node1\node2\node3\node5 \node1\node6\node3 \node1\node4\node3\node7 \node1\node4\node3\node8 \node1\node4\node3\node9\node10 Pls. suggest. Thanks.

    Read the article

  • Red-Black trees - Erasing a node with two non-leaf children

    - by SalamiArmi
    Hi all, I've been implementing my own version of a red-black tree, mostly basing my algorithms from Wikipedia (http://en.wikipedia.org/wiki/Red-black_tree). Its fairly concise for the most part, but there's one part that I would like clarification on. When erasing a node from the tree that has 2 non-leaf (non-NULL) children, it says to move either side's children into the deletable node, and remove that child. I'm a little confused as to which side to remove from, based on that. Do I pick the side randomly, do I alternate betweek sides, or do I stick to the same side for every future deletion?

    Read the article

  • Multiple leaf methods problem in composite pattern

    - by Ondrej Slinták
    At work, we are developing an PHP application that would be later re-programmed into Java. With some basic knowledge of Java, we are trying to design everything to be easily re-written, without any headaches. Interesting problem came out when we tried to implement composite pattern with huge number of methods in leafs. What are we trying to achieve (not using interfaces, it's just an example): class Composite { ... } class LeafOne { public function Foo( ); public function Moo( ); } class LeafTwo { public function Bar( ); public function Baz( ); } $c = new Composite( Array( new LeafOne( ), new LeafTwo( ) ) ); // will call method Foo in all classes in composite that contain this method $c->Foo( ); It seems like pretty much classic Composite pattern, but problem is that we will have quite many leaf classes and each of them might have ~5 methods (of which few might be different than others). One of our solutions, which seems to be the best one so far and might actually work, is using __call magic method to call methods in leafs. Unfortunately, we don't know if there is an equivalent of it in Java. So the actual question is: Is there a better solution for this, using code that would be eventually easily re-coded into Java? Or do you recommend any other solution? Perhaps there's some different, better pattern I could use here. In case there's something unclear, just ask and I'll edit this post.

    Read the article

  • Implementing the tree with reference to the root for each leaf

    - by AntonAL
    Hi, i implementing a products catalog, that looks, like this: group 1 subgroup 1 subgroup 2 item 1 item 2 ... item n ... subgroup n group 2 subgroup 1 ... subgroup n group 3 ... group n The Models: class CatalogGroup < ActiveRecord::Base has_many: catalog_items has_many :catalog_items_all, :class_name => "CatalogItem", :foreign_key => "catalog_root_group_id" end class CatalogItem < ActiveRecord::Base belongs_to :catalog_group belongs_to :catalog_root_group, :class_name => "CatalogGroup" end Migrations: class CreateCatalogItems < ActiveRecord::Migration def self.up create_table :catalog_items do |t| t.integer :catalog_group_id t.integer :catalog_root_group_id t.string :code t.timestamps end end For convenience, i referenced each CatalogItem to it's top-most CatalogGroup and named this association "catalog_root_group". This will give us the simple implementation of search request, like "show me all items in group 1". We will have a deal only with CatalogModel.catalog_root_group The problem is - this association does't work. I always get "catalog_root_group" equals to nil Also, i have tried to overcome the using of reference to root group ("catalog_root_group"), but i cannot construct appropriate search request in ruby ... Do you know, how to do it ?

    Read the article

  • Counting leaf nodes in hierarchical tree

    - by timn
    This code fills a tree with values based their depths. But when traversing the tree, I cannot manage to determine the actual number of children. node-cnt is always 0. I've already tried node-parent-cnt but that gives me lots of warnings in Valgrind. Anyway, is the tree type I've chosen even appropriate for my purpose? #include <string.h> #include <stdio.h> #include <stdlib.h> #ifndef NULL #define NULL ((void *) 0) #endif // ---- typedef struct _Tree_Node { // data ptr void *p; // number of nodes int cnt; struct _Tree_Node *nodes; // parent nodes struct _Tree_Node *parent; } Tree_Node; typedef struct { Tree_Node root; } Tree; void Tree_Init(Tree *this) { this->root.p = NULL; this->root.cnt = 0; this->root.nodes = NULL; this->root.parent = NULL; } Tree_Node* Tree_AddNode(Tree_Node *node) { if (node->cnt == 0) { node->nodes = malloc(sizeof(Tree_Node)); } else { node->nodes = realloc( node->nodes, (node->cnt + 1) * sizeof(Tree_Node) ); } Tree_Node *res = &node->nodes[node->cnt]; res->p = NULL; res->cnt = 0; res->nodes = NULL; res->parent = node; node->cnt++; return res; } // ---- void handleNode(Tree_Node *node, int depth) { int j = depth; printf("\n"); while (j--) { printf(" "); } printf("depth=%d ", depth); if (node->p == NULL) { goto out; } printf("value=%s cnt=%d", node->p, node->cnt); out: for (int i = 0; i < node->cnt; i++) { handleNode(&node->nodes[i], depth + 1); } } Tree tree; int curdepth; Tree_Node *curnode; void add(int depth, char *s) { printf("%s: depth (%d) > curdepth (%d): %d\n", s, depth, curdepth, depth > curdepth); if (depth > curdepth) { curnode = Tree_AddNode(curnode); Tree_Node *node = Tree_AddNode(curnode); node->p = malloc(strlen(s)); memcpy(node->p, s, strlen(s)); curdepth++; } else { while (curdepth - depth > 0) { if (curnode->parent == NULL) { printf("Illegal nesting\n"); return; } curnode = curnode->parent; curdepth--; } Tree_Node *node = Tree_AddNode(curnode); node->p = malloc(strlen(s)); memcpy(node->p, s, strlen(s)); } } void main(void) { Tree_Init(&tree); curnode = &tree.root; curdepth = 0; add(0, "1"); add(1, "1.1"); add(2, "1.1.1"); add(3, "1.1.1.1"); add(4, "1.1.1.1.1"); add(2, "1.1.2"); add(0, "2"); handleNode(&tree.root, 0); }

    Read the article

  • Refactoring a leaf class to a base class, and keeping it also a interface implementation

    - by elcuco
    I am trying to refactor a working code. The code basically derives an interface class into a working implementation, and I want to use this implementation outside the original project as a standalone class. However, I do not want to create a fork, and I want the original project to be able to take out their implementation, and use mine. The problem is that the hierarchy structure is very different and I am not sure if this would work. I also cannot use the original base class in my project, since in reality it's quite entangled in the project (too many classes, includes) and I need to take care of only a subdomain of the problems the original project is. I wrote this code to test an idea how to implement this, and while it's working, I am not sure I like it: #include <iostream> // Original code is: // IBase -> Derived1 // I need to refactor Derive2 to be both indipendet class // and programmers should also be able to use the interface class // Derived2 -> MyClass + IBase // MyClass class IBase { public: virtual void printMsg() = 0; }; /////////////////////////////////////////////////// class Derived1 : public IBase { public: virtual void printMsg(){ std::cout << "Hello from Derived 1" << std::endl; } }; ////////////////////////////////////////////////// class MyClass { public: virtual void printMsg(){ std::cout << "Hello from MyClass" << std::endl; } }; class Derived2: public IBase, public MyClass{ virtual void printMsg(){ MyClass::printMsg(); } }; class Derived3: public MyClass, public IBase{ virtual void printMsg(){ MyClass::printMsg(); } }; int main() { IBase *o1 = new Derived1(); IBase *o2 = new Derived2(); IBase *o3 = new Derived3(); MyClass *o4 = new MyClass(); o1->printMsg(); o2->printMsg(); o3->printMsg(); o4->printMsg(); return 0; } The output is working as expected (tested using gcc and clang, 2 different C++ implementations so I think I am safe here): [elcuco@pinky ~/src/googlecode/qtedit4/tools/qtsourceview/qate/tests] ./test1 Hello from Derived 1 Hello from MyClass Hello from MyClass Hello from MyClass [elcuco@pinky ~/src/googlecode/qtedit4/tools/qtsourceview/qate/tests] ./test1.clang Hello from Derived 1 Hello from MyClass Hello from MyClass Hello from MyClass The question is My original code was: class Derived3: public MyClass, public IBase{ virtual void IBase::printMsg(){ MyClass::printMsg(); } }; Which is what I want to express, but this does not compile. I must admit I do not fully understand why this code work, as I expect that the new method Derived3::printMsg() will be an implementation of MyClass::printMsg() and not IBase::printMsg() (even tough this is what I do want). How does the compiler chooses which method to re-implement, when two "sister classes" have the same virtual function name? If anyone has a better way of implementing this, I would like to know as well :)

    Read the article

  • Elegant way for a recursive C++ template to do something different with the leaf class?

    - by Costas
    I have a C++ class template that makes an Array of pointers. This also gets typedefed to make Arrays of Arrays and so on: typedef Array<Elem> ElemArray; typedef Array<ElemArray> ElemArrayArray; typedef Array<ElemArrayArray> ElemArrayArrayArray; I would like to be able to set one leaf node from another by copying the pointer so they both refer to the same Elem. But I also want to be able to set one Array (or Array of Arrays etc) from another. In this case I don't want to copy the pointers, I want to keep the arrays seperate and descend into each one until I get to the leaf node, at where I finally copy the pointers. I have code that does this (below). When you set something in an Array it calls a CopyIn method to do the copying. But because this is templated it also has to call the CopyIn method on the leaf class, which means I have to add a dummy method to every leaf class that just returns false. I have also tried adding a flag to the template to tell it whether it contains Arrays or not, and so whether to call the CopyIn method. This works fine - the CopyIn method of the leaf nodes never gets called, but it still has to be there for the compile to work! Is there a better way to do this? #include <stdio.h> class Elem { public: Elem(int v) : mI(v) {} void Print() { printf("%d\n",mI); } bool CopyIn(Elem *v) { return false; } int mI; }; template < typename T > class Array { public: Array(int size) : mB(0), mN(size) { mB = new T* [size]; for (int i=0; i<mN; i++) mB[i] = new T(mN); } ~Array() { for (int i=0; i<mN; i++) delete mB[i]; delete [] mB; } T* Get(int i) { return mB[i]; } void Set(int i, T* v) { if (! mB[i]->CopyIn(v) ) { // its not an array, so copy the pointer mB[i] = v; } } bool CopyIn(Array<T>* v) { for (int i=0; i<mN; i++) { if (v && i < v->mN ) { if ( ! mB[i]->CopyIn( v->mB[i] )) { // its not an array, so copy the pointer mB[i] = v->mB[i]; } } else { mB[i] = 0; } } return true; // we did the copy, no need to copy pointer } void Print() { for (int i=0; i<mN; i++) { printf("[%d] ",i); mB[i]->Print(); } } private: T **mB; int mN; }; typedef Array<Elem> ElemArray; typedef Array<ElemArray> ElemArrayArray; typedef Array<ElemArrayArray> ElemArrayArrayArray; int main () { ElemArrayArrayArray* a = new ElemArrayArrayArray(2); ElemArrayArrayArray* b = new ElemArrayArrayArray(3); // In this case I need to copy the pointer to the Elem into the ElemArrayArray a->Get(0)->Get(0)->Set(0, b->Get(0)->Get(0)->Get(0)); // in this case I need go down through a and b until I get the to Elems // so I can copy the pointers a->Set(1,b->Get(2)); b->Get(0)->Get(0)->Get(0)->mI = 42; // this will also set a[0,0,0] b->Get(2)->Get(1)->Get(1)->mI = 96; // this will also set a[1,1,1] // should be 42,2, 2,2, 3,3, 3,96 a->Print(); }

    Read the article

  • NTFS Permission Structure to allow Traversal but no Modification except in Leaf Nodes?

    - by pepoluan
    Assume there's this folder structure: D:\ --+-- Acctg --+-- Payable | +-- Receivable | +-- Fin --+-- Inv | +-- Tax | +-- Treas | +-- Mrktg --+-- Ads +-- Promo Users are not allowed to change the structure, but they are free to create & delete files & folders in the leaf nodes (i.e., the rightmost folders). AGDLP principle said that I should assign permissions on the above folders to DL-Groups. Let's say I have a G-Group of users, G-Accounting-Payable, containing users that have access to the D:\Acctg\Payable folder. The way I see it, I have two strategies: - Strategy 1 Create three DL-Groups and assign them permissions: DL-D-Acctg_T -- allowed traversal of D:\Acctg folder DL-D-Acctg-Pay_LF -- allowed listing of D:\Acctg\Payable folder contents DL-D-Acctg-Pay__RW -- allowed full permissions to the contents of D:\Acctg\Payable folder Add G-Accounting-Payable as member to all the above DL-Groups - Strategy 2 Create just one DL-Group DL-D-Acctg-Pay__RW, and assign it the proper permissions for each level of the folder. Then, add G-Accounting-Payable as member to that DL-Group. - Which strategy is the Recommended Best Practice, and why?

    Read the article

  • How to replace the image ?

    - by master123
    Below code displays the tree structure.When i click on the image Pic.gif,it has to get replaced by new image.Similarly pic1.gif to new image,pic6.gif to new image.Can you help mw with the code where exactly it fits in this code ???? var children = [{ text: 'family', icon: 'pic1.gif', children: [{ text: 'parent1', icon: 'pic2.gif', children: [{ icon: 'pic3.gif', text: 'children1', leaf: true}, { icon: 'pic4.gif', text: 'children2', leaf: true}, { icon: 'pic5.gif', text: 'children3', leaf: true}]}], }, { text: 'Parent2', icon: 'pic6.gif', children: [{ icon: 'pic7.gif', text: 'children4', leaf: true}, { icon: 'pic8.gif', text: 'children5', leaf: true}, { icon: 'pic9.gif', text: "children6", leaf: true}]}]; Ext.onReady(function() { var tree = new Ext.tree.TreePanel({ loader: new Ext.tree.TreeLoader(), width: 1000, height: 1000, renderTo: Ext.getBody(), root: new Ext.tree.AsyncTreeNode({ expanded: false, leaf: false, icon: 'pic.gif' , text: 'Head', children: children }) }); });

    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

  • Flex AdvancedDataGrid with Grouping, how do I get objects to appear under first GroupingField if the

    - by shadenite
    I am using an AdvancedDataGrid with two GroupingFields. The dataProvider has a list of objects with these two field values, but occasionally the second field value can be null. When it loads, the AdvancedDataGrid UI has a root folder (first GroupingField) and some additional subfolders (second GroupingField). This is all good. However, the objects with a null value for the second GroupingField, just get placed in a subfolder with no label. I want the objects with a null second GroupingField value to appear as leaf nodes beneath the root folder (first GroupingField) minus the blank subfolder. A good way to picture this would be a file explorer. Is there a good way to do this? Make the folder icon disappear maybe after expanding this node through actionscript? ParentFolder SubFolder Leaf Object Leaf Object SubFolder Leaf Object Leaf Object Leaf Object

    Read the article

  • Hover effect for parent unordered list inherited by child list

    - by elvista
    I have a simple menu <ul id="menu"> <li class="leaf"><a href="#">Menu Item 1</a></li> <li class="leaf"><a href="#">Menu Item 2</a></li> <li class="expanded"><a href="#">Menu Item 3</a> <ul> <li class="leaf"><a href="#">Menu Item a</a></li> <li class="leaf"><a href="#">Menu Item b</a></li> <li class="leaf"><a href="#">Menu Item c</a></li> </ul> </li> <li class="leaf"><a href="#">Menu Item 4</a></li> </ul> and ul#menu li a:hover {font-weight:bold;} The problem I am facing is when I hover above a ul li li, the parent as well as all its siblings gets the hover effect. I only want the list item I hovered above to get the effect. I tried ul#menu li.leaf a: hover {..}, ul#menu li.expanded a: hover {..} , but even in that case, when I hover above li.expanded, it's child inherits the style. How do I fix this?

    Read the article

  • Parent and siblings inherits a child list items styles

    - by elvista
    I have a simple menu <ul id="menu"> <li class="leaf"><a href="#">Menu Item 1</a></li> <li class="leaf"><a href="#">Menu Item 2</a></li> <li class="expanded"><a href="#">Menu Item 3</a> <ul> <li class="leaf"><a href="#">Menu Item a</a></li> <li class="leaf"><a href="#">Menu Item b</a></li> <li class="leaf"><a href="#">Menu Item c</a></li> </ul> </li> <li class="leaf"><a href="#">Menu Item 4</a></li> </ul> and ul#menu li:hover {font-weight:bold;} The problem I am facing is when I hover above a ul li li, the parent as well as all its siblings gets the hover effect. I only want the list item I hovered above to get the effect. I tried ul#menu li.leaf:hover {..}, ul#menu li.expanded:hover {..} , but even in that case, when I hover above li.expanded, it's child inherits the style. It is important for me to style the list items, not a (the style is more complicated than the one I posted) How do I fix this?

    Read the article

  • Drupal Override Custom Menu Template

    - by JaZz
    Hi Guys, I created a custom menu called "sub-top-nav" and now I'd like to override the html output. In particular I would like to add an unique class to each item like. This is how it looks atm: <div class="clear-block block block-menu" id="block-menu-menu-sub-top-nav"> <div class="content"> <ul class="menu"> <li class="leaf first"><a title="Test 1" href="/test1">Test 1</a></li> <li class="leaf"><a title="Test 2" href="/test2">Test 2</a></li> <li class="leaf active-trail"><a class="active" title="Test 3" href="/test3">Test 3</a></li> <li class="leaf last"><a title="Test 4" href="/test4">Test 4</a></li> </ul> </div> </div> And I'd like to change it into: <div class="clear-block block block-menu" id="block-menu-menu-sub-top-nav"> <div class="content"> <ul class="menu"> <li class="leaf test1 first"><a title="Test 1" href="/test1">Test 1</a></li> <li class="leaf test2"><a title="Test 2" href="/test2">Test 2</a></li> <li class="leaf test3 active-trail"><a class="active" title="Test 3" href="/test3">Test 3</a></li> <li class="leaf test4 last"><a title="Test 4" href="/test4">Test 4</a></li> </ul> </div> </div> This would give me more styling power. Any idea how that works? Thanks in advance!

    Read the article

  • traverse a binary decison tree using python?

    - by kaushik
    how to traverse a binary decision tree using python language. given a tree,i want know how can we travesre from root to required leaf the feature of the required leaf are given in an dictionary form assume and have to traverse from root to leaf answering the questions at each node with the details given in feature list.. the decision tree node has format ((question)(left tree)(right tree)) while traversing it should answer question at each node and an choose left or right and traverse till leaf?

    Read the article

1 2 3 4 5 6 7 8 9 10  | Next Page >