Tutorial by Examples: v

Occasionally it's useful to assign one or more ports manually vs using the defaults. Doing so can solve port availability/permissions issues or accommodate running more than one ember instance at a time. To have ember-cli attempt to identify and assign an available port, use: ember serve --port ...
After adding the GreenDao library dependency and Gradle plugin, we need to first create an entity object. Entity An entity is a Plain Old Java Object (POJO) that models some data in the database. GreenDao will use this class to create a table in the SQLite database and automatically generate helpe...
The code example below demonstrate how you can get a lighter and darker shade of a given color, useful in applications having dynamic themes For Darker Color + (UIColor *)darkerColorForColor:(UIColor *)c { CGFloat r, g, b, a; if ([c getRed:&r green:&g blue:&b alpha:&a]) ...
const languages = [ 'JavaScript', 'Python', 'Java', 'Elm', 'TypeScript', 'C#', 'F#' ] // one liner const Language = ({language}) => <li>{language}</li> Language.propTypes = { message: React.PropTypes.string.isRequired } /** * If there are more ...
There is a way to simplify defining autolayout for views using VFL. It may seem hard at first, but it is actually really easy to use. Some definitions first: | represents superview H: or V: represent current orientation - horizontal or vertical view names should be enclosed in square brackets ...
A savepoint stores two things: (a) the positions of all datasources, (b) the states of operators. Savepoints are useful in many circonstances: slight application code updates Flink update changes in parallelism ... As of version 1.3 (also valid for earlier version): checkpoint must be ...
Configuration The configuration is in the file flink/conf/flink-conf.yaml (under Mac OSX via homebrew, it is /usr/local/Cellar/apache-flink/1.1.3/libexec/conf/flink-conf.yaml). Flink < 1.2: The configuration is very similar to the checkpoints configuration (topic available). The only differenc...
import Foundation protocol DoggyView: NSObjectProtocol { func startLoading() func finishLoading() func setDoggies(_ doggies: [DoggyViewData]) func setEmpty() }
import Foundation typealias Result = ([Dog]) -> Void class DoggyService { func deliverDoggies(_ result: @escaping Result) { let firstDoggy = Dog(name: "Alfred", breed: Breed.labrador.rawValue, age: 1) let secondDoggy = Dog(name: "Vinny&quot...
import UIKit class DoggyListViewController: UIViewController, UITableViewDataSource { @IBOutlet weak var emptyView: UIView? @IBOutlet weak var tableView: UITableView? @IBOutlet weak var spinner: UIActivityIndicatorView? fileprivate let dogPresenter = DoggyPresenter(dogSe...
Getting set up to use webdev takes some time, if you're doing anything more than tweaking a bit of text. Here are the initial setup steps: $ mkdir site $ cd site $ git clone [email protected]:dart-lang/site-webdev.git $ source ./scripts/env-set.sh $ ./scripts/install-dart-sdk.sh $ ./s...
In this example, we will try to find JavaScript data which containing backgroundColor:'#FFF'. Then, we will change value of backgroundColor '#FFF' ⇨ '#ddd'. This code uses getWholeData() and setWholeData() methods to manipulate JavaScript data. Alternatively, html() method can be used to get data of...
Assuming we have an activity with an example layout called activity_main.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layou...
Android extensions also work with multiple Android Product Flavors. For example if we have flavors in build.gradle like so: android { productFlavors { paid { ... } free { ... } } } And for example, only the free flavor has ...
a simple yet very useful command: :g/ending/m$ moves lines containing ending to the end of the buffer. m means move $ means end of buffer, while 0 means beginning of buffer.
The interactive mode The most basic way to use R is the interactive mode. You type commands and immediately get the result from R. Using R as a calculator Start R by typing R at the command prompt of your operating system or by executing RGui on Windows. Below you can see a screenshot of an inter...
Get PyGraphviz from the Python Package Index at http://pypi.python.org/pypi/pygraphviz or install it with: pip install pygraphviz and an attempt will be made to find and install an appropriate version that matches your operating system and Python version. You can install the development version ...
I'm in a controlled room with a single minew beacon that use IBEACON protocol. BLEController needs to extend CBPeripheralDelegate I'll use the first BLE to connect after the search has stop. Modify the method StopSearchBLE() class BLEController: CBCentralManagerDelegate, CBPeripheralDelegate...
You need discover the services and characteristic You don't need read value from the characteristic before writing over it. will continue for, for this example, after read value. Modify func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?)...
Just use default DividerItemDecoration class : NavigationView navigationView = (NavigationView) findViewById(R.id.navigation); NavigationMenuView navMenuView = (NavigationMenuView) navigationView.getChildAt(0); navMenuView.addItemDecoration(new DividerItemDecoration(context,DividerItemDecoration....

Page 263 of 296