HashMap access

  One.Put method Case 1:   Click on the topputEnter the underneath    The first step is to get the hashCode value first.    The second step is to get the hash value according to the hashCode value.    The third step is to get a subscript i from the hash value. The above code is as follows:                            The results are as follows:    The fourth step: traversing the hash bucket of the subscript location.    The fifth step is to make a substitution if the reference is equal or equals equal.   2.Click on the tophashEnter the underneath     3.Be...

The representation of cyclic decimal numbers and the length of loop nodes

Question:   Input integer a and B, output a/b’s cyclic decimal representation and its loop node length. For example, the decimal number of a=5 b=43 is 0. (116279069767441860465), and the loop node length is 21.   Analysis:   The calculation process of long division       ①mod = a%b;       ②Decimal = (mod*10) / B;       ③mod = (mod*10)%b;     Cycle, step 3, when there is a repeating residue, that is, the loop section appears. Matters needing attention:   When the two or three steps above are looped, the remainder is zero, that is...

Git download and install

Download https://git-scm.com/download/win Reference https://www.cnblogs.com/wj-1314/p/7993819.html After installation, the desktop will appear.   Initialization  Check your username and email address:   $ git config user.name   $ git config user.email Modify your username and email address:   $ git config –global user.name “xxx”   $ git config –global user.email “xxx” Update to a historical version https://www.jianshu.com/p/0d4e62dcc62c Client https://www.cnblogs.com/shanheyongmu/p/6726452.html https://www.jianshu.com/p/466cf85c0ad8 ...

The meaning of every field in Linux top command

PID:ID of the processUSER:Process ownerPR:The priority level of the process is smaller and the priority is implemented.NI:nicevalueVIRT:Virtual memory occupied by processRES:Physical memory occupied by processSHR:Shared memory used by processesS:The state of the process. S means dormancy, R means running, Z indicates dead state, and N indicates that the process priority is negative.%CPU:Process occupancy rate of CPU%MEM:The percentage of physical memory and total memory used by processesTIME+:The total CPU time occupied after the process starts, that is, the cumulative v...

Native JS adds class name, deletes class name.

1、Add class name: document.getElementById("myDiv").classList.add("myStyle"); 2、Delete class name: document.getElelmentById("myDiv").classList.remove("myStyle") 3、Check whether there is any CSS fatigue: myDiv.classList.contains("myCssStyle") //return true or false   Note: when we add multiple class names, we write them side-by-side and separate them with commas.