#272 Web 保存数据的特殊方案
Linux Shell 2018-11-08将数据通过编码存在图片里面,实现导出导入功能。
虽然我不知道什么场景下需要使用这个方案,但这个想法特有意思。
coding in a complicated world
将数据通过编码存在图片里面,实现导出导入功能。
虽然我不知道什么场景下需要使用这个方案,但这个想法特有意思。
纯英文:
中文:
以下是几个大版本和发布时间,作为一个大概的时间线吧:
2009/12 1.2
2010/03 1.4
2010/08 1.6 分片(支持水平拓展)
2011/03 1.8
2011/09 2.0 GridFS
2012/08 2.2 Aggregation Framework
2013/03 2.4 全文搜索
2014/04 2.6 WiredTiger 存储引擎
2015/03 3.0
2015/12 3.2 Change Streams
2016/11 3.4 多文档事务
2017/11 3.6
2018/06 4.0
2019/08 4.2
2020/07 4.4
2021/07 5.0 时间序列 + 聚簇索引(Clustered Indexing)+ 实时重分片 (Live Resharding) + 版本化 API (Versioned API)
2022/07 6.0
2023/08 7.0 可查询加密技术(Queryable Encryption)
2024/10 8.0
2025/09 8.2 功能完善与性能提升
当前最新版本 8 月发布的 4.0.2
Update @ 2021/06/07:
之后主版本号就一直停在了 4,2020 年之后甚至一直停在了 4.4(2019 年 4.2,2020 年 4.4),这也意味着功能组件稳定下来了。
Terminal 终端
SMC 短信中心
SMS GW 短信网关
受协议限制,短信内容最大 140 字节,所以:
采用 8bit 编码的话,最长 140 字符。
采用 7bit 编码的话,最长 160 字符(正好)。
采用 UCS2 编码的话,最长 70 字符。
如果涉及长短信切割,根据通行的拓展协议,需要采用头三个字节存储相关信息。
采用 8bit 编码的话,每段最长 137 字符。
采用 7bit 编码的话,每段最长 156 字符(最后剩余 4 bits 空着)。
采用 UCS2 编码的话,每段最长 67 字符。
参考 GSM 03.40 9.2.3.24 TP-User Data (TP-UD) 部分,一般有两种方案:
\x05 剩余协议头长度
\x00 短信标识 GSM 03.40
\x03 剩余短信标识长度
随机字节(1 字节)
总包数
包序号(1 开始)
还有一种没有怎么见过的方案,就是采用两个字节做随机标识,然后头三字节改成 \x06\x08\x04。
第二字节叫做 The Information Element Identifier(信息元素标识符),上面的 \x00,\x08 分别标识 1 字节,2 字节随机标识方案。其他值可以参考文档。
from tornado import gen, ioloop
@gen.coroutine
def dosth():
yield gen.sleep(1)
print('slept for 1 second')
ioloop.IOLoop.current().run_sync(dosth)
from tornado import gen, ioloop
@gen.coroutine
def dosth():
print('dosth 222222222222222222222')
yield gen.sleep(1)
print('slept for 1 second 22222222')
print('dosth over 2222222222222222')
@gen.coroutine
def test():
print('test 111111111111111')
dosth()
print('test over 1111111111')
print('start')
ioloop.IOLoop.current().run_sync(test)
print('over')
# start
# test 111111111111111
# dosth 222222222222222222222
# test over 1111111111
# over
# start
# test 111111111111111
# dosth 222222222222222222222
# test over 1111111111
# slept for 1 second 22222222
# dosth over 2222222222222222
# over
git diff 对应 diff 命令git apply 对应 patch 命令git diff v1.2.1 v1.2.2 > v1.2.1_v1.2.2.patch
git apply --check v1.2.1_v1.2.2.patch
git apply -v --whitespace=warn v1.2.1_v1.2.2.patch
有部分文档中说 git apply 和 patch 在一些细节上实现不一致,需要留意。但我轻量级使用,没有遇到过什么问题。
假设:
aaa@163.com,B 的邮箱地址是 bbb@163.com,C 的邮箱地址是 ccc@qq.com。那么:
smtp.163.commx.qq.com,然后将邮件投递过去(SMTP)。pop3.163.com 下载了邮件(POP3),手机自带的邮件客户端配的 imap.163.com,那就走 IMAP 协议。| 163 | ||||
|---|---|---|---|---|
| SMTP | smtp.qq.com | 465/587 | smtp.163.com | 25, 465/587 |
| POP3 | pop.qq.com | 995 | pop.163.com | 110, 995 |
| IMAP | imap.qq.com | 993 | imap.163.com | 143, 993 |
可以看到各种 MxA:

vscode 或者 Typora 或这其他的一些编辑器都支持在 Markdown 中使用数学公式,直接预览就行了。
但是如果是自己做 Markdown 转换,生成 HTML 页面,就必须做点额外的工作。
我发现 Mathjax 挺好用的,只需加入三行:
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script
src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"
async
></script>
<script>
MathJax = {
tex: {
inlineMath: [
["$", "$"],
["\\(", "\\)"],
],
},
};
</script>
Katex 据说不错,以后如果发现 Mathjax 有不足之处再试试。
Update @ 2022-05-27: 根据 May 19, 2022 的博客 Render mathematical expressions in Markdown, GitHub 开始采用 Mathjax 渲染数学公式。
数学公式的语法都是参考 LaTeX(2019/07/21, LaTeX)。
CURRENT_PATH=$(dirname $(readlink -f "$0"))
Pico (Pine composer) is a text editor for Unix and Unix-like computer systems. It is integrated with the Pine and Alpine email clients, which were initially designed by the Office of Computing and Communications at the University of Washington.
A clone of Pico called nano, which is part of the GNU Project, was developed because Pico's earlier license had unclear redistribution terms. Newer versions of Pico as part of Alpine are released under the Apache License version 2.0.
Nano 是由于 Pico 编辑器早期授权条款不够 free 而开发,是 GNU 计划的一部分。
Nano 是一个超级轻量级的文本编辑器,是每个 Linux 发行版的标配。
/usr/share/nano/json.nanorc)两个命令:nano,rnano(受限模式,参考 man 文档)
/etc/nanorc,/usr/share/nano/~/.nanorc,~/.nano/