Tutorial by Examples: l

The export tool exports a set of files from HDFS back to an RDBMS. The target table must already exist in the database. The input files are read and parsed into a set of records according to the user-specified delimiters. Example : sqoop export \ --connect="jdbc:<databaseconnector>&quo...
Send a Razor part to a @helper, for example a HTML div. @helper WrapInBox(Func<Object, HelperResult> content) { <div class="box">@content(null) </div> } //call @WrapInBox(@<div> I'm a inner div </div>)
@Helpers could be shared between views. They should be created in the folder App_Code @helper CreatePrimaryBootstrapButton(string label) { <button type="button" class="btn btn-primary">@label</button> } //call @MenuHelpers.CreatePrimaryBootstrapButton...
In this iText 5 example, we'll change the properties and the value of a text field: public void manipulatePdf(String src, String dest) throws DocumentException, IOException { PdfReader reader = new PdfReader(src); PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest)); ...
In this iText 7 example, we'll change the properties and the value of a text field: public void manipulatePdf(String src, String dest) throws IOException { PdfReader reader = new PdfReader(src); PdfDocument pdf = new PdfDocument(reader, new PdfWriter(dest)); PdfAcroForm form = PdfA...
To show you how work the views, we will assume that we want to query the document of type people. To do so, we will first need a design document that will hold our views. Note: for the purpose of the example, we will use many views inside of 1 design document. Therefore, in a production environment...
Real Number Basics - 6.0; val it = 6.0 : real - ~6.0; val it = ~6.0 : real - 6.0 + ~6.0; val it = 0.0 : real - 6.0 / 3.0; val it = 2.0 : real - 4.0 / 6.0; val it = 0.666666666667 : real Real Value Bounds Using Real Basis Library Functions - Real.maxFinite; val it = 1.79769313486E308 ...
Rounding Values midway between two integers go toward the nearest even value. - round(4.5); val it = 4 : int - round(3.5); val it = 4 : int Truncation val it = 4 : int - trunc(4.5); val it = 4 : int - trunc(3.5); val it = 3 : int Floor and Ceiling - ceil(4.5); val it = 5 : int - f...
- real(6); val it = 6.0 : real
Standard ML doesn't have built-in support for lazy evaluation. Some implementations, notably SML/NJ, have nonstandard lazy evaluation primitives, but programs that use those primitives won't be portable. Lazy suspensions can also be implemented in a portable manner, using Standard ML's module system...
JavaFX has a binding API, which provides ways of binding one property to the other. This means that whenever one property's value is changed, the value of the bound property is updated automatically. An example of simple binding: SimpleIntegerProperty first =new SimpleIntegerProperty(5); //create a...
Installation Additional dependencies are required for Redis support. Install both Celery and the dependencies in one go using the celery[redis] bundle: $ pip install -U celery[redis] Configuration Configure the location of your Redis database: BROKER_URL = 'redis://localhost:6379/0' The UR...
Case 1: While using in the place of method arguments. If a method requires an object of wrapper class as argument.Then interchangeably the argument can be passed a variable of the respective primitive type and vice versa. Example: int i; Integer j; void ex_method(Integer i)//Is a valid statem...
For larger command line programs, using std::env::args() is quite tedious and difficult to manage. You can use clap to handle your command line interface, which will parse arguments, generate help displays and avoid bugs. There are several patterns that you can use with clap, and each one provides ...
To list available login shells : cat /etc/shells Example: $ cat /etc/shells # /etc/shells: valid login shells /bin/sh /bin/dash /bin/bash /bin/rbash
Say you have a Parent class and a Child class. To construct a Child instance always requires some Parent constructor to be run at the very gebinning of the Child constructor. We can select the Parent constructor we want by explicitly calling super(...) with the appropriate arguments as our first Chi...
This is same as reading a manual for a command: man /path/to/man/file
Simple way to share a message or link, copy text to clipboard, or open a browser in any Xamarin or Windows app. Available on NuGet : https://www.nuget.org/packages/Plugin.Share/ XAML <StackLayout Padding="20" Spacing="20"> <Button StyleId="Text" Text...
Spring Boot is a bootstrapping framework for Spring applications. It has seamless support for integrating with Jersey also. One of the advantages of this (from the perspective of a Jersey user), is that you have access to Spring's vast ecosystem. To get started, create a new standalone (non-wepapp)...
GNU make This pairmap function takes three arguments: A function name First space-separated list Second space-separated list For each zipped tuple in the lists it will call the function with the following arguments: Tuple element from the first list Tuple element from the second list ...

Page 597 of 861