HashMap source code put() method and resize() method that must be asked in the interview -- Based on jdk1 eight

1, Foreword Mrs. HashMap is too often used to make too many introductions. Enter the text and directly flush the source code. This article is mainly based on 1.8 HashMap to tell part of the source code, the main focus is put() method and resize() method 2, Construction method of HashMap /** * Set the initialization capacity and call the ...

Posted by Ryanz on Wed, 02 Feb 2022 19:40:02 +0100

[detailed illustration] factory mode of java design mode

It is also called static factory mode. In fact, it does not belong to 23 design modes. His realization is mainly Define a class that dynamically determines which instance of a product class (which inherits from a parent class or interface) should be created according to the passed in parameters. In fact, the instantiation of a specific clas ...

Posted by Tjk on Wed, 02 Feb 2022 17:12:14 +0100

I beg you, stop configuring GC log printing

On the production environment or other environments where GC problems are to be tested, the parameters for printing GC logs must be configured to facilitate the analysis of GC related problems. However, many people may not be configured "Perfectly", either too little content is printed, or output to the console, or a large file is ov ...

Posted by atkman on Wed, 02 Feb 2022 07:06:01 +0100

AOP programming_ Conceptual basis of Android elegant permission framework

Special invited author of enjoy learning class: Lao Gu Reprint, please state the source! preface The last large series of articles was called "hand-in-hand explanation", which lasted for 10 months, and produced more than 20 blog articles. The explanations were detailed. Almost every article provided detailed explanation of the ...

Posted by virva on Wed, 02 Feb 2022 03:28:29 +0100

Leetcode algorithm interview sprint stack and queue theory

Queue queue Deque pays attention to pronunciation. It is a data structure that can be accessed at both ends. If deque is used as a queue, some restrictions need to be made. One end can only enter and the other end can only exit. The queue learned yesterday is also OK. get is out and put is in. The difference between getting out of the q ...

Posted by mister_t101 on Wed, 02 Feb 2022 01:52:53 +0100

Finish this and say Yes to the execution context

Who is this pointing to   the specific details and rules of this point will be analyzed later. Here you can "memorize" the following rules: In the function body, when a function is simply called non explicitly or implicitly, this in the function will be bound to undefined in the strict mode, and bound to the global object w ...

Posted by mezise on Tue, 01 Feb 2022 22:55:13 +0100

XSS Network Security Learning and Practice

XSS Cross site scripting (XSS) is a kind of security vulnerability attack of website application and a kind of code injection. It allows malicious users to inject code into the web page, which will affect other users when they watch the web page. Such attacks usually involve HTML and client scripting language Attack mode Attack the website b ...

Posted by JCBarry on Tue, 01 Feb 2022 17:13:52 +0100

Linked list problem, how to deliver the turtle gracefully?

preface Hello, I'm "programmer bear" from Huawei. Most children's shoes know that when solving problems related to "linked list", the commonly used problem-solving routines mainly include "double pointer", "iteration" and "virtual head node". Today, "Little Bear" introduces the strat ...

Posted by manchuwok on Tue, 01 Feb 2022 13:24:15 +0100

(project practice) how to combine the pipeline of k8s and pipeline and upgrade the image through k8s interface?

###Foreword Now the CICD of this unit is in chaos, and then I have a whim and want to transform it, so I made a simple pipeline with pipeline. Here are some introductions about it Write a simple pipeline It's probably such a process. To put it simply, it's: pull code - compile - create image - push image - deploy to k8s. The following pipel ...

Posted by writer on Tue, 01 Feb 2022 10:54:43 +0100

Daniel realized Alipay's payment function with SSM framework, full of dry cargo guidance.

preface Tiktok delicacy often sees what some foreigners are asking for what they want to bring back to their country. I have heard many answers: Taobao, Alipay, food, WeChat, takeaway, high speed rail and so on. Indeed, with the rapid development of the country, it has attracted many envious eyes in the world, and made China's four new invent ...

Posted by flamtech on Tue, 01 Feb 2022 05:06:14 +0100