上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 466 下一页
摘要: function getTimeNow() { const now = new Date().toLocaleTimeString( 'en-US', { hour12: false } ); return now; } function info(functionName: string, ... 阅读全文
posted @ 2023-02-05 01:03 Zhentiw 阅读(16) 评论(0) 推荐(0) 编辑
摘要: name: Development pipeline on: pull_request: branches: - main jobs: Server: runs-on: ubuntu-22.04 steps: - name: Check files uses: actions/checkout@v3 阅读全文
posted @ 2023-02-05 00:42 Zhentiw 阅读(21) 评论(0) 推荐(0) 编辑
摘要: Server wait for database get ready # From https://docs.docker.com/compose/startup-order/ #!/bin/sh # wait-for-postgres.sh set -e host="$1" shift # Log 阅读全文
posted @ 2023-02-05 00:37 Zhentiw 阅读(34) 评论(0) 推荐(0) 编辑
摘要: To clean up Docker images and containers, you can use the following commands in the terminal: Remove all containers: docker rm $(docker ps -a -q) Remo 阅读全文
posted @ 2023-02-04 23:12 Zhentiw 阅读(22) 评论(0) 推荐(0) 编辑
摘要: Existing Dockerfile Dockerfile: FROM python:3 ENV PYBASE /pybase ENV PYTHONUSERBASE $PYBASE ENV PATH $PYBASE/bin:$PATH RUN pip install pipenv WORKDIR 阅读全文
posted @ 2023-02-04 17:42 Zhentiw 阅读(182) 评论(0) 推荐(0) 编辑
摘要: type A = {other: 'string', url: 'string'} type B = {other: 'string', ids: 'string'} type Exclusive< T extends Record<PropertyKey, unknown>, U extends 阅读全文
posted @ 2023-02-03 18:40 Zhentiw 阅读(12) 评论(0) 推荐(0) 编辑
摘要: import { Equal, Expect } from "../helpers/type-utils"; const obj = { a: 1, b: 2, c: 3, } as const; type ObjKey = keyof typeof obj; // If don't pass in 阅读全文
posted @ 2023-02-02 16:04 Zhentiw 阅读(18) 评论(0) 推荐(0) 编辑
摘要: Requirement is if pass in initialData, then return type should not contain undefined, otherwise, it should. import { it } from "vitest"; import { Equa 阅读全文
posted @ 2023-02-02 15:51 Zhentiw 阅读(10) 评论(0) 推荐(0) 编辑
摘要: When we pass in "div" to document.querySelector, it returns an HTMLDivElement or null. Similarly, when we pass it "span" we're getting an HTMLSpanElem 阅读全文
posted @ 2023-02-02 15:42 Zhentiw 阅读(16) 评论(0) 推荐(0) 编辑
摘要: Here's a function called returnWhatIPassInExceptFor1: function returnWhatIPassInExceptFor1(t: unknown): unknown { if (t 1) { return 2; } return t; } W 阅读全文
posted @ 2023-02-02 01:15 Zhentiw 阅读(27) 评论(0) 推荐(0) 编辑
上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 466 下一页