学习流式下载和 playwright

2026-03-31

疝气是什么

疝气通常在有原因导致腹部压力增加时更容易发生。这包括良性前列腺增生,便秘,长期咳嗽和肥胖。有时,在搬运重物时或举重健身亦可能发生。疝气也会在出生时出现,但突起物可能直到晚年才较明显。有家族史的病人也有较高的风险。

https://www.cuhkmc.hk/sc/health-corner/hernia/hernias/what-are-hernias

乱语:现在有了 ai 很多文章不敢轻易相信,但是人写的东西也是一塌糊涂。

2026-03-30

Any kind of binary data that doesn’t fall explicitly into one of the other types; either data that will be executed or interpreted in some way or binary data that requires a specific application or category of application to use.

Generic binary data (or binary data whose true type is unknown) is application/octet-stream.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types

2026-03-29

在团队里新做的一个分享,有点懒得写ppt了

Stream: 如何用 jspdf 下载一个 501M 的 pdf 文件

标题:Stream: 如何用 jspdf 下载一个 501M 的 pdf 文件

内容来自曾小乱的blog:https://zengyuxin.com/presentation/stream-%e5%a6%82%e4%bd%95%e7%94%a8-jspdf-%e4%b8%8b%e8%bd%bd%e4%b8%80%e4%b8%aa-501m-%e7%9a%84-pdf-%e6%96%87%e4%bb%b6/#/

2026-03-28

PBC(Personal Business Commitment),即个人业务承诺计划,是一种绩效管理方法,它将绩效管理与员工个人发展、企业战略、组织文化、薪酬管理等方面相结合。通过目标制定、绩效评估和激励机制等环节,全面管理员工的绩效表现,实现员工与企业共同成长的管理模式。

https://www.pekhr.com/lib/13726.html

2026-03-27

每次团建要么忘记开发票,要么忘记合影,真是头大,怎么解决这个问题呢?可以做个群机器人,看到我们说要团建了,就提醒我们开发票合影吗?

https://github.com/zengxiaoluan/team-building-bot

查了一下文档,好像只有在管理员的设置下才能接收到群消息。

2026-03-26

没认真看过html规范,这几个字就能代表实现

The download attribute, if present, indicates that the author intends the hyperlink to be used for downloading a resource. The attribute may have a value; the value, if any, specifies the default filename that the author recommends for use in labeling the resource in a local file system. There are no restrictions on allowed values, but authors are cautioned that most file systems have limitations with regard to what punctuation is supported in filenames, and user agents are likely to adjust filenames accordingly.

https://html.spec.whatwg.org/multipage/links.html#attr-hyperlink-download

2026-03-25

What is Module Federation?

Module Federation is an architectural pattern for the decentralization of JavaScript applications (similar to microservices on the server-side). It allows you to share code and resources among multiple JavaScript applications (or micro-frontends). This can help you:

Reduce code duplication

Improve code maintainability

Lower the overall size of your applications

Enhance the performance of your applications

https://module-federation.io/guide/start/index.html

2026-03-24

宏是一种批量处理的称谓

Eplan中的宏主要分为窗口宏、符号宏和页宏。

窗口宏是最小的部分标准电路,可以包含页面上的设备或一个电路逻辑,以.ema的格式保存;符号宏与窗口宏类似,保存文件格式为.ems,可以将一个标准电路作为符号来使用;页宏包含一页或一页以上的项目图纸,文件格式为.emp。

https://zhuanlan.zhihu.com/p/617277550

2026-03-23

不知道 excel 宏的实现原理是什么,怎么去设计这个功能

什么是 Excel 宏?

简单来说,Excel 宏指的是,使用 Excel 内置的编程语言 VBA (Visual Basic for Applications)写的,能在 Excel 环境里运行的一系列操作指令。我们在 Excel 里手动进行的几乎所有操作,宏(VBA)也都可以操作。在这里,什么是 VBA,这篇文章暂不做介绍,简单可以认为宏就是 VBA。

这里我们可能疑惑,我自己可以进行的操作,为什么还需要宏呢?因为,宏具有两个诱人的特性:

1. 宏可以帮你自动完成重复、批量的任务。

2. 录制宏不需要其他技术,你只需把任务「演示」给 Excel 即可。

https://zhuanlan.zhihu.com/p/563547909

2026-03-22

vue中的宏到底是什么?

vue3的宏是一种特殊的代码,在编译时会将这些特殊的代码转换为浏览器能够直接运行的指定代码,根据宏的功能不同,转换后的代码也不同。

* 为什么这些宏不需要手动从vue中import?

