Tutorial by Examples: ecto

It is now a best-practice to use Vector instead of List because the implementations have better performance Performance characteristics can be found here. Vector can be used wherever List is used. List creation List[Int]() // Declares an empty list of type Int List.empty[Int] // U...
Flash Player 10 introduced the Vector.<*> generic list type that was faster than the Array. However, this is not entirely true. Only the following Vector types are faster than the Array counterparts, due to the way they are implemented in Flash Player. Vector.<int> - Vector of 32-bit ...
(let [v [1 2 3]] (match [v] [[1 1 1]] :a0 [[1 _ 1]] :a1 [[1 2 _]] :a2)) ;; _ is used for wildcard matching ;=> :a2
Vectors in R can have different types (e.g. integer, logical, character). The most general way of defining a vector is by using the function vector(). vector('integer',2) # creates a vector of integers of size 2. vector('character',2) # creates a vector of characters of size 2. vector('logical',2...
Assume you've initialized a project with the following directory structure: /build app.js Then you add everything so you've created so far and commit: git init git add . git commit -m "Initial commit" Git will only track the file app.js. Assume you added a build step to your applicat...
C++11 In C++11, compilers are required to implicitly move from a local variable that is being returned. Moreover, most compilers can perform copy elision in many cases and elide the move altogether. As a result of this, returning large objects that can be moved cheaply no longer requires special ha...
The ls command has several options that can be used together to show more information. Details/Rights The l option shows the file permissions, size, and last modified date. So if the root directory contained a dir called test and a file someFile the command: user@linux-computer:~$ ls -l Would ...
A list of references to members of a group, such as a static table of contents. <ul role="directory"> <li><a href="/chapter-1">Chapter 1</a></li> <li><a href="/chapter-2">Chapter 2</a></li> <li><a ...
It is very rare that you'll ever want to use Select or Activate in your code, but some Excel methods do require a worksheet or workbook to be activated before they'll work as expected. If you're just starting to learn VBA, you'll often be suggested to record your actions using the macro recorder, t...
package main import ( "fmt" "io/ioutil" ) func main() { files, err := ioutil.ReadDir(".") if err != nil { panic(err) } fmt.Println("Folders in the current directory:") for _, fileInfo := range files { ...
Early bound (requires a reference to Microsoft Scripting Runtime): Public Sub EnumerateDirectory() Dim fso As Scripting.FileSystemObject Set fso = New Scripting.FileSystemObject Dim targetFolder As Folder Set targetFolder = fso.GetFolder("C:\") Dim foundFi...
It is considered good practice to use a prefix when creating git archives, so that extraction will place all files inside a directory. To create an archive of HEAD with a directory prefix: git archive --output=archive-HEAD.zip --prefix=src-directory-name HEAD When extracted all the files will be...
It is also possible to create archives of other items than HEAD, such as branches, commits, tags, and directories. To create an archive of a local branch dev: git archive --output=archive-dev.zip --prefix=src-directory-name dev To create an archive of a remote branch origin/dev: git archive --...
If you have a vector in polar form (direction & distance) you will want to convert it to a cartesian vector with a x and y component. For referance the screen coordinate system has directions as 0 deg points from left to right, 90 (PI/2) point down the screen, and so on in a clock wise direction...
// Example of std::vector as an expanding dynamic size array. #include <algorithm> // std::sort #include <iostream> #include <vector> // std::vector using namespace std; int int_from( std::istream& in ) { int x = 0; in >> x; return x; } ...
Unfortunately as of C++14 there's no dynamic size matrix class in the C++ standard library. Matrix classes that support dynamic size are however available from a number of 3rd party libraries, including the Boost Matrix library (a sub-library within the Boost library). If you don't want a dependenc...
Whatever you do to customize Vim, it should NEVER happen outside of $HOME: on Linux, BSD and Cygwin, $HOME is usually /home/username/, on Mac OS X, $HOME is /Users/username/, on Windows, $HOME is usually C:\Users\username\. The canonical location for your vimrc and your vim directory is at ...
The first thing you need to know when structuring your apps is that the Meteor tool has some directories that are hard-coded with specific logic. At a very basic level, the following directories are "baked in" the Meteor bundler. client/ # client applicati...
Many people find themselves eventually supporting multiple applications, and desire to share code between apps. This leads to the concept of microservice architecture, and all-package apps. Essentially, the code from the entire classic directory structure is refactored out into packages. Even tho...
The most recent versions of Meteor ship with support for ecmascript, aka ES6 or ES2015. Instead of packages, Javascript now supports import statements and modules, which replaces the need for package-only applications. The latest directory structure is similar to the package-only structure, but us...

Page 5 of 13