#100DaysOfCode - Antique
Listed below are my entries to #100DaysOfCode
Day 1: Distance between two CLLocation objects.
func distance(me: CLLocation, other: CLLocation) -> Double {
return me.distance(from: other) / 1000 // km
}Day 2: Generating a random password
def generatePassword():
lowercase = "abcdefghijklmnopqrstuvwxyz"
uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
numbers = "1234567890"
special = "!@#$%^&*()[]{}-_=+|;:'""',.<>/?"
password_length = input("Enter desired password length:\n")
length = int(password_length)
allow_special = input("Allow special characters? (Y/N)\n")
allow_special_chars = str(allow_special)
password = ""
for char in range(length):
if allow_special_chars.upper() == "N":
password += random.choice(lowercase + uppercase + numbers)
else:
password += random.choice(lowercase + uppercase + numbers + special)
print(password)
# usage: generatePassword()Day 3: Tweet a Reddit post with a specific flair
Day 4: Corners as round as Kim's...
Day 5: Cutting a transparent hole in a UIVisualEffectView
Day 6: Logging NSString objects to a file
Day 7: Using MPMusicPlayerController methods
Day 8: Writing an API wrapper for weatherstack.com
Day 9: Convert NSTimeInterval to NSString
Day 10: Convert NSDate to NSString and vice versa
Day 11: Achieving different blurs in Logos
Day 12: NSFileManager and its many uses
Day 13: Displaying a window above SpringBoard (iOS 13 and below).
Day 14: Compressing and decompressing data
Day 15: Getting an iOS device's UDID (Jailbroken)
Last updated