Take commodity oversold as an example to explain Redis distributed lock and the latest version of Java interview dictionary
First, a simple Lua script code is written to obtain the value value corresponding to the lock, check whether it is equal to requestId, and delete the lock (unlock) if it is equal;Then, pass the Lua code to jedis eval() method, and assign the parameter KEYS[1] to lockKey and ARGV[1] to requestId. The eval () method is to hand over the Lua code ...
Added by dharprog on Fri, 24 Dec 2021 21:17:16 +0200
[required for development, interview question for Huawei Java senior engineer
If there is such a demand:
In the first version of our application, there was no authorization function. The current requirement is to add an authorization function.
In the above example, before we operate the order information (whether querying or modifying), we add a function to check whether the user is admin.
One way to do this is to cre ...
Added by TitanKing on Fri, 24 Dec 2021 20:31:13 +0200
[architect interview - large factory internal interview question-2] - 33 written MySQL questions with answers and table structure
After finishing these 33 questions, we don't have to worry about the written sql test any more. We don't talk much nonsense. Let's go straight to the dry goods!!!
1: Title
1. Query the Sname, Ssex, and Class columns of all records in the Student table.
2. Query all the companies of teachers, that is, the non duplicate Depart ment column.
3. ...
Added by shmeeg on Fri, 24 Dec 2021 18:55:59 +0200
2021 latest Java Concurrent Programming interview questions
Writing high-quality concurrent code is a very difficult task. Since the first version, the Java language has built-in support for multithreading, which was great in those years. However, when we have a deeper understanding and more practice of concurrent programming, we have more schemes and better choices to realize concurrent programming. Th ...
Added by lc on Fri, 24 Dec 2021 11:01:33 +0200
Ali was asked about the Java ThreadPool thread pool on both sides. After reading this article, he angered the interviewer
Advantages of thread pool
The work done by the thread pool is mainly to control the number of running threads, put tasks into the queue during processing, and then start these tasks after threads are created. If the number of threads exceeds the maximum number, the exceeded threads queue up, wait for other threads to complete execution, and ...
Added by sectachrome on Thu, 23 Dec 2021 23:05:23 +0200
[Java from 0 to architect, java development must be skilled in technology
public class ConnectionFactory {
public static Connection getConn2() throws Exception {
Class.forName("com.mysql.jdbc.Driver");
return DriverManager.getConnection("x", "x", "x");
}
}
[](https://codechina.csdn.net/m0_60958482/java-p7)FactroyBean
------------------------------------------------------------- ...
Added by kaeserea on Thu, 23 Dec 2021 18:27:54 +0200
[source code matters] learn the underlying source code of LinkedList easily. What are you waiting for
⭐ Write in front
This is the way to learn the source code of Wenwen al👍 If it helps you, give the blogger a free praise to encourage QAQ👋 Blog home page 🎉 Winwin El learning house⭐ More articles 👨🎓 Stay tuned to wenwendell's home page🍅 Article release date: December 2021 sixteen👋 java learning road!🔎 For more articles, pleas ...
Added by psn on Thu, 23 Dec 2021 13:53:49 +0200
vue Interview - Summary of Interview Questions 3
1. What is a closure function based on JS and what is it used for?
var i=10;
function add1(){
alert(i);
i++;
}
function add2(){
var j=100;
alert(j);
j++;
}
//Test:
// add1(); //10
// add1(); //11
// add1(); //12
//
// add2(); //10
// add2(); //10
// add2(); //10
The reason is simple i is a global variab ...
Added by jamest on Thu, 23 Dec 2021 05:37:29 +0200
In 2021, major companies in the front end took those handwritten questions (with code)
🎄 preface
This article mainly summarizes the handwritten questions in 2021, which are from the front end of the year and the autumn entrance examination. The topic comes from the front end of Niu Kwai network. The statistical time is from the beginning of March to the end of October. The 15 companies came from Ali, Tencent, Baidu, bytes, USA ...
Added by InfiniteA on Wed, 22 Dec 2021 10:35:28 +0200
Java data structure: tree, crazy brush 1 month Java interview questions
1, Tree
1. General
Different from the one-to-one linear relationship represented by the linear table, the tree represents the more complex nonlinear relationship between data elements.Intuitively, the tree is a hierarchical structure defined by branch relationship, which is a one to many relationshipDefinition of tree: a tree is a finite set ...
Added by chandru_cp on Tue, 21 Dec 2021 21:41:58 +0200