@ -29,7 +29,7 @@
< meta name = "description" content = "learn from zero,技术博客,Nicksxs,史学森" >
< meta name = "description" content = "learn from zero,技术博客,Nicksxs,史学森" >
< meta property = "og:type" content = "website" >
< meta property = "og:type" content = "website" >
< meta property = "og:title" content = "Nicksxs's Blog" >
< meta property = "og:title" content = "Nicksxs's Blog" >
< meta property = "og:url" content = "https://nicksxs.me/tags/C /index.html" >
< meta property = "og:url" content = "https://nicksxs.me/tags/c /index.html" >
< meta property = "og:site_name" content = "Nicksxs's Blog" >
< meta property = "og:site_name" content = "Nicksxs's Blog" >
< meta property = "og:description" content = "learn from zero,技术博客,Nicksxs,史学森" >
< meta property = "og:description" content = "learn from zero,技术博客,Nicksxs,史学森" >
< meta property = "article:author" content = "Nicksxs" >
< meta property = "article:author" content = "Nicksxs" >
@ -40,7 +40,7 @@
< meta property = "article:tag" content = "森哥" >
< meta property = "article:tag" content = "森哥" >
< meta name = "twitter:card" content = "summary" >
< meta name = "twitter:card" content = "summary" >
< link rel = "canonical" href = "https://nicksxs.me/tags/C /" >
< link rel = "canonical" href = "https://nicksxs.me/tags/c /" >
< script id = "page-configurations" >
< script id = "page-configurations" >
@ -53,7 +53,7 @@
};
};
< / script >
< / script >
< title > Tag: C | Nicksxs's Blog< / title >
< title > Tag: c++ | Nicksxs's Blog< / title >
< script async src = "https://www.googletagmanager.com/gtag/js?id=UA-61358619-1" > < / script >
< script async src = "https://www.googletagmanager.com/gtag/js?id=UA-61358619-1" > < / script >
< script >
< script >
@ -207,14 +207,14 @@
< div class = "post-block" >
< div class = "post-block" >
< div class = "posts-collapse" >
< div class = "posts-collapse" >
< div class = "collection-title" >
< div class = "collection-title" >
< h2 class = "collection-header" > C
< h2 class = "collection-header" > c++
< small > Tag< / small >
< small > Tag< / small >
< / h2 >
< / h2 >
< / div >
< / div >
< div class = "collection-year" >
< div class = "collection-year" >
< span class = "collection-header" > 2019 < / span >
< span class = "collection-header" > 2016 < / span >
< / div >
< / div >
< article itemscope itemtype = "http://schema.org/Article" >
< article itemscope itemtype = "http://schema.org/Article" >
@ -222,15 +222,198 @@
< div class = "post-meta" >
< div class = "post-meta" >
< time itemprop = "dateCreated"
< time itemprop = "dateCreated"
datetime="2019-12-10T23:26:26 +08:00"
content="2019-12-10 ">
12-10
datetime="2016-10-12T23:25:17 +08:00"
content="2016-10-12 ">
10-12
< / time >
< / time >
< / div >
< / div >
< div class = "post-title" >
< div class = "post-title" >
< a class = "post-title-link" href = "/2019/12/10/Redis-Part-1/" itemprop = "url" >
< span itemprop = "name" > Redis_分布式锁< / span >
< a class = "post-title-link" href = "/2016/10/12/summary-ranges-228/" itemprop = "url" >
< span itemprop = "name" > summary-ranges-228< / span >
< / a >
< / div >
< / header >
< / article >
< article itemscope itemtype = "http://schema.org/Article" >
< header class = "post-header" >
< div class = "post-meta" >
< time itemprop = "dateCreated"
datetime="2016-10-11T22:04:28+08:00"
content="2016-10-11">
10-11
< / time >
< / div >
< div class = "post-title" >
< a class = "post-title-link" href = "/2016/10/11/minimum-size-subarray-sum-209/" itemprop = "url" >
< span itemprop = "name" > minimum-size-subarray-sum-209< / span >
< / a >
< / div >
< / header >
< / article >
< article itemscope itemtype = "http://schema.org/Article" >
< header class = "post-header" >
< div class = "post-meta" >
< time itemprop = "dateCreated"
datetime="2016-09-29T23:16:06+08:00"
content="2016-09-29">
09-29
< / time >
< / div >
< div class = "post-title" >
< a class = "post-title-link" href = "/2016/09/29/binary-watch/" itemprop = "url" >
< span itemprop = "name" > binary-watch< / span >
< / a >
< / div >
< / header >
< / article >
< article itemscope itemtype = "http://schema.org/Article" >
< header class = "post-header" >
< div class = "post-meta" >
< time itemprop = "dateCreated"
datetime="2016-08-14T21:33:24+08:00"
content="2016-08-14">
08-14
< / time >
< / div >
< div class = "post-title" >
< a class = "post-title-link" href = "/2016/08/14/34-Search-for-a-Range/" itemprop = "url" >
< span itemprop = "name" > 34_Search_for_a_Range< / span >
< / a >
< / div >
< / header >
< / article >
< div class = "collection-year" >
< span class = "collection-header" > 2015< / span >
< / div >
< article itemscope itemtype = "http://schema.org/Article" >
< header class = "post-header" >
< div class = "post-meta" >
< time itemprop = "dateCreated"
datetime="2015-06-22T10:29:44+08:00"
content="2015-06-22">
06-22
< / time >
< / div >
< div class = "post-title" >
< a class = "post-title-link" href = "/2015/06/22/invert-binary-tree/" itemprop = "url" >
< span itemprop = "name" > invert-binary-tree< / span >
< / a >
< / div >
< / header >
< / article >
< article itemscope itemtype = "http://schema.org/Article" >
< header class = "post-header" >
< div class = "post-meta" >
< time itemprop = "dateCreated"
datetime="2015-04-15T13:49:00+08:00"
content="2015-04-15">
04-15
< / time >
< / div >
< div class = "post-title" >
< a class = "post-title-link" href = "/2015/04/15/Leetcode-No-3/" itemprop = "url" >
< span itemprop = "name" > leetcode no.3< / span >
< / a >
< / div >
< / header >
< / article >
< article itemscope itemtype = "http://schema.org/Article" >
< header class = "post-header" >
< div class = "post-meta" >
< time itemprop = "dateCreated"
datetime="2015-04-14T17:40:10+08:00"
content="2015-04-14">
04-14
< / time >
< / div >
< div class = "post-title" >
< a class = "post-title-link" href = "/2015/04/14/Add-Two-Number/" itemprop = "url" >
< span itemprop = "name" > add-two-number< / span >
< / a >
< / div >
< / header >
< / article >
< article itemscope itemtype = "http://schema.org/Article" >
< header class = "post-header" >
< div class = "post-meta" >
< time itemprop = "dateCreated"
datetime="2015-03-13T17:22:20+08:00"
content="2015-03-13">
03-13
< / time >
< / div >
< div class = "post-title" >
< a class = "post-title-link" href = "/2015/03/13/Reverse-Integer/" itemprop = "url" >
< span itemprop = "name" > Reverse Integer< / span >
< / a >
< / div >
< / header >
< / article >
< article itemscope itemtype = "http://schema.org/Article" >
< header class = "post-header" >
< div class = "post-meta" >
< time itemprop = "dateCreated"
datetime="2015-03-11T17:35:20+08:00"
content="2015-03-11">
03-11
< / time >
< / div >
< div class = "post-title" >
< a class = "post-title-link" href = "/2015/03/11/Reverse-Bits/" itemprop = "url" >
< span itemprop = "name" > Reverse Bits< / span >
< / a >
< / div >
< / header >
< / article >
< article itemscope itemtype = "http://schema.org/Article" >
< header class = "post-header" >
< div class = "post-meta" >
< time itemprop = "dateCreated"
datetime="2015-03-11T17:02:58+08:00"
content="2015-03-11">
03-11
< / time >
< / div >
< div class = "post-title" >
< a class = "post-title-link" href = "/2015/03/11/Number-Of-1-Bits/" itemprop = "url" >
< span itemprop = "name" > Number of 1 Bits< / span >
< / a >
< / a >
< / div >
< / div >
@ -244,6 +427,9 @@
< nav class = "pagination" >
< span class = "page-number current" > 1< / span > < a class = "page-number" href = "/tags/c/page/2/" > 2< / a > < a class = "extend next" rel = "next" href = "/tags/c/page/2/" > < i class = "fa fa-angle-right" aria-label = "Next page" > < / i > < / a >
< / nav >
@ -578,170 +764,6 @@
< script src = "//cdn.jsdelivr.net/npm/quicklink@1/dist/quicklink.umd.js" > < / script >
< script >
window.addEventListener('load', () => {
quicklink({
timeout : 3000,
priority: true,
ignores : [uri => uri.includes('#'),uri => uri === 'https://nicksxs.me/tags/C/',]
});
});
< / script >
< script >
function loadCount() {
var d = document, s = d.createElement('script');
s.src = 'https://nicksxs.disqus.com/count.js';
s.id = 'dsq-count-scr';
(d.head || d.body).appendChild(s);
}
// defer loading until the whole page loading is completed
window.addEventListener('load', loadCount, false);
< / script >
< / body >
< / html >
.time + 1;
Counter('put', '/classes/Counter/' + counter.objectId, { time: { '__op': 'Increment', 'amount': 1 } })
.catch(error => {
console.error('Failed to save visitor count', error);
});
} else {
leancloudSelector(url).innerText = 'Counter not initialized! More info at console err msg.';
console.error('ATTENTION! LeanCloud counter has security bug, see how to solve it here: https://github.com/theme-next/hexo-leancloud-counter-security. \n However, you can still use LeanCloud without security, by setting `security` option to `false`.');
}
})
.catch(error => {
console.error('LeanCloud Counter Error', error);
});
}
function showTime(Counter) {
var visitors = document.querySelectorAll('.leancloud_visitors');
var entries = [...visitors].map(element => {
return decodeURI(element.id);
});
Counter('get', '/classes/Counter?where=' + encodeURIComponent(JSON.stringify({ url: { '$in': entries } })))
.then(response => response.json())
.then(({ results }) => {
for (let url of entries) {
let target = results.find(item => item.url === url);
leancloudSelector(url).innerText = target ? target.time : 0;
}
})
.catch(error => {
console.error('LeanCloud Counter Error', error);
});
}
let { app_id, app_key, server_url } = {"enable":true,"app_id":"ysza182Vghlqjdt7QiwGLLJy-gzGzoHsz","app_key":"s9GDqbn7gnGGkusf66YRVccw","server_url":"https://leancloud.cn","security":true};
function fetchData(api_server) {
var Counter = (method, url, data) => {
return fetch(`${api_server}/1.1${url}`, {
method,
headers: {
'X-LC-Id' : app_id,
'X-LC-Key' : app_key,
'Content-Type': 'application/json',
},
body: JSON.stringify(data)
});
};
if (CONFIG.page.isPost) {
if (CONFIG.hostname !== location.hostname) return;
addCount(Counter);
} else if (document.querySelectorAll('.post-title-link').length >= 1) {
showTime(Counter);
}
}
let api_server = app_id.slice(-9) !== '-MdYXbMMI' ? server_url : `https://${app_id.slice(0, 8).toLowerCase()}.api.lncldglobal.com`;
if (api_server) {
fetchData(api_server);
} else {
fetch('https://app-router.leancloud.cn/2/route?appId=' + app_id)
.then(response => response.json())
.then(({ api_server }) => {
fetchData('https://' + api_server);
});
}
})();
< / script >
< / div >
< / footer >
< / div >
< script src = "/lib/anime.min.js" > < / script >
< script src = "//cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js" > < / script >
< script src = "//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js" > < / script >
< script src = "//cdn.jsdelivr.net/npm/lozad@1/dist/lozad.min.js" > < / script >
< script src = "/lib/velocity/velocity.min.js" > < / script >
< script src = "/lib/velocity/velocity.ui.min.js" > < / script >
< script src = "/js/utils.js" > < / script >
< script src = "/js/motion.js" > < / script >
< script src = "/js/schemes/pisces.js" > < / script >
< script src = "/js/next-boot.js" > < / script >
< script >
(function(){
var canonicalURL, curProtocol;
//Get the < link > tag
var x=document.getElementsByTagName("link");
//Find the last canonical URL
if(x.length > 0){
for (i=0;i< x.length ; i + + ) {
if(x[i].rel.toLowerCase() == 'canonical' & & x[i].href){
canonicalURL=x[i].href;
}
}
}
//Get protocol
if (!canonicalURL){
curProtocol = window.location.protocol.split(':')[0];
}
else{
curProtocol = canonicalURL.split(':')[0];
}
//Get current URL if the canonical URL does not exist
if (!canonicalURL) canonicalURL = window.location.href;
//Assign script content. Replace current URL with the canonical URL
!function(){var e=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,r=canonicalURL,t=document.referrer;if(!e.test(r)){var n=(String(curProtocol).toLowerCase() === 'https')?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r); var i=new Image;i.src=n}}(window);})();
< / script >
< script src = "//cdn.jsdelivr.net/npm/quicklink@1/dist/quicklink.umd.js" > < / script >
< script src = "//cdn.jsdelivr.net/npm/quicklink@1/dist/quicklink.umd.js" > < / script >
< script >
< script >
window.addEventListener('load', () => {
window.addEventListener('load', () => {