Tutorial by Examples: 2

These functions will hash either String or Data input with one of eight cryptographic hash algorithms. The name parameter specifies the hash function name as a String Supported functions are MD2, MD4, MD5, SHA1, SHA224, SHA256, SHA384 and SHA512 This example requires Common Crypto It is nece...
These functions will hash either String or Data input with one of eight cryptographic hash algorithms. The name parameter specifies the hash function name as a String Supported functions are MD5, SHA1, SHA224, SHA256, SHA384 and SHA512 This example requires Common Crypto It is necessary to h...
Import libraries (language dependency: python 2.7) import tensorflow as tf import numpy as np from sklearn.datasets import fetch_mldata from sklearn.model_selection import train_test_split load data, prepare data mnist = fetch_mldata('MNIST original', data_home='./') print "MNIST data,...
The following example is tested on Windows 8 pro 64-bit operating system with python 2.7 and scrapy v 1.2. Let assume that we have already installed the scrapy framework. MySQL database that we will use in the following tutorial CREATE TABLE IF NOT EXISTS `scrapy_items` ( `id` bigint(20) UNSIGN...
Angular2 provides several exported values that can be aliased to local variables. These are: index first last even odd Except index, the other ones take a Boolean value. As the previous example using index, it can be used any of these exported values: <div *ngFor="let item of item...
With hierarchical clustering, outliers often show up as one-point clusters. Generate three Gaussian distributions to illustrate the effect of outliers. set.seed(656) x = c(rnorm(150, 0, 1), rnorm(150,9,1), rnorm(150,4.5,1)) y = c(rnorm(150, 0, 1), rnorm(150,0,1), rnorm(150,5,1)) ...
JSX is not meant to be interpreted by the browser. It must be first transpiled into standard Javascript. To use JSX you need to install the plugin for babel babel-plugin-transform-vue-JSX Run the Command below: npm install babel-plugin-syntax-jsx babel-plugin-transform-vue-jsx babel-helper-vue-jsx...
the following is an ejs file. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Hello, world!</title> </head> <body> <%= message %> </body> </html>
app.get("/",function(req,res){ response.render("index",{ //render the index when root(/) is requested message:"rendered view with ejs" }); });
ActionMailer ActionPack ActiveRecord ActiveResource (ActiveWebService was replaced by ActiveResource, and with that, Rails moved from SOAP to REST by default) ActiveSupport Railties
We will use retrofit 2 and SimpleXmlConverter to get xml data from url and parse to Java class. Add dependency to Gradle script: compile 'com.squareup.retrofit2:retrofit:2.1.0' compile 'com.squareup.retrofit2:converter-simplexml:2.1.0' Create interface Also create xml class wrapper in our cas...
In this example we will ask the bitcoin network for the merkle block number 442603. In order to do this we need to send a filterload message and then we have to send a getdata message using the inventory type MSG_MERKLEBLOCK. The peers should reply with a merkleblock message for the requested bloc...
If the first parameter is NOT NULL, NVL2 will return the second parameter. Otherwise it will return the third one. SELECT NVL2(null, 'Foo', 'Bar'), NVL2(5, 'Foo', 'Bar') FROM DUAL; NVL2(NULL,'FOO','BAR')NVL2(5,'FOO','BAR')BarFoo
For getting the next 10 rows just run this query: SELECT * FROM TableName ORDER BY id OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY; Key points to consider when using it: ORDER BY is mandatory to use OFFSET and FETCH clause. OFFSET clause is mandatory with FETCH. You can never use, ORDER BY … FETC...
IMPORTANT This is just an example code, do not use in production. In order to download an header chain we have to send a getHeaders message. In this example we will require as much as possible headers after the 40000th one.The peer will respond with batch of 2000 headers so, we have to take the la...
How do you detect them? If the same variable/resource/memory location is accessible by multiple threads and at least of the thread is changing the value of variable/resource/memory location, then Race Condition can occurred. Because if a thread is changing the value of variable/resource/memory ...
To display current version, we can use VERSION from @angular/core package. import { Component, VERSION } from '@angular/core'; @Component({ selector: 'my-app', template: `<h1>Hello {{name}}</h1> <h2>Current Version: {{ver}}</h2> `, }) export class AppCompone...
Download Play! 1. Goto http://www.playframework.com/download and download latest Play! release (play-2.5.X.zip at the time of this writing). Unzip in a directory of your choice. We’ll refer to uncompressed folder directory as PLAY_HOME. Add PLAY_HOME folder to you PATH environment variable, so that...
If you haven't already lets simply start this file of with: class HelloWorldLeftAndMain extends LeftAndMain { } Configure The first thing you should do, is define the $url_segment that will be used to access the interface, and the title ($menu_title) that will appear in the side navigation m...
If you have a cmake module . You can create a folder called in to store all config files. For example,you have a project called FOO, you can create a FOO_config.h.in file like: //=================================================================================== // CMake configuration file, base...

Page 14 of 21