随笔 - 147  文章 - 0  评论 - 0  阅读 - 44469
  2025年4月8日
摘要: curl -o /dev/null -s -w "DNS解析: %{time_namelookup}\nTCP连接: %{time_connect}\nSSL握手: %{time_appconnect}\n请求准备: %{time_pretransfer}\n开始传输: %{time_starttr 阅读全文
posted @ 2025-04-08 14:42 CJTARRR 阅读(1) 评论(0) 推荐(0) 编辑
  2025年4月7日
摘要: #### **1. DNS 解析阶段** • **客户端发起请求**:用户访问 `http://example.com`。• **DNS 查询**: • 客户端向 DNS 服务器查询 `example.com` 的 IP 地址。 • **解析结果可能为**: ◦ **公网 IP**(如 `203.0 阅读全文
posted @ 2025-04-07 18:01 CJTARRR 阅读(4) 评论(0) 推荐(0) 编辑
  2025年4月3日
摘要: import asyncio from asyncio import Semaphore, Task, events from inspect import iscoroutinefunction from typing import Any, Optional from loguru import 阅读全文
posted @ 2025-04-03 15:45 CJTARRR 阅读(4) 评论(0) 推荐(0) 编辑
摘要: asyncio.run # 在当前线程中创建新的事件循环并执行传入的协程# 源码解读:def run(main, *, debug=False): if events._get_running_loop() is not None: # 从当前线程(threadding.local)中尝试获取正在运 阅读全文
posted @ 2025-04-03 09:40 CJTARRR 阅读(3) 评论(0) 推荐(0) 编辑
  2025年3月31日
摘要: package main​import ( "crypto/hmac" "crypto/sha256" "encoding/base64" "encoding/json" "fmt" "time")​// jwt原始头部信息type JwtHeaderRaw struct { Alg string 阅读全文
posted @ 2025-03-31 17:41 CJTARRR 阅读(4) 评论(0) 推荐(0) 编辑
摘要: StdEncoding: 常规编码 base64.StdEncoding.EncodeToString([]byte("Hello world. 你好,世界!"))// SGVsbG8gd29ybGQuIOS9oOWlve+8jOS4lueVjO+8gQ== URLEncoding: URL saf 阅读全文
posted @ 2025-03-31 17:17 CJTARRR 阅读(5) 评论(0) 推荐(0) 编辑
  2025年3月28日
摘要: // Distinct 函数用于对输入的切片进行去重,支持整型、浮点型和字符串类型func Distinct[T int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | floa 阅读全文
posted @ 2025-03-28 11:02 CJTARRR 阅读(2) 评论(0) 推荐(0) 编辑
  2025年3月19日
摘要: interface{} 本身是值类型(结构体),但它可以存储值类型或引用类型的数据。如果存储的是值类型,interface{} 会创建副本,修改不会影响原始数据。如果存储的是引用类型,interface{} 会存储指针,修改会影响原始数据。 阅读全文
posted @ 2025-03-19 14:15 CJTARRR 阅读(3) 评论(0) 推荐(0) 编辑
  2025年3月13日
摘要: import asynciofrom inspect import iscoroutinefunctionfrom typing import Any, Awaitable, List​​class CoroutinePool: def __init__(self, max_size: int): 阅读全文
posted @ 2025-03-13 15:28 CJTARRR 阅读(0) 评论(0) 推荐(0) 编辑
摘要: import asyncio​​class AsyncReadWriteLock: def __init__(self): self._readers = 0 self._writers_waiting = 0 self._writer_active = False self._lock = asy 阅读全文
posted @ 2025-03-13 15:06 CJTARRR 阅读(3) 评论(0) 推荐(0) 编辑
< 2025年4月 >
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
4 5 6 7 8 9 10

点击右上角即可分享
微信分享提示