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
    
  
  
    
  | let titleLabel = UILabel(frame: CGRectMake(0, 0, 0, 0)) | |
| titleLabel.backgroundColor = UIColor.clearColor() | |
| titleLabel.textColor = UIColor.blackColor() | |
| titleLabel.font = titleLabel.font.fontWithSize(18) | |
| titleLabel.text = "Title" | |
| titleLabel.sizeToFit() | |
| let subTitleLabel = UILabel(frame: CGRectMake(0, 20, 0, 0)) | |
| subTitleLabel.backgroundColor = UIColor.clearColor() | |
| subTitleLabel.textColor = UIColor.blackColor() | 
  
    
      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
    
  
  
    
  | for currentView in tableView.subviews { | |
| if currentView.isKindOfClass(UIScrollView) { | |
| (currentView as? UIScrollView)?.delaysContentTouches = false | |
| break | |
| } | |
| } | 
  
    
      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 Foundation | |
| func printNum(i: Int) { | |
| print(i, separator: "", terminator: ", ") | |
| } | |
| func printFizz(i: Int) { | |
| print("Fizz", separator: "", terminator: ", ") | |
| } | 
  
    
      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
    
  
  
    
  | let alert = UIAlertController(title: "", message: "", preferredStyle: UIAlertControllerStyle.Alert) | |
| let alertView: UIView = NSBundle.mainBundle().loadNibNamed("View", owner: self, options: nil)[0] as! UIView | |
| alertView.frame = CGRectMake(alert.view.bounds.minX, alert.view.bounds.minY, 200, 200) | |
| alert.view.addSubview(alertView) | |
| let action = UIAlertAction(title: "OK", style: UIAlertActionStyle.Cancel, handler: nil) | |
| alert.addAction(action) | |
| self.presentViewController(alert, 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
    
  
  
    
  | // presenter | |
| func beginLoadingData() { | |
| NetworkManager.sharedInstance.loadMoreQuestions { (result) in | |
| switch result { | |
| case .Ok: | |
| self.view.updateData(questions) | |
| self.view.insert() | |
| case .BackendError: | |
| self.view.showAlertController(...) | 
  
    
      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
    
  
  
    
  | // view | |
| override func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) { | |
| if indexPath.row == tableView.indexPathsForVisibleRows?.last?.row { | |
| let lastSection = tableView.numberOfSections - 1 | |
| let lastRow = tableView.numberOfRowsInSection(lastSection) - 1 | |
| if indexPath.section == lastSection && indexPath.row == lastRow { | |
| if self.questions.count < Int(self.countersCellDataPack.questionsAmount!) { | 
  
    
      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 tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { | |
| switch (section: indexPath.section, row: indexPath.row) { | |
| case (0, 0): | |
| let cell = tableView.dequeueReusableCellWithIdentifier(headerCellIdentifier, forIndexPath: indexPath) as! HeaderCellView | |
| fillHeaderCellWithData(cell) | |
| return cell | |
| case (0, 1): | |
| let cell = tableView.dequeueReusableCellWithIdentifier(userNameCellIdentifier, forIndexPath: indexPath) as! UserNameCellView | |
| fillUserNameCellWithData(cell) | |
| return cell | 
  
    
      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
    
  
  
    
  | 6 0.13 | |
| 23000 | |
| 23000 | |
| 20439 | |
| 90000 | |
| 12033 | |
| 20420 | 
  
    
      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
    
  
  
    
  | function functionVersionFib(n) { | |
| if (n == 0 || n == 1) { | |
| return n; | |
| } else { | |
| return functionVersionFib(n - 1) + functionVersionFib(n - 2); | |
| } | |
| } | 
  
    
      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
    
  
  
    
  | // | |
| // Color.swift | |
| // Color | |
| // | |
| // Created by Sergei Fabian on 14.02.17. | |
| // Copyright © 2017 com.sfabian. All rights reserved. | |
| // | |
| import UIKit |