智能助手网
标签聚合 to

/tag/to

www.ithome.com · 2026-04-18 21:18:37+08:00 · tech

IT之家 4 月 18 日消息,消息源 Canon Rumors 前天发文称,佳能可能会为 EOS R7 Mark II 无反相机引入 DIGIC Accelerator Lite 精简版处理器。 据报道,佳能已经在 EOS R1 和 R5 Mark II 相机中使用过 DIGIC Accelerator 处理器,用于提升相机的数据处理能力。该芯片可与高速背照式 / 堆栈式传感器配合,带来更快的电子快门速度、自动对焦性能, 大幅降低果冻效应 , 还可以同时记录照片和视频 。 IT之家注意到,EOS R6 Mark III 并没有搭载这枚处理器,原因可能不只是成本问题,也与该机采用前照式 CMOS 有关,读取速度明显慢于高端机型。 目前已有传闻称,佳能 EOS R7 Mark II 将成为首款搭载背照式堆栈传感器的 APS-C 画幅 EOS-R 相机。如果相关消息属实,那么更高的读出速度需要搭配更强的处理器。 值得注意的是,佳能的 DIGIC X 处理器本身就有不同版本,例如 R1、R5 Mark II 等高端机型搭载满血版处理器,性能明显优于 R6 Mark III 和 R8 等中端机型。 不过,佳能显然没有必要去刻意限制 R7 Mark II 的性能,APS-C 和全画幅之间本来就已经形成明显的定位区别。

www.ithome.com · 2026-04-18 20:46:58+08:00 · tech

IT之家 4 月 18 日消息,据 TomsHardware 今日报道,微软为推广 Edge 浏览器推出了一项总奖金池高达 200 万美元(IT之家注:现汇率约合 1366.8 万元人民币)的抽奖活动,然而这项活动自 3 月 12 日开启以来已有一个多月,直至前天才被媒体发现。 该活动名为“Edge Prize Party”,面向美国、加拿大、英国、法国、德国、荷兰、爱尔兰、奥地利、希腊、芬兰、卢森堡、西班牙、瑞士、挪威、墨西哥、秘鲁、厄瓜多尔、哥斯达黎加、危地马拉、新西兰、日本、新加坡、韩国、中国大陆、中国香港、捷克共和国、罗马尼亚及南非等国家和地区的居民开放,活动将持续至 2026 年 5 月 21 日太平洋时间晚上 11:59:59。 参与抽奖的方式较为简单:用户只需将 Microsoft Edge 设为默认浏览器,并使用地址栏进行一次 Bing 搜索,即可获得 5 次抽奖机会。 此外,用户还可通过多种方式增加抽奖次数,包括访问活动页面、分享活动链接、使用 Microsoft Rewards 扩展、兑换 Microsoft Rewards 积分、使用 Bing 和 Copilot 移动端应用、尝试 Bing 图像创作器和视频创作器等(每人最多可通过积分兑换 465 次抽奖机会)。 奖品设置方面,此次活动将产生四名大奖得主:其中一名获得 100 万美元现金大奖、三名获得奔驰汽车(中奖者前往当地奔驰经销商,在 10 万美元等值货币的预算内自行选择车型配置)。 活动还设有“数千份即时奖品”,包括宏碁 Copilot+ PC、50 美元的 Xbox 礼品卡、ROG Xbox Ally 掌机、Dyson Airwrap 多功能造型器等。 除此之外,用户参与抽奖需要拥有 Microsoft 账户并同意接收来自 Microsoft Rewards 的推广邮件。参与活动无需任何购买行为,但需要注意的是,部分地区的获奖者可能面临 30% 的税款预扣。 值得注意的是,这并非微软首次通过现金奖励的方式推广其浏览器产品。但与以往不同,这次活动的营销传播效果并不理想。活动上线一个月来,社交媒体和科技论坛上几乎没有自发讨论。 另外,活动入口藏在 Bing Rewards 页面深处,愿意主动寻找的多为已经使用微软生态的存量用户,而 Edge 真正希望争取的 Chrome 用户,99% 不会主动打开该页面,很可能没机会得知这一活动。

linux.do · 2026-04-18 20:40:28+08:00 · tech

