Skip to content

Instantly share code, notes, and snippets.

View cong-min's full-sized avatar
👨‍💻
👨🏻‍💻👨🏼‍💻👨🏽‍💻👨🏾‍💻👨🏿‍💻👩🏿‍💻👩🏾‍💻👩🏽‍💻👩🏼‍💻👩🏻‍💻

Cong Min cong-min

👨‍💻
👨🏻‍💻👨🏼‍💻👨🏽‍💻👨🏾‍💻👨🏿‍💻👩🏿‍💻👩🏾‍💻👩🏽‍💻👩🏼‍💻👩🏻‍💻
View GitHub Profile
Fetch Bing Daily Wallpaper by Node.js & PHP.
e.g. https://congm.in/bing.php
@cong-min
cong-min / cloudSettings
Last active August 24, 2021 15:16
My Vscode Sync Settings
{"lastUpload":"2021-08-24T15:16:31.014Z","extensionVersion":"v3.4.3"}
@cong-min
cong-min / operation.js
Created August 24, 2019 07:18
JS中精确的四则运算, 修复浮点数运算精度误差
/* JS中精确的四则运算, 修复浮点数运算精度误差
* @ Cong Min - https://github.com/mcc108
*/
// 将参数转换为数字, 并检测参数
const _Number = num => {
const number = Number(num); // 转换为数字
if (Number.isNaN(number)) {
console.warn(`运算时数字 ${num} 不为合法数值`);
} else if (number < Number.MIN_SAFE_INTEGER || number > Number.MAX_SAFE_INTEGER) {