These days there is a bug wrapped around me for half a day, so I have this article.
Touch screen because added a notebook keyboard can not be used, take off the notebook keyboard, touch screen can be used again, really ghost.
A little research, the original is added to the notebook keyboard caused by the TP drive device node changed, for example, before is event4, add a notebook keyboard after event6, resulting in the application used by the device node with the TP driver does not match.
So, I wonder, the previous method is in the compilation of the time to write dead, such as the configuration of 4, the runtime is set to 4, unchanged, in fact, this is a certain risk, such as the example just said. So, how to change it? Can you tell what the TP device node is when allowed? The answer is yes.
A little bit of a problem was encountered when adding the Event_num scheme to get TP automatically:
First, when traversing the device node, how to record the Event_num,c language is very simple ah, i++, but the shell can not do so.
Second, how to intercept the first few characters of the string?
Solve the first problem, search the Internet, found that there is a good person to write, here Quote:
a=1a=$ (($a + 1)) a=$[$a +1]a= ' expr $a + 1 ' let A++let a+=1
There are several ways to implement i++ operations, in which I use let a++ in practice
The second problem is actually a lot of ways, I just say one easy to remember:
For example: There is a string variable string=abcdefgh, I need to intercept the first 4 characters, then how should the shell be implemented?
string= "ABCDEFGH" cut_string= ' echo $string |cut-c 1-4 '
Results: CUT_STRING=ABCD
The above 2 problems are encountered in the actual problem solving, although the humble technical point, slowly accumulate or useful.
The old saying goes: Do not accumulate kuibu, not even thousands of miles, do not accumulate small stream, not to become Jianghai. O (∩_∩) o
How the shell implements i++ operations and string interception operations