from dataclasses import dataclass
@dataclass
class Guide:
topic: str
minutes: int
def total_minutes(guides: list[Guide]) -> int:
return sum(guide.minutes for guide in guides)Dataclasses and type hints
Open guide浏览器开发者工具
共 15 款工具,完全在浏览器中运行,不会向服务器发送任何内容。
最新语法指南
直接从指南库取出的最新四篇指南。
指南正文为英文
指南库中的 3,860+ 篇语法指南以英文发布。下方工具均已完整翻译,指南链接会打开英文原文。
Git Push Rejected GH001: Large Files and History Rewrite
The 100 MB limit applies to every blob in the pushed history, so deleting the file does not help. Find the object, rewrite with filter-repo, or migrate to LFS.
Rust Tokio: Blocking the Runtime and spawn_blocking Fixes
A synchronous call inside an async fn stops the worker that drives every other task on it, timers included. Detection, spawn_blocking, and the guard-across-await trap.
Go http.Client: unexpected EOF and Connection Reuse Leaks
A body closed without being read cannot be reused, and descriptors pile up. Idle timeouts shorter than the upstream's, MaxIdleConnsPerHost and safe retries.
Node.js JWT invalid signature: JWKS Rotation and Clock Skew
One message covers three bugs: the wrong key type for RS256 or ES256, a JWKS cache that never refreshes after a kid rotation, and a clock that drifted.
按主题浏览
指南库中的全部类别,以及已发布指南数量。