Tutorial by Examples: amp

The following route has a simple goal : First, it checks if and ImportDocumentProcess object is present in the database and adds it as an exchange header Then, it adds an ImportDocumentTraitement (Which is linked to the previous ImportDocumentProcess) in the database Here is the code of this ...
The processor just contains just contains the methods needed by the route. It is just a classic Java Bean containing several methods. You can also implement Processor and override the process method. See the code below : @Component("testExampleProcessor") public class TestExampleProcess...
Don't forget to add the camel test support and spring camel test support to your project dependencies. See the following for maven users : <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-test</artifactId> <version>${camel.version}...
add_action('rest_api_init', 'my_rest_validate_endpoint' ); function my_rest_validate_endpoint() { // Declare our namespace $namespace = 'myrest/v1'; // Register the route // Example URL matching this route: // http://yourdomain/wp-json/myrest/v1/guides/tag=europe/price=...
STUFF(Original_Expression, Start, Length, Replacement_expression) STUFF() function inserts Replacement_expression, at the start position specified, along with removing the characters specified using Length parameter. Select FirstName, LastName,Email, STUFF(Email, 2, 3, '*****') as StuffedEmail Fr...
1.The Unit return type declaration is optional for functions. The following codes are equivalent. fun printHello(name: String?): Unit { if (name != null) println("Hello ${name}") } fun printHello(name: String?) { ... } 2.Single-Ex...
Install the Cordova and Ionic Native plugins: $ ionic cordova plugin add cordova-plugin-camera $ npm install --save @ionic-native/camera Your app.module.ts will need to inject camera: import { Camera } from '@ionic-native/camera'; .......... @NgModule({ declarations: [ MyApp ], ...
Consider the following HTML markup: <section> <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.</p> <p>...
The same URl for different http methods acts differently. Below is a table depicting the same. HTTP VERBURLDESCRIPTIONGET/api/studentsReturns all studentsGET/api/students/5Returns details of Student Id =5POST/api/studentsAdd a new studentPUT/api/students/5Update student with Id=5DELETE/api/students...
For example: FOR SAVING: NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; // saving an NSString [prefs setObject:txtUsername.text forKey:@"userName"]; [prefs setObject:txtPassword.text forKey:@"password"]; [prefs synchronize]; FOR RETRIEVING ...
\documentclass[final,t]{beamer} \mode<presentation> { \usetheme{Berlin} } \usepackage[orientation=landscape,size=a1,scale=1,debug]{beamerposter} \usepackage{lipsum} % for dummy text \usepackage{graphicx} % for dummy image \usepackage{tikz} % for tikzpicture \usepackage{pgfplot...
The tokio-signal crate provides a tokio-based solution for handling signals. It's still in it's early stages though. extern crate futures; extern crate tokio_core; extern crate tokio_signal; use futures::{Future, Stream}; use tokio_core::reactor::Core use tokio_signal::unix::{self as unix_si...
A simple example would be for a library management application; you would have 2 models, for example, student and book in models.py: from django.db import models class student(models.Model): roll_no = models.IntegerField(primary_key=True) first_name = models.CharField(max_length=30) ...
import pip command = 'install' parameter = 'selenium' second_param = 'numpy' # You can give as many package names as needed switch = '--upgrade' pip.main([command, parameter, second_param, switch]) Only needed parameters are obligatory, so both pip.main(['freeze']) and pip.main(['freeze'...
Interfacing of DS18B20 with Raspberry pi Connection of DS18B20 with Raspberry pi You can see there are three terminal Vcc Gnd Data (One wire protocol) R1 is 4.7k ohm resistance for pulling up the voltage level Vcc should be connected to any of the 5v or 3.3v pins of Raspberry pi (PI...
The service describes the operations it performs in a service contract that it exposes publicly as metadata. // Define a service contract. [ServiceContract(Namespace="http://StackOverflow.ServiceModel.Samples")] public interface ICalculator { [OperationContract] dou...
This sample demonstrates the use of AD B2C for securing an AngularJS based web and mobile app. Refer https://github.com/NewtonJoshua/Azure-ADB2C-Angularjs-sample Azure AD B2C Azure AD B2C is a cloud identity management solution for your web and mobile applications. It is a highly available global...
<body onload="__init();"> ... <script src="http://requirejs.org/docs/release/2.3.2/comments/require.js"></script> <script> function __init() { require(["view/index.js"]); } </script> </body>...
{ "module": "amd", // Using AMD module code generator which works with requireJS "rootDir": "./src", // Change this to your source folder "outDir": "./view", ... }

Page 44 of 46