2020年12月4日

sublime text 3 中文排序插件

摘要: ST3 的排序不支持中文按拼音排序,所以需要搞一个插件来支持这一特性 pypinyin 这个库可以把中文转成拼音,可惜不支持 python3.3,而 ST3 内置的 python 就是 3.3 我系统中的 python 是 3.8,是可以用 pypinyin 这个库的 那么问题可以转化为「pytho 阅读全文

posted @ 2020-12-04 18:23 明天有风吹 阅读(412) 评论(0) 推荐(0) 编辑

2020年11月26日

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1122)

摘要: 只需执行 /Applications/Python\ 3.9/Install\ Certificates.command 阅读全文

posted @ 2020-11-26 14:52 明天有风吹 阅读(4276) 评论(1) 推荐(0) 编辑

2020年11月7日

Excel 快速跳转到工作表

摘要: 新建 vba 模块 Sub GotoSheet() tname = InputBox("input table name") If StrPtr(tname) = 0 Then Exit Sub ElseIf tname = vbNullString Then Exit Sub Else For i 阅读全文

posted @ 2020-11-07 14:31 明天有风吹 阅读(826) 评论(0) 推荐(0) 编辑

2020年11月6日

Excel vba call Python script on Mac

摘要: How can I launch an external python process from Excel 365 VBA on OSX? It took me a while, but I figured out how to do it. Excel 2016 has replaced Mac 阅读全文

posted @ 2020-11-06 20:50 明天有风吹 阅读(457) 评论(0) 推荐(0) 编辑

2020年11月3日

Android Parsing between JSON and Kotlin Object with Google Gson Library

摘要: Parsing between JSON and Kotlin Object with Google Gson Library dependencies { ... implementation 'com.google.code.gson:gson:2.8.6' ... } class MyClas 阅读全文

posted @ 2020-11-03 18:47 明天有风吹 阅读(83) 评论(0) 推荐(0) 编辑

2020年10月30日

Android kotlin http url request

