该文被密码保护。 阅读全文
posted @ 2019-12-24 17:20 大智如蠢 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 获取到备份的.gz的压缩文件 上传到linux上面解压 gzip -d 20191030_02.sql.gz 解压后获取到20191030_02.sql文件 分割这个SQL文件 分割成100M每个 split -b 100m 20191030_02.sql new_file 查询分割文件里面包含数据 阅读全文
posted @ 2019-11-08 15:00 大智如蠢 阅读(352) 评论(0) 推荐(0) 编辑
摘要: <?php /** * Modular: * Created: PhpStorm. * User: dbag * Date: 2019/9/2 * Time: 15:06 */ class Demo { protected $table=''; protected $where=''; protected $field='*'; public function where($where="1=1" 阅读全文
posted @ 2019-09-02 15:38 大智如蠢 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 后端返回2个数据结构 阅读全文
posted @ 2019-08-19 13:08 大智如蠢 阅读(460) 评论(0) 推荐(0) 编辑
摘要: function getTreeKey($arr,$level){ $count = count($arr)-1; $key = ''; for ($i=$count;$i>=0;$i--){ if(($arr[$i]['level']==($level-1)) && $key==''){ ... 阅读全文
posted @ 2019-08-02 14:23 大智如蠢 阅读(283) 评论(0) 推荐(0) 编辑
摘要: title = response.xpath('//h2[@class="margin-top-0"]/a/text()') read_num = response.xpath('//div[@class="col-md-12"]/p[@class="text-muted"]/small/text()').extract()[3].strip().replace('阅读(', '').re... 阅读全文
posted @ 2019-07-31 20:42 大智如蠢 阅读(221) 评论(0) 推荐(0) 编辑
摘要: pycharm debug调试时报错: 解决方案: 下载 anaconda 并且安装 https://www.anaconda.com/distribution/ 打开 anaconda demo 是项目的名称 说明就可以了 原因分析 : 使用pycharm调用python的时候 没找到scrapy 阅读全文
posted @ 2019-07-31 17:16 大智如蠢 阅读(10078) 评论(0) 推荐(0) 编辑
摘要: # 深度优先过程 def depth_tree(tree_node): if tree_node is not None: print(tree_node._data) if tree_node._left is not None: return depth_tree(tree_node._left) if t... 阅读全文
posted @ 2019-07-31 14:54 大智如蠢 阅读(2380) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- import re line = "boooooooooooooobbbaaaaby123" # ^ 以这个开始 # regex_str = "^b" 以b开始 # . 任何字符 # * 多次 regex_str = "^b.*" # 正则匹配 if re.match(regex_str, line): print('yes') # $ 结... 阅读全文
posted @ 2019-07-31 14:23 大智如蠢 阅读(144) 评论(0) 推荐(0) 编辑
摘要: # 创建项目 scrapy startproject downimg # settings.py 67行 ITEM_PIPELINES = { #'downimg.pipelines.DownimgPipeline': 300, 'scrapy.pipelines.images.ImagesPipeline': 1 } MAGES_STORE = 'images' # ... 阅读全文
posted @ 2019-07-19 20:40 大智如蠢 阅读(141) 评论(0) 推荐(0) 编辑