上一页 1 ··· 68 69 70 71 72 73 74 75 76 ··· 499 下一页
摘要: // Base case // 1. Off the map // 2. Hit a wall // 3. Already visited // 4. It's the end const dirs = [ [1, 0], //top [0, 1], //right [-1, 0], //botto 阅读全文
posted @ 2023-07-22 19:21 Zhentiw 阅读(54) 评论(0) 推荐(0)
摘要: Run the following code, found that for get & push & pop, it is O(1) time; But for shift/unshfit, it is O(n) time. In this cases, Javascript's [], is a 阅读全文
posted @ 2023-07-20 14:34 Zhentiw 阅读(30) 评论(0) 推荐(0)
摘要: z-index property arranges how an element is stacked onto other positioned elements. At times you may set a z-index property on a child element to be l 阅读全文
posted @ 2023-07-20 00:45 Zhentiw 阅读(31) 评论(0) 推荐(0)
摘要: You only require a few lines of CSS to enable a dark/light mode on your website. You just need to let browsers know that your website can display corr 阅读全文
posted @ 2023-07-20 00:44 Zhentiw 阅读(80) 评论(0) 推荐(0)
摘要: This trick is inclined towards improving copy and paste experience for website users. Using user-select: all, you can enable easy text selection with 阅读全文
posted @ 2023-07-20 00:37 Zhentiw 阅读(48) 评论(0) 推荐(0)
摘要: You don't have to get stuck on how the browser renders a numbered list. You can implement your own design utilizing counters(). Here's how: ul { margi 阅读全文
posted @ 2023-07-20 00:33 Zhentiw 阅读(48) 评论(0) 推荐(0)
摘要: 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 阅读(27) 评论(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 阅读(39) 评论(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 阅读(41) 评论(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 阅读(43) 评论(0) 推荐(0)
上一页 1 ··· 68 69 70 71 72 73 74 75 76 ··· 499 下一页