文件操作 注:不能把open语句放在try块里,因为当打开文件出现异常时,文件对象file_object无法执行close()方法。 1.打开文件 (相当于桌面的快捷方式)f=open(文件名,模式默认是制度模式"r") data = f.red() f.colse() 开一个必须关一个要不然消耗内 ...
分类:
编程语言 时间:
2016-12-09 07:31:56
阅读次数:
188
一、系统环境 1.vmware workstation pro安装Linux虚拟机 2.Linux:Linux Red Hat Enterprise Linux 7.0 二、配置本地yum源 1.连接 在wmware workstation pro上点击虚拟机-->设置-->CD/DVD-->使用I ...
分类:
系统相关 时间:
2016-12-08 23:19:15
阅读次数:
492
创建画布:创建画布的函数有 imagecreatetruecolor(width,height);创建画布 width指画布的宽height指画布的高 imagecolorallocate(img,red,green,blue);创建画布句柄 img是一个画布资源,后面的rgb就代表一个颜色! im ...
分类:
其他好文 时间:
2016-12-08 02:47:03
阅读次数:
226
http://poj.org/problem?id=1979 Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is ...
分类:
其他好文 时间:
2016-12-07 20:03:53
阅读次数:
304
枚举的好处: 1. 类型安全性 2.使用方便性 output: 1:RED=32:BLUE=53:BLACK=84:YELLOW=135:GREEN=28 其中, ...
分类:
编程语言 时间:
2016-12-06 20:06:02
阅读次数:
398
一.汽车出入门禁系统状态机设计 状态机所有状态: 入闸传感器(两种状态): Ture False (分别用ET和EF表示) 出闸传感器(两种状态): Ture False (分别用OT和OF表示) 起落杆(两种状态): UP DOWN (分别用UP和DW表示) 通行灯(两种状态): Red Gree ...
分类:
其他好文 时间:
2016-12-06 03:33:29
阅读次数:
183
mac brew install redis 报错 mac brew install redis 报错 mac brew install redis 报错 mac brew install redis 报错 mac brew install redis 报错 mac brew install red ...
分类:
系统相关 时间:
2016-12-05 20:09:25
阅读次数:
243
官方文档以及常用参考: https://access.redhat.com/documentation/zh-CN/Red_Hat_Enterprise_Linux/7/html/Security_Guide/sec-Using_Firewalls.html https://www.server-w ...
分类:
其他好文 时间:
2016-12-05 02:07:14
阅读次数:
191
$()1、$(htmlString)创建元素//创建元素
varp1=$(‘<p>HelloZepto</p>‘);
$(‘body‘).append(p1);2、$(htmlString,attributes)创建带有属性的元素//创建带有属性的元素
varp2=$(‘<p/>‘,{text:‘HelloWorld!‘,id:‘greeting‘,css:{color:‘red‘,fontSize:‘30px‘,f..
分类:
Web程序 时间:
2016-12-04 01:12:25
阅读次数:
614
1.安装GitLab的需求 操作系统 受支持的Unix衍生版 Ubuntu Debian CentOS Red Hat Enterprise Linux (使用CentOS的包和命令) Scientific Linux (使用CentOS的包和命令) Oracle Linux (使用CentOS的包 ...
分类:
其他好文 时间:
2016-12-03 15:23:48
阅读次数:
191