crimx / blog-comments Goto Github PK
View Code? Open in Web Editor NEWutterances🔮 comments on https://blog.crimx.com.
utterances🔮 comments on https://blog.crimx.com.
CRIMX 的博客,主要记录 Web 前端相关的一些内容,偶尔涉及其它方面。
在上篇文章中我们提到如何结合 React 为音频显示波形与区间循环播放,但有时候音频说话太快了,我们需要放慢下来听,所以本文我们来看看如何实现音频的变速,以及如何处理变速时声调出现的奇怪变化。
前面已经让博客顺利运行起来,接下来就是实现一些个性化的功能。本文通过实现兼容 Jekyll 式路径来了解 Gatsby 的 Node APIs。
在往下读之前不妨先想一下,你会怎么实现?如何知道元素的尺寸发生变化了? 相信很多人第一反应是 resize 事件,但这个只是 document view 变化才会触发。 然后就是轮询,反复查询值变化了没有。开销不是一般的大,但像这样的库(比如这个 七年前的 )现在还有人用。 最后便是 这个 ,号称 event based…
Position in iframes I wrote a Chrome extension Saladict, an inline translator, which involved such requirement: When user makes a text selection, something will pop up nearby the cursor. It looks…
https://blog.crimx.com/2017/04/06/position-and-drag-iframe-en/
一个博客如果不能方便地编写文章将非常打击作文欲望。本文将谈谈如何在 Gatsby 中配置 Netlify CMS 管理文章。
Quite useful if you are writing an browser extension or something. To get all the images in DOM there are actually three places we are going to look at: element, background-image CSS…
https://blog.crimx.com/2017/03/09/get-all-images-in-dom-including-background-en/
本文深入聊聊 TypeScript 的一些高级特性,以实现集合转换为交集为主线。
本文聊聊作为库作者如何测试你的库在 React 并发模式下安全。
最近终于抽空给 Saladict 实现了鼠标悬浮取词功能,使用了较为简洁的实现方式,这里分享一下原理以及坑的处理。 初尝试 这个需求其实很早就被人提 issue 了,当时做了一番搜索,最后尝试了 document.caretPositionFromPoint / document.caretRangeFromPoint ,效果不太理想。 如果看 mdn…
In witch I suggested a simple, flexible, testable and performant solution to use RxJS Observable with React hooks and Suspense.
https://blog.crimx.com/2020/02/26/rxjs-hooks-and-suspense-the-ultimate-guide/
本文聊聊如何实现一个按 id 切换的 switchMap 。
本文通过实现草稿模式和上下篇来进一步了解 Gatsby 的 Node APIs。
测试是软件开发中重要的一环,有了测试项目开发起来大脑负担减少,心里踏实,许多没想到的边界条件也能一一揪出。Karma+Mocha+Chai 是经过时间考验的经典测试组合,具有较高的灵活性,非常值得研究学习。本文将从零开始搭建,同时配合 TypeScript 进行测试。
Gatsby 是一个 React 建站框架。在使用 Gatsby 搭建了一个小博客后,非常喜欢其管理数据的方式。然而,尽管上手可以非常快,对于刚开始用 Gatsby 的人来说,理解其基本**是个小门槛。官方提供了非常详细的教程,甚至有点过于基础了,本文面向有 React 基础,没有使用过 Gatsby 和 GraphQL 的读者分享一份笔记。
出门在外,有时需要流量上网,本文聊聊如何使用 iptables 只允许特定的程序连接网络。
CRIMX 的博客,主要记录 Web 前端相关的一些内容,偶尔涉及其它方面。
本文聊聊 React hooks 如何改变旧有的开发思路,以及如何利用 hooks 结合 RxJS 将异步逻辑封装到组件中,从而轻松复用功能更复杂的组件。
马拉车算法可以在线性时间复杂度内求出一个字符串的最长回文字串。其核心**跟 KMP 相似,即反复利用已掌握的情况。 视频推荐看这个,觉得是最清晰易懂的: 整体思路 这个算法的主要思路是维护一个跟原串 str 一样长的数组 lens。lens i 表示以 str i…
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.