FAQ Database Discussion Community


Why I am getting request for /recieved { [Error: ENOENT, open ''] errno: 34, code: 'ENOENT', path: '' } error?

node.js,nodes
As I am executing this code, it gives me errno: 34, code: 'ENOENT' error . I have written a simple html hello world page. it should simply print hello world when running on the port 3000 but everytime it is showing the same error. My present version of node is...

Restricting the addition of nodes of a JTree except for the 1st level child

java,swing,validation,nodes,jtree
I have been trying a lot of approaches on how to limit my code on adding nodes only to the 1st level. This means that the user can only add nodes to the 1st level children of a JTree. Adding a node in my program can be done in 2...

How can I remove all nodes from a scenekit scene?

swift,nodes,reset,scenekit
Hi I am trying to remove all nodes from my Scenekit scene but I cannot for the life of me figure out a way. It seems logical to me that there must be a function for doing this automatically but I cannot find it. In context, I am trying to...

Sequence Action With EnumerateChildNodeWithName

swift,sprite-kit,nodes,fade,alpha
I want two different types of nodes to fade there alpha to 0 one after the other (with a sequence). However to find the nodes to fade, I'm using EnumerateChildNodeWithName and there is two of them, so I'm unable (I think) to use a sequence because I would have to...

Maya Adding Numerical Compound attribute (non-API)

python,nodes,maya,mel,addattribute
I've been looking around the internet for a solution but to no avail. I am currently trying to add a compound attribute that is index based (i.e. "object.attribute[0], object.attribute[1], object.attribute[2], etc...) similar to how vertex and uv attributes are used. Looking through the documentation it seems that there is no...

Sprite Kit: can not see existing node's children

swift,sprite-kit,nodes
I'm building a game with SpriteKit. This is my node tree: self.world.hydraAnchor.head The problem is that head can not be seen The code is simple let world = SKSpriteNode() addChild(world) ... let hydraAnchor = SKSpriteNode() hydraAnchor.position = anchorsPosition world.addChild(hydraAnchor) let head = SKSpriteNode(imageNamed: "hydraHead") head.position = CGPointMake(anchorsPosition.x, anchorsPosition.y + 50)...

Retrieve nodes from XML belonging to a specific node

c#,xml,nodes
I have a XML like this: <ITEM> <RACES> <TAB> <NUMBER>1</NUMBER> <A></A> <B></B> </TAB> <TAB> <NUMBER>2</NUMBER> <A></A> <B></B> </TAB> </RACES> </ITEM> is it possible to retrieve as XmlNodeList all the As and Bs nodes that belong to only TAB with NUMBER 1? I use the following codes, but it gives me...

Nodejs code does not execute

node.js,nodes
I have written a code but when I run node index.js on my terminal its just blank... My node script does not even log to the console after creating the server or responding with my index.html file. I even tried changing all 'req' and 'res' to 'request' and 'response' Here's...

Design for determining file extension from header data in files

java,arraylist,nodes
I have an issue I have been trying to wrap my head around for two days now and haven't found anything online (or on here), so I thought I would post this question and see what kind of feedback I get. I have been coding a small program in my...

Circular linked list in Java, when to point to first node?

java,list,nodes,circular-reference
I need to implement a circular single-linked list data structure. What I'm having trouble understanding is when and where do I have to state that the final node of the list must point to the first node. I have the following empty constructor to build the list: public class SList<E>...

Insert node recursively

java,recursion,binary-tree,nodes
I am trying to insert node in a binary tree using recursive method. But once its out of the method the root becomes the new node and left child and right child are null. With this I'm trying to learn how recursion works. Also, does recursive method always has to...

Double Linked List Deleting Node with Index C++ [closed]

c++,nodes,doubly-linked-list
[enter link description here][1]So, I've been having issues with this program I'm working on. I'm new to programming, but I'm very determined in actually learning this language. I have to use these 3 different structs in the program, so the pointers are really starting to trip me up. The function...

Return the (2n/3) element in a linked list while looping once on the list

java,oop,methods,linked-list,nodes
I'm working on a linked-list program, which allows me to loop over the list only once, and I can't copy the elements of the list to another data structure. Suppose that the list is not empty (has at least one node) and the next of the last node is null....

Related nodes are not fetched in Spring Data Neo4j 4.0.0

