Tutorial by Examples

Detailed instructions on getting simulink set up or installed.
ensure you have java 6 or above and that the JAVA_HOME environment variable is set. download the latest flink binary here: wget flink-XXXX.tar.gz If you don't plan to work with Hadoop, pick the hadoop 1 version. Also, note the scala version you download, so you can add the correct maven...
To run a flink program from your IDE(we can use either Eclipse or Intellij IDEA(preffered)), you need two dependencies:flink-java / flink-scala and flink-clients (as of february 2016). These JARS can be added using Maven and SBT(if you are using scala). Maven <dependency> <group...
This example is the same as WordCount, but uses the Table API. See WordCount for details about execution and results. Maven To use the Table API, add flink-table as a maven dependency: <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-table_2.11&...
Maven Add the dependencies flink-java and flink-client (as explained in the JVM environment setup example). The code public class WordCount{ public static void main( String[] args ) throws Exception{ // set up the execution environment final ExecutionEnvironment env = E...
This example is the same as WordCount, but uses the Table API. See WordCount for details about execution and results. Maven To use the Streaming API, add flink-streaming as a maven dependency: <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-str...
To use the Table API, add flink-table as a maven dependency (in addition to flink-clients and flink-core): <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-table_2.11</artifactId> <version>1.1.4</version> </dependency&gt...
Given the CSV file peoples.csv: 1,Reed,United States,Female 2,Bradley,United States,Female 3,Adams,United States,Male 4,Lane,United States,Male 5,Marshall,United States,Female 6,Garza,United States,Male 7,Gutierrez,United States,Male 8,Fox,Germany,Female 9,Medina,United States,Male 10,Nich...
In addition to peoples.csv (see simple aggregation from a CSV) we have two more CSVs representing products and sales. sales.csv (people_id, product_id): 19,5 6,4 10,4 2,4 8,1 19,2 8,4 5,5 13,5 4,4 6,1 3,3 8,3 17,2 6,2 1,2 3,5 15,5 3,3 6,3 13,2 20,4 20,2 products.csv (id, n...
A Table can be written to a TableSink, which is a generic interface to support different formats and file systems. A batch Table can only be written to a BatchTableSink, while a streaming table requires a StreamTableSink. Currently, flink offers only the CsvTableSink interface. Usage In the examp...
Once the sports2000 database has been installed it's time to run it as a standalone server (and not connect to it as a file). Start proenv (proenv in the startmeny on Windows or /usr/install-directory/bin/proenv on Linux/Unix). This example is from Windows. Linux is the same but you need to change...
Unlike other languages, Python doesn't have a do-until or a do-while construct (this will allow code to be executed once before the condition is tested). However, you can combine a while True with a break to achieve the same purpose. a = 10 while True: a = a-1 print(a) if a<7: ...
Pre-requisites: Java 7 Hadoop (Refer here for Hadoop Installation) Mysql Server and Client Installation: Step 1: Download the latest Hive tarball from the downloads page. Step 2: Extract the downloaded tarball (Assumption: The tarball is downloaded in $HOME) tar -xvf /home/username/apache...
How To Choose A Theme Each WordPress install comes with a pre-installed theme. You manage your themes from the Dashboard. Go to Appearance > Themes to install, preview, delete, activate, and update Themes. The current theme is found in the upper left corner of this menu. Hovering over the theme...
This method will create a new Excel Spreadsheet. Pass in the fileName which is a full file path name. using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; using System; .... void Create(string fileName) { using (Sp...
The subtypes' stream-oriented attributes are called to write objects to a file, bare and using binary default representations. with Ada.Streams.Stream_IO; procedure Main is type Fruit is (Banana, Orange, Pear); type Color_Value is range 0 .. 255; type Color is record R, G, B :...
Homebrew can be installed using the following command in the terminal: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" It runs as the current user; you don’t need to use sudo. The script can be viewed online and will print a summary of...
Reading in a single step: IFS=$'\n' read -r -a arr < file Reading in a loop: arr=() while IFS= read -r line; do arr+=("$line") done 4.0 Using mapfile or readarray (which are synonymous): mapfile -t arr < file readarray -t arr < file
The Pipe implementation import {Pipe, PipeTransform} from '@angular/core'; @Pipe({ name: 'orderBy', pure: false }) export class OrderBy implements PipeTransform { value:string[] =[]; static _orderByComparator(a:any, b:any):number{ if(a === null || typeof a === 'undefin...
app.component.html <div> <div> <div *ngFor="let user of users"> <button class="btn" [@buttonState]="user.active" (click)="user.changeButtonState()">{{user.firstName}}</button> <...

Page 1127 of 1336