1(function(){ 2 var single = angular.module('single_module', []); 3 single.controller("HitsController", ['$http', function($http){ 4 var hits_ctrl = this; 5 this.values = { 6 base_url: '', 7 article_id: '', 8 hits: '0' 9 }; 10 11 this.values.base_url = base_url(); 12 this.values.article_id = getArticleID(); 13 this.values.hits = getHits(); 14 15 this.updateHits = function(articleid) { 16 $http({ 17 method: 'POST', 18 url: static_url()+'staticfeeds/hits', 19 data: $.param({ 20 articleid: articleid 21 }), 22 headers: {'Content-Type': 'application/x-www-form-urlencoded'} 23 }) 24 .success(function(data){ 25 // hits_ctrl.values.hits = data.respond; 26 console.log(data); 27 }) 28 .error(function(msg){ 29 // alert('Enexpected Error Occured'); 30 console.log(msg); 31 }); 32 }; 33 34 this.updateHits(this.values.article_id); 35 }]); 36 37 38 var search = angular.module('search_module', []); 39 search.controller("SearchController", ['$http', function($http){ 40 this.values = { 41 keywords: '', 42 category: '0', 43 sort: 'relevance', 44 order: 'ASC', 45 datefrom: '0', 46 dateto: '0', 47 start: 0 48 }; 49 this.search_results = { 50 count: 0 51 }; 52 this.loading = false; 53 var search_ctrl = this; 54 this.searchArticles = function(start) { 55 search_ctrl.values.start = start; 56 search_ctrl.loading = true; 57 $http({ 58 method: 'POST', 59 url: static_url()+'home/search', 60 data: $.param(search_ctrl.values), 61 headers: {'Content-Type': 'application/x-www-form-urlencoded'} 62 }) 63 .success(function(data){ 64 search_ctrl.search_results = data; 65 console.log(data); 66 search_ctrl.loading = false; 67 }) 68 .error(function(msg){ 69 // alert('Enexpected Error Occured'); 70 console.log(msg); 71 search_ctrl.loading = false; 72 }); 73 }; 74 }]); 75})(); 76
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.