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 hashlib | |
def check_md5(filename, block_size = 128): | |
f = open(filename, 'rb') | |
md5 = hashlib.md5() | |
while True: | |
data = f.read(block_size) | |
if not data:break | |
md5.update(data) | |
f.close() |
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
/* | |
Javascript: Immutable way of changing quantity in a shopping cart | |
*/ | |
let cart = [{ | |
id: 1, | |
quantity: 3 | |
}, | |
{ | |
id: 2, | |
quantity: 4 |
NewerOlder