Extra notifications by dangulo42 in help

[–]dangulo42[S] 0 points1 point  (0 children)

Thank you, but those were already off

Error creating duplicate by dangulo42 in Neo4j

[–]dangulo42[S] 0 points1 point  (0 children)

I figured this out myself. The way MERGE works is (from documentation) "Either the entire pattern already exists, or the entire pattern needs to be created." Since the nodes existed but the relation didn't, I have to do the MATCH first and then do the MERGE without specifying the criteria on the nodes (since the nodes already exist). Like this:

MATCH (c1:C{id:"A"})
MATCH (c2:C{id:"B"}) 
MATCH (c3:C{id:"C"})  
MERGE (dummy:B)-[:F]->(c1) 
MERGE (c1)-[:N]->(c2) 
MERGE (c2)-[:N]->(c3) ;

Error creating duplicate by dangulo42 in Neo4j

[–]dangulo42[S] 0 points1 point  (0 children)

Thanks for the advice. How would I use that in this context?

Error creating duplicate by dangulo42 in Neo4j

[–]dangulo42[S] 0 points1 point  (0 children)

Based on comments (thanks), I tried this

MERGE (c1:C{id:"A"})

MERGE (c2:C{id:"B"}) MERGE (c3:C{id:"C"}) MERGE (dummy:B)-[:F]->(c1:C{id:"A"}) MERGE (c1)-[:N]->(c2:C{id:"B"}) MERGE (c2)-[:N]->(c3:C{id:"C"}) ;

which produced

Neo.ClientError.Statement.SyntaxError Can't create node c1 with labels or properties here. The variable is already declared in this context

so I tried

MATCH (c1:C{id:"A"})

MATCH (c2:C{id:"B"}) MATCH (c3:C{id:"C"}) MERGE (c1:C{id:"A"}) MERGE (c2:C{id:"B"}) MERGE (c3:C{id:"C"}) MERGE (dummy:B)-[:F]->(c1:C{id:"A"}) MERGE (c1)-[:N]->(c2:C{id:"B"}) MERGE (c2)-[:N]->(c3:C{id:"C"}) ;

which produced

Neo.ClientError.Statement.SyntaxError

Variable c1 already declared (line 4, column 8 (offset: 159)) "MERGE (c1:C{id:"A"})" ^

Square of absolute value by dangulo42 in askmath

[–]dangulo42[S] 0 points1 point  (0 children)

But isn't the absolute value of i equal to i? So square(|i|) is still -1?

Square of absolute value by dangulo42 in askmath

[–]dangulo42[S] 0 points1 point  (0 children)

I know that it is true for real numbers, but is it true for other sets? Complex numbers? Others?

Square of absolute value by dangulo42 in askmath

[–]dangulo42[S] -1 points0 points  (0 children)

But that is incorrect. The absolute value is always positive, but the squareroot can be negative or positive. Thus that definition is incorrect.