<commit_before>(function() {
    'use strict';
    angular.module('styleguideApp', [
      'pascalprecht.translate',
      'ngMaterial',
      'ngSanitize',
      'ui.tree',
      'ui.grid',
      'ui.grid.autoResize',
      'ui.grid.exporter',
      'ui.grid.selection',
      'ui.bootstrap',
      'ui.bootstrap.tpls',
      'angularMoment',
      'wfm.cardList',
      'wfm.timerangepicker',
      'wfm.daterangepicker',
      'wfm.workinghourspicker',
      'ngAnimate',
      'wfm.pagination',
      'wfm.modal',
      'wfm.numericValue',
      'wfm.notice',
      'gridshore.c3js.chart'
]).config(['$translateProvider', function($translateProvider) {

    $translateProvider
  .translations('en-us', {
      'Sun': 'Sun',
      'Mon': 'Mon',
      'Tue': 'Tue',
      'Wed': 'Wed',
      'Thu': 'Thu',
      'Fri': 'Fri',
      'Sat': 'Sat'
  });
    $translateProvider.preferredLanguage('en-us');

}])
.controller('mainCtrl', ['$scope', '$translate', 'NoticeService', function($scope, $translate, NoticeService) {
    $translate.use('en-us');
    /* Dummy data*/
    $scope.demos = [{id: '1'}, {id: '2'}, {id: '3'}, {id: '4'}];
    $scope.treeDemos =   [
      {categories: [{name: 'item 1'}, {name: 'item 2'}, {name: 'item 3'}, {name: 'item 2'}],
      name: 'First Group',},
      {categories: [{name: 'item 1'}, {name: 'item 3'}], name: 'Second Group'}, {categories: [], name: 'Third Group'}];

    /* Code for Grid */
    var data = [];
    for (var i = 0; i < 100; i++) {
        data[i] = {};
        for (var j = 0; j < 10; j++) {
            data[i]['j' + j] = j;
        }
    }

    $scope.gridOptions = {
        exporterCsvFilename: 'myFile.csv',
        exporterMenuPdf: false,
        enableSelectAll: true,
        enableRowSelection: true,
        selectionRowHeaderWidth: 35,
        data: data,
    };
    $scope.gridOptions.enableGridMenu = true;

    /*code for chips*/
    $scope.sizes = [
      {Name: 'Small', Type:'Size'},
      {Name: 'Medium', Type:'Size'},
      {Name: 'Large', Type:'Size'},
      {Name: 'Insane', Type:'Size'},
      {Name: 'Infinite', Type:'Size'},
      {Name: 'Mustard', Type:'Dressing'}
    ]
    ;

    /*Code for the chart*/
    c3.generate({
        bindto: '#myChart',
        data: {
            columns: [
              ['data1', 30, 200, 100, 400, 150, 250],
              ['data2', 20, 180, 240, 100, 190, 0],
            ],
            selection: {
                enabled: true,
            },
        },
        zoom: {
            enabled: true,
        },
    });

    /*Code for tabs*/
    $scope.selectedIndex = 0;
    $scope.nextTab = function() {
        var index = ($scope.selectedIndex === 50) ? 0 : $scope.selectedIndex + 1;
        $scope.selectedIndex = index;
    };

    /*Code for forms*/
    $scope.reset = function(form) {
        if (form) {
            form.$setPristine();
            form.$setUntouched();
        }
    };

    /*Code for date range picker*/
    $scope.dateRange = {
        startDate: new Date(),
        endDate: new Date()
    };
    $scope.dateRangeTemplateType = 'inline';
    $scope.dateRangeTemplateTypes = ['popup', 'inline'];

    /*Code for time range picker*/
    $scope.timeRange = {
        startTime: new Date('2015-01-01 08:00:00'),
        endTime: new Date('2015-01-01 17:00:00')
    };
    $scope.disableNextDay = false;

    /*Code for modal*/
    $scope.modalShown = false;
    $scope.toggleModal = function() {
        $scope.modalShown = !$scope.modalShown;
    };

    /*code for pagination*/
    $scope.paginationOptions = {pageNumber: 1, totalPages: 7};
    $scope.getPageData = function(pageIndex) {
        //retrieve the data for given page<commit_msg>Fix same problem in Living Styleguide<commit_after>(function() {
    'use strict';
    angular.module('styleguideApp', [
      'pascalprecht.translate',
      'ngMaterial',
      'ngSanitize',
      'ui.tree',
      'ui.grid',
      'ui.grid.autoResize',
      'ui.grid.exporter',
      'ui.grid.selection',
      'ui.bootstrap',
      'ui.bootstrap.tpls',
      'angularMoment',
      'wfm.cardList',
      'wfm.timerangepicker',
      'wfm.daterangepicker',
      'wfm.workinghourspicker',
      'ngAnimate',
      'wfm.pagination',
      'wfm.modal',
      'wfm.numericValue',
      'wfm.notice',
      'gridshore.c3js.chart'
]).config(['$translateProvider', function($translateProvider) {

    $translateProvider
  .translations('en-us', {
      'Sun': 'Sun',
      'Mon': 'Mon',
      'Tue': 'Tue',
      'Wed': 'Wed',
      'Thu': 'Thu',
      'Fri': 'Fri',
      'Sat': 'Sat'
  });
    $translateProvider.preferredLanguage('en-us');

}])
.controller('mainCtrl', ['$scope', '$translate', 'NoticeService', function($scope, $translate, NoticeService) {
    $translate.use('en-us');
    /* Dummy data*/
    $scope.demos = [{id: '1'}, {id: '2'}, {id: '3'}, {id: '4'}];
    $scope.treeDemos =   [
      {categories: [{name: 'item 1'}, {name: 'item 2'}, {name: 'item 3'}, {name: 'item 2'}],
      name: 'First Group',},
      {categories: [{name: 'item 1'}, {name: 'item 3'}], name: 'Second Group'}, {categories: [], name: 'Third Group'}];

    /* Code for Grid */
    var data = [];
    for (var i = 0; i < 100; i++) {
        data[i] = {};
        for (var j = 0; j < 10; j++) {
            data[i]['j' + j] = j;
        }
    }

    $scope.gridOptions = {
        exporterCsvFilename: 'myFile.csv',
        exporterMenuPdf: false,
        enableSelectAll: true,
        enableRowSelection: true,
        selectionRowHeaderWidth: 35,
        data: data,
    };
    $scope.gridOptions.enableGridMenu = true;

    /*code for chips*/
    $scope.sizes = [
      {Name: 'Small', Type:'Size'},
      {Name: 'Medium', Type:'Size'},
      {Name: 'Large', Type:'Size'},
      {Name: 'Insane', Type:'Size'},
      {Name: 'Infinite', Type:'Size'},
      {Name: 'Mustard', Type:'Dressing'}
    ]
    ;

    /*Code for the chart*/
    c3.generate({
        bindto: '#myChart',
        data: {
            columns: [
              ['data1', 30, 200, 100, 400, 150, 250],
              ['data2', 20, 180, 240, 100, 190, 0],
            ],
            selection: {
                enabled: true,
            },
        },
        zoom: {
            enabled: true,
        },
    });

    /*Code for tabs*/
    $scope.selectedIndex = 0;
    $scope.nextTab = function() {
        var index = ($scope.selectedIndex === 50) ? 0 : $scope.selectedIndex + 1;
        $scope.selectedIndex = index;
    };

    /*Code for forms*/
    $scope.reset = function(form) {
        if (form) {
            form.$setPristine();
            form.$setUntouched();
        }
    };

    /*Code for date range picker*/
    $scope.dateRange = {
        startDate: new Date(),
        endDate: new Date()
    };
    $scope.dateRangeTemplateType = 'inline';
    $scope.dateRangeTemplateTypes = ['popup', 'inline'];

    /*Code for time range picker*/
    $scope.timeRange = {
        startTime: new Date(2016, 0, 1, 8),
        endTime: new Date(2016, 0, 1, 17)
    };
    $scope.disableNextDay = false;

    /*Code for modal*/
    $scope.modalShown = false;
    $scope.toggleModal = function() {
        $scope.modalShown = !$scope.modalShown;
    };

    /*code for pagination*/
    $scope.paginationOptions = {pageNumber: 1, totalPages: 7};
    $scope.getPageData = function(pageIndex) {
        //retrieve the data for given page
{'fraction_non_alphanumeric': 0.18263107979948517, 'fraction_numerical': 0.02262566047960981, 'mean_word_length': 2.1253175275190515, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2685502', 'n_tokens_mistral': 2605, 'n_tokens_neox': 2420, 'n_words': 540}