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
9
votes
3 answers

Access trees and nodes from LightGBM model

In sci-kit learn, it's possible to access the entire tree structure, that is, each node of the tree. This allows to explore the attributes used at each split of the tree and which values are used for the test The binary tree structure has 5 nodes…
Titus Pullo
  • 3,751
  • 15
  • 45
  • 65
9
votes
3 answers

TypeError: require(...).jsdom is not a function

I have used visual studio 2015 for nodejs web development. I have following packages for nodejs like. body-parser 1.18.1 express 4.15.4 jquery 1.7.4 html 1.0.0 jsdom 11.2.0 and my server.js is var http = require('http'); var express =…
ssj5
  • 95
  • 1
  • 1
  • 4
9
votes
2 answers

replace a string after specific index in javascript str.replace(from, to, indexfrom)

I like to replace a string after a specific index. ex: var str = "abcedfabcdef" str.replace ("a","z",2) console.log(str) abcedfzbcdef Is there any way to do this in javascript or in nodeJS?
Shankar
  • 143
  • 2
  • 10
9
votes
2 answers

NetworkX shuffles nodes order

I'm beginner to programming and I'm new here, so hello! I'm having a problem with nodes order in networkX. This code: letters = [] G = nx.Graph() for i in range(nodesNum): letter = ascii_lowercase[i] letters.append(letter) print…
dreptak
  • 193
  • 4
  • 10
9
votes
1 answer

XPath select node with periods

I have an XML document where some of the nodes have a . in their name: asdkjasd test If I try @doc.search("/*/id").first.xpath, it…
Mitch Dempsey
  • 38,725
  • 6
  • 68
  • 74
9
votes
3 answers

For a complete binary tree with n nodes, how many nodes are leaf nodes?

One of the answers in our powerpoint says it is n/2 leaves, but I am seeing another answer which says (n+1)/2. I was wondering which one is correct if any, and why?
Amit Jain
  • 337
  • 2
  • 3
  • 7
9
votes
2 answers

DOM node child collections--what's the difference?

What's the difference between the children and childNodes collections of a node? And childElementCount and childNodes.length?
9
votes
3 answers

How to plot tree/graph/web data on gnuplot?

I have a data-set that consist of edges and colors, and I want to plot them on a web-like manner, with lines and circles such as the picture below, and possibly with cluster coloring. The data is organized like this: point1a_x point1a_y…
rgcalsaverini
  • 626
  • 6
  • 16
9
votes
2 answers

How would I represent this workflow as a JavaScript data structure?

I'm dealing with a pretty complex workflow that I want to represent as a JavaScript data structure. The flow is essentially a set of questions and answers where the answer to one question affects which question is asked next. The following is a…
HartleySan
  • 7,404
  • 14
  • 66
  • 119
9
votes
2 answers

ASP.NET MVC SiteMap provider -- How to 'hide' single items in the actual menu

I am using the ASP.NET MVC SiteMap provider in a project, and it is working great. I am having a tough time trying to figure out how to hide a menu item however. The menu item I want to hide from displaying in the global navigation is my "Site Map"…
cardiac7
  • 491
  • 1
  • 9
  • 26
8
votes
2 answers

library for transforming a node tree

I'd like to be able to express a general transformation of one tree into another without writing a bunch of repetitive spaghetti code. Are there any libraries to help with this problem? My target language is Python, but I'll look at other languages…
bukzor
  • 37,539
  • 11
  • 77
  • 111
8
votes
2 answers

how to install node.js in MACOS by using homebrew

If I write, brew install node ==> Searching for similarly named formulae... Error: No similarly named formulae found. Error: No available formula or cask with the name "node". It was migrated from homebrew/cask to homebrew/core. If I write, brew…
tobedev
  • 81
  • 1
  • 2
8
votes
1 answer

Correct pb file to move Tensorflow model into ML.NET

I have a TensorFlow model that I built (a 1D CNN) that I would now like to implement into .NET. In order to do so I need to know the Input and Output nodes. When I uploaded the model on Netron I get a different graph depending on my save method and…
Josh
  • 159
  • 2
  • 10
8
votes
5 answers

kubadm init error CPUs 1 is less than required 2

Can anybody help me with this error. I have been following different links to install Kubernetes in centos 7 and I keep getting this error when i run the kubadm init command. [ERROR NumCPU]: the number of available CPUs 1 is less than the required…
Brandon Koenig
  • 81
  • 1
  • 1
  • 3
8
votes
1 answer

Why memory usage is greater than what I set in Kubernetes's node?

I allocated resource to 1 pod only with 650MB/30% of memory (with other built-in pods, limit memory is 69% only) However, when the pod handling process, the usage of pod is within 650MB but overall usage of node is 94%. Why does it happen because…
DaiKeung
  • 1,077
  • 1
  • 19
  • 38