Skip to content

Instantly share code, notes, and snippets.

View AndersonChoi's full-sized avatar
🇰🇷
안녕하세요

AndersonChoi AndersonChoi

🇰🇷
안녕하세요
View GitHub Profile
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@AndersonChoi
AndersonChoi / mongodb-getting-started.md
Last active October 30, 2018 06:10
MongoDB getting started

MongoDB

Introduce this document

C++로 작성된 오픈소스 문서지향적 Cross-platform 데이터베이스인 mongodb의 명령어를 모은 document입니다.

Database 조회/생성/삭제

DB 생성하기

$ use testdb
@AndersonChoi
AndersonChoi / kafka-cheat-sheet.md
Last active September 21, 2018 06:17 — forked from ursuad/kafka-cheat-sheet.md
Quick command reference for Apache Kafka

Kafka 2.0.0 Cheat Sheet

Kafka Topics

List existing topics

./kafka-topics --zookeeper localhost:2181 --list

Describe a topic

./kafka-topics --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

./kafka-topics --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

@AndersonChoi
AndersonChoi / Main.java
Created September 28, 2017 08:33
java 8 stream으로 join을 걸어서 추출하기
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class Main{
public static void main(String []args){
System.out.println("Hello World");
<?xml version = "1.0" encoding = "UTF-8"?>
<beans xmlns = "http://www.springframework.org/schema/beans"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!-- 간단한 bean 설정 -->
<bean id = "..." class = "...">
package com.company;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.IntSummaryStatistics;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
import java.util.Map;
public class Main {
class NewBook extends AbstractBook{
private final int code=2;
private final int point=800;
}
class ChildBook extends AbstractBook{
private final int code=1;
private final int point=1000;
}
abstract class AbstractBook implements Book{
public int priceCode(){
return this.code;
}
public int getPointPercent(){
return this.point;
}
class NewBook implements Book{
private final int code=2;
private final int point=800;
@Override
public int priceCode(){
return this.code;
}
@Override
public int getPointPercent(){