<commit_before>//
//  BBStartViewController.swift
//  BBSwiftFramework
//
//  Created by <NAME> on 9/30/15.
//  Copyright © 2015 Bei. All rights reserved.
//

import UIKit

class BBStartViewController: BBRootViewController {
    
    @IBOutlet weak var contentTableView: BBTableView!
    var items = ["武汉","上海","北京","深圳","广州","重庆","香港","台海","天津"]
    
    // MARK: - --------------------System--------------------
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
        self.setCustomTitle("BB Swift 框架")
        
        self.setMoreBarButtonWithTarget(self, action: Selector("moreAction"))
        self.setInboxBarButtonWithTarget(self, action: Selector("inboxAction"))
        
        self.contentTableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    // MARK: - --------------------功能函数--------------------
    // MARK: 初始化
    
    func moreAction() {
        let alertController = BBAlertController().initWithMessage("响应左边按钮")
        self.presentViewController(alertController, animated: true, completion: nil)
    }
    
    func inboxAction() {
        let alertController = BBAlertController().initWithMessage("响应右边按钮")
        self.presentViewController(alertController, animated: true, completion: nil)
    }
    
    // MARK: - --------------------手势事件--------------------
    // MARK: 各种手势处理函数注释
    
    // MARK: - --------------------按钮事件--------------------
    // MARK: 按钮点击函数注释
    
    // MARK: - --------------------代理方法--------------------

    // MARK: - UITableView Delegate
    func tableView(tableView: UITableView!, numberOfRowsInSection section: Int) -> Int {
        return self.items.count
    }
    
    func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
        let cell = tableView .dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as UITableViewCell
        cell.textLabel!.text = self.items[indexPath.row as Int]
        return cell;
    }
<commit_msg>Alamofire service<commit_after>//
//  BBStartViewController.swift
//  BBSwiftFramework
//
//  Created by <NAME> on 9/30/15.
//  Copyright © 2015 Bei. All rights reserved.
//

import UIKit
import Alamofire

class BBStartViewController: BBRootViewController {
    
    @IBOutlet weak var contentTableView: BBTableView!
    var items = ["武汉","上海","北京","深圳","广州","重庆","香港","台海","天津"]
    
    // MARK: - --------------------System--------------------
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
        self.setCustomTitle("BB Swift 框架")
        
        self.setMoreBarButtonWithTarget(self, action: Selector("moreAction"))
        self.setInboxBarButtonWithTarget(self, action: Selector("inboxAction"))
        
        self.setupView()
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    // MARK: - --------------------功能函数--------------------
    // MARK: 初始化
    
    func setupView() {
        
        // config tableView
        self.contentTableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")
        
        // Alamofire Service
        Alamofire.request(.GET, "http://httpbin.org/get")
            .responseJSON { _, _, result in
                print(result)
                debugPrint(result)
        }
    }
    
    // MARK: - --------------------手势事件--------------------
    // MARK: 各种手势处理函数注释
    
    // MARK: - --------------------按钮事件--------------------
    // MARK: 按钮点击函数注释
    
    func moreAction() {
        let alertController = BBAlertController().initWithMessage("响应左边按钮")
        self.presentViewController(alertController, animated: true, completion: nil)
    }
    
    func inboxAction() {
        let alertController = BBAlertController().initWithMessage("响应右边按钮")
        self.presentViewController(alertController, animated: true, completion: nil)
    }
    
    // MARK: - --------------------代理方法--------------------

    // MARK: - UITableView Delegate
    func tableView(tableView: UITableView!, numberOfRowsInSection section: Int) -> Int {
        return self.items.count
    }
    
    func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {
        let cell = tableView .dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as UITableViewCell
        cell.textLabel!.text = self.items[indexPath.row as Int]
        return cell;
    }

{'fraction_non_alphanumeric': 0.1812577065351418, 'fraction_numerical': 0.0036991368680641184, 'mean_word_length': 1.9091452480573818, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5558595', 'n_tokens_mistral': 1458, 'n_tokens_neox': 1454, 'n_words': 291}