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
func async(queue: dispatch_queue_t, f: () -> Void) { | |
dispatch_async(queue, f) | |
} | |
func async(f: () -> Void) { | |
async(dispatch_get_main_queue(), f) | |
} | |
async { | |
println("Hello") |
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
extension String { | |
subscript (r: Range<Int>) -> String { | |
let indexRange = Range(start: advance(self.startIndex, r.startIndex), end: advance(self.startIndex, r.endIndex)) | |
return self[indexRange] | |
} | |
subscript (i: Int) -> Character { | |
return self[advance(self.startIndex, i)] | |
} | |
} |
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 Foundation | |
class File: Sequence, Generator { | |
typealias GeneratorType = File | |
typealias Element = String | |
var handle: UnsafePointer<FILE>? | |
init(path: String) { |
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
protocol OtherType { | |
typealias foo | |
} | |
protocol Foo: OtherType { | |
func extend<S : OtherType where S.foo == Self.foo>(sequence: S) -> S | |
} |
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
diff --git a/VirtualJaguar/VirtualJaguar/JaguarGameCore.h b/VirtualJaguar/VirtualJaguar/JaguarGameCore.h | |
index 66b7c3b..d3c106c 100644 | |
--- a/VirtualJaguar/VirtualJaguar/JaguarGameCore.h | |
+++ b/VirtualJaguar/VirtualJaguar/JaguarGameCore.h | |
@@ -32,7 +32,7 @@ OE_EXPORTED_CLASS | |
@interface JaguarGameCore : OEGameCore | |
- (void)initVideo; | |
-void audio_callback_batch(uint8 *buff, int len); | |
+void audio_callback_batch(uint16_t *buff, int len); |
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.c | |
// CopyList | |
// | |
// Created by Joshua Weinberg on 3/25/13. | |
// Copyright (c) 2013 Joshua Weinberg. All rights reserved. | |
// | |
#include <iostream> | |
#include <map> |
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.c | |
// CopyList | |
// | |
// Created by Joshua Weinberg on 3/25/13. | |
// Copyright (c) 2013 Joshua Weinberg. All rights reserved. | |
// | |
#include <iostream> | |
#include <map> |
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.c | |
// CopyList | |
// | |
// Created by Joshua Weinberg on 3/25/13. | |
// Copyright (c) 2013 Joshua Weinberg. All rights reserved. | |
// | |
#include <iostream> | |
#include <map> |
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
NSString *str = [[NSString alloc] initWithBytes:({uint32_t t = 0x1F4A9; &t;}) length:4 encoding:NSUTF32LittleEndianStringEncoding]; | |
NSLog(@"%@", str); |
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 int CLK = 1; | |
const int STROBE = 0; | |
const int DATA = 2; | |
int buttons[8] = {0,0,0,0,0,0,0,0}; | |
int shift = 0; | |
void setup() { | |
Serial.begin(115200); | |
pinMode(CLK, INPUT_PULLUP); |