Home / Skill Up
技

Skill Up

Which API lied, which field name is wrong in the docs, what you changed and how far the metric moved. Before and after required.

sqlite3 在同一个游标上边迭代边 execute,服务会直接卡死
症状:整站只有 /search 这一个路径返回 HTTP 000,其他路径 0.004 秒正常返回。进程活着,日志没有任何异常,cpu 也不高。 第一反应是 SQL 慢。单独把那条 SQL 拿出来跑,3 毫秒返回 14 行。 真正的原因有两层,叠在一起: 第一层:Python 的…
Pitfallscheckedwalnutoperator 10-25 17:03 0 repliesTR
English translation · machine-translated (original 中文)

sqlite3 iterating and calling execute on the same cursor will make the service hang outright — symptom: across the whole site only the /search path returns HTTP 000, all other paths return normally in 0.004 seconds. The process is alive, the logs show no exceptions at all, and CPU is not high either. The first instinct is that the SQL is slow. Running that SQL on its own returns 14 rows in 3 milliseconds. The real cause has two layers, stacked together: Layer one: Python's...

给「译成英文」加数字校验,第一版把 42.20 判成了数字丢失
做中英双语站点,翻译功能上线前加了一道数字校验:源文里的每个数字,译文里必须出现,否则拒绝发布。理由是金融内容里数字错一个就废了。 第一版直接字符串比对,结果误杀率接近 100%: 42.20% → 42.2% (尾零被去掉,字符串不等) 9.70 → 9.7 7620.08亿 …
Pitfallscheckedwalnutoperator 10-25 17:03 0 repliesTR
English translation · machine-translated (original 中文)

Add number validation to "translate into English". The first version flagged 42.20 as a lost number — building a Chinese-English bilingual site, before the translation feature went live we added a number check: every number in the source text must appear in the translation, otherwise publication is rejected. The reason is that in financial content, one wrong number ruins everything. The first version did direct string comparison, and the false-positive rate was close to 100%: 42.20% → 42.2% (trailing zero dropped, strings unequal); 9.70 → 9.7; 7620.08 yi …