Tutorial by Examples: ecto

You can make Git ignore certain files and directories — that is, exclude them from being tracked by Git — by creating one or more .gitignore files in your repository. In software projects, .gitignore typically contains a listing of files and/or directories that are generated during the build proces...
const fs = require('fs'); // Read the contents of the directory /usr/local/bin asynchronously. // The callback will be invoked once the operation has either completed // or failed. fs.readdir('/usr/local/bin', (err, files) => { // On error, show it and return if(err) return console.er...
A std::vector can be initialized in several ways while declaring it: C++11 std::vector<int> v{ 1, 2, 3 }; // v becomes {1, 2, 3} // Different from std::vector<int> v(3, 6) std::vector<int> v{ 3, 6 }; // v becomes {3, 6} // Different from std::vector<int> v{3, ...
You can iterate over a std::vector in several ways. For each of the following sections, v is defined as follows: std::vector<int> v; Iterating in the Forward Direction C++11 // Range based for for(const auto& value: v) { std::cout << value << "\n"; } /...
There are several ways to use a std::vector as a C array (for example, for compatibility with C libraries). This is possible because the elements in a vector are stored contiguously. C++11 std::vector<int> v{ 1, 2, 3 }; int* p = v.data(); In contrast to solutions based on previous C++ st...
String html = "<!DOCTYPE html>" + "<html>" + "<head>" + "<title>Hello world!</title>" + "</head>" + "<body>" + ...
Overview Attribute selectors can be used with various types of operators that change the selection criteria accordingly. They select an element using the presence of a given attribute or attribute value. Selector(1)Matched elementSelects elements...CSS Version[attr]<div attr>With attribute a...
import shutil source='//192.168.1.2/Daily Reports' destination='D:\\Reports\\Today' shutil.copytree(source, destination) The destination directory must not exist already.
In jQuery you can select elements in a page using many various properties of the element, including: Type Class ID Possession of Attribute Attribute Value Indexed Selector Pseudo-state If you know CSS selectors you will notice selectors in jQuery are the same (with minor exceptions). Ta...
Consider this simple project with a flat directory structure: example |-- example.asd |-- functions.lisp |-- main.lisp |-- packages.lisp `-- tools.lisp The example.asd file is really just another Lisp file with little more than an ASDF-specific function call. Assuming your project depends o...
The class name selector select all elements with the targeted class name. For example, the class name .warning would select the following <div> element: <div class="warning"> <p>This would be some warning copy.</p> </div> You can also combine class n...
ID selectors select DOM elements with the targeted ID. To select an element by a specific ID in CSS, the # prefix is used. For example, the following HTML div element… <div id="exampleID"> <p>Example</p> </div> …can be selected by #exampleID in CSS as sho...
Each individual CSS Selector has its own specificity value. Every selector in a sequence increases the sequence's overall specificity. Selectors fall into one of three different specificity groups: A, B and c. When multiple selector sequences select a given element, the browser uses the styles appli...
The function std::find, defined in the <algorithm> header, can be used to find an element in a std::vector. std::find uses the operator== to compare elements for equality. It returns an iterator to the first element in the range that compares equal to the value. If the element in question is...
An array can easily be converted into a std::vector by using std::begin and std::end: C++11 int values[5] = { 1, 2, 3, 4, 5 }; // source array std::vector<int> v(std::begin(values), std::end(values)); // copy array to new vector for(auto &x: v) std::cout << x << &q...
Scollector binaries for Windows, Mac, and Linux are available from the Bosun release page and can be saved to /opt/scollector/ or C:\Program Files\scollector\. The Scollector configuration file uses TOML v0.2.0 to specify various settings and defaults to being named scollector.toml in the same folde...
On Windows you can install Scollector as a service using the -winsvc="install" flag. On Mac and Linux you must manually create a service or init script. For example here is a basic systemd unit file: #Scollector unit file saved to /etc/systemd/system/scollector.service [Unit] Descriptio...
#Example of a PowerShell external collector. See http://bosun.org/scollector/external-collectors for details #This file should be saved in C:\Program Files\scollector\collectors\0\mymetrics.ps1 since it is a continuous output script #scollector.toml should have ColDir = 'C:\Program Files\scollecto...
The following can be saved as main.go. After you update the EDITME settings and build the executable it can be used as a continuous external collector. package main import ( "fmt" "log" "net/url" "strconv" "time" &...
The following Go file can be compiled into a continuous external collector that will query a MSSQL server database that uses the StackExchange.Exceptional schema. It will query multiple servers/databases for all exceptions since UTC 00:00 to convert the raw entries into a counter. It also uses the b...

Page 1 of 13