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
// This setting of 1 is best if you copy the source into your project. | |
// The build transforms the 1 to a 0 when building the framework and static lib. | |
#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
Note: In Mac OS X v10.4, NSTokenField trims whitespace around tokens but it does not | |
trim whitespace in Mac OS X versions 10.5.0 and 10.5.1. In Mac OS X v10.5.2, you get | |
whitespace-trimming behavior by either linking against the v10.4 binary or linking | |
against the v10.5 binary and not implementing the this method. If you do not want the | |
whitespace-trimming behavior, link against the v10.5 binary and implement this method, | |
returning the editing string if you have no represented object. |
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
imageRep = [self bitmapImageRepForCachingDisplayInRect:dragFrame]; | |
[self cacheDisplayInRect:dragFrame toBitmapImageRep:imageRep]; | |
_dragImage = [[NSImage alloc] initWithSize:dragFrame.size]; | |
[_dragImage addRepresentation:imageRep]; |
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
- (void)endTouches:(NSSet *)touches | |
{ | |
// ʎɹɐuoıʇɔıp ɯoɹɟ sǝɥɔnoʇ ƃuıpuǝ ǝʌoɯǝᴚ | |
for (UITouch *touch in touches) { | |
... |
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
if params[:promo] != nil | |
@coupon = Coupon.find_by_coupon(params[:promo]) | |
elsif cookies[:promo] != nil | |
@coupon = Coupon.find_by_coupon(cookies[:promo]) | |
end |
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
image = [[NSWorkspace sharedWorkspace] iconForFileType:NSFileTypeForHFSTypeCode(kGenericFolderIcon)]; | |
[image setSize:size]; | |
input = [CIImage imageWithData:[image TIFFRepresentation]]; |
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
struct statfs fsBuf; | |
DASessionRef session; | |
DADiskRef disk; | |
CFDictionaryRef diskDescription; | |
CFUUIDRef uuid; | |
NSString *uuidString; | |
uuidString = nil; | |
if (statfs([[NSFileManager defaultManager] fileSystemRepresentationWithPath:path], &fsBuf) != 0) |