Tutorial by Examples: ga

The example below shows how to add a navigation bar button (called a UIBarButtonItem) in the Interface Builder. Add a Navigation Controller to your Storyboard Select your View Controller and then in the Xcode menu choose Editor > Embed In > Navigation Controller. Alternatively, you could ...
There are a couple of default recognizers available in Xamarin.Forms, one of them is the TapGestureRecognizer. You can add them to virtually any visual element. Have a look at a simple implementation which binds to an Image. Here is how to do it in code. var tappedCommand = new Command(() => {...
You can simply use the native map APIs on each platform with Xamarin Forms. All you need is to download the Xamarin.Forms.Maps package from nuget and install it to each project (including the PCL project). Maps Initialization First of all you have to add this code to your platform-specific project...
Using the System.String.Contains you can find out if a particular string exists within a string. The method returns a boolean, true if the string exists else false. string s = "Hello World"; bool stringExists = s.Contains("ello"); //stringExists =true as the string contains t...
Using the System.String.Replace method, you can replace part of a string with another string. string s = "Hello World"; s = s.Replace("World", "Universe"); // s = "Hello Universe" All the occurrences of the search string are replaced: string s = "He...
Use the System.String.Split method to return a string array that contains substrings of the original string, split based on a specified delimiter: string sentence = "One Two Three Four"; string[] stringArray = sentence.Split(' '); foreach (string word in stringArray) { Console.W...
Conventional algebraic datatypes are parametric in their type variables. For example, if we define an ADT like data Expr a = IntLit Int | BoolLit Bool | If (Expr Bool) (Expr a) (Expr a) with the hope that this will statically rule out non-well-typed conditionals, this...
The %s conversion of printf states that the corresponding argument a pointer to the initial element of an array of character type. A null pointer does not point to the initial element of any array of character type, and thus the behavior of the following is undefined: char *foo = NULL; printf(&quo...
If index name is known, db.collection.dropIndex('name_of_index'); If index name is not known, db.collection.dropIndex( { 'name_of_field' : -1 } );
Useful information The very beginning of the text field text: let startPosition: UITextPosition = textField.beginningOfDocument The very end of the text field text: let endPosition: UITextPosition = textField.endOfDocument The currently selected range: let selectedRange: UITextRange? = tex...
This example discusses extending the below type class. trait Show[A] { def show: String } To make a class you control (and is written in Scala) extend the type class, add an implicit to its companion object. Let us show how we can get the Person class from this example to extend Show: class...
Considering the following document : <?xml version='1.0' encoding='UTF-8' ?> <library> <book id='1'>Effective Java</book> <book id='2'>Java Concurrency In Practice</book> </library> One can use the following code to build a DOM tree out of a St...
Considering the following document : <?xml version='1.0' encoding='UTF-8' ?> <library> <book id='1'>Effective Java</book> <book id='2'>Java Concurrency In Practice</book> <notABook id='3'>This is not a book element</notABook> </librar...
Starting an Ionic App $ ionic start myapp [template] Starter templates can either come from a named template, a Github repo, a Codepen, or a local directory. A starter template is what becomes the www directory within the Cordova project. Named template starters tabs (Default) sidemen...
Hooks are defined in the application/config/hooks.php file. Each hook is specified as an array with this prototype $hook['pre_controller'] = array( 'class' => 'MyClass', 'function' => 'Myfunction', 'filename' => 'Myclass.php', 'filepath' => 'h...
$ read -r foo <<EOF > this is a line >EOF $ printf '%s\n' "$foo" this is a line
Magento custom module development is a core part of any Magento development or Magento project, because at any stage you may want to integrate your own functionality/module in your existing Magento project. The first thing developers should disable is the system cache. Otherwise developing will bec...
Create a new project with the Leiningen figwheel template: lein new figwheel hello-world Run Figwheel: cd hello-world lein figwheel After a moment it will start a development webserver and open the page in your browser. It also opens a Clojurescript REPL connected to the browser. Try enter...
Monotonic predicates can be debugged by applying declarative reasoning. In pure Prolog, a programming mistake can lead to one or all of the following phenomena: the predicate incorrectly succeeds in a case where it should fail the predicate incorrectly fails in a case where it should succeed t...
Unlike emails, JIDs were defined with Internationalization (i18n) in mind using the Preparation, Enforcement, and Comparison of Internationalized Strings (PRECIS) framework. PRECIS (defined in RFC 7564), is a framework for comparing strings safely in a variety of contexts. For instance, imagine you...

Page 63 of 137