Tutorial by Examples

After receiving the arguments, you can print them as follows: int main(int argc, char **argv) { for (int i = 1; i < argc; i++) { printf("Argument %d: [%s]\n", i, argv[i]); } } Notes The argv parameter can be also defined as char *argv[]. argv[0] may co...
Selenium Grid Node configuration resides on the Node itself and holds the information about network configuration and Node capabilities. The configuration can be applied in various ways: Default Configuration JSON Configuration Command line Configuration JSON Configuration The node configur...
In Python 3 and higher, print is a function rather than a keyword. print('hello world!') # out: hello world! foo = 1 bar = 'bar' baz = 3.14 print(foo) # out: 1 print(bar) # out: bar print(baz) # out: 3.14 You can also pass a number of parameters to print: print(foo, bar, b...
Create a receiver. This class will receive the intent and handle it how you wish. public class AlarmReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { // Handle intent int reqCode = intent.getExtras().getInt(&...
Good for quick notifications that don't require interaction. Swift let alert = UIAlertController(title: "Toast", message: "Hello World", preferredStyle: .Alert) presentViewController(alert, animated: true) { let delay_s:Double = 2 let delayTime = dispatch_time(DI...
The data.table package introduces the function fread. While it is similar to read.table, fread is usually faster and more flexible, guessing the file's delimiter automatically. # get the file path of a CSV included in R's utils package csv_path <- system.file("misc", "exDIF.csv&q...
Create a XIB file Xcode Menu Bar > File > New > File. Select iOS, User Interface and then "View": Give your XIB a name (yes, we are doing a Pokemon example 👾). Remember to check your target and hit "Create". Design your view To make things easier, set:...
There are several R packages to read excel files, each of which using different languages or resources, as summarized in the following table: R packageUsesxlsxJavaXLconnectJavaopenxlsxC++readxlC++RODBCODBCgdataPerl For the packages that use Java or ODBC it is important to know details about your s...
This is a slightly more advanced example that shows a few more features of common lisp. We start with a simple Hello, World! function and demonstrate some interactive development at the REPL. Note that any text from a semicolon, ;, to the rest of the line is a comment. CL-USER> (defun hello () ...
if let Combines a pattern match and an if statement, and allows for brief non-exhaustive matches to be performed. if let Some(x) = option { do_something(x); } This is equivalent to: match option { Some(x) => do_something(x), _ => {}, } These blocks can also have e...
The standard doesn't specify if char should be signed or unsigned. Different compilers implement it differently, or might allow to change it using a command line switch.
The following types are defined as integral types: char Signed integer types Unsigned integer types char16_t and char32_t bool wchar_t With the exception of sizeof(char) / sizeof(signed char) / sizeof(unsigned char), which is split between § 3.9.1.1 [basic.fundamental/1] and § 5.3.3.1 [ex...
Background threads cannot modify the UI; almost all UIKit methods must be called on the main thread. From a subclass of NSObject (including any UIViewController or UIView): InvokeOnMainThread(() => { // Call UI methods here }); From a standard C# class: UIApplication.SharedApplicat...
A few modules in the standard library have been renamed: Old nameNew name_winregwinregConfigParserconfigparsercopy_regcopyregQueuequeueSocketServersocketserver_markupbasemarkupbasereprreprlibtest.test_supporttest.supportTkintertkintertkFileDialogtkinter.filedialogurllib / urllib2urllib, urllib.pars...
In general, most of the objects you would interact with as a user would tend to be a vector; e.g numeric vector, logical vector. These objects can only take in a single type of variable (a numeric vector can only have numbers inside it). A list would be able to store any type variable in it, making...
# example data test_sentences <- c("The quick brown fox quickly", "jumps over the lazy dog") Let's make the brown fox red: sub("brown","red", test_sentences) #[1] "The quick red fox quickly" "jumps over the lazy dog" Now, ...
# example data test_sentences <- c("The quick brown fox", "jumps over the lazy dog") Is there a match? grepl() is used to check whether a word or regular expression exists in a string or character vector. The function returns a TRUE/FALSE (or "Boolean") vecto...
2.1.x This example depends on Support Library 23.4.0.+. BottomSheetBehavior is characterized by : Two toolbars with animations that respond to the bottom sheet movements. A FAB that hides when it is near to the "modal toolbar" (the one that appears when you are sliding up). A backdr...
Head over to CMake download page and get a binary for your operating system, e.g. Windows, Linux, or Mac OS X. On Windows double click the binary to install. On Linux run the binary from a terminal. On Linux, you can also install the packages from the distribution's package manager. On Ubuntu 16.0...
LibGDX has a fairly simple setup, with the help of a simple Java program. You can find the download here. When you startup the application, it will look something like this: Note: This screenshot have been taken on Linux and shows path that differs from a Windows installation. However, the form is...

Page 168 of 1336