This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Person = Class({ | |
initialize: function(first, last) { | |
this.firstName = first; | |
this.lastName = last; | |
}, | |
toString: function() { | |
return "My name is "+this.firstName+" "+this.lastName+" ."; | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def trove_link(link_url, comment=None): | |
logging.debug('Sending link to Trove') | |
#Setup the https headers and payload data | |
headers = {'Trove-Authorization': TROVE_TOKEN} | |
payload = {"url": link_url, "key": TROVE_API_KEY, "display_text": comment} | |
response = requests.post(TROVE_PICK_URL, params=payload, headers=headers) | |
#Just printing the return for debugging purposes here. | |
logging.debug('Trove HTTP Response: '+str(response.status_code)+', Message: '+response.reason) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func setWebViewMapWith(state: String, district: String) { | |
if (district != "0") { | |
districtUrl = "https://www.govtrack.us/congress/members/embed/mapframe?state=\(state)&district=\(district)" | |
}else { | |
districtUrl = "https://www.govtrack.us/congress/members/embed/mapframe?state=\(state)" | |
} | |
setWebViewUrl(districtUrl) | |
} | |
func setWebViewUrl(url: String) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ChatPostDetailViewController.swift | |
// Cloakroom | |
// | |
// Created by Theodore Henderson on 3/31/16. | |
// Copyright © 2016 Capitol Bells, Inc. All rights reserved. | |
// | |
import SwiftyJSON | |
private extension Selector { |