Tutorial by Examples

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...
Please add below dependencies in pom.xml file: <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> &l...
For testing our application, I'm using advance rest client which is chrome extension: So, here is the snapshot for inserting the data:
var dispatch = d3.dispatch("statechange"); dispatch.on('statechange', function(e){ console.log(e) }) setTimeout(function(){dispatch.statechange('Hello, world!')}, 3000)
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...
CSS and JS files should be reside under 'static' directory in the root directory of module (the rest of subdirectory tree under 'static' is an optional convention): static/src/css/your_file.css static/src/js/your_file.js Then add links to these files unsing one of the 3 ways listed in the fol...
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="...
Note: you should use this way if you've installed a "website" module and you have a public website available. Add following record in 'your_file.xml': <openerp> <data> <template id="assets_frontend" name="your_module_name assets" inherit...
Add following record in 'your_file.xml': <openerp> <data> <template id="assets_common" name="your_module_name assets" inherit_id="web.assets_common"> <xpath expr="." position="inside"> <link rel...
With the Class Based generic Views, it is very simple and easy to create the CRUD views from our models. Often, the built in Django admin is not enough or not preferred and we need to roll our own CRUD views. The CBVs can be very handy in such cases. The CreateView class needs 3 things - a model, t...
Starting with a three-dimensional list: alist = [[[1,2],[3,4]], [[5,6,7],[8,9,10], [12, 13, 14]]] Accessing items in the list: print(alist[0][0][1]) #2 #Accesses second element in the first list in the first list print(alist[1][1][2]) #10 #Accesses the third element in the second list in...
Here is a simple example of an XAML page in WPF. It consists of a Grid, a TextBlock and a Button - the most common elements in XAML. <Window x:Class="FirstWpfApplication.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x=&q...
Introduction and motivation Expression templates (denoted as ETs in the following) are a powerful template meta-programming technique, used to speed-up calculations of sometimes quite expensive expressions. It is widely used in different domains, for example in implementation of linear algebra ...

Page 450 of 1336