Skip to content

Instantly share code, notes, and snippets.

- (void) deleteAllObjects: (NSString *) entityDescription {
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSManagedObjectContext *managedObjectContext = [self backgroundManagedObjectContext];
NSEntityDescription *entity = [NSEntityDescription entityForName:entityDescription inManagedObjectContext:managedObjectContext];
[fetchRequest setEntity:entity];
NSError *error;
NSArray *items = [managedObjectContext executeFetchRequest:fetchRequest error:&error];
- (IBAction) createV1ViewANDperformTransition {
[self createV1View];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, .25 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void){
[self performTransition];
});
}
Uri path=Uri.parse("android.resource://" + getActivity().getApplicationContext().getPackageName() + "/" + R.drawable.ticket_image_temp);
Intent sendIntent2 = new Intent(Intent.ACTION_SEND);
sendIntent2.setClassName("com.android.mms", "com.android.mms.ui.ComposeMessageActivity");
sendIntent2.putExtra("sms_body", "some text");
sendIntent2.putExtra(Intent.EXTRA_STREAM, path);
sendIntent2.setType("image/png");
startActivity(sendIntent2);
diff --git a/bin/console.sh b/bin/console.sh
index 72a45ca..0730e0f 100755
--- a/bin/console.sh
+++ b/bin/console.sh
@@ -3,24 +3,10 @@
# Copyright (c) 1999-2010 Luca Garulli
#
-# resolve links - $0 may be a softlink
-PRG="$0"
//problem:
[queryA findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
doThingWithAObjects;
}];
[queryB findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
doThingWithBObjectsThatNeedsToHappenAfterAIsDone;
}];
http://sourceforge.net/projects/dfu-programmer/files/
real server: Looking for the latest version? Download 0.6.2 tarball (134.9 kB)
script: <span>Download 0.6.1 tarball (134.4 kB)</span>
diff -r 70274d53c1dd -r 56ac083c60dc Doc/library/debug.rst
--- a/Doc/library/debug.rst Mon Apr 09 19:04:04 2012 -0400
+++ b/Doc/library/debug.rst Tue Jul 03 03:19:10 2012 +0200
@@ -14,4 +14,5 @@
profile.rst
hotshot.rst
timeit.rst
- trace.rst
\ No newline at end of file
+ trace.rst
+ (ZCDataStore *)sharedStore
{
static ZCDataStore *shared = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
shared = [[super allocWithZone:nil] init];
});
return shared;
}
- (void) deleteAllObjects: (NSString *) entityDescription {
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:entityDescription inManagedObjectContext:context];
[fetchRequest setEntity:entity];
NSError *error;
NSArray *items = [context executeFetchRequest:fetchRequest error:&error];
for (NSManagedObject *managedObject in items) {
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
//NSLog(@"textfield hit: %@", textField.placeholder);
if (string.length == 0) {
return YES;
}