Tutorial by Examples

Let's assume that you need to show the status of a user and you have several possible CSS classes that could be used. Angular makes it very easy to choose from a list of several possible classes which allow you to specify an object list that include conditionals. Angular is able to use the correct...
Angular supports three types of expressions in the ng-class directive. 1. String <span ng-class="MyClass">Sample Text</span> Specifying an expression that evaluates to a string tells Angular to treat it as a $scope variable. Angular will check the $scope and look for a va...
First you create a new Cordova project: cordova create HelloWorld my.application.identifier AppName This will create a blank Cordova project in the HelloWorld folder with identifier my.application.identifier (which should be unique for each application) with name AppName. Next you add th...
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <path d="M 10,10 L 100,50" stroke="blue" stroke-width="5" /> </svg> Result:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <path d="M 10,10 H 200" stroke="orange" stroke-width="5" /> </svg> Result:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <path d="M 10,10 l 90,90 M 100,10 l -90,90" stroke="red" stroke-width="10" /> </svg> Result:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <path d="M 10,10 V 200" stroke="green" stroke-width="5" /> </svg> Result:
The goal with using anonymous structs is to decode only the information we care about without littering our app with types that are used only in a single function. jsonBlob := []byte(` { "_total": 1, "_links": { "self": "https://api.twitch.tv/k...
Code lens is a simple way to know what happens with the code. Here you could find an image with the number of references of a method or class. If you can't see the code lens please see this question: Missing CodeLens references count in VS 2015 Community edition
Intoduction Since Visual Studio 2005 can you make Intellisense Code Snippets. This allow you to generate some code just by typing one keyword and press two times the tab key. Using the code The XML code you need for make an Intellisense Code Snippet stands below: <?xml version="1.0"...
Wildfly, part of the JBoss umbrella of projects, can also be executed via Docker. On a machine with Docker properly configured, run: $ docker run -it jboss/wildfly Once the image is pulled, the container starts and the following line can be seen: 09:44:49,225 INFO [org.jboss.as] (Controller Bo...
Once Wildfly is installed by unzipping the distribution, it can be started by running the standalone.sh script on the bin directory: $ ./bin/standalone.sh ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /mnt/storage/tools...
Sometimes you may want to have a lambda expression implementing more than one interface. This is mostly useful with marker interfaces (such as java.io.Serializable) since they don't add abstract methods. For example, you want to create a TreeSet with a custom Comparator and then serialize it and se...
The Required attribute specifies that a property is required. An error message can be specified on using the ErrorMessage property on the attribute. First add the namespace: using System.ComponentModel.DataAnnotations; And apply the attribute on a property. public class Product { [Require...
The StringLength attribute specifies the minimum and maximum length of characters that are allowed in a data field. This attribute can be applied on properties, public fields and parameters. The error message must be specified on the ErrorMessage property on the attribute. The properties MinimumLeng...
Initialize a UICollectionView with a CGRect frame: Swift: let collection = UICollectionView(frame: CGRect(x: 0, y: 0, width: 200, height: 21)) Objective C: UICollectionView *collection = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, 200, 21)]; You can also create a UICollectionVi...
Every collection view must have a Datasource object. The Datasource object is the content that your app will display within the UICollectionView. At a minimum, all Datasource objects must implement the collectionView:numberOfItemsInSection: and collectionView:cellForItemAtIndexPath: methods. Requir...
final in Java can refer to variables, methods and classes. There are three simple rules: final variable cannot be reassigned final method cannot be overriden final class cannot be extended Usages Good Programming Practice Some developer consider it good practice to mark a variable final wh...
When you request the url yourSite/Home/Index through a browser, the routing module will direct the request to the Index action method of HomeController class. How does it know to send the request to this specific class's specific method ? there comes the RouteTable. Every application has a route ta...
Text is made of all characters outside of any markup (opening element tags, closing element tags, etc). <?xml version="1.0"?> <document> This is some text and <b>this is some more text</b>. </document> The precise XML terminology for text is character...

Page 298 of 1336