Detailed parsing of C++ virtual functions (with examples)

Preface \quad\quad It is believed that many people want to know how polymorphism works when they understand it.In fact, you should all know more or less that virtual functions are implemented through virtual function tables.But, as I probably did before, I knew what it was like, but I didn't rUTF-8...

Posted by phencesgirl on Sat, 15 May 2021 01:35:56 +0930

LeetCode 146. LRU caching mechanism

1. Title Design and implement an LRU (least recently used) caching mechanism with your data structure. Implement the LRUCache class: LRUCache(int capacity) initializes the LRU cache with a positive integer as the capacityint get(int key) if the key exists in the cache, the value of the key is UTF-8...

Posted by internet-solution on Wed, 19 May 2021 04:20:53 +0930

Chat about synchronized

Before JDK 1.5, there were only synchronized and volatile coordination mechanisms for shared objects. In JDK 1.5, a new mechanism, ReentrantLock, was added. This mechanism was born not to replace synchronized, but to provide an optional high-level function when synchronized is not applicable. sUTF-8...

Posted by brokenshadows on Thu, 27 May 2021 04:14:24 +0930

Thread and thread pool in concurrent programming

1. Thread Thread (English: thread) is the smallest unit that the operating system can schedule operations. It is included in the process and is the actual operation unit in the process. Thread is the smallest unit to schedule CPU resources. The thread model is divided into KLT model and ULT modUTF-8...

Posted by Shamrox on Fri, 28 May 2021 05:10:46 +0930

Record the interview experience of a large factory

one side 1. Algorithm problem: realize a link, you can add nodes, delete nodes function insert(head, n ,val) { var node = { val: val, next: null } if (head == null) { return node } if (n === 0) { node.next = head; return node; } var p = head; for(var i=0; i

Posted by expostfacto on Sat, 29 May 2021 07:35:44 +0930

The problem of taking a patient's temperature

The problem of taking a patient's temperature I met such a question in the interview a few days ago. I found it very interesting and recorded it. demand Take the patient's temperature Sort by time, from low to high, no time, no minutes, no secondsCalculate the average body temperatureSort by hiUTF-8...

Posted by fansa on Sat, 05 Jun 2021 03:55:47 +0930

Implementation of palindrome digital Palace (js Basic Edition)

Preface: I think I write well, please like, pay attention to, add collection / recommendation, other questions are welcome to leave a message at the bottom, Buddhist reply! catalogue 1, Cause 1, Cause See the interview question of "palindrome digital Palace" in a group: So I worked out this "paUTF-8...

Posted by brad.techguy on Sun, 06 Jun 2021 09:04:38 +0930

STL Source Analysis (not finished 6/08)

1. Introduction of six components of STL 1) Introduction Containers: Common data structures, roughly divided into two categories, sequence containers, such as vector, list, deque, and associated containers, such as set, map.In implementation, it is a class template Iterator: A set of interfaceUTF-8...

Posted by madcrazy1 on Wed, 09 Jun 2021 02:49:36 +0930

Logic notes of Java programming -- object oriented (class foundation + class inheritance)

object-oriented Class foundation The basic concept of class In some cases, a class is really just a container for functions, but a class is more about custom data types Function container Common functions of Math class (static method) Class method (static method): static modification, directly UTF-8...

Posted by seavers on Wed, 09 Jun 2021 05:30:50 +0930

RabbitMQ instant messaging is so simple! Even the back-end code can be saved?

abstract Sometimes we use instant messaging in our projects, such as the customer service chat function in the e-commerce system, and in the payment process, when the user pays successfully, the third-party payment service will call back our callback interface. At this time, we need to inform tUTF-8...

Posted by drewklue on Sat, 12 Jun 2021 04:09:07 +0930