Tutorial by Examples: c

user = db.labels.create("User") u1 = db.nodes.create(name="user1") user.add(u1) u2 = db.nodes.create(name="user2") user.add(u2) You can associate a label with many nodes in one go Language = db.labels.create("Language") b1 = db.nodes.create(name=&quot...
u1.relationships.create("likes", b1) u1.relationships.create("likes", b2) u2.relationships.create("likes", b1) Bi-directional relationships u1.relationships.create("friends", u2)
from neo4jrestclient import client q = 'MATCH (u:User)-[r:likes]->(m:language) WHERE u.name="Marco" RETURN u, type(r), m' "db" as defined above results = db.query(q, returns=(client.Node, str, client.Node)) Print results for r in results: print("(%s)-[%s]->...
<?php function dbx_get_file($token, $in_filepath, $out_filepath) { $out_fp = fopen($out_filepath, 'w+'); if ($out_fp === FALSE) { echo "fopen error; can't open $out_filepath\n"; return (NULL); } $url = 'https://content.dropbox...
In this example, the total cost of buying food items is found by taking the number of each item and multiplying it by its cost and then adding all those values together. Instead of creating a separate column for Number times Price and then summing the values in that new column, we can calculate ...
SciPy provides basic image manipulation functions. These include functions to read images from disk into numpy arrays, to write numpy arrays to disk as images, and to resize images. In the following code, only one image is used. It is tinted, resized, and saved. Both original and resulting images a...
<?php get_template_part( 'foo' ); ?> Includes ../wp-content/themes/your-theme-slug/foo.php
<?php get_template_part( 'foo','bar' ); ?> Includes ../wp-content/themes/your-theme-slug/foo-bar.php
<?php get_template_part( 'dir/foo' ); ?> Includes ../wp-content/themes/your-theme-slug/dir/foo.php
<?php get_template_part( 'dir/foo', 'bar' ); ?> Includes ../wp-content/themes/your-theme-slug/dir/foo-bar.php
In the example project.json below, an assembly Microsoft.AspNet.Identity.EntityFramework was added which is mscorlib based. { "version": "1.0.0-*", "dependencies": { "Microsoft.AspNet.Identity.EntityFramework": "2.2.1", ...
Targeting multiple frameworks with project.json is simple. However the result are two different compilations. Take the following example: { "version": "1.0.0-*", "dependencies": { "NETStandard.Library": "1.6.0", "...
Another popular error is the referring of packages which does not satisfy all framework on the global scope when multiple frameworks are targeted. { "version": "1.0.0-*", "dependencies": { "NETStandard.Library": "1.6.0", ...
CREATE DATABASE SAMPLEDB; This will create a new database called sampledb.
CONNECT TO SAMPLEDB; From the command line (db2clp, terminal, db2cmd) you can write: db2 CONNECT TO SAMPLEDB
The following statement will create a new table called employee: CREATE TABLE EMPLOYEE ( EMPNO CHAR(6) NOT NULL, FIRSTNME VARCHAR(12) NOT NULL, LASTNAME VARCHAR(15) NOT NULL, SALARY DECIMAL(9,2) , PRIMARY KEY (EMPNO) ...
SELECT 'HELLO WORLD' FROM SYSIBM.SYSDUMMY1; 1 ----------- Hello World 1 record(s) selected. "The SYSIBM.SYSDUMMY1 table contains one row. The table is used for SQL statements in which a table reference is required, but the contents of the table are not important"...
By using server.close() and process.exit(), we can catch the server exception and do a graceful shutdown. var http = require('http'); var server = http.createServer(function (req, res) { setTimeout(function () { //simulate a long request res.writeHead(200, {'Content-Type': 'text/plain'})...
SQLite.NET is an open source library which makes it possible to add local-databases support using SQLite version 3 in a Xamarin.Forms project. The steps below demonstrate how to include this component in a Xamarin.Forms Shared Project: Download the latest version of the SQLite.cs class and add...
If you have a directory with existing source files, you can use qmake with the -project-option to create a project file. Let's assume, the folder MyProgram contains the following files: main.cpp foo.h foo.cpp bar.h bar.cpp subdir/foobar.h subdir/foobar.cpp Then by calling qmake -projec...

Page 513 of 826