This is a FAQs file which aims to deal with some small problems or not too much serious problems that may not be able to be categorized or defined, namely, this FAQs may cover a lot of domains of knowledge and focus on how to solve a problem, though most of which are small and simple and easy to deal with.
Let’s just start!
if party is None
7 in a
If you have one variable which is ‘2016-07-23 21:30:34:222’ and another one is ‘2016-07-23 1:00:12:213’ (Both 24-Hour-Time), how can you judge if the two times are within a day? if they are both datetime type variable, you can use the python built-in calculator class, just take a glance at the refers. If they are strings, you can choose to extra 10-character string and use SQL query: something Like ‘%2016-07-23%’ or just use python to judge if the other string contains the substring of one variable(e.g. 2016-07-23).
pip install pillow to install the python image library. However, if you OS is macOS(OS X), you will need to use
brew link jpeg && brew install libtiff libjpeg webp little-cms2(Provided you’ve installed Homebrew) in advance.
PPTP means point-to-point tunneling protocol and VPN means virtual private network.
When I tried to set up a VPN connection using PPTP on Ubuntu, I failed. And the solution was none of service provider, it just needs to change some settings.
Just click on the wifi icon >> VPN connections >> configure VPN >> Choose one >> Edit >> Advanced >> Check Use Point-to-Point Encryption.
Login server by ssh using root role and login mysql using root role and use following commands to create a database ‘test’ and a user ‘test’ to make a sample, which is accessable to all the sources.
iptables -A INPUT -p tcp --dport 3306 -j ACCEPT to allow the mysql connection from remote. If you’ve done such steps and still get a “Connection Failed” error, it may be the mysql service is bind only on 127.0.0.1. Next, we have to edit
/etc/mysql/my.cnf and find “bind-address” and change the ip address from “127.0.0.1” to “0.0.0.0” and use
service mysql restart to restart mysql service.
Tar Extract to specific directory[^How to Extract Tar Files to Specific or Different Directory in Linux]
tar -xf file_name.tar -C /target/directory
tar -xf file_name.tar.gz --directory /target/directory
[^How to Extract Tar Files to Specific or Different Directory in Linux]: How to Extract Tar Files to Specific or Different Directory in Linux
How to install maven on OS X
Download and extract, then get the path, e.g.
vi ~/.bash_profile and add following two statements:
Save it and use
source ~/.bash_profile to reload this configuration.