Tutorial by Examples

Using a Recursive CTE, you can generate an inclusive range of dates: Declare @FromDate Date = '2014-04-21', @ToDate Date = '2014-05-02' ;With DateCte (Date) As ( Select @FromDate Union All Select DateAdd(Day, 1, Date) From DateCte Where Date < @T...
Another way you can generate a range of dates is by utilizing a Tally Table to create the dates between the range: Declare @FromDate Date = '2014-04-21', @ToDate Date = '2014-05-02' ;With E1(N) As (Select 1 From (Values (1), (1), (1), (1), (1), (1), (1), (1), (1), (1)) DT...
We can get a comma delimited string from multiple rows using coalesce as shown below. Since table variable is used, we need to execute whole query once. So to make easy to understand, I have added BEGIN and END block. BEGIN --Table variable declaration to store sample records DECLARE @...
COALESCE() returns the first NON NULL value in a list of arguments. Suppose we had a table containing phone numbers, and cell phone numbers and wanted to return only one for each user. In order to only obtain one, we can get the first NON NULL value. DECLARE @Table TABLE (UserID int, PhoneNumber va...
Here we demonstrate how to process lists recursively using OCaml's pattern matching syntax. let rec map f lst = match lst with | [] -> [] | hd::tl -> (f hd)::(map f tl) In this case, the pattern [] matches the empty list, while hd::tl matches any list that has at least one element...
If you want to make sure cookies are enabled before using them, you can use navigator.cookieEnabled: if (navigator.cookieEnabled === false) { alert("Error: cookies not enabled!"); } Note that on older browsers navigator.cookieEnabled may not exist and be undefined. In those case...
Function Factorial(Value As Long) As Long If Value = 0 Or Value = 1 Then Factorial = 1 Else Factorial = Factorial(Value - 1) * Value End If End Function
Early Bound (with a reference to Microsoft Scripting Runtime) Sub EnumerateFilesAndFolders( _ FolderPath As String, _ Optional MaxDepth As Long = -1, _ Optional CurrentDepth As Long = 0, _ Optional Indentation As Long = 2) Dim FSO As Scriptin...
TYPO3 has extensive documentation. This documentation is linked here, so people can find stuff that is not documented here. Main Documentation The documentation of TYPO3 CMS is collected at docs.typo3.org, there is a list of all documentation for the core, and documentation for extensions. Promin...
TYPO3 can be solely installed with the PHP dependency manager composer. Composer has to be available on the server, then a TYPO3 project can be started by using the base distribution. composer create-project typo3/cms-base-distribution . This will pull the TYPO3 core from the git repository, dow...
Employees table : | ID | FirstName | LastName | Gender | Salary | +------+-----------+----------+--------+--------+ | 1 | Jahangir | Alam | Male | 70000 | | 2 | Arifur | Rahman | Male | 60000 | | 3 | Oli | Ahammed | Male | 45000 | | 4 | Sima | Sulta...
Employees table : | ID | FirstName | LastName | Gender | Salary | +------+-----------+----------+--------+--------+ | 1 | Mark | Hastings | Male | 60000 | | 1 | Mark | Hastings | Male | 60000 | | 2 | Mary | Lambeth | Female | 30000 | | 2 | Mary | Lambe...
OperatorComparisonExample==Equali == 0===Equal Value and Typei === "5"!=Not Equali != 5!==Not Equal Value or Typei !== 5>Greater thani > 5<Less thani < 5>=Greater than or equali >= 5<=Less than or equali <= 5
Open a text editor (like Notepad), and type the code below: Imports System.ComponentModel Imports System.Drawing Imports System.Windows.Forms Namespace SampleApp Public Class MainForm : Inherits Form Private btnHello As Button ' The form's constructor: thi...
library(caret) # for dummyVars library(RCurl) # download https data library(Metrics) # calculate errors library(xgboost) # model ############################################################################### # Load data from UCI Machine Learning Repository (http://archive.ics.uci.edu/ml/data...
You can use the microbenchmark package to conduct "sub-millisecond accurate timing of expression evaluation". In this example we are comparing the speeds of six equivalent data.table expressions for updating elements in a group, based on a certain condition. More specifically: A data....
================== TODO: Link each of the drawing commands below to their individual examples. I don't know how to do this since the links to the individual examples point towards the "draft" folder. TODO: Add examples for these path "action" commands: stroke(), fill(), clip() ...
context.lineTo(endX, endY) Draws a line segment from the current pen location to coordinate [endX,endY] <!doctype html> <html> <head> <style> body{ background-color:white; } #canvas{border:1px solid red; } </style> <script> window.onload=(fun...
context.arc(centerX, centerY, radius, startingRadianAngle, endingRadianAngle) Draws a circular arc given a centerpoint, radius and starting & ending angles. The angles are expressed as radians. To convert degrees to radians you can use this formula: radians = degrees * Math.PI / 180;. Angle ...
context.quadraticCurveTo(controlX, controlY, endingX, endingY) Draws a quadratic curve starting at the current pen location to a given ending coordinate. Another given control coordinate determines the shape (curviness) of the curve. <!doctype html> <html> <head> <style...

Page 425 of 1336