Tutorial by Examples: di

We want to add Toast to nativescript default app. import {Component} from "@angular/core"; let application = require("application"); declare var android:any; @Component({ selector: "my-app", templateUrl: "app.component.html", }) export clas...
Ordinary Least Squares is a method for finding the linear combination of features that best fits the observed outcome in the following sense. If the vector of outcomes to be predicted is y, and the explanatory variables form the matrix X, then OLS will find the vector β solving minβ|y^ - y|22, w...
$ sleep 500 & [1] 7582 Puts the sleep command in background. 7582 is the process id of the background process.
SELECT SERVERPROPERTY('ProductVersion') AS ProductVersion, SERVERPROPERTY('ProductLevel') AS ProductLevel, SERVERPROPERTY('Edition') AS Edition, SERVERPROPERTY('EngineEdition') AS EngineEdition;
It may be helpful to include additional information with an exception, e.g. for logging purposes or to allow conditional handling when the exception is caught: class CustomError < StandardError attr_reader :safe_to_retry def initialize(safe_to_retry = false, message = 'Something went wro...
English text has the occasional diacritics. Loan words, like née, café, entrée Names, like Noël and Chloë Place names, like Montréal and Québec
In this example we create a new list element with the text "new text", and select the first unordered list, and its first list element. let newElement = document.createElement("li"); newElement.innerHTML = "new text"; let parentElement = document.querySelector(&quo...
There are several ways of getting the data that you will bind to the DOM elements. The simpler one is having your data in your script as an array... var data = [ ... ]; But D3.js allows us to load data from an external file. In this example, we will see how to properly load and deal with data fr...
You can add also add some more logic which has to be checked to your ACL using anonymous functions. They will be executed when using Phalcon\Acl\Adapter\Memory::allow() or Phalcon\Acl\Adapter\Memory::deny(), if they will return true, they role will be allowed to access certain action on resource. $...
Modifying the strings returned by the standard functions getenv(), strerror() and setlocale() is undefined. So, implementations may use static storage for these strings. The getenv() function, C11, §7.22.4.7, 4, says: The getenv function returns a pointer to a string associated with the matched...
var path = "/test_javascript_upload.txt"; var content = "data to upload"; var accessToken = "<ACCESS_TOKEN>"; var uploadUrl = "https://content.dropboxapi.com/2/files/upload" var result; var xhr = new XMLHttpRequest(); xhr.onreadystatechange = fun...
To Retrieve URL path in STATIC BLOCK Or CMS pages To get SKIN URL {{skin url=’images/sampleimage.jpg’}} To get Media URL {{media url=’/sampleimage.jpg’}} To get Store URL {{store url=’mypage.html’}} To get Base URL {{base url=”}} TO Retrieve URL path in PHTML Not secure Skin URL &...
\m : Beginning of a word. \M : End of a word. \y : Word boundary. \Y : a point that is not a word boundary. \Z : matches end of data. Documentation: re_syntax
$ mysqlimport --where="id>2" mycompany employee.txt
Sometimes a poorly designed 3rd-party library will write unwanted diagnostics to System.out or System.err streams. The recommended solutions to this would be to either find a better library or (in the case of open source) fix the problem and contribute a patch to the developers. If the above solu...
In the Adobe technical white paper Adobe Acrobat 9 Digital Signatures, Changes and Improvements, especially its section "Allowed and disallowed changes", Adobe clarifies the allowed changes (as seen by Acrobat 9 and up) that can be made to a certified or signed document without invalidatin...
page.xml <Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo"> <Repeater items="{{ myItems }}"> <Repeater.itemTemplate> <Label text="{{ title || 'Downloading...' }}" textWrap="true&quot...
creating-listview.component.html <ListView [items]="countries" (itemTap)="onItemTap($event)"> <template let-country="item" let-i="index"> <StackLayout orientation="horizontal"> <Label [text]='(i + 1) +...
ngfor.component.html <StackLayout> <Label *ngFor="let item of items" [text]="item"></Label> </StackLayout> ngfor.component.ts import { Component } from "@angular/core"; var dataItems = ["data-item 1", "data-item 2&quo...
It is possible that the client browser does not support Javascript or have Javascript execution disabled, perhaps due to security reasons. To be able to tell users that a script is supposed to execute in the page, the <noscript> tag can be used. The content of <noscript> is displayed whe...

Page 91 of 164