382 karma · joined December 28, 2013
def proc &p
p
end
is what the special method looks like but yeah they’re not standalone expressions but rather part of the method call syntax. def get_widget
with_lock do
return @widget # returns from the method call
end
end
def update_interesting_gadget
@gadgets.each do |g|
g.with_lock do
if g.is_theone?
g.update
break # breaks the enclosing each's while loop
end
end
end1. Burning coal emits NOx, SO2 and other toxic and radioactive shit, which is not what the studies were about. For example an American city like LA emits a ton of CO2 but I wouldn't call it polluted compared to someplace like Shanghai where PM2.5 in the air poses a danger to your health some days. Greenhouse gas emissions and pollution are related but different.
2. Japan doesn't really use diesel for passenger vehicles and diesel tends to be pretty dirty in terms of NOx, especially diesels before dieselgate.
So the premise that on a dirty grid an EV is cleaner than an ICE car may or may not be true. Note that the study doesn't seem to be touching on hybrids at all which will obviously close to (non-hybrid) diesels in terms of CO2 while offering even lower toxic emissions.
https://en.wikipedia.org/wiki/QR_code#Joining_a_Wi%E2%80%91F...
array = [1, 2]
array.reverse!
assert array == __
[0] http://rubykoans.com/[0] https://www.terraform.io/docs/configuration/resources.html#c...
We don't yet introspect ECS clusters to assign a portion of spend to tasks, but we do breakdowns of services, tags, instances, ELBs etc across 1-N accounts. For S3 we can actually introspect buckets and produce rollups by object metadata as well as heat maps (which objects are being accessed a lot)
One liner-wise, you could create an alias
echo '{"foo":12, "bar": 11}' | python -c 'import json as j, collections as c, sys as s; j.dump(j.load(s.stdin, object_pairs_hook=c.OrderedDict), s.stdout, indent=4)'
[0] https://github.com/python/cpython/blob/3.5/Lib/json/tool.py#...http://norml.org/library/item/marijuana-and-driving-a-review...