Neo4j getting started (iv): Cypher Query OptimizationFirst of all, it's still the same, clear all the content in the current database, clean up and start learning a new chapter.
Match (n)-[r]-(n1)
Delete r, n, n1
Match (n)
Delete n
Next, use the characters and contacts in the second blog:
CREATE (bradley: MALE: TEACHER {name: 'bradley ', surname: 'green', age: 24, country: 'us '})
CREATE (matthew: MALE: STUDENT {name: 'Matthew ', surname: 'co
Neo4j using the Cypher languageCypher language is the use of database operation language (DML) when learning neo4j, including the deletion and modification of graph dataThe concept of neo4j database simple and violent comprehension:There is no concept of table in neo4j, there are only two types: node and association (Relation), which can be easily understood as the points and edges inside the graph.In a data query, a node is usually enclosed in parent
radians
RAND ()
sign (expression) takes a symbol
String
RETURN Str (1), str ("Hello")Add quotation marks to both ends
Replace (original, search, replace)
SUBSTRING (original, start [, length])
Left (original, length) returns a substring
SPLIT (original, Splitpattern)
REVERSE (original)
TOSTRING (expression) Note the difference from STR
Schema
Index
CREATE INDEX on:P erson (name)
DROP INDEX on:P
Shortest PathAll shortest paths (equal length)
Creating nodes and relationshipscreate (n1{num:1}),(n2{num:2}),...//这里n是变量名 create (n1)-[:rel]->(n2) //rel表示某种关系
deleting nodes and relationshipsdelete nIf the node is deleted, only the node is deleted and the relationship is not deleted, so ensure that the relationship has been deleted and the node is deleted
Show all nodes and relationshipsstart n=node(*),r=relationship(*) return n,r
Check Match Index
Configuration
Substitution cypher
Time Limit: 1.0 seconds memory limit: 65536 K multiple test files
Substitution cyphers are the simplest of cyphers where the letters of oneAlphabet are substituted for the letters of another alphabet. In one form orAnother, they 've been in use for over 2000 years.
input A line containing the plaintext alphabet A line containing the substitution alphabet several lines of text output A line containing the substitutio
traversal, the output "no"1#include 2#include 3#include 4#include 5 using namespacestd;6 7 Const intMAXN = 1e6 +5;8 intVIS[MAXN];//Save the result of 0~len-1 a number mod a in string9 strings;Ten One intMain () A { - #ifndef Online_judge -Freopen ("In.txt","R", stdin); the #endif //Online_judge - intA, B; - while(Cin >> s >> a >>b) - { +memset (Vis,-1,sizeof(Vis)); - intTMP =0; + intLen =s.size (); A at for(inti =0; I 1; i++)//at least one for
Tags: Technical system modification nbsp Usage src Basic Date returnAny database based on additions and deletions to the four functions, and neo4j use of the cypher language. Cypher is a very good language for working with graph databases, and here are some basic features to learn about his basic usage. Let's do a demonstration with our intelligent Motion Picture quiz System.Create a NodeThere are two ways
Javascript randomly extracts 10 numbers that are not repeated between 0 and 100, and randomly extracts 0-
Currently, only two simple methods are available to help you randomly extract 10 numbers that are not repeated between 0 and. The specific content is as follows:
FirstRewritable array Length
Idea: You can use the for loop from 0 to 100 to put it in an array, and then randomly disrupt the 100 numbers usi
(Conversion) OpenCV extracts each frame of the video and then combines consecutive images into a video. opencv extracts
Reference blog: http://blog.sina.com.cn/s/blog_60b330b801018s0u.html
Running Environment: Win7 OpenCV1.0 VC6.0. The following video generation Code uses the XVID encoder. If no download is required on the computer, otherwise the size of the generated video file is 0. Or you can set cvCreat
");$rand _keys = Array_rand ($input, 2);Print $input [$rand _keys[0]]. "\ n";Print $input [$rand _keys[1]]. "\ n";
Output:
Trinity
Cypher"Attention"when Num_req is 1 o'clock, the non-array data is returned, and when Num_req >=2, the array data is returned, so if the number is not determined to be 1, it is recommended that you convert the array in the following way:
$num _req = max (1, $num _req);$num _req = min ($num _req, Count ($input));$rand _k
Tags: file extract directory NameFirst, use ${}1, ${var##*/}The purpose of this command is to remove the variable var from the left side of the last '/' character and its left side of the content, return from the left side of the last '/' (excluding the character) to the right of the content. Examples of use and results are as follows:[[Email protected]:] Var=/home/user/1.txt[[Email protected]:] Echo ${var##*/}1.txtThe operation extracts the file name
Extracts the largest integer, smallest integer, sum, average, from an array of integersDeclare an array of type int, and arbitrarily assign the initial valueInt[] nums={1,2,3,4,5,6,7,8,9,0};Declares two variables to store the maximum and minimum valuesint Max=int. Minvalue;//nums[0];int Min=int. Maxvalue;//nums[0];int sum=0;Loop to compare each element in the array with my maximum, minimum valuefor (int i=0;i{if (Nums[i]>max){Max=nums[i];}if (nums[i]{
Photoshop production of skin care posters from plant extracts
The tutorial focuses on the method of rendering the leaves of cosmetics, just like the normal leaf-drawing method, except that the leaves have multiple layers, with some styling, while drawing attention to the good details.
Related knowledge: How Photoshop makes gorgeous drink poster
Final effect
1, draw the basic outline.
2. Draw the root of the leaf with t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.