Skip to content

Instantly share code, notes, and snippets.

View jackblack369's full-sized avatar
🚀
get started

Dongwei jackblack369

🚀
get started
View GitHub Profile
@jackblack369
jackblack369 / stack overflow.md
Last active December 18, 2018 09:18
stack overflow

stack overflow

  • Any suggestions or links would be appreciated.
  • Any sort of help please?
  • Thanks for any tips to solve this.
@jackblack369
jackblack369 / Java Concept of The Day.md
Last active June 23, 2024 20:01
[learn-Java Concept of The Day] #java #website
  • Stack is used only for execution purpose. Heap is used for storage purpose.

Non-Static Members And Their Memory Management In Java

  • Non-Static variables and Non-Static methods are non-static components of a class. These are also called instance components of a class. Non-static components are stored inside the object memory. Each object will have their own copy of non-static components. But, static components are common to all objects of that class.

IIB-Instance Initialization Block

  • IIB is used to initialize instance variables or non-static variables.
  • IIB blocks will not be called from the constructor in which this() statement is written as a first statement.

super and this keywords in java

  • super class constructor is called by super() calling statement. You can’t use super() calling statement outside the constructor. By default, super() calling statement is the first statement in any constructor.
  • this() is the calling statement to same class constructor. It must be used within constr
@jackblack369
jackblack369 / tips.md
Last active February 15, 2019 08:40
idea

子类中构造函数中的super(参数),是初始化父类的操作,如果父类无有参构造器,则在子类的构造器中,默认添加的是super()(可省略不写)


线程中需要while(true),这是线程执行过程的标识,否则没有while语句,那就是执行一次的普通方法了


google guava的工具包,貌似是在apache commons工具包基础之上开发的


线程池是为了 ​ 折中 ​ 单个线程执行任务 或 无限制的创建线程进行执行任务 的两个极端情况 的 执行策略 ​

@jackblack369
jackblack369 / image.md
Last active December 20, 2018 09:49
[funny] #image

@jackblack369
jackblack369 / Temp1.java
Created December 19, 2018 05:51
temp snippet
class A
{
int nonStaticVariable;
static int staticVariable;
static void staticMethod()
{
System.out.println(staticVariable);
// System.out.println(nonStaticVariable);
}
@jackblack369
jackblack369 / mybatis jdbcType.md
Last active December 20, 2018 02:32
[mybatis reference] some snippet about mybatis #mybatis
  • about date jdbcType
    #{beginDate,jdbcType=DATE} (no time of the day), or
    #{beginDate,jdbcType=TIMESTAMP} (if you need to include the time of the day).
    

And the Java parameter you want to apply should be of type:

java.sql.Date (date without time)
java.sql.Timestamp (timestamp)
@jackblack369
jackblack369 / code-time.java
Last active February 22, 2019 04:38
[code-time] #java snippet
//date format
import org.apache.commons.lang3.time.DateFormatUtils;
String timeStr = DateFormatUtils.format(dateDate,"yyyy-MM-dd HH:mm:ss");
Date dateTime = DateUtils.parseDate(dateTimeStr,"yyyy-MM-dd HH:mm:ss");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date dateWithoutTime = sdf.parse(sdf.format(new Date()));
//capitalize the first letter of word
String output = input.substring(0, 1).toUpperCase() + input.substring(1);
@jackblack369
jackblack369 / some words.md
Last active January 11, 2019 07:48
[some words form website perple] #word
  • In any case, measure, don't guess! Only a measurement will tell you if the parallelism is worth it or not.(stack overflow)
@jackblack369
jackblack369 / java idea.md
Last active February 15, 2019 03:06
[idea] #java idea
  • Spring provides three way of scheduling:
    • @Scheduled
    • Via Quartz
    • Via JDK Timer
@jackblack369
jackblack369 / tools.md
Last active January 24, 2019 09:40
[tools] #funny

磁力

magnet:?xt=urn:btih:

words

²³³³³³³  6666666666   厉害了23333   ²³³³³³³³³³³   2333   666666     ²³³  666  太牛了!!   ²³³³³³³  6666666   厉害了23333   ²³³³³³³³³³³   2333   6666     66666   ²³³³³³³  6666666         ²³³³³³³  6666666666   厉害了2333

排序

α 阿尔法, β 贝塔, γ 伽玛,δ 德尔塔, ε 伊普西隆, ζ 泽塔, η 伊塔, θ 西塔, ι 约塔, κ 卡帕, λ 兰姆达,μ 米欧 ,ν 纽, ξ 克西, ο 欧米克隆, π 派, ρ 柔 ,σ 西格玛, τ 陶 ,υ 玉普西隆, φ 弗爱, χ 凯, ψ 普赛