Talent Nini Fox's 21 day habit display day 8
In order to facilitate the inspectors to read, the page was rearranged, and the topics were arranged in descending chronological order. Today, I don't have enough time to write casually (old mixed characters)
1, Learning Planning
1. Computer composition atlas drawing (should be knowledge map) (October 25)
- The map has been completed. Please see the link of the fourth issue: Representation, operation and verification of computer composition principle data mind map.
2. Preparation for Network Engineer (November 6)
This person is very lazy and hasn't filled in... (I'll fill in this after the next)
3. Information knowledge competition (October 31)
This person is very lazy and hasn't filled in... (wish ~ ~ ~ make a big)
2, Problems encountered
1. Learning problems
10.30 question 8 (software intellectual property)
Mr. Wang is a programmer. Whenever the software development is completed, the software documents are completed according to the company's regulations,
And handed over to the company for filing, but he didn't keep it. Due to the need of writing a paper, Wang asked the company to lend and copy the original software document, but was rejected by the company because the software document belongs to a job-related work and the copyright belongs to the company. In the following description, the correct one is ().
A. The software document belongs to the job work, and the copyright belongs to the company
B. The software document does not belong to the job work, and the programmer enjoys the copyright
C. The software document belongs to the job work, but the engineer has the right to copy it
D. The software document is not a job-related work, and the copyright is shared by the company and programmers
.
Answer: choose A. the things required by the company generally belong to the company and have nothing to do with our programmers.
10.29 question 7 (Javascript countdown module) add the body part tomorrow or the day after tomorrow
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> </head> <body> </body> <script type="text/javascript"> function countDown(time) { var nowTime = +new Date();//Return Sat Oct 29 2021 23:10:58 GMT+0800, which is actually the number of milliseconds var inputTime = +new Date(time);//The date to expire is passed in, and the number of milliseconds is returned var times = (inputTime - nowTime) / 1000;//Find the remaining time and subtract it into milliseconds, so / 1000 var d = parseInt(times / 60 / 60 / 24);//Find the number of days, the same below d = d < 10 ? '0' + d : d;//Display 2:29 as 02:29 with uniform specifications, the same below var h = parseInt(times / 60 / 60 % 24); h = h < 10 ? '0' + h : h; var m = parseInt(times / 60 % 60); m = m < 10 ? '0' + m : m; var s = parseInt(times % 60); s = s < 10 ? '0' + s : s; return d + 'day' + h + 'Time' + m + 'branch' + s + 'second';//String splicing } console.log(countDown('2021-10-31 19:00:00'));//Incoming due date // How to use it: copy all the contents of the script (starting from "fusion"), //Press F12 on the web page to open the console, paste at the cursor and press enter, //You can see the deadline and the remaining time. Add the ordinary user visualization part tomorrow or the day after tomorrow </script> </html>
10.28 question 6 (Figure)
If a tree has 10 leaves, three 3-degree nodes, and the rest are all 4-degree nodes, the tree has( )Four degree nodes
Question source knowledge competition (yes, it's it again...)
answer:
First of all, this kind of problem will appear not only in the data structure, but also in discrete mathematics. Maybe there are other places, but I don't know.
This kind of problem is a routine solution: in fact, it is two different ideas of calculating the total node, and lists the solutions to the unknowns.
Secondly, you should know that leaves are actually nodes with a degree of 0.
Then, let the total number of nodes be n, the number of nodes with degree 0 be n0, the number of nodes with degree 3 be n3, and the number of nodes with degree 4 be n4.
The first formula for finding n:
Then there is n=n0+n3+n4, which is obvious.
The second formula for finding n:
If right: n= 0 × n0+3 × n3+4 × n4+1, look at the picture
Substitute the data given in the topic and solve a univariate linear equation, then the tree has (1) 4-degree nodes
10.27 question 5 (software intellectual property)
Programmer a and colleague B discussed the program recently written by a at B's house. A said that he was very dissatisfied with the program, He said he would discard it and rewrite it, and threw the program manuscript into the dustbin of B's house. Later, B modified a's program slightly, The following statement is correct ( ) A.B's behavior infringes upon a's software copyright B.Party B's behavior does not infringe Party A's software copyright, because Party A has discarded the program manuscript C.B's behavior does not infringe Party A's copyright,Because B has modified the program D.Party A did not publish the program and abandoned it, while Party B revised the program and published it, so Party B should enjoy the copyright
Question source knowledge competition
B or D?
I found it very interesting, so I put it up. I might as well put you into the a programmer. Obviously, your program has been slightly modified and changed its origin (a little similar to the authentic northeast rice in the South) Will you be a little angry? You B call and send me a text message to tell me how good it is. Let's change it together. It's easy for you B to sign and publish the change program. You have to look for my piece of paper that doesn't wipe your ass when looking through the trash can. You can't want it!!!
However, the answer to this question is A
In other words, the little program notes littered by programmers are protected by software copyright? I can't believe it~
But at this time, B scolded. Your boy wrote a manuscript at my house and threw things into my trash can. He also helped you change the program. You bastard even sued me? Huan Si, you think you're home without a few hairs on your head? People are terrible. Since then, the sound dust has been quiet. Spring mountain is like Dai, grass is like smoke, and you and Ping Shui will never meet again
10.26 question 4 (Javascript)
/*10 No. 4, June 26*/ /*I don't have much time to write a topic*/ var a1=10; var a2=20; alert("a1+a2="+a1+a2)
Ask to display the results
answer:
Is a1+a2=30? Obviously not, otherwise why should I write it
The quotation marks are string + variable a1 + variable a2
In Javascript, the + sign has string splicing function in addition to addition
When a string is added to a numeric variable, the numeric variable is forcibly converted to a string for splicing
Therefore, the displayed content is "a1+a2=1020"
10.25 track 3 (Javascript)
/*10 The Third Road on June 25*/ <ul> <li>click me</li> <li>click me</li> <li>click me</li> <li>click me</li> </ul> /*Run the following code:*/ var elements=document.getElementsByTagName('li'); var length=elements.length; for(var i=0;i<length;i++){ elements[i].onclick=function(){ alert(i); } }
Q: what will pop up respectively by clicking the four li tags in turn? Question source knowledge competition
answer:
Is the answer "0, 1, 2, 3"?
Obviously not
Can choose as a technical problem must have its pit
The reason lies in the function block level scope of Javascript
When the for loop executes i=4 in the binding element for, and the i of the inner function is undefined, it will find the upper level
So "4, 4, 4, 4" pops up in turn
To solve the problem, it is also very simple to declare the i variable with let
10.24 channel 2 (C language)
/*10 The second road on June 24*/ int a=1,b=2,c; c=a^(b<<2); printf("%d",c)
Question output results, question source knowledge competition
answer:
Two strange symbols:
① ^ is called bitwise XOR
② < < called shift left
A ^ (b < < 2) means that the result of B moving two bits left is exclusive or with a
So the question is, what is bitwise XOR?
Take this problem as an example. First, you have to convert decimal numbers into binary numbers, then
a=1,b=10,b shifts two bits to the left: b=1000
For better alignment, add 0: a=0001 to a
___________So, a^b=1001
So c=1001, convert decimal to 9
Extracurricular knowledge:
a. B the exchange of two numbers can also be realized by XOR
int a=1; int b=9; a=a^b; b=a^b; a=a^b;
10.23 question 1 (Javascript)
/*10 The first road on June 23*/ function employee(name,code) { this.name="wangli"; this.code="A001"; } newemp=new employee("zhangming",'A002'); document.write("Employee name:"+ newemp.name+ "<br>"); document.write("Employee code:"+ newemp.code +"<br>");
Question output results, question source knowledge competition.
answer:
new passes the parameter to the object, but the attribute is directly assigned in the function, so this parameter is given for nothing!
Therefore, employee name: wangli Employee Code: A001
/*The function body should be as follows to correctly pass parameters*/ this.name=name; this.code=code;
3, Practice project
1. Dark horse mm (series of projects of dark horse training base)
① Effect drawing of the first pass (front end only)
Opening after November 6 (roughly 1 day for frame filling, 2 days for partial interaction) should take 5 days
② Add some features and knock it out again (front end and back end)
4, Sum up experience
No summary in the early stage
If there are errors, you are welcome to correct them
QQ: 1667317274
Written on October 26, 2021