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
/** | |
* Run a chained map reduce on a couchdb view | |
* | |
* @param db The db to use | |
* @param view The view name | |
* @param map_func The map function to use on the view results function({ key: , value: }) -> { key: , value: } | |
* @param config Standard jquery.couch.js config options | |
*/ | |
var chainCouch = (function() { |
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
String formatFileSize(int b) { | |
const List<String> suffix = const [ | |
'B', | |
'KB', | |
'MB', | |
'GB', | |
'TB', | |
'PB', | |
]; | |
num v = b.toDouble(); |
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
import "dart:convert"; | |
void main() { | |
dynamic a = json.decode("[[1]]"); | |
List<List<int>> b = (a as List).cast<List<int>>(); | |
List<int> c = b[0].cast<int>(); | |
} |
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
void main() { | |
print(Set<int>() is Set<double>); | |
} |