The global COVID-19 pandemic at the end of 2020 shows no signs of improvement.

And with the arrival of winter, there are signs of a resurgence.

But recently, Little Wizard needs to return to China.

Although various vaccines have been rolled out globally,

Company Type Dosage Efficacy Storage ℃
BioNTech/Pfizer mRNA x2 95% -70
Moderna mRNA x2 95% -20
Oxford/AstraZeneca Adenovirus vector x2 62-90% 0

Currently, a 14-day quarantine is still required when returning to China.

Read more »

Referral code 0CM1QE

These days, the US election
As a novice investor, I won’t share because of the time difference and buying at high prices
Waking up in the middle of the night to a big drop and being forced to sell
Now I’m watching the stocks go up πŸš€, but I’m too embarrassed to enter the market

I’ll just share my bitter experience of opening an account back then

Read more »

If kernel_task is using a large percentage of your Mac CPU

I noticed that kernel_task would frequently reach 100% and cause my Mac to lag, but it is a System process and there’s nothing I can do about it.

According to Apple’s documentation 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.

This means that because the CPU is too hot, even if it doesn’t feel hot to you…

Also, kernel_task isn’t the main culprit. Its usage will automatically decrease when the CPU temperature goes down…

Read more »

Apple has provided a new method (authentication token) for APNs.

Compared to the previous method (provider certificate), the certificate *.p12 expires every year.

Token-based *.p8 never expires.

Read more »

The Graveyard Book 🎠

Children have no concept of life and death. To them, the graveyard is more like an amusement park.

Read more »

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")
}
}
}
Read more »

In fact, removing unnecessary segments from 4k videos can be a more effective way of saving space.


When I view videos in the β€œPhotos” gallery, it shows me when and where I took them.

This is a great feature that helps me reminisce my memories. However, the original 4k videos take up too much space in iCloud.

For example, even with HEVC (High Efficiency Video Coding), a 2:30 video will take up 1GB of space. My 200GB iCloud plan is almost full.

Therefore, I plan to compress the videos slightly to save some space.

Read more »

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]
}
}
Read more »

Validate Binary Search Tree

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)
}
}
Read more »
0%