码迷,mamicode.com
首页 >  
搜索关键字:open    ( 24465个结果
文件读删除空格
1 with open('shell','r+') as f: 2 for index,i in enumerate(f): 3 print(index,i.strip()) #Python strip() 方法用于移除字符串头尾指定的字符(默认为空格)。 ...
分类:其他好文   时间:2017-09-11 12:25:00    阅读次数:113
apache跨域图片配置
修改httpd.conf 1 找到 网站目录设置 <Directory "/var/www"> AllowOverride ALL # Allow open access: Require all granted Header set Access-Control-Allow-Origin *</D ...
分类:Web程序   时间:2017-09-11 12:21:21    阅读次数:171
Oulipo POJ - 3461 KMP
//以前没分类过 现在该分类一下了#include #include #include #include #include #include #include #include #include #include #include #define LL long long #define INF 2... ...
分类:其他好文   时间:2017-09-11 12:17:23    阅读次数:117
HTTPS实践
1、HTTPS 访问速度优化 1.1、Tcp fast open(简称TFO) HTTPS与HTTP都是通过TCP协议进行传输的,即需要通过三次握手建立通讯连接,TFO的思路就是在一个RTT的时间内将应用层的数据跟syn包同时发送出去,节省请求次数。遗憾的是,TFO需要高版本内核,Linux3.7以 ...
分类:Web程序   时间:2017-09-11 12:16:48    阅读次数:195
UML 类图
先留个坑, 后续再填 UML 类图中主要包括以下几种关系:(参考网址:http://www.open-open.com/lib/view/open1328059700311.html) 关系强弱顺序: 泛化 = 实现 > 组合 > 聚合 > 关联 > 依赖 ...
分类:其他好文   时间:2017-09-11 10:23:15    阅读次数:249
Python readability提取网页正文的优化
Python readability的使用: from readability.readability import Document import urllib html = urllib.urlopen(url).read() readable_article = Document(html). ...
分类:编程语言   时间:2017-09-11 10:14:27    阅读次数:263
2.在linux安装ssh_免密连接
Linux开启ssh服务 sudo apt-get update sudo apt-get install openssh-server ps -e | grep ssh 看到有ssh字样,说明已启动,如果没有就手动启动 /etc/init.d/ssh start sudo /etc/init.d/ ...
分类:系统相关   时间:2017-09-11 00:58:13    阅读次数:252
Python爬虫简单入门及小技巧
刚刚申请博客,内心激动万分。于是为了扩充一下分类,随便一个随笔,也为了怕忘记新学的东西由于博主十分怠惰,所以本文并不包含安装python(以及各种模块)和python语法。 目标 前几天上B站时看到一部很好玩的番剧,名字《笨女孩》,实际上是由同名的搞笑向漫画动画化的。大家都知道动画一般一周一更,很难 ...
分类:编程语言   时间:2017-09-11 00:48:32    阅读次数:223
课堂笔记:Python基础-文件操作
对文件操作流程 现有文件如下: 注意 :在Windows系统中,hello文件是utf8保存的,打开文件时open函数是通过操作系统打开的文件,而win操作系统 默认的是gbk编码,所以直接打开会乱码,需要f=open('hello',encoding='utf8'),hello文件如果是gbk保存 ...
分类:编程语言   时间:2017-09-10 23:46:01    阅读次数:358
NOIP模拟5
期望得分:100+100+100=300 实际得分:72+12+0=84 T1 [CQOI2009]中位数图 令c[i]表示前i个数中,比d大的数与比d小的数的差,那么如果c[l]=c[r],则[l+1,r]满足条件 #include<cstdio> #include<iostream> using ...
分类:其他好文   时间:2017-09-10 22:51:21    阅读次数:240
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!