web api, method of obtaining DOM elements, event understanding, 300ms delay of click event on mobile terminal, event object, event delegate, common event types
web api:
API (Application Programming Interface) is some pre-defined functions. The purpose is to provide the ability for application programs and developers to access a group of routines based on some software or hardware without accessing the source code and understanding the details of its internal working mechanism. They only need to call ...
Posted by srihari on Sat, 19 Feb 2022 06:48:26 +0100
Monotone stack application
As the name suggests, a monotone stack is a stack with monotone properties
Analog monotone stack
Array: 4, 5, 2, 6, 3
Monotonically increasing stack (the top of the stack is smaller than the bottom of the stack. When the element is put into the stack, if it meets the monotonicity, it will be put into the stack. If it does not meet the monoto ...
Posted by DanArosa on Sat, 19 Feb 2022 06:42:58 +0100
Create a simple Direct2D application
This article will lead you through the creation of the DemoApp class, which will create a window and draw a mesh and two rectangles using Direct2D. In this tutorial, you will learn how to create Direct2D resources and draw basic images. You will also learn how to build an application and improve its performance by minimizing the creation of res ...
Posted by WilliamNz on Sat, 19 Feb 2022 06:38:45 +0100
Rereading "challenge programming competition" -- fledgling
In the final analysis, there are several simple number theory problems:
Prime number problem (judgment, sieve method, decomposition, several common conclusions of decomposition) and divisor problemFast power, matrix fast powergcd, exgcd (system of Congruence Equations) Euler functionInverse elementHigher mathematics related: Gauss elimination ...
Posted by askbapi on Sat, 19 Feb 2022 06:37:27 +0100
Python Lesson 7: tuples, dictionaries and collections
1. Tuple
A tuple is an immutable sequenceThe symbol is () () can be omitted, but when there are other elements in the tuple, there must be = = ','==tuple1 = () empty tupleTuples can also store everything tuple1 = (1, None, False, [])
Unpacking of tuples
Here is an example to illustrate:
# Unpacking
tuple1 = (1, 2, 3)
a, b, c = tuple1
print( ...
Posted by RTS on Sat, 19 Feb 2022 06:36:00 +0100
AbstractQueuedSynchronizer (AQS) source code detailed analysis - Semaphore source code analysis
1. Introduction
Semaphore, a semaphore, holds a series of permissions. Each call to the acquire() method will consume a license, and each call to the release() method will return a license.Semaphore is usually used to limit the number of accesses to shared resources at the same time, which is often referred to as flow restriction.Semaphore sem ...
Posted by mona02 on Sat, 19 Feb 2022 06:30:32 +0100
Why does HashMap concurrency cause dead loops?
Today, when studying the Java concurrency container and framework, we can see why we should use ConcurrentHashMap. One reason is: thread unsafe HashMap. HashMap will cause a dead loop when executing put operation concurrently, because multithreading will cause the Entry linked list of HashMap to form a ring data structure and fall into a dead l ...
Posted by jeff2007XP on Sat, 19 Feb 2022 06:28:36 +0100
Single case design mode
Singleton Pattern is a creation pattern, which provides the best way to create objects.
This pattern involves a single class that is responsible for creating its own objects while ensuring that only a single object is created. This class provides a way to access its unique object, which can be accessed directly without instantiating the object ...
Posted by ScottCFR on Sat, 19 Feb 2022 06:26:59 +0100
JDK8 Stream distinct de duplication and custom de duplication
The programming style of Stream is introduced into JDK8. By flexibly using this style, we can help us realize more convenient data processing operations. Today, let's talk about the implementation of distinct() in Stream and how to design custom de duplication logic through filter().
final int[] distinct = Stream.of(1, 1, 1, 2, 2, 3, 3, 4, 4, ...
Posted by ScOrPi on Sat, 19 Feb 2022 06:26:28 +0100
redis-3.redis's message subscription, pipeline, transaction, modules, bloom filter and cache LRU
redis
pipeline
Beer theory, for example, there are 24 bottles of beer in the store. You can't take one bottle home and drink another. You need to find a box to carry the beer home together The buffer mechanism can also be understood in this way to avoid calling back and forth
A request / response server can handle new requests even ...
Posted by linfidel on Sat, 19 Feb 2022 06:15:41 +0100