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
| static NSString * sVar1 = nil; | |
| + (NSString *)var1 | |
| { | |
| // This used to be @synchronized(sVar1) | |
| @synchronized(self) | |
| { | |
| if (sVar1 == nil) | |
| sVar1 = [[self getValue] retain]; | |
| } |
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
| objc[13184]: OBJC_HELP: describe Objective-C runtime environment variables | |
| objc[13184]: OBJC_PRINT_OPTIONS: list which options are set | |
| objc[13184]: OBJC_PRINT_IMAGES: log image and library names as they are loaded | |
| objc[13184]: OBJC_PRINT_LOAD_METHODS: log calls to class and category +load methods | |
| objc[13184]: OBJC_PRINT_INITIALIZE_METHODS: log calls to class +initialize methods | |
| objc[13184]: OBJC_PRINT_RESOLVED_METHODS: log methods created by +resolveClassMethod: and +resolveInstanceMethod: | |
| objc[13184]: OBJC_PRINT_CLASS_SETUP: log progress of class and category setup | |
| objc[13184]: OBJC_PRINT_PROTOCOL_SETUP: log progresso of protocol setup | |
| objc[13184]: OBJC_PRINT_IVAR_SETUP: log processing of non-fragile ivars | |
| objc[13184]: OBJC_PRINT_FUTURE_CLASSES: log use of future classes for toll-free bridging |
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
| // gcc -o undefined-key undefined-key.m -framework Foundation | |
| #import <Foundation/Foundation.h> | |
| @interface Foo : NSObject { } | |
| @end | |
| @implementation Foo | |
| #if 1 |
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
| % redcloth | |
| *(foo) one | |
| * two | |
| * three | |
| * four | |
| <ul class="foo"> | |
| <li>one</li> | |
| <li>two</li> | |
| <li>three</li> |
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
| #!/usr/bin/env runghc | |
| -- | Returns a Fizz Buzz string for a single number | |
| toFizzBuzz :: Int -> String | |
| toFizzBuzz n | |
| | fizz && buzz = "FizzBuzz" | |
| | fizz = "Fizz" | |
| | buzz = "Buzz" | |
| | otherwise = show n | |
| where fizz = n `mod` 3 == 0 |
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
| Summary: | |
| The managed object context does not receive NSEditorRegistration notifications when binding the underlying array controller's content set. | |
| Steps to Reproduce: | |
| Using the attached MyTunes project: | |
| 1. Add an album | |
| 2. Add a song | |
| 3. Edit the song's name | |
| 4. Click the "Commit MOC" button |
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
| #define DDFOREACH(_ARRAY_, _BLOCK_) { \ | |
| [_ARRAY_ enumerateObjectsUsingBlock:^(id object, NSUInteger idx, BOOL *stop) { \ | |
| _BLOCK_(object); \ | |
| }]; \ | |
| } | |
| #define ddbreak *stop = YES; return; | |
| void doForeach(void) |
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
| /** | |
| * Allow hiding of disclosure triangles. | |
| * Taken from: | |
| * | |
| * http://blog.petecallaway.net/?p=11 | |
| */ | |
| - (NSRect)frameOfOutlineCellAtRow:(NSInteger)row; | |
| { | |
| BOOL showTriangle = YES; | |
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
| <key>LSMinimumSystemVersion</key> | |
| <string>${MACOSX_DEPLOYMENT_TARGET}</string> | |
| <key>LSArchitecturePriority</key> | |
| <array> | |
| <string>x86_64</string> | |
| <string>i386</string> | |
| <string>ppc</string> | |
| </array> | |
| <key>LSMinimumSystemVersionByArchitecture</key> | |
| <dict> |
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
| // | |
| // main.m | |
| // Testing | |
| // | |
| // Created by Dave Dribin on 9/12/09. | |
| // Copyright 2009 Bit Maki, Inc.. All rights reserved. | |
| // | |
| #import <Cocoa/Cocoa.h> |