1//Updated on 11/16/2017 @ 2:57PM 2 3jQuery(document).ready(function() { 4 5}); 6 7//////////////////////////////////////////////////////////////////////////// 8 9function CreateVimeoVideos(url,target) { 10jQuery('<div class="Row"></div>').appendTo(target); //first row 11jQuery('<div class="Row"></div>').appendTo(target); //second row 12jQuery('<div class="Row"></div>').appendTo(target); //third row 13GetVimeoVideos(url,target); 14}; 15 16/////////////////////////////////////////////////////////////////////////// 17 18function GetVimeoVideos(url,target) { 19var request = jQuery.get(url); 20request.success(function(xml) { 21var jQueryvideos = jQuery("video", xml); 22var vCount = 1; 23jQueryvideos.each(function(index, x) { 24if (vCount <= 5) { 25var vTitle = jQuery(x).find('title').text(); 26var vViews = jQuery(x).find('stats_number_of_plays').text(); 27var vURL = jQuery(x).find('url').text(); 28vURL = vURL + '?autoplay=1'; 29var vThumb = jQuery(x).find('thumbnail_large').text(); 30vThumb = vThumb.replace("_640.jpg", "_640x360.jpg"); //use correctly cropped/resized thumbnail 31var vDuration = GetTime(jQuery(x).find('duration').text()); 32var vDurationDiv = '<div>' + vDuration + '</div>'; 33var vThumbDiv = '<div><a href="' + vURL + '" target="_blank"><img src="' + vThumb + '" class="VimeoThumb"></a></div>'; 34var vTitleDiv = '<div><a href="' + vURL + '" target="_blank">' + vTitle + '</a></div>'; 35//var vBlock = '<div class="Block">' + vDurationDiv + vThumbDiv + vTitleDiv + '</div>'; 36var vBlock = '<div class="Block">' + vDurationDiv + vThumbDiv + '</div>'; 37 38if (vCount == 1) { 39jQuery(vBlock).appendTo(target + " .Row:nth-child(1)"); 40}; 41if (vCount == 2 || vCount == 3) { 42jQuery(vBlock).appendTo(target + " .Row:nth-child(2)"); 43}; 44if (vCount >=4) { 45jQuery(vBlock).appendTo(target + " .Row:nth-child(3)"); 46}; 47vCount ++; 48}; // <=5 49}); //each 50}); //request.success 51request.error(function(){ 52jQuery("Cannot fetch videos.").appendTo(target); 53}); 54}; 55 56/////////////////////////////////////////////////////////////////////////// 57 58function GetTime(seconds) { 59var hours = parseInt( seconds / 3600 ) % 24; 60var minutes = parseInt( seconds / 60 ) % 60; 61var seconds = Math.floor(seconds % 60); 62if (hours < 10) { 63hours = "0" + hours; 64}; 65if (minutes < 10) { 66minutes = "0" + minutes; 67}; 68if (seconds < 10) { 69seconds = "0" + seconds; 70}; 71if (hours > 0) { 72hours = hours + ":"; 73} else { 74hours = ""; 75}; 76minutes = minutes + ":"; 77var number = hours + minutes + seconds; 78return number; 79};
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.