随笔分类 -  软件工程相关

摘要:开发ocr功能时,图片和视频素材文件过大,因此想要配置gitignore不提交到github 但新增配置时发现未生效 原因是配置前已经提交过,从而被git trace追踪了 解决办法是从git索引处移除这些目录,即可生效 git rm -r --cached OCR/output git rm -r 阅读全文
posted @ 2025-07-11 20:33 IslandZzzz 阅读(37) 评论(0) 推荐(0)
摘要:问题 cmd控制台输入node -v 和 git -v 正确显示版本号 但是在VS Code 终端里显示无法识别命令 解决:在 PowerShell 中手动加载 PATH 打开 PowerShell,运行以下命令查看当前的 PATH: echo $env:Path 确保包含 node 和 git 的 阅读全文
posted @ 2025-06-12 17:13 IslandZzzz 阅读(406) 评论(0) 推荐(0)
摘要:解决react 函数式组件标签没有代码提示的问题 打开vscode 打开左下角setting设置 搜索emmet.includeLanguages 点击addItem,添加一组键值对,key为javascript, 值为javascriptreact 阅读全文
posted @ 2024-07-12 18:20 IslandZzzz 阅读(326) 评论(0) 推荐(0)
摘要:描述 You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, 阅读全文
posted @ 2022-07-22 16:44 IslandZzzz 阅读(47) 评论(0) 推荐(0)
摘要:描述 Given an integer array nums and an integer k, return the kth largest element in the array. Note that it is the kth largest element in the sorted or 阅读全文
posted @ 2022-07-22 10:53 IslandZzzz 阅读(48) 评论(0) 推荐(0)
摘要:描述 You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in 阅读全文
posted @ 2022-07-19 23:59 IslandZzzz 阅读(50) 评论(0) 推荐(0)
摘要:描述 Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors 阅读全文
posted @ 2022-07-19 22:35 IslandZzzz 阅读(26) 评论(0) 推荐(0)
摘要:// 递归处理, 利用函数作用域操作当前节点和当前节点的下一个节点 const reverseList = head => { if (head == null || head.next == null) return head const end = reverseList(head.next) 阅读全文
posted @ 2022-07-19 14:36 IslandZzzz 阅读(26) 评论(0) 推荐(0)
摘要:题目描述 Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique element appears at most twice. 阅读全文
posted @ 2022-07-19 11:27 IslandZzzz 阅读(34) 评论(0) 推荐(0)
摘要:题目描述 Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The r 阅读全文
posted @ 2022-07-18 16:25 IslandZzzz 阅读(30) 评论(0) 推荐(0)
摘要:题目描述 Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements. Note that you must do t 阅读全文
posted @ 2022-07-17 01:42 IslandZzzz 阅读(48) 评论(0) 推荐(0)
摘要:1. 选取最近3次的历史提交。 // git rebase -i HEAD~3 2. 按i 进入vim编辑模式 3. 基于以下指令进行修改 r, reword <commit> = use commit, but edit the commit message // 修改commit信息 s, sq 阅读全文
posted @ 2022-07-03 13:55 IslandZzzz 阅读(256) 评论(0) 推荐(0)
摘要:问题描述 import path from "path" // 模块 ""path"" 只能在使用 "esModuleInterop" 标志时进行默认导入 搜了一下解决方案,需要在tsconfig.json配置esModuleInterop为true 但是配置了依然无效 解决方案 换种写法 impo 阅读全文
posted @ 2022-07-01 18:35 IslandZzzz 阅读(1666) 评论(0) 推荐(0)
摘要:1 数组实现 维护一个数组,总是记录无重复子串; 维护一个变量,总是记录当前无重复子串的长度中较长的那个 有重复,就删除当前记录重复子串中导致重复的部分子串0~start。 每次遍历在记录长度时,和当前记录值比较,取较大的那个。 最终记录的是最长子串长度 const lengthOfLongestS 阅读全文
posted @ 2022-06-29 16:28 IslandZzzz 阅读(63) 评论(0) 推荐(0)
摘要:// 给一个数组和一个值,获取数组元素之和为这个值的组合 function getIndex(arr,v){ if(!Array.isArray(arr)){ throw 'TypeError' } const map = arr.reduce((total, cur, index) => Obje 阅读全文
posted @ 2022-06-28 18:49 IslandZzzz 阅读(30) 评论(0) 推荐(0)
摘要:const isSortable = v => { if (!Array.isArray(v) || v.length < 2) { throw 'Not an array or length less than 1' } } /** * 冒泡 * 相邻比较,第一层表示趟数,第二层表示当前趟需要比较 阅读全文
posted @ 2022-06-28 16:51 IslandZzzz 阅读(32) 评论(0) 推荐(0)
摘要:CI/CD包含很多流程,如拉取代码、测试、构建打包、登录远程服务器、部署发布等等 而Github Actions是GitHub推出的一个CI/CD工具,类似工具还有TravisCI、Jenkins等 在GitHub Actions中,每个独立的脚本就是一个action,这些action可以复用,参考 阅读全文
posted @ 2022-06-25 22:41 IslandZzzz 阅读(2005) 评论(0) 推荐(2)
摘要:一、简单请求与复杂请求 跨域问题 什么是简单请求 请求方式为GET、HEAD、POST时的请求; 认为设置规范集合之内的首部字段,如Accept/Accept-Language/Content-Language/Content-Type/DPR/Downlink/Save-Data/Viewport 阅读全文
posted @ 2022-06-23 23:07 IslandZzzz 阅读(759) 评论(0) 推荐(0)
摘要:问题 不能将类型“Timeout”分配给类型“number” Type 'Timeout' is not assignable to type 'number'. 解决方案 设置类型为NodeJS.Timeout 清除时使用delete ref.timer + clearTimeout export 阅读全文
posted @ 2022-06-21 00:05 IslandZzzz 阅读(4047) 评论(0) 推荐(0)
摘要:问题: "this" 隐式具有类型 "any",因为它没有类型注释 'this' implicitly has type 'any' because it does not have a type annotation 解决方案: 将this放在函数参数列表上声明类型即可,使用的时候this不会干扰 阅读全文
posted @ 2022-06-20 23:21 IslandZzzz 阅读(13491) 评论(0) 推荐(1)