neo4j,nodes,fetch,spring-data-neo4j,spring-data-neo4j-4
I have a weird problem with the node auto fetching in Spring Data Neo4j 4.0.0. I have a class like below : @NodeEntity public class FilterVersionChange extends UnitVersion { @GraphId private Long id; public FilterVersionChange() { super(); } public FilterVersionChange(String description, Long creationDate) { super(description, creationDate); } @Relationship(type="CONTAINS", direction =...

visualizing clr network in cytoscape

r,graph,nodes,igraph,edges
Does anyone know how I can proceed from generating a clr network to visualizing the network nicely using cystoscape? I used minet package to generate a clr network as follows: source("http://bioconductor.org/biocLite.R") biocLite("minet") library(Rgraphviz) library(minet) data(syn.data) mim <- build.mim(syn.data,estimator="spearman") #net<-minet(syn.data,"mrnet","mi.shrink","equalwidth",10) net <- clr( mim, skipDiagonal=1 ) graph <- as(net, "graphNEL") The...

About pointers to structs and how they works

c,pointers,binary-tree,nodes
i have this code: #include <stdio.h> #include <stdlib.h> typedef struct node{ struct node* next; int data; }NODE; NODE* makeNode (int x){ NODE* new; new = (NODE*)malloc(sizeof(NODE)); new -> data = x; new -> next= NULL; return new; } typedef NODE* linkedlist; void insertnode (NODE** node, int x){ if(!(*node)) *node=makeNode(x); else...

how to get data from ObservableCollection C#

c#,nodes,observablecollection
I use function ObservableCollection in one class. It is defined public to be reachable in another class also. public ObservableCollection<Node> _nodes; public ObservableCollection<Node> Nodes { get { return _nodes ?? (_nodes = new ObservableCollection<Node>()); } } I want to call this ObservableCollection in another class, how to do it correctly?...

Can't add nodes in my linked list (java)

java,linked-list,nodes
I've been working on my add method for a couple of hours now and seem to have hit a roadblock. My method is supposed to search through every node in the list to see if there is a matching employee number and if there isn't, add the object in order...

Find all paths in a directed, unweighted graph for a selected node

javascript,graph,nodes,vis
There have been a few similar questions around this topic but I am having trouble finding something that matches my requirements. I am working on a food web program (in Javascript) and am interested in finding all the possible food chains (paths) that involve a selected species (node). In other...

Deleting multiple nodes from simple linked list on C

c,list,linked-list,nodes,erase
I want to delete all nodes that have the same idteam as key, but it will crash... I know it should also free() the memory, but anyway I thought this should work :S //defining the struct struct players { int idplayer; int idteam; struct players *next; }; struct players *first,...

Why does my node still appear when I set it to null?

java,binary-search-tree,nodes
I'm making a BST (Binary Search Tree). I would like some help with my delete method, it seem that when I set that node to null it stills appear when I display it with my display methods (preorder,inorder,postorder). Here is my node linked list class public class Node<T> { public...

Checking if a node has fully connected neighbours

java,graph,nodes
I have a graph and I want to check whether a node has fully connected neighbours. For a node to have fully connected neighbours, all its neighbours must be also be connected. So, for a node to have fully connected neighbours, the set of its neighbours must be a subset...

Python Linked list with Nodes: find minimum

python,linked-list,nodes
I am trying to create a find_min() method of my UnorderedList: class that is supposed to find the minimum number in the list. def find_min(self): current = self.head previous = None found = False while not found: if current.getData == None: found = True minimum = "None" else: #this is...

node treetable primefaces disappearing

jsf,primefaces,nodes,treetable
I'm developing a application with Primefaces in Liferay, I need use p:treeTable compenent, happens that the nodes are dissapearing when click over p:commandButton. I belive it has relation with ajax, if put code within managedBean in @PostConstruct, it works normal This is my .xhtml <h:body> <h:form id="form"> <p:layout style="min-width:1050px;height:700px" styleClass="semBorda">...

Adding node before sibling in Javascript

javascript,dom,nodes
so I'm learning about manipulating Dom elements and adding nodes. I use this js code: var parent = document.getElementById('div2'); var newNode = document.createElement('p'); var text = document.createTextNode('Text Node!'); newNode.appendChild(text); parent.insertBefore(newNode, parent.childNodes[4]); This is my html within the usual vanilla setup: <div id="div2"> <p> abc </p> <p> cde </p> <p> efg...

How does this linklist flow?

c++,pointers,linked-list,nodes
The structure of the node is as followed: struct Node { int value; Node *next; }; // construct a new node Node * cons( int x, Node* p) { return new Node{x, p}; } Now if I were to type in my main body: Node *p; p = cons(3,nullptr); p...

Neo4j find nodes with the same properties

graph,neo4j,cypher,nodes
I have a Neo4j graph where each node is a person. Each person has two properties: Name and City. And the relationships are: friend_of and love. I'm trying to get the nodes that have friends ONLY in their same city (A live in Paris, B in Paris, C in Madrid,...

Error Printing LinkedList of Structs after Deleting Node

c,linked-list,nodes,deleting
I'm making an employee linked list. Does all the usual stuff, Adding, Searching and Updating. I'm trying to get the delete function working but after the Node is supposedly deleted I can't print the linked list to see. Here is the complete code, as well as the error message. Thanks...

XSLT 1.0 - Multiple Child Nodes Formatted Output

xslt,nodes
I can do this with For-Each but having some problems with Apply_Templates. The XML Data contains varying child nodes but I want to display all child nodes with their parents information. <orders> <order> <customer>1</customer> <items> <item> <name>Widget A</name> <price>10</price> <code>1A</code> </item> </items> </order> <order> <customer>2</customer> <items> <item> <name>Widget A</name>...

D3 Force Layout: How to dynamically orient teardrop-shaped nodes?

javascript,d3.js,nodes,shape,force-layout
I want to have teardrop-shaped nodes with dynamic orientation, such that the directionality of the node alone reveals its source and target node. This is my code so far (the code for the teardrop was taken from this example: http://bl.ocks.org/mbostock/849853) and the graph it produces: http://jsbin.com/kigiwinida/edit?html,output But what I ultimately...

Neo4j Agreggation Subtraction Nodes and propierties

neo4j,cypher,nodes
I'm starting with Neo4j and using graphs, and i'm trying to get the following: I have to find the subtraction(difference) between the number of users (each user is a node) and the number of differents names they have. I have 16 nodes, and each one has his own name (name...

Return Nodes related with a relatiohip to other Neo4j

neo4j,nodes
i have just started using Neo4j, and after creating the whole graph i'm trying to get all the nodes related to another one by a relatioship. Match (n)-[Friendship_with]->({Name:"Gabriel"}) return n That should give me the nodes that are friend of Gabriel, what i'm doing wrong? I have used too this:...

prolog need to compute the tree size

prolog,size,nodes
I need to get the size of a tree using: size(Tree,Size) What I have so far is wrong, please advise! size(empty, Size). size(tree(L, _, R), Size) :- size(L, Left_Size), size(R, Right_Size), Size is Left_Size + Right_Size + 1. Output should produce: ?- size(node(1,2),X). X = 2. ?- size(node(1,[2,3,4]),X). X =...

Deleting a node from a doubly linked list AND freeing up its space as well

c++,nodes,doubly-linked-list
I'm working on an assignment and there's a problem I'm stuck on. So I'm making a doubly linked list. I want a a delete function that will take item as argument, search for that argument in the list. when it has found the node which contains that item, I have...

Issues with reversing the linkedlist

java,algorithm,linked-list,nodes
I'm trying to learn about linked list and it has been little challenging for me. I'm trying to reverse the link list with recursive method. Here is my code: public class ListNode { Node head = null; int nodeCount= 0; int counter = 0; ListNode(){ head = null; } public...

nodes and structures in c

c,struct,nodes,huffman-coding
I'm trying to make a huffman coder.. but I'm having some problems... This is how I define my structure of a node.. struct node{ int type,prob; char *code; struct node *left, *right; }; I order by probabilities and I create a new node struct node join_nodes(struct node no1, struct node...

Linked List and Input

c,pointers,struct,linked-list,nodes
The general goal I have is to be able to enter in a string and have it be added to a list. My main issue has to due with makenewnode. I am fairly confident that main and my struct are solid, i'm somewhat confident in the basic code in search,...

Setting data to a nodePtr without overwriting

c,struct,binary,nodes
Okay so i would like to know how to set a data structure that has other types of data such as road or city inside the struct but it doesnt have an array for the struct data type. Struct data { Char city[MAX_LENGTH]; Char road[MAX_LENGTH]; } In main: Data data;...

Neo4j nodes or relationship supports ttl?

neo4j,cypher,relationship,nodes,ttl
I am learning neo4j , i want to know that is there any way that i can create a relationship or a node that will be delete automatically after a certain period of time.

How to find and drop a student with nodes

c,struct,nodes,doubly-linked-list
Im having trouble trying to figure out what to do as far as dropping my students using the nodes that they are tied too because for some reason i cannot remove a node from the middle of my list. I havent been able to figure it out. Any ideas would...

Cannot Instantiate the type Node

java,installation,nodes
I have 2 classes in my project. One of these classes has the class and contructor for Node: public static class Node { public Float key; // sorted by key private String val; // associated data private Node left; // left and right subtrees private Node right; private int N;...

How to sum nodes with XSL?

xml,xslt,nodes
Hi, I found this, but isn't what I want. I want this output Driver B 27 Driver A 18 This is the XML: <grid> <driver> <name>Driver B</name> <points> <imola>10</imola> <monza>9</monza> <silverstone>8</silverstone> </points> </driver> <driver> <name>Driver A</name> <points> <imola>7</imola> <monza>6</monza> <silverstone>5</silverstone> </points> </driver> </grid> And this is the XSLT:...

Using foreach statement and switch for checked multiple nodes

c#,winforms,foreach,switch-statement,nodes
I'm dealing on nodes, child nodes, child's child nodes in a TreeView list; not to mention, checkboxes. My goal is to select/check multiple nodes and each node linked to an exclusive code will execute with just a click of a button. I've thought of using foreach statement with switch and...

Single Linked List: Null Pointer Exception when searching through list with while loop

list,while-loop,nullpointerexception,linked-list,nodes
Im having trouble with this method im trying to get to work. My assignment is to delete the first occurance of an element. It works fine when there is a element to delete in the list. But if i search for an element that is not in the list, it...

PHP - Two same nodes in xml

php,xml,nodes
I have the following code: <?php $str = '<?xml version="1.0" encoding="utf-8"?> <ROOT> <ITEM> <TITLE>Title1</TITLE> <CATEGORY>Books</CATEGORY> <CATEGORY>Books | Novel</CATEGORY> </ITEM> <ITEM> <TITLE>Title2</TITLE> <CATEGORY>Books</CATEGORY> <CATEGORY>Books | Sci-fi</CATEGORY> </ITEM> </ROOT>'; $xml = simplexml_load_string($str); $s_xml = $xml->xpath("/ROOT/ITEM"); foreach($s_xml as $s_cat){ $cat_group =...

Constructor and const reference

c++,constructor,nodes,copy-constructor,const-reference
I;m study C++ right now (started like 2 days ago) and I have some trouble with writing Copy C'tor of Node. Node is a class as following: template <class T> class Node { T* data; Node<T>* next; friend class Iterator<T>; public: Node():data(NULL),next(NULL){} Node(const T& data):data(NULL),next(NULL){ T* copy = new T(data);...

How to reshape a networkx graph in Python?

python,matplotlib,nodes,shape,networkx
So I created a really naive (probably inefficient) way of generating hasse diagrams. Question: I have 4 dimensions... p q r s . I want to display it uniformly (tesseract) but I have no idea how to reshape it. How can one reshape a networkx graph in Python? I've seen...

Giving unique IDs to all nodes?

python,class,tree,nodes
I am making a class in Python that relates a lot of nodes and edges together. I also have other operations that can take two separate objects and merge them into a single object of the same type, and so on. However, I need a way to give every node...

Abstract classes in Java

java,class,graph,nodes,abstract
So, I have an object-oriented assignment to do. Small part of it is to make a graph, made out of nodes, which can be either a type category or type product. The category has only a name ([a-zA-Z0-9]+) as parameters. The product hast a name ([a-zA-Z0-9]+) and an id (>=0)....

JavaFx TreeCell how to expand nodes after one second

javafx,nodes,expand,treecell
i'm implementing the Drag&Drop on a generic TreeView. My purpose is to expand a folder during DragEntered event after a second of stationing, actual code: setOnDragEntered(e -> { TreeItem<TreeItemContent> enteredItem = getSourceItem(e); if(model.isFolder(enteredItem)){ enteredItem.setGraphic(images.getFolderOpened()); enteredItem.setExpanded(true); } e.consume(); }); desired: setOnDragEntered(e -> { TreeItem<TreeItemContent> enteredItem = getSourceItem(e); if(model.isFolder(enteredItem)){ if(dragDuration >= 1...

SQL Server Script - select xml child nodes of root as (n)varchar

sql,sql-server,xml,nodes
I need to create a SQL Server script and a part of the script is selecting the names of the immediate child nodes of the root node and convert it to a (n)varchar. I don't need the attributes or content of the node. This is an example of the xml:...

Modifying Dijkstra's Algorithm to find shortest path with largest weighting

java,algorithm,graph,nodes,dijkstra
I'm in need of a piece of code that finds the shortest path between nodes with the greatest weighting. For example, the quickest route from A to D, but with the greatest weighting: - B- --E / \ / A D \ / \ C - -F So right now...

Count nodes with specific number of children in a binary tree?

c++,recursion,binary-tree,nodes,children
I have this challenging exercise I got from a book about c++, and i'm not sure how to tackle this problem. I must define a function called treeNodeCount() which returns the number of nodes in a binary tree (easy enough), and I also have to define an overloaded function that...

Key Error when computing node distances in graph

python,dictionary,graph,nodes,floyd-warshall
I keep getting this key error, and I cannot understand how. I am using a for-in statement, so the keys definitely exist: def floydWarshall(inFile): graph = readGraph(inFile) print(graph) # = {'0': {'1': 28, '3': 33}, '2': {'3': 50}, '1': {'4': 44, '2': 10}, '3': {'4': 30}, '4': 999999999} nodes =...

Get only the nodes related with bidirectional relatioship

graph,neo4j,cypher,nodes,relationship
I have a neo4j graph where A-[r:LOVE]->B and B-[r:LOVE]->A. I'm trying to get all the nodes with that bidirectional relatioship (some nodes for example C-[r:LOVE]->B but B not love C) and I must get them only 1 time (i don't want to get them duplicated) and ordered by name. I'm...

Find the parent node of a node in binary search tree

c++,binary-search-tree,nodes
So I want to find the parent node of a Node in a binary tree. Suppose that I input 30,15,17,45,69,80,7 in the tree through a text file. The tree should be 30 15 45 7 17 69 80 And here is my code : Node* BST::searchforparentnode(Node* pRoot, int value) {...

adding node at ith position

c++,nodes
I want to create a link list with a size of 5 and add some nodes at ith position. I will add the nodes at random position say (0, 5 and 2) of the link list. this is what it looks like adding the node at position 0. 0 +---------+...

Javax JCR Node getProperties and Titles

java,swing,jsp,nodes,jcr
I am given a Node and I then request form it another Node. Node nn = node.getNode("jcr:content"); From here I can do the following to get the value of nn.getProperty("cq:lastModified") What I am trying to do is get all the properties without asking for each one by name. Node nn...

How to see all attributes of a node in Maya?

python,nodes,maya
I'm trying to update some attribute values in Maya via code and I'm having a really tough time accessing them. I need the attributes displayed name, (I'm pretty sure this is supposed to be their 'Nice Name'), but I can't seem to get them in any way. Using listAttr or...

How to limit the display of a Searched Node in a JTree to itself and its parents (other nodes will be excluded in the display)?

java,user-interface,search,nodes,jtree
I want to display the searched node and its parents only. I wanted to exclude the unrelated nodes. My code only does search and display but it does not filter out the other nodes. They are still in the display. What approach can be done to do this? You can...

How to get the Stanford parser output as a list of nodes and edges?

java,graph,nodes,stanford-nlp,edges
I'm processing a batch of text files, and I need to use the Stanford parser's output as a numeric list of nodes and edges where Nodes have IDs and labels, edges consist of two node ids and an edge weight like: Node List: 1  A , 2  B... Edge list: 1 2 10,...

Spring Data Neo4j 4.0.0: Can't Create Relationship Between Nodes with the Same Label

java,neo4j,nodes,relationship,spring-data-neo4j-4
I'm using Spring Data Neo4j 4.0.0 with Neo4j 2.2.1 and I'm trying to create a relationship between two nodes with the exact same labels. So, I have a NodeEntity class and I have a variable inside with the same Type as the class itself, and annotate it as Relationship. But,...

adding new nodes at head

c++,nodes
Pardon me. I am new to C++. I tried to add the third node as the the head node and initialize 5 for the data but it seems that it destory the pervious linklist of 1->2. so current output only on outputs 5 and my expected output will be 5...

EnumerateChildNodesWithName, Can't seem to Remove nodes

swift,position,nodes,enumerate
I'm trying to remove some nodes from a parent node once they reach a certain x position. The problem I have is that the parent node is changing x position, but the children are not changing x position inside the parent (but are obviously moving with the parent), so when...

Recusively count children nodes in binary tree

java,recursion,binary-tree,nodes
So my coding exercise is given the reference to the node count its children. I've decided to use recursion and I was wondering is this a elegant way to do this: Let's assume there is class Node which represent every node in the tree: public Node { int data: Node...

Sort nodes based on inputs / outputs

python,nodes
I have a node system where every node only stores its inputs and outputs, but not its index. Here is a simplified example: class Node1: requiredInputs = [] class Node2: requiredInputs = ["Node1"] class Node3: requiredInputs = ["Node2"] class Node4: requiredInputs = ["Node3", "Node2"] Now I want to order that...

What is node in a tree?

data-structures,tree,nodes,treenode
According to wiki, everything in a tree is a node. Terminologies used in Trees Root – The top node in a tree. Parent – The converse notion of child. Siblings – Nodes with the same parent. Descendant – a node reachable by repeated proceeding from parent to child. Ancestor –...

Method not recognizing the call this in JavaFX application

java,arraylist,javafx,nodes
I'm working on a program that displays circles colliding with the wall and with themselves. I'm having trouble with the method that will compensate for collisions. public class bouncyFX extends Application { public ArrayList<Ball> arr = new ArrayList<Ball>(); public static void main(String[] args) { launch(args); } static Pane pane; @Override...

Getting a weird java.lang.NoSuchMethodError for my classes

java,methods,runtime-error,nodes,treenode
I am trying to implement TreeNodes and BSTs and I have written two files to start me off. However, even at this point I am getting a really weird error. At runtime I am being told a method that clearly exists doesn't exist. Here are both of the classes for...

Merging nodes with the same data using Neo4j

merge,neo4j,cypher,nodes,graph-databases
Here is what I want to do: Connect users to the videos they watch like user -> video in a social graph or network type of graph. How I did it: LOAD CSV WITH HEADERS FROM 'asdfjkl;' AS line CREATE (u {user: line.user }) - [:VIEW] -> (v {video: line.video})...

Reduction of list dimensions in Python

python,list,indexing,nodes
I'm trying to assign classes to a list of nodes, and separate all nodes into separate lists based on class tag. For example, if we have the following code: #define number of classes MaxC=5 index=[4 4 5 1 4 1 4 5 4 4 3 1 3 3 1 1]...

Class for AVL trees (C++)

c++,tree,nodes,avl-tree
So I wanted to make an AVL tree in C++. I used a class to make the nodes and a class for the rest of the fuctions (instert, delete etc). When I want to make more than one tree I decided that I needed to make more roots (one for...

Indefinite quantity of a class member variable(C++)

c++,class,pointers,linked-list,nodes
The C++ program I'm working on is designed to create a custom doubly Linked List class in C++ by utilizing an indefinite number of node struct pointers with a data value and two pointers inside. That's the premise of this program. Can't use the STL LinkedList class, have to make...

How to get Node class instance from MObject in Maya API

c++,plugins,nodes,maya
In a cpp plugin I am developing in Maya API, I register a custom MPxTransform Node in the initializePlugin function: status=pluginFn.registerTransform("mympxtransform", myMPxTransformClass::id, &myMPxTransformClass::creator, &myMPxTransformClass::initialize, &myMPxTransformMatrixClass::creator, myMPxTransformMatrixClass::id); And then create the node programmatically: MDagModifier mdagmod; MObject MyMObject; MyMObject=mdagmod.createNode("mympxtransform",MObject::kNullObj,&status); I can see the node properly created in the...

How to prevent TreeView rename from making a duplicate

c#,treeview,nodes
I've seen lots of posts asking a question similar to this, but none seem to answer the question. I have a TreeView of vendors like this: Soda Regular SmallCan SmallBottle Diet SmallCan Water Regular EcoBottle I created a context menu that allows the user to rename the selected node, but...

Getting text from between two html nodes using HtmlAgilityPack

c#,linq,xpath,html-agility-pack,nodes
Suppose I have the following HTML <p id="definition"> <span class="hw">emolument</span> \ih-MOL-yuh-muhnt\, <i>noun</i>: The wages or perquisites arising from office, employment, or labor </p> I want to extract each part separately using HTMLAgilityPack in C# I can get the word and word class easily enough var definition = doc.DocumentNode.Descendants() .Where(x =>...

PHP XML - Child nodes retriving data

php,xml,nodes,children
I have a problem in php. I can only retrive the value of the fist tag. This is the XML file <?xml version="1.0" encoding="UTF-8"?> <Response> <reservation id="000020" internalId="7366776" > <ccData ccExpireDate="null/null" /> <reservationDetail id="2_0" currency="" /> <dayPrice detailId="" roomId="2" day="2015-08-01" /> <dayPrice detailId="" roomId="2" day="2015-08-02" /> </reservation> <reservation id="000010" internalId="7366642"...

CytoscapeJS - show node neighborhood?

jquery,nodes,cytoscape.js
I have a dataset in JSON format containing information about nodes and edges which I am using to generate a network graph in cytoscapeJS. The JSON data contains id, value, shape, colour and visibleDisplay ('element' or 'none') attributes for nodes and id, source, target and label for edges. My stylesheet...

Remove() function in Queue using a doubly linked list

c++,list,function,queue,nodes
I have written the program below and overall it seems to work fine... Except that the remove() function keeps deleting all of the values in the queue without even being called... #include <iostream> #include <string> using namespace std; //Create a node struct struct Node { int data; Node *next; Node...

Set node state in a virtual tree

delphi,nodes,virtualtreeview
I have created a virtual tree with multiple node and I want to disable some of them. I've seen there's a States property of a node. Which is a property of a type TVirtualNodeStates so I've check what kind of states I can set and apparently TVirtualNodeStates is a set...

C linked list and nodes program, why am I getting a unhanded exception?

c,linked-list,malloc,nodes,unhandled-exception
How do I fix error I keep getting when I run the program? Im trying to make head point to the address of first and then be able to pass *first through a function where a new node will be created, the user can give it data at run-time, and...

Deleting nodes in a binary search tree in python?

python,python-3.x,binary-search-tree,nodes
so I'm stuck on a question in my computer science class, it asks for me to extend our previously written binary search tree class, and add a way to delete nodes from the tree, this will have to take into consideration if that node has 0, 1, or 2 children....

C++ Unable to Print Pointer Data of a Linked List

c++,linked-list,nodes
I'm dealing with a doubly Linked List. It's made up of classes and is centered around the current node (instead of a node in the beginning or end of the list). Now my print function will throw an error but only if I have traversed the list at all. My...

huffman without using node [closed]

java,compression,nodes,huffman-coding
I'm thinking on possibility of making a Huffman code without "node". It's based on the nodes then my question seems a bit ambiguous. I know,maybe we have to use string's abilites ... Is it possible ? and if "YES" how Is it possible in java? Thanks....

xpath matches function expression for same name node content

java,regex,xpath,nodes
With the example below, I can not run following XPath expression: //Test[matches(Name1/text(),".*text.*")] and ExpressionExpection be triggers. As against the expression //Test[matches(Name/text(),".*text.*")] work normally! Please explain why and how this problem be paid? because I spent a lot of time on it without result. Thank you in advance. My exemple: <?xml...

Java Generics function calling

java,oop,linked-list,nodes,generic-collections
I'm creating my own linklist data structure in java where each node in the linked list will hold an object of a another class (car class for eg).So it'll basically be a linked list of cars. public class car { private String carName; private double price; car(String name,double price){ this.carName=name;...

Prevent duplicates from being added to Binary Search Tree

java,recursion,nodes,binary-search-tree
This is homework. Please don't give me just code. The assignment was to implement several methods that a BST uses; among those, was add(T data) and remove(T data). I was able to successfully implement them. Here were the guidelines for the two methods: public void add(T data) If the data...

Removing fixed classes does not properly remove them from the presetation

jquery,class,d3.js,nodes,fixed
Concerning: Remove all .fixed classes from force layout nodes with jQuery I can remove the fixed classes now. But the nodes are still fixed in the view. So simply removing the class is not enough I believe. I didn't find any help in the docs of D3 as well....

Selecting all info from nodes with the same name

sql,sql-server,xml,nodes
I'm a total newbie when it comes to xml stuff. So far I have this piece of xml that I want to extract info from, but all the node names are the same (so it just grabs one of them, unless stated otherwise). It looks something like this: <DocumentElement> <Screening>...