Tutorial by Examples

I have tested the following steps on Amazon EC2 with Ubuntu 14.04 Here is a summary of command lines to install LAMP technology stack (before installing wordpress): 1: Install LAMP technology stack Update linux #> sudo apt-get update -> update package repositories information #> su...
To encrypt data with a public key: final Cipher rsa = Cipher.getInstance("RSA"); rsa.init(Cipher.ENCRYPT_MODE, keyPair.getPublic()); rsa.update(message.getBytes()); final byte[] result = rsa.doFinal(); System.out.println("Message: " + message); System.out.println("...
@Path("/hello") public class HelloResource { /** * A request to /hello would get the response "Hello World" */ @GET public String exampleGet() { return "Hello World"; } /** * A request to /hello/bob would get ...
import javax.ws.rs.*; import javax.ws.rs.core.Response; import java.util.HashMap; import java.util.Map; import java.util.Objects; @Path("/alphabet/{letter}") public class AlphabetResource { private final Map<String, String> alphabet; public AlphabetResource(...
When adding custom fields to a Lucene index you can add new fields into the index using the following configuration: <configuration ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration"> <indexAllfields>false</indexAllfields> <fieldNames hint=...
Encog is an easy to use java neural network engine public static double XOR_INPUT[][] = { { 0.0, 0.0 }, { 1.0, 0.0 }, { 0.0, 1.0 }, { 1.0, 1.0 } }; public static double XOR_IDEAL[][] = { { 0.0 }, { 1.0 }, { 1.0 }, { 0.0 } }; public static void main(final String args[]) { /...
There are basically two operators for date, datetime values. + and - are overloaded (probably a C term) to do date/datetime math: OperatorDescription+Adds days (date) or seconds (datetime) to a date/datetime value.-Gets the difference of two date/datetime values. Subtracts days (date) or seconds (d...
First step : PCL part using Xamarin.Forms; namespace ProjectNamespace { public class ExtendedFrame : Frame { /// <summary> /// The corner radius property. /// </summary> public static readonly BindableProperty CornerRadiusProperty = ...
You can enable/disable ajax and client validations in active form. $form = ActiveForm::begin([ 'id' => 'signup-form', 'enableClientValidation' => true, 'enableAjaxValidation' => true, 'validationUrl' => Url::to('signup'), ]); enableClientValidation is by defaul...
Swift Import the Core Motion library: import CoreMotion Next, we need to create a CMAltimeter object, but a common pitfall is to create it in the viewDidLoad(). If done that way, the altimeter won’t be accessible when we need to call a method on it. Nevertheless, go ahead and create your CMAlti...
Springfox defines a set default response messages that are applied to all API controllers by default. This includes e.g. 201 - Created and 204 - No Content, as well as several 40x responses. There might be cases, in which the default response messages don't apply for your API. You have to build-in p...
Get springfox into your application by using Maven or Gradle Create a new Docket bean in your application and configure it Document your API according to your needs Launch your application and see your achieved results #1 Getting springfox with Maven Add the dependencies for swagger2 and sw...
v8 uses the Google depot_tools for getting the source and building the library. To install depot_tools, follow the instructions here: https://www.chromium.org/developers/how-tos/install-depot-tools Get the v8 source by running /path/to/depot_tools/fetch v8 After running this command, to pull ...
Detailed instructions on getting CentOS 7 installation and basic set up for starting on. Download latest CentOS .ISO - https://www.centos.org/download/ After downloading the last version of CentOS using above links or using official CentOS download page. Burn it to a DVD or create a bootable USB...
Of all the operators, relational operators are the most complex ones, that is why we left them to the end. Relational operators are also known as Comparison operators, they are used to compare things. Comparison result is boolean false or true. Interestingly though, if you check it in V...
A good and easy alternative to the flawed rand() procedures, is xorshift, a class of pseudo-random number generators discovered by George Marsaglia. The xorshift generator is among the fastest non-cryptographically-secure random number generators. More information and other example implementaions ar...
Sources and sinks are objects that know how to open streams. BytesCharsReadingByteSourceCharSourceWritingByteSinkCharSink Creating sources and sinks Note: for all examples, consider UTF_8 as if the following import is set: import static java.nio.charset.StandardCharsets.UTF_8; Reading from a ...
Detailed instructions on getting twitter set up or installed.
Sometimes you have sensitive information in your VBA (e.g., passwords) that you don't want users to have access to. You can achieve basic security on this information by password-protecting your VBA project. Follow these steps: Open your Visual Basic Editor (Alt + F11) Navigate to Tools -> V...
This example hide show html elements. <!DOCTYPE html> <html ng-app="myDemoApp"> <head> <script src="https://code.angularjs.org/1.5.8/angular.min.js"></script> <script> function HideShowController() { var vm = th...

Page 1008 of 1336