Tutorial by Examples: st

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...
With benchmark tests you can test and measure the speed of the code, however benchmark tests are still unstable. To enable benchmarks in your cargo project you need nightly rust, put your integration benchmark tests to the benches/ folder in the root of your Cargo project, and run cargo bench. Exam...
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...
We can get a comma delimited string from multiple rows using coalesce as shown below. Since table variable is used, we need to execute whole query once. So to make easy to understand, I have added BEGIN and END block. BEGIN --Table variable declaration to store sample records DECLARE @...
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...
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 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 | Jahangir | Alam | Male | 70000 | | 2 | Arifur | Rahman | Male | 60000 | | 3 | Oli | Ahammed | Male | 45000 | | 4 | Sima | Sulta...
OperatorComparisonExample==Equali == 0===Equal Value and Typei === "5"!=Not Equali != 5!==Not Equal Value or Typei !== 5>Greater thani > 5<Less thani < 5>=Greater than or equali >= 5<=Less than or equali <= 5
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...
package { import flash.events.NetStatusEvent; import flash.net.NetStream; import flash.net.NetConnection; import flash.events.Event; import flash.media.Video; import flash.display.Sprite; public class VideoWithNetStatus extends Sprite { private var video:V...
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 ...
If you implement a text-search as LIKE-query, you usually do it like this: SELECT * FROM T_Whatever WHERE SomeField LIKE CONCAT('%', @in_SearchText, '%') However, (apart from the fact that you shouldn't necessarely use LIKE when you can use fulltext-search) this creates a problem when someb...
You can override the default vmoptions with your own personal settings by choosing Help > Edit Custom VM Options from the Android Studio toolbar. This will create a local copy which you are free to edit. Alternatively, you can edit the default vmoptions directly using the paths given below. Note...
You can create your own tag helpers by implementing ITagHelper or deriving from the convenience class TagHelper. The default convention is to target an html tag that matches the name of the helper without the optional TagHelper suffix. For example WidgetTagHelper will target a <widget> ta...
Use the pandas library as pd, this can be assumed (the import does not need to be in every example) import pandas as pd PEP8! 4 space indentation kwargs should use no spaces f(a=1) 80 character limit (the entire line fitting in the rendered code snippet should be strongly preferred)
Most of the time printing should be avoided as it can be a distraction (Out should be preferred). That is: a # Out: 1 is always better than print(a) # prints: 1 Prefer supporting python 2 and 3: print(x) # yes! (works same in python 2 and 3) print x # no! (python 2 only) print(x...
Use ionic serve to start a local development server for app dev and testing. This is useful for both desktop browser testing, and to test within a device browser which is connected to the same network. Additionally, this command starts LiveReload which is used to monitor changes in the file system. ...
C++11 struct info_type { std::string name; int age; float height; // we define an overload of operator>> as a friend function which // gives in privileged access to private data members friend std::istream& operator>>(std::istream& is, info_...
Detailed instructions on getting artifactory set up or installed.

Page 115 of 369