This file contains hidden or 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
// this goes into every page where the hijack will take place | |
// or where the hijack will land | |
function hijack (abs, landing) { | |
// get the #jump=url from the url | |
url_hash = window.location.hash.substr(1); | |
// make sure its actually a #jump= | |
if (url_hash.indexOf("jump=") !== -1) { | |
// trim off jump= and redirect | |
url = window.location.hash.substr(6); | |
window.setTimeout(function(){ |
This file contains hidden or 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
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { | |
let popoverViewController = segue.destinationViewController as UIViewController | |
popoverViewController.modalPresentationStyle = UIModalPresentationStyle.Popover | |
popoverViewController.popoverPresentationController!.delegate = self | |
} | |
This file contains hidden or 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
// | |
// LayersSubView.swift | |
// Veteran Care Network | |
// | |
// Created by Jamone Alexander Kelly on 3/4/15. | |
// Copyright (c) 2015 Veteran Care Network, LLC. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or 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
// | |
// Legend.swift | |
// VCN | |
// | |
// Created by Jamone Alexander Kelly on 3/3/15. | |
// Copyright (c) 2015 Veteran Care Network, LLC. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or 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
dispatch_async(dispatch_get_main_queue()) { | |
if((self.defaults.valueForKey(self.facilityBoolKeyConstant) as Bool) != false) { | |
self.getCloseLocations("fc") | |
} | |
if((self.defaults.valueForKey(self.medicareBoolKeyConstant) as Bool) != false) { | |
self.getCloseLocations("md") | |
} | |
if((self.defaults.valueForKey(self.vaHospitalBoolKeyConstant) as Bool) != false) { | |
self.getCloseLocations("vh") | |
} |
This file contains hidden or 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
extension String { | |
var chomp : String { | |
mutating get { | |
self.removeAtIndex(self.startIndex) | |
return self | |
} | |
} | |
} | |
var test : String = "Chomp" |
This file contains hidden or 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
import UIKit | |
extension UIViewController { | |
func alert(title: String = "", message: String, actionTitle:String = "OK") { | |
let alertController = UIAlertController(title: title, message: message, preferredStyle: .Alert) | |
let OKAction = UIAlertAction(title: actionTitle, style: .Default, handler: nil) | |
alertController.addAction(OKAction) | |
self.presentViewController(alertController, animated: true, completion: nil) | |
} | |
} |
This file contains hidden or 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
import UIKit | |
extension String { | |
func toAttributedString(font font:UIFont!, kerning: CGFloat!, color:UIColor!) -> NSAttributedString { | |
return NSAttributedString(string: self as String, font: font, kerning: kerning, color: color)! | |
} | |
} |
This file contains hidden or 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
// I know this is horrible lol I needed a quick hacky way to create the blurred view with data | |
// lil bit of number magic :o | |
// definitely a better way to do this lol I'll come back to it as well | |
schoolNameLabel.frame = CGRect(x: sX*0.22, y: sY * 0.1, width: 15, height: 20) | |
schoolNameLabel.sizeToFit() | |
schoolNameLabel.textColor = UIColor.grayColor() | |
specialView.addSubview(schoolNameLabel) | |
schoolNameLabelContent.frame = CGRect(x: sX*0.4, y: sY*0.1, width: 15, height: 20) | |
schoolNameLabelContent.sizeToFit() |
This file contains hidden or 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
// The fixed formula | |
struct Global { | |
static var schoolID: Int? // Work around for passing the selected location ID | |
static var userCoord: CLLocationCoordinate2D? | |
func computeDistance() -> Double { | |
// User coordinate | |
let uLat: Double = 35.6603676639829 | |
let uLng: Double = -80.4443005566303 | |
// School coordinate |
OlderNewer