JS determines whether an object is an array type

As we all know, JavaScript can generally use typeof to judge the type of a data, except for some special cases, such as typeof null, which will output object. Here is another case. Using typeof to judge the array will also output object. First create an array let arr = [1,2,3] //Or let arr = new Array([1,2,3]) 1.instanceof console.log(arr ...

Posted by Rictus on Mon, 29 Nov 2021 16:34:05 +0100

Super detailed introduction to new functions of Java 15

Java 15 was released in September 2020. Although it is not a long-term supported version, it also brings 14 new functions, many of which are very practical. Java 15 official download: https://jdk.java.net/archive/ Java 15 official documentation: https://openjdk.java.net/projects/jdk/15/ New Java 15 features: JEPdescribeJEP 339Edwards curv ...

Posted by JasonO on Mon, 29 Nov 2021 06:47:47 +0100

leetcode of algorithm interview in Dachang 9. Bit operation

leetcode of algorithm interview in Dachang 9. Bit operation Video tutorial (efficient learning): Click to learn catalog: 1. Introduction 2. Time and space complexity 3. Dynamic planning 4. Greed 5. Binary search 6. Depth first & breadth first 7. Double pointer 8. Sliding window 9. Bit operation 10. Recursion & divide and con ...

Posted by jabapyth on Mon, 29 Nov 2021 01:37:09 +0100

Do you really know the correct usage of NSTimer?

NSTimer can you really use it? I believe everyone will confidently say: I know! It's simple, but are you sure you're using it right? 1. Use of nstimer A: NSTimer can you really use it? Do you know the circular reference of NSTimer? B: It's not easy, isn't it 👇 This kind of use, So easy! self.timer = [NSTimer scheduledTimerWithTimeInterval ...

Posted by mnetsys on Fri, 26 Nov 2021 18:46:47 +0100

Essential for small projects: SpringBoot Actuator - embedding point and monitoring

In the project, I saw the buried point monitoring, report and log analysis. I'm a little interested and want to make some trouble slowly 1. Data embedding point Monitor the performance of the machine environment and various data such as business processes or logic, and generate corresponding indicators according to these data, then we ca ...

Posted by MikeyNoedel on Wed, 24 Nov 2021 10:10:29 +0100

Do you really understand the source code of ArrayList

problem I believe many young friends have been asked about the relevant source code in the jdk during the interview. Recently, they have been asked about the source code of ArrayList. They come up to ask whether they have seen the source code of ArrayList and how to remove the elements in ArrayList during traversal, What kind of exception will ...

Posted by CountryGirl on Wed, 24 Nov 2021 09:00:00 +0100

[in simple terms, Java multithreading, mybatis interview questions and answers

ExecutorService executorService = Executors.newFixedThreadPool(threadPoolNum, r -> new Thread(r, threadName)); The underlying layer of Executors uses ThreadPoolExecutor. We can understand some behaviors of ThreadPoolExecutor through ThreadPoolExecutor constructor. ThreadPoolExecutor( int corePoolSize, int maximumPoolSize, lo ...

Posted by Goose87 on Wed, 24 Nov 2021 06:36:28 +0100

[architect interview - message queue - 5] - MQ message reliability actual combat source code solution

1: Introduction If the reliability of the message is guaranteed? The following problems need to be solved Question 1: the producer can send 100% messages to the message queue! Two unexpected situations: First, the consumer fails to send a message to MQ, and the message is lost; Second, the switch fails to route to the queue, and the routin ...

Posted by kapishi on Wed, 24 Nov 2021 04:33:55 +0100

The back-end gives you 100000 pieces of data at a time. How to show it gracefully? What do you examine me?

prefaceHello, I'm Lin Sanxin. In the most popular words, the most difficult knowledge point is my motto. The foundation is advanced, and the premise is my initial intention. Today, I'll talk to you. If the back end really returns 100000 data to the front end, how can we show it gracefully in the front end? (haha, assuming that the back end can ...

Posted by Seraph on Tue, 23 Nov 2021 07:36:32 +0100

Threads listening for signals in the JVM and Unix domain socket communication threads

[experiment] package com.infuq.tmp; public class Main { public static void main(String args[]) { for (;;) { try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } } } } In the above code, let the JVM not exit. Let's do so ...

Posted by randomfool on Sat, 20 Nov 2021 11:23:05 +0100