Simple visual illustrations of how CGRectDivideWithPadding works.
+-------+---------+------------>
e | | |
d | slice | padding | remainder…
g | | |
e | | |
Simple visual illustrations of how CGRectDivideWithPadding works.
+-------+---------+------------>
e | | |
d | slice | padding | remainder…
g | | |
e | | |
+ (void)pulseView:(UIView *)view completion:(void (^)(void))block { | |
// if you use auto layout, view-based transform go haywire, as they trigger layoutSubviews | |
// consequence is that you have no idea where the view will end up on the screen once animation completes | |
// see this discussion: http://stackoverflow.com/questions/12943107/how-do-i-adjust-the-anchor-point-of-a-calayer-when-auto-layout-is-being-used | |
// thus (per solution 4 from link above), rewriting with CAKeyframeAnimation | |
CAKeyframeAnimation *ka = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; | |
ka.duration = .49; |
#define SR_WEAK(obj) __typeof__(obj) __weak | |
#define SR_WEAK_SELF SR_WEAK(self) | |
// Usage: | |
// SR_WEAK_SELF weakSelf = self; |
// | |
// UIImageView+Webcache_Animation.m | |
// Tubesmix | |
// | |
// Created by Cherif YAYA on 17/03/13. | |
// Copyright (c) 2013 Cherif YAYA. All rights reserved. | |
// | |
#import "UIImageView+Webcache_Animation.h" |
- (IBAction)downloadFile:(id)sender { | |
NSURL *url = [NSURL URLWithString:@"http://www.hulkshare.com/dl/qw30o7x373a8/stan_courtois_&_felly_vs_cutting_crew_-_die_in_your_arms_(x-centrik_mix)_%5B_www.themusix.net_%5D.mp3"]; | |
NSURLRequest *request = [NSURLRequest requestWithURL:url]; | |
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; | |
NSString *fullPath = [NSTemporaryDirectory() stringByAppendingPathComponent:[url lastPathComponent]]; | |
[operation setOutputStream:[NSOutputStream outputStreamToFileAtPath:fullPath append:NO]]; |
// | |
// AppDelegate.m | |
// | |
// | |
// Created by Cory D. Wiles on 10/8/12. | |
// Copyright (c) 2013 Cory D. Wiles. All rights reserved. | |
// | |
#import "AppDelegate.h" | |
#import "iTunes.h" |
// Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved. | |
// Licensed under MIT (http://opensource.org/licenses/MIT) | |
// | |
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit. | |
#import <objc/runtime.h> | |
#import <objc/message.h> |
This should help you get Sendmail installed with basic configuration on Ubuntu.
sudo apt-get install sendmail
/etc/hosts
file: nano /etc/hosts
127.0.0.1 localhost yourhostname
sudo sendmailconfig
sudo service apache2 restart