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.  

09-Mysql database — variants of foreign keys

This section focuses on: How to find out the relationship between two tables Three relations of tables   1. Introduction Because of the constraint of foreign key, the two tables form three relationships: Multi to one Multiple to many One-on-one Two, focus on understanding if you find out the relationship between the two tables.   Three, three relationships of tables (1)Books and publishers   One to many (or many to one): a publishing house can publish many books. Look at the picture and talk.   Association mode: foreign key     create table press( id int primary k...