Java file cutting and splicing, java development interview skills
Convert the path to a file object, and then calculate how many blocks will be divided:
File file = filePath.toFile();
int howManyParts = (int) Math.ceil(file.length() / (double)filePieceSize);
Initialize the input / output stream, output error information, and return false,Get current directory:
DataInputStream fileReader = n ...
Added by kamasheto on Tue, 04 Jan 2022 20:52:32 +0200
vue common interview questions
Which priority is higher than if-v? If two appear at the same time, how should we optimize to get better performance?
<!DOCTYPE html> <html>
<head>
<title>Vue event processing </title> </head>
<body>
<div id="demo">
<h1>v-for and v-if Whose priority is higher? How sho ...
Added by LanHorizon on Tue, 04 Jan 2022 16:08:49 +0200
Some questions and interview questions about native js
Scope and Scope Chain in js
There are two types of scopes in javascript
Local Scope: They can only be accessed within a functionGlobal scope: All scripts and functions of a Web page can access it.
javascrip has a function scope: each function can create a new scope.
Scope Chain
When looking for a variable, it looks for it from the variable ...
Added by noobstar on Tue, 04 Jan 2022 15:25:29 +0200
ByteBuf reference count of Netty source code analysis
Reference counting is a common memory management mechanism. It refers to the process of saving the number of references of resources and releasing them when the number of references becomes zero. Netty at 4 Version x began to use the reference counting mechanism to manage some objects. Its implementation idea is not particularly complex. It mai ...
Added by juancarlosc on Tue, 04 Jan 2022 14:49:35 +0200
builder mode 1 of Glide design pattern [GlideBuilder]
Glide's multiple combination usage records - not all of them are tested in person, so you can choose according to your actual needs builder mode 1 of Glide design pattern [GlideBuilder] Glide design pattern builder mode 2 [RequestBuilder] builder mode 3 of Glide design pattern [RequestOptions] [BaseRequestOptions] builder mode 4 Summary of Glid ...
Added by Ryan0r on Tue, 04 Jan 2022 08:39:09 +0200
Data structure: jump linked list
Pay attention to the official account and exchange with each other. Search by WeChat: Sneak ahead.
What is a jump list
The balance data structures often used in development include B number, red black number and AVL number. But if you implement one of them, it is very difficult and takes time to implement. The jump linked list is a fast searc ...
Added by brianb on Tue, 04 Jan 2022 02:51:34 +0200
Five data types and usage scenarios of Redis
Redis has five basic data structures: string, list, set, hash and zset.
All data structures of Redis are a key corresponding to a value. The difference between different types of data structures lies in the different structure of value. For example, string data type, its value is a string, list data type, and its value is a linked list.
1.Str ...
Added by horsefaceba on Tue, 04 Jan 2022 02:25:06 +0200
mysql series: innodb log management, Java microservice architect
-s ORDER what to sort by (al, at, ar, c, l, r, t), 'at' is default # default collation al: average lock time # average lock time ar: average rows sent # average return record time at: average query time # average query time c: count # records l: lock time # lock time r: rows sent # returns the number of records t: query time # query time -r rev ...
Added by bdlang on Mon, 03 Jan 2022 23:33:23 +0200
Java advanced: Collection framework 2, java development starts from scratch
1, List interface
1. General
Inherits the Collection interface, which is a Collection of elements
For example, the order of storing elements is 11, 22, 33. Then, the storage of elements in the set is completed in the order of 11, 22 and 33)
It is a set with index , through which the elements in the set can be operated accurately (the ...
Added by Aleirita on Mon, 03 Jan 2022 10:54:29 +0200
JAVA advanced key analysis
Singleton mode
Hungry Han Trilogy (waste of resources)
1. Privatize the constructor (resulting in that the external cannot directly new your class instance)
private GirlFriend(String name) {
this.name = name;
}
2. Create directly within the class (create your own girlfriend in your own class)
private static GirlFriend ...
Added by Iceman512 on Mon, 03 Jan 2022 10:54:25 +0200