Tutorial by Examples

The following command backs up the 'Users' database to 'D:\DB_Backup' file. Its better to not give an extension. BACKUP DATABASE Users TO DISK = 'D:\DB_Backup'
The following command restores the 'Users' database from 'D:\DB_Backup' file. RESTORE DATABASE Users FROM DISK = 'D:\DB_Backup'
Following example also have explanation required for understanding example within it. import java.time.Clock; import java.time.Duration; import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.ZoneId; import java.time...
First of all you need to have IIS (Internet Information Services) installed and running on your machine; IIS isn't available by default, you have to add the characteristic from Control Panel -> Programs -> Windows Characteristics. Download the PHP version you like from http://windows.php.ne...
You may often find the need to get the auto incremented ID value for a row that you have just inserted into your database table. You can achieve this with the lastInsertId() method. // 1. Basic connection opening (for MySQL) $host = 'localhost'; $database = 'foo'; $user = 'root' $password = ''...
The find function First let's take a look at the string.find function in general: The function string.find (s, substr [, init [, plain]]) returns the start and end index of a substring if found, and nil otherwise, starting at the index init if it is provided (defaults to 1). ("Hello, I am a ...
How it works The string.gmatch function will take an input string and a pattern. This pattern describes on what to actually get back. This function will return a function which is actually an iterator. The result of this iterator will match to the pattern. type(("abc"):gmatch ".&quo...
do not confuse with the string.sub function, which returns a substring! How it works string argument ("hello world"):gsub("o", "0") --> returns "hell0 w0rld", 2 -- the 2 means that 2 substrings have been replaced (the 2 Os) ("hello worl...
Detailed instructions on getting odata set up or installed.
Detailed instructions on getting opengl-es set up or installed.
In PHP 7.1, the void return type was added. While PHP has no actual void value, it is generally understood across programming languages that a function that returns nothing is returning void. This should not be confused with returning null, as null is a value that can be returned. function lacks_re...
Julia has a built-in implementation of semantic versioning exposed through the VersionNumber type. To construct a VersionNumber as a literal, the @v_str string macro can be used: julia> vers = v"1.2.0" v"1.2.0" Alternatively, one can call the VersionNumber constructor; n...
The Compat.jl package enables using some new Julia features and syntax with older versions of Julia. Its features are documented on its README, but a summary of useful applications is given below. 0.5.0 Unified String type In Julia v0.4, there were many different types of strings. This system was...
NSArray *aryFName = @[ @"Alice", @"Bob", @"Charlie", @"Quentin" ]; NSArray *aryLName = @[ @"Smith", @"Jones", @"Smith", @"Alberts" ]; NSArray *aryAge = @[ @24, @27, @33, @31 ]; //Create a Custom class with prope...
A struct is a sequence of named elements, called fields, each of which has a name and a type. Empty struct has no fields, like this anonymous empty struct: var s struct{} Or like this named empty struct type: type T struct{} The interesting thing about the empty struct is that, its size is z...
For example you want to use surfaceView in ng2-nativescript. As we don't have surfaceView in nativescript we should use placeholder. first we should import the requirements: import {Component} from "@angular/core"; import placeholder = require("ui/placeholder"); let applicat...
app.component.ts: import {Component,OnInit} from "@angular/core"; import placeholder = require("ui/placeholder"); let application= require("application"); @Component({ selector: "my-app", templateUrl: "app.component.html", }) export...
If the SQL statement is constructed like this: SQL = "SELECT * FROM Users WHERE username = '" + user + "' AND password ='" + pw + "'"; db.execute(SQL); Then a hacker could retrieve your data by giving a password like pw' or '1'='1; the resulting SQL statement will ...
Define the function using the vararg keyword. fun printNumbers(vararg numbers: Int) { for (number in numbers) { println(number) } } Now you can pass as many parameters (of the correct type) into the function as you want. printNumbers(0, 1) // Prints "0&qu...
Arrays can be passed into vararg functions using the Spread Operator, *. Assuming the following function exists... fun printNumbers(vararg numbers: Int) { for (number in numbers) { println(number) } } You can pass an array into the function like so... val numbers = intArray...

Page 810 of 1336