Category Archives: How to Fix

Error: Target container is not a DOM element.

As a React guy, today I’m trying to do a little practice with the little example on the official website. I encountered such a problem during the practice. See the following figure for the error.

reported this error because I customized “elementId” in the index.js file.

solution:
if you want to customize the elementId, you need to change the id of the main dom node in the index. HTML file.

Solution to Spacy’s failure to load (‘de ‘) or (‘en’)

I recently had a problem studying Spacy: OSError: [E050] Can’t find model ‘en’. It doesn’t seem to be a shortcut link, a Python package or a valid path to a data directory.
Baidu got different processing methods, to link here: https://blog.csdn.net/qq_27009517/article/details/83825523
and https://blog.csdn.net/weixin_40408636/article/details/85126513
I solved the problem according to the blog above, but it’s different, so I wrote down my own solution:
Windows: Win +R open:

Enter CMD for the command line window and type Python-m Spacy Download en
Can be downloaded, download success, appear

This does not affect the use of: at this point, run the Python environment to test whether the download succeeded en:

The above results have been tested successfully.

In fact, spacy. Load (‘en’) will still report an error. The test should pass as spacy. Load (‘en_core_web_sm’). The same applies to the way DE. Downloads and testing are the same as EN. Namely spacy. Load (‘ de_core_web_sm ‘)
Attach spacy https://spacy.io/usage/spacy-101

Eclipse startup error: a Java runtime environment (JRE) or Java Development Kit (JDK) must be available

—————————
Eclipse
—————————
A Java Runtime Environment (JRE) or Java Development Kit(JDK)
must be available in order to run Eclipse. No Java Virtualmachine
was found after searching the following locations:
D:\eclipse\jre\bin\javaw.exe
javaw.exe in your current PATH

sure
—————————

before you solve this problem, make sure you have your own JAVA installation and environment variable configuration.
The first solution I used was to manually fill out a D:\ Eclipse \ JRE \bin\javaw.exe (the javaw.exe file can be found in the JDK’s bin directory) following the error message, and Eclipse will open as normal.
The above method is not a regular solution, so in order to prevent unknown problems, I finally took the second solution to solve.
open the Eclipse root, eclips.ini file, and add the first two lines:
-vm
C:\ProgramFiles\Java\jdk1.8.0_45\bin\javaw.exe (this is the absolute path of your installed javaw.exe)

reproduced from https://blog.csdn.net/xxm5571386/article/details/52972552

It can’t connect to local MySQL server through socket ‘/ tmp/ mysql.sock ‘(2) “;

Recently, I rented an Aliyun Cloud wing server and enjoyed a discount while I was still a student. I rented a server of Ubuntu16.04 version of aliyun. When building mysql, it could run at the beginning. Due to a manual stroke, I accidentally deleted the socket file of mysql, and then no matter how I uninstalled and reinstalled it, this problem occurred:

root@iZufkfljcZ:~# mysql -uroot -p
Enter password: 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I searched online for a long time, but all I found were repeated articles and did not explain why this problem occurred. I searched for a day and then found an article explaining the function of mysql.sock file. Then I analyzed why this problem occurred and made a summary for future reference.

The problem I have is: can’t find mysql.sock if you can run it

find/-name mysql.sock

This command, and can look up the results, just look up the results of a soft connection to the/TMP directory can be resolved (the Internet is so resolved).

However, after I executed this statement, there was no response and I did not find the mysql.sock file.
Before we do that, we need to understand what this mysql.sock file is for.
The localhost connection is usually made through a Unix domain socket file, typically/TMP /mysql.sock. If the socket file is deleted, the local customer cannot connect. This may occur when your system is running a CRon task that removes temporary files under/TMP.
If you are unable to connect because of a lost socket file, you can simply recreate it by restarting the server. Because the server recreates it at startup.
If, like me, restarting the server doesn’t change anything, you can start by executing the following statement:

# mysql -uroot -h 127.0.0.1 -p 

Not surprisingly, this sentence should be enforceable,
You can’t make a socket connection now because it’s gone, so you can make a TCP/IP connection

If the socket file is deleted by a cron task, the problem will repeat itself unless you modify the CRon task or use a different socket file or use a different socket file. My solution is to re-specify a different socket, or I don’t have a mysql.sock file at the moment, so I’m going to figure out a way to generate one.

First, change the my.cnf file. The directory in my server is /etc/my.cnf. If not, you can use find to find it,

The next step is to save the exit, make sure the directory exists, and change the permissions on the directory

# chmod 777 /var/lib/mysql

