Tutorial by Examples: c

We want to add Toast to nativescript default app. import {Component} from "@angular/core"; let application = require("application"); declare var android:any; @Component({ selector: "my-app", templateUrl: "app.component.html", }) export clas...
A "Connection Refused" error will occur if your client sends a connection request to a remote server host, and the remote host responds to say that it refuses to accept the request. The "Connection Refused" error essentially means that the computer is not accepting connections to...
A "Connection timed out" error occurs when the remote system does not respond to the client's attempt to open a TCP/IP connection. The most common causes include: A firewall is blocking the connection attempt on the port that you are using: The firewall could be on the client-side, ...
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 ...
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...
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...
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...
To create a blank image, use the imagecreatetruecolor function: $img = imagecreatetruecolor($width, $height); $img is now a resource variable for an image resource with $widthx$height pixels. Note that width counts from left to right, and height counts from top to bottom. Image resources can al...
<ItemGroup> <DataToCopy Include="*.cs;*.aspx" /> </ItemGroup> <Copy SourceFiles="@(DataToCopy)" DestinationFolder="SourceCopiedFolder" />
A Haskell's Functor allows one to map any type a (an object of Hask) to a type F a and also map a function a -> b (a morphism of Hask) to a function with type F a -> F b. This corresponds to a Category Theory definition in a sense that functor preserves basic category structure. A monoidal ca...
See discussions in "GRANT" and "Recovering root password".

Page 443 of 826