Tutorial by Examples: ad

In order to add Firebase Crash Reporting to your app, perform the following steps: Create an app on the Firebase Console here. Copy the google-services.json file from your project into your in app/ directory. Add the following rules to your root-level build.gradle file in order to inc...
Web views are useful to load locally generated HTML strings. NSString *html = @"<!DOCTYPE html><html><body>Hello World</body></html>"; [webView loadHTMLString:html baseURL:nil]; Swift let htmlString = "<h1>My First Heading</h1><p&gt...
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...
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...
Add below dependencies to your build.gradle // Facebook login compile 'com.facebook.android:facebook-android-sdk:4.21.1' Add below helper class to your utility package: /** * Created by Andy * An utility for Facebook */ public class FacebookSignInHelper { private static final...
For accessing the MS SQL Server database Sqoop requires an additional JDBC driver which can be downloaded from Microsoft. The following steps will install MSSQL Server JDBC driver to Sqoop: wget 'http://download.microsoft.com/download/0/2/A/02AAE597-3865-456C-AE7F-613F99F850A8/sqljdbc_4.0.2206.100_...
The data can be imported directly into Hive: sqoop import --hive-import --table EventLog --connect "jdbc:sqlserver://192.168.1.99:1433;database=Test_db" --username user --password password --split-by id ...
Instead of var component = <Component foo={this.props.x} bar={this.props.y} />; Where each property needs to be passed as a single prop value you could use the spread operator ... supported for arrays in ES6 to pass down all your values. The component will now look like this. var compon...
This example shows how a function can accept pipelined input, and iterate efficiently. Note, that the begin and end structures of the function are optional when pipelining, but that process is required when using ValueFromPipeline or ValueFromPipelineByPropertyName. function Write-FromPipeline{ ...
This is a simple example to display read-only data that is tabular in nature using Qt's Model/View Framework. Specifically, the Qt Objects QAbstractTableModel (sub-classed in this example) and QTableView are used. Implementations of the methods rowCount(), columnCount(), data() and headerData() are...
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...
How to install the Android Debugging Bridge (ADB) to a Linux system with the terminal using your distro's repositories. Install to Ubuntu/Debian system via apt: sudo apt-get update sudo apt-get install adb Install to Fedora/CentOS system via yum: sudo yum check-update sudo yum install androi...
Gradient Boosting for classification. The Gradient Boosting Classifier is an additive ensemble of a base model whose error is corrected in successive iterations (or stages) by the addition of Regression Trees which correct the residuals (the error of the previous stage). Import: from sklearn.ensem...
Follow this steps for adding splash screen into WPF application in Visual Studio: Create or get any image and add it to your project (e.g. inside Images folder): Open properties window for this image (View → Properties Window) and change Build Action setting to SplashScreen value: R...
Show how to create simple IMultiValueConverter converter and use MultiBinding in xaml. Get summ of all values passed by values array. public class AddConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { ...
$ IFS= read -r foo <<EOF > this is a \n line >EOF $ printf '%s\n' "$foo" this is a \n line
$ read -r foo <<EOF > this is a line >EOF $ printf '%s\n' "$foo" this is a line

Page 45 of 114