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
pi400: CFLAGS+=-static -lusbgx -lconfig -DPI400_USB | |
pi400: pi400.c gadget-hid.c | |
$(CC) $^ $(CFLAGS) -o $@ | |
clean: | |
-rm pi400 |
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
function calculateMD5Hash(file, bufferSize) { | |
var def = Q.defer(); | |
var fileReader = new FileReader(); | |
var fileSlicer = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice; | |
var hashAlgorithm = new SparkMD5(); | |
var totalParts = Math.ceil(file.size / bufferSize); | |
var currentPart = 0; | |
var startTime = new Date().getTime(); |