PageSourceSearch

https://0uyangsheng.github.io/tags/

html 0uyangsheng.github.io collected 2026-10-03 08:31:08 UTC 27,895 bytes, 1,049 lines download raw bytes

1<!DOCTYPE html>
2
3
4
5  
6
7
8<html class="theme-next pisces use-motion" lang="">
9<head>
10  <meta charset="UTF-8"/>
11<meta http-equiv="X-UA-Compatible" content="IE=edge" />
12<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
13<meta name="theme-color" content="#222">
14
15
16  <meta name="baidu-site-verification" content="sGLMwLsGrI" />
17
18
19
20  <meta name="google-site-verification" content="Vo5PYeWe8UVJtbiL3KncyrtMfKf_WWPBx7ciytWx1C0" />
21
22
23
24
25
26
27
28
29
30<meta http-equiv="Cache-Control" content="no-transform" />
31<meta http-equiv="Cache-Control" content="no-siteapp" />
32
33
34
35  <meta name="google-site-verification" content="true" />
36
37
38
39
40
41
42
43  <meta name="baidu-site-verification" content="true" />
44
45
46
47
48
49
50
51  
52  
53  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />
54
55
56
57
58  
59  
60  
61  
62
63  
64    
65    
66  
67
68  
69
70  
71
72  
73
74  
75
76  
77    
78    
79    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
80  
81
82
83
84
85
86
87<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />
88
89<link href="/css/main.css?v=5.1.2" rel="stylesheet" type="text/css" />
90
91
92  <meta name="keywords" content="linux,web,android,uboot,drivers" />
93
94
95
96
97
98
99
100
101  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.2" />
102
103
104
105
106
107
108<meta property="og:type" content="website">
109<meta property="og:title" content="tags">
110<meta property="og:url" content="http://yoursite.com/tags/index.html">
111<meta property="og:site_name" content="OuyangSheng&#39;s Blog">
112<meta property="og:locale" content="default">
113<meta property="og:updated_time" content="2018-04-17T08:27:01.443Z">
114<meta name="twitter:card" content="summary">
115<meta name="twitter:title" content="tags">
116
117
118
119<script type="text/javascript" id="hexo.configurations">
120  var NexT = window.NexT || {};
121  var CONFIG = {
122    root: '/',
123    scheme: 'Pisces',
124    sidebar: {"position":"left","display":"post","offset":12,"offset_float":12,"b2t":false,"scrollpercent":true,"onmobile":false},
125    fancybox: true,
126    tabs: true,
127    motion: true,
128    duoshuo: {
129      userId: '0',
130      author: 'Author'
131    },
132    algolia: {
133      applicationID: '',
134      apiKey: '',
135      indexName: '',
136      hits: {"per_page":10},
137      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
138    }
139  };
140</script>
140
141
142
143
144  <link rel="canonical" href="http://yoursite.com/tags/"/>
145
146
147
148
149
150  <title>tags | OuyangSheng's Blog</title>
151  
152
153
154
155
156<script>
vendor: 362 bytes, lines 156-161
156
157  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
158            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
159          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
160  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
161  ga('create', '
161UA-117742988-1
vendor: 38 bytes, lines 161-162
161', 'auto');
162  ga('send', 'pageview');
163</script>
163
164
165
166
167
168
169
170
171
172
173
174
175</head>
176
177<body itemscope itemtype="http://schema.org/WebPage" lang="default">
178
179  
180  
181    
182  
183
184  <div class="container sidebar-position-left page-post-detail ">
185    <div class="headband"></div>
186
187    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
188      <div class="header-inner"><div class="site-brand-wrapper">
189  <div class="site-meta ">
190    
191
192    <div class="custom-logo-site-title">
193      <a href="/"  class="brand" rel="start">
194        <span class="logo-line-before"><i></i></span>
195        <span class="site-title">OuyangSheng's Blog</span>
196        <span class="logo-line-after"><i></i></span>
197      </a>
198    </div>
199      
200        <h1 class="site-subtitle" itemprop="description">Thinking,Tech....</h1>
201      
202  </div>
203
204  <div class="site-nav-toggle">
205    <button>
206      <span class="btn-bar"></span>
207      <span class="btn-bar"></span>
208      <span class="btn-bar"></span>
209    </button>
210  </div>
211</div>
212
213<nav class="site-nav">
214  
215
216  
217    <ul id="menu" class="menu">
218      
219        
220        <li class="menu-item menu-item-home">
221          <a href="/" rel="section">
222            
223              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
224            
225            Home
226          </a>
227        </li>
228      
229        
230        <li class="menu-item menu-item-categories">
231          <a href="/categories/" rel="section">
232            
233              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
234            
235            Categories
236          </a>
237        </li>
238      
239        
240        <li class="menu-item menu-item-archives">
241          <a href="/archives/" rel="section">
242            
243              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
244            
245            Archives
246          </a>
247        </li>
248      
249        
250        <li class="menu-item menu-item-tags">
251          <a href="/tags/" rel="section">
252            
253              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
254            
255            Tags
256          </a>
257        </li>
258      
259
260      
261        <li class="menu-item menu-item-search">
262          
263            <a href="javascript:;" class="popup-trigger">
264          
265            
266              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
267            
268            Search
269          </a>
270        </li>
271      
272    </ul>
273  
274
275  
276    <div class="site-search">
277      
278  <div class="popup search-popup local-search-popup">
279  <div class="local-search-header clearfix">
280    <span class="search-icon">
281      <i class="fa fa-search"></i>
282    </span>
283    <span class="popup-btn-close">
284      <i class="fa fa-times-circle"></i>
285    </span>
286    <div class="local-search-input-wrapper">
287      <input autocomplete="off"
288             placeholder="Searching..." spellcheck="false"
289             type="text" id="local-search-input">
290    </div>
291  </div>
292  <div id="local-search-result"></div>
293</div>
294
295
296
297    </div>
298  
299</nav>
300
301
302
303 </div>
304    </header>
305
306    <main id="main" class="main">
307      <div class="main-inner">
308        <div class="content-wrap">
309          <div id="content" class="content">
310            
311
312  <div id="posts" class="posts-expand">
313    
314    
315    
316    <div class="post-block page">
317      <header class="post-header">
318
319	<h2 class="post-title" itemprop="name headline">tags</h2>
320
321
322
323</header>
324
325      
326      
327      
328      <div class="post-body">
329        
330        
331          <div class="tag-cloud">
332            <div class="tag-cloud-title">
333                5 tags in total
334            </div>
335            <div class="tag-cloud-tags">
336              <a href="/tags/Android/" style="font-size: 12px; color: #ccc">Android</a> <a href="/tags/Linux/" style="font-size: 30px; color: #111">Linux</a> <a href="/tags/shell/" style="font-size: 12px; color: #ccc">shell</a> <a href="/tags/uboot/" style="font-size: 12px; color: #ccc">uboot</a> <a href="/tags/web/" style="font-size: 12px; color: #ccc">web</a>
337            </div>
338          </div>
339        
340      </div>
341      
342      
343      
344    </div>
345    
346    
347    
348  </div>
349
350
351          </div>
352          
353
354
355          
356  <div class="comments" id="comments">
357    
358      <div id="hypercomments_widget"></div>
359    
360  </div>
361
362
363        </div>
364        
365          
366  
367  <div class="sidebar-toggle">
368    <div class="sidebar-toggle-line-wrap">
369      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
370      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
371      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
372    </div>
373  </div>
374
375  <aside id="sidebar" class="sidebar">
376    
377    <div class="sidebar-inner">
378
379      
380
381      
382
383      <section class="site-overview sidebar-panel sidebar-panel-active">
384        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
385          <img class="site-author-image" itemprop="image"
386               src="/images/avatar.gif"
387               alt="OuyangSheng" />
388          <p class="site-author-name" itemprop="name">OuyangSheng</p>
389           
390              <p class="site-description motion-element" itemprop="description"></p>
391           
392        </div>
393        <nav class="site-state motion-element">
394
395          
396            <div class="site-state-item site-state-posts">
397              <a href="/archives/">
398                <span class="site-state-item-count">9</span>
399                <span class="site-state-item-name">posts</span>
400              </a>
401            </div>
402          
403
404          
405            
406            
407            <div class="site-state-item site-state-categories">
408              <a href="/categories/index.html">
409                <span class="site-state-item-count">5</span>
410                <span class="site-state-item-name">categories</span>
411              </a>
412            </div>
413          
414
415          
416            
417            
418            <div class="site-state-item site-state-tags">
419              <a href="/tags/index.html">
420                <span class="site-state-item-count">5</span>
421                <span class="site-state-item-name">tags</span>
422              </a>
423            </div>
424          
425
426        </nav>
427
428        
429
430        <div class="links-of-author motion-element">
431          
432            
433              <span class="links-of-author-item">
434                <a href="https://github.com/0uyangsheng" target="_blank" title="GitHub">
435                  
436                    <i class="fa fa-fw fa-github"></i>
437                  
438                    
439                      GitHub
440                    
441                </a>
442              </span>
443            
444          
445        </div>
446
447        
448        
449
450        
451        
452          <div class="links-of-blogroll motion-element links-of-blogroll-inline">
453            <div class="links-of-blogroll-title">
454              <i class="fa  fa-fw fa-globe"></i>
455              
456            </div>
457            <ul class="links-of-blogroll-list">
458              
459                <li class="links-of-blogroll-item">
460                  <a href="https://elonmusknews.org/" title="获取 Elon Musk 的新闻" target="_blank">获取 Elon Musk 的新闻</a>
461                </li>
462              
463                <li class="links-of-blogroll-item">
464                  <a href="https://reuixiy.github.io/technology/computer/computer-aided-art/2017/06/09/hexo-next-optimization.html" title="这个建站教程diao" target="_blank">这个建站教程diao</a>
465                </li>
466              
467            </ul>
468          <div id="days"></div>
469</script>
vendor: 1 bytes, line 469
469
470<script language="javascript">
471function show_date_time(){
472window.setTimeout("show_date_time()", 1000);
473BirthDay=new Date("04/18/2018 10:00:00");
474today=new Date();
475timeold=(today.getTime()-BirthDay.getTime());
476sectimeold=timeold/1000
477secondsold=Math.floor(sectimeold);
478msPerDay=24*60*60*1000
479e_daysold=timeold/msPerDay
480daysold=Math.floor(e_daysold);
481e_hrsold=(e_daysold-daysold)*24;
482hrsold=setzero(Math.floor(e_hrsold));
483e_minsold=(e_hrsold-hrsold)*60;
484minsold=setzero(Math.floor((e_hrsold-hrsold)*60));
485seconds=setzero(Math.floor((e_minsold-minsold)*60));
486document.getElementById('days').innerHTML="已运行"+daysold+"天"+hrsold+"小时"+minsold+"分"+seconds+"秒";
487}
488function setzero(i){
489if (i<10)
490{i="0" + i};
491return i;
492}
493show_date_time();
494</script>
494
495
496          </div>
497        
498
499       
500
501      </section>
502
503      
504
505      
506
507    </div>
508  </aside>
509
510
511        
512      </div>
513    </main>
514
515    <footer id="footer" class="footer">
516      <div class="footer-inner">
517        <div class="copyright" >
518  
519  &copy; 
520  <span itemprop="copyrightYear">2018</span>
521  <span class="with-love">
522    <i class="fa fa-heart"></i>
523  </span>
524  <span class="author" itemprop="copyrightHolder">OuyangSheng</span>
525</div>
526
527
528<div class="powered-by">
529  Powered by <a class="theme-link" href="https://hexo.io">Hexo</a>
530</div>
531
532<div class="theme-info">
533  Theme -
534  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
535    NexT.Pisces
536  </a>
537</div>
538
539
540        
541<div class="busuanzi-count">
542  
542<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
542
543
544  
545    <span class="site-uv">
546      <i class="fa fa-user"></i>
547      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
548      
549    </span>
550  
551
552  
553    <span class="site-pv">
554      <i class="fa fa-eye"></i>
555      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
556      
557    </span>
558  
559</div>
560
561
562        
563      </div>
564    </footer>
565
566    
567      <div class="back-to-top">
568        <i class="fa fa-arrow-up"></i>
569        
570          <span id="scrollpercent"><span>0</span>%</span>
571        
572      </div>
573    
574
575  </div>
576
577  
578
579<script type="text/javascript">
580  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
581    window.Promise = null;
582  }
583</script>
583
584
585
586
587
588
589
590
591
592
593  
594
595
596
597
598
599
600
601
602
603
604
605
606  
607  
607<script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
607
608
609  
610  
610<script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
610
611
612  
613  
613<script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
613
614
615  
616  
616<script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
616
617
618  
619  
619<script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
619
620
621  
622  
622<script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
622
623
624
625  
626
627
628  
628<script type="text/javascript" src="/js/src/utils.js?v=5.1.2"></script>
628
629
630  
630<script type="text/javascript" src="/js/src/motion.js?v=5.1.2"></script>
630
631
632
633
634  
635  
636
637
638  
638<script type="text/javascript" src="/js/src/affix.js?v=5.1.2"></script>
638
639
640  
640<script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.1.2"></script>
640
641
642
643
644  
645    
645<script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.2"></script>
vendor: 1 bytes, line 645
645
646<script type="text/javascript" src="/js/src/post-details.js?v=5.1.2"></script>
646
647
648  
649
650  
651
652
653  
653<script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.2"></script>
653
654
655
656
657  
658
659
660  
661
662
663
664
665	
666
667		
667<script type="text/javascript">
668		_hcwp = window._hcwp || [];
669
670		_hcwp.push({widget:"Bloggerstream", widget_id: 103842, selector:".hc-comment-count", label: "{\%COUNT%\}" });
671
672		
673		_hcwp.push({widget:"Stream", widget_id: 103842, xid: "tags/index.html"});
674		
675
676		(function() {
677		if("HC_LOAD_INIT" in window)return;
678		HC_LOAD_INIT = true;
679		var lang = (navigator.language || navigator.systemLanguage || navigator.userLanguage || "en").substr(0, 2).toLowerCase();
680		var hcc = document.createElement("script"); hcc.type = "text/javascript"; hcc.async = true;
681		hcc.src = ("https:" == document.location.protocol ? "https" : "http")+"://w.hypercomments.com/widget/hc/103842/"+lang+"/widget.js";
682		var s = document.getElementsByTagName("script")[0];
683		s.parentNode.insertBefore(hcc, s.nextSibling);
684		})();
685		</script>
685
686
687	
688
689
690
691
692
693
694
695
696
697
698  
699
700  
700<script type="text/javascript">
701    // Popup Window;
702    var isfetched = false;
703    var isXml = true;
704    // Search DB path;
705    var search_path = "search.xml";
706    if (search_path.length === 0) {
707      search_path = "search.xml";
708    } else if (/json$/i.test(search_path)) {
709      isXml = false;
710    }
711    var path = "/" + search_path;
712    // monitor main search box;
713
714    var onPopupClose = function (e) {
715      $('.popup').hide();
716      $('#local-search-input').val('');
717      $('.search-result-list').remove();
718      $('#no-result').remove();
719      $(".local-search-pop-overlay").remove();
720      $('body').css('overflow', '');
721    }
722
723    function proceedsearch() {
724      $("body")
725        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
726        .css('overflow', 'hidden');
727      $('.search-popup-overlay').click(onPopupClose);
728      $('.popup').toggle();
729      var $localSearchInput = $('#local-search-input');
730      $localSearchInput.attr("autocapitalize", "none");
731      $localSearchInput.attr("autocorrect", "off");
732      $localSearchInput.focus();
733    }
734
735    // search function;
736    var searchFunc = function(path, search_id, content_id) {
737      'use strict';
738
739      // start loading animation
740      $("body")
741        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
742          '<div id="search-loading-icon">' +
743          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
744          '</div>' +
745          '</div>')
746        .css('overflow', 'hidden');
747      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');
748
749      $.ajax({
750        url: path,
751        dataType: isXml ? "xml" : "json",
752        async: true,
753        success: function(res) {
754          // get the contents from search data
755          isfetched = true;
756          $('.popup').detach().appendTo('.header-inner');
757          var datas = isXml ? $("entry", res).map(function() {
758            return {
759              title: $("title", this).text(),
760              content: $("content",this).text(),
761              url: $("url" , this).text()
762            };
763          }).get() : res;
764          var input = document.getElementById(search_id);
765          var resultContent = document.getElementById(content_id);
766          var inputEventFunction = function() {
767            var searchText = input.value.trim().toLowerCase();
768            var keywords = searchText.split(/[\s\-]+/);
769            if (keywords.length > 1) {
770              keywords.push(searchText);
771            }
772            var resultItems = [];
773            if (searchText.length > 0) {
774              // perform local searching
775              datas.forEach(function(data) {
776                var isMatch = false;
777                var hitCount = 0;
778                var searchTextCount = 0;
779                var title = data.title.trim();
780                var titleInLowerCase = title.toLowerCase();
781                var content = data.content.trim().replace(/<[^>]+>/g,"");
782                var contentInLowerCase = content.toLowerCase();
783                var articleUrl = decodeURIComponent(data.url);
784                var indexOfTitle = [];
785                var indexOfContent = [];
786                // only match articles with not empty titles
787                if(title != '') {
788                  keywords.forEach(function(keyword) {
789                    function getIndexByWord(word, text, caseSensitive) {
790                      var wordLen = word.length;
791                      if (wordLen === 0) {
792                        return [];
793                      }
794                      var startPosition = 0, position = [], index = [];
795                      if (!caseSensitive) {
796                        text = text.toLowerCase();
797                        word = word.toLowerCase();
798                      }
799                      while ((position = text.indexOf(word, startPosition)) > -1) {
800                        index.push({position: position, word: word});
801                        startPosition = position + wordLen;
802                      }
803                      return index;
804                    }
805
806                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
807                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
808                  });
809                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
810                    isMatch = true;
811                    hitCount = indexOfTitle.length + indexOfContent.length;
812                  }
813                }
814
815                // show search results
816
817                if (isMatch) {
818                  // sort index by position of keyword
819
820                  [indexOfTitle, indexOfContent].forEach(function (index) {
821                    index.sort(function (itemLeft, itemRight) {
822                      if (itemRight.position !== itemLeft.position) {
823                        return itemRight.position - itemLeft.position;
824                      } else {
825                        return itemLeft.word.length - itemRight.word.length;
826                      }
827                    });
828                  });
829
830                  // merge hits into slices
831
832                  function mergeIntoSlice(text, start, end, index) {
833                    var item = index[index.length - 1];
834                    var position = item.position;
835                    var word = item.word;
836                    var hits = [];
837                    var searchTextCountInSlice = 0;
838                    while (position + word.length <= end && index.length != 0) {
839                      if (word === searchText) {
840                        searchTextCountInSlice++;
841                      }
842                      hits.push({position: position, length: word.length});
843                      var wordEnd = position + word.length;
844
845                      // move to next position of hit
846
847                      index.pop();
848                      while (index.length != 0) {
849                        item = index[index.length - 1];
850                        position = item.position;
851                        word = item.word;
852                        if (wordEnd > position) {
853                          index.pop();
854                        } else {
855                          break;
856                        }
857                      }
858                    }
859                    searchTextCount += searchTextCountInSlice;
860                    return {
861                      hits: hits,
862                      start: start,
863                      end: end,
864                      searchTextCount: searchTextCountInSlice
865                    };
866                  }
867
868                  var slicesOfTitle = [];
869                  if (indexOfTitle.length != 0) {
870                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
871                  }
872
873                  var slicesOfContent = [];
874                  while (indexOfContent.length != 0) {
875                    var item = indexOfContent[indexOfContent.length - 1];
876                    var position = item.position;
877                    var word = item.word;
878                    // cut out 100 characters
879                    var start = position - 20;
880                    var end = position + 80;
881                    if(start < 0){
882                      start = 0;
883                    }
884                    if (end < position + word.length) {
885                      end = position + word.length;
886                    }
887                    if(end > content.length){
888                      end = content.length;
889                    }
890                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
891                  }
892
893                  // sort slices in content by search text's count and hits' count
894
895                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
896                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
897                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
898                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
899                      return sliceRight.hits.length - sliceLeft.hits.length;
900                    } else {
901                      return sliceLeft.start - sliceRight.start;
902                    }
903                  });
904
905                  // select top N slices in content
906
907                  var upperBound = parseInt('1');
908                  if (upperBound >= 0) {
909                    slicesOfContent = slicesOfContent.slice(0, upperBound);
910                  }
911
912                  // highlight title and content
913
914                  function highlightKeyword(text, slice) {
915                    var result = '';
916                    var prevEnd = slice.start;
917                    slice.hits.forEach(function (hit) {
918                      result += text.substring(prevEnd, hit.position);
919                      var end = hit.position + hit.length;
920                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
921                      prevEnd = end;
922                    });
923                    result += text.substring(prevEnd, slice.end);
924                    return result;
925                  }
926
927                  var resultItem = '';
928
929                  if (slicesOfTitle.length != 0) {
930                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
931                  } else {
932                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
933                  }
934
935                  slicesOfContent.forEach(function (slice) {
936                    resultItem += "<a href='" + articleUrl + "'>" +
937                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
938                      "...</p>" + "</a>";
939                  });
940
941                  resultItem += "</li>";
942                  resultItems.push({
943                    item: resultItem,
944                    searchTextCount: searchTextCount,
945                    hitCount: hitCount,
946                    id: resultItems.length
947                  });
948                }
949              })
950            };
951            if (keywords.length === 1 && keywords[0] === "") {
952              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
953            } else if (resultItems.length === 0) {
954              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
955            } else {
956              resultItems.sort(function (resultLeft, resultRight) {
957                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
958                  return resultRight.searchTextCount - resultLeft.searchTextCount;
959                } else if (resultLeft.hitCount !== resultRight.hitCount) {
960                  return resultRight.hitCount - resultLeft.hitCount;
961                } else {
962                  return resultRight.id - resultLeft.id;
963                }
964              });
965              var searchResultList = '<ul class=\"search-result-list\">';
966              resultItems.forEach(function (result) {
967                searchResultList += result.item;
968              })
969              searchResultList += "</ul>";
970              resultContent.innerHTML = searchResultList;
971            }
972          }
973
974          if ('auto' === 'auto') {
975            input.addEventListener('input', inputEventFunction);
976          } else {
977            $('.search-icon').click(inputEventFunction);
978            input.addEventListener('keypress', function (event) {
979              if (event.keyCode === 13) {
980                inputEventFunction();
981              }
982            });
983          }
984
985          // remove loading animation
986          $(".local-search-pop-overlay").remove();
987          $('body').css('overflow', '');
988
989          proceedsearch();
990        }
991      });
992    }
993
994    // handle and trigger popup window;
995    $('.popup-trigger').click(function(e) {
996      e.stopPropagation();
997      if (isfetched === false) {
998        searchFunc(path, 'local-search-input', 'local-search-result');
999      } else {
1000        proceedsearch();
1001      };
1002    });
1003
1004    $('.popup-btn-close').click(onPopupClose);
1005    $('.popup').click(function(e){
1006      e.stopPropagation();
1007    });
1008    $(document).on('keyup', function (event) {
1009      var shouldDismissSearchPopup = event.which === 27 &&
1010        $('.search-popup').is(':visible');
1011      if (shouldDismissSearchPopup) {
1012        onPopupClose();
1013      }
1014    });
1015  </script>
1015
1016
1017
1018
1019
1020
1021  
1022
1023  
1024<script>
1025(function(){
1026    var bp = document.createElement('script');
1027    var curProtocol = window.location.protocol.split(':')[0];
1028    if (curProtocol === 'https') {
1029        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
1030    }
1031    else {
1032        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
1033    }
1034    var s = document.getElementsByTagName("script")[0];
1035    s.parentNode.insertBefore(bp, s);
1036})();
1037</script>
1037
1038
1039
1040  
1041
1042  
1043
1044  
1045
1046  
1047
1048</body>
1049</html>

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.