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
- (void)closeDown { | |
NSArray *stores = [self.persistentStoreCoordinator persistentStores]; | |
for (NSPersistentStore *store in stores) { | |
DebugLogging(@"Closing Core Data store at %@", [store URL]); | |
NSError *error = nil; | |
if (![self.persistentStoreCoordinator removePersistentStore:store error:&error]) { | |
DebugLogging(@"Unable to close Core Data store: error %@", [error localizedDescription]); | |
} | |
} | |
} |
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
(?<!Path:|Key:|NSLocalizedString\(|NibName:|NibNamed:|imageNamed:|PathComponent:|xpathQuery:|initForModel:|initWithDomain:|predicateWithFormat:|setDateFormat:|fontWithName:|entities:|sortBy:|NSClassFromString\(|NSLog\(|DLog\(|ALog\(|DebugLogging\()\s*(?!@"%@"|@"%d")@".+" |
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
- (BOOL)tableView:(NSTableView*)tableView shouldShowCellExpansionForTableColumn:(NSTableColumn*)tableColumn row:(NSInteger)row | |
{ | |
return NO; // no tool tips | |
} | |
- (NSString*)tableView:(NSTableView*)aTableView toolTipForCell:(NSCell*)aCell rect:(NSRectPointer)rect tableColumn:(NSTableColumn*)aTableColumn row:(NSInteger)row mouseLocation:(NSPoint)mouseLocation | |
{ | |
return nil; // no tool tips | |
} |
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
// in some parent view controller's header file | |
- (IBAction)yourActionNameHere:(id)sender; | |
// implementation does whatever you want | |
// Now, from any call site, as long as you're on the main thread | |
// just post an action to nil and it will be sent to the first responder, | |
// then all the way up the responder chain until it finds your view controller | |
[[UIApplication sharedApplication] sendAction:@selector(yourActionNameHere:) |
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 found: | |
NSMessagePort | |
NSURLSessionDataTask | |
NSURLSessionUploadTask | |
None of these were what Mike had in mind, which was NSFileSecurity. | |
I commented that NSFileSecurity was doubly interesting because it's in Foundation but not listed in "Foundation Framework Reference". |
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
Verbatim LLDB session with an iPad Air running iOS 7.1.1. | |
As you can see, "finPath", which is a const char*, is an absolute path. | |
Normally fopen(finPath, "r") works fine but sometimes after stress-testing the app gets into a state where it always fails with ENOENT. | |
How could fopen(finPath, "r") fail with ENOENT while open(finPath, O_RDONLY) succeeds? | |
Edit: forgot to say that no memory warnings were received during the stress test. | |
(lldb) p finPath |
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
// written with Swift as of Xcode 6 beta 5 | |
import Swift | |
let a = 2 | |
let b = 5 | |
let c = a + b // returns 42 not 7 even though coder is unaware of the override below, which could even be buried in a malicious import | |
// extremely evil override | |
public func + (x: Int, y: Int) -> Int { |
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
#! /usr/bin/env python | |
''' | |
Format the Git log between current and master into the markdown required for the HockeyApp nightly builds. | |
''' | |
import os | |
import re | |
ticketRegex = re.compile(r'#(\d+)') |
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
{ "timestamp":"2018-04-17T19:13:12Z", "event":"Fileheader", "part":1, "language":"French\\FR", "gameversion":"3.0.5.402 EDH", "build":"r168330/r0 " } | |
{ "timestamp":"2018-04-17T19:13:12Z", "event":"Music", "MusicTrack":"NoTrack" } | |
{ "timestamp":"2018-04-17T19:13:12Z", "event":"Music", "MusicTrack":"MainMenu" } | |
{ "timestamp":"2018-04-17T19:13:45Z", "event":"Friends", "Status":"Online", "Name":"Doug Heisenberch" } | |
{ "timestamp":"2018-04-17T19:13:45Z", "event":"Friends", "Status":"Online", "Name":"Myself_st" } | |
{ "timestamp":"2018-04-17T19:13:45Z", "event":"Friends", "Status":"Online", "Name":"ST4R F0X" } | |
{ "timestamp":"2018-04-17T19:13:45Z", "event":"Friends", "Status":"Online", "Name":"Spike1986" } | |
{ "timestamp":"2018-04-17T19:13:45Z", "event":"Friends", "Status":"Online", "Name":"Freak97" } | |
{ "timestamp":"2018-04-17T19:13:45Z", "event":"Friends", "Status":"Online", "Name":"NSR2" } | |
{ "timestamp":"2018-04-17T19:13:45Z", "event":"Friends", "Status":"Online", "Name":"Valcor_" } |
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
{_ Mission report } | |
{_ Check what systems you have missions in } | |
{_ Setup allmissions function } | |
{set allmissions(system) to: | |
{set here to find(systems, system)} | |
{if here > -1: | |
{set number to systems_count[here] + 1} | |
{set systems_count to union(systems_count, [here:number])} |
OlderNewer