Roadmap for Chat
- Table View that shows list of Chats
- Segue to individual chats from Table View (and segue back)
- Instantiate chat from Post detail
- Integrate Firebase Cloud Messaging for iOS push notifications
| import Foundation | |
| class Solution { | |
| static let openingChars = "({[" | |
| static let closingChars = ")}]" | |
| var stack: [String.Element] = [] | |
| private func pushClosingChar(_ char: String.Element) { |
| class Solution { | |
| func letterToInt(_ s: String.Element) -> Int { | |
| switch s { | |
| case "I": | |
| return 1 | |
| case "V": | |
| return 5 | |
| case "X": | |
| return 10 | |
| case "L": |
| func constructUsers() { | |
| print("#ChatListTVC Starting constructUsers()") | |
| let group = DispatchGroup() | |
| for otherUserUid in userUids { | |
| group.enter() // entering the closure | |
| User.getBy(uid: otherUserUid, completion: { (user) in | |
| self.users.append(user) | |
| print("Chat List appended: \(user.firstName)") |
| import Foundation | |
| extension Date { | |
| func timeAgoString() -> String { | |
| let units = Array<Calendar.Component>([.year, .month, .day, .hour, .minute, .second]) | |
| let components = Calendar.current.dateComponents(Set(units), from: self, to: Date()) | |
| for unit in units | |
| { | |
| guard let value = components.value(for: unit) else { |
Roadmap for Chat
If Theo wants some code in Dave's branch, Theo should log into GitHub and pull request from Dave's branch to Theo's branch.
It will be Theo's responsibility to resolve any merge conflicts that arise from the pull.
Once the pull request is complete and any arising merge conflicts resolved, Theo will run the following command to get the code onto his local machine:
| # Xcode | |
| # | |
| # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore | |
| ## User settings | |
| xcuserdata/ | |
| ## Folders | |
| # Comment this out to disclude framework files | |
| # Frameworks/ |
| /*: | |
| # Wednesday Stretch Problem 6.3 | |
| ## Fibbonacci Number | |
| ### Instructions: | |
| 1. Create a function that finds the closest fibonacci number that is less than or equal to the number that is passed into a function. | |
| 2. Don't hesitate to Google what a Fibonacci number is. | |
| 3. Test it by passing in the number 2000. We will compare results. | |
| ### Black Diamond 💎💎💎 |
| /*: | |
| # Wednesday Stretch Problem 6.3 | |
| ## Fibbonacci Number | |
| ### Instructions: | |
| 1. Create a function that finds the closest fibonacci number that is less than or equal to the number that is passed into a function. | |
| 2. Don't hesitate to Google what a Fibonacci number is. | |
| 3. Test it by passing in the number 2000. We will compare results. | |
| ### Black Diamond 💎💎💎 |