Category: Dev

0

Gradle fundamentals

Build12gradle cleangradle build Run application1234567# add application pluginapply plugin 'application'# add main classmainClassName = 'com.mycompany.Main'gradle run

0

Agile

To what I understand about the agile methodology, it’s not about whether we stand up or not in the meeting, or what’s the name of the roles in the team. It’s about two things, the values/principles of

0

Design Patterns in JDK

Design Pattern Example in JDK Description Singleton Runtime (hungry)NumberFormat Factory Integer.valueOfCLass.forName Replace constructorMethod name is more informative than constructor F

0

Spring Bean

Bean attributes Attribute Description class Necessary, define the class used to create the bean name unique name identifier, you can use “id” or “name” in XML scope Define the scope of bean

0

Spring Framework Intro

BeanFactoryIt’s a simple container which provides Dependency Injection. It’s defined in org.springframework.beans.factory.BeanFactor.There are many instances of BeanFactory, one of the most used is X

0

Big O Cheat sheets

Algorithm Structure Time:Best Time:Average Time:Worst Space:Worst Quick sort Array O(n log(n)) O(n log(n)) O(n2) O(n) Merge sort Array O(n log(n)) O(n log(n)) O(n log(n)) O(n) Heap sort Ar

0

JVM parameters

参数名称 含义 默认值 -Xms 初始堆大小 物理内存的1/64(<1GB) 默认(MinHeapFreeRatio参数可以调整)空余堆内存小于40%时,JVM就会增大堆直到-Xmx的最大限制. -Xmx 最大堆大小 物理内存的1/4(<1GB) 默认(MaxHeapFreeRatio参数可以调整)空余堆内存大于70%时,JVM会减少堆直到 -Xms的最小限制

0

YAML Syntax

YAML Ain’t Markup LanguageBelow is an example of an invoice expressed via YAML(tm). Structure is shown through indentation (one or more spaces). Sequence items are denoted by a dash, and key value pai

0

Hibernate Criteria Search

Hibernate Session provides createCriteria() method to create a Criteria object Some samples: 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575

0

Hibernate SQL

Run SQL123456789101112131415String sql = "SELECT first_name, salary FROM EMPLOYEE";SQLQuery query = session.createSQLQuery(sql);query.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP);List results =