This file contains hidden or 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
typedef void (*HammingDistanceCallback)(uint8_t* Buf); | |
template <size_t NumBytes, size_t Distance> | |
static void HammingDistanceRecurse(uint8_t Buf[NumBytes], HammingDistanceCallback Callback, int Level, int StartPosition) | |
{ | |
Callback(Buf); | |
if (Level == Distance) | |
return; |
This file contains hidden or 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
#include <utility> | |
template <typename T, typename U> | |
T RandomChoice_Recursive(unsigned choice, unsigned i, U a) | |
{ | |
return a; | |
} | |
template <typename T, typename U, typename... TArgs> | |
T RandomChoice_Recursive(unsigned choice, unsigned i, U a, TArgs... tail) |
This file contains hidden or 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
/* | |
Scramble/descramble raw NAND dumps from the NES Classic. | |
plutoo 2016 | |
Cheers to brizzo, derrek. | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdint.h> |