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
<?php | |
require_once 'Zend/Service/Twitter.php'; | |
class CW_Twitter extends Zend_Service_Twitter { | |
public function __construct($username, $password) { | |
parent::__construct($username, $password); | |
} | |
public function getOtherUserFriends($name) { |
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
- (void)viewWillAppear:(BOOL)animated { | |
[super viewWillAppear:animated]; | |
self.navigationItem.title = @"Back"; | |
[self.navigationItem setHidesBackButton:YES animated:NO]; | |
[self.navigationController.navigationBar setNeedsDisplay]; | |
} |
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
// | |
// CWCustomAccessoryView.h | |
// CustomAccessory | |
// | |
// Created by Cory Wiles on 10/8/10. | |
// Copyright (c) 2010 __MyCompanyName__. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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
- (void)fixupAdView:(UIInterfaceOrientation)toInterfaceOrientation { | |
if (adBannerView != nil) { | |
[super configureIAdContentSizes]; | |
[UIView beginAnimations:@"fixupViews" context:nil]; | |
CGFloat toolbarHeight = self.toolbar.frame.size.height; | |
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
- (BOOL)isEqual:(id)other { | |
if (other == self) | |
return YES; | |
if (!other || ![other isKindOfClass:[self class]]) | |
return NO; | |
return [self isEqualToWidget:other]; | |
} | |
- (BOOL)isEqualToWidget:(MyWidget *)aWidget { | |
if (self == aWidget) |
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
/** | |
* properties are (int) numberOfViews, (int) secondsForRotation, (MyCustomObject) myCustomObject | |
*/ | |
- (BOOL)isEqualToCustomWidget:(CustomWidget *)aCustomWidget { | |
if (self == aCustomWidget) | |
return YES; | |
if (numberOfViews != [aCustomWidget numberOfViews]) |
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
/** | |
* Assume that first name is the first instance of characters before the first | |
* " ". Everything else will be considered the last name. | |
*/ | |
NSArray *nameSplitArray = [self.employee.name componentsSeparatedByString:@" "]; | |
NSMutableArray *nameSplitMutableArray = [nameSplitArray mutableCopy]; | |
[nameSplitMutableArray removeObjectAtIndex:0]; | |
// set the first and last name properties |
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
// Parent UIViewControlller | |
- (void)viewWillAppear:(BOOL)animated { | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(refreshSearchBarControllerWithDepartmentCode:) | |
name:@"DepartmentCodeNotification" | |
object:nil]; | |
[super viewWillAppear:animated]; |
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
<?php | |
$dir = "."; | |
if (is_dir($dir)) { | |
if ($dh = opendir($dir)) { | |
while (($file = readdir($dh)) !== false) { | |
echo "filename: $file : filetype: " . filetype($dir . $file) . "\n"; | |
} | |
closedir($dh); | |
} |
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
<?php | |
$d = dir("."); | |
echo "Handle: " . $d->handle . "\n"; | |
echo "Path: " . $d->path . "\n"; | |
while (false !== ($entry = $d->read())) { | |
echo $entry."\n"; | |
} | |
$d->close(); | |
?> |