Tutorial by Examples: dc

public function up() { $this->addColumn('post', 'position', $this->integer()); }
We can use Predefined Constants for Date format in date() instead of the conventional date format strings since PHP 5.1.0. Predefined Date Format Constants Available DATE_ATOM - Atom (2016-07-22T14:50:01+00:00) DATE_COOKIE - HTTP Cookies (Friday, 22-Jul-16 14:50:01 UTC) DATE_RSS - RSS (Fri, 22...
Layout Unity basic editor will look like below. Basic functionalities of some default windows/tabs are described in the image. Linux Layout There is a little difference in menu layout of linux version, like the screenshot below, Basic Usage Create an empty GameObject by right clicking in th...
Installation npm install -D webpack typescript ts-loader webpack.config.js module.exports = { entry: { app: ['./src/'], }, output: { path: __dirname, filename: './dist/[name].js', }, resolve: { extensions: ['', '.js', '.ts'], }, module: { loaders: [...
Method chaining is a programming strategy that simplifies your code and beautifies it. Method chaining is done by ensuring that each method on an object returns the entire object, instead of returning a single element of that object. For example: function Door() { this.height = ''; this.w...
data.table offers a wide range of possibilities to reshape your data both efficiently and easily For instance, while reshaping from long to wide you can both pass several variables into the value.var and into the fun.aggregate parameters at the same time library(data.table) #v>=1.9.6 DT <- ...
Different operations with data are done using special classes. Most of the classes belong to one of the following groups: classification algorithms (derived from sklearn.base.ClassifierMixin) to solve classification problems regression algorithms (derived from sklearn.base.RegressorMixin) to so...
dc is one of the oldest language on Unix. It is using the reverse polish notation, which means that you are first stacking numbers, then operations. For example 1+1 is written as 1 1+. To print an element from the top of the stack use command p echo '2 3 + p' | dc 5 or dc <<< '2 3...
If you set opacity on an element it will affect all its child elements. To set an opacity just on the background of an element you will have to use RGBA colors. Following example will have a black background with 0.6 opacity. /* Fallback for web browsers that don't support RGBa */ background-color...
Objective-C mySwitch.backgroundColor = [UIColor yellowColor]; [mySwitch setBackgroundColor: [UIColor yellowColor]]; mySwitch.backgroundColor =[UIColor colorWithRed:255/255.0 green:0/255.0 blue:0/255.0 alpha:1.0]; mySwitch.backgroundColor= [UIColor colorWithWhite: 0.5 alpha: 1.0]; mySwitch.backg...
There is no need to create the whole UI in a single FXML using a single controller. The <fx:include> tag can be used to include one fxml file into another. The controller of the included fxml can be injected into the controller of the including file just as any other object created by the FXM...
The following example encrypts data by using a hybrid cryptosystem consisting of AES GCM and OAEP, using their default parameter sizes and an AES key size of 128 bits. OAEP is less vulnerable to padding oracle attacks than PKCS#1 v1.5 padding. GCM is also protected against padding oracle attacks. ...
The below examples use the new form API introduced in RC3. pw-change.template.html <form class="container" [formGroup]="pwChangeForm"> <label for="current">Current Password</label> <input id="current" formControlName="curr...
name:john* The * indicator allows you to do a wildcard search matching 0 or more characters after the search term john, will return documents containing john, johnson, john's, johnny and so on. name:do? The ? indicator allows you to do a wildcard search with a single character in the search term,...
The case modifier causes the Scala compiler to automatically generate common boilerplate code for the class. Implementing this code manually is tedious and a source of errors. The following case class definition: case class Person(name: String, age: Int) ... will have the following code automati...
Unity works with hierarchies in order to keep your project organized. You can assign objects a place in the hierarchy using the editor but you can also do this through code. Parenting You can set an object's parent with the following methods var other = GetOtherGameObject(); other.transform.Se...
This example will show you how to create a simple animation using the canvas and the 2D context. It is assumed you know how to create and add a canvas to the DOM and obtain the context // this example assumes ctx and canvas have been created const textToDisplay = "This is an example that uses...
1. URLByDeletingPathExtension: If the receiver represents the root path, this property contains a copy of the original URL. If the URL has multiple path extensions, only the last one is removed. 2. URLByAppendingPathExtension: Returns a new URL made by appending a path extension to the original U...
Sometimes what you want to do is just too complex for a filter or a simple_tag. Fow this you will need to create a compilation function and a renderer. In this example we will create a template tag verbose_name with the following syntax: ExampleDescription{% verbose_name obj %}Verbose name of a mo...
Common page and control events are: DataBinding - It is raised when a control binds to a data source. Disposed - It is raised when the page or the control is released. Error - It is a page event, occurs when an unhandled exception is thrown. Init - It is raised when the page or the control is in...

Page 6 of 28