Syntax Error: Error: Cannot find module ‘less‘ [How to Solve]

Question: syntax error: error: cannot find module ‘less’

Cause: the installed version of less loader does not match that of less

pay more attention to warnings during installation to avoid this problem.
there is a prompt during installation. You must install the corresponding less version for use with

Solution: install the corresponding version (pay more attention to warnings in the future)

Error about XX error 1 querying major version

Error Code 1: Myelin (cuBLASLt error 1 querying major version.)

This error is because the appropriate version information is not found. When looking for dynamic link libraries in some libraries, they will look for them according to the version information behind so . If they are not found, an error will be reported.

resolvent:

Set all the version suffixes of. So to find the path. OK~

For example, use the ln - s libcublaslt.so.11 libcublaslt.so.11.5.2.43 command to set the corresponding so:

 libcublasLt.so -> libcublasLt.so.11
 libcublasLt.so.11
 libcublasLt.so.11.5.2.43 -> libcublasLt.so.11

How to Solve jupyter notebook service error

Jupyter notebook service error

Problem background

I created a CONDA virtual environment of Python 3.8 and prepared to install Jupiter notebook in this virtual environment. Start Jupiter notebook in CMD to pop up the browser and working interface smoothly. However, when creating a new IPython file, the kernel always shows that it is busy and cannot run the script in the cell.

reason

Through searching for information, I found that most of the reasons on the Internet were attributed to the mismatch between ipykernal and pyzmq versions. For this purpose, I refer to another virtual environment I created earlier. The jupyter notebook in this environment can run normally, and its corresponding versions are ipykernal 6.2.0 and pyzmq 19.0.2 respectively

Solution:

pip install ipykernal=6.2.0
pip install pyzmq=19.0.2

Error in startup after the supervisor modifies the configuration file: error: cannot open an HTTP server: socket.error reported errno.eaddnotavail

 vim /etc/supervisord.conf

Modify the configuration file
remove the comments of the [inet_http_server] module
and modify the default IP, user name and password

after modification, reload the configuration file:

supervisorctl reload

At this time, it is found that the supervisor service has stopped, systemctl status supervisor View Status:

this is generally an error in the configuration file:
note that the local address is not filled in after the port, such as 47.xxx.xxx.xxx , which refers to who can access the server’s supervisor. If it is not filled in, everyone can access it. For example, it can be directly changed to port =: 9001 , and then reload.

 supervisorctl reload
 systemctl start supervisord

If it is set that everyone can access, you can log in to the browser:

I layhill successfully solved the problem through the above methods. Please correct the deficiencies!

Execution Error SQL_ERROR_INFO: near “.“: syntax error

I made the simplest mistake when doing SQL problems today

update  salaries set salaries.salary = salaries.salary *1.1 
where salaries.emp_no = (select emp_no from emp_bonus ) and to_date = '9999-01-01'

Then the idea reports an error. The error is near “.”: syntax error. In fact, when I update the salary table here, I don’t need to add “.” to index the elements in the table. I can call it directly.

update  salaries set salary = salary *1.1 
where emp_no = (select emp_no from emp_bonus ) and to_date = '9999-01-01'

Just change this.

[Solved] BindingException: Type interface XXX is not known to the MapperRegistry

Problem description

When testing the selection operation of mybatis, the idea reports an error,

org.apache.ibatis.binding.BindingException: Type interface xxx is not known to the MapperRegistry.

Solution:

Reason: each mapper.xml needs to be registered in the mybatis core configuration file
add the following code to mybatis-config.xml.

<mappers>
    <mapper resource="com/dingha/dao/UserMapper.xml"/>
</mappers>

Done!

Using JWT of distributed deployment services Error: JWT check failure:

===2021-09-18 15:55:14.445 ERROR [http-nio-8014-exec-6] com.croot.common.utils.JwtTokenKit Line:72 – JWT Check Failure:
io.jsonwebtoken.PrematureJwtException: JWT must not be accepted before 2021-09-18T15:55:42Z. Current time: 2021-09-18T15:55:14Z, a difference of 27556 milliseconds. Allowed clock skew: 0 milliseconds.
Synchronize server time
Write a script:

Add permissions for the script to be executable by all users for later testing: chmod a+x test.sh
Stop the crond service: service crond stop
Add timed tasks:
[root@CloudDeskTop install]# crontab -e

