<commit_before>'use strict';

angular.module('myApp.controllers')
    .controller('VideosCtrl', VideosController);

function VideosController($scope, ApiService) {
    $scope.videos = [];
    var pageSize = 10, page = 0;
    var previousPage = null;
    var inProgress = true;

    $scope.loadVideos = function () {
        if (inProgress) {
            var param = {
                skip: page * pageSize,
                limit: pageSize
            };
            console.log('previousPage', previousPage);
            if (page == previousPage) {
                return false;
            }
            console.log(page, param);
            ApiService.GetObject(API.Video.Get.Videos, param).then(function (response) {
                if (response.status == "success") {
                    //console.log("Response", response);
                    $scope.videos = $scope.videos.concat(response.data);
                    previousPage = page;
                    page++;
                } else {
                    inProgress = false;
                }
            });

        }
    };

    //Fetch first 10 videos
    $scope.loadVideos();
}<commit_msg>Remove Comments<commit_after>'use strict';

angular.module('myApp.controllers')
    .controller('VideosCtrl', VideosController);

function VideosController($scope, ApiService) {
    $scope.videos = [];
    var pageSize = 10, page = 0;
    var inProgress = true;

    $scope.loadVideos = function () {
        if (inProgress) {
            var param = {
                skip: page * pageSize,
                limit: pageSize
            };
            ApiService.GetObject(API.Video.Get.Videos, param).then(function (response) {
                if (response.status == "success") {
                    //console.log("Response", response);
                    $scope.videos = $scope.videos.concat(response.data);
                    page++;
                } else {
                    inProgress = false;
                }
            });

        }
    };

    //Fetch first 10 videos
    $scope.loadVideos();
}
{'fraction_non_alphanumeric': 0.1215496368038741, 'fraction_numerical': 0.004842615012106538, 'mean_word_length': 1.5225885225885225, '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': '4650177', 'n_tokens_mistral': 585, 'n_tokens_neox': 527, 'n_words': 109}