Tutorial by Examples: amp

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, ...
Q. Why we need compilation? Ans. We need compilation for achieving higher level of efficiency of our Angular applications. Take a look at the following example, // ... compile: function (el, scope) { var dirs = this._getElDirectives(el); var dir; var scopeCreated; dirs.forEach(functi...
Assume that we are using Page object model. Page Object class: import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; public cla...
// register activation hook register_activation_hook( __FILE__, 'example_activation' ); // function for activation hook function example_activation() { // check if scheduled hook exists if ( !wp_next_scheduled( 'my_event' )) { // Schedules a hook // time() - the f...
from selenium import webdriver # Create a new webdriver driver = webdriver.Chrome() # Get a page that has a popup window (Use mouse to click "try it" button) driver.get("http://www.w3schools.com/js/tryit.asp?filename=tryjs_alert") # Accept the opened alert driver.switch_t...
from flask import Flask, render_template, redirect, url_for app = Flask(__name__) @app.route('/') def main_page(): return render_template('main.html') @app.route('/main') def go_to_main(): return redirect(url_for('main_page'))
Multiton can be used as a container for singletons. This is Multiton implementation is a combination of Singleton and Pool patterns. This is an example of how common Multiton abstract Pool class can be created: abstract class MultitonPoolAbstract { /** * @var array */ protec...
This pattern can be used to contain a registered Pools of Singletons, each distinguished by unique ID: abstract class MultitonRegistryAbstract { /** * @var array */ protected static $instances = []; /** * @param string $id */ final protected function ...
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>classpath:ReleaseBundle.properties</value> </list> </bean>
Big data is a term for data sets that are so large or complex that traditional data processing applications are inadequate to deal with them. Challenges include analysis, capture, data curation, search, sharing, storage, transfer, visualization, querying, updating and information privacy. A general...
// Basic code for Express Instance var express = require('express'); var app = express(); // Serve static files from directory 'public' app.use(express.static('public')); // Start Express server app.listen(3030);
// Set up Express var express = require('express'); var app = express(); // Serve static assets from both 'public' and 'files' directory app.use(express.static('public'); app.use(express.static('files'); // Start Express server app.listen(3030);
// Set up Express var express = require('express'); var app = express(); // Specify mount path, '/static', for the static directory app.use('/static', express.static('public')); // Start Express server app.listen(3030);
// Set up Express var express = require('express'); var app = express(); // Serve files from the absolute path of the directory app.use(express.static(__dirname + '/public')); // Start Express server app.listen(3030);
// Set up Express var express = require('express'); var app = express(); /* Serve from the absolute path of the directory that you want to serve with a */ virtual path prefix app.use('/static', express.static(__dirname + '/public')); // Start Express server app.listen(3030);
Design documents contain application logic. Any document in a database that has an _id starting with "_design/" can be used as design document. Usually there is one design document for each application. { "_id": "_design/example", "view": { ...
productFlavors { // Define separate dev and prod product flavors. dev { // dev utilizes minSDKVersion = 21 to allow the Android gradle plugin // to pre-dex each module and produce an APK that can be tested on // Android Lollipop without time c...
let Source = Folder.Files("\\jsds1.live\dfs\Userprofiles\ixh500\UPM_Profile\desktop\PQ Desktop Demos\Set 2"), #"Lowercased Text" = Table.TransformColumns(Source,{{"Extension", Text.Lower}}), #"Filtered Rows" = Table.SelectRows(#"Lowercased ...
Previous Quarter Sales:=CALCULATE(FactSales[Sales], PREVIOUSQUARTER(DimDate[DateKey])) (Calculates the total sales for the previous quarter, based on the Sales column in the FactSales table and the DateKey in the DimDate table, depending on the filters applied in a PivotTable or PivotChart)

Page 24 of 46