<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue Nov 26 22:14:34 2019 | |
@author: Mallika Walia & Dasmer Singh | |
""" | |
# List of secret santa participants (INPUT LIST) | |
gifters = [ |
import base64 | |
from urllib.parse import quote | |
def secret_santa_url(input_string): | |
# Base64 Encoding | |
encodedBytes = base64.b64encode(input_string.encode("utf-8")) | |
encodedStr = str(encodedBytes, "utf-8") | |
# URL Encoding Encoding | |
url_b64_encoded_str = quote(encodedStr.encode('utf8')) |
01010011 01101111 00100000 01111001 01101111 01110101 00100000 01110100 01101111 01101111 01101011 00100000 01110100 01101000 01100101 00100000 01110100 01101001 01101101 01100101 00100000 01110100 01101111 00100000 01110100 01110010 01100001 01101110 01110011 01101100 01100001 01110100 01100101 00100000 01110100 01101000 01101001 01110011 00111111 00100000 | |
01010111 01100101 00100000 01101100 01101111 01110110 01100101 00100000 01111001 01101111 01110101 00101110 |
import Foundation | |
import UIKit | |
extension UITextView { | |
func rangeOfWordAtCurrentCursorLocation() -> NSRange? { | |
let selectedRange = self.selectedRange | |
if selectedRange.length == 0 { | |
return text.rangeOfWordAtLocation(location: selectedRange.location) | |
} |
// Suppose `urls` is an property of a class of type NSArray and it contains NSURLs | |
NSString *string = self.urls[0]; | |
NSString *firstCharacter = [string subtringToIndex:1]; | |
// This would break at runtime because we casted it to the wrong value type. | |
// We can get around this by creating NSArrays that are generic over NSURL. That way we would get a warning on the NSString cast. | |
// I may also mention that NSArrays can store objects of different types unlike Swift where all the object must be of the same type. | |
// That said, objects that contain multiple types that do not all inherit from the same object or conform to the same protocol usually should never be in the same NSArray |
[SkyLab abTestWithName:@"Title" A:^{ | |
self.titleLabel.text = NSLocalizedString(@"Hello, World!", nil); | |
} B:^{ | |
self.titleLabel.text = NSLocalizedString(@"Greetings, Planet!", nil); | |
}]; |