- Turn MF8300C on, press the Scan button on the console, and select Remote Scanner from the menu
- Start Preview.app
- Choose File -> Import from Scanner -> Canon MF8300C Series
- Put page(s) on scanner face up.
- Click the Scan button in the Import from Canon MF8300C dialog.
- Pages will appear in a new Preview document
- Select all pages
- File -> Export as PDF...
This file contains 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 <Foundation/Foundation.h> | |
@interface NSJSONSerialization (KDJJSONFiles) | |
// Returns a Foundation object from JSON data in given file | |
+ (id)kdj_JSONObjectWithFileAtPath:(NSString *)path options:(NSJSONReadingOptions)options error:(NSError **)error; | |
// Write JSON object to file at specified path | |
// | |
// Returns number of bytes written to the file, or 0 if an error occurs |
This file contains 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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
NSDictionary *env = [[NSProcessInfo processInfo] environment]; | |
// This environment variable is set by the scheme when the app is being launched for unit testing | |
if (env[@"KDJ_IsRunningUnitTests"] != nil) { | |
// Show "Running Unit Tests" view when running tests, rather than initializing the app | |
self.window.rootViewController = [[KDJUnitTestViewController alloc] init]; | |
[self.window makeKeyAndVisible]; |
This file contains 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
// %filltext:name=ClassName:default=ManagedObject%+Operations.h | |
// (for entity %filltext:name=EntityName:default=Entity%) | |
#import "%filltext:name=ClassName:default=ManagedObject%.h" | |
// Category of operations on %filltext:name=ClassName:default=ManagedObject% that are not automatically generated. | |
// | |
// Defining these operations in a category lets us re-generate %filltext:name=ClassName:default=ManagedObject%.h and | |
// %filltext:name=ClassName:default=ManagedObject%.m whenever the schema changes. | |
@interface %filltext:name=ClassName:default=ManagedObject% (Operations) |
This file contains 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
dispatch_semaphore_t asyncComplete = dispatch_semaphore_create(0); | |
// TODO: Replace this with asynchronous code. Call dispatch_semaphore_signal(asyncComplete) on completion | |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ | |
dispatch_semaphore_signal(asyncComplete); | |
}); | |
// Wait for completion or timeout | |
NSDate *timeoutDate = [NSDate dateWithTimeIntervalSinceNow:<#timeoutSeconds#>]; | |
while (dispatch_semaphore_wait(asyncComplete, DISPATCH_TIME_NOW) && ([[NSDate date] timeIntervalSinceDate:timeoutDate] < 0)) { |
This file contains 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
@interface KDJCoreDataUsingThing () | |
// Private-queue context used to modify persistent store | |
@property (nonatomic) NSManagedObjectContext *privateContext; | |
// Main-queue context used by user interface | |
@property (nonatomic) NSManagedObjectContext *mainQueueContext; | |
@end |
This file contains 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
- (NSString *)appVersionString { | |
NSDictionary *info = [[NSBundle mainBundle] infoDictionary]; | |
NSString *shortVersionString = info[@"CFBundleShortVersionString"]; | |
NSString *bundleVersion = info[@"CFBundleVersion"]; | |
return [NSString stringWithFormat:NSLocalizedString(@"Version %@ (%@)", nil), | |
shortVersionString, bundleVersion]; | |
} |
This file contains 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 <CoreData/CoreData.h> | |
@interface NSManagedObjectContext (KDJExistingObjects) | |
// Returns objects with specified object IDs. Returns nil if any of the objects cannot be fetched or do not exist. | |
- (NSArray *)kdj_existingObjectsWithIDs:(NSArray *)objectIDArray error:(NSError **)error; | |
@end |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
package net.kristopherjohnson.util; | |
import android.util.Log; | |
/** | |
* Static utility methods related to logging, using the android.util.Log class. | |
* | |
* All application classes should use the methods of this class rather than using | |
* android.util.Log directly, to allow application-level customization of the logging mechanism. | |
*/ |
OlderNewer