any路由器因为跟claude code有一些参数适配的问题,所以我们可以在本地架设一个简单的网关,将参数在本地拦截,然后修改一下,再传给any大善人,就可以绕过这些参数适配的小问题了。 claudecode最新版本适用,不需要回退版本 这个本地网关做了什么 在本地监听 127.0.0.1:1998。 把 Claude Code 的请求转发到上游any的端口。 自动补认证头(Authorization / x-api-key)。 对 haiku 请求额外修正:补 context-1m-2025-08-07,并加 thinking.budget_tokens=1024。 把请求和响应写到 gateway_requests.jsonl 方便排错。 极简启动步骤 先开网关 export ANTHROPIC_BASE_URL=“any大善人地址” export ANTHROPIC_AUTH_TOKEN=“你的真实token” python3 /Users/Apple/Desktop/code/claude_gateway.py 新开一个终端再开 Claude Code ANTHROPIC_BASE_URL=“ http://127.0.0.1:1998 ” claude --enable-auto-mode 截图为证: 网关代码如下(vibe写的,很多冗余,大佬可以自行修改): #!/usr/bin/env python3 import base64 import json import os import threading from datetime import datetime, timezone from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer from urllib.error import HTTPError, URLError from urllib.parse import urlsplit, urlunsplit from urllib.request import Request, urlopen LISTEN_HOST = os.getenv("CLAUDE_GATEWAY_HOST", "127.0.0.1") LISTEN_PORT = int(os.getenv("CLAUDE_GATEWAY_PORT", "1998")) UPSTREAM_BASE_URL = os.getenv( "ANTHROPIC_BASE_URL", "https://a-ocnfniawgw.cn-shanghai.fcapp.run" ) UPSTREAM_AUTH_TOKEN = os.getenv("ANTHROPIC_AUTH_TOKEN", "") UPSTREAM_TIMEOUT = float(os.getenv("CLAUDE_GATEWAY_TIMEOUT", "120")) LOG_PATH = os.getenv( "CLAUDE_GATEWAY_LOG", os.path.join(os.path.dirname(__file__), "gateway_requests.jsonl") ) LOG_LOCK = threading.Lock() def utc_now_iso() -> str: return datetime.now(timezone.utc).isoformat() def ensure_log_parent_exists() -> None: parent = os.path.dirname(LOG_PATH) if parent: os.makedirs(parent, exist_ok=True) def decode_body_for_log(body: bytes) -> dict: if not body: return {"encoding": "utf-8", "text": ""} try: return {"encoding": "utf-8", "text": body.decode("utf-8")} except UnicodeDecodeError: return {"encoding": "base64", "text": base64.b64encode(body).decode("ascii")} def append_log(record: dict) -> None: ensure_log_parent_exists() line = json.dumps(record, ensure_ascii=False) with LOG_LOCK: with open(LOG_PATH, "a", encoding="utf-8") as f: f.write(line + "\n") def build_upstream_url(base_url: str, incoming_path: str) -> str: base = urlsplit(base_url) incoming = urlsplit(incoming_path) incoming_path_only = incoming.path or "/" base_path = base.path.rstrip("/") if base_path: merged_path = f"{base_path}{incoming_path_only}" else: merged_path = incoming_path_only return urlunsplit((base.scheme, base.netloc, merged_path, incoming.query, "")) def rewrite_request_headers(headers: dict, path: str) -> dict: rewritten = dict(headers) if UPSTREAM_AUTH_TOKEN: has_x_api_key = any(k.lower() == "x-api-key" for k in rewritten) has_authorization = any(k.lower() == "authorization" for k in rewritten) if not has_x_api_key: rewritten["x-api-key"] = UPSTREAM_AUTH_TOKEN if not has_authorization: rewritten["Authorization"] = f"Bearer {UPSTREAM_AUTH_TOKEN}" # 先做骨架,后续按 any 规则逐步覆写。 return rewritten def rewrite_request_body(body: bytes, headers: dict, path: str) -> bytes: if not body: return body content_type = "" for k, v in headers.items(): if k.lower() == "content-type": content_type = v break if "application/json" not in content_type.lower(): return body try: payload = json.loads(body.decode("utf-8")) except (UnicodeDecodeError, json.JSONDecodeError): return body model = str(payload.get("model", "")).lower() if not model.startswith("claude-haiku"): return body beta_key = None for k in headers.keys(): if k.lower() == "anthropic-beta": beta_key = k break raw_beta = headers.get(beta_key, "") if beta_key else "" beta_features = [item.strip() for item in raw_beta.split(",") if item.strip()] if "context-1m-2025-08-07" not in beta_features: beta_features.append("context-1m-2025-08-07") merged_beta = ",".join(beta_features) if beta_key: headers[beta_key] = merged_beta else: headers["anthropic-beta"] = merged_beta payload["thinking"] = {"type": "enabled", "budget_tokens": 1024} return json.dumps(payload, ensure_ascii=False, separators=(",", ":")).encode("utf-8") class ClaudeGatewayHandler(BaseHTTPRequestHandler): protocol_version = "HTTP/1.1" def do_GET(self): self._handle_proxy() def do_POST(self): self._handle_proxy() def do_PUT(self): self._handle_proxy() def do_PATCH(self): self._handle_proxy() def do_DELETE(self): self._handle_proxy() def do_OPTIONS(self): self._handle_proxy() def do_HEAD(self): self._handle_proxy() def log_message(self, fmt, *args): return def _read_request_body(self) -> bytes: content_length = int(self.headers.get("Content-Length", "0") or "0") if content_length <= 0: return b"" return self.rfile.read(content_length) def _copy_request_headers(self) -> dict: headers = {} for key, value in self.headers.items(): key_l = key.lower() if key_l in {"host", "content-length", "connection", "accept-encoding"}: continue headers[key] = value return headers def _send_response(self, status: int, headers: dict, body: bytes) -> None: self.send_response(status) ignored = {"transfer-encoding", "content-length", "connection"} for k, v in headers.items(): if k.lower() in ignored: continue self.send_header(k, v) self.send_header("Content-Length", str(len(body))) self.send_header("Connection", "close") self.end_headers() if self.command != "HEAD" and body: self.wfile.write(body) def _handle_proxy(self): req_body = self._read_request_body() req_headers = self._copy_request_headers() req_headers = rewrite_request_headers(req_headers, self.path) req_body = rewrite_request_body(req_body, req_headers, self.path) upstream_url = build_upstream_url(UPSTREAM_BASE_URL, self.path) request_log = { "timestamp": utc_now_iso(), "client_ip": self.client_address[0] if self.client_address else "", "method": self.command, "path": self.path, "upstream_url": upstream_url, "headers": dict(self.headers.items()), "body": decode_body_for_log(req_body), "body_length": len(req_body), } try: upstream_req = Request( url=upstream_url, data=req_body if req_body else None, headers=req_headers, method=self.command, ) with urlopen(upstream_req, timeout=UPSTREAM_TIMEOUT) as resp: resp_status = resp.getcode() resp_headers = dict(resp.headers.items()) resp_body = resp.read() request_log["response"] = { "status": resp_status, "headers": resp_headers, "body": decode_body_for_log(resp_body), "body_length": len(resp_body), } append_log(request_log) self._send_response(resp_status, resp_headers, resp_body) return except HTTPError as e: err_body = e.read() if hasattr(e, "read") else b"" err_headers = dict(e.headers.items()) if getattr(e, "headers", None) else {} request_log["response"] = { "status": e.code, "headers": err_headers, "body": decode_body_for_log(err_body), "body_length": len(err_body), } append_log(request_log) self._send_response(e.code, err_headers, err_body) return except (URLError, TimeoutError, Exception) as e: error_payload = { "error": "gateway_upstream_error", "message": str(e), } error_body = json.dumps(error_payload, ensure_ascii=False).encode("utf-8") request_log["response"] = { "status": 502, "headers": {"Content-Type": "application/json; charset=utf-8"}, "body": {"encoding": "utf-8", "text": error_body.decode("utf-8")}, "body_length": len(error_body), } append_log(request_log) self._send_response( 502, {"Content-Type": "application/json; charset=utf-8"}, error_body, ) def main(): server = ThreadingHTTPServer((LISTEN_HOST, LISTEN_PORT), ClaudeGatewayHandler) print(f"[gateway] listening on http://{LISTEN_HOST}:{LISTEN_PORT}") print(f"[gateway] upstream: {UPSTREAM_BASE_URL}") print(f"[gateway] auth token configured: {bool(UPSTREAM_AUTH_TOKEN)}") print(f"[gateway] log file: {LOG_PATH}") server.serve_forever() if __name__ == "__main__": main() 3 个帖子 - 2 位参与者 阅读完整话题

