-
Notifications
You must be signed in to change notification settings - Fork 0
/
atom.xml
114 lines (75 loc) · 9.35 KB
/
atom.xml
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
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>NOAK</title>
<subtitle>noak site</subtitle>
<link href="/atom.xml" rel="self"/>
<link href="http://noak.tech/"/>
<updated>2017-03-31T02:57:47.704Z</updated>
<id>http://noak.tech/</id>
<author>
<name>noak</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>缓存问题</title>
<link href="http://noak.tech/2017/03/31/%E7%BC%93%E5%AD%98%E7%A9%BF%E9%80%8F/"/>
<id>http://noak.tech/2017/03/31/缓存穿透/</id>
<published>2017-03-31T02:51:57.000Z</published>
<updated>2017-03-31T02:57:47.704Z</updated>
<summary type="html">
<h5 id="一、缓存穿透"><a href="#一、缓存穿透" class="headerlink" title="一、缓存穿透"></a>一、缓存穿透</h5><p>我们在项目中使用缓存的时候,可能出现 业务逻辑服务查询一个缓存key,发现没有就到DB中去查询结果,然后返回的时候没有把对应的结果设置进缓存。当有大量业务要查询这个key的时候,就会导致大量的查询穿透缓存到达DB进行查询,从而导致DB压力大增。</p>
</summary>
<category term="笔记" scheme="http://noak.tech/categories/%E7%AC%94%E8%AE%B0/"/>
<category term="redis" scheme="http://noak.tech/tags/redis/"/>
<category term="缓存" scheme="http://noak.tech/tags/%E7%BC%93%E5%AD%98/"/>
</entry>
<entry>
<title>jquery 事件冒泡</title>
<link href="http://noak.tech/2017/03/31/jquery%20%E4%BA%8B%E4%BB%B6%E5%86%92%E6%B3%A1/"/>
<id>http://noak.tech/2017/03/31/jquery 事件冒泡/</id>
<published>2017-03-31T02:49:58.000Z</published>
<updated>2017-03-31T02:57:47.703Z</updated>
<summary type="html">
<p>首先可以来看一个例子:</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">"dOne"</span> <span class="attr">onclick</span>=<span class="string">"alert('我是最外层')"</span>&gt;</span></div><div class="line"> <span class="tag">&lt;<span class="name">div</span> <span class="attr">id</span>=<span class="string">"dTwo"</span> <span class="attr">onclick</span>=<span class="string">"alert('我是中间层')"</span>&gt;</span></div><div class="line"> <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">"http://www.baidu.com"</span> <span class="attr">id</span>=<span class="string">"aTree"</span> <span class="attr">onclick</span>=<span class="string">"alert('我是最里层')"</span>&gt;</span>click me<span class="tag">&lt;/<span class="name">a</span>&gt;</span></div><div class="line"> <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></div></pre></td></tr></table></figure>
<p><a href="https://jsfiddle.net/noakcn/4hjh4957/7/">点击运行</a></p>
<p>上面这个示例分3层:<code>dOne</code> 最外面一层,<code>dTwo</code>中间层,<code>a</code>标签在最里层,他们各自有自己的<code>onclick</code>事件。</p>
<p>运行后会发现一次弹出<code>我是最里层--&gt;我是中间层--&gt;我是最外层</code>然后跳转到百度。</p>
<p>那么为什么会这样呢?</p>
</summary>
<category term="笔记" scheme="http://noak.tech/categories/%E7%AC%94%E8%AE%B0/"/>
<category term="javascript" scheme="http://noak.tech/tags/javascript/"/>
<category term="html" scheme="http://noak.tech/tags/html/"/>
</entry>
<entry>
<title>HTML 5 Canvas</title>
<link href="http://noak.tech/2017/03/31/Html5%20Canvas/"/>
<id>http://noak.tech/2017/03/31/Html5 Canvas/</id>
<published>2017-03-31T02:32:16.000Z</published>
<updated>2017-03-31T02:57:47.703Z</updated>
<summary type="html">
<figure class="highlight html"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">canvas</span> <span class="attr">id</span>=<span class="string">"myCanvas"</span> <span class="attr">width</span>=<span class="string">"200"</span> <span class="attr">height</span>=<span class="string">"100"</span> <span class="attr">style</span>=<span class="string">"border:1px solid #000000;"</span>&gt;</span><span class="tag">&lt;/<span class="name">canvas</span>&gt;</span></div></pre></td></tr></table></figure>
<p><a href="https://jsfiddle.net/noakcn/fzyttzso/4/">点击运行</a></p>
<blockquote>
<p><code>&lt;canvas&gt;&lt;/canvas&gt;</code>创建一个画布</p>
</blockquote>
<p><strong><canvas></strong>本身没有绘图功能,需要搭配JavaScript来绘图</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">var</span> c = <span class="built_in">document</span>.getElementById(<span class="string">"myCanvas"</span>);<span class="comment">//首先,找到&lt;canvas&gt;元素</span></div><div class="line"><span class="keyword">var</span> ctx = c.getContext(<span class="string">"2d"</span>);<span class="comment">//创建context对象</span></div><div class="line">ctx.fillStyle = <span class="string">"#FF0000"</span>;<span class="comment">//颜色</span></div><div class="line">ctx.fillRect(<span class="number">0</span>, <span class="number">0</span>, <span class="number">150</span>, <span class="number">75</span>); <span class="comment">//大小 fillRect(x,y,width,height)</span></div></pre></td></tr></table></figure>
<p><a href="https://jsfiddle.net/noakcn/fzyttzso/2/">点击运行</a></p>
</summary>
<category term="笔记" scheme="http://noak.tech/categories/%E7%AC%94%E8%AE%B0/"/>
<category term="html5" scheme="http://noak.tech/tags/html5/"/>
<category term="canvas" scheme="http://noak.tech/tags/canvas/"/>
<category term="h5" scheme="http://noak.tech/tags/h5/"/>
</entry>
<entry>
<title>Hello World</title>
<link href="http://noak.tech/2017/03/31/hello-world/"/>
<id>http://noak.tech/2017/03/31/hello-world/</id>
<published>2017-03-31T01:49:42.565Z</published>
<updated>2017-03-31T01:49:42.565Z</updated>
<summary type="html">
<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="https://hexo.
</summary>
</entry>
</feed>