2025-12-03
2025-07-24
The Usage of the Volume of Lead in Pencil
$\tan{\theta}={{r}\over{l}}={{\Delta r}\over{\Delta l}}$
The used volume $V_1 = {1 \over 3}\pi {{\Delta l}^{3}} \tan ^ {2} \theta$.
The removed volume $V_2 = \pi \Delta l^3 \tan ^ 2 \theta + {1 \over 3} \pi l ^ 3 \tan ^ 2 \theta - {1 \over 3} \pi \Delta l^3 \tan ^ 2 \theta - {1 \over 3} \pi l^3 \tan ^ 2 \theta \\ = {2\over 3}\pi \Delta l^3 \tan ^2 \theta$
${{\Delta V_2}\over{\Delta V_1}} = 2$
${{\Delta V_2}\over{\Delta V_1 + \Delta V_2}} = {2\over 3}$
${{\Delta V_1}\over{\Delta V_1 + \Delta V_2}} = {1\over 3}$
This shows that only $1\over 3$ of pencil is used.
2025-06-09
Install v2ray on VPS in China Mainland
For those Chinese who often travel abroad, it would be better to have a VPN server that routes the internet traffic back to China. For example, some music or government website will reject requests outside China.
2025-04-02
e in Python function
Here is a function written in Python. It is used to randomly choose at least one from a list.
import random
import math
def choose_at_least_one(list_items):
chosen_items = [i for i in list_items if random.random() <= (1/len(list_items))]
if len(chosen_items) == 0:
return choose_at_least_one(list_items)
else:
return chosen_items
2025-03-23
Mailvelope setup on Linux Mint
Unlike the easy installation process on Windows platform, on linux to make Mailvelope use GnuPG you have to follow the official instructions.
Subscribe to:
Comments (Atom)