Tutorial by Examples: a

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...
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 package is a folder that can contain anything that is listed in these examples (and other thing that can have nothing to do with Sublime Text 3, such as a gulpfile.js if you're automating some tasks). You can install any package using the create Package Control. A .sublime-package ? Maybe you'v...
Along with other more advanced text editors, Atom allows developers to open a single file or a directory. Opening Files To open files with Atom, either use File > Open File... in the menu as show below: or use the faster keyboard shortcut: Ctrl+O (For Mac OS: ⌘+O). This will open a file expl...
In order to keep track of your projects' file structure, Atom, like many text editors and IDEs, uses a file tree model. These trees show the locations and names of your files and directory. To toggle the tree between visible and hidden, the keys Ctrl+\ may be used (⌘+\ for Mac OS). This tree also in...
<table> <thead> <th>Name</th> <th>Index</th> </thead> <tbody> <tr *ngFor="let hero of heroes"> <td>{{hero.name}}</td> </tr> </tbody> </tabl...
The primary reason to use interfaces to achieve polymorphism and provide developers to implement on their own way in future by implementing interface's methods. Suppose we have an interface and three classes: interface Connector{ doConnect(): boolean; } This is connector interface. Now we...
TypeScript supports interfaces, but the compiler outputs JavaScript, which doesn't. Therefore, interfaces are effectively lost in the compile step. This is why type checking on interfaces relies on the shape of the object - meaning whether the object supports the fields and functions on the interfac...
const { remote } = require("electron"); // <- The Node.js require() function is // added to JavaScript by electron function setProgress(p) { // p = number from 0 to 1 const currentWindow = remote.getCurrentWindow(); currentWindow.setProgre...
Query to search last executed sp's in db SELECT execquery.last_execution_time AS [Date Time], execsql.text AS [Script] FROM sys.dm_exec_query_stats AS execquery CROSS APPLY sys.dm_exec_sql_text(execquery.sql_handle) AS execsql ORDER BY execquery.last_execution_time DESC Query to search thro...
//Using statement for ExcelTable and TableStyles using OfficeOpenXml.Table; //Defining the tables parameters int firstRow =1; int lastRow = worksheet.Dimension.End.Row; int firstColumn = 1; int lastColumn = worksheet.Dimension.End.Column; ExcelRange rg = worksheet.Cells[firstRow, firstCol...
Asterisk is an open source framework for building communications applications. You can use it for any of the following: IP PBX systems VoIP gateways ISDN/ 3G IVVR Here is a brief instruction for step by step installation of asterisk 1.8(or you can do for latest versions) on Redhat/centos (fo...
GTM simplifies the whole process of managing tags.In GTM terminology We put a GTM javascript snippet on the concerned page,in portal_normal.vm in custom theme in liferay, containing the GTM id and a data layer structure(if needed) to map values from page to variables Corresponding to data layer ...
url |> IO.inspect |> HTTPoison.get! |> IO.inspect |> Map.get(:body) |> IO.inspect |> Poison.decode! |> IO.inspect This will result in a lot of output with no context: "https://jsonplaceholder.typicode.com/posts/1" %HTTPoison.Response{body: &qu...
using the label option to add context can help a lot: url |> IO.inspect(label: "url") |> HTTPoison.get! |> IO.inspect(label: "raw http resonse") |> Map.get(:body) |> IO.inspect(label: "raw body") |> Poison.decode! |> IO.inspect...

Page 897 of 1099