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 ...
{"AF":"AFG","AX":"ALA","AL":"ALB","DZ":"DZA","AS":"ASM","AD":"AND","AO":"AGO","AI":"AIA","AQ":"ATA","AG":"ATG","AR":"ARG","AM":"ARM","AW":"ABW","SH":"SHN","AU":"AUS","AT":"AUT","AZ":"AZE","BS":"BHS","BH":"BHR","BD":"BGD","BB":"BRB","BY":"BLR","BE":"BEL","BZ":"BLZ","BJ":"BEN","BM":"BMU","BT":"BTN","BO":"BOL","BQ":"BES","BA":"BIH","BW":"BWA","BV":"BVT","BR":"BRA","IO":"IOT","VG":"VGB","BN":"BRN","BG":"BGR","BF":"BFA","BI":"BDI","KH":"KHM","CM":"CMR","CA":"CAN","CV":"CPV","KY":"CYM","CF":"CAF","TD":"TCD","CL":"CHL","CN":"CHN","CX":"CXR","CC":"CCK","CO":"COL","KM":"COM","CG":"COG","CD":"COD","CK":"COK","CR":"CRI","HR":"HRV","CU":"CUB","CW":"CUW","CY":"CYP","CZ":"CZE","DK":"DNK","DJ":"DJI","DM":"DMA","DO":"DOM","EC":"ECU","EG":"EGY","SV":"SLV","GQ":"GNQ","ER":"ERI","EE":"EST","ET":"ETH","FK":"FLK","FO":"FRO","FJ":"FJI","FI":"FIN","FR":"FRA","GF":"GUF","PF":"PYF","TF":"ATF","GA":"GAB","GM":"GMB","GE":"GEO","DE":"DEU","GH":"GHA","GI":"GIB","GR":"GRC","GL":"GRL","GD":"GRD","GP":"GLP","GU":"GUM","GT":"GTM","GG":"GGY", |
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 |