Tutorial by Examples: l

first add the OkHttp to the gradle build file of the app module compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.squareup.okhttp:okhttp:2.4.0' compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2' Then make a class extending Application import android.app.Application; ...
Gradle: It is used to make build for any software, it is a Domain specific language used to configure and fulfill all plugins, libraries downloaded from repositories. Use Plugins: Apply plugin: ‘com.android.application’ Plugin is property in key value form. In above statement plugin denotes to...
The caret-color CSS property specifies the color of the caret, the visible indicator of the insertion point in an element where text and other content is inserted by the user's typing or editing. HTML <input id="example" /> CSS #example { caret-color: red; } Resources: ...
Step 1: Create your GitHub account If you already have a GitHub account, please proceed to Step 2. Otherwise, please follow below: 1.a Go to Github page. 1.b Enter your desired username, your email address and then your desired password. Afterwards, click the Sign up for GitHub button. Step 2:...
Note: For brevity, the commands use here-strings (<<<) and ANSI C-quoted strings ($'...'). Both these shell features work in bash, ksh, and zsh. # GNU Sed $ sed '1 a appended text' <<<'line 1' line 1 appended text # BSD Sed (multi-line form) sed '1 a\ appended text'...
This example explains the different methods to install Yarn for your OS. macOS Homebrew brew update brew install yarn MacPorts sudo port install yarn Adding Yarn to your PATH Add the following to your preferred shell profile (.profile, .bashrc, .zshrc etc) export PATH="$PATH:`yarn ...
Download and install the Unity Editor from the Unity Download page. Installing Unity using Download Assistant Unity Download Assistant is a small executable program which lets you select which components of the Unity Editor you want to download and install. If you’re not sure which components you...
SELECT ... WHERE dt >= '2017-02-01' AND dt < '2017-02-01' + INTERVAL 1 MONTH Sure, this could be done with BETWEEN and inclusion of 23:59:59. But, the pattern has this benefits: You don't have pre-calculate the end date (which is often an exact length from the start) You...
The REGEXP (or its synonym, RLIKE) operator allows pattern matching based on regular expressions. Consider the following employee table: +-------------+-------------+-------------+--------------+----------+ | EMPLOYEE_ID | FIRST_NAME | LAST_NAME | PHONE_NUMBER | SALARY | +-------------+----...
In this example, we use the default, no-args GridLayout() constructor to create a layout with a single column. public class SingleColumnGridLayoutExample { private final Display display; private final Shell shell; public SingleColumnGridLayoutExample() { display = new Di...
Similar to the Single-Column Example above, if we instead use the GridLayout(int, boolean) constructor, we can create a layout with multiple columns. In this case we create two columns, each of which are the same width. public class MultiColumnGridLayoutExample { private final Display displ...
By leveraging some of the member variables in the GridLayout instance, we can change the margins around the layout, and spacing between cells. In this example we set the following: verticalSpacing = 0 - Sets the vertical spacing between cells to 0px. horizontalSpacing = 20 - Sets the horizontal ...
Just add these lines to the initialization RecyclerView mRecyclerView = (RecyclerView) view.findViewById(recyclerView); mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL))...
Detailed instructions on getting visual-studio-cordova set up or installed.
By putting multiple figure handles into a graphics array, multiple figures can be saved to the same .fig file h(1) = figure; scatter(rand(1,100),rand(1,100)); h(2) = figure; scatter(rand(1,100),rand(1,100)); h(3) = figure; scatter(rand(1,100),rand(1,100)); savefig(h,'ThreeRandomScatterp...
Detailed instructions on getting webforms set up or installed.
The Symfony Installer is a command line tool that helps you to create new Symfony applications. It requires PHP 5.4 or higher. Downloading and installing the Symfony Installer on Linux / MacOS Open a terminal and execute the following commands: sudo mkdir -p /usr/local/bin sudo curl -LsS https:/...
Caching Online Images Using AlamofireImage. It works on top of Alamofire in Swift. Install AlamofireImage using cocoapods pod 'AlamofireImage', '~> 3.1' SetUp: Import AlamofireImage and Alamofire SetUp the Image cache: let imageCache = AutoPurgingImageCache( memoryCapacity: 111_111_111,...
Example for a functional view to create an object. Excluding comments and blank lines, we need 15 lines of code: # imports from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from .models import SampleObject from .forms import SampleObjectForm # vie...
cx_Freeze - a tool can package your project to excutable/installer after install it by pip, to package demo.py, we need setup.py below. import sys from cx_Freeze import setup, Executable # Dependencies are automatically detected, but it might need fine tuning. build_exe_options = { &...

Page 763 of 861