摘要: 默认状态下,UIButton的imageView和titleLabel之间没有间距,而且两个作为整体,居中显示。设置button的titleEdgeInsets和imageEdgeInsets不是根据按钮的上下左右边距,而是根据titleLabel和imageView的当前位置决定的,但是在测试的... 阅读全文
posted @ 2015-11-22 21:50 _level_ 阅读(608) 评论(0) 推荐(0) 编辑
摘要: sudo apt-get install apache2sudo apt-get install php5 sudo apt-get install mysql-serversudo chmod 777 /var/wwwsudo chmod 777 /var/www/html/sudo apt-ge... 阅读全文
posted @ 2015-07-20 13:27 _level_ 阅读(119) 评论(0) 推荐(0) 编辑
摘要: sudo apt-get install mysql-serversudo apt-get isntall mysql-clientsudo apt-get install libmysqlclient-dev通过如下命令登陆mysqlmysql -u root -p 阅读全文
posted @ 2015-07-20 12:55 _level_ 阅读(99) 评论(0) 推荐(0) 编辑
摘要: import requestsfrom lxml import etreeurl = "http://avdb.la/actor/"headers = {"User-Agent":'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KH... 阅读全文
posted @ 2015-07-17 23:37 _level_ 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 编译器安装:$ sudo apt-get install build-essential cmake pkg-config图片库:$ sudo apt-get install libjpeg-dev libtiff-dev libjasper-dev libpng-dev显示GUI用的库:$ sud... 阅读全文
posted @ 2015-06-05 20:52 _level_ 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 1 import urllib2 2 response = urllib2.urlopen("http://www.baidu.com") 3 html = response.read() 4 5 #eg2 6 import urllib2 7 req = urllib2.Request("ht... 阅读全文
posted @ 2015-06-02 10:48 _level_ 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 1、查找被占用的端口netstat -tln //查看端口使用情况netstat -tln | grep 8080 //查看8080端口占用情况2、查找端口属于哪个程序?被哪个进程占用lsof -i:80803、杀掉进程kill -9 id 阅读全文
posted @ 2015-05-06 12:22 _level_ 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Linux命令行下的文件和目录的基本操作:1、创建文件:touch 文件名 -->文件名不能有空格,如果想创建带空格的文件名,文件名必须用双引号括起来。eg. touch Program File -->这个命令会创建连个文件 Program和File文件。 touch "Program F... 阅读全文
posted @ 2014-10-20 17:00 _level_ 阅读(523) 评论(0) 推荐(0) 编辑
摘要: {% %}指令{{}}变量父模板(index.html):{% block context %} 父{% endblock %}子模板:1 {% extends 'index.html' %}2 {% block context %}3 实现4 {% endblock %}{%load ... 阅读全文
posted @ 2014-09-22 10:58 _level_ 阅读(132) 评论(0) 推荐(0) 编辑
摘要: DescriptionGeorge took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to ... 阅读全文
posted @ 2014-07-17 22:31 _level_ 阅读(142) 评论(0) 推荐(0) 编辑