Tutorial by Examples: er

Many interesting operations in common JavaScript programming environments are asynchronous. For example, in the browser we see things like window.setTimeout(() => { console.log("this happens later"); }, 100); and in Node.js we see things like fs.readFile("file.txt", (...
An Akka MessageDispatcher is what makes Akka Actors "tick", it is the engine of the machine so to speak. All MessageDispatcher implementations are also an ExecutionContext, which means that they can be used to execute arbitrary code, for instance Futures. Every ActorSystem will have a def...
So in case you want to give your Actor a different dispatcher than the default, you need to do two things, of which the first is to configure the dispatcher in your application.conf: my-dispatcher { # Dispatcher is the name of the event-based dispatcher type = Dispatcher # What kind of Exe...
Using docker-machine is the best method to install Docker on a machine. It will automatically apply the best security settings available, including generating a unique pair of SSL certificates for mutual authentication and SSH keys. To create a local machine using Virtualbox: docker-machine create...
Listing docker-machines will return the state, address and version of Docker of each docker machines. docker-machine ls Will print something like: NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS docker-machine-1 - ovh Running ...
Upgrading a docker machine implies a downtime and may require planing. To upgrade a docker machine, run: docker-machine upgrade docker-machine-name This command does not have options
docker save -o ubuntu.latest.tar ubuntu:latest This command will save the ubuntu:latest image as a tarball archive in the current directory with the name ubuntu.latest.tar. This tarball archive can then be moved to another host, for example using rsync, or archived in storage. Once the tarball h...
While attached to a running container with a pty assigned (docker run -it ...), you can press ControlP - ControlQ to detach.
Docker is just a fancy way to run a process, not a virtual machine. Therefore, debugging a process "in a container" is also possible "on the host" by simply examining the running container process as a user with the appropriate permissions to inspect those processes on the host (...
Mobile platforms like iOS automatically recognize phone numbers and turn them into tel: links. While the feature is very practical, the system sometimes detects ISBN codes and other numbers as telephone numbers. For mobile Safari and some other WebKit-based mobile browsers to turn off automatic pho...
docker-compose run service-name command If, for example, you wanted to run rake db:create in your web service, you'd use the following command: docker-compose run web rake db:create
Install Docker Engine. If you get a Permission denied error, Run sudo -i before the two commands below, then exit. Pull Docker Compose to /usr/local/bin/docker-compose. curl -L https://github.com/docker/compose/releases/download/1.7.1/docker-compose-`uname -s`-`uname -m` > /usr/loc...
Numeric CSS properties can be incremented and decremented with the += and -= syntax, respectively, using the .css() method: // Increment using the += syntax $("#target-element").css("font-size", "+=10"); // You can also specify the unit to increment by $...
Although it is very tempting to use BETWEEN ... AND ... for a date range, it is problematical. Instead, this pattern avoids most problems: WHERE x >= '2016-02-25' AND x < '2016-02-25' + INTERVAL 5 DAY Advantages: BETWEEN is 'inclusive' thereby including the final date or second. 2...
Using a Recursive CTE, you can generate an inclusive range of dates: Declare @FromDate Date = '2014-04-21', @ToDate Date = '2014-05-02' ;With DateCte (Date) As ( Select @FromDate Union All Select DateAdd(Day, 1, Date) From DateCte Where Date < @T...
Another way you can generate a range of dates is by utilizing a Tally Table to create the dates between the range: Declare @FromDate Date = '2014-04-21', @ToDate Date = '2014-05-02' ;With E1(N) As (Select 1 From (Values (1), (1), (1), (1), (1), (1), (1), (1), (1), (1)) DT...
Here we demonstrate how to process lists recursively using OCaml's pattern matching syntax. let rec map f lst = match lst with | [] -> [] | hd::tl -> (f hd)::(map f tl) In this case, the pattern [] matches the empty list, while hd::tl matches any list that has at least one element...
Early Bound (with a reference to Microsoft Scripting Runtime) Sub EnumerateFilesAndFolders( _ FolderPath As String, _ Optional MaxDepth As Long = -1, _ Optional CurrentDepth As Long = 0, _ Optional Indentation As Long = 2) Dim FSO As Scriptin...
TYPO3 can be solely installed with the PHP dependency manager composer. Composer has to be available on the server, then a TYPO3 project can be started by using the base distribution. composer create-project typo3/cms-base-distribution . This will pull the TYPO3 core from the git repository, dow...
Employees table : | ID | FirstName | LastName | Gender | Salary | +------+-----------+----------+--------+--------+ | 1 | Mark | Hastings | Male | 60000 | | 1 | Mark | Hastings | Male | 60000 | | 2 | Mary | Lambeth | Female | 30000 | | 2 | Mary | Lambe...

Page 134 of 417