<commit_before>'use strict';

angular.module('twaAutocompletionApp', ['ui','ezfb','ngCookies','ngResource','ui.bootstrap','BlockUI','stellar.directives','timer'])
.config(function ($routeProvider) {
  $routeProvider
  .when('/', {
    templateUrl: 'views/main.html'
  })
  .when('/about',{
    templateUrl: 'views/about.html',
    controller: 'AboutCtrl'
  })
  .when('/contact', {
    templateUrl: 'views/contact.html',
    controller: 'MediaCtrl'
  })
  .when('/jury', {
    templateUrl: 'views/jury.html',
    controller: 'JuryCtrl'
  })
  .when('/soirée', {
    templateUrl: 'views/party.html',
    controller: 'PartyCtrl'
  })
  .when('/media', {
    templateUrl: 'views/media.html',
    controller: 'MediaCtrl'
  })
  .otherwise({
    redirectTo: '/'
  });
})
.config(function ($FBProvider) {
  $FBProvider.setInitParams({
    // This is my FB app id for plunker demo app
    appId: '536088209798325'
  });  
})
.config(['$httpProvider', function($httpProvider) {
//  $httpProvider.defaults.useXDomain = true;
//  delete $httpProvider.defaults.headers.common['X-Requested-With'];
}])
.directive('uiScroll',['ui.config', function(uiConfig) {
  'use strict';
  uiConfig.uiScrollr = uiConfig.uiSCroll || {}; 
  return {
    restrict: 'A',
    transclude: true,
    scope: {
      values: '=ngModel',
    },
    template: '<div class="scroll-pane"><div ng-transclude></div></div>',
    link:function(scope,elm,$attrs,uiEvent ) {

     var expression,
     options = {
     };
     if ($attrs.uiScroll) {
      expression = scope.$eval($attrs.uiScroll);
    } else {
      expression = {};
    }

             //Set the options from the directive's configuration
             angular.extend(options, uiConfig.uiScroll, expression);
             console.log(options);
             elm.jScrollPane(options);

           },
           replace: true

         }
       }]).
run(function($window, $FB, $rootScope, $location, $anchorScroll, $routeParams) {

  $rootScope.routeList = ['Home','About','Media','Jury','Soirée','Contact'];

  $rootScope.$on('$locationChangeStart', function (nextLocation, currentLocation) {

  });
<commit_msg>Image Preload<commit_after>'use strict';

angular.module('twaAutocompletionApp', ['ui','ezfb','ngCookies','ngResource','ui.bootstrap','BlockUI','stellar.directives','timer'])
.config(function ($routeProvider) {
  $routeProvider
  .when('/', {
    templateUrl: 'views/main.html'
  })
  .when('/about',{
    templateUrl: 'views/about.html',
    controller: 'AboutCtrl'
  })
  .when('/contact', {
    templateUrl: 'views/contact.html',
    controller: 'MediaCtrl'
  })
  .when('/jury', {
    templateUrl: 'views/jury.html',
    controller: 'JuryCtrl'
  })
  .when('/soirée', {
    templateUrl: 'views/party.html',
    controller: 'PartyCtrl'
  })
  .when('/media', {
    templateUrl: 'views/media.html',
    controller: 'MediaCtrl'
  })
  .otherwise({
    redirectTo: '/'
  });
})
.config(function ($FBProvider) {
  $FBProvider.setInitParams({
    // This is my FB app id for plunker demo app
    appId: '536088209798325'
  });  
})
.config(['$httpProvider', function($httpProvider) {
//  $httpProvider.defaults.useXDomain = true;
//  delete $httpProvider.defaults.headers.common['X-Requested-With'];
}])
.directive('uiScroll',['ui.config', function(uiConfig) {
  'use strict';
  uiConfig.uiScrollr = uiConfig.uiSCroll || {}; 
  return {
    restrict: 'A',
    transclude: true,
    scope: {
      values: '=ngModel',
    },
    template: '<div class="scroll-pane"><div ng-transclude></div></div>',
    link:function(scope,elm,$attrs,uiEvent ) {

     var expression,
     options = {
     };
     if ($attrs.uiScroll) {
      expression = scope.$eval($attrs.uiScroll);
    } else {
      expression = {};
    }

             //Set the options from the directive's configuration
             angular.extend(options, uiConfig.uiScroll, expression);
             console.log(options);
             elm.jScrollPane(options);

           },
           replace: true

         }
       }]).
run(function($window, $FB, $rootScope, $location, $anchorScroll, $routeParams) {



  function preloadImages(array) {
    if (!preloadImages.list) {
      preloadImages.list = [];
    }
    for (var i = 0; i < array.length; i++) {
      var img = new Image();
      img.src = array[i];
      preloadImages.list.push(img);
    }
  }

  var imageURLs = [
  /*"/images/1.jpg",
  "/images/2.jpg",
  "/images/3.jpg",
  "/images/4.jpg",
  "/images/5.jpg",
  "/images/6.jpg",
  "/images/7.jpg",
  "/images/8.jpg",
  "/images/tr-red-footer.png",
  "/images/tr-red-3.png",
  "/images/tr-red-1.png",
  "/images/tr-plax-red.png",
  "/images/tr-plax-green.png",
  "/images/tr-party-header.png",
  "/images/tr-middle-contact.png",
  "/images/tr-middle-3.png",
  "/images/tr-middle-2.png",
  "/images/tr-middle-1.png",
  "/images/tr-media-footer.png",
  "/images/tr-header-end.png",
  "/images/tr-header-9.png",
  "/images/tr-header-8.png",
  "/images/tr-header-4.png",
  "/images/tr-header-3.png",
  "/images/tr-header-2.png",
  "/images/tr-header-1.png",
  "/images/tr-footer-about.png",
  "/images/tr-footer-7.png",
  "/images/tr-footer-6.png",
  "/images/tr-footer-5.png",
  "/images/tr-footer-4.png",
  "/images/tr-footer-3.png",
  "/images/tr-footer-2.png",
  "/images/tr-footer-1.png",
  "/images/tr-end.png",
  "/images/tr-black-party.png",
  "/images/tr-black-header.png",
  "/images/tr-black-footer.png",
  "/images/tr-black-2.png",
  "/images/amel-smaoui.png",
  "/images/amina-abdellatif.png",
  "/images/fatma-ben-haj-ali.png",
  "/images/karim-ben-amor.png",
  "/images/khaled-koubaa.png",
  "/images/mohamed-ali-souissi.png"*/
  ];

  preloadImages(imageURLs);



  $rootScope.routeList = ['Home','About','Media','Jury','Soirée','Contact'];

  $rootScope.$on('$locationChangeStart', function (nextLocation, currentLocation) {

  });

{'fraction_non_alphanumeric': 0.19911126303196036, 'fraction_numerical': 0.009912835412749958, 'mean_word_length': 3.033080634045486, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 11, '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': '4395286', 'n_tokens_mistral': 2092, 'n_tokens_neox': 2032, 'n_words': 292}