摘要: 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 阅读(353) 评论(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 阅读(216) 评论(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 阅读(3021) 评论(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 阅读(1478) 评论(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 阅读(179) 评论(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 阅读(349) 评论(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 阅读(276) 评论(0) 推荐(0)
摘要: WPO(Web Performance Optimization,Web 性能优化) 什么是延迟? 分组从信息源发送到目的地所需的时间。 什么是带宽? 逻辑或物理通信路径最大的吞吐量。 性能提升的意义,小案例: 为减少跨大西洋的延迟而铺设 Hibernia Express 专线 在金融市场上,很多常 阅读全文
posted @ 2020-08-19 17:32 anobscureretreat 阅读(276) 评论(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 阅读(1162) 评论(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 阅读(1249) 评论(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 阅读(467) 评论(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 阅读(455) 评论(0) 推荐(0)
摘要: code HTML常用特殊字符:只要你认识了 HTML 标记,你便会知道特殊字符的用处。 HTML 原代码 显示结果 描述 &lt; < 小于号或显示标记 &gt; > 大于号或显示标记 &amp; & 可用于显示其它特殊字符 &quot; “ 引号 &reg; ® 已注册 &copy; © 版权 阅读全文
posted @ 2020-08-19 17:25 anobscureretreat 阅读(698) 评论(0) 推荐(0)
摘要: Swagger首页,右键下方链接,然后另存为json文件 如下文件 apizza后台,点击导入 选择swagger保存的json文件,点击导入 OK了! 阅读全文
posted @ 2020-08-19 17:19 anobscureretreat 阅读(657) 评论(0) 推荐(0)
摘要: 一 获取github accessToken 依次点击 settings > Developer settings >Personal access tokens 到这里如果没有就创建一个 创建之后需要记住,因为也为刷新就没有了,这里的权限,按照需求点击 (如果不懂就全选) 二 Jenkins 配置 阅读全文
posted @ 2020-08-19 17:17 anobscureretreat 阅读(160) 评论(0) 推荐(0)
摘要: 打开postman 选择json文件 通过链接导入接口 阅读全文
posted @ 2020-08-19 17:15 anobscureretreat 阅读(901) 评论(0) 推荐(0)
摘要: code rm -rf /Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle 阅读全文
posted @ 2020-08-19 13:07 anobscureretreat 阅读(600) 评论(0) 推荐(0)
摘要: contact@cnblogs.com 阅读全文
posted @ 2020-08-19 12:52 anobscureretreat 阅读(198) 评论(0) 推荐(0)
摘要: 安装库 pip3 install paho-mqtt 发布话题 import paho.mqtt.client as mqtt import time import sys HOST = "103.77.337.89" PORT = 1883 def on_connect(client, userd 阅读全文
posted @ 2020-08-19 12:45 anobscureretreat 阅读(1093) 评论(0) 推荐(0)
摘要: code [root@CwKVmz135893 ~]# emqx_ctl plugins list Plugin(emqx_auth_clientid, version=4.0.5, description=EMQ X Authentication with ClientId/Password, a 阅读全文
posted @ 2020-08-19 12:40 anobscureretreat 阅读(174) 评论(0) 推荐(0)
摘要: 官网 https://www.emqx.io/cn/ 下载页面(https://www.emqx.io/cn/downloads) 解压 unzip emqx-centos7-v4.0.5.zip 进入目录 cd emqx/bin 阅读全文
posted @ 2020-08-19 12:39 anobscureretreat 阅读(1850) 评论(0) 推荐(0)
摘要: code #cs AutoIt Version: 3.3.14.5 Author: myName Script Function: Template AutoIt script. #ce ; Script Start - Add your code below here ; 带有三个自定义函数的示例 阅读全文
posted @ 2020-08-19 11:58 anobscureretreat 阅读(195) 评论(0) 推荐(0)
摘要: 最近在研究针对windows桌面应用程序的自动化工具,查找了网上相关资料,UI自动化工具很多,但是想同时支持windows桌面应用程序、web端以及APP段的工具少的可怜,以下是一些工具的总结: pyautogui Pyautogui对鼠标的移动、点击、拖拽,键盘按键输入、按住操作,以及鼠标+键盘的 阅读全文
posted @ 2020-08-19 11:57 anobscureretreat 阅读(5429) 评论(0) 推荐(1)
摘要: 问题 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。 你可以假设每种输入只会对应一个答案。但是,你不能重复利用这个数组中同样的元素。 示例: 给定 nums = [2, 7, 11, 15], target = 9 因为 阅读全文
posted @ 2020-08-19 11:56 anobscureretreat 阅读(202) 评论(0) 推荐(0)
摘要: 问题 给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字。 如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。 您可以假设除了数字 0 之外,这两个数都不会以 0 开头。 示例: 输入:(2 -> 4 阅读全文
posted @ 2020-08-19 11:55 anobscureretreat 阅读(143) 评论(0) 推荐(0)
摘要: 问题 给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。 示例 1: 输入: "abcabcbb" 输出: 3 解释: 因为无重复字符的最长子串是 "abc",所以其长度为 3。 示例 2: 输入: "bbbbb" 输出: 1 解释: 因为无重复字符的最长子串是 "b",所以其长度为 阅读全文
posted @ 2020-08-19 11:54 anobscureretreat 阅读(217) 评论(0) 推荐(0)
摘要: 题目 给定两个大小为 m 和 n 的有序数组 nums1 和 nums2。 请你找出这两个有序数组的中位数,并且要求算法的时间复杂度为 O(log(m + n))。 你可以假设 nums1 和 nums2 不会同时为空。 示例 1: nums1 = [1, 3] nums2 = [2] 则中位数是 阅读全文
posted @ 2020-08-19 11:52 anobscureretreat 阅读(226) 评论(0) 推荐(0)
摘要: 问题 地上有一个m行n列的方格,从坐标 [0,0] 到坐标 [m-1,n-1] 。一个机器人从坐标 [0, 0] 的格子开始移动,它每次可以向左、右、上、下移动一格(不能移动到方格外),也不能进入行坐标和列坐标的数位之和大于k的格子。例如,当k为18时,机器人能够进入方格 [35, 37] ,因为3 阅读全文
posted @ 2020-08-19 11:48 anobscureretreat 阅读(398) 评论(0) 推荐(0)
摘要: 问题 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。 示例 1: 输入: "babad" 输出: "bab" 注意: "aba" 也是一个有效答案。 示例 2: 输入: "cbbd" 输出: "bb" code #!/usr/bin/python3 # -* 阅读全文
posted @ 2020-08-19 11:44 anobscureretreat 阅读(1029) 评论(0) 推荐(0)
摘要: code S = 'xxxabcxxxxabcxxabcxxabc' search="xxxa" last_cur=0 count=0 while(1): where=S.find(search) if(not where 1): print(last_cur+where) S=S[where+le 阅读全文
posted @ 2020-08-19 11:37 anobscureretreat 阅读(700) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-08-19 11:22 anobscureretreat 阅读(289) 评论(0) 推荐(0)
摘要: 下载apk文件,复制一份修改后缀名为.zip,然后解压,我们得到三个东东! 进入文件夹 assets文件夹 -- 放原生资源文件 lib文件夹-- 放引用库文件 META-INF文件夹 -- 放清单文件 res文件夹 -- 放资源文件 AndroidManifest.xm -- 安卓清单 resou 阅读全文
posted @ 2020-08-19 11:19 anobscureretreat 阅读(1052) 评论(0) 推荐(0)
摘要: 下载地址: 链接:https://pan.baidu.com/s/1PRsHNHXDjKvXFVo9bWZUEQ 提取码:tfdo 解压密码:www.52pojie.cn 这里由于软件中的Apktool的版本太低可能导致apk的反编译失败,因此需要到Apktool官网去下载最新版本的Apktool, 阅读全文
posted @ 2020-08-19 11:17 anobscureretreat 阅读(351) 评论(0) 推荐(0)
摘要: 下载地址: http://airtest.netease.com/changelog.html 阅读全文
posted @ 2020-08-19 11:16 anobscureretreat 阅读(193) 评论(0) 推荐(0)
摘要: modbus slave Modbus poll Modbus 调试精灵 单片机多功能调试助手 阅读全文
posted @ 2020-08-19 11:15 anobscureretreat 阅读(167) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-08-19 11:13 anobscureretreat 阅读(180) 评论(0) 推荐(0)
摘要: ICMP(Internet Control Message Protocol)Internet控制报文协议。 它是TCP/IP协议簇的一个子协议,用于在IP主机、路由器之间传递控制消息。 控制消息是指网络通不通、主机是否可达、路由是否可用等网络本身的消息。 这些控制消息虽然并不传输用户数据,但是对于 阅读全文
posted @ 2020-08-19 11:10 anobscureretreat 阅读(225) 评论(0) 推荐(0)
摘要: code leetcode HackerRank 阅读全文
posted @ 2020-08-19 11:09 anobscureretreat 阅读(133) 评论(0) 推荐(0)
摘要: 下载地址: https://www.cocos.com/creator 下载编辑器: 阅读全文
posted @ 2020-08-19 11:01 anobscureretreat 阅读(144) 评论(0) 推荐(0)
摘要: code 下面来看看如何用nc实现简单的端口转发。 - 背景:192.168.1.103的msfadmin用户需要访问192.168.1.102的8000端口,但是该端口被防火墙保护着,不允许外界机器访问。目前msfadmin用户只能访问192.168.1.102的9000端口。需要9000端口做转 阅读全文
posted @ 2020-08-19 11:00 anobscureretreat 阅读(2423) 评论(0) 推荐(1)
摘要: code macname@MacdeMacBook-Pro ~ % brew install openvpn Updating Homebrew... ==> Auto-updated Homebrew! Updated 2 taps (homebrew/core and dart-lang/dar 阅读全文
posted @ 2020-08-19 10:54 anobscureretreat 阅读(4) 评论(0) 推荐(0)
摘要: https://github.com/emqx/MQTTX/releases 阅读全文
posted @ 2020-08-19 10:52 anobscureretreat 阅读(384) 评论(0) 推荐(0)
摘要: code yum install -y unzip zip 阅读全文
posted @ 2020-08-19 10:50 anobscureretreat 阅读(748) 评论(0) 推荐(0)
摘要: code macname@MacdeMacBook-Pro blockchain-master % echo "hello linux"|awk -F ' ' '{print $2" "$1}' linux hello macname@MacdeMacBook-Pro blockchain-mast 阅读全文
posted @ 2020-08-19 10:49 anobscureretreat 阅读(509) 评论(0) 推荐(0)
摘要: 介绍一下,用 Xcode 开发一个 完整的 Mac桌面程序 Demo。 工具/原料 Mac系统 Xcode软件 创建项目 1 打开 Xcode 2 创建一下新的项目 3 选择项目类型 4 填写项目基本信息 5 项目存放位置,选择在 Documents/mac 没有 mac 目录,就新建立一个 6 创 阅读全文
posted @ 2020-08-19 10:46 anobscureretreat 阅读(439) 评论(0) 推荐(0)
摘要: Shift-Command-5 停止录制:Command-Control-Esc (Escape) 参考/:https://support.apple.com/zh-cn/HT208721#portion 阅读全文
posted @ 2020-08-19 10:44 anobscureretreat 阅读(226) 评论(0) 推荐(0)
摘要: code code 1、打开终端 2、输入以下代码查看当前鼠标移动速度 defaults read -g com.apple.mouse.scaling 你会看到输出的是 “3”,这是初始速度 3、输入以下代码改变鼠标移动速度 defaults write -g com.apple.mouse.sc 阅读全文
posted @ 2020-08-19 10:43 anobscureretreat 阅读(871) 评论(0) 推荐(0)
摘要: code https://docs.python.org/zh-cn/3.7/using/mac.html 阅读全文
posted @ 2020-08-19 10:42 anobscureretreat 阅读(651) 评论(0) 推荐(0)
摘要: 打包项目 1 打包成 dmg文件格式,直接直接运行 首先,当然是将你需要的程序编译好,形成app文件。 app文件在Prouducts文件夹里,如图所示。 右键 -> Show in Finder,在 文件夹里将其拷贝出来 2 在桌面创建一个目录 demo ,然后将需要放入dmg镜像的文件拖放进入。 阅读全文
posted @ 2020-08-19 10:38 anobscureretreat 阅读(630) 评论(0) 推荐(0)
摘要: 第一种写法 macname@MacdeMBP ~ % who > users macname@MacdeMBP ~ % wc -l users 4 users macname@MacdeMBP ~ % 第二种写法 macname@MacdeMBP ~ % who | wc -l 4 macname@ 阅读全文
posted @ 2020-08-19 10:35 anobscureretreat 阅读(527) 评论(0) 推荐(0)
摘要: code macname@MacdeMBP ~ % ls | wc -l 62 macname@MacdeMBP ~ % 阅读全文
posted @ 2020-08-19 10:33 anobscureretreat 阅读(319) 评论(0) 推荐(0)
摘要: 标准文件描述符 STDIN 许多bash命令能接受STDIN的输入,尤其是没有在命令行上指定文件的话。 下面是个用cat 命令处理STDIN输入的数据的例子。 当在命令行上只输入cat命令时,它会从STDIN接受输入。输入一行,cat命令就会显示出一行。 $ cat this is a test t 阅读全文
posted @ 2020-08-19 10:31 anobscureretreat 阅读(221) 评论(0) 推荐(0)
摘要: 将终端的背景色设置成白色、文本设置成黑色 setterm -inversescreen on Linux中常见的几种不同 shell 常见Linux目录名称 / 虚拟目录的根目录。通常不会在这里存储文件 /bin 二进制目录,存放许多用户级的GNU工具 4 /boot 启动目录,存放启动文件 /de 阅读全文
posted @ 2020-08-19 10:28 anobscureretreat 阅读(474) 评论(0) 推荐(0)
摘要: cron服务是Linux的内置服务,但它不会开机自动启动。可以用以下命令启动和停止服务:\ /sbin/service crond start /sbin/service crond stop /sbin/service crond restart /sbin/service crond reloa 阅读全文
posted @ 2020-08-19 10:09 anobscureretreat 阅读(159) 评论(0) 推荐(0)
摘要: 创建输出文件描述符 $ cat test13 #!/bin/bash # using an alternative file descriptor exec 3>test13out echo "This should display on the monitor" echo "and this sh 阅读全文
posted @ 2020-08-19 10:07 anobscureretreat 阅读(282) 评论(0) 推荐(0)
摘要: 移动 :CTRL +拖拽(3),CTRL +shift +拖拽(4) 缩放 :CTRL+alt+拖拽 播放 :空格 或者 ,alt+空格 快捷键:鼠标右键 降低延迟:使用 asio4all ,fl studio asio 阅读全文
posted @ 2020-08-19 10:03 anobscureretreat 阅读(3583) 评论(0) 推荐(0)
摘要: utau 以及 melodyne 阅读全文
posted @ 2020-08-19 09:59 anobscureretreat 阅读(141) 评论(0) 推荐(0)
摘要: mixkit pexels Pixabay Videezy Freesound Audionautix YouTube voice Adobe voice Creative Commons 阅读全文
posted @ 2020-08-19 09:58 anobscureretreat 阅读(154) 评论(0) 推荐(0)
摘要: code 缩放时间线 command + command - 添加默认专场 command+t 修改时间长度 Ctrl + d 拉近显示效果 shift+c 最小化时间线 Shift +z 裁剪 option+[ option+] 粘贴属性 Command +c Command +shift +v 阅读全文
posted @ 2020-08-19 09:56 anobscureretreat 阅读(838) 评论(0) 推荐(0)