Questions tagged [descendant]

Descendant of a vertex v, in the tree data structure, refers to a vertex that is either a child of v or recursively a descendant of any of the children of v.

A tree, in graph theory, is an undirected graph which has a unique path between any pair of vertices. A tree is called rooted, if one particular vertex is assigned as the root.

A rooted tree induces a partial order, where the root is at the highest level, each vertex connected to the root via an edge are called its children. This hierarchy may continue further down, with each vertex having children of its own.

A descendant of any vertex is, therefore, any vertex that can be reached by traversing from parent to child.

132 questions
0
votes
1 answer

PHP - Apply operations to descendant arrays regardless of parent arrays

In a multidimensional array, I'm trying to select all descendant arrays with a certain key, no matter what their parent arrays are. I know the following syntax doesn't work, but hopefully it will help illustrate what I'm trying to accomplish:
0
votes
4 answers

How do I append a "descendant" clause next to an xpath variable?

This is what my code looks like public void someTest() { String x = "/html/body/div/div[" String y = "]/a" for (int i = 1; i < 5; i++){ String links = x + i + y; …
Donshon
  • 174
  • 2
  • 11
0
votes
1 answer

Select descendant nodes that have different names using LINQ

I have an XML like this: <_0> <_1> I want to get all descendants of the data node and currently…
user2052637
  • 75
  • 1
  • 3
0
votes
2 answers

Style first level of menu only

To style the first level of a menu i would think this code would work: http://jsfiddle.net/2g36L/1/ Could someone please point out where I'm going wrong, thanks.
Paul Mason
  • 1,818
  • 2
  • 20
  • 32
0
votes
5 answers

PHP date() increase/decrease week store in $_SESSION

The following code will increase/decrease week by 1: (yes, my application requires the value to be stored in a $_SESSION. if (isset($_POST['decrease'])) { $week_value = ($_SESSION['sess_week'] = $_SESSION['sess_week']-1); } else if…
David
  • 1,171
  • 8
  • 26
  • 48
0
votes
1 answer

do hCard property elements have to be children or can they be descendants?

Basically I'm wondering if this is still effective as an hcard.

Phone Number: 800-288-3875

Thanks!
rob-gordon
  • 1,419
  • 3
  • 20
  • 38
-1
votes
1 answer

Downcasting and copying a const object

My method receives an object as a parameter and it must be accepted as a base type (though it is sent as a Derived type). I want to make a copy of this object AND down cast it to a derived type, so that I can call a method of the derived type…
TSG
  • 4,242
  • 9
  • 61
  • 121
-1
votes
1 answer

How to Parse Json grandchild in VB.NET Newtonsoft

I am having trouble showing tongits,black jack, 21 in a Listbox I can only show favorite game, game in a Listbox and also how can I count the number of question in questionnaires? Json data { "id": 1, "status": "DRAFT", "title": "GAMES", …
-1
votes
1 answer

Trouble with istream overload in descendant class c++

I am having trouble with what I believe to be the insertion operator overload of my program. It is an assignment for a beginners c++ class in which I am supposed to use descendant functions to perform tasks with complex numbers and vectors. When I…
-2
votes
1 answer

Selenium webdriver - failed to locate descendant object

I have a registration page. In my test, I'm trying to register without a first name. Pressing the register button should display the a 'Required' notification label. You can see the structure in the attached screenshot. I tried to get the text from…
Nir Ortal
  • 77
  • 12
-2
votes
1 answer

How can to code sorting numbers (ascending/descending) via bubble sorting?

I need help on using bubble sort and sorting it whether ascending or descending :( int[] number = {12, 5, 6, 14, 18}; int[] number = new int[5]; String[] mark = new String[10]; String evenOrOdd = ""; String…
-5
votes
1 answer

Android SQLite - Primary Key Desc

First create the id generator: private int generateId() { // if the table is empty returns -1 int result = -1; String sql = "SELECT id FROM table order by id asc"; SQLiteDatabase db = this.getReadableDatabase(); …
1 2 3
8
9