最近在学习Linux,用习惯Windows入门linux还是有很多不习惯,特别是用命令来操作, 以下整理了一些常用的命令分享和巩固。 常用命令: pwd 显示用户当前所在的工作目录位置 cd /opt 进入/opt目录 cd .. 回到上一层目录 cd~ 回到当前家目录 cd- 回到上一次目录 ls ...
分类:
系统相关 时间:
2020-07-08 01:44:04
阅读次数:
81
package LeetCode_162 /** * 162. Find Peak Element * https://leetcode.com/problems/find-peak-element/description/ * * A peak element is an element that ...
分类:
其他好文 时间:
2020-07-07 23:20:32
阅读次数:
54
1、查找/etc目录下大于1M且类型为普通文件的所有文件[root@centos7~]#find/etc-typef-size+1M2、打包/etc/目录下面所有conf结尾的文件,压缩包名称为当天的时间,并拷贝到/usr/local/src目录备份[root@centos7~]#tar-cvf/usr/local/src/`date"+%T"`.tar/etc/*.conf3、利用sed取出if
分类:
其他好文 时间:
2020-07-07 14:57:32
阅读次数:
48
出现这个报错通常是因为使用了AopContext.currentProxy()函数却没有添加相应的配置造成的。 通过注解添加配置(加在类上): @EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true) 或通过xml配置文 ...
分类:
其他好文 时间:
2020-07-07 10:21:40
阅读次数:
203
1、查找/etc目录下大于1M且类型为普通文件的所有文件[root@centos7~]#find/etc-typef-size+1M2、打包/etc/目录下面所有conf结尾的文件,压缩包名称为当天的时间,并拷贝到/usr/local/src目录备份[root@centos7~]#tar-cvf/usr/local/src/`date"+%T"`.tar/etc/*.conf3、利用sed取出if
分类:
其他好文 时间:
2020-07-07 10:01:45
阅读次数:
58
首先总结坑: 1、关于浏览器分辨率有关的截图 2、关于浏览器位置点击(分辨率) 3、注意当前时间的 请求 URL 的cookie 值!! 思路: 1、首先分析12306 登录界面 2、将页面截取为图片 3、取得图片的位置 通过 先打开图片Image.open(), crop(左,上,右,下)-->用 ...
分类:
其他好文 时间:
2020-07-07 00:34:32
阅读次数:
102
1.发现conda不能用 参考的博客:https://www.jianshu.com/p/13f5d20e61f8 https://www.jianshu.com/p/92b11e25bc14 zsh:command not find:conda 的详细解决办 open ~/.zshrc expor ...
分类:
系统相关 时间:
2020-07-07 00:29:41
阅读次数:
86
### str - list - tuple - dict ### 1.str ```python python 自带的dir函数可以查看序列的放法 使用方法: print(dir('dsad')) 1.index(find):查找某一个字符的起始位置,若找不到,index报错,find返回假 rf ...
分类:
其他好文 时间:
2020-07-06 20:02:51
阅读次数:
58
scrapy是python的一个爬虫框架,从网上随意搜索便能得到千篇一律的使用demo(本文也是哟),并且非常容易理解。即便你没看过相关的demo,也一样可以食用本文。我的应用场景大多是列表页,文章页等。如果你的业务需要登录验证,图片验证等,请另寻他法,不要在本篇文章浪费你宝贵的时间。由于我的代码编 ...
分类:
其他好文 时间:
2020-07-06 18:16:18
阅读次数:
70
# -*- coding:utf-8 -*- import requests from bs4 import BeautifulSoup url = "http://top.baidu.com/buzz?b=1&fr=topindex" header = { "user-agent": "Mozil ...
分类:
其他好文 时间:
2020-07-06 16:29:50
阅读次数:
414