';if($(".csdn-side-toolbar .search").append(i),!getCookie("referrer_search")){var a=0;timer=setInterval(function(){a++,3==a&&$(".side-search-box").fadeIn(1500),7==a&&($(".side-search-box").fadeOut(1500),clearInterval(timer))},1e3),e("referrer_search",(new Date).getTime(),2)}$(".csdn-side-toolbar .search").on("click",function(t){getCookie("referrer_search")||clearInterval(timer),window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({spm:"1001.2101.3001.5543",dest:articleDetailUrl,extend1:n}),$(".side-search-box").fadeIn(500),setTimeout(function(){$(".side-search-box").fadeOut(1500)},1e4)}),$(".side-search-box .search-bt").on("click",function(t){getCookie("referrer_search")||clearInterval(timer);var e="";e="yes"===$(t.target).data("type")?"yes":"no",window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&(window.csdn.report.reportClick({spm:"1001.2101.3001.5543",dest:articleDetailUrl,extend1:n,ab:e}),t.stopPropagation()),$(".side-search-box .side-search-content").html("感谢您的反馈!").css({width:"92px"}),setTimeout(function(){$(".csdn-side-toolbar .search").fadeOut(800,function(){$(this).remove()})},1e3)})}}function e(t,e,o){var i=new Date;i.setTime(i.getTime()+36e5*o),document.cookie=t+"="+escape(e)+";expires="+i.toGMTString()+";domain=.csdn.net;path=/"}function o(){if(isShowToQuestion){var t='
提问 ';$(".csdn-side-toolbar").prepend(t);var e='
CSDN 技术专家团 在线答疑
50 位专家有问必答,已及时解决1000+ 技术难题。 首次免费体验!
体验有问必答 ',o="";$.each(r,function(t,e){o+='
'+e.time+' '+e.username+' 解决了问题: '+e.question+"
"}),$(".csdn-side-toolbar .question").append(e),$(".csdn-side-toolbar .question-tip-content").append(o),$(".question-tip-txt:first").siblings().hide(),setInterval(function(){$(".question-tip-txt:visible").slideUp("slow",function(){void 0===$(this).next(".question-tip-txt")[0]?$(".question-tip-txt:first").fadeIn("slow"):$(this).next(".question-tip-txt").fadeIn("slow")})},2e3);var n=document.documentElement.scrollTop||document.body.scrollTop;i(n,l)}}function i(t,e){a&&t>.5*e&&$(".csdn-side-toolbar .side-question-box").length>0&&(getCookie("blog_ask_question")||($(".csdn-side-toolbar .side-question-box").fadeIn(),c&&(window.csdn.report&&"function"==typeof window.csdn.report.reportView&&window.csdn.report.reportView({spm:"1001.2101.3001.6041"}),c=!1)))}getSideToolbarTime=setInterval(function(){$(".csdn-side-toolbar").length>0&&(clearInterval(getSideToolbarTime),t(),o())},1e3);var n="此内容解决你搜索的问题?";"control"===showSearchText&&(n="此内容是您要找的内容?"),"secondText"===showSearchText&&(n="此内容解决你搜索的问题?");var a=!0,s=!0,c=!0,l=document.documentElement.clientHeight,r=[{time:"5分钟前",username:"java小白_李同学",question:"给数组扩容失败求解答"},{time:"7分钟前",username:"叮当猫的风筝",question:"SSD训练迭代过程突然停止"},{time:"8分钟前",username:"不取名字了吧",question:"python selenium库相关函数在哪里找"},{time:"10分钟前",username:"冉水",question:"Vue使用Axios通过post方式访问后台,为什么后台获取不到传递过来的参数?"},{time:"12分钟前",username:"一袖如何两青蛇",question:"求解:为什么我的jupyter notebook无法运行代码"},{time:"13分钟前",username:"m0_53936501",question:"有关c++的一个问题不知哪里出错了求教?"},{time:"14分钟前",username:"zzzlj1",question:"利用指针编写程序,对具有6个元素的整型数组,找出其中最大值并计算出该数组的平均数。怎么写呀?"},{time:"20分钟前",username:"见过自讼",question:"关于java实现对象型数组的一个问题"},{time:"22分钟前",username:"chaochaoyaya",question:"C++中存入的数据和实际输出流的数据不一致,请教各位大佬这个如何解决呢?"},{time:"27分钟前",username:"赶鸭子",question:"如何求集合之间的交集(重复元素)?"},{time:"32分钟前",username:"iamalarak",question:"pip装不了东西,求教"},{time:"38分钟前",username:"nibiru0810",question:"PIP warning Ignoring Invalid distribution"},{time:"42分钟前",username:"godiegodieover",question:"PTA练习 C语言 删除行末空白字符"},{time:"50分钟前",username:"Playing with fire",question:"急救 vc代码应该怎样修改"},{time:"53分钟前",username:"weixin_39052466",question:"求教,C#调用C++dll接口出现问题,参数定义是否正确,调用方式是否正确"},{time:"1小时前",username:"小肥宅子",question:"Integer.parseInt()转换String类型 抛异常"},{time:"1小时前",username:"超哥",question:"女程序员提问:女程序员后台Java开发真的有描述的那么吃香么?之前被拒就是不要女性"},{time:"2小时前",username:"悠然岁月",question:"原代码复制重写,报以下错误,我也很奇怪这个dict到底是谁,怎么来的,传什么参?"},{time:"2小时前",username:"",question:"使用pip命令提示WARNING: Ignoring invalid distribution"}];window.onscroll=function(){var t=document.documentElement.scrollTop||document.body.scrollTop;i(t,l)},$(document).on("click",".csdn-side-toolbar .fade-question-box",function(){$(".csdn-side-toolbar .side-question-box").fadeOut(),e("blog_ask_question",(new Date).getTime(),72),a=!1}),$(document).on("mouseenter",".csdn-side-toolbar .question",function(t){$(".csdn-side-toolbar .side-question-box").fadeIn(),$(t.target).hasClass("ask_question_img")&&s&&"block"==$(".csdn-side-toolbar .side-question-box").css("display")&&(window.csdn.report&&"function"==typeof window.csdn.report.reportView&&window.csdn.report.reportView({spm:"1001.2101.3001.6041"}),s=!1)}),$(document).on("mouseleave",".csdn-side-toolbar .question",function(t){s=!0}),$(document).on("click",".csdn-side-toolbar .question",function(t){window.open("https://ask.csdn.net/new?spm=1001.2101.3001.6040")}),$(document).on("click",".csdn-side-toolbar .side-question-box",function(t){t.stopPropagation()})}),$("#recommend-item-box-tow").children().length<=0&&$("#recommend-item-box-tow").remove(),baiduKey&&(csdn.afterCasInit=function(t,e){if(!t)return!1;var o="";4==articleSource&&$("#recommendDown .recommend_down").length<=0?csdn.baiduSearch(t,function(e){if(needInsertBaidu&&isRecommendModule)if(e&&e.length)showDownRecommend(e[0]);else{var i=$(".recommend-box .type_download")[0];if(i&&$(i).length){var n=$(i).find("a")[0],a={linkUrl:$(i).data("url"),title:$(n).text()};showDownRecommend(a)}}csdn.baiduSearch(t,function(t){needInsertBaidu&&isRecommendModule&&showResult(t,o)})},"download.csdn.net"):csdn.baiduSearch(t,function(t){needInsertBaidu&&isRecommendModule&&showResult(t,o)})});var articleTitleContent=$("#articleContentId").text().replace(/[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、
<\/em>"]/g,"").replace(/\s/g,"").toLowerCase();$(function(){function t(){var t=$("#toolBarBox").offset().top,e=$("#toolBarBox").offset().left,o=$(".left-toolbox").height(),i=$("#toolBarBox").width(),n=window.innerHeight,a=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;t+o-n-a>0?($("#toolBarBox .left-toolbox").css({position:"fixed","z-index":"999",left:e+"px",bottom:"0",width:i+"px"}),$("#toolBarBox").addClass("more-toolbox-active")):($("#toolBarBox .left-toolbox").css({position:"relative","z-index":"10",left:"0px",bottom:"0",width:i+"px"}),$("#toolBarBox").removeClass("more-toolbox-active"))}function e(){new QRCode(document.getElementById("shareCode"),{text:share_card_url+"&utm_source=po_popup",width:144,height:144,colorDark:"#000000",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.H})}function o(t,e){if(N.skinBoxshadow.html(""),t){var o='";N.skinBoxshadow.append(o)}else{var i='";N.skinBoxshadow.append(i)}N.skinBoxshadow.fadeIn(200),setTimeout(function(){N.skinBoxshadow.fadeOut(200),N.skinBoxshadow.html("")},1500)}function i(t,e){e?t.addClass("active"):t.removeClass("active")}function n(t){getCookie("UserName")?$.ajax({url:blogUrl+"/phoenix/web/v1/article/like",type:"post",dataType:"json",data:{articleId:articleId},xhrFields:{withCredentials:!0},success:function(t){if(200==t.code){if(t.data.status)$("#is-like-img").hide(),$("#is-like-imgactive").show(),i($("#spanCount"),!0),$("#spanCount")[0].style="color:#fc5531 !important;",window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"1582594662_001",spm:"1001.2101.3001.4241",dest:"",extend1:'{"praise":1}'});else{$("#is-like-imgactive").hide(),$("#is-like-img").show(),i($("#spanCount"),!1);var e="color:#999999 !important;";"Black"===skinStatus&&(e="color:#ccccd8 !important;"),$("#spanCount")[0].style=e,window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"1582594662_001",spm:"1001.2101.3001.4241",dest:"",extend1:'{"praise":0}'})}$("#spanCount").text(t.data.like_num>0?t.data.like_num:"")}else o(!1,t.message);_()}}):window.csdn.loginBox.show()}function a(){window.csdn.userLogin.loadAjax(function(t){$.ajax({url:blogUrl+"/phoenix/web/v1/collect",dataType:"json",type:"POST",xhrFields:{withCredentials:!0},data:{articleId:articleId},success:function(t){200===t.code&&s(t.data.status)},error:function(){}})})}function s(t){t?($("#is-collection-imgactive").show(),$("#is-collection-img").hide(),i($("#get-collection"),!0),$("#is-collection").text("已收藏"),$("#blog_detail_zk_collection .un-collect-status").hide(),$("#blog_detail_zk_collection .collect-status").show(),$("#blog_detail_zk_collection span.name").text("已收藏"),I&&(I=!1,$(".get-collection").text()?$(".get-collection").text(1*$("#get-collection").text()+1):$(".get-collection").text("1"))):($("#is-collection-imgactive").hide(),$("#is-collection-img").show(),$("#is-collection").text("收藏"),i($("#get-collection"),!1),"White"==skinStatus?$(".get-collection").css({color:"#999aaa"}):$(".get-collection").css({color:"#999999"}),$("#blog_detail_zk_collection .un-collect-status").show(),$("#blog_detail_zk_collection .collect-status").hide(),$("#blog_detail_zk_collection span.name").text("收藏"),I=!0,$(".get-collection").text()?1*$("#get-collection").text()-1<=0?$(".get-collection").text(""):$(".get-collection").text(1*$("#get-collection").text()-1):$(".get-collection").text("")),_()}function c(){getCookie("UserName")?window.csdn.collectionBox.show(window.csdn.collectionBox.params):window.csdn.loginBox.show()}function l(){if(getCookie("UserName")){var t=articleDetailUrl.split("/article/details/")[1];$.ajax({url:blogUrl+"phoenix/web/v1/isCollect",type:"GET",xhrFields:{withCredentials:!0},data:{articleId:t},success:function(t){200==t.code&&t.data.status?($("#is-collection-img").hide(),$("#is-collection-imgactive").show(),i($(".get-collection"),!0),$("#blog_detail_zk_collection .un-collect-status").hide(),$("#blog_detail_zk_collection .collect-status").show(),$("#blog_detail_zk_collection span.name").text("已收藏"),I=!1):($("#is-collection-img").show(),$("#is-collection-imgactive").hide(),i($(".get-collection"),!1),$("#blog_detail_zk_collection .un-collect-status").show(),$("#blog_detail_zk_collection .collect-status").hide(),$("#blog_detail_zk_collection span.name").text("收藏")),_()}})}}function r(t,e,o){o.length&&$.ajax({type:"GET",url:blogUrl+t,dataType:"json",xhrFields:{withCredentials:!0},data:{articleId:articleId},success:function(t){200==t.code&&e(t.data,o)},error:function(t){}})}function d(t,e){var o="";t.list&&t.list.length&&(o='',$.each(t.list,function(t,e){t<10&&(o+='
')}),o+="
",o+=''+t.total+" 人已打赏
",e.html(o))}function m(t,e){Number(t)-Number(e)<0?N.sureBoxBlance.addClass("active"):N.sureBoxBlance.removeClass("active")}function p(){$.ajax({url:"https://mall.csdn.net/mp/mallorder/api/internal/order/getBalance",type:"GET",xhrFields:{withCredentials:!0},success:function(t){200==t.code&&(N.blance=t.data.balance,N.domBlance.html("(余额:¥"+N.blance+" )"),m(N.blance,N.moneyNum))}})}function u(){var t=0;return N.payType.each(function(e,o){if($(o).hasClass("active"))return void(t=e)}),"blance"===N.payType.eq(t).data("type")}function h(t){N.sureBoxBlance.find(".tip").removeAttr("style",""),t.value||(t.value=2),N.moneyNum=t.value,m(N.blance,N.moneyNum),N.codeNum.html("¥"+N.moneyNum),0请在手机端操作",N.codeImgBox.html(''+imgtext+" ")}function v(t){showToast({text:t.errorMessage,bottom:"10%",zindex:9002,speed:500,time:1500})}function b(){N.codeImgBox.html(N.repeatAgain)}function w(t,e){var o=qrcode(6,"M");o.addData(t),o.make(),e.html(o.createImgTag(3,3))}function x(t,e){w(e.pay_url,N.codeImgBox)}function y(){N.rewardNew.fadeOut(),N.skinBoxshadow.html("");var t=' ';N.skinBoxshadow.append(t),setTimeout(function(){r(N.ajaxRewardUrl,d,N.rewardContent),N.skinBoxshadow.fadeOut(200),N.skinBoxshadow.html("")},4e3)}function k(t){if(getCookie("UserName")){var e=$(".tool-attend");e.is(".tool-unbt-attend")?(e.removeClass("tool-unbt-attend").addClass("tool-bt-attend").text("关注"),P&&(window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"1592215036_002",spm:"1001.2101.3001.4132",extend1:"已关注"}),P=!1)):(e.removeClass("tool-bt-attend").addClass("tool-unbt-attend").text("已关注"),P&&(window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"1592215036_002",spm:"1001.2101.3001.4132",extend1:"关注"}),P=!1))}else window.csdn.loginBox.show();_()}function C(t,e){$(document).mouseup(function(o){if(!t.is(o.target)&&0===t.has(o.target).length&&!e.is(o.target)&&0===e.has(o.target).length){t.fadeOut(200);var i=o||window.e;i&&i.stopPropagation?i.stopPropagation():i.cancelBubble=!0}})}function _(){if("block"===$("#is-like-imgactive").css("display")&&"block"===$("#is-collection-imgactive").css("display")&&$(".tool-unbt-attend").length>0){if($("#health-companies").length){$("#health-companies").removeClass("active");var t=$("#health-companies").attr("src");t.indexOf("Default")>-1?$("#health-companies").attr("src",t):$("#health-companies").attr("src",t.replace("Active","Default"))}}else if($("#health-companies").length){$("#health-companies").addClass("active");var t=$("#health-companies").attr("src");t.indexOf("Default")>-1?$("#health-companies").attr("src",t.replace("Default","Active")):$("#health-companies").attr("src",t)}}function B(t,e){e.indexOf("White")>-1?t.attr("src",e.replace("White","Black")):t.attr("src",e.replace("Black","White"))}var T=!0;$(document).on("click",".article-info-box .slide-toggle",function(){T?$(this).text("收起"):$(this).text("版权"),$(this).parents(".article-info-box").find(".slide-content-box").slideToggle(),T=!T});var S='{"mod":"1585297308_001","dest":"'+articleDetailUrl+'","extend1":"pc","ab":"new"}';canRead&&($(".hide-article-box").length?$(document).on("click",".hide-article-box .btn-readmore",function(){$("#content_views").after("")}):$("#content_views").after("
")),$("#blog_detail_zk_collection").click(function(){window.csdn.articleCollection()}),e(),$("#tool-share").on({mouseover:function(){$("#tool-QRcode").show()},mouseout:function(){$("#tool-QRcode").hide()}}),C($("#tool-QRcode"),$("#tool-share")),$("#tool-reward").on("click",function(){$("#reward").show()}),$("#is-like").on("click",function(){n()}),$("#btn-readmore-zk").on("click",function(){$("#btn-readmore").show()}),$("#btn-readmore").on("click",function(){var e=$(window).height();e*$(this).attr("height");$(".hide-article-box").show(),$("div.article_content")[0].style="height:2000px; overflow: hidden;",t(),$("#btn-readmore").hide(),$(".btn-readmore-gz")&&$(".btn-readmore-gz span").text("阅读全文")}),$(document).on("click",".is-collection",function(){getCookie("UserName")?window.csdn.collectionBox.show(window.csdn.collectionBox.params):window.csdn.loginBox.show()}),$(document).on("click",".tool-more .article-report",function(){getCookie("UserName")?userNewReport?showReportNew(!1,articleTitles):showReport(!1,articleTitles):window.csdn.loginBox.show()}),t(),$(window).scroll(function(){t()}),$(window).resize(function(){t()}),$(".btn-readmore").click(t),""!==articleDetailUrl||void 0!==articleDetailUrl?collectionUrl=articleDetailUrl:collectionUrl=curentUrl;var I=!0;window.csdn.collectionBox.params={url:collectionUrl,title:articleTitle,description:articleDesc,author:username,source_id:articleId,source:"blog",collectionCallBack:function(t){s(t)}},window.csdn=window.csdn?window.csdn:{},window.csdn.articleCollection=c,l();var N={blance:"",rewardBtNew:$("#rewardBtNew"),rewardNew:$("#rewardNew"),rewardContent:$(".reward-box-new .reward-content"),skinBoxshadow:$(".skin-boxshadow"),rewardClose:$(".reward-popupbox-new .reward-close"),sureBoxBlance:$(".reward-popupbox-new .sure-box-blance"),moneyNum:2,payType:$(".reward-popupbox-new .pay-type"),domBlance:$(".reward-popupbox-new .pay-type-num"),rewardBt:$(".reward-popupbox-new .reward-sure"),chooseMoney:$(".reward-popupbox-new .choose-money"),customizeMoney:$(".reward-popupbox-new .customize-money"),customizeTip:$(".reward-popupbox-new .customize-tip"),isShowCode:$(".reward-popupbox-new .sure-box-money"),codeNum:$(".reward-popupbox-new .code-num"),codeImgBox:$(".reward-popupbox-new .code-img-box"),payrun:'
获取中 ',repeatAgain:'
点击重新获取 ',ajaxRewardUrl:"phoenix/web/v1/reward/article-users"};r(N.ajaxRewardUrl,d,N.rewardContent),N.rewardBtNew.on({click:function(){getCookie("UserName")?getCookie("UserName")!==username?(p(),N.skinBoxshadow.fadeIn(),N.rewardNew.fadeIn()):showToast({text:"自己不能打赏自己",bottom:"10%",zindex:9002,speed:500,time:1500}):window.csdn.loginBox.show()}}),N.rewardClose.on("click",function(t){N.rewardNew.fadeOut(),N.skinBoxshadow.fadeOut();var e=t||window.e;e&&e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}),N.payType.click(function(){N.payType.removeClass("active"),$(this).addClass("active"),u()?(m(N.blance,N.moneyNum),N.isShowCode.slideUp(500),N.sureBoxBlance.slideDown(500,function(){N.sureBoxBlance.find(".tip").html('您的余额不足,请更换扫码支付或
充值 ')}),N.rewardNew.animate({"max-height":"445px"},500)):(N.codeNum.html("¥"+N.moneyNum),N.sureBoxBlance.find(".tip").html(""),N.isShowCode.slideDown(500),N.sureBoxBlance.slideUp(500),N.rewardNew.animate({"max-height":"551px"},500),f())}),N.chooseMoney.click(function(){N.chooseMoney.removeClass("choosed"),N.customizeMoney.removeClass("active"),N.customizeMoney.attr("placeholder","自定义"),N.customizeMoney.val(""),$(this).addClass("choosed"),N.moneyNum=$(this).data("id"),N.codeNum.html("¥"+N.moneyNum),u()?m(N.blance,N.moneyNum):f()}),N.customizeMoney.on({focus:function(){N.chooseMoney.removeClass("choosed"),$(this).addClass("active"),$(this).attr("placeholder","1-500"),u()&&(N.sureBoxBlance.addClass("active"),N.sureBoxBlance.find(".tip").css({display:"none"}))},keyup:function(){$(this)[0].value=$(this)[0].value.replace(/^(0+)|[^\d]+/g,""),$(this)[0].value?($(this)[0].value>500&&($(this)[0].value=2,N.customizeTip.fadeIn(1e3,function(){N.customizeTip.fadeOut(1e3)})),m(N.blance,$(this)[0].value),N.sureBoxBlance.find(".tip").removeAttr("style","")):u()&&(N.sureBoxBlance.addClass("active"),N.sureBoxBlance.find(".tip").css({
display:"none"}))},blur:function(){h($(this)[0])}}),N.customizeMoney.on("keydown",function(t){var e=t||event;13==e.which&&h($(this)[0])}),N.rewardBt.on("click",function(t){if(getCookie("UserName"))if(initRewardObject&&""!=initRewardObject.sign){if(!N.sureBoxBlance.hasClass("active")&&"none"!==N.sureBoxBlance.css("display")&&u&&0
0&&($(".tool-attend").trigger("click"),window.csdn.report&&"function"==typeof window.csdn.report.reportClick&&window.csdn.report.reportClick({mod:"1592215036_002",spm:"1001.2101.3001.4132",extend1:"关注"})),$("#is-like-imgactive-animation-like").show().addClass("active-animation"),$("#is-collection-img-collection").show().addClass("active-animation"),$(".tool-item-follow").show().addClass("active-animation"),setTimeout(function(){$("#is-like-imgactive-animation-like").hide().removeClass("active-animation"),$("#is-collection-img-collection").hide().removeClass("active-animation"),$(".tool-item-follow").hide().removeClass("active-animation")},800)):window.csdn.loginBox.show()});var j=!0;$(".toolbox-list a.tool-item-href").on({mouseover:function(){if(j){var t=$(this).find("img.isdefault"),e=$(this).find("span.count"),o=t.attr("src");B(t,o),"block"==t.css("display")?"White"==skinStatus?e.css({color:"#999999"}):e.css({color:"#999aaa"}):e.css({color:"#fc5531"}),j=!j}},mouseout:function(){if(!j){var t=$(this).find("img.isdefault"),e=$(this).find("span.count"),o=t.attr("src");B(t,o),"block"==t.css("display")?"White"==skinStatus?e.css({color:"#999aaa"}):e.css({color:"#999999"}):e.css({color:"#fc5531"}),j=!j}}})}),$(function(){function t(t,e){var o=6,i=new Date;i.setTime(i.getTime()+36e5*o),document.cookie=t+"="+escape(e)+";expires="+i.toGMTString()+";domain=.csdn.net;path=/"}function e(t){var e,o=new RegExp("(^| )"+t+"=([^;]*)(;|$)");return(e=document.cookie.match(o))?unescape(e[2]):null}if(!currentUserName){var o=$("div.article_content"),i=o.offset().top,n=o.height(),a=document.body.clientHeight||document.documentElement.clientHeight,s=$(document).scrollTop();$(document).scroll(function(){s=$(document).scrollTop(),e("unlogin_scroll_step")||e("UserName")||showPcWindowAd||(s+a-i>n/2||s+a-i>2*a)&&(window.csdn.loginBox.show(),t("unlogin_scroll_step",(new Date).getTime()))})}}),"undefined"!=typeof document.addEventListener&&document.addEventListener("DOMContentLoaded",function(){return"undefined"==typeof Chart?void("undefined"!=typeof console&&console.log("ERROR: You must include chart.min.js on this page in order to use Chart.js")):void[].forEach.call(document.querySelectorAll("div.chartjs"),function(t){var e,o;e="undefined"!=typeof chartjs_colors?chartjs_colors:"undefined"!=typeof chartjs_colors_json?JSON.parse(chartjs_colors_json):{fillColor:"rgba(151,187,205,0.5)",strokeColor:"rgba(151,187,205,0.8)",highlightFill:"rgba(151,187,205,0.75)",highlightStroke:"rgba(151,187,205,1)",data:["#B33131","#B66F2D","#B6B330","#71B232","#33B22D","#31B272","#2DB5B5","#3172B6","#3232B6","#6E31B2","#B434AF","#B53071"]},o="undefined"!=typeof chartjs_config?chartjs_config:"undefined"!=typeof chartjs_config_json?JSON.parse(chartjs_config_json):{Bar:{animation:!1},Doughnut:{animateRotate:!1},Line:{animation:!1},Pie:{animateRotate:!1},PolarArea:{animateRotate:!1}};var i=t.getAttribute("data-chart"),n=JSON.parse(t.getAttribute("data-chart-value"));if(n&&n.length&&i){t.innerHTML="";var a=document.createElement("canvas");a.height=t.getAttribute("data-chart-height"),t.appendChild(a);var s=document.createElement("div");s.setAttribute("class","chartjs-legend"),t.appendChild(s);var c,l=a.getContext("2d"),r=new Chart(l);if("bar"!=i)for(c=0;c").addClass("pre-numbering").hide();for($(this).addClass("has-numbering").parent().append(e),i=1;i ").text(i));e.fadeIn(1700)}),$(".pre-numbering li").css("color","#999"),setTimeout(function(){$(".math").each(function(t,e){$(this).find("span").last().css("color","#fff")})}),setTimeout(function(){$(".toc a[target='_blank']").attr("target",""),$("a.reversefootnote,a.footnote").attr("target","")},500)},html_line:function(){function t(){$(".CopyToClipboard").each(function(){var t=new ZeroClipboard.Client;t.setHandCursor(!0),t.addEventListener("load",function(t){}),t.addEventListener("mouseOver",function(t){var e=t.movie.parentNode.parentNode.parentNode.parentNode.nextSibling.innerHTML;e=e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),t.setText(e)}),t.addEventListener("complete",function(t,e){alert("代码已经复制到你的剪贴板。")}),t.glue(this,this.parentNode)})}$(".article_content pre").each(function(){var t=$(this);try{if(t.attr("class").indexOf("brush:")!=-1){var e=t.attr("class").split(";")[0].split(":")[1];t.attr("name","code"),t.attr("class",e)}t.attr("class")&&t.attr("name","code")}catch(o){}}),$(".article_content textarea[name=code]").each(function(){var t=$(this);t.attr("class").indexOf(":")!=-1&&t.attr("class",t.attr("class").split(":")[0])}),$(".highlighter").each(function(t,e){hljs.highlightBlock(e),hljs.lineNumbersBlock(e)}),window.clipboardData||setTimeout(t,1e3)}},s=$(".markdown_views")[0];s?(a.markdown_line(),/Safari/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&window.csdn.setSafariCodestyle()):a.html_line(),$(document).on("click",".input-mod",function(){$(".select-option").show(),$(".select-button").removeClass("rotate0").addClass("rotate180")}),$(document).on("input porpertychange",".private-input",function(){n(),$(this).val().length>120&&$(this).val($(this).val().substr(0,120)),$(".textarea-box .number").text(120-$(this).val().length),$(this).val().length>0&&$(".private-form").removeClass("no-active").addClass("active")}),$(document).on("click",".select-option li",function(){$(".super-private").height(126),$(".private-content .other").hide(),n(),$(".select-active").text($(this).text()).data("index",$(this).data("index")),$(this).data("isinput")?($(".super-private").height(240),$(".private-content .other").show()):$(".private-form").removeClass("no-active").addClass("active"),$(".select-button").addClass("rotate0").removeClass("rotate180"),$(".select-option").fadeOut()}),$(document).on("click",".select-button",function(){"block"===$(".select-option").css("display")?($(".select-option").fadeOut(),$(this).removeClass("rotate180").addClass("rotate0")):($(this).removeClass("rotate0").addClass("rotate180"),$(".select-option").fadeIn()),e.stopPropagation(),e.cancelBubble=!0}),$(document).on("click",".private-close, .close-active",function(){$(".super-private").hide(),$(".mask-dark").hide()}),$(document).on("click",".private-footer .active",function(){var e=$(".select-active").data("index"),o=$(".reason").val();e||alert("请选择原因"),text="text",t(articleId,e,o)})}),$(function(){$("article").find("table").map(function(){$(this).wrap('
')})}),!function(t){function e(){var e=navigator.userAgent.toLowerCase();return t.ActiveXObject||"ActiveXObject"in t?"ie":e.indexOf("firefox")>=0?"firefox":e.indexOf("chrome")>=0?"chrome":e.indexOf("opera")>=0?"opera":e.indexOf("safari")>=0?"safari":void 0}var o=t.document,i=function(e,i,n,a,s,c){function l(t,o,n){var a=(t+o)/2;if(n<=0||o-t=0?"win":t.indexOf("mac")>=0?"mac":void 0}function round2(number,fractionDigits){with(Math)return round(number*pow(10,fractionDigits))/pow(10,fractionDigits)}function iszoom(t){return"win"==t.system&&1!=t.zoom||("mac"==t.system&&t.zoom%1!=0&&t.zoom%2!=0||void 0)}function keyUpEvent(t){var e={win:{add:187,minus:189,origin:48},mac:{add:187,minus:189,origin:48}},o=e[system()];if(t.ctrlKey||t.metaKey)if(t.keyCode==o.add||t.keyCode==o.minus){var i={zoom:round2(detectZoom(),2),system:system()};LeftPopShow(iszoom(i),leftPopRendering,RenderData)}else t.keyCode!=o.add&&t.keyCode!=o.origin||BOXDOM.animate(CLOSEANI,2e3)}function keydownEvent(t){setTimeout(keyUpEvent,300,t)}function setStorage(t,e){return localStorage.setItem(t,e)}function getStorage(t){return localStorage.getItem(t)}function addStyles(t){var e=document.createElement("style");e.type="text/css",e.innerHTML=[".leftPop{width:330px;position: fixed;font-size: 12px;","box-shadow: 0 4px 8px 0 rgba(0,0,0,0.10);padding:16px 40px 16px 16px;z-index: 100;","}",".leftPop .leftPop-close{position: absolute;right: 20px;"+t,"cursor: pointer;","}"].join(""),document.getElementsByTagName("head")[0].appendChild(e)}function leftPopRendering(t){var e=$(".leftPop");if(e.length>0)return e.stop(!0,!1).animate(t.animate,t.animateTime),!1;var o='不再显示 ';e=$(''+o+"
"),addStyles(t.closeColor),e.append(t.template).css(t.style),e.appendTo($("body")).delay(2e3).animate(t.animate,t.animateTime),BOXDOM=e,$(".leftPop-close").on("click",function(){e.stop(!0,!1).animate(t.closeAnimate,t.animateTime),setStorage("leftPop",0)})}function LeftPopShow(t,e,o){var i=getStorage("leftPop");t&&null==i?e(o):BOXDOM.stop(!0,!1).animate(o.closeAnimate,o.animateTime)}function ChangeRatio(){var t=0,e=window.screen,o=navigator.userAgent.toLowerCase();return void 0!==window.devicePixelRatio?t=window.devicePixelRatio:~o.indexOf("msie")?e.deviceXDPI&&e.logicalXDPI&&(t=e.deviceXDPI/e.logicalXDPI):void 0!==window.outerWidth&&void 0!==window.innerWidth&&(t=window.outerWidth/window.innerWidth),t&&(t=Math.round(100*t)),t}var zoomData={zoom:round2(detectZoom(),2),system:system()},BOXDOM=$("leftPop");CLOSEANI={right:"-100%"};var events={win:{even:"keyup",fun:keyUpEvent},mac:{even:"keydown",fun:keydownEvent}};$(window).on(events[system()].even,events[system()].fun);var RenderData={template:"你的浏览器目前处于缩放状态,页面可能会出现错位现象,建议100%大小显示。 ",style:{right:"-100%","background-color":"#EBF5FD",top:"100px","border-left":"4px solid #70B8F0"},closeColor:"fill:#70B8F0;",animate:{right:0},closeAnimate:CLOSEANI,animateTime:2e3};window.onresize=function(){100==ChangeRatio()?BOXDOM.animate(CLOSEANI,2e3):LeftPopShow(iszoom(zoomData),leftPopRendering,RenderData)},LeftPopShow(iszoom(zoomData),leftPopRendering,RenderData)});