Tutorial by Examples: e

Required Namespace: System.Security.Cryptography private class Encryption { private const string SecretKey = "topSecretKeyusedforEncryptions"; private const string SecretIv = "secretVectorHere"; public string Encrypt(string data...
npm --install express-generator -g
The result of casting a pointer to an integer using reinterpret_cast is implementation-defined, but "... is intended to be unsurprising to those who know the addressing structure of the underlying machine." int x = 42; int* p = &x; long addr = reinterpret_cast<long>(p); std::...
PROGRAM zhello_world. CLASS main DEFINITION FINAL CREATE PRIVATE. PUBLIC SECTION. CLASS-METHODS: start. ENDCLASS. CLASS main IMPLEMENTATION. METHOD start. cl_demo_output=>display( 'Hello World!' ). ENDMETHOD. ENDCLASS. START-OF-SELECTION. main=>start( ).
this topic is a classical issue in iOS development, and its solution is various as other example already shown. In this example I'll show another daily common use one: passing data using closure by adapting delegate pattern example on this page into callback closure! one thing this method is superi...
Store data in SEQUENCEFILE if the data needs to be compressed. You can import text files compressed with Gzip or Bzip2 directly into a table stored as TextFile. The compression will be detected automatically and the file will be decompressed on-the-fly during query execution. CREATE TABLE raw_seque...
Parquet columnar storage format in Hive 0.13.0 and later. Parquet is built from the ground up with complex nested data structures in mind, and uses the record shredding and assembly algorithm described in the Dremel paper. We believe this approach is superior to simple flattening of nested name spac...
To enable - type: :set number or :set nu. To disable - type: :set nonumber or :set nonu. To enable enumerating relative to the cursor location - type: :set relativenumber. To disable enumerating relative to the cursor location - type: :set norelativenumber. Note: To change whether the curren...
Using dotnet new will scaffold a new console application. To scaffold other types of projects, use the -t or --type flag: dotnet new -t web dotnet restore dotnet run The available templates vary by language. C# Templates console (default) - A console application. web - An ASP.NET Core app...
By default, dotnet new creates C# projects. You can use the -l or --lang flag to scaffold projects in other languages: dotnet new -l f# dotnet restore dotnet run Currently, dotnet new supports C# and F#.
To create a NuGet package from a project, run this command from a directory that contains project.json: dotnet pack The resulting .nupkg file will be named and versioned according to the properties in project.json. If there are multiple frameworks targeted in the project file, the package will s...
Running dotnet test from inside a folder that contains a test project will launch the test runner. The test runner will discover and run the tests in the project. To be compatible with dotnet test, the project.json file must contain a testRunner property and a dependency on a compatible test runner...
Command line scripts inside python packages are common. You can organise your package in such a way that when a user installs the package, the script will be available on their path. If you had the greetings package which had the command line script hello_world.py. greetings/ greetings/ ...
If you don't need automatically generated apk files with unaligned suffix (which you probably don't), you may add the following code to build.gradle file: // delete unaligned files android.applicationVariants.all { variant -> variant.assemble.doLast { variant.outputs.each { output ->...
C++11 threading primitives are still relatively low level. They can be used to write a higher level construct, like a thread pool: C++14 struct tasks { // the mutex, condition variable and deque form a single // thread-safe triggered queue of tasks: std::mutex m; std::condition_variab...
The Composite pattern is a design pattern that allows to treat a group of objects as a single instance of an object. It is one of the Gang of Four's structural design patterns. Example below demonstrate how Composite can be used to log to multiple places using single Log invocation. This approach a...
Facade is structural design pattern. It hides the complexities of large system and provides a simple interface to client. Client uses only Facade and it's not worried about inter dependencies of sub-systems. Definition from Gang of Four book: Provide a unified interface to a set of interfaces i...
As of Java 8, there are default methods on the Map.Entry interface to allow sorting of map iterations. Java SE 8 Map<String, Integer> numberOfEmployees = new HashMap<>(); numberOfEmployees.put("executives", 10); numberOfEmployees.put("human ressources", 32); numb...
MySQL provides the following arithmetic operators OperatorNameExample+AdditionSELECT 3+5; -> 8 SELECT 3.5+2.5; -> 6.0 SELECT 3.5+2; -> 5.5-SubtractionSELECT 3-5; -> -2*MultiplicationSELECT 3 * 5; -> 15/DivisionSELECT 20 / 4; -> 5 SELECT 355 / 113; -> 3.1416 SELECT 10.0 / 0; -...

Page 540 of 1191