原文见:https://blog.csdn.net/github_38851471/article/details/79446722 1.箭头函数与function定义函数的写法: //function function fn(a, b){ return a + b; } //arrow function var foo = (a, b)=>{ return a + b };
原文见:https://blog.csdn.net/github_38851471/article/details/79446722 1.箭头函数与function定义函数的写法: //function function fn(a, b){ return a + b; } //arrow function var foo = (a, b)=>{ return a + b };
由于需求,需要使用python35发布一个webService服务,提供给php调用。经过选型,使用的库为: WebService Server:spyne,主页:http://spyne.io WebService Client:Zeep,主页:https://github.com/mvantellingen/python-zeep 选择spyne的原因是,以前的库无人维护且不兼容python3,而spyne开发团队与spyne应该是一个团队,且github star为900+。 选择zeep的原因是python…
http-server是一个基于nodejs的建议web服务器。 一、全局安装 npm install -g http-server 二、使用方法 web目录下执行: http-server
以前虽使用Xdebug调试,仅仅和PHPStorm结合到一起,未与浏览器结合,所以调试非常麻烦。偶然想到应该有Chrome插件支持联合Debug,遂百度后发现。 一、博主环境: OS: Windows 10 X64 WebServer: WampServer 3.1.4 X64 WebServer端口:8080 PHP: 7.1.9 Laravel: 5.4 PHPStorm: 2017.2 二、配置过程 1、编辑php.ini使其支持远程调试 php.ini中Xdebug环节内容如下: [xdebu…
部署策略: 1、nginx提供反向转发 2、wampServer提供php运行环境 问题:偶尔出现504 Gateway Time-out 一、nginx配置优化 server { listen 8080; server_name localhost; #access_log logs/host.access.log main; location / { root D:/dist; index index.html index.htm; } location ~ ^/(api)/ { proxy_redirect …
一、问题及解决一 部分服务的api使用Laravel编写,但是上线后有3%-5%的概率,不能返回正常的结果,而是返回未知500错误与{"error":"Unauthenticated."}403错误。 通过Jmeter压测与日志监测后发现上报的异常如下: 1、production.ERROR: RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. 2、pro…
有一个不确定内容的字符串需要转成浮点数,但是里面内容不确定,可能为各种情况。 经过测试float()不满足需求,所以就自己写了一个函数: #!/usr/bin/python3 # -*- coding: UTF-8 -*- def str2float(str): def is_num(char): return char in ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.'] tmp = ''.join(list(filter(is_num, str))…
通常有很多程序使用了Python开发,但是很多生产环境的服务器是不能连接互联网的。在离线环境下,又该如何安装依赖呢?博主使用了两种方法。 一、拷贝开发环境python文件夹 如何,拷贝开发环境的python安装文件夹到生产环境,然后再执行对应版本的python安装文件覆盖安装。这样就可以无缝迁移依赖包。 二、缓存离线源 使用pip工具缓存下载需要的包,及其依赖,然后在生产环境中再使用缓存的本地依赖安装包。 1、--download-cache 命令 pip install --download-cache="/pt…
JavaScript: function convert(orgin) { var result = arguments[1] ? arguments[1] : []; var level = arguments[2] ? arguments[2] : 0; var parentid = arguments[3] ? arguments[3] : 0; var isLeaf = function (id){ for(var x in orgin){ if(orgin[x]["parentid"]==id){ ret…
一、分类分类 回归测试: 冒烟测试: monkey测试: AB测试: 二、回归测试 软件功能修改后,对软件进行重新测试以确认修改没有引入新的错误或导致其它部分产生错误。 回归测试的重心在关键模块和重点功能组件。 软件研发周期中会进行多次回归测试,且尽量实现自动化。 三、monkey测试 monkey测试,也称搞怪测试,就是用一些随机、稀奇古怪的方式来操作软件,以测试系统的健壮性和稳定性。 四、冒烟测试 来自于硬件板卡验证术语,软件上则用于确认代码中的更改会按预期运行,且不会破坏整个版本的稳定性。 猫眼测试针对系统全…