Tutorial by Examples: c

One of the main features in Material Design is the addition of a Snackbar, which in theory replaces the previous Toast. As per the Android documentation: Snackbars contain a single line of text directly related to the operation performed. They may contain a text action, but no icons. Toasts are...
Yellowdog Updater, Modified, one of the last remaining vestiges of Yellow Dog Linux, is the package manager used by Red Hat, Fedora, and CentOS systems and their derivatives. It can handle the installation and removal of software packaged as rpms for these Linux distributions. Below are some simple...
If Errorlevel 1 ( Echo Errorlevel is 1 or higher REM The phrase "1 or higher" is used because If Errorlevel 1 statement means: REM If %Errorlevel% GEQ 1 REM Not If %Errorlevel% EQU 1 ) ...
If exist "C:\Foo\Bar.baz" ( Echo File exist ) This checks if the file C:\Foo\Bar.baz's existence. If this exist, it echos File exist The Not operator can also be added.
Pushd "D:\Foo" Dir Popd Pushd will change the directory to the directory following (in this case D:\Foo. Popd returns back to the original directory.
Depth First Traversal (or Search) for a graph is similar to Depth First Traversal of a tree. The only catch here is, unlike trees, graphs may contain cycles, so we may come to the same node again. To avoid processing a node more than once, we use a boolean visited array. Below algorithm presents th...
The old good Java object serialization is available for you in Android. you can define Serializable classes like: class Cirle implements Serializable { final int radius; final String name; Circle(int radius, int name) { this.radius = radius; this.name = name; }...
You can also read and write from/to memory card (SD card) that is present in many Android devices. Files in this location can be accessed by other programs, also directly by the user after connecting device to PC via USB cable and enabling MTP protocol. Finding the SD card location is somewhat more...
class ParentClass { [string] $Message = "Its under the Parent Class" [string] GetMessage() { return ("Message: {0}" -f $this.Message) } } # Bar extends Foo and inherits its members class ChildClass : ParentClass { } $Inherit = [ChildClass...
Algorithm BFS(G) Input graph G Output labeling of the edges and partition of the vertices of G for all u ∈ G.vertices() setLabel(u, UNEXPLORED) for all e ∈ G.edges() setLabel (e, UNEXPLORED) for all v ∈ G.vertices() if getLabel(v) = UNEXPLORED ...
Naturally, being able to install hard drive cloning utilities can be an important aspect of installing and maintaining your operating system. Getting set up with Clonezilla is surprisingly less straightforward than I'd have expected. The wealth of options, while valuable, also makes each part of id...
This example will be using the class md-icon-button, which must be applied to <md-button> in order to get an icon button. It is also recommended to add an aria-label attribute to <md-button> for accessibility purpose or the ARIA provider will throw a warning that there is no aria-labe...
Reference the ArcGIS JavaScript API from our CDN and you are ready to get started:
Starting with version 3.2 of the ArcGIS API for JavaScript, developers must include an additional Cascading Style Sheet (CSS) file: esri.css. The URL for this file is: // versions 3.11 and forward <link rel="stylesheet" href="https://js.arcgis.com/API-VERSION/esri/css/esri.css&...
The esri.css file does not include the CSS for various Dojo widgets or themes like tundra or claro; those files must be included separately. Exceptions are the Grid and RangeSlider, which are used by widgets in the API. Grid styles must be explicitly included. For instance, this CSS file would be i...
Let's take this example without using generics protocol JSONDecodable { static func from(_ json: [String: Any]) -> Any? } The protocol declaration seems fine unless you actually use it. let myTestObject = TestObject.from(myJson) as? TestObject Why do you have to cast the result to T...
import { BrowserModule } from '@angular/platform-browser'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { Component, DebugElement } from '@angular/core'; import { dispatchEvent } from "@an...
/* Define a query named q1 for the Customer table */ DEFINE QUERY q1 FOR Customer. /* Open the query for all Customer records where the state is "tx" */ OPEN QUERY q1 FOR EACH Customer WHERE Customer.state ='TX'. ...
In Twig templates variables can be accessed using double curly braces notation {{ variableName }}. Basic example of greeting user <!DOCTYPE html> <html> <body> <span>Hello {{ name }}</span> </body> </html> Accessing array elements Twig as ...
If for some reason, the default PowerShell module repository PSGallery gets removed. You will need to create it. This is the command. Register-PSRepository -Default

Page 679 of 826