1angular.module("myApp.soundcloud", ['ngRoute']) 2 3.controller('soundcloudCtrl', function($scope, $http, $location, $routeParams, $log, soundcloudService) { 4 5 var svg = document.createElementNS("http://www.w3.org/2000/svg", 'svg') 6 var xform = svg.createSVGMatrix() 7 var userId 8 9 xform.a = 1 10 xform.b = 0 11 xform.c = 0 12 xform.d = 1 13 xform.e = 0 14 xform.f = 0 15 16 $scope.xform = xform 17 $scope.currentPlatform = "Soundcloud" 18 19 $scope.init = function() { 20 $scope.type = "users" 21 $scope.playlist = true; 22 $scope.query = $routeParams.query 23 24 soundcloudService.init() 25 26 if ($scope.query) { 27 soundcloudService.search($scope.query, $scope.type, soundcloudService.listResults).then(function(data) { 28 $scope.results = data 29 }) 30 }; 31 } 32 33 $scope.goSearch = function() { 34 $location.path('/soundcloud/search').search({ 35 query: $scope.query 36 }); 37 } 38 39 $scope.setType = function(type) { 40 $scope.type = type; 41 $scope.viewTitle = "Search " + type; 42 } 43 44 $scope.search = function() { 45 soundcloudService.search(this.query, $scope.type, soundcloudService.listResults).then(function(data) { 46 $scope.results = data 47 }) 48 } 49 50 $scope.searchPlaylists = function() { 51 $scope.type = "playlists" 52 $scope.results = [] 53 soundcloudService.searchPlaylists(this.query).then(function(data) { 54 for (var i = data.length - 1; i >= 0; i--) { 55 $scope.results.push(data[i]) 56 } 57 }) 58 } 59 60 $scope.loadMore = function() { 61 soundcloudService.loadMore().then(function(data) { 62 $scope.results.push(data) 63 }) 64 } 65 66 $scope.tabulate = function(state) { 67 $scope.playlist = state; 68 } 69})
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.