0%

2020 年底全球新馆疫情没有好转

并且随着冬季来临逐渐有再次爆发的迹象

但最近小法师需要回国一趟

虽然目前全球已经开始接种各种疫苗

公司 种类 剂量 有效率 存储 ℃
BioNTech/辉瑞 mRNA x2 95% -70
Moderna mRNA x2 95% -20
牛津/阿斯利康 腺病毒载体 x2 62-90% 0

但目前回国仍需要 14 天隔离

阅读全文 »

refer code 0CM1QE

这两天美国大选
作为韭菜的就不分享因为时差高位接盘
半夜大跌惊醒割肉
现在眼看着 🚀 一般的往上涨,又不敢入市的尴尬

只分享一下当时开户的心酸历程吧

阅读全文 »

If kernel_task is using a large percentage of your Mac CPU

之前我有留意到 kernel_task 动不动就会 100%,卡到不行,但它又是 System 进程,毫无办法

根据  的文档 If kernel_task is using a large percentage of your Mac CPU

In other words, kernel_task responds to conditions that cause your CPU to become too hot, even if your Mac doesn’t feel hot to you. It does not itself cause those conditions. When the CPU temperature decreases, kernel_task automatically reduces its activity.

这是说因为 CPU 太热 🔥 了,即使你觉得不热 🥶…

另外 kernel_task 也不是罪魁祸首,等 CPU 不热了,它的占用率也就自动下去…

阅读全文 »

苹果提供了一种新的方法(身份验证令牌)来进行 APN

与以前的方式(提供商证书)相比,证书 *.p12 每年都会过期

基于令牌的* .p8 永不过期

阅读全文 »

游乐园 🎠 之书

孩子们没有生死的概念,坟场对于他们来说更像是游乐园

阅读全文 »

Binding to UserDefaults

1
2
3
4
5
6
7
class UD: ObservableObject {
@Published var date: Date = UserDefaults.standard.value(forKey: "date") as? Date ?? Date() {
didSet {
UserDefaults.standard.set(self.date, forKey: "date")
}
}
}
阅读全文 »

事实上对于 4k 视频减去不必要的片段可以更有效的节省空间


当我在“照片”中画廊视频时,它将显示我在何时何地拍摄它们

这是一个很棒的功能,可以帮助我回忆我的记忆
但是原始的 4k 在 iCloud 中占用了太多空间

例如,即使采用 HEVC(高效视频编码),则 2:30 的视频将占用 1GB 的空间
我的 200G iCloud 计划几乎已 ​​ 满

因此,我计划稍微压缩视频以节省一些空间。

阅读全文 »

Design HashSet

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class MyHashSet {
private var bucket = Array(repeating: false, count: 1000001)

func add(_ key: Int) {
bucket[key] = true
}

func remove(_ key: Int) {
bucket[key] = false
}

func contains(_ key: Int) -> Bool {
return bucket[key]
}
}
阅读全文 »

验证二叉搜索树

1
2
3
4
5
6
7
8
9
10
11
12
class Solution {
func isValidBST(_ root: TreeNode?) -> Bool {
return helper(root, Int.min, Int.max)
}

private func helper(_ node: TreeNode?, _ lower: Int, _ upper: Int) -> Bool {
guard let n = node else { return true }
if n.val <= lower || n.val >= upper { return false }

return helper(n.left, lower, n.val) && helper(n.right, n.val, upper)
}
}
阅读全文 »