因为在编译时已经将这些宏替换为指定的浏览器能够直接运行的代码,在运行时已经不存在这些宏相关的代码,自然不需要从vue中import。

* 为什么只能在setup顶层中使用这些宏?

因为在编译时只会去处理setup顶层的宏,其他地方的宏会原封不动的输出回来。在运行时由于我们没有在任何地方定义这些宏,当代码执行到宏的时候当然就会报错。

https://zhuanlan.zhihu.com/p/682834526

2026-03-21

2023年第一次听说要做rolldown现过去2年半

vite8 正式发布了,rolldown 接过 esbuild 和 rollup 的使命

We’re thrilled to announce the stable release of Vite 8! When Vite first launched, we made a pragmatic bet on two bundlers: esbuild for speed during development, and Rollup for optimized production builds. That bet served us well for years. We’re very grateful to the Rollup and esbuild maintainers. Vite wouldn’t have succeeded without them. Today, it resolves into one: Vite 8 ships with Rolldown as its single, unified, Rust-based bundler, delivering up to 10-30x faster builds while maintaining full plugin compatibility. This is the most significant architectural change since Vite 2.

https://vite.dev/blog/announcing-vite8.html

2026-03-19

看了一下文档,没有看懂,什么是读流

The ReadableStream() constructor creates and returns a readable stream object from the given handlers.

Note that while all parameters are technically optional, omitting the underlyingSource will result in a stream that has no source, and that can’t be read from (readers return a promise that will never be resolved).

https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream

2026-03-17

近几年,美团业务高速发展,前端随之面临很多安全挑战,因此积累了大量的实践经验。我们梳理了常见的前端安全问题以及对应的解决方案,将会做成一个系列,希望可以帮助前端同学在日常开发中不断预防和修复安全漏洞。本文是该系列的第二篇。

今天我们讲解一下 CSRF,其实相比XSS,CSRF的名气似乎并不是那么大,很多人都认为“CSRF不具备那么大的破坏性”。真的是这样吗?接下来,我们还是有请小明同学再次“闪亮”登场。

https://tech.meituan.com/2018/10/11/fe-security-csrf.html

解决 csrf 的常见 5 种方案:

Synchronizer token pattern

Cookie-to-header token

Double Submit Cookie

SameSite cookie attribute

Client-side safeguards

2026-03-16

看英语技术视频,不仅可以学编程还能学英语

In this video we will learn about service workers and how to use them to cache pages for offline viewing. Service workers are a huge aspect of PWA’s or “Progressive Web Apps”. We will add a service worker to a tiny sample website so that if the connection goes out, users can still view the pages.

https://www.youtube.com/watch?v=ksXwaWHCW6k

2026-03-14

What’s a ponyfill?

A ponyfill is an implementation of a standard, but without pretending to be it.

Unlike polyfills, ponyfills don’t pretend to be the native API. They offer the same functionality through explicit imports and usage, keeping your code predictable and side-effect free.

https://github.com/sindresorhus/ponyfill

乱语:pony 是小马的意思,难怪马化腾叫 pony

2026-03-13

时间戳会溢出Overflow吗?

The year 2038 problem (also known as Y2038,[1] Y2K38, Y2K38 superbug, or the Epochalypse[2][3]) is a time computing problem that leaves some computer systems unable to represent times after 03:14:07 UTC on 19 January 2038.

https://juejin.cn/post/7441188458633379903

2026-03-12

00 后整顿职场的 10 种方式

2026-03-11

11 月 6 号, Kimi 推出了 K2 Thinking 模型,它是一款开源的推理模型,官方称之为是 Agent Model,能在无人工干预的情况下,实现 200 到 300 次的一系列工具调用,上下文窗口高达 256k。坊间传闻 K2 Thinking 的训练成本为 460 万美元。

这个数字让我想起了 OpenAI 在 2023 年 1 月份公布的 GPT-4 的训练成本,OpenAI 当时表示 GPT-4 的训练成本大约为 1 亿美元,相比之下,K2 Thinking 的训练成本显得相当低廉。

http://gzool.com/llm-training-costs

2026-03-09

重庆值得去吗

重庆,一座很有魅力的城市,以山水而著称,千里为重,重山重水重庆城。到重庆游玩,体验8D山城的魔幻,品尝沸腾火锅的火辣,繁华的城市中藏着独有独有的烟火气,好吃又好玩,也是大家出游热门旅游目的地。

重庆旅游景点有:洪崖洞、磁器口、解放碑、长江索道、湖广会馆、鹅岭公园、仙女山、大足石刻、天生三桥、涞滩古镇。

