看官方文档即可:https://packaging.python.org/tutorials/packaging-projects/
看官方文档即可:https://packaging.python.org/tutorials/packaging-projects/
思路: 由Spring Cloud Gateway 提供统一的HTTP API服务; 登录域的前端界面,通过Spring API完成登录,且由Spring API 设置set-cookies; 其它域的前端界面,访问Spring API JSONP 获取cookies中的token; 若授权失败,统一调至登录域完成登录; 基于nodejs+jquery的技术验证代码如下: - jsonp-sso-demo
原文见: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…