<commit_before>// #3    IFFE    self invoked   anonynomous function 
(function () {

    //console.log('controller outside fx');
    var OrdersController = function ($scope, $routeParams) {
        var customerId = $routeParams.customerId;

        // create an orders property 
        $scope.orders = null;

        // init 

        function init() {
            // Search the customers for the customerId
            for(var i=0)
        }


        //console.log('controller inside fx');

        $scope.customers = [
            { name: 'Dave', city: 'Phoenix' },
            { name: 'Tom', city: 'Seattle' }
        ];

        $scope.add = function () {
            var f = document.getElementById('file').files[0],
                r = new FileReader();
            r.onloadend = function (e) {
                var data = e.target.result;
                console.log('send data');
                //http://stackoverflow.com/questions/18571001/file-upload-using-angularjs
                
                //send your binary data via $http or $resource or do anything else with it
            }
            r.readAsBinaryString(f);
        }


    };
OrdersController.$inject = ['$scope', '$routeParams'];

    angular.module('salesApp')
        .controller('OrdersController', OrdersController);<commit_msg>ordercontroller and simbit ang1 and ang2<commit_after>// #3    IFFE    self invoked   anonynomous function 
(function () {

    //console.log('controller outside fx');
    var OrdersController = function ($scope, $routeParams) {
        var customerId = $routeParams.customerId;

        // create an orders property 
        $scope.orders = null;

        // init 

        function init() {
            // Search the customers for the customerId
            for(var i=0, len=$scope.customers.length;i<len;i++){
                if($scope.customers[i].id === parseInt(customerId)){
                    $scope.orders = $scope.customers[i].orders;
                    break;
                }
            }
        }


               $scope.customers= [
            {
                id: 1, 
                joined: '2000-12-02', 
                name:'John', 
                city:'Chandler', 
                orderTotal: 9.9956,
                orders: [
                    {
                        id: 1,
                        product: 'Shoes',
                        total: 9.9956
                    }
                ]
            }, 
            {
                id: 2, 
                joined: '1965-01-25',
                name:'Zed', 
                city:'Las Vegas', 
                orderTotal: 19.99,
                orders: [
                    {
                        id: 2,
                        product: 'Baseball',
                        total: 9.995
                    },
                    {
                        id: 3,
                        product: 'Bat',
                        total: 9.995
                    }
                ]
            },
            {
                id: 3, 
                joined: '1944-06-15',
                name:'Tina', 
                city:'New York', 
                orderTotal:44.99,
                orders: [
                    {
                        id: 4,
                        product: 'Headphones',
                        total: 44.99
                    }
                ]
            }, 
            {
                id: 4, 
                joined: '1995-03-28',
                name:'Dave', 
                city:'Seattle', 
                orderTotal:101.50,
                orders: [
                    {
                        id: 5,
                        product: 'Kindle',
                        total: 101.50
                    }
                ]
            }
        ]; // end scope.customers
        
        init();
    }; // end controller 


    

    OrdersController.$inject = ['$scope', '$routeParams'];

    angular.module('salesApp')
        .controller('OrdersController', OrdersController);
{'fraction_non_alphanumeric': 0.10832298136645963, 'fraction_numerical': 0.023850931677018634, 'mean_word_length': 0.9439884113954611, 'pattern_counts': {'":': 0, '<': 4, '<?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': '6621180', 'n_tokens_mistral': 1124, 'n_tokens_neox': 949, 'n_words': 210}