Questions tagged [nodes]

Nodes are the basic units used to build data structures such as linked lists and trees.

A node is a record consisting of one or more fields that are links to other nodes, and a data field. The link and data fields are often implemented by pointers or references although it is also quite common for the data to be embedded directly in the node.

Nodes are used to build linked data structures such as , , and . Large and complex data structures can be formed from groups of interlinked nodes. Nodes are conceptually similar to vertices, which are elements of a graph. Software is said to have a node graph architecture when its organization consists of interlinked nodes.

http://en.wikipedia.org/wiki/Node_(computer_science)

6243 questions
406
votes
13 answers

What is the difference between tree depth and height?

This is a simple question from algorithms theory. The difference between them is that in one case you count number of nodes and in other number of edges on the shortest path between root and concrete node. Which is which?
Gabriel Ščerbák
  • 18,240
  • 8
  • 37
  • 52
108
votes
14 answers

How to delete/create databases in Neo4j?

Is it possible to create/delete different databases in the graph database Neo4j like in MySQL? Or, at least, how to delete all nodes and relationships of an existing graph to get a clean setup for tests, e.g., using shell commands similar to rmrel…
rmv
  • 3,195
  • 4
  • 26
  • 29
102
votes
5 answers

Why is NULL undeclared?

I have a problem with this struct contructor when I try to compile this code: typedef struct Node { Node( int data ) // { this->data = data; previous = NULL; // Compiler indicates here next = NULL; } int…
TheTeh
82
votes
7 answers

How to restart kubernetes nodes?

The status of nodes is reported as unknown "conditions": [ { "type": "Ready", "status": "Unknown", "lastHeartbeatTime": "2015-11-12T06:03:19Z", "lastTransitionTime": "2015-11-12T06:04:03Z", …
user_mda
  • 18,148
  • 27
  • 82
  • 145
78
votes
2 answers

Node.js server that accepts POST requests

I'm trying to allow javascript to communicate with a Node.js server. POST request (web browser) var http = new XMLHttpRequest(); var params = "text=stuff"; http.open("POST", "http://someurl.net:8080", true); http.setRequestHeader("Content-type",…
Ostap Hnatyuk
  • 1,116
  • 2
  • 14
  • 20
74
votes
6 answers

Graph auto-layout algorithm

To simplify the problem, I have a graph that contains nodes and edges which are on a 2D plane. What I want to be able to do is click a button and it make the automatically layout the graph to look clean. By that I mean minimal crossing of edges,…
Cheetah
  • 13,785
  • 31
  • 106
  • 190
62
votes
11 answers

How to swap DOM child nodes in JavaScript?

What is the easiest way to swap the order of child nodes? For example I want childNode[3] to be childNode[4] and vice-versa.
Myforwik
  • 3,438
  • 5
  • 35
  • 42
53
votes
4 answers

What is the difference between a node and a vertex?

What is the difference (if any) between a node and a vertex? I can't find the answer after looking at countless sites! Even my book doesn't specify it so I am kind of lost! It is worth mentioning that I am looking for the difference besides the fact…
Marc Rasmussen
  • 19,771
  • 79
  • 203
  • 364
50
votes
2 answers

How get Environment Variables from lambda (nodejs aws-sdk)

We can set up Environment Variables in aws-lambda for example via AWS SAM: Environment: Variables: TABLE_NAME: !Ref Table How can I get this variables from current lambda via Node JS AWS-SDK?
Max Vinogradov
  • 1,343
  • 1
  • 13
  • 31
39
votes
1 answer

Which is correct Node.js architecture?

I am little bit confused about the architecture of Node.js First one is correct or second ? Because in second diagram each call passes through V8 first and then Node.js Bindings, But in first one it's vice versa. Can you please help in…
Sagar
  • 2,315
  • 7
  • 25
  • 34
37
votes
1 answer

What is the difference between node.nextSibling and ChildNode.nextElementSibling?

Here is div-01
Here is div-02
Aren't they the same thing ? Both returning the immediately followed node. I read a lot of articles but seems to me like the same thing, but can't figure where to use one…
Ani
  • 4,473
  • 4
  • 26
  • 31
35
votes
4 answers

What is a node in Javascript?

I was wondering what exactly a node is in JavaScript? As in the functions: element.nodeType row.parentNode.removeChild(row);
jaredramirez
  • 645
  • 2
  • 11
  • 17
33
votes
4 answers

How can one modify the outline color of a node In networkx?

I am relatively new to networkx and plotting using matplotlib.pyplot and would like to know how to modify the color (or other attributes such as weight) of a node's outline. By "outline" I don't mean an arc or edge between two nodes; I mean the thin…
user1071516
  • 495
  • 1
  • 5
  • 8
31
votes
2 answers

NPM run parallel task, but wait until resource is available to run second task

In npm, how can I run two or more parallel tasks, but waiting for the resource that the first task will create to be available to the second task to use it, and so forth? example (conceptual): npm run task1 & waitfor task1 then task2 & waitFor task3…
user3303864
31
votes
10 answers

Running Jenkins job simultaneously on all nodes

TLDR: I want to be able to run job simultaneously on multiple nodes in Jenkins pipeline. [ for example - build application x on nodes dev, test & staging nodes based on aws ] I have a large group of nodes with the same label. I would like to be…
user2406467
  • 1,017
  • 6
  • 18
  • 22
1
2 3
99 100