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
| // These classese should be treated as immutable | |
| @interface MWAttributedString : NSObject <NSCoding> | |
| - (id)initWithAttributedString:(NSAttributedString *)string; | |
| - (NSAttributedString *)attributedString; | |
| @end |
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
| From a past Bath CS exam paper, thanks James Potter! | |
| Scotland declares independence, secures an opt-out from the EU directive, | |
| and makes "sales of drugs into Scotland" illegal. | |
| This worries the Boss, who enjoys grouse-shooting in Scotland, | |
| so he orders you to detect all IP connections to the "Drugs'R'Us" web site from Scotland. | |
| Fortunately, the Scottish Parliament has also passed a law saying that all computers in Scotland | |
| must either be in the new .hg (for Haggisland) domain, or at least contain hg in their domain name. | |
| Write a memorandum to the Boss explaining what you can and cannot do, and what change to the clause | |
| quoted above of the Scottish drugs law would make his grouse-shooting safer. |
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
| <form> | |
| Username: <input type=text name=username value=<?php echo htmlspecialchars($_GET['name'], ENT_QUOTES, 'UTF-8'); ?> /> | |
| </form> |
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 Person : NSObject | |
| @property (nonatomic, copy) NSString *name; | |
| @end |
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
| #ifndef MAYBE | |
| #define MAYBE (BOOL)2 | |
| #endif |
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
| - (void)setAttributedString:(CFAttributedStringRef)attributedString | |
| { | |
| __block MWMutableFrame *blockSelf = self; | |
| dispatch_barrier_sync(_lockQueue, ^{ | |
| if (_attributedString == attributedString) return; | |
| if (_attributedString) | |
| { | |
| CFRelease(_attributedString); |
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
| CTFontRef CreateBoldFont(CTFontRef iFont, Boolean iMakeBold) | |
| { | |
| CTFontSymbolicTraits desiredTrait = 0; | |
| CTFontSymbolicTraits traitMask; | |
| if (iMakeBold) | |
| desiredTrait = kCTFontBoldTrait; | |
| traitMask = kCTFontBoldTrait; | |
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
| /* | |
| File: PhotoViewController.h | |
| Abstract: Configures and displays the paging scroll view and handles tiling and page configuration. | |
| Version: 1.1 | |
| Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple | |
| Inc. ("Apple") in consideration of your agreement to the following | |
| terms, and your use, installation, modification or redistribution of | |
| this Apple software constitutes acceptance of these terms. If you do | |
| not agree with these terms, please do not use, install, modify or |
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
| CGContextSaveGState(context); | |
| { | |
| // Something something | |
| } | |
| CGContextRestoreGState(context); |
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
| self.ak = [AKViewController aurasmaViewControllerWithDelegate:self]; | |
| ak.delayGuide = YES; | |
| [self presentModalViewController:ak animated:NO]; | |
| [ak presentOverlayViewController:[[MWTestOverlayVC alloc] initWithNibName:nil bundle:nil] | |
| animated:NO]; |