Skip to content

Instantly share code, notes, and snippets.

View searls's full-sized avatar
💚

Justin Searls searls

💚
View GitHub Profile
10/26/09 7:21:58 PM Xcode[19072] Warning: Couldn't discover the 'clang' compiler's built-in search paths and preprocessor definitions for language dialect 'objective-c'. This may lead to indexing issues.
Compiler: /Developer/usr/bin/clang
Reason: clang version 1.0.1 (http://llvm.org/svn/llvm-project/cfe/tags/Apple/clang-24 exported)
Target: x86_64-apple-darwin10
clang: warning: not using the clang compiler for the 'armv6' architecture
clang: warning: argument unused during compilation: '-c'
"/Developer/usr/bin/gcc" -v -dM -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk -E -arch armv6 -o - -x objective-c /dev/null
gcc-4.2: error trying to exec '/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1': execvp: No such file or directory
@implementation NSNotificationCenter(TXNotificationCenter)
+ (void)registerAction:(SEL)action forName:(NSString*)name {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:action
name:name
object:nil];
}
#import <Foundation/Foundation.h>
@interface UIView(TXView)
- (void)removeAllSubviews;
@end
-----------------------------------------------------------------------------------
Text Editing Previous Word ?? Editing Text
Text Editing To Lower Case ??Y Editing Text
Edit Previous Sibling ??? Editing in Structured Text Editors
Database Tools Edit in SQL Query Builder... ?Q Editing SQL
Edit Quick Diff Toggle ??Q Editing Text
Focused UI Make Landmark ???? In Windows
Refactor - Java Rename - Refactoring ??R In Windows
File Save ?S In Windows
Edit Move ??V Editing JSP Source
Source Format ??F Editing Java Source
@searls
searls / iPhone OS: Evaluation Order differs from Simulator to Device.m
Created March 19, 2010 16:57
Looks like the simulator and device evaluate parameters in a different order
NSUInteger uid = 0;
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
[dictionary setObject:[NSNumber numberWithInt:uid++] forKey:[NSNumber numberWithInt:uid]];
NSNumber *result = [dictionary objectForKey:[NSNumber numberWithInt:1]];
NSLog(@"Result: %@",result);
//device: 2010-03-19 12:51:31.938 Sandbox[568:207] Result: 0
//simulator: 2010-03-19 12:50:24.281 Sandbox[6594:207] Result: (null)
uid = 0;
dictionary = [NSMutableDictionary dictionary];
function Ninja(weaponOfChoice) {
this.weaponOfChoice = weaponOfChoice;
};
var michelangelo = new Ninja('nanchaku');
Give me kids get home work help 2 adults looking for jobs. But if we should 4 and keep it going. This much parking lot, Bruce. Bye. For all of us, paid for by community for the library dot necktie Treasurer.
package searls.dougu.examples;
import static org.mockito.Mockito.*;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
package searls.dougu.examples;
public class Wallet {
private int dollarCount;
public void insertDollars(int numberOfDollars) {
for(int i=0;i<numberOfDollars;i++) {
putADollarInThatWallet(true);
}
package searls.dougu.examples;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import static org.powermock.api.mockito.PowerMockito.*;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;