上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 465 下一页
摘要: Try throttling to a slow internet in the browser Dev tools and visit a website made up of HD images like unsplash. That's how to experience the pain o 阅读全文
posted @ 2023-07-20 00:32 Zhentiw 阅读(3) 评论(0) 推荐(0) 编辑
摘要: When working with positioned elements, you often write code like this: .some-element { position: absolute; top: 0; left: 0; right: 0; bottom: 0; } Thi 阅读全文
posted @ 2023-07-20 00:30 Zhentiw 阅读(8) 评论(0) 推荐(0) 编辑
摘要: p.intro { width: 300px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; /* Truncate when no. of lines exceed 3 */ overflow: 阅读全文
posted @ 2023-07-20 00:28 Zhentiw 阅读(13) 评论(0) 推荐(0) 编辑
摘要: Using Linked list to implement a Queue. In javascript, if you want to push a item in front of an Array, it need to shift the rest of items, not good f 阅读全文
posted @ 2023-07-19 14:33 Zhentiw 阅读(11) 评论(0) 推荐(0) 编辑
摘要: const $ = () => document.querySelector.call(this, arguments); const $$ = () => document.querySelectorAll.call(this, arguments); HTMLElement.prototype. 阅读全文
posted @ 2023-07-18 20:41 Zhentiw 阅读(19) 评论(0) 推荐(0) 编辑
摘要: Implement the util type OptionalUndefined<T, Props> that turns all the properties of T that can be undefined, into optional properties. In addition, a 阅读全文
posted @ 2023-07-18 19:58 Zhentiw 阅读(7) 评论(0) 推荐(0) 编辑
摘要: Given a number N, find the Nth triangular number, i.e. 1 + 2 + 3 + ... + N /* _____________ Your Code Here _____________ */ export type NumberToArray< 阅读全文
posted @ 2023-07-18 19:47 Zhentiw 阅读(2) 评论(0) 推荐(0) 编辑
摘要: Given 2 sets (unions), return its Cartesian product in a set of tuples, e.g. CartesianProduct<1 | 2, 'a' | 'b'> // [1, 'a'] | [2, 'a'] | [1, 'b'] | [2 阅读全文
posted @ 2023-07-18 19:22 Zhentiw 阅读(13) 评论(0) 推荐(0) 编辑
摘要: Solution 1: consider change font-size to 16px or above Soution 2: using javascript if(navigator.userAgent.indexOf('iPhone') > -1 ) { document .querySe 阅读全文
posted @ 2023-07-17 17:16 Zhentiw 阅读(5) 评论(0) 推荐(0) 编辑
摘要: Merge variadic number of types into a new type. If the keys overlap, its values should be merged into an union. For example: type Foo = { a: 1; b: 2 } 阅读全文
posted @ 2023-07-17 02:37 Zhentiw 阅读(2) 评论(0) 推荐(0) 编辑
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 465 下一页