[dry goods] introduce four practical skills of developing React application
background
Hooks has been very popular since it was launched. It has changed the way we write React code and helped us write more concise code.
Today's article is not about Hooks. Besides Hooks, there are many practical skills that can help us write concise and clear code.
Today, I've sorted out a few skills, some of which are also my practice ...
Posted by steveh62 on Tue, 26 Nov 2019 01:55:37 -0800
PAT class B 1002 write this number (Java)
The topics are as follows:
Read in a positive integer n, calculate the sum of its digits, and write each digit of the sum in Chinese pinyin.
Input format:
Each test input contains one test case, that is, it gives the value of natural number n. It is guaranteed that n is less than 10 100.
Output format:
For each digit of th ...
Posted by jaronblake on Sun, 24 Nov 2019 09:59:48 -0800
Spring MVC custom parameter resolver
I. briefly
Have you ever thought about how annotations like @ RequestParam and @ RequestBody work? Why can form forms and application/json parameters be directly encapsulated in Bean objects? This is about HandlerMethodArgumentResolver - Method Parameter resolver, which has two methods:
public interface HandlerMethodArgumentResolver {
bool ...
Posted by watts on Fri, 22 Nov 2019 09:09:46 -0800
The Path of Dependent Management in go mod
Writing a k8s operator defaultvm in kubebuilder mainly strings up the creation of ovn network and virtual machine to provide default available virtual machine for users.
Kubebuilder is a framework for building the Kubernetes API based on CRD, which can be used to build APIs, Controller s, and Admission Webhook s.
The code calls virtualmachine d ...
Posted by kelvin on Thu, 21 Nov 2019 01:08:02 -0800
Plan garlic guest team to knock 7
Time limit: 1000ms space limit: 131072K
There is a wine table game called "knock 7". The rule is to start from one person and say any number. Other people will report back in sequence. If a number contains 77, or multiple of 77, then you need to knock the cup or plate, but you can't say it.
Now nn people are sitting ...
Posted by student101 on Mon, 18 Nov 2019 12:15:26 -0800
Various postures of exception handling in Spring
1. Preface
The importance of unified exception handling for application is self-evident. Today, let's talk about how Spring can handle unified Rest exception handling. At the same time, we will simply compare their advantages and disadvantages.
2. @Controller Combine @ ExceptionHandler
Declare a method in the controller and mark it with the @ ...
Posted by birwin on Sun, 17 Nov 2019 18:51:14 -0800
Configuration Management Center SCCA under Micro Services
Introduction to SCCA
SCCA is called spring-cloud-config-admin, and Spring Boot applications (including Spring Cloud) are unified configuration management platforms under micro services.
Github address: spring-cloud-config-admin
Core Contributors: Programmer DD | stone-jin
Tags: lightweight, easy to use, visually good, interactive
Deploy ...
Posted by sebthib55 on Sat, 16 Nov 2019 23:54:10 -0800
Vue implements calendar rendering
Need to make a check-in calendar, first simply make the effect of the calendar, directly share the source code, if you need to use it directly
<template>
<div>
<!-- Calendar head -->
<div class="calenderTitle">
<div class="calenderItem" v-for="item of calenderTitel">{{item}}</div>
</di ...
Posted by fxpepper on Fri, 15 Nov 2019 09:51:19 -0800
Spring Boot generates REST API documents in production environment from scratch
1 Preface
In the current mode of front-end and back-end separated development, the front-end invokes the API provided by the back-end to realize data display or related data operations, so as to ensure timely update and complete REST API documents, which will greatly improve the work efficiency of both sides and reduce unnecessary communicatio ...
Posted by mikeissa on Thu, 14 Nov 2019 20:16:25 -0800
The transformation of Spring REST API from entity to DTO
introduce
In this article, we will deal with the transformations that need to be done between the internal entities of Spring applications and DTO s (data transfer objects) outside the client.
Model mapping
Let's start by introducing the main library of entity to DTO transformation for execution - ModelMapper.
We need to add the following depen ...
Posted by boardy on Mon, 11 Nov 2019 02:09:34 -0800