Articles are paginated with only three posts here for example. You can set the number of entries to show on this page with the “pagination” setting in the config file.

JVM warm up

JVM wram up Keeping this in mind, for low-latency applications, we need to cache all classes beforehand – so that they’re available instantly when accessed at runtime. This process of tuning the JVM is known as warming up. Escape Analysis Escape analysis is a technique by which the Java Hotspot Server Compiler can analyze the scope of a new object’s uses and decide whether to allocate it on the Java heap. []

Gradle build stuck

Gradle build stuck, keep on running but never ending Here are some key error in console logs Waiting to acquire shared lock on daemon addresses registry Daemon stuck Gradle build stuck at “Waiting to acquire shared lock on daemon addresses registry.” Here are sample logs from Gradle console 22:18:32.549 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry. 22:18:32.549 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry. []
Gradle  Java 

Awesome Reactive programming

Key points of Reactive Programming

  • Reactive is used to broadly define event-driven systems
  • Move imperative to
    • Asynchronous
    • non-blocking
    • functaion-style code
  • Allows stable,scalable access to external sytems

Awesome Swift for iOS

Frame in Swift Forgetting to assign a view a frame when creating it in code, and then wondering why it isn’t appearing when added to a superview, is a common beginner mistake. If a view has a standard size that you want it to adopt, especially in relation to its contents (like a UIButton in relation to its title), an alternative is to call its sizeToFit method. Matt Neuburg. Programming iOS 13 (Kindle Locations 555-557). []
Swift  iOS  Mac 

Swift for iOS

This book is intended to accompany and precede Programming iOS 13, which picks up where this book leaves off. If writing an iOS program is like building a house of bricks, this book teaches you what a brick is and how to handle it, while Program‐ ming iOS 13 shows you some actual bricks and tells you how to assemble them.

–End–

Swift  Mac  iOS 

Mock in kotlin

Argument Matching & Answers For example, you have mocked DOC with call(arg: Int): Intfunction. You want to return 1 if argument is greater than 5 and -1 if it is less or equal to 5. This can be achieved by following construct: every { mock.call(more(5)) } returns 1 every { mock.call(or(less(5), eq(5))) } returns -1 returnsMany specify a number of values that are used one by one i.e. first matched call returns first element, second — second element, e. []
Kotlin  Mock 

How to decode path parameters in All REST WebServices calls

How to decode path parameters in All REST WebServices calls TL:DR If there are multiple places requires decode a parameter during WebServices RESTful calls, you can use UrlPathHelper from springframework to do this in central place Image there is one param1 in RESTful URL which may contains some Non URL friendly characters, such as forward slash “/”. You definitely can call URLCodec().decode(param1) on every calls. But that’s cumbersome and error-prone. []

Curl

Linux Curl command arguments -L, –location (HTTP) If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make curl redo the request on the new place. If used together with -i, –include or -I, –head, headers from all requested pages will be shown. When authentication is used, curl only sends its credentials to the initial host. []
Linux 

AOP

The concept of join points as matched by pointcut expressions is central to AOP, and Spring uses the AspectJ pointcut expression language by default.

Awesome Shortcuts

Shortcuts & tips Intellij Notes CMD+3: Open actions (Eclipse) CMD+F12 (Mac) or Option+F12: Show terminal Shift+ESC: close auxiliary windows, such as project explorer, terminal window, etc. Cmd+O: File structure, list all methods Shift+Cmd+F: reformat code Sublime Ctrl+-: Go to last edit: Notion Notes Cmd+: show left bar Cmd+P: global search Mac tips Cmd + ← or → : move cursor to begin or end of line Shift + Cmd + →: select whole line (move cursor to line front first) Option + Shift + → / ←: select whole word ^ + Down: to show notiifcation center Ctrl+F2: to access menu bar Linux comands List only folders: ls -dl conflu* []