You are here |
rheingoldheavy.com | ||
| | | |
esham.io
|
|
| | | | Yet another demonstration of why you should store monetary amounts in integers. | |
| | | |
www.paepper.com
|
|
| | | | A note on bit-wise operations Today I read some JavaScript source code and stumbled on a line like var delta = ~~time; and I was unsure what that purpose of using ~~ was. So I started to research and digging a bit deeper. It turns out that the binary not operator (~) when applied twice on a floating number (e.g. 4.12) returns an integer (~~4.12 = 4). Why not simply use Math. | |
| | | |
tannerdolby.com
|
|
| | | | Rounding numbers in Python is quite common. There might be a situation where values must only be rounded to 3 decimals or some arbitrary number. Using the built-in function round() is handy but changes the original value. | |
| | | |
blog.ephorie.de
|
|
| |