Tag Archives: conflict

[details] jar conflict resolution in Maven (personal test)

Jar conflicts are the most troublesome in Maven development

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: net.sf.ezmorph:ezmorph:jar -> duplicate declaration of version ${ezmorph.version} @ line 1030, column 16
[ERROR] Child module E:\EclipseHomeWork\parent\upiweb-cms of E:\EclipseHomeWork\parent\pom.xml does not exist @ 
[ERROR] Child module E:\EclipseHomeWork\parent\upiweb-cms0719 of E:\EclipseHomeWork\parent\pom.xml does not exist @ 
[ERROR] Child module E:\EclipseHomeWork\parent\upiweb-interface of E:\EclipseHomeWork\parent\pom.xml does not exist @ 
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.upi.web:upiweb-parent:1.0-SNAPSHOT (E:\EclipseHomeWork\parent\pom.xml) has 3 errors
[ERROR]     Child module E:\EclipseHomeWork\parent\upiweb-cms of E:\EclipseHomeWork\parent\pom.xml does not exist
[ERROR]     Child module E:\EclipseHomeWork\parent\upiweb-cms0719 of E:\EclipseHomeWork\parent\pom.xml does not exist
[ERROR]     Child module E:\EclipseHomeWork\parent\upiweb-interface of E:\EclipseHomeWork\parent\pom.xml does not exist
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

In any case, it is to solve the conflict problem
after reading a lot of blogs or CSDN on the Internet, I feel that they are farting, which is useless at all. At that time, maybe the blogger forwarded or something, in order to cheat the Everbright programmer’s browsing times

in fact, I don’t understand why they sum up, that is, their wrong understanding of the past.

Baidu has n methods, but it can’t solve them

Why install one

What about plug-ins?That’s not nonsense. There must be only one advantage. It’s easy to use. How much time can an easy-to-use plug-in save you

Just go to the installation steps:
file — & gt; settings — & gt; plugs — & gt;

I installed it locally (I was too busy to write this blog before)

After installation, what is the specific function?I believe you will only pay attention to it when you use it

open pom.xml —-> Dependency Analyzer

Then open the sample and compare it:

Then right click: exclude solved

the article comes from the Internet, and the copyright belongs to the author himself. If it infringes the rights and interests of the original author, please contact us for deletion or authorization.
if there is any error, please contact the author for change, thank you, My wechat: void666666

Hash conflict and four solutions

The cause of the hash conflict
Hashing is a solution to improve efficiency by recompressing data. However, because the hash value generated by the hash function is limited and the data may be more, there are still different data corresponding to the same value after processing by the hash function. This is where you have a hash conflict.
The influencing factors of hash conflict
Load factor (load factor = total number of data/hash table length), hash function, method of handling conflicts
Four ways to resolve hash conflicts
1. Open the address method
(1) Linear detection
When determining values sequentially, if a value for a piece of data already exists, one unit is added to the original value until no hash collisions occur.
(2) Ressquare detection
In order to determine the values, if the value of some data already exists, the original value is first added to the square of 1 units, if still exists, then subtracted 1 square units. It’s going to be 2 squared, 3 squared and so on. Until there is no hash conflict.
(3) Pseudo-random detection
When determining values in order, if some data already exists, a random number is generated by a random function, and the random number is added on the basis of the original value until there is no hash conflict.
2. Chain address method (HashMap hash resolution method)
For the same values, join using a linked list. Use an array to store each list.
Advantages:
(1) The zipper method is simple to deal with conflicts and has no accumulation phenomenon, that is, non-synonyms will never conflict, so the average search length is short;
(2) Because the node space of each linked list in the zipper method is dynamically applied, it is more suitable for the situation that the length of the table cannot be determined before making the table;
(3) In order to reduce conflicts, the open addressing method requires a small loading factor α, so a lot of space will be wasted when the node size is large. In the zipper method, α≥1 is desirable, and when the node is large, the added pointer domain in the zipper method can be ignored, so space is saved.
(4) In the hash table constructed by zipper method, the operation of deleting nodes is easy to realize. Simply delete the corresponding node on the linked list.
faults:
Pointers occupying a large space will cause a waste of space. If the space is used to increase the size of the hash table, the efficiency of the open address method will be improved.
3. Establish a public overflow area
Set up a common overflow area to store all hash conflicting data.
4. Re-hashing
The hash value of the conflict is hashed again until there is no hash conflict.