* * * * * /bin/sh /install/test.sh

View scheduled tasks:
[ root@CloudDeskTop install]# crontab -l

* * * * * /bin/sh /install/test.sh

View which users have scheduled tasks:
[ root@CloudDeskTop ~]# ls /var/spool/cron
root

Start the crond service: service crond start

Check whether there is a test.log file in the/install/directory;

Display the contents of test.log in real time: Tail – F test.log

[Solved] Hive Find Error: FAILED: RuntimeException java.lang.RuntimeException: cannot find field

Project scenario:

Using hive SQL query

Problem Description:

An error is reported when using * in data query, and the field cannot be found

select a.* from mydb.p_6 a;

Direct error reporting

Error: Error while compiling statement: FAILED: RuntimeException java.lang.RuntimeException: cannot find field (0~0 from [0:day, 1:0, 2:(0~0.1], 3:(0.1~0.2], 4:(0.2~0.3], 5:(0.3~0.4], 6:(0.4~0.5], 7:(0.5~0.6], 8:(0.6~0.7], 9:(0.7~0.8], 10:(0.8~0.9], 11:(0.9~1), 12:1] (state=42000,code=40000)

Cause analysis:

The field “0 ~ 0” cannot be found. When creating the table, the field is named (0 ~ 0.1], which leads to incomplete reading of the field,

Solution:

When creating a table, the field names should be standardized. Try not to bring commas and other symbols. Try to underline English letters and numbers

[Solved] Opencv error: assertion__acrt_first_block == header

Problem description

In a project using OpenCV, after changing MDD to MTD, the debug mode encountered an error.

debug_heap.cpp   Line 996

        if (header->_block_header_prev)
        {
            header->_block_header_prev->_block_header_next = header->_block_header_next;
        }
        else
        {
            _ASSERTE(__acrt_first_block == header);            //# 996 LINE
            __acrt_first_block = header->_block_header_next;
        }

        memset(header, dead_land_fill, sizeof(_CrtMemBlockHeader) + header->_data_size + no_mans_land_size);
        _free_base(header);

Solution

Add the following functions to region.cpp

void findContours(const cv::Mat &src, std::vector<std::vector<cv::Point>> &contours, std::vector<cv::Vec4i> &hierarchy, int retr = cv::RETR_LIST, int method = cv::CHAIN_APPROX_SIMPLE, cv::Point offset = cv::Point(0, 0))
{
    using namespace cv;
    CvMat c_image = src;
    MemStorage storage(cvCreateMemStorage());
    CvSeq *_ccontours = 0;
    cvFindContours(&c_image, storage, &_ccontours, sizeof(CvContour), retr, method, CvPoint(offset));

    if (!_ccontours)
    {
        contours.clear();
        return;
    }
    Seq<CvSeq *> all_contours(cvTreeToNodeSeq(_ccontours, sizeof(CvSeq), storage));
    int total = (int)all_contours.size();
    contours.resize(total);

    SeqIterator<CvSeq *> it = all_contours.begin();
    for (int i = 0; i < total; i++, ++it)
    {
        CvSeq *c = *it;
        ((CvContour *)c)->color = (int)i;
        int count = (int)c->total;
        int *data = new int[count * 2];
        cvCvtSeqToArray(c, data);
        for (int j = 0; j < count; j++)
        {
            contours[i].push_back(Point(data[j * 2], data[j * 2 + 1]));
        }
        delete[] data;
    }

    hierarchy.resize(total);
    it = all_contours.begin();
    for (int i = 0; i < total; i++, ++it)
    {
        CvSeq *c = *it;
        int h_next = c->h_next ?((CvContour *)c->h_next)->color : -1;
        int h_prev = c->h_prev ?((CvContour *)c->h_prev)->color : -1;
        int v_next = c->v_next ?((CvContour *)c->v_next)->color : -1;
        int v_prev = c->v_prev ?((CvContour *)c->v_prev)->color : -1;
        hierarchy[i] = Vec4i(h_next, h_prev, v_next, v_prev);
    }
    storage.release();
}

There are still errors after adding,   Find our business code   Change this one to that one:

std::vector<cv::Mat> chs;                //BEFORE
std::vector<cv::Mat> chs(m.channels());  //NEW

It can run successfully