Tutorial by Examples: ti

While declaring a function in the $rootscope has it's advantages, we can also declare a $scope function any part of the code that is injected by the $scope service. Controller, for instance. Controller myApp.controller('myController', ['$scope', function($scope){ $scope.myFunction = function ...
ObservableCollection is a collection of type T like List<T> which means that it holds objects of type T. From documentation we read that : ObservableCollectionrepresents a dynamic data collection that provides notifications when items get added, removed, or when the entire list is refres...
files = list.files(pattern="*.csv") data_list = lapply(files, read.table, header = TRUE) This read every file and adds it to a list. Afterwards, if all data.frame have the same structure they can be combined into one big data.frame: df <- do.call(rbind, data_list)
The $http requests require time which varies depending on the server, some may take a few milliseconds, and some may take up to a few seconds. Often the time required to retrieve the data from a request is critical. Assuming the response value is an array of names, consider the following example: ...
$scheme = 'https' $url_format = '{0}://example.vertigion.com/foos?{1}' $qs_data = @{ 'foo1'='bar1'; 'foo2'= 'complex;/?:@&=+$, bar''"'; 'complex;/?:@&=+$, foo''"'='bar2'; } [System.Collections.ArrayList] $qs_array = @() foreach ($qs in $qs_data.GetEnumerator()...
Encoded with [uri]::EscapeDataString() First, we'll decode the URL and Query String encoded with [uri]::EscapeDataString() in the above example: https://example.vertigion.com/foos? foo2=complex%3B%2F%3F%3A%40%26%3D%2B%24%2C%20bar'%22& complex%3B%2F%3F%3A%40%26%3D%2B%24%2C%20foo'%22=bar2&am...
To do anything with an IMAP account you need to connect to it first. To do this you need to specify some required parameters: The server name or IP address of the mail server The port you wish to connect on IMAP is 143 or 993 (secure) POP is 110 or 995 (secure) SMTP is 25 or 465 (secure) N...
Objective-C //Checking for 3-D Touch availability if ([self.traitCollection respondsToSelector:@selector(forceTouchCapability)] && (self.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable)) { [self registerForPreviewingWithDelegate:self sourceVie...
let bodies = (contact.bodyA.categoryBitMask <= contact.bodyB.categoryBitMask) ? (A:contact.bodyA,B:contact.bodyB) : (A:contact.bodyB,B:contact.bodyA) switch (bodies.A.categoryBitMask,bodies.B.categoryBitMask) { case let (a, _) where (a && superPower): //All we care about is i...
First of all, install gulp and gulp-jsdoc3 to your project: npm install gulp-jsdoc3 --save-dev Then add it to your gulpfile.js var gulp = require('gulp'); var jsdoc = require('gulp-jsoc3'); gulp.task('doc', function (cb){ gulp.src('src/*.js') .pipe(jsdoc(cb)); }); In order...
// myString is "hi" NSMutableString *reversedString = [NSMutableString string]; NSInteger charIndex = [myString length]; while (charIndex > 0) { charIndex--; NSRange subStrRange = NSMakeRange(charIndex, 1); [reversedString appendString:[myString substringWithRange:subS...
Getting a table with vertical headers. Twitter bootstrap now support vertical header on a well formatted normal table. To achieve this just use .table-reflow class Use twitter bootstrap .table-reflow class on a well formed table to achieve a table with vertical headers. Additionally you can combin...
Installation via NodeJS is the recommended method. It is preferred because you can use it to build the files selecting just the components you want. Step 1: Install Node (Link) Step 2: Install Gulp globally ( -g ) on your computer npm install -g gulp Semantic UI uses Gulp to provide command ...
There are many reasons a write operation may fail. A frequent one is because your security rules reject the operation, for example because you're not authenticated (by default a database can only be accessed by an authenticated user). You can see these security rule violations in the console output...
This document details the steps to obtain the facebook access tokens and the using the tokens to fetch FB feeds. Example: A live example is available in https://newtonjoshua.com Introduction to Graph API: The Graph API is the primary way to get data in and out of Facebook's platform. It's a...
Class is the piece of code where we define the attributes and/or behaviors of an object. You can define variables, constants, methods and constructors to the object, inside the class. In another words, class is the blueprint of an object. Let's see a sample class in Java, which defines a (simple) C...
With the 2.x versions of typescript, typings are now available from the npm @types repository. These are automatically resolved by the typescript compiler and are much simpler to use. To install a type definition you simply install it as a dev dependency in your projects package.json e.g. npm i -...
Object is the base module in the Object Oriented Programming (OOP). An Object can be a variable, data structure (like an array, map, etc), or even a function or method. In OOP, we model real world objects like animals, vehicles, etc. An object can be defined in a class, which can be defined as the ...
There are two classes of methods for solving Linear Equations: Direct Methods: Common characteristics of direct methods are that they transform the original equation into equivalent equations that can be solved more easily, means we get solve directly from an equation. Iterative Method: It...
An equation of the type f(x)=0 is either algebraic or transcendental. These types of equations can be solved by using two types of methods- Direct Method: This method gives the exact value of all the roots directly in a finite number of steps. Indirect or Iterative Method: Iterative method...

Page 366 of 505