Skip to content

Instantly share code, notes, and snippets.

- (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
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 );
/*
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:
//
// NSReadability.m
// Caffeinated
//
// Created by Curtis Hard on 19/08/2011.
// Copyright 2011 GeekyGoodness. All rights reserved.
//
#import "GGReadability.h"
@curthard89
curthard89 / gist:1183218
Created August 31, 2011 10:02
Word Count for NSString
- (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];