Tutorial by Examples: ecto

Get all files in Directory var FileSearchRes = Directory.GetFiles(@Path, "*.*", SearchOption.AllDirectories); Returns an array of FileInfo, representing all the files in the specified directory. Get Files with specific extension var FileSearchRes = Directory.GetFiles(@Path, "*...
The Data.Vector module provided by the vector is a high performance library for working with arrays. Once you've imported Data.Vector, it's easy to start using a Vector: Prelude> import Data.Vector Prelude Data.Vector> let a = fromList [2,3,4] Prelude Data.Vector> a fromList [2,3,4]...
Filter odd elements: Prelude Data.Vector> Data.Vector.filter odd y fromList [1,3,5,7,9,11] :: Data.Vector.Vector
Vectors can be map'd and fold'd,filter'd andzip`'d: Prelude Data.Vector> Data.Vector.map (^2) y fromList [0,1,4,9,16,25,36,49,64,81,100,121] :: Data.Vector.Vector Reduce to a single value: Prelude Data.Vector> Data.Vector.foldl (+) 0 y 66
Zip two arrays into an array of pairs: Prelude Data.Vector> Data.Vector.zip y y fromList [(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11)] :: Data.Vector.Vector
# Deny access to a directory from the IP 255.0.0.0 <Directory /path/to/directory> order allow,deny deny from 255.0.0.0 allow from all </Directory> # Deny access to a file from the IP 255.0.0.0 <FilesMatch "^\.ht"> order allow,deny deny fro...
As a privileged user (root or sudo): Create scollector directory: mkdir /opt/scollector In the /opt/scollector directory, download the latest binary build from the bosun/scollector site, [http://bosun.org/scollector/][1] wget https://github.com/bosun-monitor/bosun/releases/download/"version...
This trick helps you select an element using the ID as a value for an attribute selector to avoid the high specificity of the ID selector. HTML: <div id="element">...</div> CSS #element { ... } /* High specificity will override many selectors */ [id="element&quo...
Nesting is great for keeping related selectors together to make it easier for future developers to understand your code. The parent selector, represented by an ampersand ("&") can help do that in more complex situations. There are several ways its can be used. Create a new selector th...
Vectors can be used as a 2D matrix by defining them as a vector of vectors. A matrix with 3 rows and 4 columns with each cell initialised as 0 can be defined as: std::vector<std::vector<int> > matrix(3, std::vector<int>(4)); C++11 The syntax for initializing them using initia...
A few pre-requisites in the build.gradle for vectors to work all the way down to API 7 for VectorDrawables and API 13 for AnimatedVectorDrawables (with some caveats currently): //Build Tools has to be 24+ buildToolsVersion '24.0.0' defaultConfig { vectorDrawables.useSupportLibrary = true ...
$ mkdir backup_download_directory && cd !#:1 mkdir backup_download_directory && cd backup_download_directory This will substitute the Nth argument of the current command. In the example !#:1 is replaced with the first argument, i.e. backup_download_directory.
HTML template files are always loaded before everything else Files beginning with main. are loaded last Files inside any lib/ directory are loaded next Files with deeper paths are loaded next Files are then loaded in alphabetical order of the entire path Reference Link Reference page: Mete...
numpy.dot can be used to multiply a list of vectors by a matrix but the orientation of the vectors must be vertical so that a list of eight two component vectors appears like two eight components vectors: >>> a array([[ 1., 2.], [ 3., 1.]]) >>> b array([[ 1., 2., ...
The & operator is the parent selector. When used in or as a selector, it is replaced with the full parent selectors (entire sequence of selectors right upto to the topmost level of a nested block) in the final CSS output. It is useful when creating nested rules that require using the parent sel...
Less allows the usage of the parent selector (&) anywhere in a complex selector and thus allows changing styles when the current element is within another element which gives it a different context: For example, in the below code the parent selector is placed at the end and thus it actually be...
Less doesn't put any restrictions on the number of times the parent selector (&) can be used in a complex selector and so, we can use it more than once like in the below examples to select sibling elements without the need to repeat the selector. .demo { border: 1px solid black; /* add borde...
In modern browsers [1], it is possible to use CSS-like selector to query for elements in a document -- the same way as sizzle.js (used by jQuery). querySelector Returns the first Element in the document that matches the query. If there is no match, returns null. // gets the element whose id=&quot...
The :only-child CSS pseudo-class represents any element which is the only child of its parent. HTML: <div> <p>This paragraph is the only child of the div, it will have the color blue</p> </div> <div> <p>This paragraph is one of the two children of the ...
The :last-of-type selects the element that is the last child, of a particular type, of its parent. In the example below, the css selects the last paragraph and the last heading h1. p:last-of-type { background: #C5CAE9; } h1:last-of-type { background: #CDDC39; } <div class="c...

Page 8 of 13