linux.do · 2026-04-18 17:07:58+08:00 · tech

起因 今天在使用WSL上的Centos时, 发现Vscode远程连接上不上了, 然后想起来vscode之前下载claude插件自动更新了一次, 导致它的版本变成了v1.106.0, 然后就连不上了. 从 VS Code 1.99(2025年3月发布) 开始,官方预编译的 VS Code Server 对 Linux 发行版的系统依赖做了升级,要求远端服务器必须满足: glibc >= 2.28 libstdc++ >= 3.4.25 以及对应的动态链接环境 ssh远程连接时错误信息如下: [2026-04-18 03:33:45.663] Starting server: /home/user/.vscode-server/bin/ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57/bin/code-server --host=127.0.0.1 --port=0 --connection-token=1869292326-2464295744-3154885190-4149685785 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all [2026-04-18 03:33:45.664] /home/user/.vscode-server/bin/ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /home/user/.vscode-server/bin/ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57/node) [2026-04-18 03:33:45.664] /home/user/.vscode-server/bin/ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57/node: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by /home/user/.vscode-server/bin/ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57/node) [2026-04-18 03:33:45.664] /home/user/.vscode-server/bin/ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /home/user/.vscode-server/bin/ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57/node) [2026-04-18 03:33:45.664] /home/user/.vscode-server/bin/ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57/node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by /home/user/.vscode-server/bin/ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57/node) 解决方法一: 官方推荐的自定义运行库法 code.visualstudio.com Can I run VS Code Server on older Linux distributions? - Remote Development FAQ This article covers frequently asked questions for each of the Visual Studio Code Remote Development extensions. See the SSH, Containers, and WSL articles for more details on setting up and working with each of their respective capabilities. Or try... 以下是AI关于这个文档的解释: VS Code 1.99 之后,官方发的 VS Code Server 二进制 默认要求远端系统有较新的: glibc >= 2.28 libstdc++ >= 3.4.25 以及相应动态链接环境 如果你的老服务器系统本身太旧,比如 CentOS 7,没有这些库,Server 本体会启动失败 这时候可以额外准备一套“较新的运行库目录”,让 VS Code Server 不要使用系统自带旧 glibc,而是改为加载你提供的那一套新库. 这个“较新的运行库目录”,官方建议你用 Crosstool-ng 去构建,这就是文档里说的 sysroot 准备工具: v0.18.x 以上的 patchelf. Release 0.18.0 · NixOS/patchelf · GitHub 在 rpmfind.net 中找到所需要的 glibc 2.28 地址: RPM resource glibc 选择AlmaLinux 8.10 BaseOS for aarch64 glibc-2.28-251.el8_10.31.aarch64.rpm 在 rpmfind.net 中找到所需要的 libstdc++ 地址: https://www.rpmfind.net/linux/almalinux/8.10/BaseOS/x86_64/os/Packages/libstdc++-8.5.0-28.el8_10.alma.1.i686.rpm 选择AlmaLinux 8.10 BaseOS for aarch64 libstdc++-8.5.0-28.el8_10.alma.1.i686.rpm 不要直接安装 rpm!!! mkdir -p /home/user/lib/vscode_server_linux_root mv glibc-2.28-251.el8.x86_64.rpm /home/user/lib/vscode_server_linux_root/ mv libstdc++-8.5.0-21.el8.x86_64.rpm /home/user/lib/vscode_server_linux_root/ cd /home/user/lib/vscode_server_linux_root # 将rpm文件解压到当前目录 rpm2cpio glibc-2.28-251.el8.x86_64.rpm | cpio -idmv rpm2cpio libstdc++-8.5.0-21.el8.x86_64.rpm | cpio -idmv # 检查下 so 文件中的 ABI 兼容版本是否符合 VSCode 或者 Node.js 的要求 strings ./usr/lib/libc.so.6 | grep -E '^GLIBC_[0-9.]+' | sort strings ./usr/lib/libstdc++.so.6 | grep -E '^GLIBCXX_[0-9.]+' | sort # 设置环境变量, 两个环境变量都试一下 export VSCODE_SERVER_CUSTOM_GLIBC_LINKER=/home/user/my_lib/vscode_server_linux_root/usr/lib # export VSCODE_SERVER_CUSTOM_GLIBC_LINKER=/home/flipped/my_lib/vscode_server_linux_root/usr/lib/ld-linux.so.2 export VSCODE_SERVER_CUSTOM_GLIBC_PATH=/home/user/my_lib/vscode_server_linux_root/usr/lib export VSCODE_SERVER_PATCHELF_PATH=/home/user/my_lib/vscode_server_linux_root/bin 理论上这样之后, node 应该可以正常启动了, 但是我在wsl上的centos7.9进行测试时, 即使设置了环境变量, 服务器上的node也没有到我指定的目录下去找2.28的glibc. 然后我也尝试了手动patch node. 但发现patch后, node --version 都运行不了. [!NOTE] 不一定起作用 若环境变量不生效,可尝试直接修改 VS Code Server 内嵌 Node.js 的动态链接路径: patchelf --set-interpreter ${CUSTOM_LIB_DIR}/usr/lib64/ld-linux-x86-64.so.2 \ --set-rpath ${CUSTOM_LIB_DIR}/usr/lib64 \ ~/.vscode-server/bin/<VSCode版本号>/node 解决方法2: 第三方补丁工具 从社区仓库下载与本地 VS Code 版本匹配的包: 仓库地址: MikeWang000000/vscode-server-centos7 查看本地 VS Code 版本:点击左下角齿轮 → 关于 → 复制版本哈希(如 ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57 ) # 1. 创建VS Code Server目录(若已存在则跳过) mkdir -p ~/.vscode-server # 2. 解压下载的预补丁包 tar xzf vscode-server_*.tar.gz -C ~/.vscode-server --strip-components 1 # 3. 执行补丁脚本 ~/.vscode-server/code-latest --patch-now # 4. 替换官方内嵌的Node.js(替换为预编译的兼容版本) cp -f ~/.vscode-server/cli/servers/Stable-<版本哈希>/server/node \ ~/.vscode-server/bin/<版本哈希>/node 使用这个方案, 我电脑上能够连接到centos了, 但是远程连接后, 无法在vscode的集成终端中使用 code a.log 打开服务器上的文件, 报错如下: user@user:test$ code . Unable to connect to VS Code server: Error in request. Error: connect ENOENT /run/user/1000/vscode-ipc-d2af735a-73ee-499c-9f8c-48fa19a6199e.sock at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1637:16) { errno: -2, code: 'ENOENT', syscall: 'connect', address: '/run/user/1000/vscode-ipc-d2af735a-73ee-499c-9f8c-48fa19a6199e.sock' } 除了上面给出的预编译后的node文件, 在下面这个issue里面针对centos上运行v18以后的nodejs的问题, 也提供了一个预编译好的版本 github.com/nodejs/node Node.js is showing error "node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)" 已打开 05:40AM - 28 Mar 24 UTC 已关闭 08:38PM - 17 May 25 UTC yogeshlc ### Version node-v20.11.0-linux-x64.tar.xz ### Platform Linux yogVM 5.4.17-21 … 36.325.5.1.el7uek.x86_64 ### Subsystem _No response_ ### What steps will reproduce the bug? - Extract node.js tar at location /usr/local - check node --version cmd which is failing with error Error: node --version node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node) node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by node) ### How often does it reproduce? Is there a required condition? _No response_ ### What is the expected behavior? Why is that the expected behavior? node --version v20.11.0 ### What do you see instead? node --version node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node) node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by node) ### Additional information _No response_ 但我用这个, 虽然也能正常连接, 但无法打开vscode中的集成终端. 报错如下. 结尾 佬友们帮忙看看, 为什么我使用官方文档里面的方法, 设置环境变量之后还是没有办法让服务器上的node到我指定的目录下去找glibc. 2 个帖子 - 2 位参与者 阅读完整话题

