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
#include <cstdint> // for specific size integers | |
#include <fstream> // for file handling | |
using namespace std; | |
struct BmpHeader { | |
char bitmapSignatureBytes[2] = {'B', 'M'}; | |
uint32_t sizeOfBitmapFile = 54 + 786432; // total size of bitmap file | |
uint32_t reservedBytes = 0; | |
uint32_t pixelDataOffset = 54; | |
} bmpHeader; |
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
const I = x => x | |
const K = x => y => x | |
const A = f => x => f (x) | |
const T = x => f => f (x) | |
const W = f => x => f (x) (x) | |
const C = f => y => x => f (x) (y) | |
const B = f => g => x => f (g (x)) | |
const S = f => g => x => f (x) (g (x)) | |
const S_ = f => g => x => f (g (x)) (x) | |
const S2 = f => g => h => x => f (g (x)) (h (x)) |
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
#Paste in Preferences > Sidebar Theme > Click thing at the bottom to expose the input and copy pasta this guy in there | |
#111111,#111111,#333333,#FFFFFF,#444444,#FFFFFF,#FFFFFF,#FF0000 |
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
// PathSimplifier.swift | |
import UIKit | |
private let TOLERANCE: CGFloat = 1e-6 | |
private let EPSILON: CGFloat = 1e-12 | |
extension CGPoint { | |
func add(p: CGPoint) -> CGPoint { | |
return CGPointMake(x+p.x, y+p.y) |
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
main(argc, argv) | |
int argc; | |
char *argv[]; | |
{ | |
int i; | |
argc--; | |
for(i=1; i<=argc; i++) | |
printf("%s%c", argv[i], i==argc? '\n': ' '); | |
} |