Tutorial by Examples: ti

docker run -d --name "mysql-1" -v "/var/lib/mysql" mysql This command creates a new container from the mysql image. It also creates a new data volume, which it then mounts in the container at /var/lib/mysql. This volume helps any data inside of it persist beyond the lifetime o...
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", (...
docker volume create --name="myAwesomeApp" Using a named volume makes managing volumes much more human-readable. It is possible to create a named volume using the command specified above, but it's also possible to create a named volume inside of a docker run command using the -v or --vo...
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...
In Common Lisp, if is the simplest conditional construct. It has the form (if test then [else]) and is evaluated to then if test is true and else otherwise. The else part can be omitted. (if (> 3 2) "Three is bigger!" "Two is bigger!") ;;=> "Three is bigger...
Use the lazy_static crate to create global immutable variables which are initialized at runtime. We use HashMap as a demonstration. In Cargo.toml: [dependencies] lazy_static = "0.1.*" In main.rs: #[macro_use] extern crate lazy_static; lazy_static! { static ref HASHMAP: Hash...
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...
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 $...
LOOP has its own IF statement that can control how the clauses are executed: (loop repeat 1000 for x = (random 100) if (evenp x) collect x into evens else collect x into odds finally (return (values evens odds))) Combining multiple clauses in an IF ...
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...
If you want to make sure cookies are enabled before using them, you can use navigator.cookieEnabled: if (navigator.cookieEnabled === false) { alert("Error: cookies not enabled!"); } Note that on older browsers navigator.cookieEnabled may not exist and be undefined. In those case...
TYPO3 has extensive documentation. This documentation is linked here, so people can find stuff that is not documented here. Main Documentation The documentation of TYPO3 CMS is collected at docs.typo3.org, there is a list of all documentation for the core, and documentation for extensions. Promin...
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...
Open a text editor (like Notepad), and type the code below: Imports System.ComponentModel Imports System.Drawing Imports System.Windows.Forms Namespace SampleApp Public Class MainForm : Inherits Form Private btnHello As Button ' The form's constructor: thi...
library(caret) # for dummyVars library(RCurl) # download https data library(Metrics) # calculate errors library(xgboost) # model ############################################################################### # Load data from UCI Machine Learning Repository (http://archive.ics.uci.edu/ml/data...
context.quadraticCurveTo(controlX, controlY, endingX, endingY) Draws a quadratic curve starting at the current pen location to a given ending coordinate. Another given control coordinate determines the shape (curviness) of the curve. <!doctype html> <html> <head> <style...
It's possible to perform elementary set operations with Matlab. Let's assume we have given two vectors or arrays A = randi([0 10],1,5); B = randi([-1 9], 1,5); and we want to find all elements which are in A and in B. For this we can use C = intersect(A,B); C will include all numbers which ...
Linux Requirements (r0.16.0) Mandatory As per current Apache-Pig documentation it supports only Unix & Windows operating systems. Hadoop 0.23.X, 1.X or 2.X Java 1.6 or Later versions installed and JAVA_HOME environment variable set to Java installation directory Optional Python 2.7 ...

Page 163 of 505