Tutorial by Examples: v

From Apple documentation: Use the CTCallCenter class to obtain a list of current cellular calls, and to respond to state changes for calls such as from a dialing state to a connected state. Such state changes are known as cellular call events. The purpose of CTCallCenter is to give the develop...
The continue statement is used to skip the remaining steps in the current iteration and start with the next loop iteration. The control goes from the continue statement to the step value (increment or decrement), if any. String[] programmers = {"Adrian", "Paul", "John&quot...
public static void Main(string[] args) { var studentList = new List<Student>(); studentList.Add(new Student("Scott", "Nuke")); studentList.Add(new Student("Vincent", "King")); studentList.Add(new Student("Craig", "Be...
// Example of std::vector as an expanding dynamic size array. #include <algorithm> // std::sort #include <iostream> #include <vector> // std::vector using namespace std; int int_from( std::istream& in ) { int x = 0; in >> x; return x; } ...
Unfortunately as of C++14 there's no dynamic size matrix class in the C++ standard library. Matrix classes that support dynamic size are however available from a number of 3rd party libraries, including the Boost Matrix library (a sub-library within the Boost library). If you don't want a dependenc...
RVM is a great tool to manage your ruby versions and set up your working environment. Assuming you already have RVM installed, to get the latest version of ruby, which is needed for these examples, open a terminal and run: $ rvm get stable $ rvm install ruby --latest Check your ruby version by...
When you implement java.io.Serializable interface to make a class serializable, the compiler looks for a static final field named serialVersionUID of type long. If the class doesn't have this field declared explicitly then the compiler will create one such field and assign it with a value which come...
Converting an integer type to the corresponding promoted type is better than converting it to some other integer type. void f(int x); void f(short x); signed char c = 42; f(c); // calls f(int); promotion to int is better than conversion to short short s = 42; f(s); // calls f(short); exact mat...
Download the Atlassian conversion utility here. This utility requires Java, so please ensure that you have the Java Runtime Environment JRE installed on the machine you plan to do the conversion. Use the command java -jar svn-migration-scripts.jar verify to check if your machine is missing any of t...
git show shows various Git objects. For commits: Shows the commit message and a diff of the changes introduced. CommandDescriptiongit showshows the previous commitgit show @~3shows the 3rd-from-last commit For trees and blobs: Shows the tree or blob. CommandDescriptiongit show @~3:shows the ...
Like most scripting languages, vimscript has variables. One can define a variable with the :let command: let variable = value and delete it with :unlet: unlet variable In Vim, variables can be scoped by prepending a single letter and a colon to their name. Plugin authors use that feature to...
By default the built-in Request Localization middleware only supports setting culture via query, cookie or Accept-Language header. This example shows how create a middleware which allows to set the culture as part of the path like in /api/en-US/products. This example middleware assumes the locale t...
By default, one should subscribe to event using inspector, but sometimes it's better to do it in code. In this example we subscribe to click event of a button in order to handle it. using UnityEngine; using UnityEngine.UI; [RequireComponent(typeof(Button))] public class AutomaticClickHandler :...
The aar file doesn't contain the transitive dependencies and doesn't have a pom file which describes the dependencies used by the library. It means that, if you are importing a aar file using a flatDir repo you have to specify the dependencies also in your project. You should use a maven repositor...
The XMPP network can be thought of as a bidirected graph with servers (S) operating in a mesh, clients (C) clustered about their local server, and streams represented by extraverted edges: When a client wants to send data (eg. a message or presence information) across the network to another clien...
In some cases, you want to show your users a UIPickerView with predefined contents for a UITextField instead of a keyboard. Create a custom UIPickerView At first, you need a custom wrapper-class for UIPickerView conforming to the protocols UIPickerViewDataSource and UIPickerViewDelegate. class My...
NSString *someString = @" Objective-C Language \n"; NSString *trimmedString = [someString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; //Output will be - "Objective-C Language" Method stringByTrimmingCharactersInSet returns a new str...
[ServiceContract] public interface IBookService { [OperationContract] [WebGet] List<Book> GetBooksList(); [OperationContract] [WebGet(UriTemplate = "Book/{id}")] Book GetBookById(string id); [OperationContract] [WebInvoke(UriTemplate = &...
Simple Example (centering a single element) HTML <div class="aligner"> <div class="aligner-item">…</div> </div> CSS .aligner { display: flex; align-items: center; justify-content: center; } .aligner-item { max-width: 50%; /*for d...
The @if control directive evaluates a given expression and if it returns anything other than false, it processes its block of styles. Sass Example $test-variable: true !default =test-mixin @if $test-variable display: block @else display: none .test-selector +test-mixin ...

Page 81 of 296