Tutorial by Examples

Getting elements to center or bottom align vertically has always been a challenge with CSS and Bootstrap. The desired vertical alignment may be within a parent container, or relative to adjacent elements. Now that Bootstrap 4 is flexbox by default there are many different approaches to vertical ali...
It's similar to Vue.js version 1, version 2 can be directly embedded in a single html file. To include Vue.js2 in html file, make sure you have the script file included in the HTML. For example, use the following HTML. It should display the Hello message correctly. <div id="app">{...
This example shows a simple but effective splash screen with animation that can be created by using Android Studio. Step 1: Create an animation Create a new directory named anim in the res directory. Right-click it and create a new Animation Resource file named fade_in.xml: Then, put the follow...
This example shows how to define sub-commands for a given command, and how to easily associate a command handler. This example defines a thing command with get and set subcommands. package things; import io.dropwizard.cli.Command; import io.dropwizard.setup.Bootstrap; import net.sourceforge.a...
An example project (Git repo) that can be used as a starting point for doing some 3D rendering. The code for setting up OpenGL and the shaders is quite long and tedious so it wont fit well under this example format. Later pieces of it can be shown in separate examples detailing what exactly is going...
If you bind a buffer to GL_PIXEL_UNPACK_BUFFER then the data parameter in glTexImage2D is a offset into that buffer. This means that the glTexImage2D doesn't need to wait for all the data to be copied out of the application's memory before it can return, reducing overhead in the main thread. glGen...
You can see the running demo by clicking here. HTML: <p> <span>Counter State</span><br /> (<em>Will increase each minute</em>): <p> <span id="counter-state" style="font-weight: bolder"></span> </p> &l...
API: Application programming interface are the set of requirements which govern how one application can talk to another, API's are what makes the information exchange between programs possible. For Example System-level APIs makes it possible for applications like LibreOffice to run on top of an ...
Active Record Transactions can be applied to Model classes as well as Model instances, the objects within the transaction block need not all be instances of same class. This is because transactions are per-database connection, not per-model. For example: User.transaction do account.save! prof...
To flatten multidimensional array into single dimension, flatMap advance functions is used. Other use case is to neglect nil value from array & mapping values. Let's check with example:- Suppose We have an multidimensional array of cities & we want to sorted city name list in ascending orde...
Using Oracle SQL’s NVL2() function, you can create a display column which contains one value if a field contains data and another value if a field does not contain data. For example, in an Entity search, turn the presence of a primary e-mail address into a text display column: NVL2( {email} , 'YES...
Below is a single hidden layer Multilayer Perceptron (MLP) using nested scoping of variables. def weight_variable(shape): return tf.get_variable(name="weights", shape=shape, initializer=tf.zeros_initializer(dtype=tf.float32)) def bias_variable(shape): ...
- hosts: all roles: - { role: myrole, become: yes } - myrole2
Firebase handles notifications differently when the app is in background (killed process) and when in foreground (active). When your app is in the background, notification messages are displayed in the system tray, and onMessageReceived is not called. For notification messages with a data payload...
In order to deploy the application on docker, first we need to get the image from registry. docker pull php This will get you the latest version of image from official php repository. Generally speaking, PHP is usually used to deploy web-applications so we need an http server to go with the imag...
Dockerfile is used to configure the custom image that we will be building with the web-application codes. Create a new file Dockerfile in the root folder of project and then put the following contents in the same FROM php:7.0-apache COPY /etc/php/php.ini /usr/local/etc/php/ COPY . /var/www/html/ ...
Building image is not something specific to php, but in order to build the image that we described above, we can simply use docker build -t <Image name> . Once the image is built, you can verify the same using docker images Which would list out all the images installed in your system. ...
Once we have an image ready, we can start and serve the same. In order to create a container from the image, use docker run -p 80:80 -d <Image name> In the command above -p 80:80 would forward port 80 of your server to port 80 of the container. The flag -d tells that the container should r...
A typedef declaration has the same syntax as a variable or function declaration, but it contains the word typedef. The presence of typedef causes the declaration to declare a type instead of a variable or function. int T; // T has type int typedef int T; // T is an alias for int int A[1...
The rule that typedef declarations have the same syntax as ordinary variable and function declarations can be used to read and write more complex declarations. void (*f)(int); // f has type "pointer to function of int returning void" typedef void (*f)(int); // f is an alias for &...

Page 1171 of 1336