https://m.thepaper.cn/newsDetail_forward_29554431

2026-03-08

The read-only actualBoundingBoxDescent property of the TextMetrics interface is a double giving the distance from the horizontal line indicated by the CanvasRenderingContext2D.textBaseline attribute to the bottom of the bounding rectangle used to render the text, in CSS pixels.

乱语:平平无奇的一个属性,花了好多时间来理解。

2026-03-07

网关是从一个网络连接到另一个网络的“关口”,是网络设备用于与本地网络之外的其他网络进行通信的关键关卡,当用户访问一个不在本地网络中的资源时,用户的设备会将数据包发给网关,由网关处理数据解析、转换和转发工作。

简而言之,网关是连接本地网络和外部网络的重要桥梁,确保不同网络间的数据信息可以准确传输,从而实现两个网络之间顺利通信。

为什么需要网关?

网关在不同网络之间的连接和数据交换中起到了至关重要的作用,是本地网络与外部网络之间通信的桥梁,实现不同网络之间的数据转换,使得网络间能够互相通信。

网关是网络互通中不可缺少的网络节点,它的主要功能有:

实现网络互联互通:网关既可以用于广域网互连,也可以用于局域网互连。不同网络使用不同的协议和通信方式,无法实现直接通信,通过网关,可以实现数据的转换,将不同网络连接起来。

提供安全性:网关通过设置访问控制和安全策略,可以限制非法报文攻击,保护数据的安全,从而提高网络安全性。

实现网络管理:网关可以将不同网络的数据进行整合和处理,从而对连接的设备进行管理,具有检测设备的运行状态、配置管理和故障诊断等功能。

https://info.support.huawei.com/info-finder/encyclopedia/zh/%E7%BD%91%E5%85%B3.html

2026-03-06

How to Wait for Element to be Visible in Playwright?

When working with Playwright for automation testing, it’s common to encounter situations where elements on a web page take time to load or appear due to asynchronous operations like API calls or animations. Interacting with elements before they are visible can lead to flaky or failed tests. To ensure your scripts are reliable and stable, it’s important to wait for elements to become visible before performing actions on them.

2026-03-04

眼屎的形成与眼睛的分泌物密切相关,眼睛为了保持其湿润和清洁,会分泌出泪液和油脂。这些分泌物在正常情况下会不断产生并排出,以维持眼睛的舒适度和健康状态。当这些分泌物在眼角处积聚并干燥后,就会形成眼屎。

长时间用眼、熬夜、用眼卫生不良等都可能导致眼部分泌物增多,从而形成更多的眼屎。此外,油腻的饮食、缺乏新鲜蔬菜水果的摄入,以及摄入过多辛辣、刺激性食物,也可能影响眼部健康,导致眼屎增多。这些食物可能刺激眼部腺体分泌更多的油脂和泪液,从而增加眼屎的形成。

https://m.youlai.cn/sjingbian/article/3A4A7CMYnYO.html

2026-03-03

异物进入眼睛,都去了哪里?首先了解一下我们眼睛的结构,结膜为一连接眼睑与眼球间的透明薄层粘膜,分为睑结膜、球结膜和穹窿结膜。以睑裂为开口,角膜为底,这三种结膜构成了一个半封闭的囊袋样空间即结膜囊,而大部分的外来异物就是进入了我们的结膜囊。

https://www.news.cn/science/20241011/f9c046fd0cc14c6d98b13ef365634148/c.html

2026-03-02

阅读Vue和React两大前端框架的源码时都出现了MessageChannel的影子,但是自己却没不了解什么是MessageChannel,它有什么用。于是花了一些时间研究,并尝试把它解释清楚。

什么是MessageChannel

MessageChannel允许我们在不同的浏览上下文,比如window.open()打开的窗口或者iframe等之间建立通信管道,并通过两端的端口(port1和port2)发送消息。MessageChannel以DOM Event的形式发送消息,所以它属于异步的宏任务。

https://juejin.cn/post/7029715697173266469

2026-03-01

What is the logic behind the TypeScript error “The operand of a ‘delete’ operator must be optional”?

The logic as I understand is the following:

Interface Thing is a contract asking to have a (non-null, non-undefined) prop as a string.

If one removes the property, then the contract is not implemented anymore.

If you want it still valid when removed, just declare it as optional with a ?: prop?: string

I’m actually surprised that this was not causing error in earlier versions of TypeScript.

https://stackoverflow.com/questions/63702057/what-is-the-logic-behind-the-typescript-error-the-operand-of-a-delete-operato

作者: 曾小乱

喜欢写点有意思的东西

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注