Tutorial by Examples: al

To list available local versions of node through NVM: nvm ls For example, if nvm ls returns: $ nvm ls v4.3.0 v5.5.0 You can switch to v5.5.0 with: nvm use v5.5.0
Consider this broken snippet: def foo bar = [1, 2, 3, 4].map do |x| return 0 if x.even? x end puts 'baz' bar end foo # => 0 One might expect return to yield a value for map's array of block results. So the return value of foo would be [1, 0, 3, 0]. Instead, return retu...
Sometimes we want to give a type a more descriptive name. Let's say our app has a data type representing users: { name : String, age : Int, email : String } And our functions on users have type signatures along the lines of: prettyPrintUser : { name : String, age : Int, email : String } -> S...
A common task is to convert all columns of a data.frame to character class for ease of manipulation, such as in the cases of sending data.frames to a RDBMS or merging data.frames containing factors where levels may differ between input data.frames. The best time to do this is when the data is read ...
Rational represents a rational number as numerator and denominator: r1 = Rational(2, 3) r2 = 2.5.to_r r3 = r1 + r2 r3.numerator # => 19 r3.denominator # => 6 Rational(2, 4) # => (1/2) Other ways of creating a Rational Rational('2/3') # => (2/3) Rational(3) # => (3/1...
Ubuntu On recent Ubuntu versions, you can install an up-to-date version of CouchDB with sudo apt-get install couchdb. For older versions, such as Ubuntu 14.04, you should run: sudo add-apt-repository ppa:couchdb/stable -y sudo apt-get update sudo apt-get install couchdb -y Fedora To install ...
SQL Server Reporting Services can typically be installed with SQL Server installation media. An installation of SQL Server will be required, either locally or on a server. Starting with SQL Server 2008 R2, SSRS has the option to integrate with SharePoint instead of running a separate website.
Simple Dual Port RAM with separate addresses and clocks for read/write operations. module simple_ram_dual_clock #( parameter DATA_WIDTH=8, //width of data bus parameter ADDR_WIDTH=8 //width of addresses buses )( input [DATA_WIDTH-1:0] data, //da...
Sometimes it's a good idea to further secure your publishes by requiring a user login. Here is how you achieve this via Meteor. import { Recipes } from '../imports/api/recipes.js'; import { Meteor } from 'meteor/meteor'; Meteor.publish('recipes', function() { if(this.userId) { return Re...
int literals are defined by simply using integral values within the range of int: int i = 5;
uint literals are defined by using the suffix U or u, or by using an integral values within the range of uint: uint ui = 5U;
string literals are defined by wrapping the value with double-quotes ": string s = "hello, this is a string literal"; String literals may contain escape sequences. See String Escape Sequences Additionally, C# supports verbatim string literals (See Verbatim Strings). These are def...
char literals are defined by wrapping the value with single-quotes ': char c = 'h'; Character literals may contain escape sequences. See String Escape Sequences A character literal must be exactly one character long (after all escape sequences have been evaluated). Empty character literals are ...
byte type has no literal suffix. Integer literals are implicitly converted from int: byte b = 127;
sbyte type has no literal suffix. Integer literals are implicitly converted from int: sbyte sb = 127;
decimal literals are defined by using the suffix M or m on a real number: decimal m = 30.5M;
double literals are defined by using the suffix D or d, or by using a real number: double d = 30.5D;
float literals are defined by using the suffix F or f, or by using a real number: float f = 30.5F;
long literals are defined by using the suffix L or l, or by using an integral values within the range of long: long l = 5L;
ulong literals are defined by using the suffix UL, ul, Ul, uL, LU, lu, Lu, or lU, or by using an integral values within the range of ulong: ulong ul = 5UL;

Page 68 of 269