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
override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) { | |
if let touch = touches.first { | |
let position = touch.locationInView(view) | |
print(position) | |
} | |
} |
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
//Greater Than or Less Than | |
var rentPerMonth = [["rent" : 2200], ["rent" : 2350], ["rent" : 2300], ["rent" : 2490]] | |
var filteredRent = rentPerMonth.filter({ | |
$0["rent"] < 2000 | |
}) | |
print(filteredRent) |
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
//Select nonchanging values like neighbordhoods - Good for buttons | |
let neighborhoods: NSArray = ["Crown Heights", "Clinton Hill", "Sunset Park"] | |
let fiteredNeighborhoods = (neighborhoods as! Array).filter { $0 == "Sunset Park" } | |
print(fiteredNeighborhoods) |
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
//Search by Keyword | |
let savedApartments = [ | |
"apt1" : "The unit comes with stainless steel appliances, a full-sized refrigerator, plenty of storage, a gas oven, a gas range, and a dishwasher.The bedroom has hardwood floors and a window that opens.", "apt2" : "you will love it", "apt3" : "So many great amenities"] | |
for (name, description) in savedApartments { | |
if description.containsString("a window that opens") { | |
print(name) | |
} | |
} |
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
//Codes and Descriptions from http://www.bls.gov/oes/current/oes_stru.htm#15-0000 | |
// code : [description, second_button code] | |
let careerOpTwoDictExpress: Dictionary = [ | |
21-0000 : ["Community and Social Service Occupations", "Health"], | |
25-1060 : ["Social Sciences Teachers, Postsecondary", "Teaching"], | |
25-2000 : ["Preschool, Primary, Secondary, and Special Education School Teachers", "Teaching"], | |
27-1010 : ["Designers", "Art"], | |
27-2000 : ["Entertainers and Performers, Sports and Related Workers", "Sports"], |
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
/Users/flatironschool/.ssh | |
[15:01:23] .ssh | |
// ♥ ssh-add -D | |
All identities removed. | |
[15:01:53] .ssh | |
// ♥ ssh git@github.com | |
Permission denied (publickey). | |
[15:01:57] .ssh | |
// ♥ ssh-keygen | |
Generating public/private rsa key pair. |
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 setLocationQuotientMap(dictionary: [String : Double]) { | |
self.usaColorMapView.backgroundColor = UIColor.clearColor() | |
self.usaColorMapView.setColorForAllStates(UIColor.flatGrayColor()) | |
self.usaColorMapView.performUpdates { | |
for (state, locationQuotient) in dictionary { | |
switch locationQuotient { | |
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 dummyDictionaryLocationQuotient = ["District of Columbia" : 1.81, | |
"Colorado" : 1.55, | |
"Delaware" : 1.44, | |
"New York" : 1.27, | |
"Virginia" : 1.21, | |
"Maryland" : 1.18, | |
"South Dakota" : 1.18, | |
"Massachusetts" : 1.16, | |
"Texas" : 1.14, | |
"Minnesota" : 1.08, |
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
[11:19:33] (master) LuckTracker | |
// ♥ pod update | |
Update all pods | |
Updating local specs repositories | |
Analyzing dependencies | |
Downloading dependencies | |
Using BFPaperButton (2.1.1) | |
Generating Pods project | |
Integrating client project | |
Pod installation complete! There is 1 dependency from the Podfile and 1 total |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Page Title</title> | |
</head> | |
<body> | |
</body> | |
</html> |
OlderNewer