Tutorial by Examples

On systems that use the System-V style init scripts, such as RHEL/CentOS 6: service <service> status On systems using systemd, such as Ubuntu (Server and Desktop) >= 15.04, and RHEL/CentOS >= 7.0: systemctl status <service>
On systems using systemd, such as Fedora => 15, Ubuntu (Server and Desktop) >= 15.04, and RHEL/CentOS >= 7: systemctl status [servicename] ...where [servicename] is the service in question; for example, systemctl status sshd. This will show basic status information and any recent errors ...
ADO.NET Connections are one of the simplest ways to connect to a database from a C# application. They rely on the use of a provider and a connection string that points to your database to perform queries against. Common Data Provider Classes Many of the following are classes that are commonly used...
Entity Framework exposes abstraction classes that are used to interact with underlying databases in the form of classes like DbContext. These contexts generally consist of DbSet<T> properties that expose the available collections that can be queried : public class ExampleContext: DbContext ...
A Connection String is a string that specifies information about a particular data source and how to go about connecting to it by storing credentials, locations, and other information. Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword; Storing Your Connection Stri...
You can combine named arguments with optional parameters. Let see this method: public sealed class SmsUtil { public static bool SendMessage(string from, string to, string message, int retryCount = 5, object attachment = null) { // Some code } } When you want to call t...
You can place named arguments in any order you want. Sample Method: public static string Sample(string left, string right) { return string.Join("-",left,right); } Call Sample: Console.WriteLine (Sample(left:"A",right:"B")); Console.WriteLine (Sample(right...
Date and time without time zone information LocalDateTime dateTime = LocalDateTime.of(2016, Month.JULY, 27, 8, 0); LocalDateTime now = LocalDateTime.now(); LocalDateTime parsed = LocalDateTime.parse("2016-07-27T07:00:00"); Date and time with time zone information ZoneId zoneId = Zon...
LocalDate tomorrow = LocalDate.now().plusDays(1); LocalDateTime anHourFromNow = LocalDateTime.now().plusHours(1); Long daysBetween = java.time.temporal.ChronoUnit.DAYS.between(LocalDate.now(), LocalDate.now().plusDays(3)); // 3 Duration duration = Duration.between(Instant.now(), ZonedDateTime.par...
Represents an instant in time. Can be thought of as a wrapper around a Unix timestamp. Instant now = Instant.now(); Instant epoch1 = Instant.ofEpochMilli(0); Instant epoch2 = Instant.parse("1970-01-01T00:00:00Z"); java.time.temporal.ChronoUnit.MICROS.between(epoch1, epoch2); // 0
The zip function accepts 2 parameters of type SequenceType and returns a Zip2Sequence where each element contains a value from the first sequence and one from the second sequence. Example let nums = [1, 2, 3] let animals = ["Dog", "Cat", "Tiger"] let numsAndAnimals ...
stats::heatmap Example 1 (Basic usage) require(graphics); require(grDevices) x <- as.matrix(mtcars) rc <- rainbow(nrow(x), start = 0, end = .3) cc <- rainbow(ncol(x), start = 0, end = .3) hv <- heatmap(x, col = cm.colors(256), scale = "column", RowSideColo...
There are some cases in mixins where there can be single or multiple arguments while using it. Let's take a case of border-radius where there can be single argument like border-radius:4px; or multiple arguments like border-radius:4px 3px 2px 1px;. Traditional with Keyword Arguments mixing will be l...
Compiler definitions run platform specific code. Using them you can make small differences between various platforms. Trigger Game Center achievements on apple devices and google play achievements on Android devices. Change the icons in menus (windows logo in windows, Linux penguin in Linux). P...
The mcparallelDo package allows for the evaluation of R code asynchronously on Unix-alike (e.g. Linux and MacOSX) operating systems. The underlying philosophy of the package is aligned with the needs of exploratory data analysis rather than coding. For coding asynchrony, consider the future packag...
defaultProps allows you to set default prop values for your component. In the below example if you do not pass the name props, it will display John otherwise it will display the passed value class Example extends Component { render() { return ( <View> <Text>{this...
What is an enter selection? In D3.js, when one binds data to DOM elements, three situations are possible: The number of elements and the number of data points are the same; There are more elements than data points; There are more data points than elements; In the situation #3, all the data ...
If you are behind a proxy, you have to tell git about it: git config --global http.proxy http://my.proxy.com:portnumber If you are no more behind a proxy: git config --global --unset http.proxy
layer.masksToBounds = true; layer.cornerRadius = 8;
You can build the cross-platform "Hello World" C++ code, using Scons - A Python-language software construction tool. First, create a file called SConstruct (note that SCons will look for a file with this exact name by default). For now, the file should be in a directory right along your h...

Page 656 of 1336