Tutorial by Examples: ci

The border-spacing property determines the spacing between cells. This has no effect unless border-collapse is set to separate. Below an example of two tables with different values to the border-spacing property: The table on the left has border-spacing: 2px (default) while the one on the right ...
To run a specific migration up or down, use db:migrate:up or db:migrate:down. Up a specific migration: 5.0 rake db:migrate:up VERSION=20090408054555 5.0 rails db:migrate:up VERSION=20090408054555 Down a specific migration: 5.0 rake db:migrate:down VERSION=20090408054555 5.0 ra...
In the VBA Editor window, from the Tools menu select "Options": Then in the "Editor" tab, make sure that "Require Variable Declaration" is checked: Selecting this option will automatically put Option Explicit at the top of every VBA module. Small note: This is ...
Slices have both length and capacity. The length of a slice is the number of elements currently in the slice, while the capacity is the number of elements the slice can hold before needing to be reallocated. When creating a slice using the built-in make() function, you can specify its length, and ...
While the Java Date class has several constructors, you'll notice that most are deprecated. The only acceptable way of creating a Date instance directly is either by using the empty constructor or passing in a long (number of milliseconds since standard base time). Neither are handy unless you're lo...
When Fortran was originally developed memory was at a premium. Variables and procedure names could have a maximum of 6 characters, and variables were often implicitly typed. This means that the first letter of the variable name determines its type. variables beginning with i, j, ..., n are intege...
Vector size is simply the number of elements in the vector: Current vector size is queried by size() member function. Convenience empty() function returns true if size is 0: vector<int> v = { 1, 2, 3 }; // size is 3 const vector<int>::size_type size = v.size(); cout << size...
A std::vector automatically increases its capacity upon insertion as needed, but it never reduces its capacity after element removal. // Initialize a vector with 100 elements std::vector<int> v(100); // The vector's capacity is always at least as large as its size auto const old_capacity...
To do an insert on specific columns (as opposed to all of them) you must specify the columns you want to update. INSERT INTO USERS (FIRST_NAME, LAST_NAME) VALUES ('Stephen', 'Jiang'); This will only work if the columns that you did not list are nullable, identity, timestamp data type or compute...
Fixed precision and scale decimal numbers. DECIMAL and NUMERIC are functionally equivalent. Syntax: DECIMAL ( precision [ , scale] ) NUMERIC ( precision [ , scale] ) Examples: SELECT CAST(123 AS DECIMAL(5,2)) --returns 123.00 SELECT CAST(12345.12 AS NUMERIC(10,5)) --returns 12345.12000
The SQL 2008 standard defines the FETCH FIRST clause to limit the number of records returned. SELECT Id, ProductName, UnitPrice, Package FROM Product ORDER BY UnitPrice DESC FETCH FIRST 10 ROWS ONLY This standard is only supported in recent versions of some RDMSs. Vendor-specific non-stand...
ProcedureName ProcedureName argument1, argument2 Call a procedure by its name without any parentheses. Edge case The Call keyword is only required in one edge case: Call DoSomething : DoSomethingElse DoSomething and DoSomethingElse are procedures being called. If the Call keyword was rem...
Call ProcedureName Call ProcedureName(argument1, argument2) The explicit call syntax requires the Call keyword and parentheses around the argument list; parentheses are redundant if there are no parameters. This syntax was made obsolete when the more modern implicit call syntax was added to VB. ...
It's possible to attach an object to an existing object as if there was a new property. This is called association and allows one to extend existing objects. It can be used to provide storage when adding a property via a class extension or otherwise add additional information to an existing object. ...
In order to specify which version of python the Linux shell should use the first line of Python scripts can be a shebang line, which starts with #!: #!/usr/bin/python If you are in a virtual environment, then python myscript.py will use the Python from your virtual environment, but ./myscript.py...
General syntax git push <remotename> <object>:<remotebranchname> Example git push origin master:wip-yourname Will push your master branch to the wip-yourname branch of origin (most of the time, the repository you cloned from). Delete remote branch Deleting the remote br...
Many C interfaces such as SDL2 have their own deletion functions. This means that you cannot use smart pointers directly: std::unique_ptr<SDL_Surface> a; // won't work, UNSAFE! Instead, you need to define your own deleter. The examples here use the SDL_Surface structure which should be fre...
h2 { /* adds a 1px space horizontally between each letter; also known as tracking */ letter-spacing: 1px; } The letter-spacing property is used to specify the space between the characters in a text. ! letter-spacing also supports negative values: p { letter-spacing: -1px; }...
fn main() { let english = "Hello, World!"; println!("{}", &english[0..5]); // Prints "Hello" println!("{}", &english[7..]); // Prints "World!" } Note that we need to use the & operator here. It takes a reference and ...
public function facebook() { return $this->socialite->driver('facebook')->stateless()->redirect()->getTargetUrl(); } This will return the URL that the consumer of the API must provide to the end user to get authorization from Facebook.

Page 5 of 42