上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 491 下一页
摘要: export default function compare( a: BinaryNode<number> | null, b: BinaryNode<number> | null, ): boolean { if (a null && b null) { return true; } if (a 阅读全文
posted @ 2023-08-03 01:03 Zhentiw 阅读(9) 评论(0) 推荐(0)
摘要: ## Basic node image ```Dockerfile FROM node:12-stretch COPY index.js index.js CMD ["node", "index.js"] ``` Build docker image: `docker build -t my-nod 阅读全文
posted @ 2023-08-01 14:48 Zhentiw 阅读(29) 评论(0) 推荐(0)
摘要: import React, { forwardRef } from "react"; // Declare a type that works with generic components type FixedForwardRef = <T, P = {}>( render: (props: P, 阅读全文
posted @ 2023-08-01 14:11 Zhentiw 阅读(66) 评论(0) 推荐(0)
摘要: Mistake 1: Not using the same function reference // Wrong button.addEventListener('click', () => {console.log('click')}) button.removeEventListener('c 阅读全文
posted @ 2023-07-27 15:13 Zhentiw 阅读(93) 评论(0) 推荐(0)
摘要: So it's much easier to do what we did with Docker. Run this command: docker run --interactive --tty alpine:3.10 # or, to be shorter: docker run -it al 阅读全文
posted @ 2023-07-27 14:55 Zhentiw 阅读(11) 评论(0) 推荐(0)
摘要: Okay, so now we've hidden the processes from Eve so Bob and Alice can engage in commerce in privacy and peace. So we're all good, right? They can no l 阅读全文
posted @ 2023-07-26 14:21 Zhentiw 阅读(6) 评论(0) 推荐(0)
摘要: namespace While chroot is a pretty straightforward, namespaces and cgroups are a bit more nebulous to understand but no less important. Both of these 阅读全文
posted @ 2023-07-25 14:31 Zhentiw 阅读(19) 评论(0) 推荐(0)
摘要: When Virtual keyboard popup, we can relayout the UI element accordingly: navigator.virtualKeyboard.overlaysContent = true; navigator.virtualKeyboard.s 阅读全文
posted @ 2023-07-24 15:35 Zhentiw 阅读(52) 评论(0) 推荐(0)
摘要: It's a Linux command that allows you to set the root directory of a new process. In our container use case, we just set the root directory to be where 阅读全文
posted @ 2023-07-24 14:42 Zhentiw 阅读(78) 评论(0) 推荐(0)
摘要: // 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 阅读(21) 评论(0) 推荐(0)
上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 491 下一页