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
static Boolean MOObjectEqual(const id value1, const id value2) { | |
debug(@"(id)value1: '%@'", NSStringFromClass([(id)value1 class])); | |
debug(@"(id)value2: '%@'", NSStringFromClass([(id)value2 class])); | |
debug(@"[(id)value1 isKindOfClass:[NSString class]]: %d", [(id)value1 isKindOfClass:[NSString class]]); | |
debug(@"[(id)value2 isKindOfClass:[NSString class]]: %d", [(id)value2 isKindOfClass:[NSString class]]); | |
return (Boolean)[(id)value1 isEqual:(id)value2]; | |
} |
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 list = """George Washington | |
John Adams | |
Thomas Jefferson | |
James Madison | |
James Monroe | |
John Quincy Adams | |
Andrew Jackson | |
Martin Van Buren | |
William Henry Harrison | |
John Tyler |
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
SInt32 TSSystemVersion(void) { | |
static dispatch_once_t once; | |
static int TSSystemVersionVal = 0x00; | |
dispatch_once(&once, ^{ | |
NSDictionary *d = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"]; | |
NSString *prodVersion = [d objectForKey:@"ProductVersion"]; | |
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
[db makeFunctionNamed:@"UTTypeConformsTo" maximumArguments:2 withBlock:^(sqlite3_context *context, int argc, sqlite3_value **argv) { | |
if (sqlite3_value_type(argv[0]) == SQLITE_TEXT) { | |
const unsigned char *a = sqlite3_value_text(argv[0]); | |
const unsigned char *b = sqlite3_value_text(argv[1]); | |
CFStringRef as = CFStringCreateWithCString(nil, (const char*)a, kCFStringEncodingUTF8); | |
CFStringRef bs = CFStringCreateWithCString(nil, (const char*)b, kCFStringEncodingUTF8); | |
sqlite3_result_int(context, UTTypeConformsTo(as, bs)); |
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
Application Specific Information: | |
ProductBuildVersion: 4H127 | |
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-3084/Framework/Connections/Interface/IBConnectionPopUpMenu.m:388 | |
Details: Need a menu. | |
Function: NSMenuItem *IBPopUpConnectionMenuWithMenuItems(NSArray *, NSMenuItem *, NSEvent *, NSRect, BOOL, NSSet *, CGFloat, NSWindow *, NSColor *, NSColor *, NSColor *, NSColor *, id<IBConnectionPopUpMenuDelegate>) | |
Thread: <NSThread: 0x40030a1e0>{name = (null), num = 1} | |
Hints: None | |
Backtrace: | |
0 0x000000010c77b249 -[IDEAssertionHandler handleFailureInFunction:fileName:lineNumber:messageFormat:arguments:] (in IDEKit) | |
1 0x000000010ba2ec65 _DVTAssertionHandler (in DVTFoundation) |
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
NSImage *iRep = [NSImage imageNamed:[fileName stringByDeletingPathExtension]]; | |
if (iRep) { | |
NSImage *ni = [[NSImage alloc] initByReferencingFile:output]; | |
for (NSImageRep *r in [[iRep representations] copy]) { | |
[iRep removeRepresentation:r]; | |
} | |
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 <Cocoa/Cocoa.h> | |
@interface FMSimpleBlockAnimation : NSAnimation { | |
void (^_animationBlock)(float t); | |
} | |
- (void)animateWithBlock:(void(^)(float t))block; | |
@end |
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 your VPWebExportScript page, you can have this which will do simple replacements: | |
function webExportWillWriteHTMLForItem(contextDictionary, item, fileName, mutableHTMLString) { | |
mutableHTMLString.replaceOccurrencesOfString_withString_options_range_("<p>", "<div>", 0, NSMakeRange(0, mutableHTMLString.length())); | |
mutableHTMLString.replaceOccurrencesOfString_withString_options_range_("</p>", "</div>", 0, NSMakeRange(0, mutableHTMLString.length())); | |
return mutableHTMLString; |
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
/***** GCL Generated File *********************/ | |
/* Automatically generated file, do not edit! */ | |
/**********************************************/ | |
#include <OpenCL/opencl.h> | |
extern void (^seedFill_kernel)(const cl_ndrange *ndrange, cl_uchar4* input, cl_uint4 inputSize, cl_uchar* output, cl_int2 fillCenter, cl_uchar4 targetColor, cl_int tolerance); | |
extern void (^BlendFillImage_kernel)(const cl_ndrange *ndrange, cl_uchar4* baseImage, cl_uchar* mask, cl_uchar4* fillImage, cl_uint2 fillImageSize, cl_uchar4* outputImage, cl_uint elementsPerRow); | |
extern void (^AntiAliasMaskAndBlendFillImage_kernel)(const cl_ndrange *ndrange, cl_uchar4* baseImage, cl_uchar* mask, cl_uchar4* fillImage, cl_uint2 fillImageSize, cl_uchar4* outputImage, cl_uint elementsPerRow); | |
extern void (^AntiAliasMask_kernel)(const cl_ndrange *ndrange, cl_uchar* mask); |
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
/* | |
if ((TSSystemVersion() >= 0x1074) || (TSSystemVersion() < 0x1070)) { | |
// hurray, no stupid CoreImage stack crasher for lots of images being composited together! | |
} | |
*/ | |
SInt32 TSSystemVersion(void) { | |
static dispatch_once_t once; |