Note: 8.0 is more variable with “. “than 5.7, so only half setting is not enough.
Separately executed:
set global validate_password.policy=0;
set global validate_password.length=4;
Separately executed:
set global validate_password.policy=0;
set global validate_password.length=4;
0.8.0, I get an error message while entering sudo Docker version : I> when I update my Docker version to 0.8.0, I received an error message when I entered sudo docker version :
Client version: 0.8.0
Go version (client): go1.2
Git commit (client): cc3a8c8
2014/02/19 12:54:16 Can't connect to docker daemon. Is 'docker -d' running on this host?
And I’ve followed the instructions And entered command sudo docker-d , And I got this: I> I went into the command sudo docker-d , And I got this: b>
[/var/lib/docker|2462000b] +job initserver()
[/var/lib/docker|2462000b.initserver()] Creating server
open /var/lib/docker/aufs/layers/cf2414da53f9bcfaa48bc3d58360d7f1cfd3784e4fe51fbef95197709dfc285d: no such file or directory[/var/lib/docker|2462000b] -job initserver() = ERR (1)
2014/02/19 12:55:57 initserver: open /var/lib/docker/aufs/layers/cf2414da53f9bcfaa48bc3d58360d7f1cfd3784e4fe51fbef95197709dfc285d: no such file or directory
How do I solve the problem? I> how do I solve this problem?
# 1/f,
Reference: https://stackoom.com/question/1Tlln/Docker cannot connect to the docker daemon
# 2 floor
Do a ps aux>4 grep docker I> Do a ps aux>5 grep docker ps aux>6 grep docker0 to see if the daemon is running. I>1 2 3 ps aux>7 grep Docker to see if the daemon is running. If not run /etc/init.d/docker start I> If not run /etc/init.d/docker start
The # 3 floor
I had the same problem – “Can’t connect to docker daemon.” I> I had the same problem – “Can’t connect to docker daemon.” (except I didn’t get any ‘file not found’ errors on trying to start the server.) I> (except I didn’t get any ‘file not found’ errors on trying to start the server.)
‘ps’ showed that “/usr/bin/ docker-d “was still running I> ‘ps’ showed “/usr/bin/ docker-d” was still running b>
I realised that I “d never later succeeded in running the server myself Mr. I> I realized that I never really succeeded in running the server. Every attempt had produced I> each attempt produced b>
...
2014/03/24 21:57:29 pid file found, ensure docker is not running or delete /var/run/docker.pid
So I belatedly realised that installing docker had maybe registered the daemon with upstart, which had started it for me. I> So I belatedly realized installation docker may have already registered with the upstart daemon, this has already started it for me. b> Hence, trying to kill the daemon to manually restart it fails (operation not permitted). I> so, try to terminate the daemon to manually restart it failed (operation is not allowed). So I did a I> So I did a I> So I made a b>
sudo kill -9 <PID>
on the daemon process. I> on the daemon. Another daemon immediately took its place, and this new one DOES now let my CLI client connect: I> Another daemon now lets my CLI client connect: b>
$ sudo docker info
Containers: 0
Images: 0
Driver: aufs
Root Dir: /var/lib/docker/aufs
Dirs: 0
WARNING: No memory limit support
WARNING: No swap limit support
# 4 floor
I have similar problem. I> I have similar problem. I had to logout and login again to shell because I have just installed Docker and following command didn’t show in my environment. I> I had to logout and login the shell again because I had just installed Docker and the following commands were not shown in my environment.
export DOCKER_HOST=127.0.0.1:4243 >> ~/.bashrc
The # 5 floor
The best way to find out according to Docker isn ‘t working will be to run The daemon manually. I> find The Docker not work is The best way to manually run daemons.
$ sudo service docker stop
$ ps aux | grep docker # do this until you don't see /usr/bin/docker -d
$ /usr/bin/docker -d
The Docker daemon logs to STDOUT, so it will start spitting out whatever it’s doing. I> Docker daemon logs to STDOUT, so it will start spitting out whatever it’s doing.
I>Here was what my problem was: I> this is my problem : b>
[8bf47e42.initserver()] Creating pidfile
2015/01/11 15:20:33 pid file found, ensure docker is not running or delete /var/run/docker.pid
This was because the instance had been cloned from another virtual machine. I> This is because the instance has been cloned from another virtual machine. I just had to remove the pidfile, and everything worked afterwards. I> I just need to delete the pidfile, and everything worked afterwards.
Of course, instead of blindly assuming this will work, I ‘d suggest running the daemon manually one more time and reviewing the log output for any other errors before starting the service back up. I> of course, I suggest that don’t blindly assume that this will be effective, I suggest to manually run again daemon, And check the log output for any other errors before starting the service backup.
# 6 building
, I got the same problem. I>, , I got the same problem. In CentOS 6.5: I> In CentOS 6.5: b>
ps aux |grep `cat /var/run/docker.pid`
If it shows no Docker daemon exists, then I type: I> If it shows no Docker daemon exists, then I type: b>
docker -d
I> and Then press Ctrl KBD> + D KBD>0 to stop Docker. Because we use the -d option, Docker will run as daemon. I> Because we use the -d option, Docker will run as daemon. Now we can do: I> Now we can do: b>
service docker start
Then I can do a docker pull centos. I> Then I can do a docker pull centos. That’s all. I> .
NOTE: If these do not work, you can try yum update, and then repeat these again, because I yum install before these. I> NOTE: If these don’t work, you can try yum update and then repeat these as I did before yum install.
print(‘ b ‘\xe5\x9c\ x93\xe7\x8e\ xe6\x97\xb6’. Decode ‘GBK’)
SyntaxError:
SyntaxError: unexpected character after line character
Modify it:
Print (b ‘\xe5\x9c\xa3\ x98\x93\xe7\x8e\ xe6\x97\xb6’. Decode ‘GBK’)
passed.
turned out to be the result of the addition of an extra pair of ‘s to b’ \xe5\x9c\ xe6\ x93\xe7\x8e\ xe6\x97\xb6 ‘.
When you enter the command NPM start to start the project, sometimes you will encounter such Error Error: Cannot find module ‘mongoose’, missing the module mongoose.

