//十进制转其他
var x=110;
alert(x);
alert(x.toString(8));
alert(x.toString(32));
alert(x.toString(16));
//其他转十进制
var x='110';
alert(parseInt(x,2));
alert(parseInt(x,8));
alert(parseInt(x,16));
//其他转其他
//先用parseInt转成十进制再用toString转到目标进制
alert(String.fromCharCode(parseInt(141,8)))
alert(parseInt('ff',16).toString(2));javascript 进制转换(2进制、8进制、10进制、16进制之间的转换)
-
v-viewer大图预览没有图片
通过配置opition的url属性,来配置预览大图的url
-
v-viewer大图预览没有图片
通过配置opition的url属性,来配置预览大图的url
-
Though the "loose" option was set to "false" in your @babel/preset-env
Add the following to your nuxt.config.js file under the build section.
-
redis开启远程链接以及设置密码
下面我用yum安装redis,并设置远程链接演示给大家
-
NPM依赖包版本号~和^和*的区别
推荐使用~,只会修复版本的bug,比较稳定
-
npm和yarn是这代理proxy
yarn config set proxy http://127.0.0.1:8080
-
npm 多个不同版本的依赖
提起 npm,大家第一个想到的应该就是 npm install 了,但是 npm install 之后生成的 node_modules 大家有观察过吗?package-lock.json 文件的作用大家知道吗?除了 dependencies 和 devDependencies,其他的依赖有什么作用呢?接下来,本文将针对 npm 中的你可能忽略的细节和大家分享一些经验 。
-
Using / for division is deprecated and will be removed in Dart Sass 2.0.0
所以通过这次使用,我确定了,一定要禁止使用cnpm,npm和yarn也要只用一个。
-
呼吁禁用cnpm
禁用cnpm,cnpm的坑