Skip to content

Instantly share code, notes, and snippets.

View ZenLiuCN's full-sized avatar
🎯
Focusing

Zen Liu ZenLiuCN

🎯
Focusing
  • China Sichuan
View GitHub Profile

Common Maven Config properties

File Encode

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

Java Versions

<java.version>1.8</java.version>

1.8

package tester;
import io.protostuff.LinkedBuffer;
import io.protostuff.ProtostuffIOUtil;
import io.protostuff.Schema;
import io.protostuff.runtime.DefaultIdStrategy;
import io.protostuff.runtime.IdStrategy;
import io.protostuff.runtime.RuntimeSchema;
import lombok.SneakyThrows;
import lombok.ToString;
rm -rf .idea/ && find . -name "*.iml" -type f -delete
import org.junit.jupiter.api.Test;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import java.util.Optional;
import java.util.concurrent.TimeUnit;

Just other common useable DDD like design pattern

layers

This will describe from inner to outter , from lower to higher

layers of application

  1. Infrastructure should not depend on other layer except implement some port in core
@ZenLiuCN
ZenLiuCN / ANLTR4.md
Created April 16, 2020 15:36
ANLTR4

ANTLR

ANTLR是什么

ANTLR (ANother Tool for Language Recognition)是一项开源的java编写的语法/词法分析器套件.

通过ANTLR可以生成语法处理器来对进行文本或二进制文件进行解析处理.

ANTLR由定义语法,编译工具和运行时库组成.

package main
import (
"net/http"
"os"
"path/filepath"
"log"
)
func main() {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.