linux.do · 2026-04-18 16:58:03+08:00 · tech

参考豆包专家的资料整的 英文提示词通用: transform this anime character into a realistic human, maintain exact hairstyle, hair color, eye color, facial proportions and expression, natural skin pores, detailed eyes and lips, even studio lighting, clear facial contours 多图的话,把this改成these ,Character后面加个s 删掉into后面的a 不然傻傻的豆包可能就帮你把所有图片融合起来,生成一张图片了() 直接看看豆包5.0效果吧,我不是很喜欢,但是某些AI形象创建必须要真实人脸 把二次元的头部比例复刻到这里还是很奇怪喵 3 个帖子 - 3 位参与者 阅读完整话题

hnrss.org · 2026-04-18 16:53:41+08:00 · tech

Hello, I built chlibc, a linux tool to change the system interp and glibc to your custom one. Normally, running an ELF against a different glibc, you'd use LD_LIBRARY_PATH and patchelf, or use chroot/docker. chlibc allows you to change the dynamic linker of a process on the fly without patching and root access. Key Features: - zero disk modification: no need for patchelf --set-interpreter. - no root required: works entirely in user-space via ptrace - multi-arch: native support for x86_64, AArch64, and RISC-V. - lightweight: unlike PRoot, which intercepts every syscall to translate paths, chlibc only intervenes during the initial execve() phase. Once the loader is swapped, it almost has no runtime overhead. I’d love to hear your thoughts about this tool, thanks! Comments URL: https://news.ycombinator.com/item?id=47814330 Points: 2 # Comments: 0