Tutorial by Examples: er

A class or struct can also define member type aliases, which are type aliases contained within, and treated as members of, the class itself. struct IHaveATypedef { typedef int MyTypedef; }; struct IHaveATemplateTypedef { template<typename T> using MyTemplateTypedef = std::v...
Starting the Erlang shell On a UNIX system you start the Erlang shell from a command prompt with the command erl Example: $ erl Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] Eshell V7.0 (abort with ^G) 1> The text that shows when y...
A deadlock is what occurs when two or more threads are waiting for eachother to complete or to release a resource in such a way that they wait forever. A typical scenario of two threads waiting on eachother to complete is when a Windows Forms GUI thread waits for a worker thread and the worker thre...
This is the basic way to insert data from another table with the SELECT statement. INSERT INTO `tableA` (`field_one`, `field_two`) SELECT `tableB`.`field_one`, `tableB`.`field_two` FROM `tableB` WHERE `tableB`.clmn <> 'someValue' ORDER BY `tableB`.`sorting_clmn`; You can...
Each group ends with a line separator. If each item in your menu has its own group you will achieve the desired graphical output. It will work only if your different groups have different android:id. Also, in menu.xml remember to mention android:checkable="true" for single item and android...
We can change the style of the placeholder by setting attributedPlaceholder (a NSAttributedString). var placeholderAttributes = [String: AnyObject]() placeholderAttributes[NSForegroundColorAttributeName] = color placeholderAttributes[NSFontAttributeName] = font if let placeholder = textField.p...
Starting a File Chooser Activity public void showFileChooser() { Intent intent = new Intent(Intent.ACTION_GET_CONTENT); // Update with mime types intent.setType("*/*"); // Update with additional mime types here using a String[]. intent.putExtra(Intent.EXTRA_M...
The os module provides an interface to determine what type of operating system the code is currently running on. os.name This can return one of the following in Python 3: posix nt ce java More detailed information can be retrieved from sys.platform
os.chmod(path, mode) where mode is the desired permission, in octal.
Create a DATABASE. Note that the shortened word SCHEMA can be used as a synonym. CREATE DATABASE Baseball; -- creates a database named Baseball If the database already exists, Error 1007 is returned. To get around this error, try: CREATE DATABASE IF NOT EXISTS Baseball; Similarly, DROP DATA...
iPhone OS 1 First iteration of Apple's touch-centric mobile operating system. No official name is given on its initial release; Apple marketing literature simply stated the iPhone runs a version of Apple's desktop operating system, OS X.On March 6, 2008, with the release of the iPhone software deve...
To improve performance one might want to add indexes to columns ALTER TABLE TABLE_NAME ADD INDEX `index_name` (`column_name`) altering to add composite (multiple column) indexes ALTER TABLE TABLE_NAME ADD INDEX `index_name` (`col1`,`col2`)
The AUROC is one of the most commonly used metric to evaluate a classifier's performances. This section explains how to compute it. AUC (Area Under the Curve) is used most of the time to mean AUROC, which is a bad practice as AUC is ambiguous (could be any curve) while AUROC is not. Overview – Abb...
A compound literal is an unnamed object which is created in the scope where is defined. The concept was first introduced in C99 standard. An example for compound literal is Examples from C standard, C11-§6.5.2.5/9: int *p = (int [2]){ 2, 4 }; p is initialized to the address of the first ele...
The normal way to create an array of numbers: numbers = [1, 2, 3, 4, 5] Range objects can be used extensively to create an array of numbers: numbers = Array(1..10) # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] numbers = (1..10).to_a # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] #step and #map methods...
A common workflow for using Git LFS is to declare which files are intercepted through a rules-based system, just like .gitignore files. Much of time, wildcards are used to pick certain file-types to blanket track. e.g. git lfs track "*.psd" When a file matching the above pattern is adde...
There is already a separate entry for "FLOAT, DOUBLE, and DECIMAL" and "ENUM". A single page on datatypes is likely to be unwieldy -- I suggest "Field types" (or should it be called "Datatypes"?) be an overview, then split into these topic pages: INTs FLO...
7.0 OrElse Sub Main() Dim elements As List(Of Integer) = Nothing Dim average As Double = AverageElementsOrElse(elements) Console.WriteLine(average) ' Writes 0 to Console Try 'Throws ArgumentNullException average = AverageElementsOr(elements) Catch ex ...
Joseph Fourier showed that any periodic wave can be represented by a sum of simple sine waves. This sum is called the Fourier Series. The Fourier Series only holds while the system is linear. If there is, eg, some overflow effect (a threshold where the output remains the same no matter how much inpu...
Creating a ServiceHost programmatically (without config file) in its most basic form: namespace ConsoleHost { class ConsoleHost { ServiceHost mHost; public Console() { mHost = new ServiceHost(typeof(Example), new Uri("net.tcp://localhost:9000/Example")); ...

Page 176 of 417