上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要: 使用homebrew安装unrar 安装完成后cd到rar文件目录,使用终端命令解压 阅读全文
posted @ 2020-01-06 14:08 懒懒同学不懒 阅读(3199) 评论(0) 推荐(0) 编辑
摘要: 核心模块 Node为Javascript提供了很多服务器级别的API,绝大多数都被包装到了一个具名的核心模块中,例如文件操作的fs核心模块,http服务构建的http模块等,核心模块的使用必须通过require方法加载 const path = require('path') fs-文件系统 htt 阅读全文
posted @ 2020-01-05 16:31 懒懒同学不懒 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 用于处理文件路径和目录路径 引入 const path = require('path') path.extname(path) 返回扩展名。从最后一次出现 . 字符到字符串结束。 const path = require('path') console.log(path.extname('inde 阅读全文
posted @ 2020-01-04 14:01 懒懒同学不懒 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 获取操作系统相关信息 引用 const os = require('os') os.cpus() 获取当前机器的CPU信息 console.log(os.cpus()) 打印结果: [ { model: 'Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz', spee 阅读全文
posted @ 2020-01-03 12:57 懒懒同学不懒 阅读(338) 评论(0) 推荐(0) 编辑
摘要: net.Socket 类 socket.remotePort 访问服务器的远程端口 const http = require('http'); const server = http.createServer((req, res) => { console.log(`端口是${req.socket. 阅读全文
posted @ 2020-01-02 19:33 懒懒同学不懒 阅读(158) 评论(0) 推荐(0) 编辑
摘要: ie使用filter解决半透明兼容性问题 颜色#19ffffff由两部分组成,第一部分是#后面的19,是透明度0.1的IE filter值,从0.1到09每个数字对应一个IE filter值。第二部分是色值 阅读全文
posted @ 2019-12-30 11:35 懒懒同学不懒 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 通过node中的http模块可以创建编写服务器 引入 const http = require('http') http举例使用: const http = require('http') //引入 const server = http.createServer() //创建web服务器 // 服 阅读全文
posted @ 2019-12-25 16:13 懒懒同学不懒 阅读(460) 评论(0) 推荐(0) 编辑
摘要: fs是file-system的简写,文件系统的意思。在Node中如果想要进行文件操作,就必须引入fs这个核心模块。 引入 const fs = require('fs') fs.readFile(path[, options], callback) path:要读取的文件路径 options:可选 阅读全文
posted @ 2019-12-24 16:48 懒懒同学不懒 阅读(534) 评论(0) 推荐(0) 编辑
摘要: 使用setTimeout模拟滚动结束 let scrollTimer; document.addEventListener("scroll", () => { clearTimeout(scrollTimer); scrollTimer = setTimeout(() => { // todo so 阅读全文
posted @ 2019-12-05 20:28 懒懒同学不懒 阅读(4819) 评论(0) 推荐(1) 编辑
摘要: 安装本地全局包时,本地报错 执行sudo还是报这个错误,在网上查找解决方法,终于解决。 打开Finder,选择前往 --》 前往文件夹 --》输入报错路径,点击前往,点开文件夹,在文件夹中删除包的全部内容。完美解决 阅读全文
posted @ 2019-11-14 12:58 懒懒同学不懒 阅读(384) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页