摘要: 1029. Two City Scheduling (双城面试2N人费用最小问题) There are 2N people a company is planning to interview. The cost of flying the i-th person to city A is cost 阅读全文
posted @ 2020-07-09 15:06 略略略—— 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 在lambda函数最后的return语句是这样的: 1 return Promise.all( 2 _.map(results, (temp, assetID) => { 3 _.map(temp, (measurements, time) => 4 sdk.pushMeasurements({ a 阅读全文
posted @ 2020-07-06 13:04 略略略—— 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 参考官方文档:https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Arrow_functions 其中说: // 当箭头函数的函数体只有一个 `return` 语句时,可以省略 `return` 关键 阅读全文
posted @ 2020-07-06 11:40 略略略—— 阅读(3179) 评论(0) 推荐(1) 编辑
摘要: 明天就要放假了,今天上班有点心不在焉···然后就翻车了,已经commit了好几次才发现自己不在正确的那个分支上。 解决方法: git log显示出当前分支上的所有commit 复制最近一次正确commit的ID git reset commitID (默认是--soft模式,加不加都可以。即不会更改 阅读全文
posted @ 2020-06-24 14:40 略略略—— 阅读(2500) 评论(0) 推荐(0) 编辑
摘要: 先给结论: _.isNumber(NaN) 他的返回值是true.... 本来想判断的是: _.isNumber(Number('-')) 类似这样的东西。 没想到 Number('-') 返回 NaN 而 _.isNumber 竟然判断 NaN 是 true..... 谁会用 NaN 做数值计算啊 阅读全文
posted @ 2020-06-18 18:50 略略略—— 阅读(12501) 评论(0) 推荐(0) 编辑
摘要: 这种问题就总是很恶心,非技术性的小问题,解决起来总是很花时间。今天在此记录一下我的解决方法: 参考1:https://github.com/prettier/prettier-vscode/issues/1299 参考2:https://prettier.io/docs/en/configurati 阅读全文
posted @ 2020-06-18 18:37 略略略—— 阅读(3452) 评论(0) 推荐(0) 编辑
摘要: 在lambda函数中,一次触发可能产生多个日志流,这时可以进入logs insights查询某次执行中的错误: fields @message | filter @message like /Error/ 在页面右上角选择查询的时间范围 参考文档:https://docs.aws.amazon.co 阅读全文
posted @ 2020-06-16 16:17 略略略—— 阅读(1678) 评论(0) 推荐(0) 编辑
摘要: https://cloud.tencent.com/document/product/1060/37438#.E7.A4.BA.E4.BE.8B1-.E6.9C.BA.E5.99.A8.E4.BA.BA.E5.AF.B9.E8.AF.9D.E6.9C.8D.E5.8A.A1.E6.8E.A5.E5. 阅读全文
posted @ 2020-06-10 17:59 略略略—— 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 我碰到的是大括号问题 参考这篇文章: https://mlln.cn/2018/05/19/python3%20f-string%E6%A0%BC%E5%BC%8F%E5%8C%96%E5%AD%97%E7%AC%A6%E4%B8%B2%E7%9A%84%E9%AB%98%E7%BA%A7%E7%9 阅读全文
posted @ 2020-06-10 17:42 略略略—— 阅读(9365) 评论(0) 推荐(1) 编辑
摘要: 使用serverless部署scf如何安装python的依赖呢? https://cloud.tencent.com/document/product/583/39780#python-.E8.BF.90.E8.A1.8C.E6.97.B6 链接里说的模模糊糊,甚至 通过 pip install - 阅读全文
posted @ 2020-06-09 14:35 略略略—— 阅读(3199) 评论(0) 推荐(0) 编辑