The magic of strong and weak references in java

Preface Under what circumstances might ThreadLocal have a memory leak?If you want to understand the context of this problem, it is essential to look at the source code. After looking at the source code, you find that static class Entry extends WeakReference <ThreadLocal<?> {} is actually used in ThreadLocal, and the puzzle is actually ...

Added by JoeZ on Sat, 27 Jun 2020 22:59:49 +0300

Record a grid layout practical application sharing meeting

Record a grid layout practical application sharing meeting Recorded the technology sharing meeting in the group. For students with the same needs, please refer to it Sharing the whole process, about 45 minutes The final drawing is as follows: ↓ 1, Can it be used in engineering? (compatibility) The old growth talk, but also a decisive one, ...

Added by kevingarnett2000 on Thu, 18 Jun 2020 13:06:09 +0300

Let your code tell its story

Yunqi information:[ Click to see more industry information]Here you can find the first-hand cloud information of different industries. What are you waiting for? Come on! Now it's easy to manage the state in the React functional component with Hooks. I've written about "using custom Hooks as a service" and "functional programming ...

Added by stukov on Tue, 16 Jun 2020 08:37:36 +0300

Sharing of learning notes in uni

Table of contents 01. Summary of problems encountered 02. About layout settings 03. Basic grammar summary 04. About interaction 06. About returning data 07. About network requests 08. About page refresh 09. Notes 10. To be solved and considered 01. Summary of problems encountered In my page, there is a problem defining the class of view as l ...

Added by astaroth on Sun, 24 May 2020 05:12:06 +0300

One minute to solve the problem of 32-bit floating-point precision loss of WebGL shader in map development

The following content is reproduced from the article "WebGL shader 32-bit floating-point precision loss" of wood tree Author: tree of wood Link: https://www.cnblogs.com/dojo-lzz/p/11250327.html Source: blog Park The copyright belongs to the author. For commercial reprint, please contact the author for authorization. For non-commercia ...

Added by LMarie on Fri, 22 May 2020 08:46:32 +0300

Eggjs learning notes day 34: eggjs post management login and background permission judgment

1, Login verification. You can't access other pages without login. Judge whether the user has logged in, and use the middleware in the egg. New middleware folder under app, new adminauth.js File, type: var url = require("url"); module.exports = options => { return async function adminauth(ctx, next) { // 1. The user does not log ...

Added by Far Cry on Wed, 20 May 2020 18:13:33 +0300

Implementation of mutual transformation between JSON and HTML

The main function is to convert html to json, and then restore html by json style and script tags can be removed Convert inline styles to JS objects Convert class to array Mainly depends on htmlparser2 ; this is a powerful html parsing library with superior performance Direct code import { Parser } from "htmlparser2" const numberValueReg ...

Added by reddrum on Tue, 19 May 2020 17:50:42 +0300

Play with iOS "macro definition"

The definition of macro is very important in class C language, because macro is a function of precompiling, so it can control program flow at a higher level than runtime. When you first learn the definition of macro, you may have the feeling that it's a complete replacement. It's too simple. But if you really think so, you will be naive, not to ...

Added by Consolas on Wed, 22 Apr 2020 12:57:31 +0300

20 lines to implement a Promise

Author: dream at dawn source: gold digging   Preface During the interview, there are often interviewers who ask you to implement A Promise. If you implement it by referring to the A + specification, it may not end until dark. When it comes to Promise, the core function we first think of is asynchronous chain call. This article will take yo ...

Added by mdannatt on Sun, 05 Apr 2020 08:53:29 +0300

Complete permission control with SpreadJS in offline filing scenarios

SpreadJS As a pure front-end spreadsheet control based on HTML5, it is compatible with more than 450 Excel formulas. It can bring users a friendly experience of using Excel, and can meet business scenarios such as Web Excel component development, data filling, Excel class report design, table and document collaborative editing in enterprise IT ...

Added by wha??? on Sun, 05 Apr 2020 06:26:27 +0300