Tutorial by Examples: e

Install npm install tsify Using Command Line Interface browserify main.ts -p [ tsify --noImplicitAny ] > bundle.js Using API var browserify = require("browserify"); var tsify = require("tsify"); browserify() .add("main.ts") .plugin("tsify&quot...
Install npm install ts-loader --save-dev Basic webpack.config.js webpack 2.x, 3.x module.exports = { resolve: { extensions: ['.ts', '.tsx', '.js'] }, module: { rules: [ { // Set up ts-loader for .ts/.tsx files and exclude any impor...
Right-Click -> Manage NuGet Packages Search for Microsoft.TypeScript.MSBuild Hit Install When install is complete, rebuild! More details can be found at Package Manager Dialog and using nightly builds with NuGet
Sometimes we have to resize a UILabel based on dynamic content where the text length is unknown. In this example, width of the UILabel is fixed at 280 points and the height is infinite, lets say 9999. Estimating the frame with respect to the text style and maximumLabelSize. Objective-C UILabel * l...
To create a square, define an element with both a width and height. In the example below, we have an element with a width and height of 100 pixels each. <div class="square"></div> .square { width: 100px; height: 100px; background: rgb(246, 156, 85); } ...
To create a CSS triangle define an element with a width and height of 0 pixels. The triangle shape will be formed using border properties. For an element with 0 height and width the 4 borders (top, right, bottom, left) each form a triangle. Here's an element with 0 height/width and 4 different color...
Circle To create a circle, define an element with an equal width and height (a square) and then set the border-radius property of this element to 50%. HTML <div class="circle"></div> CSS .circle { width: 50px; height: 50px; background: rgb(246, 156, 85); ...
DROP PROCEDURE if exists displayNext100WithName; DELIMITER $$ CREATE PROCEDURE displayNext100WithName ( nStart int, tblName varchar(100) ) BEGIN DECLARE thesql varchar(500); -- holds the constructed sql string to execute -- expands the sizing of the output buffer to accomoda...
A closure can be defined with a typealias. This provides a convenient type placeholder if the same closure signature is used in multiple places. For example, common network request callbacks or user interface event handlers make great candidates for being "named" with a type alias. public...
;; disable automatic loading of packages after the init file (setq package-enable-at-startup nil) ;; instead load them explicitly (package-initialize) ;; refresh package descriptions (unless package-archive-contents (package-refresh-contents)) ;;; use-package initialization ;;; install ...
In most cases you want to define several border properties (border-width, border-style and border-color) for all sides of an element. Instead of writing: border-width: 1px; border-style: solid; border-color: #000; You can simply write: border: 1px solid #000; These shorthands are also ava...
With the border-image property you have the possibility to set an image to be used instead of normal border styles. A border-image essentially consist of a border-image-source: The path to the image to be used border-image-slice: Specifies the offset that is used to divide the image into nine r...
cat >file It will let you write the text on terminal which will be saved in a file named file. cat >>file will do the same, except it will append the text to the end of the file. N.B: Ctrl+D to end writing text on terminal (Linux) A here document can be used to inline the content...
An element's opacity can be set using the opacity property. Values can be anywhere from 0.0 (transparent) to 1.0 (opaque). Example Usage <div style="opacity:0.8;"> This is a partially transparent element </div> Property ValueTransparencyopacity: 1.0;Opaqueopacity: 0....
To create a list of constants - assign iota value to each element: const ( a = iota // a = 0 b = iota // b = 1 c = iota // c = 2 ) To create a list of constants in a shortened way - assign iota value to the first element: const ( a = iota // a = 0 b // b = 1 c /...
iota can be used in expressions, so it can also be used to assign values other than simple incrementing integers starting from zero. To create constants for SI units, use this example from Effective Go: type ByteSize float64 const ( _ = iota // ignore first value by assigning to b...
The value of iota is still incremented for every entry in a constant list even if iota is not used: const ( // iota is reset to 0 a = 1 << iota // a == 1 b = 1 << iota // b == 2 c = 3 // c == 3 (iota is not used but still incremented) d = 1 << iota ...
Because iota is incremented after each ConstSpec, values within the same expression list will have the same value for iota: const ( bit0, mask0 = 1 << iota, 1<<iota - 1 // bit0 == 1, mask0 == 0 bit1, mask1 // bit1 == 2, mask1 == 1 _, _ ...
Iota can be very useful when creating a bitmask. For instance, to represent the state of a network connection which may be secure, authenticated, and/or ready, we might create a bitmask like the following: const ( Secure = 1 << iota // 0b001 Authn // 0b010 Ready ...
Download the Datastax PHP driver for Apache Cassandra from the Git project site, and follow the installation instructions. We will be using the "users" table from the KillrVideo app and the Datastax PHP driver. Once you have Cassandra up and running, create the following keyspace and tabl...

Page 327 of 1191