515 日 , 2025 10:06:03
angular里就要用::ng-deep

一直看到IDE提示过时deprecated,但是很多个版本了还没有移除,探究了一下发现开发团队说不会移除了,只是会一直警告而已。https://github.com/angular/angular/issues/25160

 

一直都用这个功能自定义第三方框架内部的样式非常好用,只要限定好选择器就不会影响其他组件。比如

.some-class-in-component ::ng-deep .internal-class {}

当然不排除技术垃圾的会直接开头就::ng-deep起手,但是工具不应该给他们擦屁股。

 

511 日 , 2025 21:49:25
🔋

买了两个古董mp4,电池都挂了毕竟是15年前的东西。于是买了俩锂电池,都是软包锂离子聚合物电池,505573——3000mah、503096——1500mah。能量密度分别是552Wh/L,385 Wh/L。(前者应该是虚标的,杂牌。后者是大品牌工厂出品)

报废的原装电池是457373——2500mah,503496——1700mah,能量密度分别是386 Wh/L,385Wh/L。看来十几年了,低端的电池一点长进没有

 

于是算了算之前买的无线鼠标扩容电池,应该也是虚标。103048的2200mah实际容量按照折损来算只有1500mah

 

手机的电池果然好一点,猴米13pro原装电池规格606582,4700mah,能量密度569.11Wh/L

508 日 , 2025 20:01:27

electron-updater真的是毒瘤,在appdata\local里面到处都是xx-updater,有的软件卸载程序写的烂甚至卸载之后还会残留。基本是100MB左右的大小,好像和最初安装时的安装包是一模一样的。为什么你一个只负责更新的玩意要保留完整旧版本安装包啊,真就是为了便利随意的浪费硬盘空间

503 日 , 2025 21:11:21
鼠标电池扩容后充不进电解决方案

给vxe蜻蜓r1星闪版扩容,把原装一丁点大的520mah电池扩容成一千多mah的。扩容🔋出厂自带的电用了一个月才用完,期间一直没充电然后今天才发现居然充不进电😰
现象:插电后驱动一直显示正在充电但永远5%电量,一开始反复闪烁红灯充了很久都不增加,后来变绿灯常亮,拔掉线鼠标就关机。扩容电池tb客服只会套话装傻一问三不知不如ai🤮

搜索发现,是由于充电管理芯片认为电池温度不正常导致停止充电。万用表量了下,原装电池ntc线电压2.4v左右,扩容电池高了1v。和https://www.bilibili.com/opus/1015059449619939376一样我的也是tp4056
把芯片测温脚和地线短接就可以禁用温控(其他功能还是保留的比如充电电压限制和充电截止之类)。我会一点锡焊但是试了下,技术极差根本焊不上,以前烙铁头还被我搞坏了不少😩不把新老电池的保护板直接交换是因为镍片焊不来

用歪门邪道,不需要焊接,直接用细导线连起来就可以了。用镊子拧麻花拧的紧一点,防止短路旁边的引脚。最后再挤一坨704硅橡胶固定好就完事了,橙色灯开始闪烁可以充电了

 

423 日 , 2025 14:22:41
低分屏还是需要字体Hinting

今天用回古董windows xp系统,里面充斥着点阵宋体,依然会觉得低分屏上的点阵字体异常的清晰锐利。甚至250ppi正宗高分屏显无hinting灰度抗锯齿字体也才勉强一样锐利,只有智能手机那种6寸2k的像素密度才能实现暴力碾压。

低分屏的微软雅黑字体也是优先照顾了清晰度,不惜强行扭曲笔画也要保证清晰易读。现在有种美观优先于易读的论调,我很讨厌。以前也naive过,强行在低分屏上使用mactype,字都糊成一团黑黑的还自以为漂亮。

409 日 , 2025 17:24:30
408 日 , 2025 14:55:45
白嫖LLM API

由于不喜欢网页版,特别爱使用客户端软件比如cherry studio(虽然也是electron但是老古董就喜欢客户端),并且又穷从来没开过任何会员,得想个办法白嫖api。

阿里云百炼有个新人100万token白嫖,但是经过我不到一周的高强度使用,qwen2.5 max(这个和其他2.5系列的不一样,没开源)的额度就被用掉十几万了,有效期也只有三个月。于是又用回了网页版chat.qwen.ai了(题外话,比国内版花里胡哨的玩意顺眼多了)。

大部分提供商即使能白嫖也是每个账号一次性的额度,用完/过期就没了。最近终于发现了谷歌gemini的api,调用flash模型每天1000次无限刷新纯白嫖,终于摆脱了token焦虑。虽然免费套餐的数据会被拿去训练但是反正我也不玩角色扮演什么的,训就训吧。

