Tutorial by Examples: st

Java Config The configuration class needs only to be a class that is on the classpath of your application and visible to your applications main class. class MyApp { public static void main(String[] args) throws Exception { AnnotationConfigApplicationContext appContext = ...
jHipster allows you to bootstrap a Spring Boot web application with a REST API back-end and a AngularJS and Twitter Bootstrap front-end. More on jHipster here: jHipster Documentation Install brew: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/inst...
val and var scala> val a = 123 a: Int = 123 scala> a = 456 <console>:8: error: reassignment to val a = 456 scala> var b = 123 b: Int = 123 scala> b = 321 b: Int = 321 val references are unchangeable: like a final variable in Java, once it has been initial...
In Express, you can define middlewares that can be used for checking requests or setting some headers in response. app.use(function(req, res, next){ }); // signature Example The following code adds user to the request object and pass the control to the next matching route. var express = req...
xdmp:estimate(cts:search(fn:doc(), cts:element-value-query(xs:QName("d"), "fragment-d"))) xdmp:estimate can not be used on XPaths unlike fn:count is used in previous example xdmp:estimate actually gives the number of matching fragments
Lets start with creating our first app Open visual studio and > create new project Enter Name and Location Enter your developer site url created in previous step and select Provider-hosted Popup will open which will as for login Next step it will as for type of applicatio...
Here I'm taking the example of a basic news app Open the SharePoint developer site and create a list to store our news articles Create a custom list and Add 3 more columns Body, Summery, ThumbnailImageUrl Go back to our SharePoint app, Open AppManifest.xml file, click on permission...
QStack<T> is a template Qt class providing stack. Its analogue in STL is std::stack. It is last in, first out structure (LIFO). QStack<QString> stack; stack.push("First"); stack.push("Second"); stack.push("Third"); while (!stack.isEmpty()) { cout ...
Quick installation guide: Download and unzip the PrestaShop package to a directory in you web hosting. Create a database for PrestaShop. Open a browser to the url where are PrestaShop files. Follow the screen istructions. Delete the /install directory and rename /admin directory. Official ...
Create a new controller foreg ControllerName: "Home", ActionresultName :"Index" open AreaRegistraion.cs and add the controller name and action name to be rerouted to context.MapRoute( "nameofarea_default", "nameofarea/{controller}/...
When using html5Mode([mode]) it is necessary that: You specify the base URL for the application with a <base href=""> in the head of your index.html. It is important that the base tag comes before any tags with url requests. Otherwise, this might result in this error - &quo...
using System.Diagnostics.Contracts; public int DivideNumbers(int numerator, int denominator) { Contract.Requires(denominator != 0); return numerator / denominator; }
Using Android Studio 2.2 and higher Native Development Kit (NDK) you can use to compile C and C++ code. You can use NDK by manually downloading NDK and build it or through CMake . Here I will give process flow for manually install NDK and an example code, Based on your System OS you can download ...
import play.libs.Json; // (...) Loading a file from your public folder // Note: "app" is an play.Application instance JsonNode node = Json.parse(app.resourceAsStream("public/myjson.json")); Load from a string String myStr = "{\"name\": \"John Doe\&qu...
Large scale applications often need different properties when running on different environments. we can achieve this by passing arguments to NodeJs application and using same argument in node process to load specific environment property file. Suppose we have two property files for different enviro...
Set custom user agent and navigate to Uri: var userAgent = "my custom user agent"; var uri = new Uri("http://useragentstring.com/"); var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); requestMessage.Headers.Add("User-Agent", userAgent); this.webVie...
Show specified html string in WebView: var htmlString = @"<!DOCTYPE html> <html> <head><title>HTML document</title></head> <body> <p>This is simple HTML content.</p> </body>...
In case when NavigateToString can't handle some content, use NavigateToLocalStreamUri method. It will force every locally-referenced URI inside the HTML page to call to the special resolver class, which can provide right content on the fly. Assets/Html/html-sample.html file: <!DOCTYPE html> ...
If you have a list in memory already, the straightforward and usually sufficient way to process it is a simple foreach loop: foreach my $item (@items) { ... } This is fine e.g. for the common case of doing some processing on $item and then writing it out to a file without keeping the data ...
Amazon Linux is a RHEL variant, so the Red Hat instructions should work for the most part. There is, however, at least one discrepancy. There was an instance where the python27-devel package, as opposed to python-devel, was explicitly necessary. Here, we will install from source. sudo yum -y upd...

Page 238 of 369