Tutorial by Examples: dc

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...
When you manually write your performance scripts, you need to deal with correlation yourself. But there is another option to create your scripts - automation scripts recording. On the one hand, the manual approach helps your write structured scripts and you can add all the required extractors at the...
//check if there is actually a file being uploaded if (FileUpload1.HasFile) { //load the uploaded file into the memorystream using (MemoryStream stream = new MemoryStream(FileUpload1.FileBytes)) using (ExcelPackage excelPackage = new ExcelPackage(stream)) { //loop all ...
K-fold cross-validation is a systematic process for repeating the train/test split procedure multiple times, in order to reduce the variance associated with a single trial of train/test split. You essentially split the entire dataset into K equal size "folds", and each fold is used once fo...
After installing Visual studio code configure .net core and C#. Configure C# based on market-place. Reference Url: C# market place .net core Launch Visual studio code. Press [ctrl + P] paste "ext install csharp" this and hit. Once done above steps , C# extension available i...
Button API provides an easy way to assign common keyboard shortcuts to buttons without the need to access accelerators' list assigned to Scene or explicitly listening to the key events. Namely, two convenience methods are provided: setDefaultButton and setCancelButton: Setting setDefaultButton ...
The underlying example is just the one given in the official pyspark documentation. Please click here to reach this example. # the first step involves reading the source text file from HDFS text_file = sc.textFile("hdfs://...") # this step involves the actual computation for reading...
Executable C++ program code is usually produced by a compiler. A compiler is a program that translates code from a programming language into another form which is (more) directly executable for a computer. Using a compiler to translate code is called compilation. C++ inherits the form of its compi...
RTE { classes { btn-lg { name = Button (large) requires = btn btn-default } btn-default { name = Button (default) requires = btn } } default { buttons.link.properties.class.allowedClas...
<?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://api.dropboxapi.com/2/files/list_folder"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CAINFO, "cacert.pem"); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOP...
There are several ways interact with an Xml file. Xml Document XDocument XmlReader/XmlWriter Before LINQ to XML we were used XMLDocument for manipulations in XML like adding attributes, elements and so on. Now LINQ to XML uses XDocument for the same kind of thing. Syntaxes are much easie...
g + geom_bar(mapping = aes(x = cut, fill = clarity), position = "dodge") + theme(axis.text = element_text(colour = "red", size = 12))
Main Component File: //our root app component import {Component, NgModule, ViewChild, ViewContainerRef, ComponentFactoryResolver, ComponentRef} from '@angular/core' import {BrowserModule} from '@angular/platform-browser' import {ChildComponent} from './childComp.ts' @Component({ selector: ...
Dockerize zookeeper-3.4.6 Create a Dockerfile: ####################################################### # Image: img.reg.3g:15000/zookeeper:3.4.6 ####################################################### FROM img.reg.3g:15000/jdk:1.7.0_67 MAINTAINER [email protected] USER root ENV ZO...
In many examples, you will find a service id like 'acme.demo.service.id' (a string with dots). You services.yml will look like this: services: acme.demo.service.id: class: Acme\DemoBundle\Services\DemoService arguments: ["@doctrine.orm.default_entity_manager", &quot...
Let's say we want to eliminate duplicated subsequence element from a string (it can be more than one). For example: 2,14,14,14,19 and convert it into: 2,14,19 Using gsub, we can achieve it: gsub("(\\d+)(,\\1)+","\\1", "2,14,14,14,19") [1] "2,14,19" ...
//This example gets the response from iTunes { "rest": { "name": "rest", "connector": "rest", "debug": true, "options": { "useQuerystring": true, "timeout": 10000, "headers": { "accepts": "application/json", "content-type": "applicati...
BFS can be used to find the connected components of an undirected graph. We can also find if the given graph is connected or not. Our subsequent discussion assumes we are dealing with undirected graphs.The definition of a connected graph is: A graph is connected if there is a path between every p...
Starting with VHDL 2008, a comment can also extend on several lines. Multi-lines comments start with /* and end with */. Example : /* This process models the state register. It has an active low, asynchronous reset and is synchronized on the rising edge of the clock. */ process(clock, ...

Page 24 of 28