Tutorial by Examples

Except main @conditional annotation there are set of similar annotation to be used for different cases. Class conditions The @ConditionalOnClass and @ConditionalOnMissingClass annotations allows configuration to be included based on the presence or absence of specific classes. E.g. when OObjectDa...
A model (see: Model-View-Controller pattern) in Grails is represented by a so-called Domain Class. Domain classes can define both the persistence and presentation of information in grails. Domain classes can also contain validations. To manage a fleet of cars in your Grails application you could de...
Detailed instructions on getting kernel set up or installed.
Create a console application. Install EntityFramework nuget package by running Install-Package EntityFramework in "Package Manager Console" Add your connection string in app.config file , It's important to include providerName="System.Data.SqlClient" in your connection. Cre...
First, determine the source file for this particular driver. Found it at drivers/usb/serial/ftdi_sio.c. ./scripts/get_maintainer.pl drivers/usb/serial/ftdi_sio.c And the results: Johan Hovold <[email protected]> (maintainer:USB SERIAL SUBSYSTEM) Greg Kroah-Hartman <gregkh@linuxfounda...
This example shows how to create a custom presentation transition that is driven by a composite UIDynamicBehavior. We can start by creating a presenting view controller that will present a modal. Swift class PresentingViewController: UIViewController { lazy var button: UIButton = { ...
Create a file (e.g. hello_world.py) in a text editor or a python editor if you have one installed (pick one if you don't - SublimeText, Eclipse, NetBeans, SciTe... there's many!) hwld = 'Hello world' print(hwld) Note that python variables do not need to be explicitly declared; the declaration h...
Jest is used by Facebook to test all JavaScript code including React applications. One of Jest's philosophies is to provide an integrated "zero-configuration" experience. We observed that when engineers are provided with ready-to-use tools, they end up writing more tests, which in turn res...
With the release of sass 3.3 and plus version the @if and else conditions syntax got same. we can now use expressions with not only scss but also sass. sass syntax @for $i from 1 through 3 { .item-#{$i} { width: 2em * $i; } } Compiled to .item-1 { width: 2em; } .item-2 { width: 4em...
If you have a multidimensional array like this: [ ['foo', 'bar'], ['fizz', 'buzz'], ] And you want to change it to an associative array like this: [ 'foo' => 'bar', 'fizz' => 'buzz', ] You can use this code: $multidimensionalArray = [ ['foo', 'bar'], ...
The command syntax will be of the following type: <REST Verb> /<Index>/<Type>/<ID> Execute the following command to explore elasticsearch cluster through Kibana Console. For checking the cluster health GET /_cat/health?v For listing all the indices GET /_cat...
To get started go to root of project directory and run : $ sphinx-quickstart You will get options to create documentation for your project. For default setup follow below commands: Prompt Choice > Root path for the documentation [.]: <ENTER> > Separate source and build dire...
Detailed instructions on getting sling set up or installed.
Global Variable: This variable is available everywhere in the xsl stylesheet. This variable should only be the child of <xsl:stylesheet> element. Local variable: This variable is only available where it is declared. See Below Code: <?xml version="1.0" encoding="UTF-8"...
Elasticsearch provides data manipulation & data searching capabilities in almost real time. under this example, we have update, delete & batch processing operations. Updating the same document. Suppose we have already indexed a document on /car/external/1 . Then running the command for i...
In the beginning there were callbacks, and callbacks were ok: const getTemperature = (callback) => { http.get('www.temperature.com/current', (res) => { callback(res.data.temperature) }) } const getAirPollution = (callback) => { http.get('www.pollution.com/current', (res) ...
Command-line options for applications are not treated any differently from command-line arguments by the C language. They are just arguments which, in a Linux or Unix environment, traditionally begin with a dash (-). With glibc in a Linux or Unix environment you can use the getopt tools to easily d...
You can print the array elements using the loop same as the Java enhanced loop, but you need to change keyword from : to in. val asc = Array(5, { i -> (i * i).toString() }) for(s : String in asc){ println(s); } You can also change data type in for loop. val asc = Array(5, { i -> (i...
As the header already says, the following list contains "interoperable signature types" which are more or less strictly defined. The PDF specification specifies a way to also include completely custom signing schemes. But let us assume we are in an interoperable situation. The the collecti...
It is possible to specify a text hint when using EditTexts. Text hints are useful for conveying to the user what they should type in the EditText. In XML: <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="use...

Page 1260 of 1336