Tutorial by Examples: er

Dockerization of ASP.NET Application requires a Dockerfile for configuration and running it as a docker container. FROM microsoft/dotnet:latest RUN apt-get update && apt-get install sqlite3 libsqlite3-dev COPY . /app WORKDIR /app RUN ["dotnet", "restore"] ...
It is nessecary to have .NET or a mono-aspnet package. It is important to understand the importance of dockerization. Install dotnet on ubuntu or the OS you are working on. Installing DOTNET $ sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty m...
First of all, the problem of handling spaces in arguments is NOT actually a Java problem. Rather it is a problem that needs to be handled by the command shell that you are using when you run a Java program. As an example, let us suppose that we have the following simple program that prints the siz...
Let's say we have two tables (A and B) and some of their rows match (relative to the given JOIN condition, whatever it may be in the particular case): We can use various join types to include or exclude matching or non-matching rows from either side, and correctly name the join by picking the cor...
using Google.Contacts; using Google.GData.Client; using Google.GData.Contacts; using Google.GData.Extensions; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Web; using System.Web...
Suppose you have a button in your Java program that counts down a time. Here is the code for 10 minutes timer. private final static long REFRESH_LIST_PERIOD=10 * 60 * 1000; //10 minutes Timer timer = new Timer(1000, new ActionListener() { @Override public void actionPerformed(ActionEve...
Install openfire or any chat server in your system or on server. For more details click here. Create android project and add these libraries in gradle: compile 'org.igniterealtime.smack:smack-android:4.2.0' compile 'org.igniterealtime.smack:smack-tcp:4.2.0' compile 'org.igniterealtime.smack:smac...
Create a class name ErrorMatcher inside your test package with below code: public class ErrorMatcher { @NonNull public static Matcher<View> withError(final String expectedErrorText) { Checks.checkNotNull(expectedErrorText); return new BoundedMatcher<View, ...
All we need are: ViewPager, TabLayout and 2 drawables for selected and default dots. Firstly, we have to add TabLayout to our screen layout, and connect it with ViewPager. We can do this in two ways: Nested TabLayout in ViewPager <android.support.v4.view.ViewPager android:id="@+i...
Service: angular.module('core').factory('print_service', ['$rootScope', '$compile', '$http', '$timeout','$q', function($rootScope, $compile, $http, $timeout,$q) { var printHtml = function (html) { var deferred = $q.defer(); var hiddenFrame = $('<...
Although storing multiple values in a single column violates normalization rules, sometimes one has to deal with badly designed legacy tables. A recursive query can help convert comma-separated values into distinct rows. Create a sample badly designed table and insert some data: create table proje...
String macros do not come with built-in interpolation facilities. However, it is possible to manually implement this functionality. Note that it is not possible to embed without escaping string literals that have the same delimiter as the surrounding string macro; that is, although ""&quot...
Adding a Product to a Shopping Cart The following example demonstrates how to Add a product (or anything) to a Database Table asynchronously, using AJAX, and TypeScript. declare var document; declare var xhr: XMLHttpRequest; window.onLoad = () => { Start(); }; function Start() { ...
To give an alert close functionality, all we need is to add data-dismiss="alert" to our close button. <div class="alert alert-info alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria...
Outer joins return all the rows from one or both tables, plus matching rows. Table People PersonID FirstName 1 Alice 2 Bob 3 Eve Table Scores PersonID Subject Score 1 Math 100 2 Math 54 2 Science 98 Left joining the tables: Select * f...
Unlike a SELECT statement, a Stored Procedure returns multiple result sets. The requires different code to be used for gathering the results of a CALL in Perl, PHP, etc. (Need specific code here or elsewhere!)
GSON does not support inheritance our of the box. Let's say we have the following class hierarchy: public class BaseClass { int a; public int getInt() { return a; } } public class DerivedClass1 extends BaseClass { int b; @Override public int getIn...
The Android Account Authenticator system can be used to make the client authenticate with a remote server. Three pieces of information are required: A service, triggered by the android.accounts.AccountAuthenticator. Its onBind method should return a subclass of AbstractAccountAuthenticator. An a...
If your project has this: scalaVersion := 2.11 // Replace '2.11' with the version of Scala your project is running on Then you can use %% to automatically get the version of the library compiled against the version of Scala the project is using: libraryDependencies += "com.typesafe.slick&...
A library can be 'pinned' to a specific version of Scala using the % operator between the groupId and the artifactId (the first two strings in a library dependency). In this example, we pin the library with the artifactId of slick to Scala version 2.10: libraryDependencies += "com.typesafe.sl...

Page 289 of 417