1<!DOCTYPE html> 2 3 4 5 6 7 8<html class="theme-next mist use-motion" lang="zh-Hans"> 9<head><meta name="generator" content="Hexo 3.8.0"> 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 17 18 19 20 21 22 23<meta http-equiv="Cache-Control" content="no-transform"> 24<meta http-equiv="Cache-Control" content="no-siteapp"> 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css"> 44 45 46 47 48 49 50 51<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css"> 52 53<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css"> 54 55 56 <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4"> 57 58 59 <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4"> 60 61 62 <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4"> 63 64 65 <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222"> 66 67 68 69 70 71 <meta name="keywords" content="Hexo, NexT"> 72 73 74 75 76 77 78 79 80 81 82<meta property="og:type" content="website"> 83<meta property="og:title" content="tags"> 84<meta property="og:url" content="http://yoursite.com/tags/index.html"> 85<meta property="og:site_name" content="ScarletFçå°è åº"> 86<meta property="og:locale" content="zh-Hans"> 87<meta property="og:updated_time" content="2019-04-17T15:12:21.470Z"> 88<meta name="twitter:card" content="summary"> 89<meta name="twitter:title" content="tags"> 90 91 92
93<script type="text/javascript" id="hexo.configurations"> 94 var NexT = window.NexT || {}; 95 var CONFIG = { 96 root: '/', 97 scheme: 'Mist', 98 version: '5.1.4', 99 sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false}, 100 fancybox: true, 101 tabs: true, 102 motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}, 103 duoshuo: { 104 userId: '0', 105 author: 'å主' 106 }, 107 algolia: { 108 applicationID: '', 109 apiKey: '', 110 indexName: '', 111 hits: {"per_page":10}, 112 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"} 113 } 114 }; 115</script>
115 116 117 118 119 <link rel="canonical" href="http://yoursite.com/tags/"> 120 121 122 123 124 125 <title>tags | ScarletFçå°è åº</title> 126 127 128 129 130 131 132 133 134 135</head> 136 137<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans"> 138 139 140 141 142 143 144 <div class="container sidebar-position-left page-post-detail"> 145 <div class="headband"></div> 146 147 <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader"> 148 <div class="header-inner"><div class="site-brand-wrapper"> 149 <div class="site-meta "> 150 151 152 <div class="custom-logo-site-title"> 153 <a href="/" class="brand" rel="start"> 154 <span class="logo-line-before"><i></i></span> 155 <span class="site-title">ScarletFçå°è åº</span> 156 <span class="logo-line-after"><i></i></span> 157 </a> 158 </div> 159 160 <p class="site-subtitle"></p> 161 162 </div> 163 164 <div class="site-nav-toggle"> 165 <button> 166 <span class="btn-bar"></span> 167 <span class="btn-bar"></span> 168 <span class="btn-bar"></span> 169 </button> 170 </div> 171</div> 172 173<nav class="site-nav"> 174 175 176 177 <ul id="menu" class="menu"> 178 179 180 <li class="menu-item menu-item-home"> 181 <a href="/" rel="section"> 182 183 <i class="menu-item-icon fa fa-fw fa-home"></i> <br> 184 185 é¦é¡µ 186 </a> 187 </li> 188 189 190 <li class="menu-item menu-item-tags"> 191 <a href="/tags/" rel="section"> 192 193 <i class="menu-item-icon fa fa-fw fa-tags"></i> <br> 194 195 æ ç¾ 196 </a> 197 </li> 198 199 200 <li class="menu-item menu-item-categories"> 201 <a href="/categories/" rel="section"> 202 203 <i class="menu-item-icon fa fa-fw fa-th"></i> <br> 204 205 åç±» 206 </a> 207 </li> 208 209 210 <li class="menu-item menu-item-archives"> 211 <a href="/archives/" rel="section"> 212 213 <i class="menu-item-icon fa fa-fw fa-archive"></i> <br> 214 215 彿¡£ 216 </a> 217 </li> 218 219 220 <li class="menu-item menu-item-about"> 221 <a href="/about/" rel="section"> 222 223 <i class="menu-item-icon fa fa-fw fa-user"></i> <br> 224 225 å ³äº 226 </a> 227 </li> 228 229 230 231 <li class="menu-item menu-item-search"> 232 233 <a href="javascript:;" class="popup-trigger"> 234 235 236 <i class="menu-item-icon fa fa-search fa-fw"></i> <br> 237 238 æç´¢ 239 </a> 240 </li> 241 242 </ul> 243 244 245 246 <div class="site-search"> 247 248 <div class="popup search-popup local-search-popup"> 249 <div class="local-search-header clearfix"> 250 <span class="search-icon"> 251 <i class="fa fa-search"></i> 252 </span> 253 <span class="popup-btn-close"> 254 <i class="fa fa-times-circle"></i> 255 </span> 256 <div class="local-search-input-wrapper"> 257 <input autocomplete="off" placeholder="æç´¢..." spellcheck="false" type="text" id="local-search-input"> 258 </div> 259 </div> 260 <div id="local-search-result"></div> 261</div> 262 263 264 265 </div> 266 267</nav> 268 269 270 271 </div> 272 </header> 273 274 <main id="main" class="main"> 275 <div class="main-inner"> 276 <div class="content-wrap"> 277 <div id="content" class="content"> 278 279 280 <div id="posts" class="posts-expand"> 281 282 283 284 <div class="post-block page"> 285 <header class="post-header"> 286 287 <h1 class="post-title" itemprop="name headline">tags</h1> 288 289 290 291</header> 292 293 294 295 296 <div class="post-body"> 297 298 299 <div class="tag-cloud"> 300 <div class="tag-cloud-title"> 301 ç®åå ±è®¡ 5 个æ ç¾ 302 </div> 303 <div class="tag-cloud-tags"> 304 <a href="/tags/Powershell/" style="font-size: 12px; color: #ccc">Powershell</a> <a href="/tags/代çå·¥å ·/" style="font-size: 30px; color: #111">代çå·¥å ·</a> <a href="/tags/å®å ¨å åº/" style="font-size: 12px; color: #ccc">å®å ¨å åº</a> <a href="/tags/å°å·¥å ·/" style="font-size: 12px; color: #ccc">å°å·¥å ·</a> <a href="/tags/ç³»ç»å·¥å ·/" style="font-size: 12px; color: #ccc">ç³»ç»å·¥å ·</a> 305 </div> 306 </div> 307 308 </div> 309 310 311 312 </div> 313 314 315 316 </div> 317 318 319 </div> 320 321 322 323 324 325 326 <div class="comments" id="comments"> 327 <div id="disqus_thread"> 328 <noscript> 329 Please enable JavaScript to view the 330 <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a> 331 </noscript> 332 </div> 333 </div> 334 335 336 337 338 339 </div> 340 341 342 343 <div class="sidebar-toggle"> 344 <div class="sidebar-toggle-line-wrap">
345 <span class="sidebar-toggle-line sidebar-toggle-line-first"></span> 346 <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span> 347 <span class="sidebar-toggle-line sidebar-toggle-line-last"></span> 348 </div> 349 </div> 350 351 <aside id="sidebar" class="sidebar"> 352 353 <div class="sidebar-inner"> 354 355 356 357 358 359 <section class="site-overview-wrap sidebar-panel sidebar-panel-active"> 360 <div class="site-overview"> 361 <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person"> 362 363 <p class="site-author-name" itemprop="name">ScarletF</p> 364 <p class="site-description motion-element" itemprop="description"></p> 365 </div> 366 367 <nav class="site-state motion-element"> 368 369 370 <div class="site-state-item site-state-posts"> 371 372 <a href="/archives/"> 373 374 <span class="site-state-item-count">5</span> 375 <span class="site-state-item-name">æ¥å¿</span> 376 </a> 377 </div> 378 379 380 381 382 383 <div class="site-state-item site-state-categories"> 384 <a href="/categories/index.html"> 385 <span class="site-state-item-count">3</span> 386 <span class="site-state-item-name">åç±»</span> 387 </a> 388 </div> 389 390 391 392 393 394 <div class="site-state-item site-state-tags"> 395 <a href="/tags/index.html"> 396 <span class="site-state-item-count">5</span> 397 <span class="site-state-item-name">æ ç¾</span> 398 </a> 399 </div> 400 401 402 </nav> 403 404 405 406 407 <div class="links-of-author motion-element"> 408 409 <span class="links-of-author-item"> 410 <a href="https://github.com/scarletf" target="_blank" title="GitHub"> 411 412 <i class="fa fa-fw fa-github"></i>GitHub</a> 413 </span> 414 415 </div> 416 417 418 419 420 421 422 423 424 425 426 </div> 427 </section> 428 429 430 431 432 433 </div> 434 </aside> 435 436 437 438 </div> 439 </main> 440 441 <footer id="footer" class="footer"> 442 <div class="footer-inner"> 443 <div class="copyright">© 2019 — <span itemprop="copyrightYear">2021</span> 444 <span class="with-love"> 445 <i class="fa fa-user"></i> 446 </span> 447 <span class="author" itemprop="copyrightHolder">ScarletF</span> 448 449 450</div> 451 452 453 <div class="powered-by">ç± <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强å驱å¨</div> 454 455 456 457 <span class="post-meta-divider">|</span> 458 459 460 461 <div class="theme-info">ä¸»é¢ — <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Mist</a> v5.1.4</div> 462 463 464 465 466 467 468 469 470 471 472 473 474 475 </div> 476 </footer> 477 478 479 <div class="back-to-top"> 480 <i class="fa fa-arrow-up"></i> 481 482 </div> 483 484 485 486 487 </div> 488 489 490
491<script type="text/javascript"> 492 if (Object.prototype.toString.call(window.Promise) !== '[object Function]') { 493 window.Promise = null; 494 } 495</script>
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520
520<script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
520 521 522 523 524 525
525<script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
525 526 527 528 529 530
530<script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
530 531 532 533 534 535
535<script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
535 536 537 538 539 540
540<script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
540 541 542 543 544 545
545<script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
545 546 547 548 549 550 551 552
552<script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>
552 553 554
554<script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>
554 555 556 557 558 559 560 561 562
562<script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
vendor: 1 bytes, line 562
562
563<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>
563 564 565 566 567 568 569 570
570<script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>
570 571 572 573 574 575 576 577 578 579 580
580<script id="dsq-count-scr" src="https://.disqus.com/count.js" async></script>
580 581 582 583 584
584<script type="text/javascript"> 585 var disqus_config = function () { 586 this.page.url = 'http://yoursite.com/tags/index.html'; 587 this.page.identifier = 'tags/index.html'; 588 this.page.title = 'tags'; 589 }; 590 var d = document, s = d.createElement('script'); 591 s.src = 'https://.disqus.com/embed.js'; 592 s.setAttribute('data-timestamp', '' + +new Date()); 593 (d.head || d.body).appendChild(s); 594 </script>
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629
629<script type="text/javascript"> 630 // Popup Window; 631 var isfetched = false; 632 var isXml = true; 633 // Search DB path; 634 var search_path = "search.xml"; 635 if (search_path.length === 0) { 636 search_path = "search.xml"; 637 } else if (/json$/i.test(search_path)) { 638 isXml = false; 639 } 640 var path = "/" + search_path; 641 // monitor main search box; 642 643 var onPopupClose = function (e) { 644 $('.popup').hide(); 645 $('#local-search-input').val(''); 646 $('.search-result-list').remove(); 647 $('#no-result').remove(); 648 $(".local-search-pop-overlay").remove(); 649 $('body').css('overflow', ''); 650 } 651 652 function proceedsearch() { 653 $("body") 654 .append('<div class="search-popup-overlay local-search-pop-overlay"></div>') 655 .css('overflow', 'hidden'); 656 $('.search-popup-overlay').click(onPopupClose); 657 $('.popup').toggle(); 658 var $localSearchInput = $('#local-search-input'); 659 $localSearchInput.attr("autocapitalize", "none"); 660 $localSearchInput.attr("autocorrect", "off"); 661 $localSearchInput.focus(); 662 } 663 664 // search function; 665 var searchFunc = function(path, search_id, content_id) { 666 'use strict'; 667 668 // start loading animation 669 $("body") 670 .append('<div class="search-popup-overlay local-search-pop-overlay">' + 671 '<div id="search-loading-icon">' + 672 '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' + 673 '</div>' + 674 '</div>') 675 .css('overflow', 'hidden'); 676 $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center'); 677 678 $.ajax({ 679 url: path, 680 dataType: isXml ? "xml" : "json", 681 async: true, 682 success: function(res) { 683 // get the contents from search data 684 isfetched = true; 685 $('.popup').detach().appendTo('.header-inner'); 686 var datas = isXml ? $("entry", res).map(function() { 687 return { 688 title: $("title", this).text(), 689 content: $("content",this).text(), 690 url: $("url" , this).text() 691 }; 692 }).get() : res; 693 var input = document.getElementById(search_id); 694 var resultContent = document.getElementById(content_id); 695 var inputEventFunction = function() { 696 var searchText = input.value.trim().toLowerCase(); 697 var keywords = searchText.split(/[\s\-]+/); 698 if (keywords.length > 1) { 699 keywords.push(searchText); 700 } 701 var resultItems = []; 702 if (searchText.length > 0) { 703 // perform local searching 704 datas.forEach(function(data) { 705 var isMatch = false; 706 var hitCount = 0; 707 var searchTextCount = 0; 708 var title = data.title.trim(); 709 var titleInLowerCase = title.toLowerCase(); 710 var content = data.content.trim().replace(/<[^>]+>/g,""); 711 var contentInLowerCase = content.toLowerCase(); 712 var articleUrl = decodeURIComponent(data.url); 713 var indexOfTitle = []; 714 var indexOfContent = []; 715 // only match articles with not empty titles 716 if(title != '') { 717 keywords.forEach(function(keyword) { 718 function getIndexByWord(word, text, caseSensitive) { 719 var wordLen = word.length; 720 if (wordLen === 0) { 721 return []; 722 } 723 var startPosition = 0, position = [], index = []; 724 if (!caseSensitive) { 725 text = text.toLowerCase(); 726 word = word.toLowerCase(); 727 } 728 while ((position = text.indexOf(word, startPosition)) > -1) { 729 index.push({position: position, word: word}); 730 startPosition = position + wordLen; 731 } 732 return index; 733 } 734 735 indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false)); 736 indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false)); 737 }); 738 if (indexOfTitle.length > 0 || indexOfContent.length > 0) { 739 isMatch = true; 740 hitCount = indexOfTitle.length + indexOfContent.length; 741 } 742 } 743 744 // show search results 745 746 if (isMatch) { 747 // sort index by position of keyword 748 749 [indexOfTitle, indexOfContent].forEach(function (index) { 750 index.sort(function (itemLeft, itemRight) { 751 if (itemRight.position !== itemLeft.position) { 752 return itemRight.position - itemLeft.position; 753 } else { 754 return itemLeft.word.length - itemRight.word.length; 755 } 756 }); 757 }); 758 759 // merge hits into slices 760 761 function mergeIntoSlice(text, start, end, index) { 762 var item = index[index.length - 1]; 763 var position = item.position; 764 var word = item.word; 765 var hits = []; 766 var searchTextCountInSlice = 0; 767 while (position + word.length <= end && index.length != 0) { 768 if (word === searchText) { 769 searchTextCountInSlice++; 770 } 771 hits.push({position: position, length: word.length}); 772 var wordEnd = position + word.length; 773 774 // move to next position of hit 775 776 index.pop(); 777 while (index.length != 0) { 778 item = index[index.length - 1]; 779 position = item.position; 780 word = item.word; 781 if (wordEnd > position) { 782 index.pop(); 783 } else { 784 break; 785 } 786 } 787 } 788 searchTextCount += searchTextCountInSlice; 789 return { 790 hits: hits, 791 start: start, 792 end: end, 793 searchTextCount: searchTextCountInSlice 794 }; 795 } 796 797 var slicesOfTitle = []; 798 if (indexOfTitle.length != 0) { 799 slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle)); 800 } 801 802 var slicesOfContent = []; 803 while (indexOfContent.length != 0) { 804 var item = indexOfContent[indexOfContent.length - 1]; 805 var position = item.position; 806 var word = item.word; 807 // cut out 100 characters 808 var start = position - 20; 809 var end = position + 80; 810 if(start < 0){ 811 start = 0; 812 } 813 if (end < position + word.length) { 814 end = position + word.length; 815 } 816 if(end > content.length){ 817 end = content.length; 818 } 819 slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent)); 820 } 821
822 // sort slices in content by search text's count and hits' count 823 824 slicesOfContent.sort(function (sliceLeft, sliceRight) { 825 if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) { 826 return sliceRight.searchTextCount - sliceLeft.searchTextCount; 827 } else if (sliceLeft.hits.length !== sliceRight.hits.length) { 828 return sliceRight.hits.length - sliceLeft.hits.length; 829 } else { 830 return sliceLeft.start - sliceRight.start; 831 } 832 }); 833 834 // select top N slices in content 835 836 var upperBound = parseInt('1'); 837 if (upperBound >= 0) { 838 slicesOfContent = slicesOfContent.slice(0, upperBound); 839 } 840 841 // highlight title and content 842 843 function highlightKeyword(text, slice) { 844 var result = ''; 845 var prevEnd = slice.start; 846 slice.hits.forEach(function (hit) { 847 result += text.substring(prevEnd, hit.position); 848 var end = hit.position + hit.length; 849 result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>'; 850 prevEnd = end; 851 }); 852 result += text.substring(prevEnd, slice.end); 853 return result; 854 } 855 856 var resultItem = ''; 857 858 if (slicesOfTitle.length != 0) { 859 resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>"; 860 } else { 861 resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>"; 862 } 863 864 slicesOfContent.forEach(function (slice) { 865 resultItem += "<a href='" + articleUrl + "'>" + 866 "<p class=\"search-result\">" + highlightKeyword(content, slice) + 867 "...</p>" + "</a>"; 868 }); 869 870 resultItem += "</li>"; 871 resultItems.push({ 872 item: resultItem, 873 searchTextCount: searchTextCount, 874 hitCount: hitCount, 875 id: resultItems.length 876 }); 877 } 878 }) 879 }; 880 if (keywords.length === 1 && keywords[0] === "") { 881 resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>' 882 } else if (resultItems.length === 0) { 883 resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>' 884 } else { 885 resultItems.sort(function (resultLeft, resultRight) { 886 if (resultLeft.searchTextCount !== resultRight.searchTextCount) { 887 return resultRight.searchTextCount - resultLeft.searchTextCount; 888 } else if (resultLeft.hitCount !== resultRight.hitCount) { 889 return resultRight.hitCount - resultLeft.hitCount; 890 } else { 891 return resultRight.id - resultLeft.id; 892 } 893 }); 894 var searchResultList = '<ul class=\"search-result-list\">'; 895 resultItems.forEach(function (result) { 896 searchResultList += result.item; 897 }) 898 searchResultList += "</ul>"; 899 resultContent.innerHTML = searchResultList; 900 } 901 } 902 903 if ('auto' === 'auto') { 904 input.addEventListener('input', inputEventFunction); 905 } else { 906 $('.search-icon').click(inputEventFunction); 907 input.addEventListener('keypress', function (event) { 908 if (event.keyCode === 13) { 909 inputEventFunction(); 910 } 911 }); 912 } 913 914 // remove loading animation 915 $(".local-search-pop-overlay").remove(); 916 $('body').css('overflow', ''); 917 918 proceedsearch(); 919 } 920 }); 921 } 922 923 // handle and trigger popup window; 924 $('.popup-trigger').click(function(e) { 925 e.stopPropagation(); 926 if (isfetched === false) { 927 searchFunc(path, 'local-search-input', 'local-search-result'); 928 } else { 929 proceedsearch(); 930 }; 931 }); 932 933 $('.popup-btn-close').click(onPopupClose); 934 $('.popup').click(function(e){ 935 e.stopPropagation(); 936 }); 937 $(document).on('keyup', function (event) { 938 var shouldDismissSearchPopup = event.which === 27 && 939 $('.search-popup').is(':visible'); 940 if (shouldDismissSearchPopup) { 941 onPopupClose(); 942 } 943 }); 944 </script>
944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965</body> 966</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.