Skip to content

Instantly share code, notes, and snippets.

class _DataTableExample extends State<DataTableExample> {
List<Map> data;
bool sort;
int iSortColumnIndex;
@override
void initState() {
sort = true; // Note that in flutter ascending/descending icon are inversed
iSortColumnIndex = 1;
onCountSortColum(1, true);
import hashlib as hasher
import datetime as date
# Define what a Snakecoin block is
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash
jQuery.validator.addMethod("alphanumeric", function(value, element) {
return this.optional(element) || /^[A-Za-z0-9 _]*[A-Za-z0-9][A-Za-z0-9 _]*$/.test(value);
});
jQuery.validator.addMethod("letterwithspaces", function(value, element) {
return this.optional(element) || /^[a-zA-Z\s]+$/.test(value);
});
jQuery.validator.addMethod("imagetype", function(value, element) {
return this.optional(element) || /^.*\.(jpg|png|jpeg|gif)$/i.test(value);