Tutorial by Examples: and

Get image from file lib.myImage = IMAGE lib.myImage.file = fileadmin/My-Image.png lib.myImage.file.width = 100 lib.myImage.file.height = 100 Get image from page properties lib.pageImage = IMAGE lib.pageImage { file.import.data = levelmedia: -1, "slide" file.impor...
Just like you handle get requests in Express with app.get method, you can use app.post method to handle post requests. But before you can handle POST requests, you will need to use the body-parser middleware. It simply parses the body of POST, PUT, DELETE and other requests. Body-Parser middleware...
Sparse indexes: These can be particularly useful for fields that are optional but which should also be unique. { "_id" : "[email protected]", "nickname" : "Johnnie" } { "_id" : "[email protected]" } { "_id" : "julia@example...
In Express, you can define unified error handler for handling errors occurred in application. Define then handler at the end of all routes and logic code. Example var express = require('express'); var app = express(); //GET /names/john app.get('/names/:name', function(req, res, next){ if...
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}/...
using System.Diagnostics.Contracts; public int DivideNumbers(int numerator, int denominator) { Contract.Requires(denominator != 0); return numerator / denominator; }
Hibernate is an implementation of the JPA standard. As such, everything said there is also true for Hibernate. Hibernate has some extensions to JPA. Also, the way to set up a JPA provider is provider-specific. This documentation section should only contain what is specific to Hibernate.
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 ...
By default, Jackson (the library Play JSON uses) will try to map every public field to a json field with the same name. If the object has getters/setters, it will infer the name from them. So, if you have a Book class with a private field to store the ISBN and have get/set methods named getISBN/setI...
Use the tar (tape archive) command to compress your files and folders. It is similar to creating .ZIP files in Windows environment. Syntax: tar -zcvf <output tar file> <source file> Example: tar -zcvf outputfile.tar.gz source file Here’s what those switches actually mean: -c: Cr...
docker network create -o "com.docker.network.bridge.enable_ip_masquerade"="false" lan-restricted Blocks Local LAN Internet Does not block Host running docker daemon (example access to 10.0.1.10:22)
After succesfully setup Spring-Boot application all the configuration is handled in an application.properties file. You will find the file at src/main/resources/. Normally there is a need to have a database behind the application. For development its good to have a setup of dev and a prod environme...
To track so called "virtual pageviews", use the ga('send') method right after your asynchronous request: Syntax: ga('send', 'pageview', 'path to your virtual page'); Example (Simple Link): <a href="http://example.com/my.pdf" onClick="ga('send', 'pageview', '/virtu...
Example of how ReplaceAll only applies a rule at most once, while ReplaceRepeated will do so in a loop but always restart application from the first rule. x + a /. { a_ + z :> (Print[0]; DoneA), a_ + x :> (Print[1]; y + z), a_ + y :> (Print[2]; DoneB)} (* Prints "1&quot...
In order to run Elasticsearch, a Java Runtime Environment (JRE) is required on the machine. Elasticsearch requires Java 7 or higher and recommends Oracle JDK version 1.8.0_73. So, be sure if you have Java in your system. If not, then follow the procedure: # Install wget with yum yum -y install w...
The best way to install and configure a Symfony2 project is described in the official documentation as follows: Mac OS X / Linux $ sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony $ sudo chmod a+x /usr/local/bin/symfony Windows c:\> php -r "file_put_contents('sym...
How to implement Firebase Real-Time database in Android applications. Setup/Installation: First, install the Firebase SDK (guide) Register your project using the Firebase console After successfuly completing the two steps above, add the following dependency in your application level ...
So, Before writing out optimiser functions , we need to install a couple of caching plugins. bash $ npm install --save-dev gulp-cached bash $ npm install --save-dev gulp-remember You might wonder why two caches eh!. gulp-cached , passes only modified or new content down the pipeline to other ...
NOTE This page illustrates use of gulp plugins like browser-sync , gulp-watch and run-sequence , and continues discussing gulp-workflow-automation from where we left off at Gulpjs-workflow-automation-1 of 2. In case you landed here , consider going through that post first. Default Task ...
import pandas as pd data = [ {'name': 'Daniel', 'country': 'Uganda'}, {'name': 'Yao', 'country': 'China'}, {'name': 'James', 'country': 'Colombia'}, ] df = pd.DataFrame(data) filename = 'people.csv' df.to_csv(filename, index=False, encoding='utf-8')

Page 98 of 153