Fatal error in CentOS: Python. H: no that file or directory

Today, when I installed the software on my virtual machine, this error occurred. After searching the Internet, I found that I wanted to install Python devel, but I found that I couldn’t solve the problem after installing according to the online command, and then I found that there was another Python 3 devel, that is, I need to install the corresponding devel according to your current version of Python in Linux, I use python3, so the corresponding installation command is:
sudo Yum install python3 devel
if it is python2, the corresponding installation command is
sudo Yum install python3 devel

RuntimeError: received 0 items of ancdata

Party 1:

pool = torch.multiprocessing.Pool(torch.multiprocessing.cpu_count(), maxtasksperchild=1)

Party 2:

   Modify the tensor mode of multithreading to file_ System (the default mode is file)_ Descriptor, limited by the number of open files:

 torch.multiprocessing.set_sharing_strategy('file_system')

Party 3:

Increase the number of open files:

Instead of using sudo ulimit – N command, execute:

sudo sh -c "ulimit -n 65535 && exec su $LOGNAME"

ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.

  Time: May 8, 2021 14:22:35

ERROR Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'true'. Current value: 'false'.. Find more at https://angular.io/errors/NG0100
    at throwErrorIfNoChangesMode (core.js:6792)
    at bindingUpdated (core.js:12940)
    at Module.ɵɵproperty (core.js:14740)
    at InvoiceManagementComponent_Template (invoice-management.component.html:55)
    at executeTemplate (core.js:9600)
    at refreshView (core.js:9466)
    at refreshComponent (core.js:10637)
    at refreshChildComponents (core.js:9263)
    at refreshView (core.js:9516)
    at refreshEmbeddedViews (core.js:10591)

The meaning of the problem is that once the page is rendered, don’t change it. If you change it again, I will report you an error. And that’s it.

Solution: add a line of code to the ngafterviewinit() method

  ngAfterViewInit(): void {
    this.changeDetectorRef.detectChanges();
  }

This only needs to be declared in the constructor

  constructor(
    public changeDetectorRef: ChangeDetectorRef
  ) { }

 

: – 1: error: lnk1168: unable to open xxx.exe for writing

1. Problems

The questions are as follows:

👎 Error: lnk1168: unable to open staging/sggroundcontrol.exe for writing

2. Solutions

On the Internet, it is said that the process is running, just finish the process of the program, open the “process manager”, press the “Ctrl + Alt + delete” key combination, and then find the corresponding process and right-click to finish, as shown below,

but sometimes the task manager can’t find the process, and this situation is generally restarted

Next time, it’s better to drop the program manually, wait for the system to shut down, and then run “Ctrl + R” as follows:

every time you do this, you will never encounter this error again~

Failed to dlsym make_device: undefined symbol: make_device

Failed to dlsym make_ device: undefined symbol: make_ device

Recently, I encountered some bugs when doing development. I have been troubled for a long time. Although I am a good cook, I think I can accumulate it. When I encounter the same type of problems in the future, I have a way to solve the problems. The problem is as follows: Android recovery system can do some basic test demo below. But this latest demo is developed by C + + and C language. Some functions need to rely on dynamic libraries, such as librecovery_ UI. So, but there is a special library called librecovery_ ui.recovery.so。 At that time, using the find command, we could find the generation location of the library. However, when using grep to find the generation location of the dynamic library, we couldn’t find it. We only found the calling location. For a time, we doubted whether we had made a mistake. Finally, we searched under the general system root directory. Finally, we kept printing a lot of messy code under the out subdirectory, thinking it was a program crash, It’s time for ^ C to end the process. But in the end, no matter how many, just let it collapse. Finally, we found the location of the Library under the out directory. It turned out that it was an automatically generated MK file, in which many concise generation dependent library scripts were used. Finally, we found the location of the so.

