CPU是怎么工作的

前言

当你打开手机,聊天、购物、刷视频的时候,有没有想过,手机是如何工作的?但凡完成九年义务教育的学生都大概知道不论手机还是电脑,其心脏有一颗心脏————CPU。了解过新闻的人士都知道,我国在CPU方面一直被欧美卡脖子。你是否好奇这个CPU是怎么进行工作的呢?又为什么难以设计制造呢?

CPU是一堆晶体管组成的逻辑门电路,单个门电路结构也不是很复杂,学过数字电路的都容易理解。但是从简单的逻辑门电路怎么就组装成一个可以刷视频的手机心脏呢?脑子有点跟不上了。现在的CPU已经高达几百亿个晶体管,非常人可以阅读了。我们得从计算机的历史说起。

二进制指令

现在习惯了Java、Python、JS、C、C++等高级编程语言,而却对计算机底层却越来越模糊。高级编程语言是不能直接被CPU理解的,经过编译等翻译成CPU可以识别的机器码才能执行。

继续阅读“CPU是怎么工作的”

Sphinx Docusaurus添加备案号

Sphinx

vi pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html

<p class="theme-version">
备案许可证编号:<a href="http://beian.miit.gov.cn/">京ICP备000000号</a>
</p>

<p class="theme-version">
{% trans theme_version=theme_version|e %}Built with the <a href="https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html">PyData Sphinx Theme</a> {{ theme_version }}.{% endtrans %}
</p>

Docusaurus

diff --git a/docusaurus.config.js b/docusaurus.config.js
index 31c32b2..dcfd863 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -179,7 +179,7 @@ const config = {
],
},
],
- copyright: `Copyright © ${new Date().getFullYear()} XXXXX. Built with Docusaurus.`,
+ copyright: `Copyright © ${new Date().getFullYear()} XXXXX. Built with Docusaurus.<br />备案许可证编号:<a target="_blank" rel="noopener noreferrer" href="http://beian.miit.gov.cn/">京ICP备00000000号</a>`,
},
prism: {
theme: prismThemes.github,

Letencrypt泛域名自动续期

一、下载

$ git clone https://github.com/ywdblog/certbot-letencrypt-wildcardcertificates-alydns-au
$ cd certbot-letencrypt-wildcardcertificates-alydns-au
$ chmod 0777 au.sh

二、使用方法

2.1 申请证书

2.1.1 测试是否有错误

certbot certonly  -d *.abc.com -d abc.com  --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory   --manual-auth-hook "/path/certbot-alydns/au.sh python aly add" --manual-cleanup-hook "/path/certbot-alydns/au.sh python aly clean"   --dry-run 

Debug: 操作 DNS API 可能会遇到一系列问题,比如 API token 权限不足,遇到相关问题,可以查看 /var/log/certd.log。

继续阅读“Letencrypt泛域名自动续期”