唯一缺点就是感觉gemini 2.0 flash规模不如qwen 2.5 max

404 日 , 2025 0:26:09
又被功夫网了

居然是tcp80端口被封。平时一直交替使用v2ray的裸websocket模式和自制ws梯子,今天只有这个端口突然被干了,而udp2raw的端口却好好的。真的是狗日的gfw。

最近几天和以往不一样的是:

  • 用v2rayN客户端比较多,用于分流,给cherry studio使用(白嫖gemini api)并且绕过国内地址。这个客户端不支持设置early data,可能gfw会像识别tls in tls时序和包大小特征那样识别tls in ws。
  • 换了新服务器一星期
  • 修改了自制梯子的连接池,增加了空闲连接超时时间

 

后续:

当即换了一个端口,只用来跑自制梯子,过了一个星期并没有事情。而v2ray也切换回了老服务器,也没有问题。以前的研究表明gfw确实是概率性的屏蔽

  1. krrr 博主 : 一个月后,仍然没有放出来。但一直高强度使用也没有其他端口再被封
324 日 , 2025 16:07:16
LLM MCP调用过程示例

Cherry Studio这个本地聊天助手新增的MCP功能具体是怎么工作的?以mcp_server_fetch为例子。调用ollama接口的时候发现,MCP只在聊天助手(MCP Host)这边运行,并不与推理框架直接交互,而只是约定了批量获取工具函数的接口及格式。调用推理时还是用现成的Function Calling机制(这里有篇不错的介绍文章,所以不支持函数调用的模型没法使用MCP,除非用提示词工程手动实现)。

POST /v1/chat/completions

{
  "model": "qwen2.5:14b",
  "messages": [
    {
      "role": "user",
      "content": "查看网页https://github.com/krrr/\n\n"
    }
  ],
  "temperature": 1,
  "keep_alive": "0m",
  "stream": true,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "fed6b7adab25d4693b3eaf4f6c8f02035",  // 可以看到函数名被替换成了随机数(为了防止某些函数名与功能不符产生误导)。
        "description": "Fetches a URL from the internet and optionally extracts its contents as markdown.\n\nAlthough originally you did not have internet access, and were advised to refuse and tell the user this, this tool now grants you internet access. Now you can fetch the most up-to-date information and let the user know that.",
        "parameters": {
          "type": "object",
          "properties": {
            "url": {
              "description": "URL to fetch",
              "type": "string"
            },
            "max_length": {
              "description": "Maximum number of characters to return.",
              "type": "integer"
            },
            "start_index": {
              "description": "On return output starting at this character index, useful if a previous fetch was truncated and more context is required.",
              "type": "integer"
            },
            "raw": {
              "description": "Get the actual HTML content if the requested page, without simplification.",
              "type": "boolean"
            }
          }
        }
      }
    }
  ]
}

HTTP/1.1 200 OK

data: {"id":"chatcmpl-83","object":"chat.completion.chunk","created":1742800010,"model":"qwen2.5:14b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"role":"assistant","content":"","tool_calls":[{"id":"call_dsk3phip","index":0,"type":"function","function":{"name":"fed6b7adab25d4693b3eaf4f6c8f02035","arguments":"{\"max_length\":1000,\"raw\":false,\"url\":\"https://github.com/krrr/\"}"}}]},"finish_reason":null}]}

data: {"id":"chatcmpl-83","object":"chat.completion.chunk","created":1742800010,"model":"qwen2.5:14b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":"stop"}]}

data: [DONE]

POST /v1/chat/completions