Then I met the problem on the topic, that is, how can the so library compiled according to the correct android.mk script file not find the defined library when using dlopen call?I wonder if there is a problem with the function, and then I wrote a new function to test the call, and found it still can’t work, Failed to dlsym FN: undefined symbol: test is also displayed. Then I searched the Internet and found that most people said that they needed to add extern “C” to the function. Finally, according to what I said on the Internet, I found that it was still not possible. Finally, I asked my colleagues and got the answer to the question, which is to use the nm command of Linux to find the dynamic library or the static library that contains the functions that can be called. Finally, I found that the dynamic library that I passed to the board did not have the make that I wanted to call_ Then use the find command to find two. So libraries with the same name. Finally, find the function body to be called in another library. Finally, transfer another. So library to the board. Finally, it is successful.

git remote: HTTP Basic: Access denied error resolution

git error: git remote: HTTP Basic: Access denied

Cause of the problem: it may be that the password of the remote warehouse has just been changed, resulting in the inconsistency between the user name and password of the local git configuration and the user name and password registered on gitlab.

1. Solution 1:

Follow the steps shown in the figure

Then continue to use soucetree, you will be prompted to enter the user name and password

2. Solution 2:

If the account password changes, use the following command to re-enter the account password

git config –system –unset credential.helper

If the problem cannot be solved with the first command, enter the following command again:

git config –global http.emptyAuth true

Org.springframework.beans.factory.xml.xmlbeandefinitionstoreexception: the wildcard matching is comprehensive, but the declaration of element XX: XX XX cannot be found

When configuring spring’s XML file, you want to start component scanning. As a result, the following error occurred during the operation:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd">
    <context:component-scan base-package="com.zxb"></context:component-scan>
</beans>

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 10 in XML document from class path resource [bean2.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 52; CVC complex type. 2.4. C: wildcard matching is comprehensive, but the element cannot be found‘ context:component-scan ’A statement from the government.

After searching for a long time, it turned out that in the XML file, you need to specify the specific location of the schema file to be followed through the schemalocation . I forgot to configure it, just add it.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context" 
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/context
                           http://www.springframework.org/schema/context/spring-context.xsd">
    <context:component-scan base-package="com.zxb"></context:component-scan>
</beans>

It’s not detailed enough~

Solve the problem that dbvisualizer cannot connect to mysql8

reference resources: https://blog.csdn.net/yeshang_ lady/article/details/108224358

Reason: due to the change of MySQL driver, we need to change the MySQL driver of dbvisualizer.

resolvent:

Step 1: download the MySQL 8 driver. I didn’t find the address of the blog post above. I used Maven to download it. Just build a maven project. Enter the address of mysql8 in pom.xml

<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<scope>runtime</scope>
		</dependency>

Then, go to Maven reference to find the package address.

Step 2: put the jar package into the MySQL driver directory of dbvisualizer

Step 3: reconfigure the MySQL driver. As shown in the figure below, delete the original MySQL driver configuration and replace it with a new jar directory

 
Step 4: create a connection:

 
Special note: in the database column, you should not only input the database, but also include the time zone

test?serverTimezone=UTC&characterEncoding=utf-8&useSSL=true

 

Error reporting when importing sqoop from Mysql to hive

21/05/06 13:30:53 ERROR tool.ImportTool: Import failed: java.io.IOException: java.lang.ClassNotFoundException: org.apache.hadoop.hive.conf.HiveConf
        at org.apache.sqoop.hive.HiveConfig.getHiveConf(HiveConfig.java:50)
        at org.apache.sqoop.hive.HiveImport.getHiveArgs(HiveImport.java:392)
        at org.apache.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:379)
        at org.apache.sqoop.hive.HiveImport.executeScript(HiveImport.java:337)
        at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:241)
        at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:537)
        at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:628)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243)
        at org.apache.sqoop.Sqoop.main(Sqoop.java:252)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.conf.HiveConf
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at org.apache.sqoop.hive.HiveConfig.getHiveConf(HiveConfig.java:44)
        ... 12 more

Reason: the hive-common-2.3.3.jar package is missing. Just copy it from hive’s lib directory to sqoop’s lib directory.

How to Solve error C2039: “to_ String “: not a member of” STD “

To_string is a function only available in C++11. This error is probably the reason why it was used in older versions of C++Solutions:

#include <string>
#include <sstream>

template <typename T>
std::string to_string(T value)
{
	std::ostringstream os ;
	os << value ;
	return os.str() ;
}

int main()
{
	std::string perfect = to_string(5) ;
}