2024-03-31
2024-03-30
缺失 2d
2024-03-29
Copying multiple filenames to clipboard?
if you simply select several files in finder and do command+c and then paste it into a plain text document (or in an excel file for that matter) it will paste the file names.
https://discussions.apple.com/thread/1850895?sortBy=best
2024-03-28
TypeScript 5.2 introduces a new keyword:using
that you can use to dispose of anything with a Symbol.dispose function when it leaves scope.
This is based on the TC39 proposal, which recently reached Stage 3 (out of 4) in its progress to JavaScript. This means that it’s ready to be tested by early adopters.
using will be extremely useful for managing resources like file handles, database connections, and more.
https://www.totaltypescript.com/typescript-5-2-new-keyword-using
乱语:js 新的关键字,using 了解一下
2024-03-27
网传君乐宝奶粉有三鹿的影子,是真的么
2008年8月,中国乳制品史上震惊中外的安全事故——三聚氰胺事件爆发,30万婴幼儿因此患病,22家奶企的奶粉中被检出三聚氰胺。
其中,以三鹿集团为首。根据当时国家质检总局的检测,三鹿婴幼儿奶粉中的三聚氰胺检出量最高达2563mg/kg。是现在限值的2563倍!
2009年2月,三鹿集团破产倒闭,资产被拍卖。其中,没有三聚氰胺前科的三元集团以6.16亿元的价格拍得三鹿集团的主要资产,其中包括了三鹿集团的土地使用权、房屋建筑物、机器设备等可持续经营的有效资产。
https://zhuanlan.zhihu.com/p/50371568
2024-03-26
缺失 3d
2024-03-25
Farm is a extremely fast vite-compatible web-building tool written in Rust. It’s designed to be fast, powerful and consistent, aims to provide best experience for web development, which is the real next generation build tool.
https://github.com/farm-fe/farm
这个 farm 比 vite 更快,号称它才是真正的下一代开发打包工具,vite 的压力大了。不过尤大有国际化的视野和运营推广能力,vue 社区的加持,期待一下下
2024-03-24
缺失 4d
2024-03-23
4~6个月母乳喂养的宝宝建议补充铁剂
鉴于6~12个月的宝宝,每天铁的需要量达到10mg/d,但这个量并不是一下提高的,而是逐渐增加的。另外,此时宝宝体内的铁储备已经用得差不多了,而母乳中的铁含量并没有提高。可见,此时的铁已不能满足身体的需要,铁缺乏的风险也随之增加。
因此,美国儿科学会建议从4个月开始,给宝宝补充1mg/kg的铁剂,每日最多不超过15mg(比如,宝宝体重是6kg,那么就需要每天补充6mg 的铁剂),直到饮食中摄入足够的铁。
https://mp.weixin.qq.com/s/4j-KNgA5SITiAeRYsoUJ9w
2024-03-22
2024-03-21
2024-03-20
resolve.preserveSymlinks
Type: boolean
Default: false
Enabling this setting causes vite to determine file identity by the original file path (i.e. the path without following symlinks) instead of the real file path (i.e. the path after following symlinks).
https://vitejs.dev/config/shared-options.html#resolve-preservesymlinks
乱语:没有看明白这项配置名是什么意思? preserve 是保留的意思,预留符号链接,那就从符号链接里查找,配置为 true,反而不从符号链接里查找,是我的英文出了啥子问题嘛?
2024-03-19
2024-03-18
有没有大佬给自己写的 react hook 写过单元测试呢?留言交流交流呀
现在提问都流行付费咨询
我去看看 react-use 怎么写单元测试的
https://zhuanlan.zhihu.com/p/638154319?utm_id=0
2024-03-17
新生儿为什么落地醒:在人类原始社会,一个婴儿如果独自睡觉,很有可能被突然闯入的野兽吃掉,而抱在怀里的新生儿可以立马被父母抱着逃离危险,所以在人类的基因深处,植入了只有抱着才能睡觉的原始基因。
所以基本没有不落地醒的宝宝。
2024-03-16
2024-03-15
2024-03-14
2024-03-13
After birth, your baby’s new taste buds are very sensitive. They can recognize sweet and sour tastes, but prefer sweet. This is one reason they love the taste of your breast milk.
The senses of taste and smell are linked, and your baby has a well-developed sense of smell at birth too.
They can smell which way to turn to be fed, and even smell the difference between your breast milk and another mum’s.
3-6 months, your baby’s tongue has grown. This is why everything goes in the mouth as he is trying to make sense of different tastes and textures. At around 5 months, baby’s sense of taste has changed and he is able to react more to salty tastes
https://bibetta.com/blogs/news/development-of-babies-taste-buds
2024-03-12
I had to change the console background color to white because of eye problems, but the font is gray colored and it makes the messages unreadable. How can I change it?
https://stackoverflow.com/questions/9781218/how-to-change-node-jss-console-font-color
乱语:如何修改终端的字体颜色?震惊,十年前的提问,现在还有人维护更新文章,微信公众号只能改几个字,逼迫大家创造文字垃圾,对汉字文化的正向作用,不得不存疑。
2024-03-11
In 2006, the software developer, Graydon Hoare, started Rust as a personal project while he was working at Mozilla.
According to an interview with MIT Technology Review, the inspiration for Rust came from a broken elevator in Hoare’s apartment building. The software for the lift operation system had crashed and Hoare understood that issues like this usually came from problems with how a program uses memory.
https://github.blog/2023-08-30-why-rust-is-the-most-admired-language-among-developers/
乱语:rust 趣闻,作者的电梯坏了,被困在里面,他想到的除了要赶紧出去,还想到这大概率是电梯程序的内存管理出了问题,所以着手解决这个问题。
通过这篇文章的介绍,rust 的流行得益于并发特性,内存管理,和优异的性能,现在前端工具链都是使用 rust 锈化,太卷了。
2024-03-10
2024-03-09
rolldown 已经开源,用 rust 写的,基本来自由字节的开发者在维护,项目还在初级阶段,积极贡献代码,加入核心团队,有望成为明星程序员,在社区里引领风骚。
前端基建的门槛越来越高,tailwind 也是 rust 写的,把一般的开发者就挡在门外了
https://github.com/rolldown-rs/rolldown
2024-03-08
2024-03-07
The Disposable Pattern in TypeScript
https://blog.hediet.de/post/the_disposable_pattern_in_typescript
乱语:看 vs code 官方成员如何理解 dispose 的模式。个人体会,有一点用,似乎也没有那么强烈的用处,为了摆脱命令式的写法,用 using 关键字是不是就够了,可能是更贴合 vs code 的场景?
2024-03-06
推荐阅读深度好文《我们现在怎样做父母》———鲁迅
可惜的是中国的旧见解,竟与这道理完全相反。夫妇是“人伦之中”,却说是“人伦之始”;性交是常事,却以为不净;生育也是常事,却以为天人的大功。大人对于婚姻,大抵先夹带着不净的思想。亲戚朋友有许多戏谑,自己也有许多羞涩,直到生了孩子,还是躲躲闪闪,怕敢声明;独有对于孩子,却威严十足。这种行径,简直可以说是和偷了钱发迹的财主,不相上下了。
我并不是说,——如他们攻击者所意想的,——人类的性交也应如别种动物,随便举行;或如无耻流氓,专做些下流举动,自鸣得意。是说,此后觉醒的人,应该先洗净了东方固有的不净思想,再纯洁明白一些,了解夫妇是伴侣,是共同劳动者,又是新生命创造者的意义。所生的子女,固然是受领新生命的人,但他也不永久占领,将来还要交付子女,像他们的父母一般。只是前前后后,都做一个过付的经手人罢了。
https://m.vrrw.net/wx/9504.html
2024-03-05
Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.
Though wise men at their end know dark is right,
Because their words had forked no lightning they
Do not go gentle into that good night.
Good men, the last wave by, crying how bright
Their frail deeds might have danced in a green bay,
Rage, rage against the dying of the light.
Wild men who caught and sang the sun in flight,
And learn, too late, they grieved it on its way,
Do not go gentle into that good night.
Grave men, near death, who see with blinding sight
Blind eyes could blaze like meteors and be gay,
Rage, rage against the dying of the light.
And you, my father, there on the sad height,
Curse, bless, me now with your fierce tears, I pray.
Do not go gentle into that good night.
Rage, rage against the dying of the light.
https://www.ivy.com.tw/column/cont/2020082813504590810
乱语:读完这首诗,我们可以更近一步理解《星际超越》这个电影,人类的命运到了转折点,要 rage rage
2024-03-04
Using type predicates
To define a type guard, we simply need to define a function whose return type is a type predicate:
function isFish(pet: Fish | Bird): pet is Fish {
return (pet as Fish).swim !== undefined;
}
pet is Fish is our type predicate in this example. A predicate takes the form parameterName is Type, where parameterName must be the name of a parameter from the current function signature.
乱语:type predicate 不知道在这里怎么翻译成中文比较好,请教各位大佬🧍♂️。一些项目类型写的实在复杂,看了让人生厌,所以 svelte 弃用了 typescript。
2024-03-03
2024-03-02
2024-03-01
Haemophilus influenzae type b (Hib) can cause serious illness and death in babies and children younger than 5 years old. CDC recommends Hib vaccination for all children younger than 5 years old in the United States.