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
Mikey Rules™ |
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
There once was a Wookiee named Mikey |
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
There once was a Wookiee named Mikey |
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
There once was a Wookiee named Mikey |
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
var ExtractSelectedText = function() {}; | |
ExtractSelectedText.prototype = { | |
run: function(options) { | |
var selectedText = "No Selection"; | |
if (window.getSelection) { | |
selectedText = window.getSelection().getRangeAt(0).toString(); | |
} else { | |
selectedText = document.getSelection().getRangeAt(0).toString(); |
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
// Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
// Copyright (c) 2013 Peter Steinberger. All rights reserved. | |
// Licensed under MIT (http://opensource.org/licenses/MIT) | |
// | |
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
// | |
// This version tweaked to work on Mac OS X / AppKit. | |
#import <Cocoa/Cocoa.h> | |
#import <objc/runtime.h> |
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
let fun: (() -> Bool)? = UIAccessibilityIsReduceMotionEnabled | |
switch fun { | |
case .Some(let x): | |
println("\(x)") | |
x() // gets here and dies on ios7 | |
default: | |
println("gronk") | |
} |
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
I'm building an AVComposition. The audio plays back fine. The video is blind and silent. After the video's duration has elapsed the audio comes back in. The audio is coming from the itunes library and the video is a mp4 file sitting in the file system. The video plays fine with MPMoviePlayerController. | |
Here are the segments: | |
(lldb) po compositionVideoTrack.segments | |
<__NSArrayM 0x145f84d0>( | |
<AVCompositionTrackSegment: 0x145f85c0 timeRange [0.000,+440.256] from trackID 1 of asset file:///var/mobile/Applications/11472C08-EB4B-4566-8C09-DAFD90C904F6/Documents/.../globa-soaring_over_sori-italy-m-italy3.mp4 sourceTimeRange [0.000,+440.256]> | |
) |
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
chapter_tree = ET.parse('Chapter.xml') | |
chapter_root = chapter_tree.getroot() | |
for para in chapter_root.iter('{http://docbook.org/ns/docbook}para'): | |
print para.text | |
<para> | |
In this chapter, you will focus on the authentication piece. You will | |
extend the Catalog app to provide a username and password when using |
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/Foundation.h> | |
#import <mach/mach_time.h> // for mach_absolute_time() and friends | |
// clang -g -Wall -framework Foundation -o timestarts timestarts.m | |
CGFloat BNRTimeBlock (void (^block)(void)) { | |
mach_timebase_info_data_t info; | |
if (mach_timebase_info(&info) != KERN_SUCCESS) return -1.0; | |
uint64_t start = mach_absolute_time (); |
OlderNewer