Comments (5)
flex princple
from front-end-trivia.
document.querySelectorAll("#container li[data-tag~=css] h2:not(.Retired):not(.GroupNote)")
from front-end-trivia.
console.log( Math.abs(0.1 + 0.2 - 0.3) <= Number.EPSILON);
from front-end-trivia.
number类型运算都要想将其转化为二进制,将二进制运算,运算的结果再转化为十进制,因为number是64位双精度,小数部分只有52位,但0.1转化成为二进制是无限循环的,所以四舍五入了,这里就发生了精度丢失,0.1的二进制和0.2的二进制相加需要保留有效数字,所以又发生了精度丢失,所以结果为0.300000000000004,所以为false,而0.2+0.3恰好两个转化成为二进制和相加的过程都不会发生精度丢失,所以为true,如果你看不懂推荐看看这个教程:https://www.taopoppy.cn/Front-end/javascript_type.html#number-%E7%B1%BB%E5%9E%8Bnumber类型运算都要想将其转化为二进制,将二进制运算,运算的结果再转化为十进制,因为number是64位双精度,小数部分只有52位,但0.1转化成为二进制是无限循环的,所以四舍五入了,这里就发生了精度丢失,0.1的二进制和0.2的二进制相加需要保留有效数字,所以又发生了精度丢失,所以结果为0.300000000000004,所以为false,而0.2+0.3恰好两个转化成为二进制和相加的过程都不会发生精度丢失,所以为true,如果你看不懂推荐看看这个教程:https://www.taopoppy.cn/Front-end/javascript_primitiveType.html#_5-%E7%B2%BE%E5%BA%A6%E4%B8%A2%E5%A4%B1%E7%9A%84%E5%8E%9F%E5%9B%A0%E5%92%8C%E8%A7%A3%E5%86%B3
from front-end-trivia.
- application/json
- application/x-www-form-urlencoded //htmlform default
- multipart/form-data// file upload default
- text/xml
from front-end-trivia.
Related Issues (20)
- #git git rebase
- #Git search git command in history
- pm2 commands
- #graphql HOT 1
- #mongodb service HOT 1
- #mysql HOT 1
- 自我评价
- todo HOT 4
- #git adog
- #git git reflog show parent branch
- Periodical Scripting HOT 1
- #git everyday a git command HOT 1
- getUUid HOT 2
- https://github.com/GreatAuk/plugin-web-update-notification #SourceCode HOT 3
- docker HOT 1
- useLayoutEffect
- tailwindcss
- Error: error:0308010C:digital envelope routines::unsupported
- #css spinning HOT 1
- Scripting HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from front-end-trivia.