<commit_before>﻿
@{
    ViewBag.Title = "exampleApp";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>exampleApp</h2>
<div ng-app="exampleApp">
    <div ng-controller="defaultCtrl">
        <div class="panel panel-default">
            <div class="panel-body">
                <table class="table table-striped table-bordered table-hover">
                    <thead><tr><th>Name</th><th>Category</th><th>Price</th></tr></thead>
                    <tbody>
                        <tr ng-hide="products.length">
                            <td colspan="3" class="text-center">No Data</td>
                        </tr>
                        <tr ng-repeat="item in products">
                            <td>{{item.ID}}</td>
                            <td>{{item.Name}}</td>
                            <td>{{item.CreateDate | date:"d,MMM,y"}}</td>
                        </tr>
                    </tbody>
                </table>
                <p>
                    <button class="btn btn-primary"
                            ng-click="loadData()">
                        Load Data
                    </button>
                </p>
            </div>
        </div>
    </div>
</div>
@section Scripts {
<script>
        angular.module("exampleApp", [])
        .config(function ($httpProvider) {
            $httpProvider.interceptors.push(function () {
                return {
                    request: function (config) {
                        //config.url = "/productData.json";
                        config.url = config.url;
                        return config;
                    },
                    response: function (response) {
                        console.log("Data Count: " + response.data.length);
                        return response;
                    }
                }
            });
        })
        .controller("defaultCtrl", function ($scope, $http) {
            $scope.loadData = function () {
                var url = '/productData.json';
                url = '/api/ExtendDefines';
                $http.get(url).success(function (data) {
                    $scope.products = data;
                }).error(function (err) {
                    alert(err);
                });
            }
        });
</script>
}<commit_msg>modify<commit_after>﻿
@{
    ViewBag.Title = "exampleApp";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>exampleApp</h2>
<div ng-app="exampleApp">
    <div ng-controller="defaultCtrl">
        <div class="panel panel-default">
            <div class="panel-body">
                <table class="table table-striped table-bordered table-hover">
                    <thead><tr><th>Name</th><th>Category</th><th>Price</th></tr></thead>
                    <tbody>
                        <tr ng-hide="products.length">
                            <td colspan="3" class="text-center">No Data</td>
                        </tr>
                        <tr ng-repeat="item in products">
                            <td>{{item.ID}}</td>
                            <td>{{item.Name}}</td>
                            <td>{{item.CreateDate | date:"d,MMM,y"}}</td>
                        </tr>
                    </tbody>
                </table>
                <p>
                    <button class="btn btn-primary"
                            ng-click="loadData()">
                        Load Data
                    </button>
                </p>
            </div>
        </div>
    </div>
</div>
@section Scripts {
<script>
        angular.module("exampleApp", [])
        //.config(function ($httpProvider) {
        //    $httpProvider.interceptors.push(function () {
        //        return {
        //            request: function (config) {
        //                //config.url = "/productData.json";
        //                config.url = config.url;
        //                alert(config.url);
        //                return config;
        //            },
        //            response: function (response) {
        //                console.log("Data Count: " + response.data.length);
        //                return response;
        //            }
        //        }
        //    });
        //})
        //.service("imageService", function ($http) {
        //    return {
        //        getImages: function (requestUrl) {
        //            $http.get(requestUrl = '/productData.json', { responseType: JSON });
        //        }
        //    }
        //})
        .controller("defaultCtrl", function ($scope, $http) {
            $scope.loadData = function () {
                var url = '/productData.json';
                url = '/api/ExtendDefines';                
                $http.get(url).success(function (data) {
                    
                    $scope.products = data;
                }).error(function (err) {
                    alert(err);
                });
            }
            
            //$scope.getImg = function (requestUrl) {
            //    imageService.getImages(requestUrl).success(function (result) {
            //        return result;
            //    });
            //}
        });
</script>
}
{'fraction_non_alphanumeric': 0.14531069085295253, 'fraction_numerical': 0.0011578541103820917, 'mean_word_length': 1.0120341614906831, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, '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': '5309528', 'n_tokens_mistral': 1361, 'n_tokens_neox': 1275, 'n_words': 213}