Tutorial by Examples

Place your test classes here: /src/test/<pkg_name>/ Example test class public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { int a=4, b=5, c; c = a + b; assertEquals(9, c); // This test passes assertEquals(10, c...
A slider control uses draggable handles to select numeric values. Below is an example of a basic slider initialization: <script> $(function() { $( "#slider" ).slider(); }); </script> <div id="slider"></div>
Range sliders provide 2 draggable handles to select numeric values. The slider's initialization must provide a range option set to true to create a range slider: <script> $(function() { $( "#range-slider" ).slider({ range: true }); }); </script> &lt...
A slider element can have its value set on initialization by providing a value option. This option is a number: $( "#slider" ).slider({ value: 5 }); A range slider can also have its values set in this way by providing a values option. This option is an array of numbers: $( &qu...
The slider provides an event called slide that will trigger whenever the mouse moves during a slider handle drag. This function holds a reference to the slide event and a reference to the slider ui object. The ui object holds a jQuery object for the handle being moved and the value(s) of the slide...
The slider provides an event called change that will trigger after the mouse completes a slider handle drag or if the value(s) have been changed programmatically. This function holds a reference to the slide event and a reference to the slider ui object. The ui object holds a jQuery object for the ...
The @Header and @Body annotations can be placed into the method signatures and Retrofit will automatically create them based on your models. public interface MyService { @POST("authentication/user") Call<AuthenticationResponse> authenticateUser(@Body AuthenticationReques...
The background-origin property specifies where the background image is positioned. Note: If the background-attachment property is set to fixed, this property has no effect. Default value: padding-box Possible values: padding-box - The position is relative to the padding box border-box - The p...
Definition and Usage: The background-clip property specifies the painting area of the background. Default value: border-box Values border-box is the default value. This allows the background to extend all the way to the outside edge of the element's border. padding-box clips the background at ...
An annotated method with @Before will be executed before every execution of @Test methods. Analogous an @After annotated method gets executed after every @Test method. This can be used to repeatedly set up a Test setting and clean up after every test. So the tests are independent and preparation cod...
Import in your gradle root file classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' Import in your gradle app file apt 'com.google.auto.value:auto-value:1.2' apt 'com.ryanharter.auto.value:auto-value-gson:0.3.1' provided 'com.jakewharton.auto.value:auto-value-annotations:1.2-update...
When you need to set a pixel value for something like Paint.setTextSize but still want it be scaled based on the device, you can convert dp and sp values. DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics(); float pixels = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 12f, m...

Max

Find the maximum value of column: select max(age) from employee; Above example will return largest value for column age of employee table. Syntax: SELECT MAX(column_name) FROM table_name;
One should have in mind that: Angular's data binding relies on JavaScript’s prototypal inheritance, thus it's subject to variable shadowing. A child scope normally prototypically inherits from its parent scope. One exception to this rule is a directive which has an isolated scope as it doesn't p...
USER daemon The USER instruction sets the user name or UID to use when running the image and for any RUN, CMD and ENTRYPOINT instructions that follow it in the Dockerfile.
WORKDIR /path/to/workdir The WORKDIR instruction sets the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow it in the Dockerfile. If the WORKDIR doesn’t exist, it will be created even if it’s not used in any subsequent Dockerfile instruction. It can be used mu...
VOLUME ["/data"] The VOLUME instruction creates a mount point with the specified name and marks it as holding externally mounted volumes from native host or other containers. The value can be a JSON array, VOLUME ["/var/log/"], or a plain string with multiple arguments, such a...
COPY has two forms: COPY <src>... <dest> COPY ["<src>",... "<dest>"] (this form is required for paths containing whitespace) The COPY instruction copies new files or directories from <src> and adds them to the filesystem of the container at the ...
ENV ENV <key> <value> ENV <key>=<value> ... The ENV instruction sets the environment variable <key> to the value . This value will be in the environment of all “descendant” Dockerfile commands and can be replaced inline in many as well. The ENV instruction has two...
EXPOSE <port> [<port>...] The EXPOSE instruction informs Docker that the container listens on the specified network ports at runtime. EXPOSE does NOT make the ports of the container accessible to the host. To do that, you must use either the -p flag to publish a range of ports or the ...

Page 420 of 1336