Tutorial by Examples: 1

// assigning a signed short to its minimum value short s = -32768; // assigning a signed short to its maximum value short s = 32767; // assigning a signed int to its minimum value int i = -2147483648; // assigning a signed int to its maximum value int i = 2147483647; // assigning a s...
// assigning an unsigned short to its minimum value ushort s = 0; // assigning an unsigned short to its maximum value ushort s = 65535; // assigning an unsigned int to its minimum value uint i = 0; // assigning an unsigned int to its maximum value uint i = 4294967295; // assigning an...
Deprecated usage The ConfigurationSettings class was the original way to retrieve settings for an assembly in .NET 1.0 and 1.1. It has been superseded by the ConfigurationManager class and the WebConfigurationManager class. If you have two keys with the same name in the appSettings section of the ...
The math module contains the expm1()-function that can compute the expression math.e ** x - 1 for very small x with higher precision than math.exp(x) or cmath.exp(x) would allow: import math print(math.e ** 1e-3 - 1) # 0.0010005001667083846 print(math.exp(1e-3) - 1) # 0.0010005001667083846 p...
When creating a subscription for a user, you first need to create and activate a billing plan that a user is then subscribed to using a billing agreement. The full process for creating a subscription is detailed in the remarks of this topic. Within this example, we're going to be using the PayPal N...
// Java: Arrays.asList("a1", "a2", "a3") .stream() .findFirst() .ifPresent(System.out::println); // Kotlin: listOf("a1", "a2", "a3").firstOrNull()?.apply(::println) or, create an extension function on String calle...
select LastName, FirstName, from Person Returns message: Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from Person' at line 2. Getting a "1064 error" message from MySQL mean...
Introduction SharePoint 2016 is the version 16 release of the SharePoint product family. It was released on May 4, 2016. This example covers the installation of SharePoint 2016 using the Single Server Farm configuration. This configuration covers the basics of setting up a SharePoint farm without t...
The HTML 4.01 specification provides several different types of doctypes that allow different types of elements to be specified within the document. HTML 4.01 Strict <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> Includes all...
Prerequisites To run the Play framework, you need Java 6 or later. If you wish to build Play from source, you will need the Git source control client to fetch the source code and Ant to build it. Be sure to have Java in the current path (enter java --version to check) Play will use the default Ja...
This error appears while trying to update or delete records without including the WHERE clause that uses the KEY column. To execute the delete or update anyway - type: SET SQL_SAFE_UPDATES = 0; To enable the safe mode again - type: SET SQL_SAFE_UPDATES = 1;
Math.random(); produces an evenly distributed random number between 0 (inclusive) and 1 (exclusive) Example output: 0.22282187035307288 0.3948539895936847 0.9987191134132445
DateTime date1 = new DateTime(2009, 8, 1, 0, 0, 0); DateTime date2 = new DateTime(2009, 8, 1, 12, 0, 0); int result = DateTime.Compare(date1, date2); string relationship; if (result < 0) relationship = "is earlier than"; else if (result == 0) relationship = "is the...
If I wanted to find out the sum of numbers from 1 to n where n is a natural number, I can do 1 + 2 + 3 + 4 + ... + (several hours later) + n. Alternatively, I could write a for loop: n = 0 for i in range (1, n+1): n += i Or I could use a technique known as recursion: def recursion(n): ...
We will model the process #Load the forecast package library(forecast) #Generate an AR1 process of length n (from Cowpertwait & Meltcalfe) # Set up variables set.seed(1234) n <- 1000 x <- matrix(0,1000,1) w <- rnorm(n) # loop to create x for (t in 2:n) x[t] <- 0.7...
Component code: angular.module('myModule', []).component('myComponent', { bindings: { myValue: '<' }, controller: function(MyService) { this.service = MyService; this.componentMethod = function() { return 2; }; } }); The test: describe('myComponent', f...
The specifier override has a special meaning in C++11 onwards, if appended at the end of function signature. This signifies that a function is Overriding the function present in base class & The Base class function is virtual There is no run time significance of this specifier as is mainl...
C++11 // Include sequence containers #include <vector> #include <deque> #include <list> #include <array> #include <forward_list> // Include sorting algorithm #include <algorithm> class Base { public: // Constructor that set variable to the va...
init Called synchronously after the instance has been initialized and prior to any initial data observation. created Called synchronously after the instance is created. This occurs prior to $el setup, but after data observation, computed properties, watch/event callbacks, and methods ha...
The static method Date.now returns the number of milliseconds that have elapsed since 1 January 1970 00:00:00 UTC. To get the number of milliseconds that have elapsed since that time using an instance of a Date object, use its getTime method. // get milliseconds using static method now of Date co...

Page 1 of 16