会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Presley
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
26
27
28
29
30
31
32
33
34
···
42
下一页
2018年7月30日
Docker 启动时容器无法联网
摘要: 转自:https://blog.csdn.net/u014062332/article/details/52911405 启动docker web服务时 虚拟机端口转发 外部无法访问 centos 7 docker 启动了一个web服务 但是启动时 报 WARNING: IPv4 forwardin
阅读全文
posted @ 2018-07-30 09:45 Presley
阅读(532)
评论(0)
推荐(0)
2018年7月29日
Python json & pickle模块
摘要: 一、json,用于字符串和Python数据类型间进行转换(适用于所有语言) 1、Json模块提供了四个功能:dumps 、 dump、loads、load 二、pickle,用于python特有的类型和python的数据类型间进行转换(只适用于python) 1、pickle模块提供了四个功能:du
阅读全文
posted @ 2018-07-29 09:05 Presley
阅读(211)
评论(0)
推荐(0)
2018年7月28日
Python 打印当前文件相对路径和绝对路径
摘要: 一、打印相对路径 print(__file__) 二、打印绝对路径 import os print(os.path.abspath(__file__)) 三、打印文件名 import os print(os.path.dirname(os.path.abspath(__file__)))
阅读全文
posted @ 2018-07-28 22:44 Presley
阅读(8614)
评论(0)
推荐(0)
Python 模块介绍
摘要: 一、模块:用一坨代码实现了某个功能的代码集合。 二、模块分为三种 1、自定义模块 2、内置标准模块(又称标准库) 3、开源模块(上传方式,百度PyPi) 开源模块安装方式: a、yum b、pip c、apt-get d、下载源码,然后解压,然后进入目录,然后编译安装: python setup.p
阅读全文
posted @ 2018-07-28 12:23 Presley
阅读(158)
评论(0)
推荐(0)
Python 时间复杂度
摘要: 引用自:https://www.cnblogs.com/sch01ar/p/8552295.html
阅读全文
posted @ 2018-07-28 09:09 Presley
阅读(158)
评论(0)
推荐(0)
2018年7月26日
Python 冒泡排序
摘要: 1 #!/usr/bin/env python 2 #-*- coding:utf-8 -*- 3 data = [10,4,33,21,54,3,8,11,5,22,2,1,17,13,6] 4 5 for j in range(1,len(data)): 6 for i in range(len
阅读全文
posted @ 2018-07-26 21:36 Presley
阅读(169)
评论(0)
推荐(0)
2018年7月25日
Mysql linux -N命令
摘要: 一、-e 和 -N /usr/local/bin/mysql -h127.0.0.1 -uroot -pxxxx -N -e "use abc; show tables;" -e 后面跟上要执行的SQL语句 -N 参数是不显示表头
阅读全文
posted @ 2018-07-25 16:49 Presley
阅读(4048)
评论(0)
推荐(0)
2018年7月23日
Python高级正则
摘要: 一、上面的第二行和第三行也可以合并成一行来写 m = p.match("^[0-9]",'13435aSAdb') 效果是一样的,区别在于第一种方式是提前对要匹配的格式进行编译,第二种简写是每次匹配的时候都要进行一次匹配公式的编译,加入你需要从一个5w行的文件中匹配出所有以数字开头的行建议先把正则公
阅读全文
posted @ 2018-07-23 21:36 Presley
阅读(205)
评论(0)
推荐(0)
2018年7月20日
Linux useradd -M -s
摘要: groupadd mysql #创建mysql分组 useradd -M(不创建主目录) -s(不允许登录) /sbin/nologin mysql -g(加入mysql组) mysql
阅读全文
posted @ 2018-07-20 17:18 Presley
阅读(3347)
评论(0)
推荐(0)
Linux 时间同步
摘要: 一、每五分钟从时间服务器asia.pool.ntp.org 中同步一次时间 a、设置时区 ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime b、做时间同步 echo "*/5 * * * * /usr/sbin/ntpdate asia.p
阅读全文
posted @ 2018-07-20 16:42 Presley
阅读(171)
评论(0)
推荐(0)
上一页
1
···
26
27
28
29
30
31
32
33
34
···
42
下一页
公告