nodes

How to delete/create databases in Neo4j?

这一生的挚爱 提交于 2019-11-28 15:24:24
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 or rm ? Peter Neubauer You can just remove the entire graph directory with rm -rf , because Neo4j is not storing anything outside that: rm -rf data/* Also, you can of course iterate through all nodes and delete their relationships and the nodes themselves, but that might be too costly just for testing ... even more simple command to delete all nodes

Delete all elements of a certain type from an XML doc using PHP

ぃ、小莉子 提交于 2019-11-28 14:19:49
I have what should be an easy task: delete <places> nodes and their descendants from an XML document, leaving other nodes. I tried this code, but it did not work ... $document->preserveWhiteSpace = false; $books = $xpath->query('piletilve_info/places'); //echo "4"; foreach ($books as $places) { while($places->hasChildNodes()) { $places->removeChild($places->childNodes->item(0)); } $places->parentNode->removeChild($places); } Source XML to be processed: <piletilve_info> <places> <place> ... </place> </places> <other node> ... </other node> </piletilve_info> In the actual data there are more

Group/merge childs of same nodes in xml/xslt

半世苍凉 提交于 2019-11-28 12:33:50
I am new to XSLT and changing it manually will take a lot of time. <GroupData ID="xxx" Key="4" Temp="yyy"> <ItemData ID="zzz" Value="3"/> </GroupData> <GroupData ID="xxx" Key="4" Temp="yyy"> <ItemData ID="www" Value="1982"/> </GroupData> I want to have the childs of these multiple GroupData nodes within the same group, i.e., <GroupData ID="xxx" Key="4" Temp="yyy"> <ItemData ID="zzz" Value="3"/> <ItemData ID="www" Value="1982"/> </GroupData> So I need to merge/combine/match them on both GroupData's ID and Key attributes (these vary within the file). Also some do not have a Key attribute. How

How do you find the deepest node (steps) - Xpath - php - xml -

我是研究僧i 提交于 2019-11-28 11:37:43
问题 Greetings How do you find the deepest node? So for this example, String would be the deepest node: and the result that I want is 5 <org.olat.course.nodes.STCourseNode> 0 <ident>81473730700165</ident> 1 <type>st</type> <shortTitle>General Information</shortTitle> <moduleConfiguration> 2 <config> 3 <entry> 4 <string>allowRelativeLinks</string> 5 <--- <string>false</string> </entry> <entry> <string>file</string> <string>/kgalgemeneinformatie.html</string> </entry> <entry> <string>configversion<

How to compare two DOMs or DOM nodes in general?

筅森魡賤 提交于 2019-11-28 11:22:07
I am using var win1 = open.window(...); var win2 = open.window(...); to open 2 tabs/windows in Firefox - now I want to compare the two DOMs (document object models) for similarity. So I have got two DOMs containing a very similar page. The pages have the same HTML but executed different JavaScript files. In general I check if HTML and CSS is the same: var html1 = win1.document.body.innerHTML; var html2 = win2.document.body.innerHTML; if (html1 == html2) { ... } var css1 = win1.document.body.style.cssText var css2 = win2.document.body.style.cssText if (css1 == css2) { ... } But comparing all

How to refer to children in a tree with millions of nodes

假如想象 提交于 2019-11-28 11:15:56
问题 I'm attempting to build a tree, where each node can have an unspecified amount of children nodes. The tree is to have over a million nodes in practice. I've managed to contruct the tree, however I'm experiencing memory errors due to a full heap when I fill the tree with a few thousand nodes. The reason for this is because I'm attempting to store each node's children in a Dictionary data structure (or any data structure for that matter). Thus, at run-time I've got thousands of such data

CastError: Cast to ObjectId failed for value “route-name” at path “_id” for model

拟墨画扇 提交于 2019-11-28 10:48:29
问题 I can’t seem to get this issue resolved. I’m getting this error message when hit this URL http://localhost:5000/sysaccess/test. (node:34256) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CastError: Cast to ObjectId failed for value "test" at path "_id" for model "sysaccess" (node:34256) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a

R reciprocal edges in igraph in R

↘锁芯ラ 提交于 2019-11-28 08:19:48
问题 I am working with graphs in R. I am currently using igraph and I would like to be able to plot bidirectional edges "reciprocal edges" of a graph. So far I've seen it is possible to plot "bidirectional" graphs but not reciprocal edges, for example: E(1,3) and E(3,1) could potentially be represented as a bidirectional edge <-->, but instead I would like to plot two parallel edges one pointing to the opposite direction of the other || . There exist in Rgraphviz an option when plotting "plot(rEG,

I m trying to sort the node by score. I do not know what error i am having

坚强是说给别人听的谎言 提交于 2019-11-28 02:25:15
#include<stdio.h> #include<stdlib.h> #include<conio.h> struct student{ char firstname[20]; char lastname[20]; double grade; char zipcode[10]; struct student *next; }; void display(struct student *first) { while (first != NULL) { printf("\nFirst name: %s", first->firstname); printf("\tLast name: %s", first->lastname); printf("\tGrade: %.2f", first->grade); printf("\t ZipCode: %s", first->zipcode); first = first->next; } } /*void add_Record(struct student *first) { char r[20]; struct student *t; t = first; while (t != NULL) { if (t == NULL) { first = (struct student*)malloc(sizeof(struct student

Delete Last Node of a Linked List

我们两清 提交于 2019-11-28 01:38:28
I am practicing working with Linked List Nodes and have come upon a problem I don't know how to answer. How do you go about deleting the last node in a linked list. The code below works for all entry's bar the last node. The last does not get deleted. Node Class public class Node { private String data; private Node next; Node(String data, Node next) { this.data = data; this.next = next; } public void setData(String d) { data = d; } public void setNext(Node n) { next = n; } public String getData() { return data; } public Node getNext() { return next; } Main Node list = new Node("NODE 1",new