摘要: requests库 发送请求: 可以处理所有请求类型:get、post、put、Delete、Head、Options r = requests.get(''https://httpbin.org/') r = requests.post('https://httpbin.org/post') r 阅读全文
posted @ 2018-02-01 19:21 孤锋饮雪 阅读(171) 评论(0) 推荐(0)
摘要: Command "d:\progra~2\jetbra~1\testvir\scripts\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\admin\\appdata\\local\\temp\\pip-buil 阅读全文
posted @ 2018-02-01 15:56 孤锋饮雪 阅读(202) 评论(0) 推荐(0)
摘要: 本来运行项目:python manage.py runserver 8000 发现运行到结果报错: Error: That port is already in use 首先查看已存在端口号列表: $ ps aux | grep -i manage 然后只需运行$ kill -9 <pid> 图上显 阅读全文
posted @ 2017-12-15 11:37 孤锋饮雪 阅读(9152) 评论(0) 推荐(0)
摘要: #-*- coding:utf-8 -*- import xlwt import urllib import re def getHtml(url): page = urllib.urlopen(url) html = page.read() return html def get_book_message(url): page = urllib.urlope... 阅读全文
posted @ 2017-10-17 16:31 孤锋饮雪 阅读(237) 评论(0) 推荐(0)
摘要: 自定义组件(Component) 组件生命周期: constructor: 在组件创建的时候调用一次,这个方法进行this.state初始化状态机 constructor(props) { super(props); // 初始状态 this.state = { isShow:true };} co 阅读全文
posted @ 2017-07-12 14:47 孤锋饮雪 阅读(994) 评论(0) 推荐(0)
摘要: Core Animation框架 Core Animation可以作用与动画视图或者其他可视元素,为你完成了动画所需的大部分绘帧工作。你只需要配置少量的动画参数(如开始点的位置和结束点的位置)即可使用Core Animation的动画效果。Core Animation将大部分实际的绘图任务交给了图形 阅读全文
posted @ 2017-03-13 18:49 孤锋饮雪 阅读(176) 评论(0) 推荐(0)
摘要: ?符号: 可选型 在初始化时可以赋值为nil !符号: 隐形可选型 类型值不能为nil,如果解包后的可选类型为nil会报运行时错误,主要用在一个变量/常量在定义瞬间完成之后值一定会存在的情况。这主要用在类的初始化过程中。 final 关键字 用来声明类、属性、方法、下标, 被声明的类不能被继承,方法 阅读全文
posted @ 2017-03-13 16:02 孤锋饮雪 阅读(181) 评论(0) 推荐(0)
摘要: Webkit 是 iOS 8.0 后提供的新的框架,组件WKWebView比较UIWebView 速度更快、占用内存更少了,可支持性更多 WKWebView可通过KVO监听属性 title、estimaredProgress、hasOnlySecureContent estimatedProgres 阅读全文
posted @ 2017-03-13 16:02 孤锋饮雪 阅读(1070) 评论(0) 推荐(0)
摘要: 恢复内容开始 Runtime 简称运行时,系统运行时机制,主要是消息机制,OC的函数调用属于动态调用过程 Method Swizzling 用于改变已经存在的selector,在运行时改变selector在类的消息分发列表中的映射,从而改变方法的调用,这样一来如果想在不改变类的结构和方法而添加方法的 阅读全文
posted @ 2017-03-03 11:10 孤锋饮雪 阅读(151) 评论(0) 推荐(0)
摘要: define 属于预编译指令,在程序运行之前就已经编译好;额,定义变量,没有类型信息, const 修饰的变量是不可变的,只是给出了内存地址,且只在程序运行时初始化开辟一块内存空间 const 只修饰右边部分 右边部分表示只读 int const *p; // *p:指针变量 //可以修改值,但不能 阅读全文
posted @ 2017-03-02 11:50 孤锋饮雪 阅读(136) 评论(0) 推荐(0)