Xun Sun

Results 17 issues of Xun Sun

# 关于`#include` `#include`**其实并不是一个非常聪明的机制**——直接全文复制,也不管包含了多少用不着的代码;你也不甚清楚你包含的代码中有什么牛鬼蛇神,会不会碰巧撞上了`math.h`中的`y1`;假如处理不当,还可能惹来重复定义等令人头秃的麻烦…… 在此,我列举一些初次深入了解`#include`时可能遇到的困扰,并加以说明。 --- ## 套娃 事情开始于这样的代码: ```cpp // A.h #pragma once #include "B.h" class A { B b; }; ``` ```cpp // B.h #pragma once #include "A.h" class...

如题。

feature

Fix typos in section " Error objects" **What issue does this pull request resolve?** **What changes did you make?** **Is there anything that requires more attention while reviewing?**

每学期周数未知令我们经常收到无法解决的反馈。幸而在已知春季学期第一天的情况下,结合农历,我们就可以准确地推知夏季学期周数。规则如下: - 若夏季学期所在农历年有闰月,则夏季学期共有 12 周; - 若夏季学期所在农历年无闰月,则下一年春节应落在夏季学期结束后第 139~145 天,可反推出夏季学期的周数。 除此之外,我们还需调整课表的预取策略,并妥善处理周数不能被 3 整除的情况。 我认为这么做的成本低于让学校加接口。

feature

如题,在并发度较高的情况下,偶尔会出现 `The child process is not responding.` 的错误。 我主要是比较好奇,这通常是由于 `ChildProcess` 被什么东西阻塞了,还是仅仅是 `ChildProcess` 运行得比较慢导致的。 我目前的应对方式是,遇到这种错误,尝试重新启动一次沙盒。不过我比较好奇,有没有什么别的思路可能解决这个问题。 谢谢!

It seems that [the package on npm](https://www.npmjs.com/package/hexo-reference) is out-dated, compared with the latest commit on master. I recommend publishing a newer version to npm, so as to leverage the recently...

对于一些较新的发行版而言(systemd 版本在 v256 及以后),仅仅设置 `systemd.unified_cgroup_hierarchy=0` 会导致 systemd 拒绝运行,从而机器无法启动([参考链接1](https://wiki.archlinux.org/title/Cgroups#Enable_cgroup_v1)、[参考链接2](https://github.com/systemd/systemd/commit/f2512de82dc91cfb742a4f4df934bdb4fcad482d))。**这对于参考 simple-sandbox 旧版说明的用户而言可能是致命的。** 因此,我认为应该修改文档,新增必要的内核启动参数。 ~~当然,更长远来看,最好是项目本身能适配 cgroup v2(画大饼,别听)~~

Minimal example: https://github.com/thu-info-community/thu-info-app/actions/runs/10414518614/job/28843638237?pr=587 ``` Error: Unable to resolve module node:stream from /home/runner/work/thu-info-app/thu-info-app/node_modules/cheerio/dist/commonjs/index.js: node:stream could not be found within the project or in these directories: ../../node_modules error Unable to resolve module...