duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
-- HOWTO: | |
-- after saving it, open with Script Editor (default) and run it | |
-- PREREQUISITES: | |
-- make sure your Keynote presentation is open in the background | |
-- AFTER EXPORT: | |
-- if you can't open the file due to encoding errors, open with Sublime (or another a text editor) and then "File / Save with encoding / UTF8" | |
tell application "Keynote" |
UIFont.familyNames.forEach({ familyName in | |
let fontNames = UIFont.fontNames(forFamilyName: familyName) | |
print(familyName, fontNames) | |
}) |
extension UIImage { | |
/** | |
Create gradient image from beginColor on top and end color at bottom | |
- parameter beginColor: beginColor | |
- parameter endColor: endColor | |
- parameter frame: frame to be filled | |
- returns: filled image | |
*/ |
# Copyright 1999-2011 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
# | |
# /etc/screenrc | |
# | |
# This is the system wide screenrc. | |
# | |
# You can use this file to change the default behavior of screen system wide | |
# or copy it to ~/.screenrc and use it as a starting point for your own | |
# settings. |
find . -type f -name "*.swift" -not -path "./Pods/*" -exec sed -i '' -e '1,/^import/{/^\/\/.*/d;}' -e '/./,$!d' {} \; |
extension UIView { | |
func shake(duration: CFTimeInterval) { | |
let translation = CAKeyframeAnimation(keyPath: "transform.translation.x"); | |
translation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear) | |
translation.values = [-5, 5, -5, 5, -3, 3, -2, 2, 0] | |
let rotation = CAKeyframeAnimation(keyPath: "transform.rotation.z") | |
rotation.values = [-5, 5, -5, 5, -3, 3, -2, 2, 0].map { | |
(let degrees: Double) -> Double in | |
let radians: Double = (M_PI * degrees) / 180.0 |
- (void) deleteAllContacts { | |
CNContactStore *contactStore = [[CNContactStore alloc] init]; | |
[contactStore requestAccessForEntityType:CNEntityTypeContacts completionHandler:^(BOOL granted, NSError * _Nullable error) { | |
if (granted == YES) { | |
NSArray *keys = @[CNContactPhoneNumbersKey]; | |
NSString *containerId = contactStore.defaultContainerIdentifier; | |
NSPredicate *predicate = [CNContact predicateForContactsInContainerWithIdentifier:containerId]; | |
NSError *error; | |
NSArray *cnContacts = [contactStore unifiedContactsMatchingPredicate:predicate keysToFetch:keys error:&error]; |
git ls-files -m | xargs -I {} git update-index --assume-unchanged {} |
#import <Contacts/Contacts.h> | |
@implementation ContactsScan | |
- (void) contactScan | |
{ | |
if ([CNContactStore class]) { | |
//ios9 or later | |
CNEntityType entityType = CNEntityTypeContacts; | |
if( [CNContactStore authorizationStatusForEntityType:entityType] == CNAuthorizationStatusNotDetermined) |