Delete all nodes
MATCH (n)
DETACH DELETE n
DETACH doesn't work in older versions(less then 2.3), for previous versions use
MATCH (n)
OPTIONAL MATCH (n)-[r]-()
DELETE n, r
Delete all nodes of a specific label
MATCH (n:Book)
DELETE n
It is deemed best practice to always use Option Explicit in VBA as it forces the developer to declare all their variables before use. This has other benefits too, such as auto-capitalization for declared variable names and IntelliSense.
Option Explicit
Sub OptionExplicit()
Dim a As Integer
...
Option Compare Binary
Binary comparison makes all checks for string equality within a module/class case sensitive. Technically, with this option, string comparisons are performed using sort order of the binary representations of each character.
A < B < E < Z < a < b < e < z
...
Option Base is used to declare the default lower bound of array elements. It is declared at module level and is valid only for the current module.
By default (and thus if no Option Base is specified), the Base is 0. Which means that the first element of any array declared in the module has an index...
Adding a footer is not natively possible. Luckily, we can make use of jQuery and CSS to add a footer to the slides of an ioslides presentation rendered with knitr.
First of all we have to include the jQuery plugin. This is done by the line
<script src="https://ajax.googleapis.com/ajax/libs...
This example assumes that your lookup column is named MultiLookupColumnName and that you want to set your multi-lookup field to lookup to the items with IDs 1 and 2.
Using jQuery AJAX
2010
var listName = "YourListName";
var lookupList = "LookupListName";
var idOfItemToUpdate...
The thing is; you can't connect Ionic to any database (MySQL, Postgres, MSSQL, ...) directly. The keyword here is directly.
No, there's no workaround, no magic involved, it's just not the way this is supposed to work. Ionic works on top of Angular and Angular is a frontend framework.
However, the ...
The Replace function in SQL is used to update the content of a string. The function call is REPLACE( ) for MySQL, Oracle, and SQL Server. The syntax of the Replace function is:
REPLACE (str, find, repl)
The following example replaces occurrences of South with Southern in Employees table:
FirstN...
Enable and configure the experimental Gradle plugin to improve AndroidStudio's NDK support. Check that you fulfill the following requirements:
Gradle 2.10 (for this example)
Android NDK r10 or later
Android SDK with build tools v19.0.0 or later
Configure MyApp/build.gradle file
Edit the dep...
Iterate over JSONObject properties
JSONObject obj = new JSONObject("{\"isMarried\":\"true\", \"name\":\"Nikita\", \"age\":\"30\"}");
Iterator<String> keys = obj.keys();//all keys: isMarried, name & age
while (keys.has...
When to use abstract classes: To implement the same or different behaviour among multiple related objects
When to use interfaces: to implement a contract by multiple unrelated objects
Abstract classes create "is a" relations while interfaces provide "has a" capability.
This c...
sudo apt-add-repository ppa:brightbox/ruby-ng
Hit Enter to confirm
sudo apt-get update
Then you can install your ruby version of choice (the ppa supports ruby2.0 ruby2.1 ruby2.2 ruby2.3 and legacy versions ruby1.8 ruby1.9.1) Don't forget to include the respective -dev package for your version. Ot...
Session Types are a way to tell the compiler about the protocol you want to use to communicate between threads - not protocol as in HTTP or FTP, but the pattern of information flow between threads. This is useful since the compiler will now stop you from accidentally breaking your protocol and causi...
Bridge pattern decouples abstraction from implementation so that both can vary independently. It has been achieved with composition rather than inheritance.
Bridge UML diagram from wikipedia:
You have four components in this pattern.
Abstraction: It defines an interface
RefinedAbstraction: It ...
The dimension attribute on an object specifies that that object is an array. There are, in Fortran 2008, five array natures:1
explicit shape
assumed shape
assumed size
deferred shape
implied shape
Take the three rank-1 arrays2
integer a, b, c
dimension(5) a ! Explicit shape (default ...
SUB function allows to substitute text inside awk
sub(regexp, replacement, target)
where regexp could be a full regular expression
$ cat file
AAAAA
BBBB
CCCC
DDDD
EEEE
FFFF
GGGG
$ awk '{sub("AAA","XXX", $0); print}' file
XXXAA
BBBB
CCCC
DDDD
EEEE
FFFF
GGGG
...
# example data
DT = data.table(iris)
DT[, Bin := cut(Sepal.Length, c(4,6,8))]
summary is handy for browsing summary statistics. Besides direct usage like summary(DT), it can also be applied per-group conveniently with split:
lapply(split(DT, by=c("Species", "Bin"), drop=TRU...
# example data
DT = data.table(iris)
DT[, Bin := cut(Sepal.Length, c(4,6,8))]
To apply the same summarizing function to every column by group, we can use lapply and .SD
DT[, lapply(.SD, median), by=.(Species, Bin)]
# Species Bin Sepal.Length Sepal.Width Petal.Length Petal.Width
# 1...
Setup Ruby On Rails on Ubuntu 16.04 Xenial Xerus
All commands should be run in Linux terminal (hotkey: Ctrl + Alt + T)
You need to install Ruby on your local machine in development environment.
The first step is to install some dependencies for Ruby.
sudo apt-get update
sudo apt-get install git...