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
- (NSInteger)wordCount | |
{ | |
NSInteger length = [self length]; | |
NSRange inputRange = NSMakeRange( 0, length ); | |
NSInteger count = 0; | |
while( YES ) | |
{ | |
NSRange range = [self rangeOfCharacterFromSet:[NSCharacterSet whitespaceCharacterSet] | |
options:NSCaseInsensitiveSearch | |
range:inputRange]; |
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
/* | |
Copyright (c) 2011 Curtis Hard - GeekyGoodness | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
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
// | |
// NSReadability.m | |
// Caffeinated | |
// | |
// Created by Curtis Hard on 19/08/2011. | |
// Copyright 2011 GeekyGoodness. All rights reserved. | |
// | |
#import "GGReadability.h" |
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( [bottomButtons count] != 0 ) | |
{ | |
NSMutableArray * newArray = [[[NSMutableArray alloc] init] autorelease]; | |
for( NSInteger i = [bottomButtons count] - 1; i >= 0; i-- ) | |
{ | |
[newArray addObject:[bottomButtons objectAtIndex:i]]; | |
} | |
float startY = 0.0 + ( CAFF_POPUP_SHADOW_PADDING + CAFF_POPUP_PADDING + CAFF_POPUP_ARROW_HEIGHT ); | |
float startX = 0.0 + ( CAFF_POPUP_SHADOW_PADDING + CAFF_POPUP_PADDING + CAFF_POPUP_ARROW_HEIGHT ); |
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)refreshFavicons:(NSArray *)subscriptions | |
force:(BOOL)flag | |
{ | |
LOGGED_IN | |
for( GDataSubscription * subscription in subscriptions ) | |
{ | |
if( ! flag && [[self delegate] respondsToSelector:@selector(gDataController:checkFaviconExistanceForSubscription:)] ) | |
{ | |
if( [[self delegate] gDataController:self |
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 NSAnimationContextRunAnimationBlock( dispatch_block_t group, dispatch_block_t completionHandler, NSTimeInterval time ) | |
{ | |
[NSAnimationContext runAnimationBlock:group | |
completionHandler:completionHandler | |
duration:time]; | |
} | |
+ (void)runAnimationBlock:(dispatch_block_t)group | |
completionHandler:(dispatch_block_t)completionHandler | |
duration:(NSTimeInterval)time |
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
<?php | |
class lib_coredata_predicate extends lib_coredata_properties | |
{ | |
/** | |
* | |
*/ | |
const LIB_COREDATA_FILLER_ATTRIBUTE = '%@'; |
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->set_request( lib_coredata_request::factory( lib_coredata_entity::factory( 'news' ) ) | |
->set_predicate( new lib_coredata_predicate( 'status=%d', 5 ) ) ); |
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
// | |
// GDataController.m | |
// Caffeinated | |
// | |
// Created by Curtis Hard on 03/11/2010. | |
// Copyright (c) 2010 GeekyGoodness. All rights reserved. | |
// | |
#import "GDataController.h" |
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
+ (UniChar)characterForVirtualKeyCode:(NSInteger)keyCode | |
{ | |
/************** | |
THIS REQUIRES THE CARBON FRAMEWORK! | |
***************/ | |
UInt32 deadKeyState = 0; | |
UniCharCount actualCount = 0; | |
UniChar baseChar; | |
TISInputSourceRef sourceRef = TISCopyCurrentKeyboardLayoutInputSource(); | |
CFDataRef keyLayoutPtr = (CFDataRef)TISGetInputSourceProperty( sourceRef, kTISPropertyUnicodeKeyLayoutData ); |
OlderNewer