Tutorial by Examples

It is convenient to set custom conditional preprocessing at project level when some actions need to be skipped lets say for tests. Go to Solution Explorer -> Click Right Mouse on project you want to set variable to -> Properties -> Build -> In General find field Conditional compilation ...
The observer pattern is a software design pattern in which an object (called subject) maintains a list of its dependents (called observers), and notifies them automatically of any state changes, usually by calling one of their methods. Ruby provides a simple mechanism to implement the Observer desi...
This will rollback both inserts due to an invalid datetime: BEGIN TRANSACTION BEGIN TRY INSERT INTO dbo.Sale(Price, SaleDate, Quantity) VALUES (5.2, GETDATE(), 1) INSERT INTO dbo.Sale(Price, SaleDate, Quantity) VALUES (5.2, 'not a date', 1) COMMIT TRANSACTION END TRY BEG...
A grouped VIEW is based on a query with a GROUP BY clause. Since each of the groups may have more than one row in the base from which it was built, these are necessarily read-only VIEWs. Such VIEWs usually have one or more aggregate functions and they are used for reporting purposes. They are also h...
VIEWs based on a UNION or UNION ALL operation are read-only because there is no single way to map a change onto just one row in one of the base tables. The UNION operator will remove duplicate rows from the results. Both the UNION and UNION ALL operators hide which table the rows came from. Such VIE...
Ordinary Least Squares is a method for finding the linear combination of features that best fits the observed outcome in the following sense. If the vector of outcomes to be predicted is y, and the explanatory variables form the matrix X, then OLS will find the vector β solving minβ|y^ - y|22, w...
In order to write tests using Selenium Webdriver and Java as programming language, you will need to download JAR files of Selenium Webdriver from the Selenium website. There are multiple ways to setup a Java project for the Selenium webdriver, one of the easiest from all of them is using Maven. Mav...
If you want to extract a folder, but you want to exclude one or several folders during the extraction, you can use the --exclude option. tar -cf archive.tar ./my-folder/ --exclude="my-folder/sub1" --exclude="my-folder/sub3" With this folder tree : my-folder/ sub1/ su...
$ sleep 500 & [1] 7582 Puts the sleep command in background. 7582 is the process id of the background process.
$ jobs [1] Running sleep 500 & (wd: ~) [2]- Running sleep 600 & (wd: ~) [3]+ Running ./Fritzing & First field shows the job ids. The + and - sign that follows the job id for two jobs denote the default job and next candidate def...
$ fg %2 sleep 600 %2 specifies job no. 2. If fg is used without any arguments if brings the last process put in background to the foreground. $ fg %?sle sleep 500 ?sle refers to the baground process command containing "sle". If multiple background commands contain the string, it w...
Press Ctrl + Z to stop a foreground process and put it in background $ sleep 600 ^Z [8]+ Stopped sleep 600
$ bg [8]+ sleep 600 &
SELECT SERVERPROPERTY('ProductVersion') AS ProductVersion, SERVERPROPERTY('ProductLevel') AS ProductLevel, SERVERPROPERTY('Edition') AS Edition, SERVERPROPERTY('EngineEdition') AS EngineEdition;
SELECT DATEDIFF(DAY, login_time, getdate()) UpDays FROM master..sysprocesses WHERE spid = 1
Since a Vimscript file is a collection of Command mode actions, the user needs to specify that the desired actions should be executed in normal mode. Therefore executing a normal mode command like i, a, d etc. in Vimscript is done by prepending the command with normal: Going to the bottom of the f...
If you know you need a packet <packet>, but you don't know the exact name <packet-exact-name>, instead of searching with Google try with the following: sudo apt-get update apt-cache search <packet> This will return you a list of packets name with a description. Once you have i...
If you are running a command that returns hundreds of lines, but your interest is just on the lines that contains the word <word>, you should definitely use grep! For example try running: ifconfig -a Check the output, that could be only a few lines or quite long, if you have a server with ...
C# Suppose you want to test that when you hover over an element, a drop list is displayed. You may want to check the contents of this list, or perhaps select an option from the list. First create an Action, to hover over the element (e.g. my element has link text "Admin"): Actions mouse...
This tutorial will guide you through the process from scratch. Please note some preliminary notes about this particular setup, useful in case that you already have some requested package: Is needed a version of php >=5.0 (I had troubles with php 7.0) Is requested any version of perl Is need...

Page 716 of 1336