bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
public class PipedStreamExample { | |
public static void main(String[] args) throws IOException, InterruptedException { | |
final PipedInputStream pipedInputStream=new PipedInputStream(); | |
final PipedOutputStream pipedOutputStream=new PipedOutputStream(); | |
/*Connect pipe*/ | |
pipedInputStream.connect(pipedOutputStream); | |
/*Thread for writing data to pipe*/ |
import com.fasterxml.jackson.annotation.JsonProperty | |
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper | |
fun main(args: Array<String>) { | |
// val mapper = ObjectMapper().registerModule(KotlinModule()) | |
// val mapper = ObjectMapper().registerKotlinModule() | |
val mapper = jacksonObjectMapper() | |
val writer = mapper.writerWithDefaultPrettyPrinter() | |
val json1 = writer.writeValueAsString(Data1(1, "Foo", "Bar")) |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
// Note: only for modern browser | |
import axios from 'axios' | |
// helper function: generate a new file from base64 String | |
const dataURLtoFile = (dataurl, filename) => { | |
const arr = dataurl.split(',') | |
const mime = arr[0].match(/:(.*?);/)[1] | |
const bstr = atob(arr[1]) | |
let n = bstr.length | |
const u8arr = new Uint8Array(n) |
<style> | |
input[type="file"]{ | |
position: absolute; | |
top: -500px; | |
} | |
div.file-listing{ | |
width: 200px; | |
} |
{ | |
"@context": [ | |
{ | |
"@vocab": "http://www.w3.org", | |
"label": "/2000/01/rdf-schema#label", | |
"comment": "/2000/01/rdf-schema#comment", | |
"prefLabel": "/2004/02/skos/core#prefLabel", | |
"altLabel": "/2004/02/skos/core#altLabel", | |
"prev": {"/1999/xhtml/vocab#prev": "@iri"}, |
A simple App using Vue.js & Firebase with Auth.
See the DEMO.
package com.usehomeroom.vasuki.data; | |
import com.fasterxml.jackson.core.type.TypeReference; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fernandocejas.arrow.optional.Optional; | |
import com.google.firebase.database.DataSnapshot; | |
import com.google.firebase.database.DatabaseError; | |
import com.google.firebase.database.DatabaseReference; | |
import com.google.firebase.database.FirebaseDatabase; | |
import com.google.firebase.database.ValueEventListener; |
// Foundation and Chosen CSS Merger | |
// ZURB Foundation v5 - Harvest Chosen v1.1 | |
// Add to the bottom of foundation_and_overrides.scss: `@import 'foundation-chosen';` | |
$chosen-form-spacing: $form-spacing / 4 + rem-calc(1) | |
$chosen-input-height: ($input-font-size + ($form-spacing * 1.5) - rem-calc(1)) | |
$chosen-input-height-multi: ($input-font-size + ($form-spacing * 1.5) - rem-calc(5)) | |
$chosen-border-radius: 0 | |
$chosen-highlighted: $primary-color |
// Foundation and Chosen CSS Merger | |
// ZURB Foundation v5 - Harvest Chosen v1.1 | |
// Add to the bottom of foundation_and_overrides.scss: `@import 'foundation-chosen';` | |
$chosen-form-spacing: $form-spacing / 4 + rem-calc(1) | |
$chosen-input-height: ($input-font-size + ($form-spacing * 1.5) - rem-calc(1)) | |
$chosen-input-height-multi: ($input-font-size + ($form-spacing * 1.5) - rem-calc(5)) | |
$chosen-border-radius: 0 | |
$chosen-highlighted: $primary-color |