Tutorial by Examples: complet

1- Define Your own custom Block typedef void(^myCustomCompletion)(BOOL); 2- Create custom method which takes your custom completion block as a parameter. -(void) customMethodName:(myCustomCompletion) compblock{ //do stuff // check if completion block exist; if we do not check it will ...
//create a new ExcelPackage using (ExcelPackage excelPackage = new ExcelPackage()) { //create the WorkSheet ExcelWorksheet worksheet = excelPackage.Workbook.Worksheets.Add("Sheet 1"); //add some dummy data, note that row and column indexes start at 1 for (int i = 1;...
//create a new ExcelPackage using (ExcelPackage excelPackage = new ExcelPackage()) { //create 2 WorkSheets ExcelWorksheet worksheet = excelPackage.Workbook.Worksheets.Add("Sheet 1"); ExcelWorksheet worksheet2 = excelPackage.Workbook.Worksheets.Add("Sheet 2"); ...
Main layout : activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/activity_main" android:layout_width="match_parent" android:layo...
The autocomplete UI control is a search dialog with built-in autocomplete functionality. As a user enters search terms, the control presents a list of predicted places to choose from. When the user makes a selection, a GMSPlace (Place in Xamarin) instance is returned, which your app can then use to ...
Going to its roots, Logstash has the ability to parse and store syslog data. This example shows a basic configuration that gets you to that. input { file { path => [ "/var/log/syslog", "/var/log/auth.log" ] type => "syslog" } }...
Completion can be used to match words used in a document. When typing a word, Ctrlp or Ctrln will match previous or next similar words in the document. This can even be combined with Ctrl-X mode to complete entire lines. For instance type something like: This is an example sentence. then go to ...
Taken from microsoft's github page with official documentation { "name": String, //The name of the project, used for the assembly name as well as the name of the package. The top level folder name is used if this property is not specified. "version": String, //The Semver versi...
func sampleWithCompletion(completion:@escaping (()-> ())){ let delayInSeconds = 1.0 DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + delayInSeconds) { completion() } } //Call the function sampleWithCompletion { print("after on...
enum ReadResult{ case Successful case Failed case Pending } struct OutpuData { var data = Data() var result: ReadResult var error: Error? } func readData(from url: String, completion: @escaping (OutpuData) -> Void) { var _data = OutpuData(data: Data(), ...
HTML <div :class="classes"> <input v-model="compValue" type="text" class="form-control" @keydown.enter = 'enter' @keydown.down = 'down' @keydown.up = 'up' @input = "cha...
This is a small example of an autocomplete input. CSS .autocomplete { position: relative; } .autocomplete-list { position: absolute; z-index: 2; top: 25px; min-width: 150px; margin: 0; padding: 0; list-style: none; border: 1px solid #eee; border-radius: 4px; ...
add_action('rest_api_init', 'my_rest_validate_endpoint' ); function my_rest_validate_endpoint() { // Declare our namespace $namespace = 'myrest/v1'; // Register the route // Example URL matching this route: // http://yourdomain/wp-json/myrest/v1/guides/tag=europe/price=...
data.service.ts: import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import 'rxjs/add/operator/map'; @Injectable() export class DataService { constructor(private http: Http) { } fetchData(){ return this.http.get('https://dinstruct-d4b62.firebaseio....
This example requires FormsModule and ReactiveFormsModule. Please import them in your application/module. import {FormsModule, ReactiveFormsModule} from '@angular/forms'; input-form-example.html <form class="example-form" (ngSubmit)="submit(addForm.value)" [formGroup]=&qu...
This example requires FormsModule and ReactiveFormsModule. Please import them in your application/module. import {FormsModule, ReactiveFormsModule} from '@angular/forms'; autocomplete-overview-example.html: <md-input-container> <input mdInput placeholder="State" [mdAutocom...
In the example below, the calculateShippingPrice method calculates shipping cost, which takes some processing time. In a real world example, this would e.g. be contacting another server which returns the price based on the weight of the product and the shipping method. By modeling this in an async ...
mView.afterMeasured { // inside this block the view is completely drawn // you can get view's height/width, it.height / it.width } Under the hood inline fun View.afterMeasured(crossinline f: View.() -> Unit) { viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlob...

Page 3 of 3