mirror of
https://gitee.com/xmz7891/ykxmz.git
synced 2026-10-18 19:30:42 +00:00
琚帶绔?- 淇 MTU 闂锛氬す MSS + 璺緞 MTU 鎺㈡祴锛堝叕缃戝彲鐢ㄧ巼 48% -> 100%锛?- 澶嶇敤 HTTP 杩炴帴锛堝厤鎺夋瘡娆℃柊寤?TLS 鐨?30% 鎻℃墜澶辫触锛?- 姣忓垎閽熷洖澶存壘灞€鍩熺綉锛岃嚜鍔ㄥ垏鍥炲揩 400 鍊嶇殑璺緞 - 鐢婚潰蹇冭烦甯э細闈欐鏃剁渷娴侀噺锛屽鎴风浠嶇煡閬撴祦鏄椿鐨?- 閿佸睆鏃剁粰鍑哄彲鎿嶄綔鐨勬彁绀? 鎵嬭〃绔?- 鍐呯疆 GTS Root R4 / GlobalSign Root CA锛屼慨 SSLHandshakeException - 杩炴帴閿欒缈昏瘧鎴愪汉璇濓紙璇佷功/鏃堕棿/瑙f瀽/瓒呮椂鍒嗗埆鎻愮ず锛?- 缁忎腑杞繛涓婂悗鐢ㄦ湇鍔″櫒鎶ョ殑鍦板潃鍒锋柊宸查厤瀵硅褰?- 鏂板灞€鍩熺綉杩炴帴椤甸潰銆佹湇鍔″櫒寤惰繜妫€娴? 鏈嶅姟鍣ㄧ - 鏀寔 chunked 璇锋眰浣擄紙淇瘡 16 绉掍竴娆$殑杩炴帴閿欎贡涓庡ぇ闈㈢Н 502锛?- 缃戠粶璋冧紭鑴氭湰 net-tune.sh锛堝紑鏈鸿嚜鍔ㄥ簲鐢級 - 绠$悊椤碉細鎵归噺鍒犻櫎銆佺綉缁滀綋妫€銆佷笅杞藉尯 - 闅ч亾鏀?HTTP/2 + 鍙岃繛鎺? 鏂囨。 - 璁稿彲鍗忚 / 瀹夎鍓嶅繀璇?/ 瀹夎鍚庨』鐭ワ紙浣滆€咃細灏忛害瀛愶級
59 lines
2.0 KiB
Python
59 lines
2.0 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""把复选框单元格插进设备行。
|
|
|
|
为什么单独写这一步:
|
|
第一次跑 add_batch_delete.py 时 rows 锚点没匹配上,
|
|
但后端接口加成功了;第二次跑就因为"delete_many 已存在"整个跳过,
|
|
于是行里的复选框一直没加上(表头有、行里没有)。
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import ast
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
RELAY = Path(r"C:\Users\shu\Desktop\deepseekagent\LanRemote\relay" r"\relay.py")
|
|
|
|
|
|
def main() -> int:
|
|
lines = RELAY.read_text(encoding="utf-8").splitlines(keepends=True)
|
|
|
|
if any("class=pickcell" in line and "<tr>" not in line for line in lines):
|
|
print(" 复选框已经在行里了")
|
|
return 0
|
|
|
|
out = []
|
|
done = False
|
|
for index, line in enumerate(lines):
|
|
out.append(line)
|
|
if done:
|
|
continue
|
|
# 找 rows.append( 之后紧跟的 "<tr>" 行
|
|
if line.strip() == '"<tr>"' and index > 0 and "rows.append(" in lines[index - 1]:
|
|
indent = " " * (len(line) - len(line.lstrip()))
|
|
out.append(indent + "# 批量删除用的复选框,value 是 deviceId\n")
|
|
out.append(indent + '"<td class=pickcell>"\n')
|
|
out.append(indent + "f'<input type=checkbox class=pick "
|
|
"value=\"{_esc(device[\"deviceId\"])}\">'\n")
|
|
out.append(indent + '"</td>"\n')
|
|
done = True
|
|
|
|
if not done:
|
|
print(" [失败] 没找到插入点")
|
|
return 1
|
|
|
|
text = "".join(out)
|
|
ast.parse(text)
|
|
RELAY.write_text(text, encoding="utf-8", newline="\n")
|
|
print(" 已插入复选框单元格")
|
|
for index, line in enumerate(text.splitlines(), 1):
|
|
if "rows.append" in line:
|
|
for offset in range(index - 1, min(index + 8, len(text.splitlines()))):
|
|
print(f" {offset + 1}: {text.splitlines()[offset]}")
|
|
break
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|