Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.
In XCode's Preferences > Downloads you can install command line tools.
Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.
In XCode's Preferences > Downloads you can install command line tools.
This article originally appeared in Details Magazine some time around 1994 or 1995, I believe. This is a great essay by Henry Rollins on the benefits and lessons of lifting weights. | |
================================================= | |
I believe that the definition of definition is reinvention. To not be like your parents. To not be like your friends. To be yourself. | |
Completely. | |
When I was young I had no sense of myself. All I was, was a product of all the fear and humiliation I suffered. Fear of my parents. The humiliation of teachers calling me "garbage can" and telling me I'd be mowing lawns for a living. And the very real terror of my fellow students. I was threatened and beaten up for the color of my skin and my size. I was skinny and clumsy, and when others would tease me I didn't run home crying, wondering why. |
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; | |
[formatter setNumberStyle:NSNumberFormatterDecimalStyle]; | |
NSLog(@"formatted: %@", [formatter stringFromNumber:[NSNumber numberWithInt:1234567]]); |
(1 to 100) map { x => | |
(x % 3, x % 5) match { | |
case (0, 0) => ”FizzBuzz” | |
case (0, _) => “Fizz” | |
case (_, 0) => “Buzz” | |
case _ => x.toString | |
} | |
} foreach println |
/* | |
* Finder.h | |
*/ | |
#import <AppKit/AppKit.h> | |
#import <ScriptingBridge/ScriptingBridge.h> | |
@class FinderApplication, FinderItem, FinderContainer, FinderComputerObject, FinderDisk, FinderFolder, FinderDesktopObject, FinderTrashObject, FinderFile, FinderAliasFile, FinderApplicationFile, FinderDocumentFile, FinderInternetLocationFile, FinderClipping, FinderPackage, FinderWindow, FinderFinderWindow, FinderDesktopWindow, FinderInformationWindow, FinderPreferencesWindow, FinderClippingWindow, FinderProcess, FinderApplicationProcess, FinderDeskAccessoryProcess, FinderPreferences, FinderLabel, FinderIconFamily, FinderIconViewOptions, FinderColumnViewOptions, FinderListViewOptions, FinderColumn, FinderAliasList; |
// From http://stackoverflow.com/questions/1074320/remove-uiwebview-shadow | |
- (void) removeShadowForWebView:(UIWebView*)webV | |
{ | |
// remove the shadow | |
if ([[webV subviews] count] > 0) | |
{ | |
for (UIView* shadowView in [[[webV subviews] objectAtIndex:0] subviews]) | |
{ | |
if ([shadowView isKindOfClass:[UIImageView class]]) { | |
[shadowView setHidden:YES]; |
void printfTreeLevelOfView(UIView *view, int maxLevel) | |
{ | |
UIView *tempView; | |
NSArray *subViews = [view subviews]; | |
static int level = 0; | |
level++; | |
for(tempView in subViews) | |
{ | |
if ( level <= maxLevel) { | |
for (int i = 0; i < level; i++) |
//"modern Objective-C" syntax | |
//new enum-macros for better autocompletion, switch statement, more precise warnings, ... | |
typedef NS_ENUM(NSInteger, MyViewContentMode) { | |
MyViewContentModeLeft, | |
MyViewContentModeRight, | |
MyViewContentModeTopLeft, | |
MyViewContentModeTopRight, |
- (void)_updateResults:(void (^)(void))block caller:(dispatch_queue_t)callerqueue | |
{ | |
__unsafe_unretained NUData* wself = self; | |
dispatch_sync(_serial_results_queue, ^{ | |
NSManagedObjectContext* ctx = updateContext; | |
__block NSArray* results = nil; | |
[ctx performBlockAndWait:^{ |
#define OC(str) [NSString stringWithCString:(str) encoding:NSUTF8StringEncoding] | |
#ifdef DEBUG | |
# define LOG(fmt, ...) do { \ | |
NSString* file = [[NSString alloc] initWithFormat:@"%s", __FILE__]; \ | |
NSLog((@"%@(%d) " fmt), [file lastPathComponent], __LINE__, ##__VA_ARGS__); \ | |
[file release]; \ | |
} while(0) | |
# define LOG_METHOD NSLog(@"%s", __func__) | |
# define LOG_CMETHOD NSLog(@"%@/%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)) |