This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mongo | |
RUN mongo --host mongo1 <<'EOF' \ | |
var cfg = { \ | |
"_id": "rs0", \ | |
"version": 1, \ | |
"members": [ \ | |
{ _id : 0, host : "mongo1:27017" }, \ | |
{ _id : 1, host : "mongo2:27017" }, \ | |
{ _id : 2, host : "mongo3:27017", arbiterOnly: true } \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///http://stackoverflow.com/questions/11830174/how-to-flatten-tree-via-linq | |
public static IEnumerable<T> Flatten<T>( | |
this IEnumerable<T> e, | |
Func<T,IEnumerable<T>> f) | |
{ | |
return e.SelectMany(c => f(c).Flatten(f)).Concat(e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://pt.stackoverflow.com/questions/44957/formatar-double-com-milhar-e-decimal | |
var minhaCultura = new CultureInfo("pt-BR"); //pt-BR usada como base | |
minhaCultura.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy"; | |
minhaCultura.DateTimeFormat.ShortTimePattern = "HH:mm"; | |
minhaCultura.NumberFormat.NumberDecimalDigits = 2; | |
minhaCultura.NumberFormat.NumberGroupSeparator = "_"; | |
minhaCultura.NumberFormat.NumberDecimalSeparator = ","; | |
string.Format(minhaCultura, "{0:N}", 43239.11)); |