TONG-H
Timeline
(译)双向绑定会使你的 React 代码更棒

原文地址:Two-way binding will make your React code better 原文作者:Mikhail Boutylin 译文出自:掘金翻译计划 本文永久链接:https://github.com/xitu/gold-miner/blob/master/article/2022/.md 译者:tong-h 校对者:nia3y 双向绑定会使你的 React 代码更棒 双向绑定可以让两个实体间保持同步,比如:应用程序的数据层和视图层。React 提供了开箱即用的单向绑定的 api,开箱即用。当我们想要修改 state 时,我们需要显式的调用更新回调: 1234567const UserName = ({ name, onChange }) => { return <input onChange={onC...

38962022-01-272025-02-16
SVG 路径动画

简单百搭普普通通平平无奇 SVG 路径动画优化网站效果, 如何实现一个 SVG 进度条动画以及虚线走马灯动画 我习惯于使用 canvas 来做一些动画效果,数据展示或者图片处理之类的。SVG 和 Canvas 的功能类似,但应用场景又完全不同,各有各的特点。最近有用到一些 SVG,补补~~~ Canvas 和 SVG 的区别 canvas 以像素点为单位,而 SVG 是矢量图形,即放大图像不会失真,不依赖分辨率,对于 ui 同学来说大概就是 photoshop 与 illustrator 的区别了。 canvas 依赖分辨率,适合图片处理,可以做一些图片裁剪合成之类的功能。 SVG 放大不失真的图形展示当然很好,但矢量图之所以不会失真是因为保存了图形的线条和图块,所以渲染速度会和图形的复杂度成正比,这也表示 svg 非常适合用来绘制扁平化的图像,比如常用的 icon 或者扁平风格的...

41.2k2021-12-132025-02-16
git

git config –global push.autoSetupRemote truegit rm -r –cached .git commit -m “Your message” –no-verify bisectgit bisect start <end point> <start point> repeatedly checking out the midpoint commit between two endpoints, and then narrowing down the search space based on whether the bug is present or not. stashgit stash is for temporarily storing changes, git add is for preparing chang...

91.5k2021-11-172025-04-21
Financial Market Terms

Some investment terminology or concepts in the financial market. about Fund Mutual Fund(共同基金) 专业的基金经理进行投资管理 主动型基金:基金经理通过自身分析(包括技术分析和基本面分析)来选股和择时以取得市场超额收益 混合型基金: 依赖基金经理的能力,仓位较为灵活随股市行情而波动 被动型基金: 一般选取特定的指数作为跟踪对象,因此通常又被称为指数基金, 复制指数,与其保持一致,适合定投 混合行业**: 含有两个行业以及以上的主动性基金 灵活配置混合**: 不规定股票、债券、可转债、现金、其他资产的比例 ETF (Exchange-Traded Fund) 上证指数:反映上证所上市公司股票整体表现的股价指数。 科创:科技创新板,上证所上市。主要吸引的是在生物医药、新一代信息技术、人工智能、高端...

102.4k2021-11-172025-02-16
linux

as root user: sudo su CTRL + L clear terminal ~ is the home directory of user Sharing SSH keys between Windows and WSL 2 copy the entrie .ssh from the windows path c:\Users\<username>\.ssh to linux dir ~/.ssh cp -r /mnt/c/Users/<username>/.ssh ~/.ssh chmod 600 ~/.ssh/id_rsa set Read/Write access for the owner, and no access for anyone else. That means that nobody but you can see t...

23312021-11-172025-04-12
frontend

react-nativecore JavaScript Thread: Runs React code Native (UI) Thread: Manages native UI components (Java/Kotlin for Android, Objective-C/Swift for iOS). Bridge(old): async, pass serialized JSON messages between JS and Native threads to enable communication. Fabric Renderer(new ≥v.0.68, sync) differ from react app html tags and style writing form Animated API for Animation And Gestures bu...

12820.8k2021-11-172025-06-01
(译) 2021 年 Node.js 的发展趋势

原文地址:Top Node.js Development Trends in 2021 原文作者:Rlogical Techsoft.Pvt.Ltd 译文出自:掘金翻译计划 本文永久链接:https://github.com/xitu/gold-miner/blob/master/article/2021/top-node-js-development-trends-in-2021.md 译者:tong-h 校对者:Chorer greycodee 2021 年 Node.js 的发展趋势世界各地的开发者对 2021 年 Node.js 的发展趋势做了很多预测。在下文中,我们将解说今年预期的 Node.js 趋势。 Node.js 为什么如此有名呢?近些年来,Node.js 凭借其高度灵活和极其轻量的特性,变得非常流行。Node.js 拥有大量的 JavaScript 库用于简化...

61.9k2021-10-242025-02-16
(译)使用 TypeScript 时你会想念的 Python 特性

原文地址:Python features that you will miss in TypeScript 原文作者:Lucas Sonnabend 译文出自:掘金翻译计划 本文永久链接:https://github.com/xitu/gold-miner/blob/master/article/2021/python-features-that-you-will-miss-in-typescript.md 译者:tong-h 校对者:nia3y greycodee 使用 TypeScript 时你会想念的 Python 特性 最近我把主要使用的后端语言从 Python 和 Django 切换到了 Node.js 和 TypeScript。在经过一段初始学习期后,我可以说我很享受这次切换。了解不同的语言和框架如何处理相似的问题总是很有趣。当你理解它们方法之间的一致或差异时,你也会...

113k2021-09-132025-02-16
(译)使用 PeerJS 轻松实现 P2P 通信

原文地址:Simplified Peer to Peer Communication with PeerJS 原文作者:Dulanka Karunasena 译文出自:掘金翻译计划 本文永久链接:https://github.com/xitu/gold-miner/blob/master/article/2021/simplified-peer-to-peer-communication-with-peerjs.md 译者:tong-h 校对者:jaredliw,CarlosChenN 使用 PeerJS 轻松实现 P2P 通信 实现 P2P 通信是一项具有挑战性的任务,但如果你知道如何使用正确的工具,那么这项任务就变得简单多了。 所以,我将在这篇文章探讨 PeerJS,这是一个封装了 WebRTC 的 JavaScript 库,可以在 web 应用中更加轻松的实现 P2P 通信...

82k2021-08-172025-02-16
(译)可视化 JavaScript 引擎

原文地址:JavaScript Visualized: The JavaScript Engine 原文作者:Harsh Patel 译文出自:掘金翻译计划 本文永久链接:https://github.com/xitu/gold-miner/blob/master/article/2021/javascript-visualized-the-javascript-engine.md 译者:tong-h 校对者:KimYangOfCat Usualminds 可视化 JavaScript 引擎 作为 JavaScript 开发人员,我们通常不需要亲自与编译器打交道。但知晓 JavaScript 引擎的基础知识,以及了解它是如何处理我们各自不同的 JS 代码并将其转化为机器能理解的东西,也是很好的!🥳 注意: 这篇文章主要基于 Node.js 和以 Chromium 为基础的浏览...

51.6k2021-08-062025-02-16