Tutorial by Examples: er

-and # Logical and -or # Logical or -xor # Logical exclusive or -not # Logical not ! # Logical not
Simple arithmetic: $var = 1 # Assignment. Sets the value of a variable to the specified value $var += 2 # Addition. Increases the value of a variable by the specified value $var -= 1 # Subtraction. Decreases the value of a variable by the specified value $var *= 2 # Multiplicati...
PowerShell comparison operators are comprised of a leading dash (-) followed by a name (eq for equal, gt for greater than, etc...). Names can be preceded by special characters to modify the behavior of the operator: i # Case-Insensitive Explicit (-ieq) c # Case-Sensitive Explicit (-ceq) Case-I...
Success output stream: cmdlet > file # Send success output to file, overwriting existing content cmdlet >> file # Send success output to file, appending to existing content cmdlet 1>&2 # Send success and error output to error stream Error output stream: cmdlet 2&g...
Configure your project-level build.gradle to include the android-apt plugin: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1' } } Then, apply the android-apt plugin in your module-level build...
The border-collapse property determines if a tables' borders should be separated or merged. Below an example of two tables with different values to the border-collapse property: The table on the left has border-collapse: separate while the one on the right has border-collapse: collapse. ValueDe...
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 ...
struct Square { private(set) var area = 0 var side: Int = 0 { didSet { area = side*side } } } public struct Square { public private(set) var area = 0 public var side: Int = 0 { didSet { area = side*side } ...
class Animal def method_missing(method, *args, &block) say, speak = method.to_s.split("_") if say == "say" && speak return speak.upcase if args.first == "shout" speak else super end end end => Animal.new....
To previous view controller To pop back to the previous page you can do this: Swift navigationController?.popViewControllerAnimated(true) Objective-C [self.navigationController popViewControllerAnimated:YES]; To root view controller To pop to the root of the navigation stack, you can do...
In your storyboard select the ViewController that you want to embed into a Navigation Controller. Then navigate to Editor > Embed In > Navigation Controller And that will create your navigation controller
0 # creates the Fixnum 0 123 # creates the Fixnum 123 1_000 # creates the Fixnum 1000. You can use _ as separator for readability By default the notation is base 10. However, there are some other built-in notations for different bases: 0xFF # Hexadecimal representation of 255, s...
You can use the Integer method to convert a String to an Integer: Integer("123") # => 123 Integer("0xFF") # => 255 Integer("0b100") # => 4 Integer("0555") # => 365 You can also pass a base parameter to the Integer method to c...
CommandDescriptionaAppend text following current cursor positionAAppend text at the end of current lineiInsert text before the current cursor positionIInsert text before first non-blank character of current linegIInsert text in first column of cursor linegiInsert text at same position where it was l...
Android supports several configuration qualifiers that allow you to control how the system selects your alternative resources based on the characteristics of the current device screen. A configuration qualifier is a string that you can append to a resource directory in your Android project and speci...
To run migrations in the test environment, run this shell command: rake db:migrate RAILS_ENV=test 5.0 Starting in Rails 5.0, you can use rails instead of rake: rails db:migrate RAILS_ENV=test
To add a reference to a team to the users table, run this command: $ rails generate migration AddTeamRefToUsers team:references This generates the following migration: class AddTeamRefToUsers < ActiveRecord::Migration[5.0] def change add_reference :users, :team, foreign_key: true ...
To broaden the selections of a structured query language (SQL-SELECT) statement, wildcard characters, the percent sign (%) and the underscore (_), can be used. The _ (underscore) character can be used as a wildcard for any single character in a pattern match. Find all employees whose Fname start w...
Use the : operator to create sequences of numbers, such as for use in vectorizing larger chunks of your code: x <- 1:5 x ## [1] 1 2 3 4 5 This works both ways 10:4 # [1] 10 9 8 7 6 5 4 and even with floating point numbers 1.25:5 # [1] 1.25 2.25 3.25 4.25 or negatives -4:4 ...
Say you want to perform in action (in this case, logging "Foo"), while doing something else (logging "Bar"). Normally, if you don't use concurrency, one of these actions is going to be fully executed, and the other run will run only after it's completely finished. But with concur...

Page 43 of 417