Category Archives: How to Fix

Use keil software to report syntax error near ‘;

Using keil software to report syntax error near ‘; ”

This is the first time through CSDN upload their own learning situation, novice report.

Today, when using keil to write C, I used a piece of such code

    ?Define uint unsigned int; void delay (uint MS) { uint a; while (MS --)// software delay module for (a = 0; a & lt; 114; a + +); }

    When compiling, a syntax error near ';' was given, and the following MS and a both reported an error that no identifier was defined.
    From the code above, it can be seen that there is an obvious error with the ";" sign after define, but I found that the line with syntax error near ';' error is void delay (uint MS).
    I was hoodwinked at that time, looking for a long time, I found that there was an extra "; to commemorate this stupid operation.

Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: no)

Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: no)

The solution steps are as follows:

1. First stop the database service: systemctl stop mariadb.service

2. Use mysqld_ Safe to start mysqld server: mysqld_ safe –user=mysql –skip-grant-tables –skip-networking &

Display: exit Ctrl + C

3. Login: MySQL – U root mysql

4. Modify the password of the root user: update user set password = password (‘newpassword ‘) where user’s root’;

5. Use the modified root user and new password to log in to the database: MySQL – uroot – P

 

The MariaDB server is running with the –skip-grant-tables option so it cannot execute this statement

An error occurred when creating a user. The execution statement is:

GRANT ALL PRIVILEGES ON *.* TO helei IDENTIFIED BY ‘MANAGER’ WITH GRANT OPTION;

Solution: MySQL & gt; flush privileges;

Reference: MariaDB initial login error 1045 (28000) solution

https://blog.csdn.net/carry9148/article/details/52252780

The solution of the error code is 2503 in Python installation


Copyright notice

Original author: brother Gu’s younger brother author blog address: http://blog.csdn.net/lfdfhl


Problem description

When installing Python 3.7.2 in win10 device, an error is reported: the error code is 2503, as shown in the figure below:

Solution

Just modify the permissions of the folder C: Windows: temp.

The first step: find the folder C: Windows: temp

Step 2: open the temp folder and edit its permissions

Step 3: change its permissions to full control

ElementUI implements front-end paging

To write pagination according to his documents, the most important thing is how to deal with the data displayed in El table

<el-table :data="AllCommodityList.slice((currentPage-1)*pagesize,currentPage*pagesize)" border style="width: 100%">

The most important thing is to deal with the red mark above

Allcommoditylist is the background data, CurrentPage is the current page, the initial value is 0, PageSize is the current data to be displayed, the initial value is 10

The slice() method returns the selected data from an existing array

//1.Paging component
<el-pagination
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :current-page="currentPage"
    :page-sizes="[10, 20, 30]"
    :page-size="pagesize"
    layout="total, sizes, prev, pager, next, jumper"
    :total=parseInt(total)>
  </el-pagination>

//2.control methods
    handleSizeChange(val) {
        this.pagesize = val;
    },
    handleCurrentChange(val) {
        this.currentPage = val;
    },

The version number of robot JS running by electron does not match

Solution to the problem of version number mismatch in running electron and robot JS

Running found that the error version number does not match, to reduce the node version number, the result found that it is not the version number problem

<project>/node_modules/robotjs/build/Release/robotjs.node' was compiled against a different Node.js version using 
NODE_MODULE_VERSION 57.
 This version of Node.js requires NODE_MODULE_VERSION 54. 
 Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install).

After one operation, the node gyp construction error was reported again

node-expat.3.18 install /usr/local/lib/nodejs/node-v14.0.0-linux-x64/lib/node_modules/rnv/node_modules/node-expat node-gyp rebuild

gyp ERR! clean error gyp ERR! stack Error: EACCES: permission denied, rmdir 'build' gyp ERR! System Linux 5.3.0-51-generic gyp ERR! command "/usr/local/lib/nodejs/node-v14.0.0-linux-x64/bin/node" "/usr/local/lib/nodejs/node-v14.0.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/nodejs/node-v14.0.0-linux-x64/lib/node_modules/rnv/node_modules/node-expat gyp ERR! node -v v14.0.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/rnv/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN rnv.29.0 requires a peer of now.3.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-expat.3.18 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-expat.3.18 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/abhishek/.npm/_logs/2020-05-10T08_21_14_099Z-debug.log

Solution: to delete the project again and execute the following command again can solve most of the problems
target is the electron version number