The preparation steps are done, and then the mysql and mySQLD services restart

# service mysql  restart
# service mysqld restart

When I restarted mySQLD service, the reboot failed, as shown below:

root@iZufkfljcZ:~# service mysqld start
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalc
tl -xe" for details.

At this time, the prompt can input SystemCTL Status mysqld.service to see the specific reason for the failure, then:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
● mysqld.service – LSB: start and stop MySQL
Loaded: Loaded (/etc/init.d/mysqld; bad; Vendor presets: enabled)
Active: failed(Result: exit-code) since March 2017-12-20 10:38:30 CST; 45s ago
Docs: man:systemd-sysv-generator(8)
Process: 2154 ExecStart=/etc/init.d/mysqld start (code=exited, status=1/FAILURE)

. Starting LSB: start and stop MySQL…
December 20 10:38:29 iZufkfljcZ mysqld[2154]:
: iZufkfljcZ mysqld_safe[2689]:Logging to ‘/var/log/ MySQL /error.log’.
: iZufkfljcZ mysqld_safe[2693]:Directory ‘/var/run/mysqld’ for UNIX socket file Don ‘t The exists.
on December 20 10:38:30 iZufkfljcZ mysqld [2154] :. * The server quit without updating The PID file (/ var/run/mysqld/mysqld. PID).
on December 20 10:38:30 iZufkfljcZ systemd [1] : mysqld. Service: Control process exited, code=exited status=1
, dec.20 10:38:30 iZufkfljcZ systemd[1]: Failed to start LSB: start and stop MySQL.
, dec.20 10:38:30 iZufkfljcZ systemd[1]: mysqld.service: Unit dropped failed state.
dec.20 10:38:30 iZufkfljcZ systemd[1]: mysqld.service: failed with result ‘exe-code’

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
The /var/run/mysqld directory does not exist. This directory is required for the mySQld service restart.

root@iZufkfljcZ:~# mkdir /var/run/mysqld
root@iZufkfljcZ:~# chmod 777 /var/run/mysqld/
root@iZufkfljcZ:~# service mysqld start
root@iZufkfljcZ:~# 

After the directory is built, reruns the mySQld service and finds that the restart was successful, so let’s look again at why this directory was built in the first place. Open this directory and see:

root@iZufkfljcZ# ls /var/run/mysqld
mysqld.pid  mysqld.sock  mysqld.sock.lock

Found a familiar object, mysqld.sock, but is this what we need?Ignore him, use this sock file to log into mysql to see if you can:

root@iZufkfljcZ:/var/run/mysqld# mysql -uroot -p -S /var/run/mysqld/mysqld.sock 
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.20-0ubuntu0.16.04.1 (Ubuntu)

Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

, once we run it, we find that it seems to be ok, then we can do it. Let’s change the previous configuration back, the previous directory should be/TMP /mysql. Sock, we can establish a soft connection to it.

root@iZufkfljcZ:~# ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock
root@iZufkfljcZ:~# ls /tmp/
mysql.sock

So you have the mysql.sock file that you need in your my.cnF configuration file in the TMP directory, and then you can just change my.cnF back into it.

Solution to “Ruby / San check”

Baidu one found that everyone is an article to turn around, as follows:
The root of the problem is the lack of a necessary C++ library. If it is a CentOS system, run the following command to resolve:

    yum install glibc-headers

    yum install gcc-c++ 

In Ubuntu, run the following command:

   apt-get install build-essential 
 
   apt-get install g++

I checked my GCC carefully and found that it was installed, not this problem. When executing YUM Update, I found this line:

glibc-headers-2.12-1.80.el6.x86_64 has missing requires of kernel-headers

So I tried it

yum install  kernel-headers

Problem solving.

Link: fatal error LNK1104: cannot open file “debug”/ xx.exe The question of

Question:
running VC always occurs when
Linking…
LINK: fatal error LNK1104: cannot open file “Debug/xx. Exe”
error link-exe.
xx.exe – 1 error(s), 0 warning(s)
I was
the Windows 7 system in C:/Program Files/under the Microsoft Visual Studio/myprojiects is can’t find project file you wrote, because in this directory is writing something need administrator privileges, the system will only be reported to the “always open a file” error, the solution is to close the software, and then to administrator privileges to run the software, so that you can perfect debugging Program.

DB2, create stored procedure error, sqlcode = – 104, sqlstate = 42601, PSM_ semicolon

Database editing software Aqua Data Studio/DbVisualizer
stored procedures as follows:

