Tutorial by Examples

Visit https://download.racket-lang.org and choose between the two available distributions: Racket is the main distribution, it comes with several additional packages like math/number-theory as well as the DrRacket IDE. Minimal Racket is far smaller and comes only with the needed packages. Ins...
Ansible maintains a PPA repository that can be used to install the Ansible binaries: sudo apt-add-repository ppa:ansible/ansible -y sudo apt-get update && sudo apt-get install ansible -y To install a specific version, use pip. The PPA may be out of date.
There are two main ways way to install Ansible on OS X, either using the Homebrew or Pip package manager. If you have homebrew, the latest Ansible can be installed using the following command: brew install ansible To install Ansible 1.9.X branch use following command: brew install homebrew/ver...
CSS div { height: 100px; width: 100px; border: 1px solid; transition-property: height, width; transition-duration: 1s, 500ms; transition-timing-function: linear; transition-delay: 0s, 1s; } div:hover { height: 200px; width: 200px; } HTML <div></div> ...
The virtualenvwrapper utility simplifies working with virtual environments and is especially useful if you are dealing with many virtual environments/projects. Instead of having to deal with the virtual environment directories yourself, virtualenvwrapper manages them for you, by storing all virtual...
The OR (||) operator returns true if one of its two operands evaluates to true, otherwise it returns false. For example, the following code evaluates to true because at least one of the expressions either side of the OR operator is true: if (10 < 20) || (20 < 10) { print("Expression...
type person = {Name: string; Age: int} with // Defines person record member this.print() = printfn "%s, %i" this.Name this.Age let user = {Name = "John Doe"; Age = 27} // creates a new person user.print() // John Doe, 27
type person = {Name: string; Age: int} // Defines person record let user1 = {Name = "John Doe"; Age = 27} // creates a new person let user2 = {user1 with Age = 28} // creates a copy, with different Age let user3 = {user1 with Name = "Jane Doe"; Age = 29} //creates ...
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...
Similar to rgb() notation, but with an additional alpha (opacity) value. .red { /* Opaque red */ color: rgba(255, 0, 0, 1); } .red-50p { /* Half-translucent red. */ color: rgba(255, 0, 0, .5); } Syntax rgba(<red>, <green>, <blue>, <alpha>); Va...
The ForEach-Object cmdlet works similarly to the foreach statement, but takes its input from the pipeline. Basic usage $object | ForEach-Object { code_block } Example: $names = @("Any","Bob","Celine","David") $names | ForEach-Object { "H...
For setting some zoom level, let say we want to zoom user's location with user location as center and 2km of area as radius. Then, we use following code MKUserLocation *userLocation = _mapView.userLocation; MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance (userLocation.location.coord...
MKLocalSearch allows users to search for location using natural language strings like "gym". Once the search get completed, the class returns a list of locations within a specified region that match the search string. Search results are in form of MKMapItem within MKLocalSearchResponse ob...
div { -webkit-transition: all 4s ease; -moz-transition: all 4s ease; -o-transition: all 4s ease; transition: all 4s ease; }
div { -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); }
The filter or map functions should often be replaced by list comprehensions. Guido Van Rossum describes this well in an open letter in 2005: filter(P, S) is almost always written clearer as [x for x in S if P(x)], and this has the huge advantage that the most common usages involve predicates tha...
Module is a collection of type declarations, data declarations and procedures. The basic syntax is: module module_name use other_module_being_used ! The use of implicit none here will set it for the scope of the module. ! Therefore, it is not required (although considered good practice...
You may wish to use Model Factories within your seeds. This will create 3 new users. use App\Models\User; class UserTableSeeder extends Illuminate\Database\Seeder{ public function run(){ factory(User::class)->times(3)->create(); } } You may also want to define ...
Artisan is a utility that can help you do specific repetitive tasks with bash commands. It covers many tasks, including: working with database migrations and seeding, clearing cache, creating necessary files for Authentication setup, making new controllers, models, event classes, and a lot more. ...
The following is the original "Hello, World!" program from the book The C Programming Language by Brian Kernighan and Dennis Ritchie (Ritchie was the original developer of the C programming language at Bell Labs), referred to as "K&R": K&R #include <stdio.h> ma...

Page 138 of 1336