Tutorial by Examples

These functions are very similar in behaviour. The difference is that ng-if removes elements from the DOM. If there are large parts of the code that will not be shown, then ng-if is the way to go. ng-show will only hide the elements but will keep all the handlers. ng-if The ngIf directive removes ...
ngOptions is a directive that simplifies the creation of a html dropdown box for the selection of an item from an array that will be stored in a model. The ngOptions attribute is used to dynamically generate a list of <option> elements for the <select> element using the array or object o...
In other frameworks pagination is headache. Laravel makes it breeze, it can generate pagination by adding few lines of code in Controller and View. Basic Usage There are many ways to paginate items, but the simplest one is using the paginate method on query builder or an Eloquent query. Laravel ou...
NSURL *url = [NSURL URLWithString:@"http://www.example.com/"]; NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; // Configure the session here. NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration]; [[s...
// create an empty set var mySet = new SortedSet<int>(); // add something // note that we add 2 before we add 1 mySet.Add(2); mySet.Add(1); // enumerate through the set foreach(var item in mySet) { Console.WriteLine(item); } // output: // 1 // 2
// create an array with 2 elements var myArray = new [] { "one", "two" }; // enumerate through the array foreach(var item in myArray) { Console.WriteLine(item); } // output: // one // two // exchange the element on the first position // note that all collecti...
Using a CDN: <!DOCTYPE html> <head> <script src="https://cdn.jsdelivr.net/rxjs/4.1.0/rx.min.js"></script> </head> <body> <script> // `Rx` is available var one$ = Rx.Observable.of(1); var onesub = one$.subscribe(function (...
You need to having a server running online. To securely associate your iOS app with a server, Apple requires that you make available a configuration file, called apple-app-site-association. This is a JSON file which describes the domain and supported routes. The apple-app-site-association file need...
Each domain supported in the app needs to make available its own apple-app-site-association file. If the content served by each domain is different, then the contents of the file will also change to support the respective paths. Otherwise, the same file can be used, but it needs to be accessible at ...
Note: You can skip this part if your server uses HTTPS to serve content and jump to Application Setup guide. If your app targets iOS 9 and your server uses HTTPS to serve content, you don’t need to sign the file. If not (e.g. when supporting Handoff on iOS 8), it has to be signed using a SSL certif...
The setup on the app side requires two things: Configuring the app’s entitlement, and enabling the universal links by turning on the Associated Domains capability in the project. Handling Incoming Links in your AppDelegate. 1. Configuring the app’s entitlement, and enabling universal links. ...
Mage::log('My log entry', null, 'mylogfile.log'); This wil log to /var/log/mylogfile.log
Mage::log('My log entry'); Mage::log('My log message: '.$myVariable); Mage::log($myArray); Mage::log($myObject); This will log to /var/log/system.log Objects and Arrays are automatically written via a print_r() directive. Watch out when using objects since these can get substantial in size. ...
Detailed instructions on getting facebook-graph-api set up or installed.
A common usecase for the ready() hook is to access the DOM, e.g. to initiate a Javascript plugin, get the dimensions of an element etc. The problem Due to Vue's asynchronous DOM update mechanism, it's not guaranteed that the DOM has been fully updated when the ready() hook is called. This usually ...
PHP provides an alternative syntax for some control structures: if, while, for, foreach, and switch. When compared to the normal syntax, the difference is, that the opening brace is replaced by a colon (:) and the closing brace is replaced by endif;, endwhile;, endfor;, endforeach;, or endswitch;, ...
while loop iterates through a block of code as long as a specified condition is true. $i = 1; while ($i < 10) { echo $i; $i++; } Output: 123456789 For detailed information, see the Loops topic.
do-while loop first executes a block of code once, in every case, then iterates through that block of code as long as a specified condition is true. $i = 0; do { $i++; echo $i; } while ($i < 10); Output: `12345678910` For detailed information, see the Loops topic.
The goto operator allows to jump to another section in the program. It's available since PHP 5.3. The goto instruction is a goto followed by the desired target label: goto MyLabel;. The target of the jump is specified by a label followed by a colon: MyLabel:. This example will print Hello World!...
declare is used to set an execution directive for a block of code. The following directives are recognized: ticks encoding strict_types For instance, set ticks to 1: declare(ticks=1); To enable strict type mode, the declare statement is used with the strict_types declaration: declare(s...

Page 292 of 1336