Tutorial by Examples: al

Notice that if we consider the path (in order): (1,2,3,4,6,0,5,7) and the path (1,2,3,5,0,6,7,4) The cost of going from vertex 1 to vertex 2 to vertex 3 remains the same, so why must it be recalculated? This result can be saved for later use. Let dp[bitmask][vertex] represent the minimum c...
NOTE: for best results, make sure your project was created using the Angular-CLI. npm install angular/{core,common,compiler,platform-browser,platform-browser-dynamic,http,router,forms,compiler-cli,tsc-wrapped,platform-server} You don't have to do this step if you project already has angular 2 an...
Label label = new Label { Text = "text" }; if(Device.OS == TargetPlatform.iOS) { label.FontSize = label.FontSize - 2; }
HTML Tag: Tag attributes look similar to html, however their values are just regular JavaScript. a(href='google.com') Google a(class='button', href='google.com') Google Result: <a href="google.com">Google</a><a href="google.com" class="button">G...
Classes may be defined using a .classname syntax: Code: a.button Result: <a class="button"></a> Since div's are such a common choice of tag, it is the default if you omit the tag name: Code: .content Result: <div class="content"></div>
IDs may be defined using a #idname syntax: Code: a#main-link Result: <a id="main-link"></a> Since div's are such a common choice of tag, it is the default if you omit the tag name: Code: #content Result: <div id="content"></div>
LaraDock is a Laravel Homestead like development environment but for Docker instead of Vagrant. https://github.com/LaraDock/laradock Installation *Requires Git and Docker Clone the LaraDock repository: A. If you already have a Laravel project, clone this repository on your Laravel root director...
if true; then echo Always executed fi if false; then echo Never executed fi
Firebase Console information in detail Android : Firebase Analytics Example Steps For Android : Download code from the link Check FirebaseAnalyticsActivity That's all you will understand how's the firebase analytics works for the different scenario.
In image processing applications, the bilateral filters are a special type of non-linear filters. There is a trade off between loosing structure and noise removal, because the most popular method to remove noise is Gaussian blurring which is not aware of structure of image; therefore, it also remov...
This serializer has some nice features that the default .net json serializer doesn't have, like Null value handling, you just need to create the JsonSerializerSettings : public static string Serialize(T obj) { string result = JsonConvert.SerializeObject(obj, new JsonSerializerSettings { NullVa...
You can make a URI parameter optional by adding a question mark to the route parameter. You can also specify a default value by using the form parameter=value. public class BooksController : Controller { // eg: /books // eg: /books/1430210079 [Route(“books/{isbn?}”)] public Act...
Sometimes you need to replace a value matching a pattern with a new value that's based on that specific match, making it impossible to predict the new value. For these types of scenarios, a MatchEvaluator can be very useful. In PowerShell, a MatchEvaluator is as simple as a scriptblock with a singl...
A regex-pattern uses many special characters to describe a pattern. Ex., . means "any character", + is "one or more" etc. To use these characters, as a .,+ etc., in a pattern, you need to escape them to remove their special meaning. This is done by using the escape character whi...
Tuples are frequently used for multiple return values. Much of the standard library, including two of the functions of the iterable interface (next and done), returns tuples containing two related but distinct values. The parentheses around tuples can be omitted in certain situations, making multip...
The simplest manner of defining custom behavior for individual routes would be fairly easy. In this example we use it to authenticate a user : 1) routes.js: create a new property (like requireAuth) for any desired route angular.module('yourApp').config(['$routeProvider', function($routeProvider) ...
Create an instance of Mobile Analytics for Bluemix. Add the Bluemix Mobile Services SDK to your iOS project. After installing the SDK, add these import statements at top of your AppDelegate.swift file: import BMSCore import BMSAnalytics Next you'll need to initialize and send mobile ana...
Floating point Numbers can be formatted as a decimal number using String.format with 'f' flag //Two digits in fracttional part are rounded String format1 = String.format("%.2f", 1.2399); System.out.println(format1); // "1.24" // three digits in fractional pa...
Setup Install AWS CLI AWS CLI is an common CLI tool for managing the AWS resources. With this single tool we can manage all the aws resources sudo apt-get install -y python-dev python-pip sudo pip install awscli aws --version aws configure Bash one-liners cat <file> # output a file ...
In this example, I created a form which is used to register a new user. In the options passed to the form, I give the different roles a user can have. Creating a reusable class for my form with configured data class and an extra option that fills the choice field to pick a userrole: class UserType...

Page 178 of 269