- 博客(18)
- 收藏
- 关注
原创 python3--os.path获取当前文件的绝对路径和所在目录
一.__file__关于__file__属性,python官方文档的定义是: __file__ is the pathname of the file from which the module was loaded, if it was loaded from a file. The __file__ attribute may be missing for certain types...
2018-12-30 18:25:44 43823
原创 Python类中__new__()方法 和 __init__()方法区别
一.__new__()方法官方文档:object.__new__(cls[, ...])Called to create a new instance of class cls. __new__() is a static method (special-cased so you need not declare it as such) that takes the class of...
2018-12-29 17:03:22 2136 1
原创 python中下划线在变量、函数中的意义总结
一.说明因为python语言的不断变化,所以下面总结的内容在python的某一个版本中可能不适用,具体以python官网文档为准。二._xxx单下划线开头官方文档说明:_single_leading_underscore:weak "internal use" indicator. E.g. from M import * does not import objects wh...
2018-12-29 12:11:01 222
原创 git pull出现“fatal: refusing to merge unrelated histories“
一.问题描述从远程仓库拉取代码到本地仓库的时候提示:zz@DESKTOP-MR95PVJ MINGW64 /d/Tool/PythonProject/drfdemo (master)$ git pull origin masterFrom https://gitee.com/sweeneys/drfdemo * branch master -> F...
2018-12-24 10:50:33 539
原创 MySQL--Windows下修改root用户密码的方式
一.版本说明1.windows: win102.MySQL: 8.0.13 MySQL Community Server - GPL说明:如果版本不同,那么修改方式可能不一样。二.修改步骤(前提:原密码还记得)1.进入到mysql client2.修改密码使用如下命令修改:ALTER USER 'root'@'localhost' IDENTIFIED BY 'M...
2018-12-23 10:03:58 197
转载 linux安装uwsgi后运行hello world测试用例不输出hello world
说明:转载自https://blog.csdn.net/zhangmingbao2016/article/details/79615121原因:测试用例对于python2.x 和 python3.x的写法不同。 python2.x请用一下用例测试:def application(env, start_response): start_response('200 OK', [('...
2018-12-21 16:46:16 347
原创 Job for nginx.service failed because the control process exited with error code. See "systemctl stat
一.问题描述启动nginx的时候提示:root@iZwz94kwqu5mk9oxpv2m2tZ:~/sites/mysite# service nginx restartJob for nginx.service failed because the control process exited with error code. See "systemctl status nginx.s...
2018-12-20 10:50:15 60042 9
转载 Nginx错误日志(error_log)配置及信息详解
转载自:https://www.phpriji.cn/blog/detail/20181126132625gvxblv.htmlNginx软件会把自身运行的故障信息及用户访问的日志信息记录到指定的日志文件里。包括 PHP 的报错信息,方便查错,例如:2018/11/26 09:59:17 [error] 11641#0: *38857054 FastCGI sent in stder...
2018-12-20 09:40:14 26361
原创 Node--Ubuntu下源码编译安装Node.js(时间比较长)
一.下载地址下载地址:https://nodejs.org/en/download/二.下载源码root@iZwz94kwqu5mk9oxpv2m2tZ:~# cd /usr/local/src/root@iZwz94kwqu5mk9oxpv2m2tZ:/usr/local/src# wget https://nodejs.org/dist/v10.14.2/node-v10.1...
2018-12-19 10:42:12 6588 6
原创 Python--Ubuntu系统下源码安装uWSGI和配置
一.uWSGI下载地址https://uwsgi-docs.readthedocs.io/en/latest/Download.html二.安装1.下载wget https://projects.unbit.it/downloads/uwsgi-2.0.17.1.tar.gz2.解压tar -zxvf uwsgi-2.0.17.1.tar.gz3.进入到解压目录...
2018-12-18 18:41:54 1284
原创 Nginx常用命令
说明:文件路径可能会不一致。一.启动nginxnginx二.查看nginx进程ps -ef | grep nginx说明:查看nginx进程,nginx进程由主进程和工作进程组成。工作进程的数量根nginx.conf中的配置参数worker_processes有关。三.平滑启动nginxnginx -s reload平滑启动的意思是在不停止nginx的情...
2018-12-18 11:07:56 214
原创 git push --force
一.--force命令如果git要强制覆盖,那么可以使用--force命令。$ git push --force origin 二.参考资料[1]阮一峰 Git远程操作详解
2018-12-17 15:32:39 68022 7
原创 Git错误--error: src refspec master does not match any.
一.问题描述将本地仓库的内容push到远程仓库时提示错误:error: src refspec master does not match any.error: failed to push some refs to 'https://gitee.com/sweeneys/mysite.git'二.问题分析add之后忘记commit,本地仓库为空,所以导致该错误。三.解决方法...
2018-12-17 15:15:37 762
原创 Nginx--Linux下Nginx的安装(编译的方式)
一.版本说明1.Linux:阿里云Ubuntu16.042rewrite模块重写需要的 pcre:8.42(http://www.pcre.org/)3.gzip模块解压需要的zlib:1.2.11 (http://www.zlib.net/)4.ssl 需要 的openssl :1.1.1a(https://www.openssl.org/source/)5..Nginx:1...
2018-12-06 22:02:27 375
原创 MySQL--数据库的基本操作
一.登录与退出1.登录mysql -u root -p说明:-u——用户名-p——密码2.退出quit或者exit二.查看数据库查看当前MySQL服务器上有哪些数据库:SHOW DATABASES;三.使用/切换到指定数据库USE 数据库名;四.列出当前的库有哪些表SHOW TABLES;五.查看指定表的数据结构1.以行方式查看:DE...
2018-12-06 09:43:13 169
原创 Sublime Text3配置Vue 语法
一.VUE语法高亮和自动补全1.sublime中:Ctrl + Shift + P 2.输入Vue Component选择提示的下载。下载完成后重启Sublime即可。
2018-12-05 09:02:41 954
原创 Linux下安装MySQL
一.说明1.linux系统:阿里云的ubuntu二.安装步骤1.sudo su进入管理员模式qxh@iZwz94kwqu5mk9oxpv2m2tZ:~$ sudo su2.同时安装mysql-server, mysql-client, mysql-common注:这里使用的是命令aptitude(需要安装好),也可以使用apt-get。root@iZwz94kwqu...
2018-12-04 16:26:22 132
原创 Anaconda环境下安装OpenCV
一.版本说明1.anaconda:conda 4.5.112.windows:win10二.安装流程1.在conda的信任频道中添加conda-forge频道。conda-forge频道是由开源社区领导,用于提供大量的代码片段和软件包。参考链接:https://conda-forge.org/conda config --add channels conda-forge...
2018-12-03 22:01:42 3255
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人