上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 466 下一页
摘要: sort(), mutates the original array, and return the reference to original array and sorted. The toSorted() method of Array instances is the copying ver 阅读全文
posted @ 2023-05-02 14:04 Zhentiw 阅读(31) 评论(0) 推荐(0) 编辑
摘要: Array.prototype.splice()mutates the original array. To avoid mutation, we use Array.prototype.slice(). new method Array.prototype.toSpliced() return a 阅读全文
posted @ 2023-05-02 14:01 Zhentiw 阅读(77) 评论(0) 推荐(0) 编辑
摘要: Prevously, when we want to upate an item inside a array: const items = [ {id: 1, name: 'a'}, {id: 2, name: 'b'}, {id: 3, name: 'c'}, {id: 4, name: 'd' 阅读全文
posted @ 2023-05-02 13:55 Zhentiw 阅读(30) 评论(0) 推荐(0) 编辑
摘要: Sentiment (positive/negative) lamp_review = """ Needed a nice lamp for my bedroom, and this one had \ additional storage and not too high of a price p 阅读全文
posted @ 2023-05-02 01:41 Zhentiw 阅读(28) 评论(0) 推荐(0) 编辑
摘要: Principle 1 Write clear and specific instructions clear !== short Clear and specific instructions for a model will guide it towards the desired output 阅读全文
posted @ 2023-04-28 14:07 Zhentiw 阅读(65) 评论(0) 推荐(0) 编辑
摘要: logger.ts // .env LOGGER_LEVEL=debug // logger.ts import * as winston from "winston"; export const logger = winston.createLogger({ level: process.env. 阅读全文
posted @ 2023-04-26 15:47 Zhentiw 阅读(11) 评论(0) 推荐(0) 编辑
摘要: import * as dotenv from "dotenv"; const result = dotenv.config(); if (result.error) { console.log('Error loading environment variables, aborting.') pr 阅读全文
posted @ 2023-04-26 15:35 Zhentiw 阅读(13) 评论(0) 推荐(0) 编辑
摘要: Check the adapter pattern https://www.tutorialspoint.com/design_pattern/adapter_pattern.htm Client: Call the common entry public class AdapterPatternD 阅读全文
posted @ 2023-04-26 02:38 Zhentiw 阅读(12) 评论(0) 推荐(0) 编辑
摘要: Both JSON.parse(JSON,strigify())& structuredClone doesn't work with Dateand function. var foo = {name: 'foo', bar: () => 'bar'} var foo2 = structuredC 阅读全文
posted @ 2023-04-18 13:36 Zhentiw 阅读(36) 评论(0) 推荐(0) 编辑
摘要: Original code: import { CSSProperties } from "react"; const useStyled = <TTheme = {}>(func: (theme: TTheme) => CSSProperties) => { // Imagine that thi 阅读全文
posted @ 2023-04-17 14:45 Zhentiw 阅读(15) 评论(0) 推荐(0) 编辑
上一页 1 ··· 42 43 44 45 46 47 48 49 50 ··· 466 下一页