How use local database in app
make user experience more comfortable when your app cannot access to the internet. It also can persist data in your local machine.
use annotation to create entity
@Ent...
viewModel
what?
It is used to store the UI-related data
each fragment owns itself viewModel
fragment will be created several times when the configurations are changed. However, viewModel just is cr...
fragment
fragment can be used by different activity
keep the following code which can be used to load fragment content12345678 override fun onCreateView( inflater: LayoutInflater, container: Vie...
App color and Layout
constraint
Only we set the related constraint, we can drag our element casually.
Baseline constraint
given the developer more specific location constraint.
bind the baseline of...
First Application
different views
layout
event handler
data binding
help app no need to initialize the variable each time, which can save time.
findViewById() find view will create or recreate when...
Kotlin 101 practiceHow to create a kotlin project IntelliJ IDEA
click File -> New -> Kotlin, IDEA will help to create kotlin project with JVM
You also can use REPL (Read-Eval-Print-Loop) inte...
pomodprp-scheduleIntellig plugin for time management
some concept
plugins.xml
Action
definition, is the response of the interaction of user’s operationsand all the actions need to be defined and r...
java spring-boot jwt
what is jwt
jwt (json token token), s a standard that is mostly used for securing REST APIs.
how to sign a toke
JWTs can be signed using a secret (with the HMAC algorithm) or a...
Open-apiswagger
How to?
add open-api dependency, different framework needs import different maven dependency,for our demo, we should add webflux related openapi dependency1234<groupId>org.spr...
reactive-spring-webflux
Spring Webflux
flux 常用操作
map
transforming operator n->n synchronously
flatmap
asynchronously 1 -> 0/n
flatMapSequential
asynchronously but keeping the origina...