Iterating over all the keys of a map

https://play.golang.org/p/JGZ7mN0-U- for k, v := range m { fmt.Printf(“key[%s] value[%s]\n”, k, v) } or for k := range m { fmt.Printf(“key[%s] value[%s]\n”, k, m[k]) } Go language specs for for statements specifies that the first value is the key, the second variable is the value, but doesn’t have to be present.

Is there a “do … while” loop in Ruby?

CAUTION: The begin <code> end while <condition> is rejected by Ruby’s author Matz. Instead he suggests using Kernel#loop, e.g. loop do # some code here break if <condition> end Here’s an email exchange in 23 Nov 2005 where Matz states: |> Don’t use it please. I’m regretting this feature, and I’d like to |> remove … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)