Skip to content

Instantly share code, notes, and snippets.

@jakemoore
jakemoore / delete_comps
Created September 6, 2011 18:27
delete components trigger
CREATE TRIGGER "items_delete" AFTER DELETE ON Tables.ITEMS
BEGIN
DELETE FROM Tables.COMPONENTS WHERE Components.ITEM_ID = old._ID;
END;
@jakemoore
jakemoore / errors
Created October 5, 2011 22:03
erros
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_OAConsumer", referenced from:
objc-class-ref in SA_OAuthTwitterEngine.o
"_OBJC_CLASS_$_OAToken", referenced from:
objc-class-ref in SA_OAuthTwitterEngine.o
"_OBJC_CLASS_$_OAMutableURLRequest", referenced from:
objc-class-ref in SA_OAuthTwitterEngine.o
"_OBJC_CLASS_$_OARequestParameter", referenced from:
objc-class-ref in SA_OAuthTwitterEngine.o
"_OBJC_CLASS_$_OADataFetcher", referenced from:
<ImageView
android:layout_width="2px"
android:layout_height="fill_parent"
android:background="@color/title_separator" />
private class SaveSnapshotTask extends AsyncTask<Void, Void, File> {
@Override
protected void onPreExecute() {
View progress = findViewById(R.id.progress);
progress.setVisibility(View.VISIBLE);
}
@Override
protected File doInBackground(Void... ignore) {
File pictureFile = getOutputMediaFile();
dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// Code to run asynchronously
dispatch_async( dispatch_get_main_queue(), ^{
// Code to run on main thread
});
});
- (UITableViewCell *)tableView:(UITableView *)tblView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *Identifier = @"RentalCellView";
UITableViewCell *cell = [tblView dequeueReusableCellWithIdentifier:Identifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"RentalCellView" owner:self options:nil];
UIButton *button;
button = (UIButton *)[self.tvCell viewWithTag:4];
button.hidden = NO;
- (UIImage *)imageForView:(UIImageView *)imageView atRow:(int)row inTabelView:(UITableView *)tableView
{
int type = TYPE_FIRST;
if (tableView == self.secondInspectionsTV) type = TYPE_SECOND;
__block UIImage *image = nil;
if (type == TYPE_FIRST) image = [self.firstImages objectForKey:[NSNumber numberWithInt:row]];
else image = [self.secondImages objectForKey:[NSNumber numberWithInt:row]];
if (image != nil) return image;
Ld "build/Debug-iphonesimulator/Paper'd.app/Paper'd" normal i386
cd /Users/Jake/Work/Xhatch/GitRepos/Paperd
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/Jake/Work/Xhatch/GitRepos/Paperd/build/Debug-iphonesimulator -L/Users/Jake/Work/Xhatch/GitRepos/Paperd/Paperd/CrittercismSDK -L/Users/Jake/Work/Xhatch/GitRepos/Paperd/TestFlightSDK0.8.2 -F/Users/Jake/Work/Xhatch/GitRepos/Paperd/build/Debug-iphonesimulator -F/Users/Jake/Work/Xhatch/GitRepos/Paperd -filelist "/Users/Jake/Work/Xhatch/GitRepos/Paperd/build/Paperd.build/Debug-iphonesimulator/Paperd.build/Objects-normal/i386/Paper'd.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -all_load -Xlinker -no_implicit_dylib
- (void) show
{
[[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode beforeDate:[NSDate date]];
TSAlertViewController* avc = [[[TSAlertViewController alloc] init] autorelease];
avc.view.backgroundColor = [UIColor clearColor];
// $important - the window is released only when the user clicks an alert view button
TSAlertOverlayWindow* ow = [[TSAlertOverlayWindow alloc] initWithFrame: [UIScreen mainScreen].bounds];
ow.alpha = 0.0;
self.didDownload = [[NSMutableArray alloc] initWithCapacity:[self.wallpapers count]];
for (int i = 0; i < [self.wallpapers count]; i++) {
NSMutableArray *didDownloadPage = [[NSMutableArray alloc] initWithCapacity:2];
[didDownloadPage insertObject:[NSNumber numberWithBool:NO] atIndex:IMG_TYPE_HOME];
[didDownloadPage insertObject:[NSNumber numberWithBool:NO] atIndex:IMG_TYPE_LOCK];
[self.didDownload insertObject:didDownloadPage atIndex:i];
}