Error: Cannot find module 'mongoose'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (D:\loginproject\routes\index.js:3:16)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start 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! C:\Program Files\nodejs\node_cache\_logs\2019-01-09T01_53_44_235Z-debug.log
The solution at this point is to install the missing module:
npm install mongoose
Run successfully, open the browser to enter the access address, you can see the project.

Girl when she was the original author: qi technology blog: https://www.jianshu.com/u/05f416aefbe1
90 front after sister, love programming, love, love.
stick to summarize the technical problems encountered in the work, keep a record of what you think and see in the work, for the blog above there are no questions, you can join the qq group to ask me: 473819131.
When springBoot lets the interceptor, the interceptor object does not use the New interceptor object, but instead USES bean injection.
@Configuration
public class WebAppConfigurer implements WebMvcConfigurer {
@Autowired
private AuthorizationInterceptor authorizationInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(authorizationInterceptor).addPathPatterns("/**");
}
}
Do not use the @input event of EL-input, use this event, use buffering does not work. The actual code is as follows:
<template>
<el-input suffix-icon="el-icon-search" v-model="page.searchCode" clearable></el-input>
</template>
<script>
data() {
return {
timer: '',
page:{
searchCode:''
}
}
},
watch: {
'page.searchCode': {
deep: true,
handler(newVal, oldVal) {
// if (newVal.trim().length !== 0) {
//this.getList is a method called after a delay of 500ms.
this.debounce(this.getList, 500)
// }
}
}
},
methods: {
debounce(fn, wait) {
if (this.timer !== null) {
clearTimeout(this.timer)
}
this.timer = setTimeout(fn, wait)
}
},
getList(){}//The request can be written in here.
}
</script>
Springboot starts, closes, and restarts scripts in Linux as jar packages
Start the
Write the startup script startup.sh
#!/bin/bash echo Starting application
/ etc/profile
nohup java -jar test.jar &
authorization
chmod +x startup.sh
Shut down
Write the close script stop.sh
#!/bin/bash
PID=$(ps -ef | grep test.jar | grep -v grep | awk '{ print $2 }')
if [ -z "$PID" ]
then
echo Application is already stopped
else
echo kill $PID
kill $PID
fi
authorization
chmod +x stop.sh
restart
Write the restart script restart. Sh
#!/bin/bash echo Stopping application source ./stop.sh echo Starting application source ./startup.sh
authorization
chmod +x restart.sh
#!/bin/sh
RESOURCE_NAME=maf.jar
CONFIG_PATH=/maf/maf-service
#Stop
tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
if [ ${tpid} ]; then
echo 'Stop Process...'
kill -15 $tpid
fi
sleep 5
#Closed
tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
if [ ${tpid} ]; then
echo 'Kill Process!'
kill -9 $tpid
else
echo 'Stop Success!'
fi
tpid=`ps -ef|grep $RESOURCE_NAME|grep -v grep|grep -v kill|awk '{print $2}'`
if [ ${tpid} ]; then
echo 'App is running.'
else
echo 'App is NOT running.'
fi
rm -f tpid
nohup java -Dspring.config.location=$CONFIG_PATH/application.properties -jar $RESOURCE_NAME > nohup.out 2>&1 &
echo $! > tpid
echo Start Success!
tail -f nohup.out
Note: 1. -dspring.config. location: Specify the configuration file
For yML type configuration files, you simply place them in the sibling directory of the JAR without specifying them
2. Grep -v Grep eliminates the row
Dlogging.config=/data/apps/maf/ maf-Yunyan /logback.xml
The Python virtualenv
Install VirtualEnv2.1 Install Virtualenv2.2 Create virtual Environment 2.3 Activate/exit virtual Environment
3. TIps
1. What is VirtualEnv
Virtualenv is short for Virtual Environment, meaning a virtual environment.
so what’s good about python using it?Some!
suppose I did A project A before, using Django2.2. Now that there is a new version of Django3.1, I want to use the latest version of Django. The problem is that I installed the new version of Django, and project A using the old version may not run smoothly.
this is where virtualenv comes in. It can create multiple virtual environments simultaneously, allowing multiple versions of Django to exist on a single computer.
2. Install VirtualEnv
2.1 install virtualenv
pip install virtualenv
2.2 Create a virtual environment
Create a virtual environment.
command format:
virtualenv+ environment name
virtualenv test_env1
virtualenv test_env2
2.3 Activate/exit the virtual environment
Enter the virtual environment, and then you can install the package in the virtual environment.
Win:
Run\Scripts\activate access a virtual environment
Run\Scripts\deactivate exit a virtual environment
3. TIps
There is no package installed in the virtual environment and a re-pip is required. The Python interpreter is in the /Scripts/ Python.exe directory.
Scene:
The price data type in the database is Decimal, and the price data type in entity class A is BigDecimal. When it is necessary to use equals method to compare the A1 object passed from the front end with the A2 object quashed from the database, the result is false even if the object attributes are the same.
why
Debug found that the price value of the object A1 passed from the front end was 0.1 after JSON transformation, while the price value of the a2 object query from the database was 0.1000. Alt + INSERT equals method was used to call the EQUALS method of BigDecimal.
BigDecimal a = new BigDecimal("1.0");
BigDecimal b = new BigDecimal("1.00");
System.out.println(a.compareTo(b) == 0 ); // true
System.out.println(a.equals(b)); // false
The equals method of BigDecimal compares precision and values, while the compareTo method only compares values.
The solution
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ProProductSkuEntity that = (ProProductSkuEntity) o;
return Objects.equals(id, that.id) &&
Objects.equals(productId, that.productId) &&
compareBigDecimal(price, that.price);
}
public boolean compareBigDecimal(BigDecimal a, BigDecimal b) {
return (a == b) || (a != null && a.compareTo(b) == 0);
}
Modify the equals method overwritten in the entity class, customize the compareBigDecimal method, use compareTo to compare values of the BigDecimal type, and you can also put this method in the utility class.