2018年3月21日

摘要: HTTP请求Header https://www.cnblogs.com/EricaMIN1987_IT/p/3837436.html Header解释示例 Accept 指定客户端能够接收的内容类型 Accept:text/plain,text/html Accept-Charset 浏览器可以接 阅读全文
posted @ 2018-03-21 21:26 Sea-Caterpillar 阅读(982) 评论(0) 推荐(0) 编辑
 

2018年3月2日

摘要: Fastlane 记录 打开终端输入命令 xcode-select --install 查看ruby版本 (必须大于2.0否则进行升级) ruby -v 安装fastlane sudo gem install fastlane -NV 查看fastlane版本 fastlane -v cd到一个项目 阅读全文
posted @ 2018-03-02 16:10 Sea-Caterpillar 阅读(2327) 评论(0) 推荐(0) 编辑
 

2017年7月12日

摘要: # 高阶函数: 变量可以指向函数-> 函数名也是变量:把函数作为参数传入,这样的函数称为高阶函数,函数式编程就是指这种高度抽象的编程范式。 # *args 和 **kw # *args是可变参数,args接收的是一个tuple; # **kw是关键字参数,kw接收的是一个dict。 # 以及调用函数时如何传入可变参数和关键字参数的语法: # 可变参数既可以直接传入:func(1, 2, 3),... 阅读全文
posted @ 2017-07-12 16:28 Sea-Caterpillar 阅读(6453) 评论(2) 推荐(0) 编辑
 

2017年7月10日

摘要: # Fibonacci series: 斐波纳契数列 # 两个元素的总和确定了下一个数 a, b = 0, 1 while b < 10: print(b) a, b = b, a+b # Fibonacci series: 斐波纳契数列 # 两个元素的总和确定了下一个数 a, b = 0, 1 w 阅读全文
posted @ 2017-07-10 10:41 Sea-Caterpillar 阅读(267) 评论(0) 推荐(0) 编辑
 

2017年6月23日

摘要: # 1. 输入 print("****** abc *******",end="") print("****** 123 *******") # == > ****** abc ************* 123 ******* 备注: end=""不换行 # 2. 运算符 a = input("Please input the first number:") b = input("Please... 阅读全文
posted @ 2017-06-23 09:53 Sea-Caterpillar 阅读(178) 评论(0) 推荐(0) 编辑
 

2017年6月14日

摘要: 1. python输出 阅读全文
posted @ 2017-06-14 16:38 Sea-Caterpillar 阅读(205) 评论(0) 推荐(0) 编辑
 
摘要: # ************** 函数 ******************** #位置参数、可变参数、关键字参数、命名关键字参数、 关键字参数 # 1.位置参数、计算x^2的函数x 就是位置参数 def power(x): return x*x print("两个数的平方和:",power(20)) # 2.默认参数 b=2 就是默认参数 def power(a,b=2): ... 阅读全文
posted @ 2017-06-14 16:32 Sea-Caterpillar 阅读(179) 评论(0) 推荐(0) 编辑
 

2017年6月8日

摘要: # 1.计算圆的面积 p = 3.1415926 r1 = 5 r2 = 10 r3 = 15 print("半径为r1的面积%f"%(p*r1*r1)) print("半径为r2的面积%f"%(p*r2*r2)) print("半径为r3的面积%f"%(p*r3*r3)) def area_or_circle(r): p = 3.1415926 return p*r*r r... 阅读全文
posted @ 2017-06-08 19:09 Sea-Caterpillar 阅读(196) 评论(0) 推荐(0) 编辑
 
摘要: 1. python 资料: python3在线文档:http://tool.oschina.net/apidocs/apidoc?api=Python%2Freference python2.7在线文档:http://tool.oschina.net/apidocs/apidoc?api=pytho 阅读全文
posted @ 2017-06-08 14:35 Sea-Caterpillar 阅读(221) 评论(0) 推荐(0) 编辑
 

2017年6月2日

摘要: / : 根路径 ./ : 当前路径 ../ : 上层路径 clear : 清除终端信息 chmod a+x xxx.py 给予权限 ./xxx.py 可以直接运行 cd + 目录名称 : 切换到目录下 pwd : 查看当前目录所在路径 tab : 自动补全 touch : 在目录下创建一个文件 mk 阅读全文
posted @ 2017-06-02 21:41 Sea-Caterpillar 阅读(171) 评论(0) 推荐(0) 编辑