Tutorial by Examples: ae

Asymmetric encryption has the advantage that a message can be encrypted without exchanging a secret key with the recipient of the message. The sender merely needs to know the recipients public key, this allows encrypting the message in such a way that only the designated recipient (who has the corre...
Open the file App_Start/WebApiConfig.cs. Add the following using statements: using ProductService.Models; using System.Web.OData.Builder; using System.Web.OData.Extensions; Then add the following code to the Register method: public static class WebApiConfig { public static void Register...
The next example can be used to determine whether a enumeration has the FlagsAttribute specified. The methodology used is based on Reflection. This example will give a True result: Dim enu As [Enum] = New FileAttributes() Dim hasFlags As Boolean = enu.GetType().GetCustomAttributes(GetType(FlagsAt...
The next code illustrates how to find the nearest value of a Enum. First we define this Enum that will serve to specify search criteria (search direction) Public Enum EnumFindDirection As Integer Nearest = 0 Less = 1 LessOrEqual = 2 Greater = 3 GreaterOrEqual = 4 End Enum...
iptables -I INPUT -i docker0 -m addrtype --dst-type LOCAL -j DROP Blocks Access to host running docker daemon Does not block Container to container traffic Local LAN Internet Custom docker networks that doesn't use docker0
docker network create --subnet=192.168.0.0/24 --gateway=192.168.0.1 --ip-range=192.168.0.0/25 local-host-restricted iptables -I INPUT -s 192.168.0.0/24 -m addrtype --dst-type LOCAL -j DROP Creates a network called local-host-restricted which which: Blocks Access to host running docker daem...
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')
This can be done in 3 steps : You must define an elixir module which use Ecto.Repo and register your app as an otp_app. defmodule Repo do use Ecto.Repo, otp_app: :custom_app end You must also define some config for the Repo which will allow you to connect to the database. Here is an...
A daemon process executes a program in the background, usually without user interaction. The example below shows how to create a daemon and register a listener, which monitors all open applications. The main part is the function call NSRunLoop.mainRunLoop().run(), which starts the daemon. class MyO...
Big data is a term for data sets that are so large or complex that traditional data processing applications are inadequate to deal with them. Challenges include analysis, capture, data curation, search, sharing, storage, transfer, visualization, querying, updating and information privacy. A general...
Let's understand something. JavaEE consists of a number of specifications. When you install an Application Server (Payara for example), you install all of the specifications at once. For example there's a specification for an ORM called JPA (Java Persistence API), a specification to build Component ...
The iv is prefixed to the encrypted data aesCBC128Encrypt will create a random IV and prefixed to the encrypted code. aesCBC128Decrypt will use the prefixed IV during decryption. Inputs are the data and key are Data objects. If an encoded form such as Base64 if required convert to and/or from in ...
The iv is prefixed to the encrypted data aesCBC128Encrypt will create a random IV and prefixed to the encrypted code. aesCBC128Decrypt will use the prefixed IV during decryption. Inputs are the data and key are Data objects. If an encoded form such as Base64 if required convert to and/or from in ...
Func<int, int> add1 = i => i + 1; Func<int, int, int> add = (i, j) => i + j; // Behaviourally equivalent to: int Add1(int i) { return i + 1; } int Add(int i, int j) { return i + j; } ... Console.WriteLine(add1(42)); //43 Console.WriteLine(Add1(42));...
// assume source is {0, 1, 2, ..., 10} var evens = source.Where(n => n%2 == 0); // evens = {0, 2, 4, ... 10} var strings = source.Select(n => n.ToString()); // strings = {"0", "1", ..., "10"}
Expression<Func<int, bool>> checkEvenExpression = i => i%2 == 0; // lambda expression is automatically converted to an Expression<Func<int, bool>>
uses the Java Client library /** * 1. Execute a Metadata Request * An application can request columns data by calling the list method on the Analytics service object. * The method requires an reportType parameter that specifies the column data to retrieve. * For example, the following code ...
To setup JVM options inside elastic beanstalk, your bundle file must be like this: -bundle.zip |--.ebextensions //do not forget the dot at the beginning of the name |--jvm.config |--java_app.jar And, the jvm.config file must be set like this: option_settings: ...
using System; using System.IO; using System.Security.Cryptography; namespace Aes_Example { class AesExample { public static void Main() { try { string original = "Here is some data to encrypt!"; ...
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[]) { /...

Page 3 of 5