Tutorial by Examples

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...
The EntityType enum represents all the entities from Bukkit/Spigot. All its values can be found below. ValueDescriptionAREA_EFFECT_CLOUDN/AARMOR_STANDMechanical entity with an inventory for placing weapons / armor into.ARROWAn arrow projectile; may get stuck in the ground.BATN/ABLAZEN/ABOATA place...
Entities can have passengers. A good example of a passenger is a Player riding a saddled pig, or a zombie inside a minecart. Although there are specific vehicles, any entity can be a vehicle for any other entity with the SetPassenger method. Entity vehicle; Entity passenger; boolean result = veh...
To retrieve a list of nearby entities of an entity, one can use List<Entity> nearby = entity.getNearbyEntities(double x, double y, double z); Bukkit will then calculate a bounding box centered around entity, having as parameters: x: 1/2 the size of the box along x axis y: 1/2 the size ...
Python allows you to hack list comprehensions to evaluate conditional expressions. For instance, [value_false, value_true][<conditional-test>] Example: >> n = 16 >> print [10, 20][n <= 15] 10 Here n<=15 returns False (which equates to 0 in Python). So what Python i...
SystemJS allows to write and use modular javacsript code that relies on ECMAScript 6 import and export statements. One good example is moment.js library, which started publishing ECMAScript 6 source code on npm since 2.10.0 release of moment.js. Installing prerequisites npm install moment npm ins...
var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var app = express(); app.use(favicon(__dirname + '/public/img/favicon.ico')); app.use(express.static(path.join(__dirname, 'public'))); app.listen(3000, function() { console.log("...
var express = require('express'); var app = express(); var router = express.Router(); app.route('/user') .get(function (req, res) { res.send('Get a random user') }) .post(function (req, res) { res.send('Add a user') }) .put(function (req, res) { res.send...
The recommended approach would be to avoid doing so and rather use IOptions<TOptions> and IServiceCollection.Configure<TOptions>. That said, this is still pretty straightforward to make IConfigurationRootavailable application wide. In the Startup.cs constructor you should have the foll...
Install Java 8 from the Oracle website. (Optional) Install a Java build tool. Whether you choose to use Maven or Gradle, you normally don’t have to install anything, as JHipster will automatically install the Maven Wrapper or the Gradle Wrapper for you. If you don’t want to use those wrappers, ...
public class TestngAnnotation { // test case 1 @Test public void testCase1() { System.out.println("in test case 1"); } // test case 2 @Test public void testCase2() { System.out.println("in test case 2"); } @BeforeMethod pu...
The simplest and cleanest way to add an external configuration is through a separate Gradle file build.gradle apply from: './keystore.gradle' android{ signingConfigs { release { storeFile file(keystore.storeFile) storePassword keystore.storePassword ...
Emission is when a surface (or rather a material) emits light. In the inspector panel for a material on a static object using the Standard Shader there is an emission property: If you change this property to a value higher than the default of 0, you can set the emission color, or assign an emissi...
To debug a server instance, start in debug mode. To do so, configure these parameters to be passed to the server: -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n to setenv.bat(Windows) or setenv.sh(Unix) These initialize the server in debug mode, and listen for debug reque...
Using more than one theme in your Android application, you can add custom colors to every theme, to be like this: First, we have to add our themes to style.xml like this: <style name="OneTheme" parent="Theme.AppCompat.Light.DarkActionBar"> </style> <!--...
Obtaining the Android API Key : First you'll need to get the SHA-1 fingerprint on your machine using java keytool. Execute the below command in cmd/terminal to get the SHA-1 fingerprint. keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android...
If you want an avatar to appear on the card, use the <md-card-avatar> directive, which must be placed within the <md-card-header> directive. The <md-card-avatar> directive accepts an <img /> tag. Optional: .md-user-avatar, which makes the <img /> tag have a circle look...
<macrodef name = "git"> <attribute name = "command" /> <attribute name = "dir" default = "" /> <element name = "args" optional = "true" /> <sequential> <echo message = "git ...
<git command="clone"> <args> <arg value = "-v" /> <arg value = "git@YOURGITURL:GITUSER/GITREPO" /> <arg value = "repo" /> </args> </git>

Page 1029 of 1336