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
#import "LWViewController.h" | |
@interface LWViewController () | |
@property (nonatomic, retain) UIView *outerSubview; | |
@property (nonatomic, retain) UIView *innerSubview; | |
@end | |
@implementation LWViewController |
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
[alias] | |
intern-me-coffee = bisect |
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
// Started here | |
class Reader : NSObject {} | |
class PDFReader_Shared : Reader {} | |
class PDFReader_iPad : PDFReader_Shared {} | |
class PDFReader_iPhone : PDFReader_Shared {} | |
class TextReader_Shared : Reader {} | |
class TextReader_iPad : TextReader_Shared {} | |
class TextReader_iPhone : TextReader_Shared {} |
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
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <dirent.h> | |
int main(int argc, char** argv) { | |
DIR *d = opendir("."); | |
struct dirent *entry = NULL; |
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
Instead of ARC: | |
Add scoperelease in addition to release and autorelease. | |
Think of it like scoped_ptr in C++ or more generally how deconstructors | |
get called for stack allocated objects (end of scope). | |
- (id)someMethod:(NSInteger)n { | |
MyObject *o = [[[MyObject alloc] init] scoperelease]; |
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
import sys | |
def foo(n): | |
a = "Hello" | |
b = "bob" | |
c = 1 / n | |
return a + " " + b |
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
/* | |
See screenshot: http://cl.ly/1v1H0Q1z0Z3R0z3X1R25 | |
*/ | |
- (void)loadView { | |
self.view = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; | |
CGFloat width = self.view.frame.size.width; | |
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 Evan Long | |
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
Copyright (C) <year> <copyright holders> | |
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: | |
The above copyright notice and this permission notice shall be included in all |
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
0 libsystem_kernel.dylib mach_msg_trap (in libsystem_kernel.dylib) + 20 | |
1 libsystem_kernel.dylib mach_msg (in libsystem_kernel.dylib) + 50 | |
2 libxpc.dylib _xpc_connection_check_in (in libxpc.dylib) + 152 | |
3 libxpc.dylib _xpc_connection_init (in libxpc.dylib) + 1032 | |
4 libxpc.dylib _xpc_connection_wakeup2 (in libxpc.dylib) + 774 | |
5 libxpc.dylib _xpc_connection_wakeup (in libxpc.dylib) + 62 | |
6 libxpc.dylib _xpc_connection_send_registration (in libxpc.dylib) + 24 | |
#If you are reading this... reboot your iOS device. Your problems will probably go away. |