摘要: code import os cur=os.path.dirname(os.path.abspath(__file__)) print(cur) b=os.path.dirname(cur) print(b) dir=os.path.join(os.path.dirname(os.path.dirn 阅读全文
posted @ 2020-08-19 18:02 anobscureretreat 阅读(349) 评论(0) 推荐(0)
摘要: code import os import shutil shutil.move(u'F:\\learn_py\\testdata\\PPT蒙板.docx','F:\\learn_py') 阅读全文
posted @ 2020-08-19 18:00 anobscureretreat 阅读(224) 评论(0) 推荐(0)
摘要: code if __name__ == '__main__': app.run(host="0.0.0.0", port=5000) #app.run(debug=True) 阅读全文
posted @ 2020-08-19 17:57 anobscureretreat 阅读(213) 评论(0) 推荐(0)
摘要: 1.只接受本机的访问,192.168.1.3是本机IP from flask import Flask app = Flask(__name__) @app.route("/hello") def hello(): return "hello world" app.run(host="192.168 阅读全文
posted @ 2020-08-19 17:56 anobscureretreat 阅读(197) 评论(0) 推荐(0)
摘要: 206状态码, 大概就是浏览器先不下载要下载的文件,而是弹窗告诉用户,该文件是什么,有多大。由用户自行决定是否下载。 在html中,加一个a标签,a标签的地址是一个文件,就可实现该效果。 具体可参考下面解释: HTTP/206响应 最后一条会话返回了HTTP/206 “Partial Content 阅读全文
posted @ 2020-08-19 17:50 anobscureretreat 阅读(2970) 评论(0) 推荐(0)
摘要: code 1.将string转成json var json={}; var myorderno=$("#myorderno").val(); json.myorderno=myorderno; var jsontext=JSON.stringify(json); 2.将json转成string va 阅读全文
posted @ 2020-08-19 17:48 anobscureretreat 阅读(1475) 评论(0) 推荐(0)
摘要: 图片 code <html> <head> <script src="http://code.jquery.com/jquery-1.10.2.js"></script> <style> /*修改提示框*/ #mytitle { position: absolute; color: #ffffff; 阅读全文
posted @ 2020-08-19 17:46 anobscureretreat 阅读(362) 评论(0) 推荐(0)
摘要: code <script type="text/javascript"> $(document).ready(function () { if (window.history && window.history.pushState) { $(window).on('popstate', functi 阅读全文
posted @ 2020-08-19 17:39 anobscureretreat 阅读(178) 评论(0) 推荐(0)
摘要: code <input type=button value=刷新 οnclick="window.location.reload()"> <input type=button value=前进 οnclick="window.history.go(1)"> <input type=button va 阅读全文
posted @ 2020-08-19 17:38 anobscureretreat 阅读(345) 评论(0) 推荐(0)
摘要: code <a id="baidu_link" href ="www.baidu.com" title="百度"/> <script type="text/javascript"> function setTitle() { document.getElementById( "baidu_link" 阅读全文
posted @ 2020-08-19 17:36 anobscureretreat 阅读(274) 评论(0) 推荐(0)
摘要: WPO(Web Performance Optimization,Web 性能优化) 什么是延迟? 分组从信息源发送到目的地所需的时间。 什么是带宽? 逻辑或物理通信路径最大的吞吐量。 性能提升的意义,小案例: 为减少跨大西洋的延迟而铺设 Hibernia Express 专线 在金融市场上,很多常 阅读全文
posted @ 2020-08-19 17:32 anobscureretreat 阅读(270) 评论(0) 推荐(0)
摘要: code if (!/^[1-9]\d?$/g.test(num)){ alert('必须是1-99之间的数字'); return false; } function isCardNo(card) { var reg = /^[1-9]\d?$/; if(reg.test(card) false) 阅读全文
posted @ 2020-08-19 17:31 anobscureretreat 阅读(1159) 评论(0) 推荐(0)
摘要: code <html> <body> <input onkeydown="if(event.keyCode==13) {test()}"/> <script> function test() { alert(123); } </script> </body> </html> 阅读全文
posted @ 2020-08-19 17:30 anobscureretreat 阅读(1247) 评论(0) 推荐(0)
摘要: code 对于Internet Explorer、Chrome、Firefox、Opera 以及 Safari: * window.innerHeight 高度 * window.innerWidth 宽度 对于 Internet Explorer 8、7、6、5: * document.docum 阅读全文
posted @ 2020-08-19 17:28 anobscureretreat 阅读(464) 评论(0) 推荐(0)
摘要: code $('.go-btn').click(function() { window.open( $('#my-dropdown').val(), "_newtab" ); }); code $('.go-btn').click(function() { window.open( $('#my-d 阅读全文
posted @ 2020-08-19 17:26 anobscureretreat 阅读(451) 评论(0) 推荐(0)
摘要: code HTML常用特殊字符:只要你认识了 HTML 标记,你便会知道特殊字符的用处。 HTML 原代码 显示结果 描述 &lt; < 小于号或显示标记 &gt; > 大于号或显示标记 &amp; & 可用于显示其它特殊字符 &quot; “ 引号 &reg; ® 已注册 &copy; © 版权 阅读全文
posted @ 2020-08-19 17:25 anobscureretreat 阅读(694) 评论(0) 推荐(0)
摘要: Swagger首页,右键下方链接,然后另存为json文件 如下文件 apizza后台,点击导入 选择swagger保存的json文件,点击导入 OK了! 阅读全文
posted @ 2020-08-19 17:19 anobscureretreat 阅读(655) 评论(0) 推荐(0)
摘要: 一 获取github accessToken 依次点击 settings > Developer settings >Personal access tokens 到这里如果没有就创建一个 创建之后需要记住,因为也为刷新就没有了,这里的权限,按照需求点击 (如果不懂就全选) 二 Jenkins 配置 阅读全文
posted @ 2020-08-19 17:17 anobscureretreat 阅读(159) 评论(0) 推荐(0)
摘要: 打开postman 选择json文件 通过链接导入接口 阅读全文
posted @ 2020-08-19 17:15 anobscureretreat 阅读(899) 评论(0) 推荐(0)
摘要: code rm -rf /Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle 阅读全文
posted @ 2020-08-19 13:07 anobscureretreat 阅读(599) 评论(0) 推荐(0)