wind-stone

Results 9 comments of wind-stone

请教一下,既然`0.1`通过`toPrecision(16)`来做精度运算,最终结果为`0.1`;那么为啥`0.1 + 0.2`的结果`0.30000000000000004`并没有按照`toPrecision(16)`来做精度运算,而是`toPrecision(17)`呢? ```js (0.1 + 0.2).toPrecision(16) // 0.3000000000000000 (0.1 + 0.2).toPrecision(17) // 0.30000000000000004 ```

赞!通过鹰嘴这东西学习了不少 border-radius 的知识。

```js function flatten(arr) { const result = [...arr]; for (let i = 0; i < result.length; i++) { const item = result[i] if (Array.isArray(item)) { Array.prototype.splice.apply(result, [i, 1, ...item]) i--...

类似的方式: ```js function getMonthCountDay (year, month) { return new Date(year, month + 1, 0).getDate() } ```

这个相当实用呢,我做移动端项目经常会用

When a file is modified in the current directory or its subdirectories, why pm2 PM2 automatically restart the application, but not reload?

> @7935201 > source为啥都是空白的 先确认下是否在上传小程序时开启了 ES6 转 ES5、代码压缩,只有这么设置才能生成正常的 Source Map,否则生成的 Source Map 就是空的,详见:https://blog.windstone.cc/articles/wechat-mini-program-sourcemap/

@qianmengqwq 即使修改了系统时间导致 timeSinceLastCall < 0,也没办法判断是否要执行吧?

> 你好想请教一下这个上传的sourcemap源码包指的是微信小程序平台上下载的吗,这个源码包在上传的时候是需要包含uniapp编译后的map文件也在里面对吗 是的,需要将 uniapp 编译后的 map 也上传到微信小程序平台,他们再基于你的上传的 map 生成新的 map 文件 @Lgowen