Sign In

Latest Articles

563 articles · Fresh posts aggregated from independent blogs across the directory.

JJosh W. ComeauJosh W. Comeau·Oct 11, 2022

A World-Class Code Playground with Sandpack

No developer blog or technical documentation site is complete without an interactive code playground. The CodeSandbox team recently released a wonderful tool called Sandpack, to help us create these live-updating code editors. In this tutorial, I'll show you…

joshwcomeau.comRead article
浅浅草物语浅草物语·Sep 28, 2022

浅谈易学(一)之小六壬

本文将向您介绍一篇关于小六壬的基础入门指南,这是一种传说由诸葛亮所创、简单快捷的古代占卜方法。本教程会详细解释其核心的六种格局,即大安、留连、速喜、赤口、小吉和空亡,并重点讲解如何通过具体方法起卦,特别是以时间为基础的两种实用方式:一种是使用农历的年月日时辰,另一种是直接使用时分数字,文中均给出了清晰的推算步骤。除了起卦方法,本文还简要探讨了支撑小六壬的理论基础,包括阴阳、五行和八卦等中国古代哲学概念,并说明了这六宫如何与这些理论相关联,例如将它们区分为阴阳属性,帮助您对这一预测术有更全面的理解。

chillg.deRead article
读书笔记《当呼吸化为空气》

读书笔记《当呼吸化为空气》

作者:保罗·卡拉尼什保罗一生都在追寻生命的意义。"I can’t go on, I’ll go on",看到最后才明白,我无法前行——没有办法继续从事热衷的事业;我仍将前行——因为还活着,还在追寻生命的意义,弃(转)医从文可以帮助我继续前行。到底是什么让人类的生命充满意义?保罗说,“要么去研究...

barretlee.comRead article
JJosh W. ComeauJosh W. Comeau·Aug 30, 2022

Understanding useMemo and useCallback

What's the deal with these two hooks?! Lots of devs find them confusing, for a whole host of reasons. In this tutorial, we'll dig deep and understand what they do, why they're useful, and how to get the most out of them.

joshwcomeau.comRead article
JJosh W. ComeauJosh W. Comeau·Aug 16, 2022

Why React Re-Renders

In React, we don't update the DOM directly, we tell React what we want the DOM to look like, and React tackles the rest. But how exactly does it do this? In this tutorial, we'll unpack exactly when and why React re-renders, and how we can use this information…

joshwcomeau.comRead article

云服务使用过程的问题小记

记录最近使用基础云设施的过程中遇到的几个有意思的问题:1、OceanBase 数据库锁问题给业务数据模型扩充了一个远程方法调用,利用 ORM 的 hooks 特性加到了 afterCreate 中,导致偶发数据库锁。原因是业务存在事务处理批量调用,新增的 RPC 操作让事务整体时长变得十分漫长...

barretlee.comRead article
孩子出生第一天的一些点滴

孩子出生第一天的一些点滴

今天是个特别的日子,家中又迎来了一位小公主,生第一胎的时候,懵懵懂懂,啥也不会,孩子哭了,就等着月嫂过来照顾,看着学着,也没摸出多少门道,等月嫂走了,连忙又签约了一名家庭医生,闲暇之余,就是各种阅读育儿说明书,忙起来的时候也是一地鸡毛。二娃多多少少有了一点经验,依稀还记得四年前,也是在手术室前...

barretlee.comRead article
读书笔记《乌合之众》

读书笔记《乌合之众》

作者:[法] 古斯塔夫·勒庞一本几万字的心理学著作,两个小时读完了。读的太快,好多内容没有消化完,又花了大概半个小时去回味自己感兴趣的部分。作者把群体当做一个特定的研究对象,如同研究一个具体的人一般,去分析这个对象的性格、行为和特征,通过对历史事件的解读,持续论证自己抽象和归纳的内容。例如群体...

barretlee.comRead article

回味是苦药

有什么法子可以快速从一段失败的恋爱中走出来?有人说,是马上进入到下一段。回味是苦药,在过去停留的越久,脑子里就不会有多余的空间去思考未来的事情,我们的思考也是有带宽的。同样的道理,每天都会遇到各种让人不愉快的事情——这取决于心情,这些糟心事如果不能快速从眼前消失,那么注定就会迎来痛苦的一天。我...

barretlee.comRead article
JJosh W. ComeauJosh W. Comeau·Jul 11, 2022

Statements Vs. Expressions

One of the most foundational things to understand about JavaScript is that programs are made up of statements, and statements have slots for expressions. In this blog post, we'll dig into how these two structures work, and see how building an intuition about…

joshwcomeau.comRead article

东风不来

万事俱备,只欠东风,但东风往往就是不来。不能总想着把所有的准备工作全部做好再把脚踏出去,身体不往前倾,就永远不会有迈开腿的念想。事情太难,往往是心里觉得它难。都没有去践行,甚至没有去思考如何破解难题,如何就知道这一步踏不出去呢?退一步想,即便行差踏错,也就是损失些时间罢了,有太多重头再来的机会...

barretlee.comRead article

行左右之事

能左右之事,寥寥无几,能投入的时间,亦是极其有限;缩小关注的圈子,才有机会让聚焦的事情占据更多的时间;保持好奇心,但也别让好奇心把自己带进了迷宫;时间是最大的成本,放平心态,戴上耳机,暂时性地忘记一切,迈好眼前的步子。 2022年06月30日01:33:27

barretlee.comRead article
JJosh W. ComeauJosh W. Comeau·Jun 27, 2022

My Wonderful HTML Email Workflow

If you've ever had the misfortune of being tasked with building a template for HTML emails, you know it's tricky business! In this blog post, I share the approach I took to build responsive, client-friendly emails without a single tag.

joshwcomeau.comRead article
PPhoenix's islandPhoenix's island·Jun 6, 2022

修复 CentOS 'org.freedesktop.login1' timed out

又到了喜闻乐见帮人修系统的时间。 根据情况描述是 “stuck at ‘Starting switch root’”,初步判定是 initramfs 坏掉了。经过询问果不其然,某个特别爱没事儿就更新的家伙在更新的时候被数据中心的智障远程手按了电源¯(ツ)/¯ 既然启动不能那就进 Rescue 呗。虽然 CentOS 这系统不怎么样,但是至少也算在原版 ISO 就提供了 Rescue 的选项,还能自动寻找根分区挂载。本来以为小事一桩,准备 chroot 的时候突然冒出来一句 “chroot: cannot run…

phoenixlzx.comRead article

Page 26 of 32 · 563 articles