Tutorial by Examples: er

Customer Model package org.bookmytickets.model; import org.springframework.data.annotation.Id; public class Customer { @Id private String id; private String firstName; private String lastName; public Customer() {} public Customer(String firstName, String la...
package org.bookmytickets.controller; import java.util.List; import org.bookmytickets.model.Customer; import org.bookmytickets.repository.CustomerRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import o...
package org.bookmytickets.repository; import java.util.List; import org.bookmytickets.model.Customer; import org.springframework.data.mongodb.repository.MongoRepository; public interface CustomerRepository extends MongoRepository<Customer, String> { public Customer findByFirstNa...
For testing our application, I'm using advance rest client which is chrome extension: So, here is the snapshot for inserting the data:
A Intersection Type combines the member of two or more types. interface Knife { cut(); } interface BottleOpener{ openBottle(); } interface Screwdriver{ turnScrew(); } type SwissArmyKnife = Knife & BottleOpener & Screwdriver; function use(tool: SwissArmyKnife){ ...
Multiple FOR clauses are allowed in a LOOP. The loop finishes when the first of these clauses finishes: (loop for a in '(1 2 3 4 5) for b in '(a b c) collect (list a b)) ;; Evaluates to: ((1 a) (2 b) (3 c)) Other clauses that determine if the loop should continue can be combined: ...
The special LOOP NAMED foo syntax allows you to create a loop that you can exit early from. The exit is performed using return-from, and can be used from within nested loops. The following uses a nested loop to look for a complex number in a 2D array: (loop named top for x from 0 below (arr...
Within a LOOP, you can use the Common Lisp (return) form in any expression, which will cause the LOOP form to immediately evaluate to the value given to return. LOOP also has a return clause which works almost identically, the only difference being that you don't surround it with parentheses. The c...
Odoo v8.0 way is to add corresponding record in the XML file: ​Add XML file to the manifest (i.e. __openerp__.py file.): ... 'data' : [ 'your_file.xml' ], ​... Then add following record in 'your_file.xml': <openerp> <data> <template id="...
The OverloadedStrings language extension allows the use of normal string literals to stand for Text values. {-# LANGUAGE OverloadedStrings #-} import qualified Data.Text as T myText :: T.Text myText = "overloaded"
Windows / Linux: Ctrl + P OS X / macOS: Cmd + P Shows what parameters a method and all of its overloads accepts.
Reverse elements within a tuple colors = "red", "green", "blue" rev = colors[::-1] # rev: ("blue", "green", "red") colors = rev # colors: ("blue", "green", "red") Or using reversed (reversed gives an it...
def str = "Double quoted string" assert str instanceof String
def param = 'string' def str = "Double quoted ${param}" assert str instanceof GString assert str == 'Double quoted string' The parameter is by default resolved eagerly, this means this applies: def param = 'string' def str = "Double quoted ${param}" param = 'another stri...
def str = / multiline string no need to escape slash \n / assert str instanceof String assert str.readLines().size() == 4 assert str.contains('\\n')
def param = 'string' def str = / multiline $param no need to escape slash \n / assert str instanceof GString assert str.readLines().size() == 4 assert str.contains('\\n') assert str.contains('string')
If you need to apply a setting dynamically after the cluster has already started, and it can actually be set dynamically, then you can set it using _cluster/settings API. Persistent settings are one of the two type of cluster-wide settings that can be applied. A persistent setting will survive a fu...
If you need to apply a setting dynamically after the cluster has already started, and it can actually be set dynamically, then you can set it using _cluster/settings API. Transient settings are one of the two type of cluster-wide settings that can be applied. A transient setting will not survive a ...
Example uses basic HTTP syntax. Any <#> in the example should be removed when copying it. You can use the _cat APIs to get a human readable, tabular output for various reasons. GET /_cat/health <1> _cat/health has existed since Elasticsearch 1.x, but here is an example of its output...
Example uses basic HTTP syntax. Any <#> in the example should be removed when copying it. Like most _cat APIs in Elasticsearch, the API selectively responds with a default set of fields. However, other fields exist from the API if you want them: GET /_cat/health?help <1> ?help cau...

Page 143 of 417