摘要: kotlin.concurrent.thread{ val url = "https://hangj.cnblogs.com/" val res = try { java.net.URL(url).readText() } catch (ex: Exception) { return@thread 阅读全文

posted @ 2020-10-30 15:42 明天有风吹 阅读(592) 评论(0) 推荐(0) 编辑

2020年10月16日

python variable scope 变量作用域

摘要: python 中变量的作用域经常让我感到很迷 In Python, on the other hand, variables declared in if-statements, for-loop blocks, and while-loop blocks are not local variabl 阅读全文

posted @ 2020-10-16 10:51 明天有风吹 阅读(204) 评论(0) 推荐(0) 编辑

2020年10月7日

android kotlin determine file type from bytes 根据文件内容识别文件类型,类似python的filetype

摘要: 尝试了 URLConnection.guessContentTypeFromStream(ByteArrayInputStream(bytes)) 和 Tika().detect(bytes) 一个识别不了视频,另一个直接报一堆错 google 很久也没找到可用代码,只好自己动手 fun byteA 阅读全文

posted @ 2020-10-07 21:25 明天有风吹 阅读(118) 评论(0) 推荐(0) 编辑

2020年10月5日

android kotlin 子线程中调用界面UI组件崩溃

摘要: UI 只能在主线程内更新,子线程需要更新UI组件时可以这样: fun fuck(){ Executors.newSingleThreadExecutor().execute{ // url request ... val visibility = View.VISIBLE Handler(mainL 阅读全文

posted @ 2020-10-05 22:24 明天有风吹 阅读(1418) 评论(0) 推荐(0) 编辑

2020年9月28日

android http get

摘要: Executors.newSingleThreadExecutor().execute{ val uri = "https://www.cnblogs.com/hangj" val url = URL(uri) val con = url.openConnection() as HttpsURLCo 阅读全文

posted @ 2020-09-28 15:07 明天有风吹 阅读(148) 评论(1) 推荐(0) 编辑

android activity pass data to accessibilityservice 数据传递

摘要: 不同类型的 service 传递数据的方式不同,accessibilityservice 运行在独立进程,且被系统接管,比较特别 在 AccessibilityService 的 onCreate 内加一个 BroadcastReceiver val broadcast = object:Broad 阅读全文

posted @ 2020-09-28 13:04 明天有风吹 阅读(595) 评论(0) 推荐(0) 编辑

2020年9月2日

python 文件批量改名重命名 rename

摘要: path = '/Volumes/Seagate/dev/imgs/' os.chdir(path) print('cwd: ', os.getcwd()) for f in os.listdir('.'): if not f.endswith('.jpg'): os.rename(f, f + ' 阅读全文

posted @ 2020-09-02 11:01 明天有风吹 阅读(661) 评论(0) 推荐(0) 编辑

2020年8月31日

AN INTEGER FORMULA FOR FIBONACCI NUMBERS

摘要: https://blog.paulhankin.net/fibonacci/ This code, somewhat surprisingly, generates Fibonacci numbers. def fib(n): return (4 << n*(3+n)) // ((4 << 2*n) 阅读全文

posted @ 2020-08-31 14:10 明天有风吹 阅读(147) 评论(0) 推荐(0) 编辑

2020年8月28日

python opencv cv2 imshow threading 多线程

摘要: 除了线程同步,还需要注意的是「窗口处理」要放在主线程 #!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import threading from time import sleep from queue import Queue i 阅读全文

posted @ 2020-08-28 14:06 明天有风吹 阅读(3463) 评论(0) 推荐(0) 编辑

2020年8月24日

adb shell 查看当前与用户交互的 activity

摘要: adb shell dumpsys activity activities | grep mActivityComponent 阅读全文

posted @ 2020-08-24 17:18 明天有风吹 阅读(232) 评论(0) 推荐(0) 编辑

2020年8月23日

sublime text build system automatic ctrl/cmd+B自动选择 python2 或 python3

摘要: #背景 我同时安装了 python2 和 python3 时,python 指向 python2,python3 才是 python3 默认情况下,在 Sublime 内 Ctrl/Cmd + B 运行 python 文件时,调用的是环境变量 PATH 中的 python 所以当我想用 python 阅读全文

posted @ 2020-08-23 23:34 明天有风吹 阅读(343) 评论(0) 推荐(0) 编辑

2020年8月21日

pip 源的问题

摘要: pip install -i https://pypi.doubanio.com/simple/ --trusted-host pypi.douban.com some-package 阅读全文

posted @ 2020-08-21 14:31 明天有风吹 阅读(81) 评论(0) 推荐(0) 编辑

2020年8月20日

Mac 安装 Android commandlinetools 各种报错的问题

摘要: https://developer.android.com/studio/releases/platform-tools commandlinetools-mac 下载地址 解压后直接运行 sdkmanager 各种报错: $ ./sdkmanager --update Warning: Could 阅读全文

posted @ 2020-08-20 12:04 明天有风吹 阅读(2037) 评论(0) 推荐(0) 编辑

2020年7月19日

GIMP 一键均匀添加多条参考线 一键均匀切分图片

摘要: 添加参考线 #!/usr/bin/env python2 # -*- coding: utf-8 -*- from gimpfu import * # orientation: ORIENTATION_HORIZONTAL(0), ORIENTATION_VERTICAL(1) # diff: 参考 阅读全文

posted @ 2020-07-19 04:12 明天有风吹 阅读(1026) 评论(0) 推荐(0) 编辑

2020年7月17日

Shell 脚本如何输出帮助信息?

摘要: 作者展示了一个技巧,将帮助信息写在 Bash 脚本脚本的头部,然后只要执行"脚本名 + help",就能输出这段帮助信息 https://samizdat.dev/help-message-for-shell-scripts/ #!/bin/bash ### ### my-script — does 阅读全文

posted @ 2020-07-17 17:45 明天有风吹 阅读(2230) 评论(0) 推荐(0) 编辑

2020年7月14日

raspberry pi 配置

摘要: 从官网下载 Raspberry Pi Imager 用第 1 步下载的 Imager 抹去 SD 卡,然后选择一个系统写入 SD卡 等待第 2 步完成。然后拔出 SD 卡,重新插入 $ touch /Volumes/boot/ssh $ touch /Volumes/boot/wpa_supplic 阅读全文

posted @ 2020-07-14 02:27 明天有风吹 阅读(383) 评论(0) 推荐(0) 编辑

2020年6月16日

Sublime Text 快速分别独立选中多行

摘要: 效果图 直接上代码 import sublime, sublime_plugin # 独立选择每一行(在当前选中范围内) class SelectEverySingleLine(sublime_plugin.TextCommand): def run(self, edit): # self.view 阅读全文

posted @ 2020-06-16 14:19 明天有风吹 阅读(2288) 评论(0) 推荐(0) 编辑

2020年6月15日

How to check type of files without extensions in python? 不通过文件扩展名,怎样知道文件类型?

摘要: 有一个命令 file 可以用 $ file fuck fuck.png: PNG image data, 1122 x 750, 8-bit colormap, non-interlaced python 中可以用 magic 或 filetype rust 可以用 infer 参考链接 https 阅读全文

posted @ 2020-06-15 14:05 明天有风吹 阅读(161) 评论(0) 推荐(0) 编辑

pip install 报错 TypeError: 'module' object is not callable

摘要: $ pip install filetype Traceback (most recent call last): File "/usr/local/bin/pip2", line 11, in <module> sys.exit(main()) TypeError: 'module' object 阅读全文

posted @ 2020-06-15 13:24 明天有风吹 阅读(841) 评论(0) 推荐(0) 编辑

2020年5月28日

python 动图gif合成与分解

摘要: 合成 #!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import imageio def main(imgs_dir, gif_name): # imgs_dir 里的图片要排好序 frames = [] fo 阅读全文

posted @ 2020-05-28 15:53 明天有风吹 阅读(640) 评论(0) 推荐(0) 编辑

2020年5月13日

直通车新手起步操作流程

摘要: 选词 选 5 7 个词 出价策略 先通过「直通车 工具 流量解析 查询 竞争流量透视」拿到每个词的市场均价 给每个词初始出价为市场均价的 1.5 倍 每过 30 分钟观察排名情况,若「平均展现排名」进入前 10 就 OK,否则出价翻倍 宝贝出现的位置越靠前,被点击的概率越高。所以要确保平均排名在前 阅读全文

posted @ 2020-05-13 13:01 明天有风吹 阅读(581) 评论(0) 推荐(0) 编辑

2020年4月30日

Photoshop 批量修改图像大小

摘要: ![](https://img2020.cnblogs.com/blog/342816/202004/342816-20200430173314005-1046795940.png) ![](https://img2020.cnblogs.com/blog/342816/202004/342816-20200430173318318-1549783125.png) 阅读全文

posted @ 2020-04-30 17:34 明天有风吹 阅读(305) 评论(0) 推荐(0) 编辑

Mac shell 调节音量

摘要: $ osascript -e 'get volume settings' $ osascript -e 'output volume of (get volume settings)' $ osascript -e 'set volume output volume 10' # 1-100 阅读全文

posted @ 2020-04-30 10:40 明天有风吹 阅读(431) 评论(0) 推荐(1) 编辑

2020年3月24日

淘宝店铺运营数据报表生成

摘要: 生意参谋 取数 https://sycm.taobao.com/adm/v2/my 阅读全文

posted @ 2020-03-24 11:55 明天有风吹 阅读(2005) 评论(0) 推荐(0) 编辑

2020年3月20日

查看局域网内所有的主机名、MAC地址和IP地址

摘要: 查看所有 IP at MAC 由 IP 找到主机名 由 NetBIOS 解析 Windows 下用 (IP 换成上一步获取的) macOS 下用 (IP 换成上一步获取的) 知道主机名,查它对应的 IP Windows 下 macOS 下 实际用途 可以在局域网内没有域名系统的情况下,由主机名访问提 阅读全文

posted @ 2020-03-20 21:35 明天有风吹 阅读(13539) 评论(0) 推荐(1) 编辑

2020年3月19日

Photoshop 各混合模式 RGB 是如何计算的

摘要: 原文链接:https://www.jb51.net/photoshop/249182.html 1.正常模式(Normal) 默认模式,显示混合色图层的像素,没有进行任何的图层混合。这意味着基色图层(背景图层)对混合层没有影响。 2.溶解(Dissolve) 将混合色图层的图像以散乱的点状形式叠加到 阅读全文

posted @ 2020-03-19 12:10 明天有风吹 阅读(2354) 评论(0) 推荐(0) 编辑

2020年3月18日

blender Text on Curve Text on Sphere

摘要: Text on Curve 1. Shift + A 添加一个 BezierCurve 2. Shift + A 添加一个 Text,Tab 编辑,再次 Tab 退回 Object Mode 3. 选中 Text,Add Modifier 从 Deform 那一列选择 Curve 4. 然后在 Cu 阅读全文

posted @ 2020-03-18 13:47 明天有风吹 阅读(208) 评论(0) 推荐(0) 编辑

2020年2月10日

skynet 开启 https 配置

摘要: 修改 Makefile Mac 下: Linux 下: 前提是都安装了 openssl 然后在 config 里配置 用 simpleweb.lua 测试,记得先把 http 改成 https 阅读全文

posted @ 2020-02-10 22:41 明天有风吹 阅读(1665) 评论(0) 推荐(0) 编辑

2020年1月21日

mpvue 生成字节跳动小程序的问题!!

摘要: 初始化项目文件 这个时候就初始化好了,接下来 生成字节跳动的小程序项目,就是 'dist/tt/' 目录。 运行字节跳动开发者工具 打开字节跳动开发者工具,导入上一步生成的目录,等待编译,结果会发现: 报错了,我把报错文本拷贝出来: 报错意思是无法判断项目是小程序还是小游戏,因为找不到 app.js 阅读全文

posted @ 2020-01-21 16:58 明天有风吹 阅读(1308) 评论(0) 推荐(0) 编辑

2020年1月19日

抖音无水印在线解析下载

摘要: https://vtool.pro/ 阅读全文

posted @ 2020-01-19 15:44 明天有风吹 阅读(12123) 评论(0) 推荐(0) 编辑

2020年1月16日

RGB 与 HSB/HSV 的关系

摘要: 能理解 RGB 模式中确定数值的各种颜色,但怎么理解「明度」、「饱和度」、「色相」等概念? 从第一张图可以简单得出以下结论: 明度——这个最简单,rgb中,三色光的值,其加起来的和越大,明度就越大。 就这么简单。 那么这个明度意味着什么?很显然,就是光总量有多少,光越多,明度越高 2.纯度: (1) 阅读全文

posted @ 2020-01-16 14:04 明天有风吹 阅读(929) 评论(0) 推荐(0) 编辑

2020年1月14日

PyPDF2.py 合并pdf时报错问题

摘要: 报错如下: Traceback (most recent call last): File "./pdf_merge.py", line 68, in <module> main(sys.argv[1], sys.argv[2]) File "./pdf_merge.py", line 51, in 阅读全文

posted @ 2020-01-14 15:09 明天有风吹 阅读(1040) 评论(0) 推荐(0) 编辑

2019年12月31日

磁盘“Seagate”没有被推出,因为一个或多个程序可能正在使用它。

摘要: 推出移动硬盘失败,解决方案: 执行 lsof /Volumes/Seagate/ 可以看到哪些进程在占用磁盘 $ lsof /Volumes/Seagate/ COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME QuickLook 1281 hang 阅读全文

posted @ 2019-12-31 21:27 明天有风吹 阅读(5977) 评论(0) 推荐(0) 编辑

2019年12月21日

Final Cut Pro X 10.4.7 修改长宽比, 截取某一段视频导出

摘要: 新建项目时设置过长宽比例,现在要修改 窗口 项目属性 修改 自定义 要注意的是,导出时也要选择一下比例 截取某一段视频导出 1. 将鼠标移到你要截取的片段的开始处,点击快捷键 i(标记 设定范围开头) 2. 将鼠标移到你要截取的片段的结尾处,点击快捷键 o(标记 设定范围结尾) 3. 自由拖动所选区 阅读全文

posted @ 2019-12-21 12:52 明天有风吹 阅读(3701) 评论(0) 推荐(0) 编辑

2019年12月10日

Microsoft Remote Desktop 通过 .rdp 文件登录

摘要: 最近在淘宝上买了「市场洞察」子账号,说是子账号,其实是需要登录到他们的 Windows 服务器上才能用的。并且子账号也是 5 6 个人共用的,且不说远程服务器很老又有延迟,经常是我想添加一个监控店铺或者商品,却发现已经添加满了。使用体验极差。 我 Mac 装了「Microsoft Remote De 阅读全文

posted @ 2019-12-10 19:04 明天有风吹 阅读(1189) 评论(0) 推荐(0) 编辑

导航

+V atob('d2h5X251bGw=')

请备注:from博客园