-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
264 lines (250 loc) · 25.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<!doctype html><html class="theme-next pisces use-motion"><head><meta charset=UTF-8><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1"><meta http-equiv=Cache-Control content=no-transform><meta http-equiv=Cache-Control content=no-siteapp><link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel=stylesheet type=text/css><link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel=stylesheet type=text/css><link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel=stylesheet type=text/css><link href="/css/main.css?v=5.0.1" rel=stylesheet type=text/css><meta name=keywords content="Hexo, NexT"><link rel=alternate href=/atom.xml title="Mr.long's Blog" type=application/atom+xml><link rel="shortcut icon" type=image/x-icon href="/favicon.ico?v=5.0.1"><meta name=description content=把生活过成诗,简单而精致..><meta property=og:type content=website><meta property=og:title content="Mr.long's Blog"><meta property=og:url content=https://longhaoteng.github.io/index.html><meta property=og:site_name content="Mr.long's Blog"><meta property=og:description content=把生活过成诗,简单而精致..><meta name=twitter:card content=summary><meta name=twitter:title content="Mr.long's Blog"><meta name=twitter:description content=把生活过成诗,简单而精致..><script type=text/javascript id=hexo.configuration>
var NexT = window.NexT || {};
var CONFIG = {
scheme: 'Pisces',
sidebar: {"position":"left","display":"always"},
fancybox: true,
motion: true,
duoshuo: {
userId: 6300050944562300000,
author: '博主'
}
};
</script><link rel=canonical href="https://longhaoteng.github.io/"><title>Mr.long's Blog</title></head><body itemscope itemtype=http://schema.org/WebPage lang=zh-Hans><script type=text/javascript>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?a0974d4f45b2223deb63c9daf5a19d07";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script><div class="container one-collumn sidebar-position-left page-home"><div class=headband></div><header id=header class=header itemscope itemtype=http://schema.org/WPHeader><div class=header-inner><div class=site-meta><div class=custom-logo-site-title><a href="/" class=brand rel=start><span class=logo-line-before><i></i></span> <span class=site-title>Mr.long's Blog</span> <span class=logo-line-after><i></i></span></a></div><p class=site-subtitle>Personal blog</p></div><div class=site-nav-toggle><button><span class=btn-bar></span> <span class=btn-bar></span> <span class=btn-bar></span></button></div><nav class=site-nav><ul id=menu class=menu><li class="menu-item menu-item-home"><a href="/" rel=section><i class="menu-item-icon fa fa-fw fa-home"></i><br>首页</a></li><li class="menu-item menu-item-categories"><a href=/categories rel=section><i class="menu-item-icon fa fa-fw fa-th"></i><br>分类</a></li><li class="menu-item menu-item-tags"><a href=/tags rel=section><i class="menu-item-icon fa fa-fw fa-tags"></i><br>标签</a></li><li class="menu-item menu-item-about"><a href=/about rel=section><i class="menu-item-icon fa fa-fw fa-user"></i><br>关于</a></li><li class="menu-item menu-item-guestbook"><a href=/guestbook rel=section><i class="menu-item-icon fa fa-fw fa-comment"></i><br>留言</a></li><li class="menu-item menu-item-search"><a href=# class=popup-trigger><i class="menu-item-icon fa fa-search fa-fw"></i><br>搜索</a></li></ul><div class=site-search><div class=popup><span class="search-icon fa fa-search"></span> <input type=text id=local-search-input><div id=local-search-result></div><span class=popup-btn-close>close</span></div></div></nav></div></header><main id=main class=main><div class=main-inner><div class=content-wrap><div id=content class=content><section id=posts class=posts-expand><article class="post post-type-normal" itemscope itemtype=http://schema.org/Article><header class=post-header><h1 class=post-title itemprop="name headline"><a class=post-title-link href="/2016/08/01/hexo引用自定义js文件和css样式/" itemprop=url>hexo引用自定义js文件和css样式</a></h1><div class=post-meta><span class=post-time><span class=post-meta-item-icon><i class="fa fa-calendar-o"></i></span> <span class=post-meta-item-text>发表于</span><time itemprop=dateCreated datetime=2016-08-01T22:55:08+08:00 content=2016-08-01>2016-08-01</time></span> <span class=post-category> | <span class=post-meta-item-icon><i class="fa fa-folder-o"></i></span> <span class=post-meta-item-text>分类于</span> <span itemprop=about itemscope itemtype=https://schema.org/Thing><a href="/categories/hexo/" itemprop=url rel=index><span itemprop=name>hexo</span></a></span></span> <span class=post-comments-count> | <a href=/2016/08/01/hexo引用自定义js文件和css样式/#comments itemprop=discussionUrl><span class="post-comments-count ds-thread-count" data-thread-key="2016/08/01/hexo引用自定义js文件和css样式/" itemprop=commentsCount></span></a></span> <span id="/2016/08/01/hexo引用自定义js文件和css样式/" class=leancloud_visitors data-flag-title=hexo引用自定义js文件和css样式> | <span class=post-meta-item-icon><i class="fa fa-eye"></i></span> <span class=post-meta-item-text>阅读次数</span> <span class=leancloud-visitors-count></span></span></div></header><div class=post-body itemprop=articleBody><p>博主用的是next主题,别的主题目录结构可能不太一样,但是整个框架是一样的,生成方式是一样的,所以引用方式也是相同的</p><div class="post-more-link text-center"><a class=btn href=/2016/08/01/hexo引用自定义js文件和css样式/#more rel=contents>阅读全文 »</a></div></div><div></div><div></div><footer class=post-footer><div class=post-eof></div></footer></article><article class="post post-type-normal" itemscope itemtype=http://schema.org/Article><header class=post-header><h1 class=post-title itemprop="name headline"><a class=post-title-link href="/2016/07/13/Oracle常用sql语句/" itemprop=url>Oracle常用sql语句</a></h1><div class=post-meta><span class=post-time><span class=post-meta-item-icon><i class="fa fa-calendar-o"></i></span> <span class=post-meta-item-text>发表于</span><time itemprop=dateCreated datetime=2016-07-13T09:17:56+08:00 content=2016-07-13>2016-07-13</time></span> <span class=post-category> | <span class=post-meta-item-icon><i class="fa fa-folder-o"></i></span> <span class=post-meta-item-text>分类于</span> <span itemprop=about itemscope itemtype=https://schema.org/Thing><a href="/categories/Oracle/" itemprop=url rel=index><span itemprop=name>Oracle</span></a></span></span> <span class=post-comments-count> | <a href=/2016/07/13/Oracle常用sql语句/#comments itemprop=discussionUrl><span class="post-comments-count ds-thread-count" data-thread-key="2016/07/13/Oracle常用sql语句/" itemprop=commentsCount></span></a></span> <span id="/2016/07/13/Oracle常用sql语句/" class=leancloud_visitors data-flag-title=Oracle常用sql语句> | <span class=post-meta-item-icon><i class="fa fa-eye"></i></span> <span class=post-meta-item-text>阅读次数</span> <span class=leancloud-visitors-count></span></span></div></header><div class=post-body itemprop=articleBody><p>Sql(structured query language) 结构化查询语言。</p><p>Sql语句主要包括DQL,DML,DDL,DCL和TCL。</p><p>DQL是数据查询语言:SELECT,用于查询数据。</p><p>DML(data manipulation language)是数据操作语言:它们是UPDATE、INSERT、DELETE,MERGE就象它的名字一样,这4条命令是用来对数据库里的数据进行操作的语言。</p><p>DDL(data definition language)是数据定义语言:DDL比DML要多,主要的命令有CREATE、ALTER、DROP、TRUNCATE、RENAME、COMMENT等,DDL主要是用在定义或改变表(TABLE)的结构,数据类型,表之间的链接和约束等初始化工作上,他们大多在建立表时使用。</p><p>DCL(Data Control Language)是数据库控制语言:是用来设置或更改数据库用户或角色权限的语句,包括(grant,deny,revoke等)语句。</p><p>TCL是事务控制语言:包括(COMMIT、ROLLBACK、SAVEPOINT),对事务进行控制。</p><div class="post-more-link text-center"><a class=btn href=/2016/07/13/Oracle常用sql语句/#more rel=contents>阅读全文 »</a></div></div><div></div><div></div><footer class=post-footer><div class=post-eof></div></footer></article><article class="post post-type-normal" itemscope itemtype=http://schema.org/Article><header class=post-header><h1 class=post-title itemprop="name headline"><a class=post-title-link href="/2016/07/07/Pycharm自动生成编码格式和author/" itemprop=url>Pycharm自动生成编码格式和author</a></h1><div class=post-meta><span class=post-time><span class=post-meta-item-icon><i class="fa fa-calendar-o"></i></span> <span class=post-meta-item-text>发表于</span><time itemprop=dateCreated datetime=2016-07-07T16:20:00+08:00 content=2016-07-07>2016-07-07</time></span> <span class=post-category> | <span class=post-meta-item-icon><i class="fa fa-folder-o"></i></span> <span class=post-meta-item-text>分类于</span> <span itemprop=about itemscope itemtype=https://schema.org/Thing><a href="/categories/Pycharm/" itemprop=url rel=index><span itemprop=name>Pycharm</span></a></span></span> <span class=post-comments-count> | <a href=/2016/07/07/Pycharm自动生成编码格式和author/#comments itemprop=discussionUrl><span class="post-comments-count ds-thread-count" data-thread-key="2016/07/07/Pycharm自动生成编码格式和author/" itemprop=commentsCount></span></a></span> <span id="/2016/07/07/Pycharm自动生成编码格式和author/" class=leancloud_visitors data-flag-title=Pycharm自动生成编码格式和author> | <span class=post-meta-item-icon><i class="fa fa-eye"></i></span> <span class=post-meta-item-text>阅读次数</span> <span class=leancloud-visitors-count></span></span></div></header><div class=post-body itemprop=articleBody><p>Pycharm自动生成编码格式和author设置..</p><div class="post-more-link text-center"><a class=btn href=/2016/07/07/Pycharm自动生成编码格式和author/#more rel=contents>阅读全文 »</a></div></div><div></div><div></div><footer class=post-footer><div class=post-eof></div></footer></article></section><nav class=pagination><span class="page-number current">1</span><a class=page-number href="/page/2/">2</a><a class=page-number href="/page/3/">3</a><a class="extend next" rel=next href="/page/2/"><i class="fa fa-angle-right"></i></a></nav></div></div><div class=sidebar-toggle><div class=sidebar-toggle-line-wrap><span class="sidebar-toggle-line sidebar-toggle-line-first"></span> <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span> <span class="sidebar-toggle-line sidebar-toggle-line-last"></span></div></div><aside id=sidebar class=sidebar><div class=sidebar-inner><section class="site-overview sidebar-panel sidebar-panel-active"><div class="site-author motion-element" itemprop=author itemscope itemtype=http://schema.org/Person><img class=site-author-image itemprop=image src="https://avatars0.githubusercontent.com/u/11868705?v=3&u=b50ab87334a75041c40eaf7e700cd6bc79379a0c&s=140" alt=Mr.龙><p class=site-author-name itemprop=name>Mr.龙</p><p class="site-description motion-element" itemprop=description>把生活过成诗,简单而精致..</p></div><nav class="site-state motion-element"><div class="site-state-item site-state-posts"><a href="/"><span class=site-state-item-count>8</span> <span class=site-state-item-name>日志</span></a></div><div class="site-state-item site-state-categories"><a href=/categories><span class=site-state-item-count>6</span> <span class=site-state-item-name>分类</span></a></div><div class="site-state-item site-state-tags"><a href=/tags><span class=site-state-item-count>6</span> <span class=site-state-item-name>标签</span></a></div></nav><div class="feed-link motion-element"><a href=/atom.xml rel=alternate><i class="fa fa-rss"></i> RSS</a></div><div class="links-of-author motion-element"><span class=links-of-author-item><a href="https://github.com/LongHaoTeng/" target=_blank title=GitHub><i class="fa fa-fw fa-github"></i> GitHub</a></span> <span class=links-of-author-item><a href=https://www.zhihu.com/people/Mr.long target=_blank title=Zhihu><i class="fa fa-fw fa-pinterest"></i> Zhihu</a></span></div><div class="links-of-blogroll motion-element links-of-blogroll-inline"><div class=links-of-blogroll-title><i class="fa fa-fw fa-globe"></i> 友情链接</div><ul class=links-of-blogroll-list><li class=links-of-blogroll-item><a href=https://bluestudio.github.io title=BlueStudio target=_blank>BlueStudio</a></li><li class=links-of-blogroll-item><a href=https://FutureWL.github.io title=FutureWL target=_blank>FutureWL</a></li><li class=links-of-blogroll-item><a href=https://gaojindeng.github.io title=GotoAuto target=_blank>GotoAuto</a></li><li class=links-of-blogroll-item><a href=https://chrisconstantine.github.io title=Chrislee target=_blank>Chrislee</a></li></ul></div></section></div></aside></div></main><footer id=footer class=footer><div class=footer-inner><div class=copyright>© <span itemprop=copyrightYear>2016</span> <span class=with-love><i class="fa fa-heart"></i></span> <span class=author itemprop=copyrightHolder>Mr.龙</span></div><div class=powered-by>愿用一柄键盘</div><div class=theme-info>写尽世间浮华</div></div></footer><div class=back-to-top><i class="fa fa-arrow-up"></i></div></div><script type=text/javascript>
if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
window.Promise = null;
}
</script><script type=text/javascript src="/vendors/jquery/index.js?v=2.1.3"></script><script type=text/javascript src="/vendors/fastclick/lib/fastclick.min.js?v=1.0.6"></script><script type=text/javascript src="/vendors/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script><script type=text/javascript src="/vendors/velocity/velocity.min.js?v=1.2.1"></script><script type=text/javascript src="/vendors/velocity/velocity.ui.min.js?v=1.2.1"></script><script type=text/javascript src="/vendors/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script><script type=text/javascript src="/js/src/utils.js?v=5.0.1"></script><script type=text/javascript src="/js/src/motion.js?v=5.0.1"></script><script type=text/javascript src="/js/src/affix.js?v=5.0.1"></script><script type=text/javascript src="/js/src/schemes/pisces.js?v=5.0.1"></script><script type=text/javascript src="/js/src/bootstrap.js?v=5.0.1"></script><script type=text/javascript src=/js/src/love.js></script><script type=text/javascript color=0,104,183 opacity=1 zindex=-2 count=50 src=/js/src/particle.js></script><link rel=stylesheet type=text/css href=/css/customization.css><script type=text/javascript>
var duoshuoQuery = {short_name:"longhaoteng"};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.id = 'duoshuo-script';
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script><script src="/vendors/ua-parser-js/dist/ua-parser.min.js?v=0.7.9"></script><script src=/js/src/hook-duoshuo.js></script><script type=text/javascript>
// Popup Window;
var isfetched = false;
// Search DB path;
var search_path = "search.xml";
if (search_path.length == 0) {
search_path = "search.xml";
}
var path = "/" + search_path;
// monitor main search box;
function proceedsearch() {
$("body").append('<div class="popoverlay">').css('overflow', 'hidden');
$('.popup').toggle();
}
// search function;
var searchFunc = function(path, search_id, content_id) {
'use strict';
$.ajax({
url: path,
dataType: "xml",
async: true,
success: function( xmlResponse ) {
// get the contents from search data
isfetched = true;
$('.popup').detach().appendTo('.header-inner');
var datas = $( "entry", xmlResponse ).map(function() {
return {
title: $( "title", this ).text(),
content: $("content",this).text(),
url: $( "url" , this).text()
};
}).get();
var $input = document.getElementById(search_id);
var $resultContent = document.getElementById(content_id);
$input.addEventListener('input', function(){
var matchcounts = 0;
var str='<ul class=\"search-result-list\">';
var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
$resultContent.innerHTML = "";
if (this.value.trim().length > 1) {
// perform local searching
datas.forEach(function(data) {
var isMatch = true;
var content_index = [];
var data_title = data.title.trim().toLowerCase();
var data_content = data.content.trim().replace(/<[^>]+>/g,"").toLowerCase();
var data_url = data.url;
var index_title = -1;
var index_content = -1;
var first_occur = -1;
// only match artiles with not empty titles and contents
if(data_title != '' && data_content != '') {
keywords.forEach(function(keyword, i) {
index_title = data_title.indexOf(keyword);
index_content = data_content.indexOf(keyword);
if( index_title < 0 && index_content < 0 ){
isMatch = false;
} else {
if (index_content < 0) {
index_content = 0;
}
if (i == 0) {
first_occur = index_content;
}
}
});
}
// show search results
if (isMatch) {
matchcounts += 1;
str += "<li><a href='"+ data_url +"' class='search-result-title'>"+ data_title +"</a>";
var content = data.content.trim().replace(/<[^>]+>/g,"");
if (first_occur >= 0) {
// cut out 100 characters
var start = first_occur - 20;
var end = first_occur + 80;
if(start < 0){
start = 0;
}
if(start == 0){
end = 50;
}
if(end > content.length){
end = content.length;
}
var match_content = content.substring(start, end);
// highlight all keywords
keywords.forEach(function(keyword){
var regS = new RegExp(keyword, "gi");
match_content = match_content.replace(regS, "<b class=\"search-keyword\">"+keyword+"</b>");
});
str += "<p class=\"search-result\">" + match_content +"...</p>"
}
str += "</li>";
}
})};
str += "</ul>";
if (matchcounts == 0) { str = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>' }
if (keywords == "") { str = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>' }
$resultContent.innerHTML = str;
});
proceedsearch();
}
});}
// handle and trigger popup window;
$('.popup-trigger').mousedown(function(e) {
e.stopPropagation();
if (isfetched == false) {
searchFunc(path, 'local-search-input', 'local-search-result');
} else {
proceedsearch();
};
});
$('.popup-btn-close').click(function(e){
$('.popup').hide();
$(".popoverlay").remove();
$('body').css('overflow', '');
});
$('.popup').click(function(e){
e.stopPropagation();
});
</script><script src=https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js></script><script>AV.initialize("vKEzXhq0H0bCcSuVsfbuSYOj-gzGzoHsz", "nnNmurSGuEL9KA9RtvfnRsAz");</script><script>
function showTime(Counter) {
var query = new AV.Query(Counter);
var entries = [];
var $visitors = $(".leancloud_visitors");
$visitors.each(function () {
entries.push( $(this).attr("id").trim() );
});
query.containedIn('url', entries);
query.find()
.done(function (results) {
var COUNT_CONTAINER_REF = '.leancloud-visitors-count';
if (results.length === 0) {
$visitors.find(COUNT_CONTAINER_REF).text(0);
return;
}
for (var i = 0; i < results.length; i++) {
var item = results[i];
var url = item.get('url');
var time = item.get('time');
var element = document.getElementById(url);
$(element).find(COUNT_CONTAINER_REF).text(time);
}
for(var i = 0; i < entries.length; i++) {
var url = entries[i];
var element = document.getElementById(url);
var countSpan = $(element).find(COUNT_CONTAINER_REF);
if( countSpan.text() == '') {
countSpan.text(0);
}
}
})
.fail(function (object, error) {
console.log("Error: " + error.code + " " + error.message);
});
}
function addCount(Counter) {
var $visitors = $(".leancloud_visitors");
var url = $visitors.attr('id').trim();
var title = $visitors.attr('data-flag-title').trim();
var query = new AV.Query(Counter);
query.equalTo("url", url);
query.find({
success: function(results) {
if (results.length > 0) {
var counter = results[0];
counter.fetchWhenSave(true);
counter.increment("time");
counter.save(null, {
success: function(counter) {
var $element = $(document.getElementById(url));
$element.find('.leancloud-visitors-count').text(counter.get('time'));
},
error: function(counter, error) {
console.log('Failed to save Visitor num, with error message: ' + error.message);
}
});
} else {
var newcounter = new Counter();
/* Set ACL */
var acl = new AV.ACL();
acl.setPublicReadAccess(true);
acl.setPublicWriteAccess(true);
newcounter.setACL(acl);
/* End Set ACL */
newcounter.set("title", title);
newcounter.set("url", url);
newcounter.set("time", 1);
newcounter.save(null, {
success: function(newcounter) {
var $element = $(document.getElementById(url));
$element.find('.leancloud-visitors-count').text(newcounter.get('time'));
},
error: function(newcounter, error) {
console.log('Failed to create');
}
});
}
},
error: function(error) {
console.log('Error:' + error.code + " " + error.message);
}
});
}
$(function() {
var Counter = AV.Object.extend("Counter");
if ($('.leancloud_visitors').length == 1) {
addCount(Counter);
} else if ($('.post-title-link').length > 1) {
showTime(Counter);
}
});
</script><script type=text/javascript async src=//push.zhanzhang.baidu.com/push.js>
</script></body></html>