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
| Win+Home: Clear all but the active window.P | |
| Win+Space: All windows become transparent so you can see through to the desktop.P | |
| Win+Up arrow: Maximize the active window.P | |
| Shift+Win+Up arrow: Maximize the active window vertically.P | |
| Win+Down arrow: Minimize the window/Restore the window if it's maximized.P | |
| Win+Left/Right arrows: Dock the window to each side of the monitor.P | |
| Shift+Win+Left/Right arrows: Move the window to the monitor on the left or right.P | |
| You can also interact with windows by dragging them with the mouse:P | |
| Drag window to the top: MaximizeP |
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
| Trace.Listeners.Add(new TextWriterTraceListener(@"c:\tmp\tracelog.txt")); | |
| Trace.AutoFlush = true; | |
| Trace.Indent(); | |
| Trace.WriteLine("Entering Main"); | |
| Console.WriteLine("Hello world"); | |
| Trace.Unindent(); |
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
| @interface ViewController : UIViewController <UINavigationControllerDelegate, UIImagePickerControllerDelegate>{ | |
| NSMutableArray* _capturedImages; | |
| } | |
| @property(nonatomic, retain)NSMutableArray* capturedImages; | |
| @end | |
| UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; |
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
| UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"My Alert" | |
| message:@"This is an alert." | |
| preferredStyle:UIAlertControllerStyleAlert]; | |
| UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault | |
| handler:^(UIAlertAction * action) { | |
| NSLog(@"this is my action"); | |
| }]; | |
| [alert addAction:defaultAction]; |
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
| // 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 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
| NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
| NSString *documentsDirectory = [paths objectAtIndex:0]; | |
| NSString *path = [documentsDirectory stringByAppendingPathComponent:@"logfile.txt"]; | |
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
| NSData* responseData = [[NSData alloc]init]; | |
| // path to document directory | |
| NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
| NSString *documentsDirectory = [paths objectAtIndex:0]; | |
| NSString *path = [documentsDirectory stringByAppendingPathComponent:@"myfile.svg"]; | |
| // write responseData to myfile.svg |
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
| NSApplicationDirectory = 1, // supported applications (Applications) | |
| NSDemoApplicationDirectory, // unsupported applications, demonstration versions (Demos) | |
| NSDeveloperApplicationDirectory, // developer applications (Developer/Applications). DEPRECATED - there is no one single Developer directory. | |
| NSAdminApplicationDirectory, // system and network administration applications (Administration) | |
| NSLibraryDirectory, // various documentation, support, and configuration files, resources (Library) | |
| NSDeveloperDirectory, // developer resources (Developer) DEPRECATED - there is no one single Developer directory. | |
| NSUserDirectory, // user home directories (Users) | |
| NSDocumentationDirectory, // documentation (Documentation) | |
| NSDocumentDirectory, // documents (Documents) |
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
| NSString* fullPathFile = [self.appdelegate.encryptThumbPath stringByAppendingPathComponent:@"file.txt"]; | |
| NSData* nsData = [[NSFileManager defaultManager] contentsAtPath:fullPathFile]; |
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
| NSMutableArray* groups; | |
| ALAssetsLibraryGroupsEnumerationResultsBlock listGroupBlock = ^(ALAssetsGroup *group, BOOL* stop){ | |
| if(group){ | |
| [groups addObject:group]; | |
| }else{ | |
| [self.tableView performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:NO]; | |
| } | |
| }; | |
OlderNewer