Tutorial by Examples

To delete our instance, reuse the os_server command with all authentication information and simply replace ' state: present' by ' state: absent'. $vi stop_compute.yml - name: launch a compute instance hosts: localhost gather_facts: False tasks: - name: Create and launch the VM os_...
send() is used to pass message to object. send() is an instance method of the Object class. The first argument in send() is the message that you're sending to the object - that is, the name of a method. It could be string or symbol but symbols are preferred. Then arguments those need to pass in met...
This guide is explicitly for PostgreSQL 9.1 or higher on linux machines. It uses the postgres extensions-feature that will greatly improve the import of extensions to an existing postgres-installation. If you have to work with an older version of postgres, please refer to the official documentations...
To create a new empty database, run as postgres-user: createdb [yourdatabase] Connect to the database with a psql-session: psql -d [yourdatabase] In the psql-session run: CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology; to create the neccesary geospatial extensions. Once thi...
The Laravel framework has a few system requirements. Of course, all of these requirements are satisfied by the Laravel Homestead virtual machine, so it's highly recommended that you use Homestead as your local Laravel development environment. However, if you are not using Homestead, you will need t...
If you have PHP installed locally and you would like to use PHP's built-in development server to serve your application, you may use the serve Artisan command. This command will start a development server at http://localhost:8000: php artisan serve Of course, more robust local development option...
The basic example Open routes/web.php file and paste the following code in file: Route::get('helloworld', function () { return '<h1>Hello World</h1>'; }); here 'helloworld' will act as page name you want to access, and if you don't want to create blade file and still want to ...
Open routes file. Paste the following code in: Route::get('helloworld', function () { return '<h1>Hello World</h1>'; }); after going to route http://localhost/helloworld it displays Hello World. The routes file is located /routes/web.php
Accessing pages and outputting data is fairly easy in Laravel. All of the page routes are located in app/routes.php. There are usually a few examples to get you started, but we're going to create a new route. Open your app/routes.php, and paste in the following code: Route::get('helloworld', functi...
Bullet This one particularly blew my mind. The bullet gem helps you kill all the N+1 queries, as well as unnecessarily eager loaded relations. Once you install it and start visiting various routes in development, alert boxes with warnings indicating database queries that need to be optimized will p...
In this example we will set up a geospatial database, import data from 2 different sources, and view the results in an application called QGIS. This guide is explicitly written for linux-machines, if you operate on another platform, some commands or paths might not work as expected. In order to vie...
Backreferences "Backreferences" are references in a search regex to capture groups in the same search regex. The "search regex" is the regex used in the "Find" field of the Find/Replace dialog box. Here is the most common backreference syntax: Absolute: (group one)...
A regex in Notepad++ may have as many capture groups as desired. (one)(two)(three)...(nine)(more than nine groups!)... Anonymous capture groups use the standard syntax: (group) Named capture groups may use either of following syntax formats: (?<name>group) (?'name'group) Anonymo...
It's entirely possible to use PICO-8 as an interactive shell, but you probably want to tap into the game loop. In order to do that, you must create at least one of these callback functions: _update() _update60() (after v0.1.8) _draw() A minimal "game" might simply draw something on...
Although it's not officially supported, you can use mouse input in your games: function _update60() x = stat(32) y = stat(33) if (x>0 and x<=128 and y>0 and y<=128) then -- left button if (band(stat(34),1)==1) then ball_x=x ball_y=y...
If you want a title screen or an endgame screen, consider setting up a mode switching mechanism: function _init() mode = 1 end function _update() if (mode == 1) then if (btnp(5)) mode = 2 elseif (mode == 2) then if (btnp(5)) mode = 3 end end function _draw() cls() ...
Typically we represent an anary tree (one with potentially unlimited children per node) as a binary tree, (one with exactly two children per node). The "next" child is regarded as a sibling. Note that if a tree is binary, this representation creates extra nodes. We then iterate over the s...
A theme changes the global skin of Sublime Text 3. It changes the tabs, side bar, quick panels (goto, command palette), status bar, etc... Here's a non-exhaustive list of themes (top 100): Predawn Material Theme Theme - Spacegray Seti_UI Theme - Brogrammer Theme - Flatland Theme - Soda ...
The color schemes changes the colors of the code. They can change, for example, with which color the keywords are highlighted, with which color the line the caret is on is highlighted (needs highlight_line to be set to true in the preferences (not part of the cojor scheme)), what is the color of the...
Plugins are .py files that changes the behaviour of Sublime Text 3. They are written, as you probably guessed, in Python. Because there is plenty of different sort of plugins (text manipulation, linting, formatting, preview, etc), we will not give any example to not over populate this page with a h...

Page 1095 of 1336