
The reason:
It’s when you copy it, you bring some special symbols.
Copy that string of code to NotPad ++ or text, and then copy it into your compiler, and you’ll solve the problem

The reason:
Introduction & lt; dependency> . < /dependency> Invalid format
Solution:
1. Remove all carriage returns and line feeds from the part with the wrong format
2. Format (Ctrl + Alt + L)
ERROR 8040 – O.A.C.C.C. [nio – 8080 – exec – 1]. [[. [/] [dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause

to find for a long time, found and @autowired didn’t add question
service plus, didn’t add mapper
The error message is as follows.
Severe :Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.data.redis. RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions. JedisConnectionException: Could not get a resource from the pool] with root cause
Because the ip address on the linux system in the virtual machine has changed, the configuration file in springboot has forgotten to change it.
Enter [root@localhost bin]# ip addr to see the ip address
Just change the configuration file
spring.redis.host=
Factory method ‘redisConnectionFactory’ threw exception; nested exception is java.lang. NoClassDefFoundError: org/apache/commons/pool2/impl/GenericObjectPoolConfig
springboot integration redis error
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisUtil': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisTemplate' defined in class path resource [com/fhlkd/config/RedisConfig.class]: Unsatisfied dependency expressed through method 'redisTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/LettuceConnectionConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory]: Factory method 'redisConnectionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool2/impl/GenericObjectPoolConfig
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:337)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1429)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:125)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)
... 63 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisTemplate' defined in class path resource [com/fhlkd/config/RedisConfig.class]: Unsatisfied dependency expressed through method 'redisTemplate' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/LettuceConnectionConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory]: Factory method 'redisConnectionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool2/impl/GenericObjectPoolConfig
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:787)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:528)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:454)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:543)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:513)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:653)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:224)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:116)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:334)
... 79 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/LettuceConnectionConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory]: Factory method 'redisConnectionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool2/impl/GenericObjectPoolConfig
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:645)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:625)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1287)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1207)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:874)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:778)
... 95 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory]: Factory method 'redisConnectionFactory' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool2/impl/GenericObjectPoolConfig
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:640)
... 109 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/pool2/impl/GenericObjectPoolConfig
at org.springframework.data.redis.connection.lettuce.LettucePoolingClientConfiguration$LettucePoolingClientConfigurationBuilder.<init>(LettucePoolingClientConfiguration.java:94)
at org.springframework.data.redis.connection.lettuce.LettucePoolingClientConfiguration.builder(LettucePoolingClientConfiguration.java:51)
at org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration$PoolBuilderFactory.createBuilder(LettuceConnectionConfiguration.java:136)
at org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration.createBuilder(LettuceConnectionConfiguration.java:100)
at org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration.getLettuceClientConfiguration(LettuceConnectionConfiguration.java:86)
at org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration.redisConnectionFactory(LettuceConnectionConfiguration.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 110 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.pool2.impl.GenericObjectPoolConfig
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 121 more
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
Python code training neural network: “Imerror: DLL load failed: page file is too small to complete operation.”
This problem can arise in two ways.
(1) not only in running a project to another project a python program is running, turn off it.
② The Windows operating system does not support Python’s multi-process operation. The place where the neural network uses multiple processes is on the data set load, so set the num_workers parameter in the DataLoader to 0.
train_loader = torch.utils.data.DataLoader(
train_dataset,
batch_size=16,
shuffle=True,
num_workers=0, # SET 0
)
def getInfoOfInputFile(input_file_path):
global info
info = []
temp = {}
getInfo = pd.read_excel(os.path.join(os.getcwd()+'\\input', input_file_path), sheet_name="frequency_plan", dtype=str, keep_default_na=False)
columns = getInfo.columns.size
rows = getInfo.iloc[:, 0].size
for i in range(0, rows):
temp['MAINFLOW'] = getInfo['MAINFLOW'][i]
temp['SUBFLOW'] = getInfo['SUBFLOW'][i]
temp['TESTSTUITE'] = getInfo['TESTSTUITE'][i]
temp['SPEC'] = getInfo['SPEC'][i]
temp['TESTMOTHED'] = getInfo['TESTMOTHED'][i]
temp['PARA'] = ''
for j in range(5, columns): # parameters start from column 6
if(getInfo.iat[i, j] == ''):
pass
else:
temp['PARA'] += ((getInfo.iat[i, j])+'\n\t\t\000')
print(temp['PARA'])
print("*******************************")
info.append(copy.deepcopy(temp))
# return info
Set the Form property allowDrop = True;
In the Form event C # tutorial
private void Form1_DragDrop(object sender, DragEventArgs e)
{
string localFilePath = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();//Full path of the file
GetExtension(localFilePath);//file suffix name
if (extension == ".cbd")
{
//todo you code
}
}
private void Form1_DragEnter(object sender, DragEventArgs e)
{
string localFilePath = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();
string extension = System.IO.Path.GetExtension(localFilePath);
if (string.Compare(extension, ".cds", true) == 0)
{
e.Effect = DragDropEffects.Move;
}
else
{
e.Effect = DragDropEffects.None;
}
}
The method to remove the title bar (use requestWindowFeature(window.feature_no_title); Why does it fail?
Use RequestWindowFeature (window.feature_no_title) to hide the cause of the failure of the title bar, possibly because the activity inherits from AppCompatActivity. The use method is described in detail below:
A, if you create the activity inherited activity:
the first one: introduction to often use a method:
requestWindowFeature(Window.FEATURE_NO_TITLE);
//remove the title bar of note that this sentence must be written in the book of the setContentView () method, in front of or complains
the second: in the AndroidManifest. Defined in the XML file
<application android:theme="@android:style/Theme.NoTitleBar">
Wrote, then the application will remove the title bar, if just want to get rid of a certain Activity of the title bar, you can add this property to the Activity inside the tag
the third: this is not commonly used in general application, is in the res/values below to create a new style. The XML file
code is as follows:
duplicate code
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<style name="notitle">
<item name="android:windowNoTitle">
true
</item>
</style>
</resources>
Copying code
in this way, we can customize a style, is equivalent to a topic, and then in the AndroidManifest. Defined in the XML file, also can achieve the effect of removing the title bar
code is as follows:
<application
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/notitle">
AppCompatActivity>
getSupportActionBar().hide();
//Remove the title bar Note that this sentence must be written after the setContentView() method
Second: You can do the following in AndroidManifest.xml, so there is no title bar
<application
android:theme="@style/Theme.AppCompat.NoActionBar">
Use RequestWindowFeature (window.feature_no_title) to hide the cause of the title bar failure.
might be an activity that inherits from AppCompatActivity.
Create an activity that inherits an activity. Create an activity that inherits an activity.
The first method is often used when getting started:
requestWindowFeature(Window.FEATURE_NO_TITLE);
//Remove the title bar Note that this sentence must be written in front of the setContentView() method, otherwise it will report an error
The second is defined in the AndroidManifest.xml file
<application android:theme="@android:style/Theme.NoTitleBar">
Wrote, then the application will remove the title bar, if just want to get rid of a certain Activity of the title bar, you can add this property to the Activity inside the tag
the third: this is not commonly used in general application, is in the res/values below to create a new style. The XML file
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<style name="notitle">
<item name="android:windowNoTitle">
true
</item>
</style>
</resources>
In this way, we have a custom style, which is equivalent to a theme, and then define it in the AndroidManifest.xml file, which also removes the title bar
<application
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/notitle">
Create an Activity that inherits AppCompatActivity by default
getSupportActionBar().hide();
//Remove the title bar Note that this sentence must be written after the setContentView() method
2 You can do the following configuration in AndroidManifest.xml so that there is no title bar
<application
android:theme="@style/Theme.AppCompat.NoActionBar">
[Solved]RemoveError: ‘requests’ is a dependency of conda and cannot be removed from conda’s operating environment.
Collecting package metadata: done
Solving environment: done
Downloading and Extracting Packages
certifi-2018.1.18 | 144 KB | ############################################################################ | 100%
mkl-2018.0.1 | 155.2 MB | ############################################################################ | 100%
freetype-2.9.1 | 475 KB | ############################################################################ | 100%
scipy-1.0.0 | 13.0 MB | ############################################################################ | 100%
......
......
pyparsing-2.3.1 | 54 KB | ############################################################################ | 100%
kiwisolver-1.0.1 | 60 KB | ############################################################################ | 100%
qt-5.6.2 | 55.6 MB | ############################################################################ | 100%
setuptools-38.4.0 | 540 KB | ############################################################################ | 100%
matplotlib-2.2.2 | 6.5 MB | ############################################################################ | 100%
six-1.12.0 | 21 KB | ############################################################################ | 100%
openssl-1.0.2n | 5.4 MB | ############################################################################ | 100%
pyqt-5.6.0 | 4.5 MB | ############################################################################ | 100%
zlib-1.2.11 | 236 KB | ############################################################################ | 100%
tornado-5.1.1 | 665 KB | ############################################################################ | 100%
sqlite-3.22.0 | 907 KB | ############################################################################ | 100%
cycler-0.10.0 | 8 KB | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: failed
RemoveError: 'requests' is a dependency of conda and cannot be removed from
conda's operating environment.
conda update --force condaconda update –force conda
conda remove c> create : conda create : conda create : conda remove : conda create :
RemoveError: ‘setuptools’ is a dependency of Conda and cannot be removed from Conda
I checked a bunch of blogs and they all suggested updating Conda.
conda update --force-reinstall conda
The problem came again. After the command was entered, the process kept spinning in circles, and the terminal did not show any idea of updating. Angry dead an !!!!
I fat tiger not letter can not treat you!!
Solution:
enter the command: gedit. Condarc
the HTTPS instead of HTTP from the original image of the source can be updated again
I will be the original. Condarc file to the following form, for reference only.
ssl_verify: true
channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
show_channel_urls: true
conda update --force-reinstall conda Be able to normal use after
conda remove or conda create command