Tutorial by Examples: ecto

The standard (section 23.3.7) specifies that a specialization of vector<bool> is provided, which optimizes space by packing the bool values, so that each takes up only one bit. Since bits aren't addressable in C++, this means that several requirements on vector are not placed on vector<bool...
Example init script for scollector: #!/bin/bash # # scollector Startup script for scollector. # # chkconfig: 2345 90 60 # description: scollector is a replacement for OpenTSDB's TCollector \ # and can be used to send metrics to a Bosun server # Source function library. . /etc/init....
#Create Scollector unit file at /etc/systemd/system/scollector.service [Unit] Description=Scollector Service After=network.target [Service] Type=simple User=root ExecStart=/opt/scollector/scollector -h mybosunserver.example.com Restart=on-abort [Install] WantedBy=multi-user.target #...
Chef Scollector Cookbook: https://github.com/alexmbird/chef-scollector Chef Bosun Cookbook: https://github.com/ptqa/chef-bosun Puppet scollector module: https://github.com/axibase/axibase-puppet-modules Bosun Ansible/Vagrant example: https://github.com/gnosek/bosun-deploy
The checked out file will overwrite not yet commited changes you did in this file. This command will check out the file file.example (which is located in the directory path/to/) and overwrite any changes you might have made to this file. git checkout some-branch path/to/file some-branch can be ...
Different flavors of application builds can contain different resources. To create a flavor-specific resource make a directory with the lower-case name of your flavor in the src directory and add your resources in the same way you would normally. For example, if you had a flavour Development and w...
Consider following DOM Structure <ul class="parentUl"> <li> Level 1 <ul class="childUl"> <li>Level 1-1 <span> Item - 1 </span></li> <li>Level 1-1 <span> Item - 2 </span></li&gt...
Clicking the Select an element in the page to inspect it button in the upper left corner of the Elements tab in Chrome or Inspector tab in Firefox, available from Developer Tools, and then clicking on a element of the page highlights the element and assigns it to the $0 variable. Elements inspecto...
package main import ( "fmt" "io/ioutil" ) func main() { files, err := ioutil.ReadDir(".") if err != nil { panic(err) } fmt.Println("Files and folders in the current directory:") for _, fileInfo := range fi...
Vector size is simply the number of elements in the vector: Current vector size is queried by size() member function. Convenience empty() function returns true if size is 0: vector<int> v = { 1, 2, 3 }; // size is 3 const vector<int>::size_type size = v.size(); cout << size...
One std::vector can be append to another by using the member function insert(): std::vector<int> a = {0, 1, 2, 3, 4}; std::vector<int> b = {5, 6, 7, 8, 9}; a.insert(a.end(), b.begin(), b.end()); However, this solution fails if you try to append a vector to itself, because the sta...
A std::vector automatically increases its capacity upon insertion as needed, but it never reduces its capacity after element removal. // Initialize a vector with 100 elements std::vector<int> v(100); // The vector's capacity is always at least as large as its size auto const old_capacity...
Long vectors with long runs of the same value can be significantly compressed by storing them in their run-length encoding (the value of each run and the number of times that value is repeated). As an example, consider a vector of length 10 million with a huge number of 1's and only a small number o...
Consider the following tough-to-vectorize for loop, which creates a vector of length len where the first element is specified (first) and each element x_i is equal to cos(x_{i-1} + 1): repeatedCosPlusOne <- function(first, len) { x <- numeric(len) x[1] <- first for (i in 2:len) { ...
Following the Rcpp example in this documentation entry, consider the following tough-to-vectorize function, which creates a vector of length len where the first element is specified (first) and each element x_i is equal to cos(x_{i-1} + 1): repeatedCosPlusOne <- function(first, len) { x <-...
SelectorDescription*Universal selector (all elements)divTag selector (all <div> elements).blueClass selector (all elements with class blue).blue.redAll elements with class blue and red (a type of Compound selector)#headlineID selector (the element with "id" attribute set to headline)...
git clean -fd Will remove all untracked directories and the files within them. It will start at the current working directory and will iterate through all subdirectories. git clean -dn Will preview all directories that will be cleaned.
Each time you use a selector in jQuery the DOM is searched for elements that match your query. Doing this too often or repeatedly will decrease performance. If you refer to a specific selector more than once you should add it to the cache by assigning it to a variable: var nav = $('#navigation'); ...
It is possible to mount a host directory to a specific path in your container using the -v or --volume command line option. The following example will mount /etc on the host to /mnt/etc in the container: (on linux) docker run -v "/etc:/mnt/etc" alpine cat /mnt/etc/passwd (on windows) do...
git difftool -t meld --dir-diff will show the working directory changes. Alternatively, git difftool -t meld --dir-diff [COMMIT_A] [COMMIT_B] will show the differences between 2 specific commits.

Page 2 of 13