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
enum CountdownType: Int { case ToTheSecond, ToTheDay } | |
enum ColorScheme: Int { case AfterMidnight, ClassyYellow, Tealfish } | |
class Concern { | |
var title: String = "" | |
func title(aTitle: String?) -> Concern { title = aTitle ?? ""; return self } | |
var subtitle = "" | |
func subtitle(aSubtitle: String?) -> Concern { subtitle = aSubtitle ?? ""; return self } |
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
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
require 'optparse' | |
class File | |
def self.binary?(name) | |
fstat = stat(name) | |
return false unless fstat.file? |
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
user www; | |
worker_processes 4; | |
error_log logs/error.log; | |
pid temp/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { |
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
(CGRect){ .size = size, .origin = CGPointMake(31, 257)} |
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
<a href="http://bit.ly/AmayLx"> http://bit.ly/AmayLx</a> |
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
tell application "iPhone Simulator" | |
activate | |
end tell | |
tell application "System Events" | |
tell process "iPhone Simulator" | |
tell menu bar 1 | |
tell menu bar item "iOS Simulator" | |
tell menu "iOS Simulator" | |
click menu item "Reset Content and Settings…" |
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
There is no right answer, just want to get an idea how you would attack the problem. | |
You have a UITableView that displays images from a web service, you want to make sure it loads those images in a performant, memory conscious way, how would you do it? |
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) viewDidLoad { | |
[super viewDidLoad]; | |
self.airplaneModeSwitch = [[[UISwitch alloc] initWithFrame:CGRectZero] autorelease]; | |
[self addSection:^(JMStaticContentTableViewSection *section, NSUInteger sectionIndex) { | |
[section addCell:^(JMStaticContentTableViewCell *staticContentCell, UITableViewCell *cell, NSIndexPath *indexPath) { | |
staticContentCell.reuseIdentifier = @"UIControlCell"; | |
cell.selectionStyle = UITableViewCellSelectionStyleNone; |
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
- (id) init { | |
self = [super init]; | |
if(!self) return nil; | |
self.someProperty = 123; | |
return self; | |
} |
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
//Author: https://github.com/TouchCode | |
//Code File: https://github.com/TouchCode/TouchUI/blob/master/Source/Views/CBetterAlertView.m | |
#import <UIKit/UIKit.h> | |
@interface CBetterAlertView : UIAlertView { | |
id userInfo; | |
} | |
@property (readwrite, nonatomic, retain) id userInfo; |
NewerOlder