Posts by Tag

Java

Java ConcurrentHashMap

1 minute read

ConcurrentHashMap is designed to support concurrent access from multiple threads without the need for external synchronization. It achieves this by using var...

Java Features By Version

1 minute read

Java 8 https://www.oracle.com/java/technologies/javase/8-whats-new.html Functional Interfaces and Lambda Expressions Default and static metho...

Lesson Learned - Java Timer

1 minute read

Issue When you use Java Timer (java.util.Timer) to set a task for future execution, you should be really careful. Java Timer use currentTimeMillis, which wi...

Java SE: Programming Complete - 8

1 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Arrays and Loops Arrays An array is a fixed-length collection of eleme...

Java SE: Programming Complete - 7

2 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Interface Java Interface An interface defines a set of features that c...

Java SE: Programming Complete - 6

3 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Inheritance Extend Classes java.lang.Object is an ultimate paraent of ...

Java SE: Programming Complete - 5

2 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Improved Class Design Use Method Overloading Two or more methods, with...

Java SE: Programming Complete - 4

2 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Classes and Objects Designing Classes Description of the package that ...

Java SE: Programming Complete - 3

3 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Text, Date, Time and Numberic Objects String String is a class (not a ...

Java SE: Programming Complete - 2

1 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Primitive Types, Operators, and Flow Control Statements Whole Numbers ...

Java SE: Programming Complete - 1

less than 1 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Introduce to Java How Java Works Source code is plain text .java Com...

Java - Volatile or Synchronized

less than 1 minute read

Volatile There are two features when talking about thread-safe (Concurrency) Mutual Exclusion: It means that only one thread or process can execute a bl...

Java Unit Test: JUnit5

1 minute read

Source JUnit5 Basics JUnit 4 & 5 Annotations Lifecycle/Hook Points For JUnit5, it’s @BeforeAll @AfterAll and @BeforeEach...

Java - Lambda

1 minute read

Lambda Before Java SE 8, anonymous classes were typically used to pass functionality to a method. This practice obfuscated source code, making it harder to ...

Java Note

less than 1 minute read

Note for Advanced Java Programming Generics Generic method public <T> List<T> arrayToList(T[] array, List<T>) { for (T t : array...

Back to Top ↑

Certificate

Java SE: Programming Complete - 8

1 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Arrays and Loops Arrays An array is a fixed-length collection of eleme...

Java SE: Programming Complete - 7

2 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Interface Java Interface An interface defines a set of features that c...

Java SE: Programming Complete - 6

3 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Inheritance Extend Classes java.lang.Object is an ultimate paraent of ...

Java SE: Programming Complete - 5

2 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Improved Class Design Use Method Overloading Two or more methods, with...

Java SE: Programming Complete - 4

2 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Classes and Objects Designing Classes Description of the package that ...

Java SE: Programming Complete - 3

3 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Text, Date, Time and Numberic Objects String String is a class (not a ...

Java SE: Programming Complete - 2

1 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Primitive Types, Operators, and Flow Control Statements Whole Numbers ...

Java SE: Programming Complete - 1

less than 1 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Introduce to Java How Java Works Source code is plain text .java Com...

Back to Top ↑

OCP

Java SE: Programming Complete - 8

1 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Arrays and Loops Arrays An array is a fixed-length collection of eleme...

Java SE: Programming Complete - 7

2 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Interface Java Interface An interface defines a set of features that c...

Java SE: Programming Complete - 6

3 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Inheritance Extend Classes java.lang.Object is an ultimate paraent of ...

Java SE: Programming Complete - 5

2 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Improved Class Design Use Method Overloading Two or more methods, with...

Java SE: Programming Complete - 4

2 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Classes and Objects Designing Classes Description of the package that ...

Java SE: Programming Complete - 3

3 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Text, Date, Time and Numberic Objects String String is a class (not a ...

Java SE: Programming Complete - 2

1 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Primitive Types, Operators, and Flow Control Statements Whole Numbers ...

Java SE: Programming Complete - 1

less than 1 minute read

https://learn.oracle.com/ols/course/java-se-programming-complete/82508/85200 Introduce to Java How Java Works Source code is plain text .java Com...

Back to Top ↑

Android

Get Android Build Info from code

less than 1 minute read

You can get build info from android.os.Build class. But there are some informations are hidden, like IS_USERDEBUG etc.

AOSP Tips

1 minute read

Notes for https://youtu.be/NsqFOSzoYE8 Android SDK Search chrome plugin This is a very useful plugin when you checking Android document and source code...

Input Unicode Character by Adb

less than 1 minute read

Source https://stackoverflow.com/questions/14224549/adb-shell-input-unicode-character adb shell input doesn’t support unicode character, there is an ope...

Andriod Log

1 minute read

I was thinking how to use log on Android properly, and can control it without re-compile your app. Here is what I found. Long story for short, you should do...

Back to Top ↑

Tools

AOSP Tips

1 minute read

Notes for https://youtu.be/NsqFOSzoYE8 Android SDK Search chrome plugin This is a very useful plugin when you checking Android document and source code...

VSCode Plugins

less than 1 minute read

For All Purpose Partial Diff ★ ★ ★ ★ ★ Compare (diff) text selections within a file, across files, or to the clipboard Remote Development Pack ★ ★ ★ ★...

Ubuntu Powerline Setup

1 minute read

Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, fish, tmux, IPython, Awes...

Back to Top ↑

UML

PlantUML in VS Code

less than 1 minute read

Test #@startuml class ExampleClass { -mPrivate: String +mPublic : int #mProtected: boolean ~mDefault: float mNothing: long +void pu...

UML Quick Reference - Class Diagram

less than 1 minute read

Source https://www.visual-paradigm.com/guide/uml-unified-modeling-language/uml-class-diagram-tutorial/, Reference http://ifeve.com/uml-intro/ Class Diag...

Back to Top ↑

Concurrency

C++ Concurrency

4 minute read

https://www.youtube.com/watch?v=F6Ipn7gCOsY What is concurrency? Concurrency means doing two things concurrently — “running together.” Maybe you’re ...

Java - Volatile or Synchronized

less than 1 minute read

Volatile There are two features when talking about thread-safe (Concurrency) Mutual Exclusion: It means that only one thread or process can execute a bl...

Back to Top ↑

VSCode

PlantUML in VS Code

less than 1 minute read

Test #@startuml class ExampleClass { -mPrivate: String +mPublic : int #mProtected: boolean ~mDefault: float mNothing: long +void pu...

VSCode Plugins

less than 1 minute read

For All Purpose Partial Diff ★ ★ ★ ★ ★ Compare (diff) text selections within a file, across files, or to the clipboard Remote Development Pack ★ ★ ★ ★...

Back to Top ↑

Docker

Docker ENTRYPOINT vs CMD

1 minute read

Both ENTRYPOINT and CMD allow you to specify the startup command for an image, but there are subtle differences between them. There are many times where you’...

Back to Top ↑

Generics

Java Note

less than 1 minute read

Note for Advanced Java Programming Generics Generic method public <T> List<T> arrayToList(T[] array, List<T>) { for (T t : array...

Back to Top ↑

Log

Andriod Log

1 minute read

I was thinking how to use log on Android properly, and can control it without re-compile your app. Here is what I found. Long story for short, you should do...

Back to Top ↑

Lambda

Java - Lambda

1 minute read

Lambda Before Java SE 8, anonymous classes were typically used to pass functionality to a method. This practice obfuscated source code, making it harder to ...

Back to Top ↑

Game

Heroes 3 Tips

less than 1 minute read

兵种数量 几个(few):1-4 一些(sevral):5-9 一群(pack):10-19 许多(lots):20-49 很多(horde):50-99 大群(throng):100-249 大量(swarm):250-499 大批(zounds):500-999 无数(...

Back to Top ↑

Gradle

Output Gradle Test Result to Console

less than 1 minute read

Source https://stackoverflow.com/questions/3963708/gradle-how-to-display-test-results-in-the-console-in-real-time The gradle test output doesn’t make an...

Back to Top ↑

Adb

Input Unicode Character by Adb

less than 1 minute read

Source https://stackoverflow.com/questions/14224549/adb-shell-input-unicode-character adb shell input doesn’t support unicode character, there is an ope...

Back to Top ↑

Unit Test

Java Unit Test: JUnit5

1 minute read

Source JUnit5 Basics JUnit 4 & 5 Annotations Lifecycle/Hook Points For JUnit5, it’s @BeforeAll @AfterAll and @BeforeEach...

Back to Top ↑

Powerline

Ubuntu Powerline Setup

1 minute read

Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, fish, tmux, IPython, Awes...

Back to Top ↑

Proxy

Work Behind Proxy

1 minute read

Work Behind Proxy Many easy tasks can’t be easily done if you work behind proxy. Snap sudo snap set system proxy.http=http://<username>:<password...

Back to Top ↑

Network

Work Behind Proxy

1 minute read

Work Behind Proxy Many easy tasks can’t be easily done if you work behind proxy. Snap sudo snap set system proxy.http=http://<username>:<password...

Back to Top ↑

Tips

AOSP Tips

1 minute read

Notes for https://youtu.be/NsqFOSzoYE8 Android SDK Search chrome plugin This is a very useful plugin when you checking Android document and source code...

Back to Top ↑

C++

C++ Concurrency

4 minute read

https://www.youtube.com/watch?v=F6Ipn7gCOsY What is concurrency? Concurrency means doing two things concurrently — “running together.” Maybe you’re ...

Back to Top ↑

statistics

Statistics

less than 1 minute read

统计学 基本概念 正态分布 - 概率分布曲线,中间高,两边低,左右对称 描述正态分布的两个参数 峰值(平均值) - μ (miu) 标准差 - σ (sigema) 对于正态分布,无论 μ 和 σ 的值如何,都满足 68-95-99.7 法则,即 68%的数据会落在 μ±σ 区间,95%的数据...

Back to Top ↑

Lesson Learned

Lesson Learned - Java Timer

1 minute read

Issue When you use Java Timer (java.util.Timer) to set a task for future execution, you should be really careful. Java Timer use currentTimeMillis, which wi...

Back to Top ↑

Timer

Lesson Learned - Java Timer

1 minute read

Issue When you use Java Timer (java.util.Timer) to set a task for future execution, you should be really careful. Java Timer use currentTimeMillis, which wi...

Back to Top ↑

Shell

AWK 101

less than 1 minute read

Note for Learning Awk Is Essential For Linux Users download awk is a tool to process text, line by line. Variable $0 means whole line, $1 means the fi...

Back to Top ↑

awk

AWK 101

less than 1 minute read

Note for Learning Awk Is Essential For Linux Users download awk is a tool to process text, line by line. Variable $0 means whole line, $1 means the fi...

Back to Top ↑

certbot

Certbot on Oracle Cloud VM

2 minute read

Try to get a certificate from Let’s encrypt on Oracle’s compute instance (vm) with command certbot certonly --standalone but keeps getting error: Certbot fai...

Back to Top ↑

certificate

Certbot on Oracle Cloud VM

2 minute read

Try to get a certificate from Let’s encrypt on Oracle’s compute instance (vm) with command certbot certonly --standalone but keeps getting error: Certbot fai...

Back to Top ↑

cocurrentHashMap

Java ConcurrentHashMap

1 minute read

ConcurrentHashMap is designed to support concurrent access from multiple threads without the need for external synchronization. It achieves this by using var...

Back to Top ↑