03 2024 档案

摘要:[ 方法 ] 创建配置文件 alias.bat 在一个 path 路径中 @echo off doskey ls=dir /b $* doskey act=activate tensorflow-gpu $* doskey tb=tensorboard --logdir $* doskey pi=p 阅读全文
posted @ 2024-03-21 09:54 anch 阅读(224) 评论(0) 推荐(0) 编辑
摘要:[ API ] https://element-plus.org/zh-CN/component/overview.html [ 安装 和 配置 ] $ npm i element-plus $ npm install -D unplugin-vue-components unplugin-auto 阅读全文
posted @ 2024-03-21 08:38 anch 阅读(97) 评论(0) 推荐(0) 编辑
摘要:挖坑:集合CURD,文档CURD [ 数据库连接 ] 连接一个不存在的数据库,不会立即创建该数据库,只有执行到文档对象的 save 等方法时,才会去创建该数据库 const mongoose = require('mongoose') // 这里捕获的是链接过程中发生的异常 mongoose.con 阅读全文
posted @ 2024-03-19 14:17 anch 阅读(18) 评论(0) 推荐(0) 编辑
摘要:[ 常见数据类型 ] https://docs.mongoing.com/the-mongo-shell/data-types-in-the-mongo-shell:wangwu Object ID: 文档ID,数据ID,数据的主键 String: 字符串 Bollean: 布尔 Integer: 阅读全文
posted @ 2024-03-19 09:44 anch 阅读(10) 评论(0) 推荐(0) 编辑
摘要:[ windows Terminal ] 打开 microsoft store, 安装 windows Terminal win R 打开运行,输入 cmd 打开命令提示符 输入 where wt,会得到 wt 命令的绝对路径 cmdpath 建立一个 bat 文件,注意命名不要用 bash 或者 阅读全文
posted @ 2024-03-18 12:49 anch 阅读(119) 评论(0) 推荐(0) 编辑
摘要:[ .bashrc ] bash resource configuration 配置文件 [ 给命令设置别名 ] 设置临时别名,只在当前终端有效 // 设置别名 user$ alias lss='ls' // 查看已经设置的别名 user$ alias // 删除别名 user$ unalias l 阅读全文
posted @ 2024-03-18 10:53 anch 阅读(10) 评论(0) 推荐(0) 编辑
摘要:[ 配置文件 .vimrc ] 在 ~ 目录下找到活创建 .vimrc 文件,在里面可以对 vim 进行配置 显示行号 # set number // 显示绝对行号 # set relativenumber // 显示相对行号 set number relativenumber // 显示混合行号 阅读全文
posted @ 2024-03-18 10:16 anch 阅读(25) 评论(0) 推荐(0) 编辑
摘要:[ 命令大全 ] https://www.runoob.com/linux/linux-command-manual.html [ 常见简写的全拼 ] https://www.runoob.com/w3cnote/linux-command-full-fight.html [ 命令行快捷操作 ] c 阅读全文
posted @ 2024-03-18 10:03 anch 阅读(11) 评论(0) 推荐(0) 编辑
摘要:https://zhuanlan.zhihu.com/p/37997035 阅读全文
posted @ 2024-03-16 20:49 anch 阅读(2) 评论(0) 推荐(0) 编辑
摘要:[ uuid ] https://www.npmjs.com/package/uuid#api-summary npm i uuid const {v4 uuidv4} = require('uuid') // v1 v3 v4 v5 const id = uuidv4() 还可以进行格式化,解析, 阅读全文
posted @ 2024-03-16 20:35 anch 阅读(5) 评论(0) 推荐(0) 编辑
摘要:[ jsonwebtoken ] token 令牌,注册时生成,登陆验证通过后下发 // install npm install jsonwebtoken // 生成 const token = 'Bearer ' + jwt.sign({userid: 1}, secret) // secret 阅读全文
posted @ 2024-03-16 16:10 anch 阅读(5) 评论(0) 推荐(0) 编辑
摘要:[ 函数对象 ] 小括号左边一定是函数,小数点左边一定是对象,具备二者特性的对象是函数对象 function Fn(){} // 函数 Fn.prototype // 函数对象 Fn.bind({}) // 函数对象 const fn = new Fn() // Fn 前方有 new 关键字,此时 阅读全文
posted @ 2024-03-15 21:26 anch 阅读(4) 评论(0) 推荐(0) 编辑
摘要:详细内容可以参考这篇文章 https://zhuanlan.zhihu.com/p/21999778 [ ssh 基础操作 ] local$ ssh user@remote -p port // -p 指定端口,默认22, remove是远程机的ip [ 免密登陆 ] local$ ssh-keyg 阅读全文
posted @ 2024-03-15 10:31 anch 阅读(11) 评论(0) 推荐(0) 编辑
摘要:[ validator ] express-validator 是基于 validator 进行工作的,在这个网站可以查询可以使用的验证方法。 https://www.npmjs.com/package/validator [ express-validator 官方文档 ] https://exp 阅读全文
posted @ 2024-03-13 15:09 anch 阅读(29) 评论(0) 推荐(0) 编辑
摘要:[ 插件 ] https://nodejs.cn/express/5x/api/ 开发日志 npm i morgan const morgan = require('morgan') app.use(morgan('dev')) 跨域设置 npm i cors const cors = requir 阅读全文
posted @ 2024-03-13 14:38 anch 阅读(10) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示