Tutorial by Examples: o

Detailed instructions on getting twitter-oauth set up or installed.
Swift Add this extension to UIImage : extension UIImage { func maskWithColor(color: UIColor) -> UIImage? { let maskImage = self.CGImage let width = self.size.width let height = self.size.height let bounds = CGRectMake(0, 0, width, height) ...
with q command we could simplify a lot of tedious work in vim. example 1. generate array sequence (1 to 20). STEP 1. press i to enter insert mode, input 1 1 STEP 2. Record following action: "append the last number to the next line, and increment the number" type esc to exit input...
import scala.reflect.runtime.universe._ val mirror = runtimeMirror(getClass.getClassLoader) val module = mirror.staticModule("org.data.TempClass")
ActiveRecord pattern was popularized by Rails. It's the default ORM there. Conventions Rails ActiveRecord is driven by conventions: class names are mapped to table names, field names are mapped to field names, foreign and primary keys should be named accordingly. These conventions can be overridde...
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...
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...
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...

Page 619 of 1038