traverse

Java - change focus on key press

I am writing a Java Application for Data Entry using Eclipse and SWT. Naturally it has a great many Text objects. What I would like to happen is that when user enters something into one field focus automatically changes to the next field. Thanks in advance ...

How would you implement?: Lots of rules over a tree in C#

I have a data structure that represents C# code like this: class Namespace: string Name; List<Class> Classes; class Class: string Name; List<Property> Properties; List<Method> Methods; List<Method> Constructors; List<Field> Fields; List<Class> InnerClasses; Class Parent; List<Interface> Implement...

How to search a specific node in a graph structure in C?

Not that I have time to discuss this properly to reach a conclusion and adapt my code because the phase one (of three) of a school project is in 24hrs, but at least I need to know if I did the correct decision. I'm using linked lists and here's my structures: typedef struct sCity { int cityID; char *cityName; struct sCityL...

DOM: fetch all text nodes in the document (PHP)

I've have the following (PHP) code that traverses an entire DOM document to get all of the text nodes. It's a bit of a ugly solution, and I'm sure there must be a better way... so, is there? $skip = false; $node = $document; $nodes = array(); while ($node) { if ($node->nodeType == 3) { $nodes[] = $node; } if (!$skip && ...

dictionary in python??

in how many way i traverse dictionary in python??? ...

Get Repeater's Items

I am trying to get all repeater's selected checkboxes of repeater's item just before page movement (pagination), and store them in some place. foreach (RepeaterItem ri in rpt.Items) { CheckBox box = (CheckBox)ri.FindControl("chkBox"); if (box.Checked) { ... } } The problem is where do ...

Issue with traversing through XML data - the VBScript way.

Sample XML: <cart subTotal="USD 3.50" > <item productSubTotal="3.50" > <pkProductItem>241</pkProductItem> <itemCode>23455-green-XL</itemCode> <itemName>my product ( green - XL-size )</itemName> <qty>1</qty> <itemUnitPrice>3.50</itemUnitPrice> <totalItemPrice>3.50</totalItemPrice> ...

Traverse a XML using Recursive function

How can I traverse (read all the nodes in order) a XML document using recursive functions in c#? What I want is to read all the nodes in xml (which has attributes) and print them in the same structure as xml (but without Node Localname) Thanks ...

jQuery traversing form elements

I'm trying to hide a form label and textbox, by default, and make them appear when an option is selected. I can't see why my code keeps failing. <tr> <td><label>My Label</label></td> <td> <select name="1" id="1"> <option value="2" selected="selected">2</option> <option value="3">3</option> <option ...

Traversing an unordered list using jQuery

This should be an easy one, but I'm not finding much online: I have an unordered list <ul>, with a few list items underneath it <li>, and I'd like to address each one in the list, and act on it. How can I do this using jQuery? Thanks. ...

Traversing an unusual tree in Python

I have an unusual tree array like this: [[0, 1], [1, 2], [2, 3], [2, 4], [2, 5], [5, 6], [4, 6], [3, 6], [0, 7], [7, 6], [8, 9], [9, 6]] Each element of the array is a pair, which means second one is a follower of the first, e.g.: [0, 1] - 0 is followed by 1 [1, 2] - 1 is followed by 2 I am trying to extract array like this: 0 ...

Traverse Rectangular Matrix in Diagonal strips

I need the same thing done here, but to work with any matrix, not just a square one. Also, the direction of traversal needs to be opposite. I tried to edit the code I found there, but couldn't figure it out. Thanks. ...

Efficiently Traverse Directory Tree with opendir(), readdir() and closedir()

The C routines opendir(), readdir() and closedir() provide a way for me to traverse a directory structure. However, each dirent structure returned by readdir() does not seem to provide a useful way for me to obtain the set of pointers to DIR that I would need to recurse into the directory subdirectories. Of course, they give me the name...

Structuring leafs in a hierarchical tree

This code fills a tree with values based on their depths. But when traversing the tree, I cannot manage to determine the actual number of children without iterating over the parent node. This is necessary because the subleafs are stored in in the node underneath the current one. Which conceptual changes are necessary to store the leafs d...

PHP - Find parent key of array

I'm trying to find a way to return the value of an array's parent key. For example, from the array below I'd like to find out the parent's key where $array['id'] == "0002". The parent key is obvious because it's defined here (it would be 'products'), but normally it'd be dynamic, hence the problem. The 'id' and value of 'id' is known th...

JQuery traverse DOM and extract node value

I have the following DOM: <div class="qtip qtip-light qtip-active"> <div class="qtip-wrapper"> <div class="qtip-borderTop"></div> <div class="qtip-contentWrapper"> <div class="qtip-title"> <div class="qtip-button"></div> **Text I need to extract** </div> <div class="qtip-...

traverse a binary decison tree using python?

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 tre...

grid traversal question

Possible Duplicate: Looping in a spiral Given a grid of any height and width, write an algorithm to traverse it in a spiral. (Starting at the top left and ending in the middle) without passing over previously visited nodes. Without using nested loops. ...

ExtJS (Grid): How do I traverse the data of a Grid

I need to validate information from a grid: - check if all the rows that have the "required" column set to "Yes", have the "Status" column set to "Received". How do I traverse the data of the grid? ...

Check if LI has "parent" LI using jQuery?

I'm working on the comments section of a WP theme, and the styling requires the use of some clever jQuery in order to make it work right... However, when trying to style admin comments in a long nested UL, I'm having trouble traversing the DOM with jQuery to find the elements I need to adjust the CSS for... Here's what I've tried using:...