-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1077 lines (634 loc) · 24.4 KB
/
index.html
File metadata and controls
1077 lines (634 loc) · 24.4 KB
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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
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
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
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
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>行胜于言</title>
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
<meta name="author" content="xiabo2011">
<!--<%- open_graph({twitter_id: theme.author.twitter, google_plus: theme.author.google_plus}) %>-->
<meta name="description" content="page.description">
<meta property="og:type" content="website">
<meta property="og:title" content="">
<meta property="og:url" content="/">
<meta property="og:site_name" content="行胜于言">
<meta property="og:description" content="">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="">
<meta name="twitter:description" content="page.description">
<meta name="twitter:creator" content="@">
<link rel="publisher" href="">
<link rel="alternative" href="/atom.xml" title="行胜于言" type="application/atom+xml">
<link rel="icon" href="/assets/img/favicon.ico">
<link rel="apple-touch-icon" href="/assets/img/minion.png">
<link rel="apple-touch-icon-precomposed" href="/assets/img/minion.png">
<link rel="stylesheet" href="/assets/css/style.css" type="text/css">
<link rel="stylesheet" href="/assets/css/highlight.css" type="text/css">
<style>
body >header {
background: url("/assets/img/banner.png") center #2ca6cb;
}
</style>
</head>
<body>
<header>
<div>
<div id="imglogo">
<a href="/"><img src="/assets/img/logo.png" alt="行胜于言" title="行胜于言"/></a>
</div>
<div id="textlogo">
<h1 class="site-name"><a href="/" title="行胜于言">行胜于言</a></h1>
<h2 class="blog-motto">Follow your heart</h2>
</div>
<div class="navbar"><a class="navbutton navmobile" href="#" title="menu">
</a></div>
<nav class="animated">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/archives">Archives</a></li>
<li><a href="/tags">Tags</a></li>
<li><a href="/categories">Categories</a></li>
<li><a href="/about">About</a></li>
<li>
<form class="search" action="/search" method="get" accept-charset="utf-8">
<input type="search" id="search" name="q" autocomplete="off" maxlength="20" placeholder="搜索" />
</form>
</li>
</ul>
</nav>
</div>
</header>
<div id="container">
<div id="main">
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/distributed/2018/09/02/dubbo-loadbalance/" title="Dubbo一致性哈希遇到的坑" itemprop="url">Dubbo一致性哈希遇到的坑</a>
</h1>
<p class="article-author">By
<a href="/about" title="xiabo2011" target="_blank" itemprop="author">xiabo2011</a>
</p>
<p class="article-time">
<time datetime="2018-09-02 08:01:01 +0800" itemprop="datePublished"> 2018-09-02</time>
</p>
</header>
<div class="article-content">
<p>关于dubbo的负载均衡策略已经有太多blog介绍了,这里说一下我在使用dubbo一致性哈希负载均衡策略时候遇到的一个坑。</p>
<p class="article-more-link">
<a href="/distributed/2018/09/02/dubbo-loadbalance/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-categories">
<span></span>
<!--
<%- list_categories(item.categories, {
show_count: false,
class: 'article-category',
style: 'none',
separator: '►'
}) %>
-->
<a class="article-category-link" href="/categories/#distributed">distributed</a>
</div>
<div class="article-tags">
<!--
<% var tags = [];
item.tags.forEach(function(tag){
tags.push('<a href="' + config.root + tag.path + '">' + tag.name + '</a>');
}); %>-->
<span></span> <!--<%- tags.join('') %>-->
<a href="/tags/#dubbo">dubbo</a>
</div>
</div>
<div class="comments-count">
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/distributed/2018/09/02/zookeeper-curator/" title="Zookeeper Curator" itemprop="url">Zookeeper Curator</a>
</h1>
<p class="article-author">By
<a href="/about" title="xiabo2011" target="_blank" itemprop="author">xiabo2011</a>
</p>
<p class="article-time">
<time datetime="2018-09-02 08:01:01 +0800" itemprop="datePublished"> 2018-09-02</time>
</p>
</header>
<div class="article-content">
<p>Curator是一个Zookeeper的客户端库,是一个分布式协调服务,来帮助你管理zookeeper的连接,减少使用zookeeper的复杂性。
它包含了一套高级API和通用的utilities,提供了一些recipes(如lock,barriers和cache等)和操作(如create, delete, getData等),
这些都使得编写的应用可以更加鲁棒。</p>
<p class="article-more-link">
<a href="/distributed/2018/09/02/zookeeper-curator/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-categories">
<span></span>
<!--
<%- list_categories(item.categories, {
show_count: false,
class: 'article-category',
style: 'none',
separator: '►'
}) %>
-->
<a class="article-category-link" href="/categories/#distributed">distributed</a>
</div>
<div class="article-tags">
<!--
<% var tags = [];
item.tags.forEach(function(tag){
tags.push('<a href="' + config.root + tag.path + '">' + tag.name + '</a>');
}); %>-->
<span></span> <!--<%- tags.join('') %>-->
<a href="/tags/#zookeeper">zookeeper</a>
</div>
</div>
<div class="comments-count">
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/distributed/2018/08/26/zookeeper-api/" title="Zookeeper API使用" itemprop="url">Zookeeper API使用</a>
</h1>
<p class="article-author">By
<a href="/about" title="xiabo2011" target="_blank" itemprop="author">xiabo2011</a>
</p>
<p class="article-time">
<time datetime="2018-08-26 08:01:01 +0800" itemprop="datePublished"> 2018-08-26</time>
</p>
</header>
<div class="article-content">
<h2 id="zookeeper-session">Zookeeper session</h2>
<p>Zookeeper client通过创建一个session与Zookeeper server通信,如果与某一台server的连接断了,session会转移到与另一台server建立的连接。通过org.apache.zookeeper.Zookeeper类构建zookeeper session</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">Zookeeper</span><span class="o">(</span>
<span class="nc">String</span> <span class="n">connectString</span><span class="o">,</span> <span class="c1">// servers address e.g.: "127.0.0.1:2181,127.0.0.1:2182,127.0.0.1:2183"</span>
<span class="kt">int</span> <span class="n">sessionTimeout</span><span class="o">,</span> <span class="c1">// session timeout in millisecond</span>
<span class="nc">Watcher</span> <span class="n">watcher</span> <span class="c1">// 用来接收session event, watcher是接口,需要传递一个实现接口的实例化object</span>
<span class="o">)</span>
</code></pre></div></div>
<p class="article-more-link">
<a href="/distributed/2018/08/26/zookeeper-api/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-categories">
<span></span>
<!--
<%- list_categories(item.categories, {
show_count: false,
class: 'article-category',
style: 'none',
separator: '►'
}) %>
-->
<a class="article-category-link" href="/categories/#distributed">distributed</a>
</div>
<div class="article-tags">
<!--
<% var tags = [];
item.tags.forEach(function(tag){
tags.push('<a href="' + config.root + tag.path + '">' + tag.name + '</a>');
}); %>-->
<span></span> <!--<%- tags.join('') %>-->
<a href="/tags/#zookeeper">zookeeper</a>
</div>
</div>
<div class="comments-count">
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/blockchain/2018/06/30/first-smart-contract/" title="在本地私链上运行智能合约" itemprop="url">在本地私链上运行智能合约</a>
</h1>
<p class="article-author">By
<a href="/about" title="xiabo2011" target="_blank" itemprop="author">xiabo2011</a>
</p>
<p class="article-time">
<time datetime="2018-06-30 08:01:01 +0800" itemprop="datePublished"> 2018-06-30</time>
</p>
</header>
<div class="article-content">
<h2 id="准备工作">准备工作</h2>
<ul>
<li>根据上一篇blog搭建私链</li>
<li>下载 <a href="https://github.com/ethereum/remix-ide/tree/gh-pages">remix-ide</a>,我们这里要下载<em>gh-pages</em>分支,该分支为最新的稳定的build。remix-ide是一个用来编译运行智能合约的ide工具</li>
</ul>
<p class="article-more-link">
<a href="/blockchain/2018/06/30/first-smart-contract/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-categories">
<span></span>
<!--
<%- list_categories(item.categories, {
show_count: false,
class: 'article-category',
style: 'none',
separator: '►'
}) %>
-->
<a class="article-category-link" href="/categories/#blockchain">blockchain</a>
</div>
<div class="article-tags">
<!--
<% var tags = [];
item.tags.forEach(function(tag){
tags.push('<a href="' + config.root + tag.path + '">' + tag.name + '</a>');
}); %>-->
<span></span> <!--<%- tags.join('') %>-->
<a href="/tags/#ethereum">ethereum</a>
<a href="/tags/#以太坊">以太坊</a>
</div>
</div>
<div class="comments-count">
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/blockchain/2018/06/30/local-private-ethereum/" title="搭建本地以太坊私链" itemprop="url">搭建本地以太坊私链</a>
</h1>
<p class="article-author">By
<a href="/about" title="xiabo2011" target="_blank" itemprop="author">xiabo2011</a>
</p>
<p class="article-time">
<time datetime="2018-06-30 08:01:01 +0800" itemprop="datePublished"> 2018-06-30</time>
</p>
</header>
<div class="article-content">
<h2 id="macos以太坊安装">macOS以太坊安装</h2>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ brew tap ethereum/ethereum
$ brew install ethereum
</code></pre></div></div>
<p class="article-more-link">
<a href="/blockchain/2018/06/30/local-private-ethereum/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-categories">
<span></span>
<!--
<%- list_categories(item.categories, {
show_count: false,
class: 'article-category',
style: 'none',
separator: '►'
}) %>
-->
<a class="article-category-link" href="/categories/#blockchain">blockchain</a>
</div>
<div class="article-tags">
<!--
<% var tags = [];
item.tags.forEach(function(tag){
tags.push('<a href="' + config.root + tag.path + '">' + tag.name + '</a>');
}); %>-->
<span></span> <!--<%- tags.join('') %>-->
<a href="/tags/#ethereum">ethereum</a>
<a href="/tags/#以太坊">以太坊</a>
</div>
</div>
<div class="comments-count">
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/distributed/2018/06/03/zookeeper-basics/" title="Zookeeper基础" itemprop="url">Zookeeper基础</a>
</h1>
<p class="article-author">By
<a href="/about" title="xiabo2011" target="_blank" itemprop="author">xiabo2011</a>
</p>
<p class="article-time">
<time datetime="2018-06-03 08:01:01 +0800" itemprop="datePublished"> 2018-06-03</time>
</p>
</header>
<div class="article-content">
<p>一般设计一个分布式协同服务都会提供一组primitives的列表,对于每个primitive暴露一些接口来创建实例,比如分布式锁可以作为一个primitive,
它暴露了一些接口如create, acquire, release等。这种设计会存在一些问题:1)扩展性差,需要提供大量的primitives,还要不断扩展API;
2)灵活性差,对于不同应用适用性会差的较多</p>
<p class="article-more-link">
<a href="/distributed/2018/06/03/zookeeper-basics/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-categories">
<span></span>
<!--
<%- list_categories(item.categories, {
show_count: false,
class: 'article-category',
style: 'none',
separator: '►'
}) %>
-->
<a class="article-category-link" href="/categories/#distributed">distributed</a>
</div>
<div class="article-tags">
<!--
<% var tags = [];
item.tags.forEach(function(tag){
tags.push('<a href="' + config.root + tag.path + '">' + tag.name + '</a>');
}); %>-->
<span></span> <!--<%- tags.join('') %>-->
<a href="/tags/#zookeeper">zookeeper</a>
</div>
</div>
<div class="comments-count">
</div>
</footer>
</article>
<article class="post-expand post" itemprop="articleBody">
<header class="article-info clearfix">
<h1 itemprop="name">
<a href="/distributed/2018/06/02/zookeeper-getting-started/" title="Zookeeper服务器集群搭建" itemprop="url">Zookeeper服务器集群搭建</a>
</h1>
<p class="article-author">By
<a href="/about" title="xiabo2011" target="_blank" itemprop="author">xiabo2011</a>
</p>
<p class="article-time">
<time datetime="2018-06-02 08:01:01 +0800" itemprop="datePublished"> 2018-06-02</time>
</p>
</header>
<div class="article-content">
<h2 id="获取zookeeper">获取zookeeper</h2>
<p>从apache zookeeper官网上获取zookeeper</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>https://www.apache.org/dyn/closer.cgi/zookeeper/
</code></pre></div></div>
<p class="article-more-link">
<a href="/distributed/2018/06/02/zookeeper-getting-started/#more">Read More</a>
</p>
</div>
<footer class="article-footer clearfix">
<div class="article-catetags">
<div class="article-categories">
<span></span>
<!--
<%- list_categories(item.categories, {
show_count: false,
class: 'article-category',
style: 'none',
separator: '►'
}) %>
-->
<a class="article-category-link" href="/categories/#distributed">distributed</a>
</div>
<div class="article-tags">
<!--
<% var tags = [];
item.tags.forEach(function(tag){
tags.push('<a href="' + config.root + tag.path + '">' + tag.name + '</a>');
}); %>-->
<span></span> <!--<%- tags.join('') %>-->
<a href="/tags/#zookeeper">zookeeper</a>
</div>
</div>
<div class="comments-count">
</div>
</footer>
</article>
<nav id="page-nav" class="clearfix">
<nav id="page-nav" class="clearfix">
<span class="page-number current">1</span>
</nav>
</nav>
</div>
<div class="openaside"><a class="navbutton" href="#" title="Show Sidebar"></a></div>
<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="Hide Sidebar"></a></div>
<aside class="clearfix">
<div class="categorieslist">
<p class="asidetitle">分类</p>
<ul>
<li><a href="/categories/#distributed" title="distributed">distributed<sup>5</sup></a></li>
<li><a href="/categories/#blockchain" title="blockchain">blockchain<sup>2</sup></a></li>
</ul>
</div>
<div class="tagslist">
<p class="asidetitle">标签</p>
<ul class="clearfix">
<li><a href="/tags/#zookeeper" title="zookeeper">zookeeper<sup>4</sup></a></li>
<li><a href="/tags/#ethereum" title="ethereum">ethereum<sup>2</sup></a></li>
<li><a href="/tags/#以太坊" title="以太坊">以太坊<sup>2</sup></a></li>
<li><a href="/tags/#dubbo" title="dubbo">dubbo<sup>1</sup></a></li>
</ul>
</div>
<div class="tagcloudlist">
<p class="asidetitle">标签云</p>
<div id="tagcloud" class="tagcloudlist clearfix">
</div>
</div>
<div class="linkslist">
<p class="asidetitle">友情链接</p>
<ul>
<li>
<a href="https://github.com/xiabo2011" target="_blank" title="xiabo2011 github">xiabo2011 github</a>
</li>
<li>
<a href="http://www.bumind.com/" target="_blank" title="xiabo2011 blog">xiabo2011 blog</a>
</li>
</ul>
</div>
<div class="github-card">
<p class="asidetitle">Github 名片</p>
<div class="github-card" data-github="xiabo2011" data-width="220" data-height="119" data-theme="medium">
<script type="text/javascript" src="//cdn.jsdelivr.net/github-cards/latest/widget.js" ></script>
</div>
</div>
<div class="rsspart">
<a href="/atom.xml" target="_blank" title="rss">RSS 订阅</a>
</div>
</aside>
</div>
</div>
<footer><div id="footer" >
<div class="line">
<span></span>
<div class="author"></div>
</div>
<section class="info">
<p> Hey, what's up? I'm Box! <br/>
Let's become tech minions.</p>
</section>
<div class="social-font" class="clearfix">
<a href="https://github.com/xiabo2011" target="_blank" class="icon-github" title="github"></a>
</div>
<!--
<% Array.prototype.S=String.fromCharCode(2);
Array.prototype.in_array=function(e){
var r=new RegExp(this.S+e+this.S);
return (r.test(this.S+this.join(this.S)+this.S));
};
var cc = new Array('by','by-nc','by-nc-nd','by-nc-sa','by-nd','by-sa','zero'); %>
<% if (cc.in_array(theme.creative_commons) ) { %>
<div class="cc-license">
<a href="http://creativecommons.org/licenses/<%= theme.creative_commons %>/4.0" class="cc-opacity" target="_blank">
<img src="<%- config.root %>img/cc-<%= theme.creative_commons %>.svg" alt="Creative Commons" />
</a>
</div>
<% } %>
-->
<p class="copyright">
Powered by <a href="http://jekyllrb.com" target="_blank" title="jekyll">jekyll</a> and Theme by <a href="https://github.com/simpleyyt/jekyll-jacman" target="_blank" title="Jacman">Jacman</a> © 2015-2018
<a href="about" target="_blank" title="xiabo2011">xiabo2011</a>
</p>
<p class="copyright">
<span id="busuanzi_container_site_pv">current visits <span id="busuanzi_value_site_pv"></span></span><span id="busuanzi_container_site_uv">, visitor <span id="busuanzi_value_site_uv"></span></span>
</p>
</div>
</footer>
<script src="/assets/js/jquery-2.0.3.min.js"></script>
<script src="/assets/js/jquery.imagesloaded.min.js"></script>
<script src="/assets/js/gallery.js"></script>
<script src="/assets/js/jquery.qrcode-0.12.0.min.js"></script>
<script src="/assets/js/toc.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.navbar').click(function(){
$('header nav').toggleClass('shownav');
});
var myWidth = 0;
function getSize(){
if( typeof( window.innerWidth ) == 'number' ) {
myWidth = window.innerWidth;
} else if( document.documentElement && document.documentElement.clientWidth) {
myWidth = document.documentElement.clientWidth;
};
};
var m = $('#main'),
a = $('#asidepart'),
c = $('.closeaside'),
o = $('.openaside');
c.click(function(){
a.addClass('fadeOut').css('display', 'none');
o.css('display', 'block').addClass('fadeIn');
m.addClass('moveMain');
});
o.click(function(){
o.css('display', 'none').removeClass('beforeFadeIn');
a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');
m.removeClass('moveMain');
});
$(window).scroll(function(){
o.css("top",Math.max(80,260-$(this).scrollTop()));
});
$(window).resize(function(){
getSize();
if (myWidth >= 1024) {
$('header nav').removeClass('shownav');
}else{
m.removeClass('moveMain');
a.css('display', 'block').removeClass('fadeOut');
o.css('display', 'none');
}
});
});
</script>
<script src="/assets/js/tagcloud.js"></script>
<script>
$(document).ready(function() {
var tags = [
{ "name": "zookeeper", "path": "/tags/#zookeeper", "length": 4 },
{ "name": "ethereum", "path": "/tags/#ethereum", "length": 2 },
{ "name": "以太坊", "path": "/tags/#以太坊", "length": 2 },
{ "name": "dubbo", "path": "/tags/#dubbo", "length": 1 },
];
$("#tagcloud").html(tagcloudHelper(tags));
});
</script>
<!--
-->
<link rel="stylesheet" href="/assets/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/assets/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.article-content').each(function(i){
$(this).find('img').each(function(){
if ($(this).parent().hasClass('fancybox')) return;
if ($(this).hasClass('emoji')) return;
var alt = this.alt;
if (alt) $(this).after('<span class="caption">' + alt + '</span>');
$(this).wrap('<a href="' + this.src + '" title="' + alt + '" class="fancybox"></a>');
});
$(this).find('.fancybox').each(function(){
$(this).attr('rel', 'article' + i);
});
});
if($.fancybox){
$('.fancybox').fancybox();
}
});
</script>
<!-- Analytics Begin -->