Tutorial by Examples: ch

There are 3 usages of the $ character in a DOSKEY macro. Command separator $T is the equivalent of & in a batch script. One can join commands together like so. DOSKEY test=echo hello $T echo world Command-line arguments Like bash(not batch), we use $ to indicate command-line argument....
Sometimes the download takes longer than the cell is being displayed. In this case it can happen, that the downloaded image is shown in the wrong cell. To fix this we can not use the UIImageView Extension. We still will be using Alamofire however we will use the completion handler to display the im...
var assert = require('assert'); describe('String', function() { describe('#split', function() { it('should return an array', function() { assert(Array.isArray('a,b,c'.split(','))) }); }); });
DOSKEY macros don't work in a batch script. However, we can use a little workaround. set DOSKEYMacro=echo Hello World %DOSKEYMacro% This script can simulate the macro function. One can also use ampersands(&) to join commands, like $T in DOSKEY. If you want a relatively large "macro&qu...
Cold observable implementation, emits true when TTS engine finishes speaking, starts speaking when subscribed. Notice that API level 21 introduces different way to perform speaking: public class RxTextToSpeech { @Nullable RxTTSObservableOnSubscribe audio; WeakReference<Context> contextR...
<!-- : Comment This works with both batch script and WSF. The closing tag(-->), only works in WSF. CodeSucessful in both batch and WSF?<!--: CommentTrue<!--: Comment -->False - The closing tag only works for WSF-->False
Once you have node.js installed on your system, you can just follow the procedure below to get a basic web server running with support for both HTTP and HTTPS! Step 1 : Build a Certificate Authority create the folder where you want to store your key & certificate : mkdir conf ...
#include <vector> #include <string> #include <boost/process.hpp> #include <boost/asio.hpp> #include <boost/process/windows.hpp> int Run( const std::string& exeName, ///< could also be UTF-16 for Windows const std::string& args, ...
This example will demonstrate the searchable select box in MVC. it uses Ajax to get all records from database as user types the new character. I'll consider Country and its City example to illustrate the functionality of Searchable dropdown box. Code behind is c# with MVC, but its easy to grasp wh...
{ "title": "Person", "type": "object", "properties": { "firstName": { "type": "string" }, "lastName": { "type": "string" ...
service.ts: import { Injectable } from '@angular/core'; @Injectable() export class AppState { public mylist = []; } parent.component.ts: import {Component} from '@angular/core'; import { AppState } from './shared.service'; @Component({ selector: 'parent-example', templ...
parent.component.ts: import {Component} from '@angular/core'; @Component({ selector: 'parent-example', templateUrl: 'parent.component.html', }) export class ParentComponent { mylistFromParent = []; add() { this.mylistFromParent.push({"itemName":"Something&...
event-emitter.component.ts import { Component, OnInit, EventEmitter, Output } from '@angular/core'; @Component({ selector: 'event-emitting-child-component', template: `<div *ngFor="let item of data"> <div (click)="select(item)"> ...
shared.service.ts: import { Injectable } from '@angular/core'; import { Headers, Http } from '@angular/http'; import 'rxjs/add/operator/toPromise'; import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs/Rx'; import {Subject} from 'rxjs/Subject'; @Injectable(...
Use the following flowchart to choose the right Collection for the job. This flowchart was based off [http://i.stack.imgur.com/aSDsG.png).
Choosing which C++ Container to use can be tricky, so here's a simple flowchart to help decide which Container is right for the job. This flowchart was based on Mikael Persson's post. This little graphic in the flowchart is from Megan Hopkins
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....
To find the word foo in the file bar : grep foo ~/Desktop/bar To find all lines that do not contain foo in the file bar : grep –v foo ~/Desktop/bar To use find all words containing foo in the end (WIldcard Expansion): grep "*foo" ~/Desktop/bar
When offering IAP within an an app, you must first add an entry for each individual purchase within iTunes Connect. If you’ve ever listed an app for sale in the store, it’s a similar process and includes things like choosing a pricing tier for the purchase. When the user makes a purchase, the App ...
HTML: <ul> <li>Mango</li> <li>Book</li> </ul> Script: $( "li" ).each(function( index ) { console.log( index + ": " + $( this ).text() ); }); A message is thus logged for each item in the list: 0: Mango 1: Book

Page 107 of 109