By printing console.info ( process.versions );
view the corresponding relationship between
node and ABI: see

cnpm rebuild --runtime=electron --target=8.5.5 --disturl=https://atom.io/download/atom-shell --abi=72

dd make start up usb

1. Insert U disk

2. Fdisk – l find the drive letter of U disk

3.umount /dev/sdb*

four mkfs.vfat /dev/sdb -I

5. Use the DD command to write ISO to enter the U disk
// if = input file. You should fill in the absolute address instead of ~ /… , or you can CD to the current directory and directly write the name
// of = output file

dd if=/home/zhouya/Downloads/ubuntu-20.04.2.0-desktop-amd64.iso of=/dev/sda status=progress && sync

Barrier free click path source code to read

Gesturedescription build to build gesture description class

Dispatchgesture execution gesture description class

GestureDescription.GestureStep Gesture operation steps

final IAccessibilityServiceConnection connection =
                AccessibilityInteractionClient.getInstance().getConnection(
                        mConnectionId);

  connection.sendGesture(mGestureStatusCallbackSequence,
                        new ParceledListSlice<>(steps));

Iaccessibilityserviceconnection utilizes cross process

https://www.jb51.net/article/141876.htm

MainActivity.this.onTouchEvent(MotionEvent.obtain(
                        SystemClock.uptimeMillis(),
                        SystemClock.uptimeMillis(),
                        MotionEvent.ACTION_DOWN,
                        100.0f,
                        100.0f,
                        0));


                MainActivity.this.onTouchEvent(MotionEvent.obtain(
                        SystemClock.uptimeMillis(),
                        SystemClock.uptimeMillis(),
                        MotionEvent.ACTION_MOVE,
                        150.0f,
                        150.0f,
                        0));

                MainActivity.this.onTouchEvent(MotionEvent.obtain(
                        SystemClock.uptimeMillis(),
                        SystemClock.uptimeMillis() ,
                        MotionEvent.ACTION_UP,
                        200.0f,
                        200.0f,
                        0));

Research on invalid modification of elementui component style

Background: the default font of El tabs is 14px. If you want to change it to 12px, adding styles in style will not work.

Solution: put style in app.vue Inside, the style takes effect

.panel-content .el-tabs__item.is-top{
  font-size 12px
}

Principle analysis: in Vue component, we often need to add scoped to style to make the current style only act on the node of the current component. After adding scoped, the work behind Vue is actually to add a unique attribute identifier like “data-v-1233” to the node of the current component. Of course, it will also add [data-v-1233] to all styles of the current style. In this way, the current style can only act on the node of the current component.

But we need to note that if we add a child component, similarly, if the child component is also identified with scoped, then the node in the child component cannot be set in the parent component.

If the parent component has scoped and the child component is not set, the style of the node of the child component cannot be set in the parent component. Because the parent component uses scoped, the style set in the parent component is unique and will not affect other component styles.

When I used the Vue quill editor rich text editor, I came across this pit. I just want to set the height of the content area. In this case, it must be in the App.vue Set in, we App.vue Equivalent to the root container, scoped is not set, so it can be set.

Adding scoped in style is equivalent to adding a unique logo on the page.

Ubuntu 20.04 installing gfortran-6/ libgfortran.so .3

When I try to run the do command under GAMIT on Ubuntu 20.04, it shows:

root@DESKTOP-LF0EAC9:/etc/apt# doy
doy: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory

among libgfortran.so . 3 depending on gfortran-6, try to install gfortran-6:

root@DESKTOP:/etc/apt# apt install gfortran-6
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gfortran-6

The problem here is that Ubuntu 20.04 does not support G + ± 6. Add the following source to/etc/apt/ sources.list For the method of adding source, see the link

deb http://gb.archive.ubuntu.com/ubuntu/ bionic main universe

function

sudo apt-get update

Install GCC + + – 6

apt-get install g++-6

Setting the default version of GCC

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 6

Install gfortran-6

 apt install gfortran-6

Install successfully, run doy

root@DESKTOP-LF0EAC9:/etc/apt# doy 2020 001
Date 2020/01/01  0:00 hrs, DOY   1 JD  2458849.5000 MJD  58849.0000
GPS Week  2086 Day of week  3, GPS Seconds 259200 Day of Week Wed
Decimal Year 2020.000000000 GRACE Seconds 631108800.0

Run successfully