This is the sequence of steps to follow to create a root gh-pages
branch. It is based on a question at [SO]
cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
One | Many | |
---|---|---|
Synchronous | T/Try[T] | Iterable[T] |
Asynchronous | Future[T] | Observable[T] |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This topic applies to .NET Core Tools Preview 2 and Visual Studio 2015.
First of all ensure that you have all required tools installed -- Installation
boilerplate
solution we have 3 projects in
src
folder, corresponding to
Fibonacci
,
Primes
andpackage com.example.readFile.readFileJava; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.time.Duration; | |
import java.time.Instant; | |
import java.util.ArrayList; | |
import java.util.Collections; |
I would love if Java has given consistent names for the same operations among these types:
Stream<T> (S<T> ) |
Optional<T> (O<T> ) |
CompletableFuture<T> (CF<T> ) |
---|---|---|
void forEach(Consumer<T>) |
void ifPresent(Consumer<T>) |
CF<Void> thenAccept(Consumer<T>) |
S<R> map(Function<T, R>) |
O<R> map(Function<T, R>) |
CF<R> thenApply(Function<T, R>) |
S<R> flatMap(Function<T, S<R>>) |
O<R> flatMap(Function<T, O<R>>) |
CF<R> thenCompose(Function<T, CF<R>>) |
S<T> peek(Consumer<T>) |
-- | CF<T> whenComplete(BiConsumer<T,Throwable>) |
S<R> zip(S<U>, BiFunction<T, U, R>) (*) |
-- | CF<R> thenCombine(CF<U>, BiFunction<T, U, R>) |
import swaggerUi = require('swagger-ui-express'); | |
import express = require('express'); | |
const app = express(); | |
const swaggerDocument = { | |
"swagger": "2.0", | |
"info": { | |
"title": "Blah", | |
"description": "", | |
"version": "1.0" |