create or replace procedure DM.proc_test(
	in i_seq integer,
	out o_flag integer 
)
begin
  declare v_test varchar(20);
end;

[CREATE]DB2 SQL Error:SQLCODE=-104,SQLSTATE=42601,SQLERRMC= end-of-statement; E v_test varchar(20); < psm_semicolon>
[END]DB2 SQL Error:SQLCODE=-104,SQLSTATE=42601,SQLERRMC=END-OF-STATEMENT; END; JOIN < joined_table>

[CREATE]DB2 SQL Error:SQLCODE=-104,SQLSTATE=42601,SQLERRMC=END-OF-STATEMENT;E v_test varchar(20);<psm_semicolon>
[END]DB2 SQL Error:SQLCODE=-104,SQLSTATE=42601,SQLERRMC=END-OF-STATEMENT;END;JOIN <joined_table>

for database editing software or command Windows, the default closing symbol is “;” , so when the stored procedure above is executed, the statement will end only before the end statement.

modify the editor’s statement terminator to be other symbols
1) command window modify statement terminator (example, change to @) :
delimiter @
2) database software, modify the delimiter (delimiter) to be other in configuration

Analysis of compilation errors of “error conflicting types for function”

When you’re compiling a C program using GCC, you sometimes run into a compilation error that says “error: conflicting Types for ‘function.'” The definition of a function is not consistent with the declaration.

(a) First, let’s take a look at an example where the definition and declaration of a function are inconsistent:

#include <stdio.h>

int func(int a);

int func(void) {
    return 0;
}

int main(void) {

    func();

    return 0;
}

Compiler:

gcc -g -o a a.c
a.c:5:5: error: conflicting types for ‘func’
 int func(void) {
     ^
a.c:3:5: note: previous declaration of ‘func’ was here
 int func(int a);

You can see that this error occurs at compile time because the declaration and definition of “func” are inconsistent (one with arguments and one without).
(b) Recently, when I ported some code to JFFS2, this error also occurred at compile time. But I found that the declaration and definition of the function in the header file were exactly the same, which surprised me. The conclusion is that the function parameter type is defined after the function is declared. The simplified code is as follows:

#include <stdio.h>

void func(struct A *A);

struct A {
        int a;
};

void func(struct A *A)
{
        printf("%d", A->a);
}

int main(void) {
        // your code goes here
        struct A a = {4};
        func(&a);
        return 0;
}

Where the definition of “structure A” is placed after the “func” function declaration, and the func function argument is the “structure A*” type. The compilation results are as follows:

gcc -g -o a a.c
a.c:3:18: warning: ‘struct A’ declared inside parameter list
 void func(struct A *A);
                  ^
a.c:3:18: warning: its scope is only this definition or declaration, which is probably not what you want
a.c:9:6: error: conflicting types for ‘func’
 void func(struct A *A)
      ^
a.c:3:6: note: previous declaration of ‘func’ was here
 void func(struct A *A);
      ^

You can also see the output error “error: Conflicting Types for ‘func'”. Perhaps a compilation warning is a clue.

Error 500: javax.servlet.ServletException : srve0207e: Solutions

The WAS deployed application access Error “Error 500: javax.mail. Servlet. ServletException: SRVE0207E: Uncaught initialization exception created by the servlet”

Scene: in the was 8.5.5.12 deploying the war file, and started to visit a web page, return an Error: Error 500:
javax.mail. Servlet. ServletException: SRVE0207E: Uncaught initialization
the exception created by the servlet

Solutions:

    determine JDK version
    confirmed that the application deployed in this environment only supports JDK1.8, configure the JDK version in the server, figure below:

    configuration remember to restart the server, to take effect.
    tests whether the web page is normal, and my environment still reports an error of 500. Modify the JSP and JSF parameters

    save and restart the server, test again, and the page will display normally.

The reason why 500 error was reported has not been found yet, because there is another set of environment with the same version of WAR package applied, and another set of WAS can be deployed and directly accessed, this set of WAS will appear. It is very strange, if an experienced god passes by, I would like to consult you freely.

push failed The requested URL returned error: 403

Once the code is written, synchronize the local repository with Github.

 git push -u origin master

error: The requested URL returned error: 403 Forbidden while accessing https://github.com/user/test.git/info/refs
This is due to permission issues, you can modify. Git /config file appends username and password:
1) Edit. Git /config file
2) Find the URL variable under [Remote “Origin”]
3) modify the url = https://github.com/user/test.git, modified to url = ssh://[email protected]/user/test.git, finished modification
4) Push origin Master through Git to synchronize, which has been successful