<commit_before>(function() {

  'use strict';
    
    angular
        .module('timeTracker')
        .controller('TimeEntry', TimeEntry);

        function TimeEntry(time) {

           // vm is our capture variable
            var vm = this;

            vm.timeentries = [];

            vm.totalTime = {};

            // Initialize the clockIn and clockOut times to the current time.
            vm.clockIn = new Date();
            vm.clockOut = new Date();

            // Fetches the time entries from the static JSON file
            // and puts the results on the vm.timeentries array
            time.getTime().then(function(results) {
                vm.timeentries = results;
                console.log(vm.timeentries);
            }, function(error) { // Check for errors
                console.log(error);<commit_msg>add grab user and momentum<commit_after>(function() {

  'use strict';
    
    angular
        .module('timeTracker')
        .controller('TimeEntry', TimeEntry);

        function TimeEntry(time, user, $scope) {

           // vm is our capture variable
            var vm = this;

            vm.timeentries = [];

            vm.totalTime = {};
            vm.users = [];

            // Initialize the clockIn and clockOut times to the current time.
            vm.clockIn = moment();
            vm.clockOut = moment();

            // Grab all the time entries saved in the database
          getTimeEntries();
              
          // Get the users from the database so we can select
          // who the time entry belongs to
          getUsers();

            function getUsers() {
                user.getUsers().then(function(result) {
                  vm.users = result;
                }, function(error) {
                  console.log(error);
                });
            }
          
          // Fetches the time entries and puts the results
          // on the vm.timeentries array
          function getTimeEntries() {
            time.getTime().then(function(results) {
              vm.timeentries = results;
                updateTotalTime(vm.timeentries);
                console.log(vm.timeentries);
              }, function(error) {
                console.log(error);
              });
            }         

            // Fetches the time entries from the static JSON file
            // and puts the results on the vm.timeentries array
            time.getTime().then(function(results) {
                vm.timeentries = results;
                console.log(vm.timeentries);
            }, function(error) { // Check for errors
                console.log(error);
{'fraction_non_alphanumeric': 0.09711684370257967, 'fraction_numerical': 0.0, 'mean_word_length': 1.388586956521739, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3855641', 'n_tokens_mistral': 642, 'n_tokens_neox': 611, 'n_words': 181}