import Foundation | |
func extractTimeInterval(from string: String) -> TimeInterval? { | |
let formatter = DateFormatter() | |
formatter.dateFormat = "HH:mm:ss,SSS" | |
guard let date = formatter.date(from: string) else { return nil } | |
guard let referenceDate = formatter.date(from: "00:00:00,000") else { return nil } | |
let interval = date.timeIntervalSince(referenceDate) | |
return interval |
stern.de finances their free content with advertisements. In order for us to continue to provide content at our usual level of quality on our website and to continue to continually improve our product, we ask our readers to disable their ad-blockers for stern.de.
In order to provide education on the topic of ad-blockers, stern is launching "BLOCKxit". The campaign is meant to be seen as tongue-in-cheek, but still means to inform about the serious consequences of ad-blocking. Whoever views stern.de using an ad-blocker will be presented with one of four BLOCKxit campaign images. Members of the stern editorship Christian Krug, Uli Jörges and Philipp Jessen as well as author Mickey Beisenherz act as testimonials and tell the stories of how they managed to break free from ad-blocking. Also included are instructions on how to disable ad-blockers for particular websites.
"I'm Uli and I quit blocking." - Uli Jörges, talkshow guest
- (void)addSubview:(UIView *)view { | |
// For the system-supplied reorder control, we want to eliminate the default | |
// image and instead use our own. In order to achieve this, we need to use | |
// the somewhat hacky way of confirming that this is indeed a system-created | |
// UITableViewCellReorderControl by checking the class name. Icky? Icky. | |
NSArray *relevantClassnameParts = @[@"ReorderControl"]; | |
NSString *viewClassname = NSStringFromClass([view class]); | |
for (NSString *classname in relevantClassnameParts) { | |
if (![viewClassname containsString:classname]) { |
#import <Foundation/Foundation.h> | |
int main(int argc, char *argv[]) { | |
NSAutoreleasePool *p = [[NSAutoreleasePool alloc] init]; | |
NSString *foo = @"foo"; | |
NSString *bar = @"bar"; | |
NSString *oldSkool = [NSString stringWithFormat:@"%@ %@", foo, bar]; | |
NSString *original = [NSString stringWithFormat:@"%1$@ %2$@", foo, bar]; |
#import <Foundation/Foundation.h> | |
NSString *const kNotificationName = @"NotificationName"; | |
@interface Foobar : NSObject | |
@end | |
@implementation Foobar | |
- (id)init { | |
self = [super init]; |
Updates page: macappstore://showUpdatesPage?scan=true | |
Featured page: macappstore://itunes.apple.com/ | |
Direct app link (1): macappstore://itunes.apple.com/app/id%@?mt=12 (ex. macappstore://itunes.apple.com/app/id537386512?mt=12) | |
Direct app link (2): macappstore://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=%@&mt=12 (ex. macappstore://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=537386512&mt=12) |
Guten Tag, | |
Amazon.de hat eine wichtige Nachricht zu Ihrer aktuellen Amazon.de-Bestellung | |
Ihre Bestellung enthält diesen Titel: | |
===================================================================== | |
Diablo III | |
www.amazon.de/gp/product/B0041O5LNM | |
===================================================================== |
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { | |
UIImageView *thumbImageView = (UIImageView *)context; | |
if ([keyPath isEqualToString:kARPageScrubberViewKeypathFrame]) { | |
self.bubbleView.pageNumber = self.pageIndex + 1; | |
CGRect bubbleViewFrame = self.bubbleView.frame; | |
bubbleViewFrame.origin.x = thumbImageView.frame.origin.x - round(bubbleViewFrame.size.width / 2) + _slider.frame.origin.x + round(thumbImageView.frame.size.width / 2); | |
bubbleViewFrame.origin.y = thumbImageView.frame.origin.y - bubbleViewFrame.size.height; | |
self.bubbleView.frame = bubbleViewFrame; | |
if (self.bubbleView.hidden && _slider.tracking) { |
- (void)show:(BOOL)animated { | |
self.alpha = 0.0f; | |
self.hidden = NO; | |
if (animated) { | |
[UIView beginAnimations:nil context:nil]; | |
} | |
self.alpha = 1.0f; | |