This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// pass by ref example | |
#include <iostream> | |
using namespace std; | |
/* | |
store memory address using pointer type variable. | |
int* x : x is a variable to store memory address | |
of another variable. | |
*x : use this syntax to access value from memory address. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create db | |
create(a{n:"a"}),(b{n:"b"}),(c{n:"c"}),(d{n:"d"}),(e{n:"e"}), | |
a-[:parent_of]->b, | |
a-[:parent_of]->c, | |
b-[:parent_of]->d, | |
d-[:parent_of]->e, | |
e-[:parent_of]->c, | |
d-[:parent_of]->c; | |
#do query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
START n=node(*) | |
WHERE has (n.name) | |
and n.name="Google" | |
RETURN n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#count node | |
START n=node(*) | |
RETURN count(n) | |
#count relationship | |
START r=relationship(*) | |
RETURN count(r) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#get all nodes | |
START n=node(*) | |
RETURN n; | |
#delete all nodes | |
MATCH (n) | |
OPTIONAL MATCH (n)-[r]-() | |
DELETE n,r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create db | |
create(a{n:"a"}),(b{n:"b"}),(c{n:"c"}),(d{n:"d"}),(e{n:"e"}), | |
a-[:parent_of]->b, | |
a-[:parent_of]->c, | |
b-[:parent_of]->d, | |
d-[:parent_of]->e, | |
e-[:parent_of]->c, | |
d-[:parent_of]->c; | |
#do query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#nodes.csv | |
Node Rels Property | |
0 4 TEST | |
1 0 TEST | |
2 1 TEST | |
3 1 TEST | |
#rels.csv | |
Start Ende Type Property | |
0 3 FIVE Property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maruf@leopard:~/Desktop/bi/batch-import$ java -server -Xmx4G -jar target/batch-import-jar-with-dependencies.jar target/db nodes.csv rels.csv | |
Usage: Importer data/dir nodes.csv relationships.csv [node_index node-index-name fulltext|exact nodes_index.csv rel_index rel-index-name fulltext|exact rels_index.csv ....] | |
Using: Importer target/db nodes.csv rels.csv | |
Using Existing Configuration File | |
Importing 4 Nodes took 0 seconds | |
Importing 4 Relationships took 0 seconds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install --user package-name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
im1 = imread(file1); | |
im2 = imread(file2); | |
imshow(im1); | |
figure, imshow(im2); |