- kafkacat commands
docker run -d --name=landoop -p 127.0.0.1:8081-8083:8081-8083 -p 127.0.0.1:9581-9585:9581-9585 -p 127.0.0.1:9092:9092 -p 127.0.0.1:3030:3030 -p 127.0.0.1:2181:2181 -e ADV_HOST=127.0.0.1 landoop/fast-data-dev
var express = require('express'); | |
var app = express.createServer(); | |
var Client, https, querystring; | |
https = require('https'), | |
querystring = require('querystring'); | |
app.get('/', function(req, res) { | |
//res.send('Hello World'); |
// Common modules | |
var util = require('util'); | |
var events = require('events'); | |
var http = require('http'); | |
var url = require('url'); | |
var fs = require('fs'); | |
var zlib = require('zlib'); | |
// Simple HTTP server | |
var s = http.createServer(function (request, response) { |
<h1>Alert</h1> | |
<p>Bootstrap JS</p> | |
<div class="alert fade in"> | |
<button type="button" class="close" data-dismiss="alert">×</button> | |
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good. | |
</div> | |
<p></p><a ng-click="alert=true">Open Alert (AngularJS)</a></p> | |
<div class="alert fade" ng-class="{in:alert}"> | |
<button type="button" class="close" ng-click="alert=false">×</button> |
//This is my note for Java Collection Framework course taught by John. | |
//Original credit: John from caveofprogramming.com | |
//All of his videos can be found in youtube.com | |
/**--------------------------------- | |
| 1. ArrayList | |
| | |
*/--------------------------------- | |
1. | |
-ArrayList class implements the class that is expandable. |
package com.golonzovsky.streams; | |
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import org.junit.Before; | |
import org.junit.Test; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.time.Year; |
docker run -d --name=landoop -p 127.0.0.1:8081-8083:8081-8083 -p 127.0.0.1:9581-9585:9581-9585 -p 127.0.0.1:9092:9092 -p 127.0.0.1:3030:3030 -p 127.0.0.1:2181:2181 -e ADV_HOST=127.0.0.1 landoop/fast-data-dev
public class Calculator { | |
interface IntegerMath { | |
int operation(int a, int b); | |
} | |
public int operateBinary(int a, int b, IntegerMath op) { | |
return op.operation(a, b); | |
} | |
Runnable thingy = new Runnable() { | |
public void run() { | |
System.out.println("Annonymous class"); | |
} | |
} | |
somethingElse(thingy); |
@java.lang.FunctionalInterface | |
interface Math | |
{ | |
public int calc(int a, int b); | |
} | |
public class LambdaExample | |
{ | |
public static void main(String[] args) { | |
// define your function |
interface Caps { | |
public String capitalize(String name); | |
} | |
@Koan | |
public void simpleLambda() { | |
Caps caps = (String n) -> { | |
return n.toUpperCase(); | |
}; | |
String capitalized = caps.capitalize("James"); |