摘要: 示例: var num1=3.3; var num2=7.17; var ret=parseFloat(num1)+parseFloat(num2); //ret的值为:10.469999999999998 这是JS对浮点型数据运算时,个别比较特殊的数字存在bug,可能是计算机对二进制处理的问题。 阅读全文
posted @ 2018-01-24 17:43 yanzi_meng 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Jinja2用法总结 一:渲染模版 要渲染一个模板,通过render_template方法即可。 @app.route('/about/') def about(): # return render_template('about.html',user='username') return rend 阅读全文
posted @ 2018-01-24 17:41 yanzi_meng 阅读(33036) 评论(0) 推荐(0) 编辑
摘要: python3内置函数大全 内置函数 (1)abs(), 绝对值或复数的模 1 print(abs(-6))#>>>>6 (2)all() 接受一个迭代器,如果迭代器的所有元素都为真,那么返回True,否则返回False 1 print(all([1,0,3,6]))#>>>>False (3)an 阅读全文
posted @ 2018-01-24 11:10 yanzi_meng 阅读(792) 评论(0) 推荐(0) 编辑
摘要: python内置函数大全 python内建函数 最近一直在看python的document,打算在基础方面重点看一下python的keyword、Build-in Function、Build-in Constants、Build-in Types、Build-in Exception这四个方面,其 阅读全文
posted @ 2018-01-24 11:09 yanzi_meng 阅读(1223) 评论(0) 推荐(0) 编辑
摘要: 转载请注明出处http://write.blog.csdn.net/mdeditor 目录 目录 前言 安装Python-279 解决YUM与Python279的兼容问题 前言 CentOS 6.5中预安装了Python-2.6.6,其比较新的Python-2.7.9(CentOS 7预装版本)主要 阅读全文
posted @ 2018-01-24 00:25 yanzi_meng 阅读(4279) 评论(0) 推荐(0) 编辑
摘要: 在CentOS以及其他的Linux系统中遇到安装包安装错误的原因,大多数都是因为缺少依赖包导致的,所以对于错误:zipimport.ZipImportError: can’t decompress data,是因为缺少zlib 的相关工具包导致的,知道了问题所在,那么我们只需要安装相关依赖包即可, 阅读全文
posted @ 2018-01-24 00:21 yanzi_meng 阅读(193) 评论(0) 推荐(0) 编辑