{
  "model": "qwen2.5:14b",
  "messages": [
    {
      "role": "user",
      "content": "查看网页https://github.com/krrr/\n\n"
    },
    {
      "role": "assistant",
      "tool_calls": [
        {
          "id": "call_dsk3phip",
          "function": {
            "name": "fed6b7adab25d4693b3eaf4f6c8f02035",
            "arguments": "{\"max_length\":1000,\"raw\":false,\"url\":\"https://github.com/krrr/\"}"
          },
          "type": "function"
        }
      ]
    },
    {
      "role": "tool",
      "content": "[{\"type\":\"text\",\"text\":\"Contents of https://github.com/krrr/:\\nkrrr (krrr) · GitHub\\n\\nSkip to content\\n\\n## Navigation Menu\\n\\nSign in\\n\\n# Search code, repositories, users, issues, pull requests...\\n\\nSearch syntax tips\\n\\nSign in\\n\\nSign up\\n\\nYou signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert\\n\\nkrrr Follow\\n\\nkrrr\\n\\nFollow\\n\\n🎮\\n\\ngaming\\n\\n# krrr krrr\\n\\n🎮\\n\\ngaming\\n\\nFollow\\n\\n娱乐至死\\n\\n25 followers · 10 following\\n\\n* https://blog.hazama.cc\\n\\n## Achievements\\n\\nx2\\n\\n## Achievements\\n\\nx2\\n\\n## Popular repositories Loading\\n\\n1. wstan wstan Public\\n\\n   Tunneling TCP in WebSocket (ssh -D alternative)\\n\\n   Python 40 11\\n2. Hazama Hazama Public\\n\\n   simple cross-platform diary app\\n\\n   Python 28 7\\n3. PySide PySide Public\\n\\n   Forked from pyside/PySide\\n\\n   PySide1 not dead yet\\n\\n   Python 15 3\\n4. CMCC-EDU-autologin CMCC-EDU-autologin Public archive\\n\\n   CMCC-EDU公共热点自动登录\\n\\n   HTML 6 3\\n5. TSI TSI Public\\n\\n   Toy Scheme\\n\\nContent truncated. Call the fetch tool with a start_index of 1000 to get more content.\"}]",
      "tool_call_id": "call_dsk3phip"
    }
  ],
  "temperature": 1,
  "keep_alive": "0m",
  "stream": true,
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "fed6b7adab25d4693b3eaf4f6c8f02035",
        "description": "Fetches a URL from the internet and optionally extracts its contents as markdown.\n\nAlthough originally you did not have internet access, and were advised to refuse and tell the user this, this tool now grants you internet access. Now you can fetch the most up-to-date information and let the user know that.",
        "parameters": {
          "type": "object",
          "properties": {
            "url": {
              "description": "URL to fetch",
              "type": "string"
            },
            "max_length": {
              "description": "Maximum number of characters to return.",
              "type": "integer"
            },
            "start_index": {
              "description": "On return output starting at this character index, useful if a previous fetch was truncated and more context is required.",
              "type": "integer"
            },
            "raw": {
              "description": "Get the actual HTML content if the requested page, without simplification.",
              "type": "boolean"
            }
          }
        }
      }
    }
  ]
}

HTTP/1.1 200 OK

{"id":"chatcmpl-468","object":"chat.completion.chunk","created":1742800019,"model":"qwen2.5:14b","system_fingerprint":"fp_ollama","choices":[{"index":0,"delta":{"role":"assistant","content":"用户krrr的GitHub页面展示了以下信息:\n\n- 用户ID: krrr\n- 简介:娱乐至死\n\n**成就:** x2 (具体的成就未详述)\n\n**关注者**: 25, 关注了10个仓库或者其他用户。\n\n他有以下几个广受欢迎的项目:\n1. **wstan** 是一个通过WebSocket隧道化TCP连接的工具,类似于`ssh -D`命令的替代方案。\n2. **Hazama** 是一个简单的跨平台日记应用。\n3. **PySide**: 对 `pyside/PySide` 库的一个分支,表明了对 PySide1 相关工作的继续支持。\n4. **CMCC-EDU-autologin** 提供了一个自动登录CMCC-EDU公共热点的解决方案。\n5. **TSI** (Toy Scheme Interpreter),看起来像是一个玩具级别的Scheme语言解释器。\n\n你可以点击用户名查看该用户的更多详细信息或浏览其它项目内容。如果有需要获取更多信息,可以请求我抓取页面的其他部分。"},"finish_reason":"stop"}]}

data: [DONE]
324 日 , 2025 11:06:53
为什么跟并夕夕斗智斗勇

买一些小东西是真的便宜但是也真的下剑,很会用大数据杀熟。两个账号看同一个商品价格不一样是司空见惯。

一开始被恶心就是提现/砍一刀,金额不等从200到700左右,各种暗示你一定能提现只差一点点了,还让我真的去微信拉人了,结果最后无限微分,不愧是微积分厂,不要脸则无敌。

后来又弹出来只差最后一块可以提现几百块钱。现在更新了忽悠话术,还在开头说绝对不用拉人。被耍了几次早学聪明了,挂一边用几根手指盲按。一堆土炮动画按了好几分钟,一直在微分,0.01之后是什么金币钻石的。到最后果不其然是要微信拉人了。

 

既然敢耍我我就靠实力赚回来,前期主要是靠倒卖cpu,用果园券批量买12490f然后咸鱼出给回收的贩子。两个手机号和两个地址来回用,买多了还是被拉黑了,先是自动砍单,然后第二天黑号,之前很多能领券的地方突然就不给了,后面就注销了等待卷土重来

后面是倒卖游戏机,已经“手动提现”了累计七百以上了,被耍的钱全拿到手了。