Can Kotlin counterattack Java and shake its status?

Foreword Recently, the TIOBE official website recently announced the programming language rankings for September 2023. Python ranks first again, accounting for 14.16%, C language ranks second, accounting for 11.27%, and C++ ranks third, accounting for 10.65%. Surprisingly, Kotlin, which targets Java, squeezed into the top 20, accounting for 0.9%. Like Java, Kotlin is also a […]

How to better encapsulate axios requests: anti-shake interception, non-sensitive refresh token, baseUrl configuration of each environment, etc.

Foreword Let’s first look at common encapsulation requests and usage methods: 1. Create a new request.js with the following content: import axios from ‘axios’ const service = axios.create({ baseURL: ”, timeout: 3000, headers: {} }) service.interceptors.request.use( config => { // Here are some processing logics such as adding token, determining login permissions, etc. return config […]

How to accurately master the use of function anti-shake and function throttling?

Preamble Function debouncing (Debouncing) and function throttling (Throttling) are both technologies used to control the execution frequency of functions. They are usually very useful when processing high-frequency triggered events (such as window scrolling, mouse movement, input box input, etc.) 1. Core concepts Function anti-shake The core idea of function anti-shake is that when an event […]

Request https error certificate verification failed (javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX

Project scenario: Request https error certificate verification failed (javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) Problem description When requesting a third-party HTTPS URL in the project, an error occurs that the SSL certificate verification failed. 14:33:55.195 [main] ERROR com.bd.common.utils.OKHttpUtil – context javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building […]

Mtk camera QuickSwitch adds “anti-shake” switch icon

The mtk native camera already has an “anti-shake” switch in the settings. The customer wants to add a “switch” to the QuickSwitch bar, similar to the location of the flash icon ** Let’s take a look at the renderings first: #The function implemented is to add an anti-shake icon switch. The switch will be synchronized […]

js performance optimization: thoroughly understand function anti-shake and function throttling

Function anti-shake and throttling Function anti-shake and function throttling: A means to optimize high-frequency execution of js code. When some events in js, such as browser resize, scroll, mousemove, mouseover, and input box keypress, are triggered, they will Continuously calling the callback function bound to the event greatly wastes resources and reduces front-end performance. In […]

Computer network day12 TCP’s three-way handshake and four-way handshake (detailed process) – Port scanning script – Socket types – Network attack methods (SYN flood attack, DOS attack, DDOS attack, CC attack)

Directory TCP header encapsulation Experiment: If I need to know the 6 ports of a certain machine, which ports 22 23 25 3306 80 8000 are open and which are not? How to do it? shell script: python script: Socket classification: network socket and file socket Reference article (GOOD): 4.1 TCP three-way handshake and four-way […]

JS-26 Know anti-shake and throttling functions; custom anti-shake, throttling functions; custom deep copy, event bus functions

Table of Contents 1_ Anti-shake and throttling 1.1_ Know the anti-shake and throttling functions 1.2_Understanding the anti-shake debounce function 1.3_The case of anti-shake function 1.4_ Know the throttle function 2_Underscore realizes anti-shake and throttling 2.1_Underscore realizes anti-shake and throttling 2.2_Custom anti-shake function 2.3_Custom throttle function 3_Custom deep copy function 4_Custom event bus 1_Anti-shake and throttling […]

Custom instruction directives: anti-shake, throttling, element-ui’s infinite scroll package used on el-table

Vue official website for the introduction of custom instructions add link description In addition to the default built-in directives for core functionality (v-model and v-show), Vue also allows custom directives to be registered. Note that in Vue2.0, the main form of code reuse and abstraction is components. However, in some cases, you still need to […]