<commit_before>//
//  FUDdiningHallHome.swift
//  BC-Food
//
//  Created by <NAME> on 11/1/15.
//  Copyright © 2015 Deverse. All rights reserved.
//

import UIKit

class FUDdiningHallHome: UIViewController, UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate {
    
    var TitleOfMenu = "I'm ready to eat!!"
    
    var DiningPlace = "Which menu am I looking at?"
    
    var textArray = ["item"]
    
    var FoodTypes = ["Food Type 1", "Food Type 2", "Food Type 3", "Food Type 4"]
    
    @IBOutlet weak var DiningTable: UITableView!
 
    
    @IBOutlet weak var SegmentView: UISegmentedControl!
    
    @IBOutlet weak var Label: UILabel!

    

    override func viewDidLoad() {
        print("viewDidLoad")
        super.viewDidLoad()
        
        self.FUDdiningHallHome.backgroundColor = UIColor(red: 128, green: 0, blue: 0)
        
        self.Label.text = self.TitleOfMenu
        
        print("I'm eating at \(self.DiningPlace)!")
        
        self.DiningTable.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")
       
        DiningTable.delegate = self
        DiningTable.dataSource = self
        
        
        print("textArray", textArray.count)
        print("SectionNumber", FoodTypes.count)
        
        // this is where I set the incoming dining hall name to the actual dining hall array that contains the food items for each dining hall
        
        if self.DiningPlace == "Mac" {
            var textArray = MacFoods[0][0]
        }
        
    }
    
   

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        print("didReceiveMemory works")
        // Dispose of any resources that can be recreated.
    }
    // This code deals with the section number and title
    
    
    
    func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        print("\(FoodTypes.count) sections created")
        return self.FoodTypes.count
    }
    
    func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
        if section < FoodTypes.count{
            print("Section title = \(FoodTypes[section])")
            return FoodTypes[section]
        }
        
        return nil
    }
    
    
    // this function sets the number of rows in each section
    
    func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        print("\(textArray[section]) section created")
        return self.textArray[section].count
    }
    
    
    //this function configures settings for each cell
    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell: UITableViewCell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as UITableViewCell
        
        cell.backgroundColor = UIColor.blueColor()
        cell.textLabel!.text = self.textArray[indexPath.section][indexPath.row]
        return cell
    }
    
    
    
    
    // this is the function for switching between segmented views
    
    @IBAction func SwitchMenu(sender: AnyObject) {
        
        if SegmentView.selectedSegmentIndex == 0 {
           Label.text = "Breakfast" }
       
        if SegmentView.selectedSegmentIndex == 1 {
            Label.text = "Lunch" }
        
        if SegmentView.selectedSegmentIndex == 2 {<commit_msg>No big changes from last commit. Recovery file.<commit_after>//
//  FUDdiningHallHome.swift
//  BC-Food
//
//  Created by <NAME> on 11/1/15.
//  Copyright © 2015 Deverse. All rights reserved.
//

import UIKit

class FUDdiningHallHome: UIViewController, UITableViewDataSource, UITableViewDelegate, UITextFieldDelegate {
    
    var TitleOfMenu = "I'm ready to eat!!"
    
    var DiningPlace = "Which menu am I looking at?"
    
    var textArray = ["item"]
    
    var FoodTypes = ["Food Type 1", "Food Type 2", "Food Type 3", "Food Type 4"]
    
    @IBOutlet weak var DiningTable: UITableView!
 
    
    @IBOutlet weak var SegmentView: UISegmentedControl!
    
    @IBOutlet weak var Label: UILabel!

    

    override func viewDidLoad() {
        print("viewDidLoad")
        super.viewDidLoad()
        
        
        self.Label.text = self.TitleOfMenu
        
        print("I'm eating at \(self.DiningPlace)!")
        
        self.DiningTable.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")
       
        DiningTable.delegate = self
        DiningTable.dataSource = self
        
        
        print("textArray", textArray.count)
        print("SectionNumber", FoodTypes.count)
        
        
        
        // this is where I set the incoming dining hall name to the actual dining hall array that contains the food items for each dining hall
        
        if self.DiningPlace == "Mac" {
            var textArray = MacFoods[0][0]
        }
        
    }
    
   

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        print("didReceiveMemory works")
        // Dispose of any resources that can be recreated.
    }
    // This code deals with the section number and title
    
    
    
    func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        print("\(FoodTypes.count) sections created")
        return self.FoodTypes.count
    }
    
    func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
        if section < FoodTypes.count{
            print("Section title = \(FoodTypes[section])")
            return FoodTypes[section]
        }
        
        return nil
    }
    
    
    // this function sets the number of rows in each section
    
    func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        print("\(textArray[section]) section created")
        return self.textArray[section].count
    }
    
    
    //this function configures settings for each cell
    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell: UITableViewCell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as UITableViewCell
        
        cell.backgroundColor = UIColor.blueColor()
        cell.textLabel!.text = self.textArray[indexPath.section][indexPath.row]
        return cell
    }
    
    
    
    
    // this is the function for switching between segmented views (breakfast, lunch, dinner, late night). It refills the displayed table data based by drawing from different elements of the food arrays.
    
    @IBAction func SwitchMealTime(sender: AnyObject) {
        
        if SegmentView.selectedSegmentIndex == 0 {
           Label.text = "Breakfast" }
       
        if SegmentView.selectedSegmentIndex == 1 {
            Label.text = "Lunch" }
        
        if SegmentView.selectedSegmentIndex == 2 {
{'fraction_non_alphanumeric': 0.08465224335704952, 'fraction_numerical': 0.00595324524466386, 'mean_word_length': 2.2444653791804052, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '917148', 'n_tokens_mistral': 2014, 'n_tokens_neox': 1879, 'n_words': 529}