<commit_before>//
//  ContactViewController.swift
//  findme
//
//  Created by <NAME> on 16/03/2016.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import UIKit
import MapKit
import CoreLocation

class ContactViewController: UITableViewController, NSURLConnectionDelegate {
    @IBOutlet var friendsTable: UITableView!
    
    var users : [User] = []

    override func viewWillAppear(animated: Bool) {
        self.navigationController?.navigationBarHidden = false
        
        loadUsers()
        
        navigationController!.navigationBar.barTintColor = UIColor(colorLiteralRed: 52/255, green: 73/255, blue: 94/255, alpha: 1.0)
        navigationController!.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor()]
        navigationController!.navigationBar.tintColor = UIColor.whiteColor()
    }
    
    override func viewDidAppear(animated: Bool) {
        loadUsers()
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")
        
        loadFAIcons()
    }
    
    func loadFAIcons(){
        print("gogo")
        for view in self.view.subviews as [UIView] {
            if let button = view as? UIButton {
                
                    button.titleLabel?.font = UIFont.fontAwesomeOfSize(30)
                    button.setTitle(String.fontAwesomeIconWithName(.Envelope), forState: .Normal)
                 if (button.titleLabel == "Call"){
                    button.titleLabel?.font = UIFont.fontAwesomeOfSize(30)
                    button.setTitle(String.fontAwesomeIconWithName(.Phone), forState: .Normal)
                } else if (button.titleLabel == "Delete"){
                    button.titleLabel?.font = UIFont.fontAwesomeOfSize(30)
                    button.setTitle(String.fontAwesomeIconWithName(.Trash), forState: .Normal)
                }
            }
        }
    }
    
    override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
        
        tableView.deselectRowAtIndexPath(indexPath, animated: true)
        
        let row = indexPath.row
        print("Row: \(row)")
    }
    
    override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        return 1
    }
    
    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return users.count
    }
    
    override func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
        return ""
    }
    
    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCellWithIdentifier("LabelCell", forIndexPath: indexPath)
        
        cell.textLabel?.text = "\(self.users[indexPath.row].pseudo)"
        
        return cell
    }<commit_msg>font awesome removed for contact actions<commit_after>//
//  ContactViewController.swift
//  findme
//
//  Created by <NAME> on 16/03/2016.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import UIKit
import MapKit
import CoreLocation

class ContactViewController: UITableViewController, NSURLConnectionDelegate {
    @IBOutlet var friendsTable: UITableView!
    
    var users : [User] = []

    override func viewWillAppear(animated: Bool) {
        self.navigationController?.navigationBarHidden = false
        
        loadUsers()
        
        navigationController!.navigationBar.barTintColor = UIColor(colorLiteralRed: 52/255, green: 73/255, blue: 94/255, alpha: 1.0)
        navigationController!.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor()]
        navigationController!.navigationBar.tintColor = UIColor.whiteColor()
    }
    
    override func viewDidAppear(animated: Bool) {
        loadUsers()
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")
    }
    
    override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
        
        tableView.deselectRowAtIndexPath(indexPath, animated: true)
        
        let row = indexPath.row
        print("Row: \(row)")
    }
    
    override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        return 1
    }
    
    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return users.count
    }
    
    override func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
        return ""
    }
    
    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCellWithIdentifier("LabelCell", forIndexPath: indexPath)
        
        cell.textLabel?.text = "\(self.users[indexPath.row].pseudo)"
        
        return cell
    }
{'fraction_non_alphanumeric': 0.09250493096646943, 'fraction_numerical': 0.01301775147928994, 'mean_word_length': 2.6015625, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '4649657', 'n_tokens_mistral': 1510, 'n_tokens_neox': 1384, 'n_words': 289}