- You can store a price in a floating point variable.
- All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
- All currencies are subdivided in decimal units (like dinar/fils)
- All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
- All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
- Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
- For any currency you can have a price of 1. (ZWL)
- Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)
# Systemtap script to trace latency of concurrent memcached requests | |
# as they percolate through the Linux kernel. | |
# - Jacob Leverich <[email protected]> 2013 | |
# | |
# Note: You MUST call this script with "-x <TID>" where TID is the | |
# *task id* of a memcached worker thread. This is usually PID+1 of | |
# memcached. So do something like: | |
# | |
# % memcached -t 1 -d | |
# % pgrep memcached |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
- 并发(Concurrency):Composition of independently executing process (processes in the general sense, not linux processes.
- 并行(Parallism): Simultaneous execution of computations
#!/usr/bin/env bash | |
set -xeuo pipefail | |
create_bridge() { | |
local nsname="$1" | |
local ifname="$2" | |
echo "Creating bridge ${nsname}/${ifname}" |
Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.
There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.
1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]
struct foo {
struct bar {
int x;