1function scrollTo (to, duration) { 2 var scroll_top = window.pageYOffset; 3 if (scroll_top == to) return; 4 // console.log('scrolltop', document.body.scrollTop); 5 // console.log('scrolltop', $("html, body").scrollTop()); 6 7 var diff = to - scroll_top; 8 var scrollStep = Math.PI / (duration / 10); 9 var count = 0; 10 var max_count = duration / 10; 11 start = window.pageYOffset; //element.scrollTop; 12 // console.log('start', start); 13 scrollInterval = setInterval (function () { 14 if (window.pageYOffset != to && count < max_count) { 15 count = count + 1; 16 currPos = start + diff * (0.5 - 0.5 * Math.cos (count * scrollStep)); 17 // console.log(currPos); 18 // document.body.scrollTop = currPos; 19 $ ('html, body').scrollTop (currPos); 20 // window.pageYOffset = currPos; 21 } else { 22 clearInterval (scrollInterval); 23 } 24 }, 10); 25} 26 27function slideTo (elID) { 28 var dest = document.getElementById (elID); 29 var height = 30 window.innerHeight || 31 document.documentElement.clientHeight || 32 document.body.clientHeight; 33 var page_height = document.body.scrollHeight; 34 var dest_pos = Math.min (dest.offsetTop, page_height - height); 35 // console.log('dest', dest_pos); 36 37 scrollTo (dest_pos, 500); 38} 39 40function respondToWindowWidth () { 41 var window_width = 42 window.innerWidth || 43 document.documentElement.clientWidth || 44 document.body.clientWidth; 45 // console.log('window-width', window_width); 46 var base_size = 10; 47 var banner_im = 'src/ims/bg_ice_wide.jpg'; 48 if (window_width >= 2000) { 49 base_size = 16; 50 } else if (window_width >= 1500 && window_width < 2000) { 51 base_size = 13; 52 } else if (window_width >= 576 && window_width < 1500) { 53 if (window_width < 960) { 54 banner_im = 'src/ims/bg_ice_lg.jpg'; 55 } 56 } else if (window_width < 576) { 57 banner_im = 'src/ims/bg_ice_sm.jpg'; 58 $ ('#banner-text').removeClass ('flying-text').addClass ('flying-text-sm'); 59 $ ('#banner-text-sub').removeClass ('md-font').addClass ('sm-font'); 60 $ ('#banner-text-main').removeClass ('xl-font').addClass ('lg-font'); 61 } 62 63 // console.log('font-size', base_size); 64 $ ('body').css ('font-size', base_size + 'px'); 65 $ ('#banner-im').attr ('src', banner_im); 66} 67 68function event_bind () { 69 $ ('#more-pub').on ('show.bs.collapse', function () { 70 $ ('#caret').removeClass ('fa-caret-right').addClass ('fa-caret-down'); 71 }); 72 73 $ ('#more-pub').on ('hide.bs.collapse', function () { 74 $ ('#caret').removeClass ('fa-caret-down').addClass ('fa-caret-right'); 75 }); 76} 77 78function bind_bib_factory (paper) { 79 var parent_ele = $ ('#publication'); 80 var bib = $ ('#bib-' + paper); 81 $ ('#btn-bib-' + paper).popover ({ 82 container: 'body', 83 content: bib, 84 placement: 'top', 85 trigger: 'hover', 86 html: true, 87 boundary: parent_ele, 88 }); 89} 90 91function popover_bind () { 92 bind_bib_factory ('moviesyn'); 93 bind_bib_factory ('fifo'); 94 bind_bib_factory ('cim'); 95 bind_bib_factory ('htc'); 96 bind_bib_factory ('trailer'); 97 bind_bib_factory ('cvpr20sceneseg'); 98 bind_bib_factory ('eccv20movienet'); 99} 100 101function copied_btn (btn) { 102 btn.html ('Copied BibTeX to Clipboard'); 103 btn.addClass ('disabled'); 104} 105 106function recover_btn_copy (btn) { 107 btn.html ('Copy BibTeX to Clipboard'); 108 btn.removeClass ('disabled'); 109} 110 111function copyBib (event, elID) { 112 event.preventDefault (); 113 var btn = $ (event.target); 114 var dest = $ ('#' + elID).html (); 115 var $temp = $ ('<textarea>'); 116 $ ('body').append ($temp); 117 $temp.val (dest).select (); 118 document.execCommand ('copy'); 119 $temp.remove (); 120 121 copied_btn (btn); 122 setTimeout (function () { 123 recover_btn_copy (btn); 124 }, 2000); 125}
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.