Tag:both of them
-
Difference and use of memo and usememo in react
The online tutorials are very confusing. I still hope you can type the code manually and experience it. Your impression is better React. Both memo and usememo reduce unnecessary expenses in components and improve performance Where, memo is whether the sub component itself renders, and usememo is the sub component prop listening function memo Memo […]
-
Tips! What should we pay attention to in a binary search?
The method of binary search must be familiar to all of us. Today, I want to talk about some small details that are easy to ignore when we write code.int mid = (low + high)/2;①int mid = low/2 + high/2;②int mid = low + (high – low)/2;③What’s the difference between these three ways?First, let’s look […]
-
Hadoop configuration – configuration pseudo distribution failed to start datanode
When the Hadoop pseudo distribution is deployed, thestart-all.shAfter that, the terminal inputjps, found that datanode is not started according tohadoop-3.2.1-libexec-logs-xxxdatanodexx.logThis path finds the log file and opens it with vscode (or other text editor) findjava.io.IOException: Incompatible clusterIDs in /usr/local/Cellar/hadoop/tmp/dfs/data: namenode clusterID = CID-fc509379-ff86-4058-8e4c-6c31a21065d0; datanode clusterID = CID-688bc71e-fba6-4e80-ac1e-b38a24956a87You can see that the clusterids of namenode and […]
-
HTML to canvas, and upload the base 64 string of canvas to qiniu cloud
Recently, a poster generation function was implemented. After the user uploaded an image, a poster was automatically generated. Due to the complexity of the poster style and the low efficiency of using canvas, I wanted to use HTML + CSS to typeset, and then convert DOM to canvas, so I found a plug-inhtml2canvasThis plug-in helps […]
-
Equivalent judgment in C × 1
Catalog brief introduction Equality comparison between value type and reference type Functions related to equality comparison stringandSystem.UriEquivalent comparison of generic interfaceIEquatable Custom comparison method Give an example summary brief introduction Recently, I am reading the book “C Chen in a nutshell”. I can see that although the. Net framework has some shortcomings and shortcomings, its […]