Tutorial by Examples

Detailed instructions on getting concurrency set up or installed.
The BOOL type is used for boolean values in Objective-C. It has two values, YES, and NO, in contrast to the more common "true" and "false". Its behavior is straightforward and identical to the C language's. BOOL areEqual = (1 == 1); // areEqual is YES BOOL areNotEqual = !ar...

id

id is the generic object pointer, an Objective-C type representing "any object". An instance of any Objective-C class can be stored in an id variable. An id and any other class type can be assigned back and forth without casting: id anonymousSurname = @"Doe"; NSString * surname...
Basic error handling should be added to all procedures in production code, since otherwise an unexpected error will cause Access to crash or invite the end-user to enter debug mode. A typical pattern for a basic error handler that traps all errors is: Sub Name() On Error GoTo errHandler '[some...
Use the makemigrations --name <your_migration_name> option to allow naming the migrations(s) instead of using a generated name. python manage.py makemigrations --name <your_migration_name> <app_name>
Opening Generic ASCII Text Files 5.6.0 open my $filehandle, '<', $name_of_file or die "Can't open $name_of_file, $!"; This is the basic idiom for "default" File IO and makes $filehandle a readable input stream of bytes, filtered by a default system-specific decoder, which...
Enable utf8 pragma In order to enable utf8 pragma in one-liner, perl interpreter should be called with -Mutf8 option: perl -Mutf8 -E 'my $人 = "human"; say $人' Unicode handling with -C switch The -C command line flag lets you control Unicode features. It can be followed by a list of o...
The encoding to be used for the standard I/O filehandles (STDIN, STDOUT, and STDERR), can be set separately for each handle using binmode: binmode STDIN, ':encoding(utf-8)'; binmode STDOUT, ':utf8'; binmode STDERR, ':utf8'; Note: when reading one would in general prefer :encoding(utf-8) over :...
Setting encoding with open() When opening a text file, you may specify it's encoding explicitly with a three-argument open(). This en-/decoder attached to a file handle is called an "I/O layer": my $filename = '/path/to/file'; open my $fh, '<:encoding(utf-8)', $filename or die "...
The utf8 pragma indicates that the source code will be interpreted as UTF-8. Of course, this will only work if your text editor is also saving the source as UTF-8 encoded. Now, string literals can contain arbitrary Unicode characters; identifiers can also contain Unicode but only word-like characte...
8 The proposed Object.entries() method returns an array of key/value pairs for the given object. It does not return an iterator like Array.prototype.entries(), but the Array returned by Object.entries() can be iterated regardless. const obj = { one: 1, two: 2, three: 3 }; Object...
If we need to parse a large file, e.g. a CSV more than 10 Mbytes containing millions of rows, some use file or file_get_contents functions and end up with hitting memory_limit setting with Allowed memory size of XXXXX bytes exhausted error. Consider the following source (top-1m.csv has exactly...
After successfully installing Xamarin as described in the first example, it's time to launch the first sample application. Step 1: Creating a new Project. In Visual Studio, choose New -> Project -> Visual C# -> Cross-Platform -> Blank App (Xamarin.Forms Portable) Name the app "He...
The Salesforce application consists of several products which can be integrated with each other: Sales Cloud Marketing Page, Salesforce Documentation Service Cloud Marketing Page, Salesforce Documentation, Trailhead Marketing Cloud Marketing Page Community Cloud Marketing Page, Salesforce Do...
LeakCanary is an Open Source Java library to detect memory leaks in your debug builds. Just add the dependencies in the build.gradle: dependencies { debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1' releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' ...
Normal mode Ctrl-wo Ex mode :only or short :on
static and templates folder in the apps may should also contain a folder with the name of app ex. blog this is a convention used to prevent namespace pollution, so we reference the files like /blog/base.html rather than /base.html which provides more clarity about the file we are referencing and pre...
The coordinate systems of Matplotlib come very handy when trying to annotate the plots you make. Sometimes you would like to position text relatively to your data, like when trying to label a specific point. Other times you would maybe like to add a text on top of the figure. This can easily be achi...
In order for a program to react to a certain signal, other than using default action, custom signal handler can be installed using sigaction. sigaction receives three arguments - signal to act on, pointer to sigaction_t structure which, if not NULL, is describing new behaviour and pointer to sigacti...
A string is a sequence of character literals. To date, strings are supported by all modern programming languages,1 but there is no consensus between language designers on how strings should be classified. As far as programming language design is concerned there are two primary concerns to take into ...

Page 619 of 1336