-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.xml
More file actions
357 lines (288 loc) · 16.4 KB
/
index.xml
File metadata and controls
357 lines (288 loc) · 16.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
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>sleepycookie's blog</title>
<link>https://sleepyman212.github.io/</link>
<description>Recent content on sleepycookie's blog</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh-tw</language>
<lastBuildDate>Thu, 05 Sep 2019 01:26:04 +0800</lastBuildDate>
<atom:link href="https://sleepyman212.github.io/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>AlphaVSOpacity</title>
<link>https://sleepyman212.github.io/post/alphavsopacity/</link>
<pubDate>Thu, 05 Sep 2019 01:26:04 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/alphavsopacity/</guid>
<description><h1 id="opacity-跟-background-差別">opacity 跟 background 差別</h1>
<ul>
<li>opacity 子元素都會受影響,也會變成透明</li>
<li>background-color 子元素就不會影響</li>
</ul>
<h2 id="example">example</h2>
<h3 id="opacity">opacity</h3>
<p><style>
.bg1{
width: 700px;
height: 500px;
background-position:center;
color:black;
font-size:8rem;
opacity:.6;
}
.bg1-txt{
width:100%;
height:100%;
display:flex;
justify-content:center;
align-items:center;
}
</style>
<div class='bg1' style="background: url('/images/alphaBG.png');">
<div class='bg1-txt'>
Test
</div>
</div></p>
<pre><code class="language-htmlmixed=">&lt;style&gt;
.bg{
background: url(&quot;/images/alphaBG.png&quot;);
width: 800px;
height:600px;
background-position:center;
color:black;
font-size:8rem;
opacity:.6;
}
.bg-txt{
width:100%;
height:100%;
display:flex;
justify-content:center;
align-items:center;
}
&lt;/style&gt;
&lt;div class='bg'&gt;
&lt;div class='bg-txt'&gt;
Test
&lt;/div&gt;
&lt;/div&gt;
</code></pre>
<blockquote>
<p>上面的範例連文字都會有透明</p>
</blockquote>
<h3 id="backgroud">backgroud</h3>
<p><style>
.bg{
width: 700px;
height:500px;
background-position:center;
color:black;
font-size:8rem;
}
.bg-txt{
width:100%;
height:100%;
background: rgba(255,255,255,.3);
display:flex;
justify-content:center;
align-items:center;
}
</style>
<div class='bg' style="background: url('/images/alphaBG.png');">
<div class='bg-txt'>
Test
</div>
</div></p>
<pre><code class="language-htmlmixed=">&lt;style&gt;
.bg{
background: url(&quot;/images/alphaBG.png&quot;);
width: 800px;
height:600px;
background-position:center;
color:black;
font-size:8rem;
}
.bg-txt{
width:100%;
height:100%;
background: rgba(255,255,255,.3);
display:flex;
justify-content:center;
align-items:center;
}
&lt;/style&gt;
&lt;div class='bg'&gt;
&lt;div class='bg-txt'&gt;
Test
&lt;/div&gt;
&lt;/div&gt;
</code></pre>
<blockquote>
<p>文字不會透明了,只有背竟有透明一點</p>
</blockquote>
<h2 id="參考資料">參考資料</h2>
<p><a href="https://www.youtube.com/watch?v=yxAGnwgzM4E">CSS Opacity VS Alpha | Opacity 跟 Alpha的差異 | 調整透明度</a>
<a href="https://kknews.cc/zh-tw/tech/va6zgml.html">CSS實現背景圖片透明,文字不透明效果</a></p></description>
</item>
<item>
<title>Fetch POST 傳遞資料</title>
<link>https://sleepyman212.github.io/post/fetch_post/</link>
<pubDate>Sun, 28 Jul 2019 22:45:06 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/fetch_post/</guid>
<description><p>最近剛好在使用 fetch 代替 ajax ,剛好遇到了一些小問題,所以寫下來提醒一下自己</p>
<p>fetch 是一個新的 API 可以讓我們可以去做 AJAX ,而且用起來更直觀</p>
<p>當要使用 fetch 來做 POST 我們可以用以下的寫法:</p>
<pre><code class="language-javascript">fetch(URL,{
method:'POST',
method: 'cors' // 用來作為 跨域請求用的
})
</code></pre>
<p>這樣就可以使用 fetch 發出 POST 的請求,當我們要附上資料時,可以用 FormData 這一個 class 來帶上我們的資料</p>
<p><code>const fd = new FormData([可以直接指定 dom 元素是 form 的])</code></p>
<pre><code class="language-javascript">const fd = FormData();
fd.append('key',value);
</code></pre>
<p>可以用以上兩種方法來給 FormData 資料</p>
<p>最後只需要把 FormData 帶入 fetch 中的欄位,就可以成功帶上資料了</p>
<pre><code class="language-javascript">fetch(URL,{
method:'POST',
method: 'cors', // 用來作為 跨域請求用的
body: fd
})
</code></pre>
<blockquote>
<p>這邊不需要去指定 Content-Type ,因為 fetch 會幫我們帶上適當的屬性</p>
</blockquote></description>
</item>
<item>
<title>建立 moodle 工作環境</title>
<link>https://sleepyman212.github.io/post/moodle_build/</link>
<pubDate>Sun, 21 Apr 2019 02:38:03 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/moodle_build/</guid>
<description>環境要求 os ubuntu 18.04.1 apache mysql php moodle 3.x 安裝教學 用來建立 server 用的 apache 更新套件 sudo apt update 安裝apache sudo apt install apache2 讓 apache 可以通過防火牆之前,先看一下 sudo ufw app list 現在讓 apache 可以通</description>
</item>
<item>
<title>建立 CAS server</title>
<link>https://sleepyman212.github.io/post/cas_build/</link>
<pubDate>Sun, 21 Apr 2019 02:33:02 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/cas_build/</guid>
<description>環境要求 jdk-11 apache-maven-3.5.2 apache-tomcat-9.0.17 install openjdk sudo add-apt-repository ppa:openjdk-r/ppa sudo apt update sudo apt install openjdk-11-jdk java -version #看一下版本跟有無安裝成功 install tomcat Create Tomcat User sudo groupadd tomcat #創建一個 tomcat 群組 sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat #創建一個較 tomcat 的使用者</description>
</item>
<item>
<title>PHP session 換頁找不到了</title>
<link>https://sleepyman212.github.io/post/php_session/</link>
<pubDate>Mon, 11 Mar 2019 02:33:27 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/php_session/</guid>
<description><p>最近重新架 PHP 的環境,在使用 session 的時候發現了問題,當我在這個網頁設定了 session 後,
當我跳轉到另一個網頁後,發現 session 不見了!!!!</p>
<p>我確認了一下我有沒有開啟 session(<code>session_start()</code>) , 也確認了我是在同一個網域底下,結果是我在其中一個關鍵的 php 檔案沒有開啟&hellip;</p>
<p>於是我上網找了一下有沒有可以避免的方法,發現是 <code>session.auto_start</code> ,它可以自動幫我們開啟 session ,這樣就不會有時忘了開了,可以在 <code>php_info()</code> 中找找看,如下圖,如果確認沒有開後,可以到 php.ini 裡去改掉他</p>
<p><code>session.auto_start=1</code> 這樣應該就可以了</p>
<p><img src="https://i.imgur.com/oNpf7vl.png" alt="" /></p></description>
</item>
<item>
<title>Box Model</title>
<link>https://sleepyman212.github.io/post/box_model/</link>
<pubDate>Mon, 07 Jan 2019 04:38:38 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/box_model/</guid>
<description>在 HTML 裡的每個元素都有一個 box-model,而 box-model 是用來表達一個元件的呈現方式,在 CSS 裡可以用 box-sizing 這個屬性去設定,以下是他可以設定的值 content-box &ndash;&gt; 預設的模</description>
</item>
<item>
<title>無障礙網頁規範</title>
<link>https://sleepyman212.github.io/post/accessibility1/</link>
<pubDate>Sat, 15 Dec 2018 20:32:24 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/accessibility1/</guid>
<description>以下是網站無障礙規範 2.0 的內容 我把 AA 級的規範盡量拿出來,如果要達到 AAA 級,仍需到網站無障礙規範 2.0參考 1. (替代文字)為任何非文字的內容提供相等</description>
</item>
<item>
<title>Alias</title>
<link>https://sleepyman212.github.io/post/alias/</link>
<pubDate>Sat, 17 Nov 2018 23:41:12 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/alias/</guid>
<description>alias 可以用來自己定義指令,讓自己更方便 用法: alias 新指令的名稱=&lsquo;指令名稱&rsquo; 如果不想要每次登入都打一遍,可以在家目錄底下的</description>
</item>
<item>
<title>與virtual box共用資料夾</title>
<link>https://sleepyman212.github.io/post/vboxsf/</link>
<pubDate>Sat, 17 Nov 2018 23:07:12 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/vboxsf/</guid>
<description>如何跟 Virtual Box 共用資料夾 step 1 先創建一個資料夾,名字隨便,這個是要拿來做共用的資料夾 step 2 開啟共用權限 右鍵資料夾點選內容 在點選第二個的共用 點選共用 新</description>
</item>
<item>
<title>製作評分星星的方法</title>
<link>https://sleepyman212.github.io/post/%E8%A3%BD%E4%BD%9C%E8%A9%95%E5%88%86%E6%98%9F%E6%98%9F%E7%9A%84%E6%96%B9%E6%B3%95/</link>
<pubDate>Thu, 16 Aug 2018 16:02:21 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/%E8%A3%BD%E4%BD%9C%E8%A9%95%E5%88%86%E6%98%9F%E6%98%9F%E7%9A%84%E6%96%B9%E6%B3%95/</guid>
<description>製作評分星星的方法 最近剛好在想要如何做評分星星的效果,所以就來做一下了 ps 如果有跑版把 .text li 裡的 width 條一下應該就可以了 成品 ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ .test{ height:</description>
</item>
<item>
<title>Jquery prop and attr different</title>
<link>https://sleepyman212.github.io/post/jquery_prop_data_different/</link>
<pubDate>Sun, 12 Aug 2018 16:25:59 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/jquery_prop_data_different/</guid>
<description>.prop() V.S. attr.() prop 是作用在 DOM 元素上 ,而 attr 是作用在 html 文檔上,當我們去取得還未設定的屬性時(ex:checked),用 attr() 時,會傳 undifined ,因為 attr() 只會回傳 string 的型態</description>
</item>
<item>
<title>UVa1152 4 Values whose Sum is 0</title>
<link>https://sleepyman212.github.io/post/uva1152_4_values_whose_sum_is_0/</link>
<pubDate>Sun, 12 Aug 2018 15:54:17 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/uva1152_4_values_whose_sum_is_0/</guid>
<description>題目網址 解題說明: 題目是要找出有幾 a + b + c + d 為 0 的組合有幾個,可以先把 a 跟 b 相加的組合儲存在變數 ab 裡,然後對她 sort , 之後再對 -c 跟 -d 的合的組</description>
</item>
<item>
<title>Jquery 自訂過濾器</title>
<link>https://sleepyman212.github.io/post/jquery_%E8%87%AA%E8%A8%82%E9%81%B8%E6%93%87%E5%99%A8/</link>
<pubDate>Thu, 09 Aug 2018 05:46:59 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/jquery_%E8%87%AA%E8%A8%82%E9%81%B8%E6%93%87%E5%99%A8/</guid>
<description>Jquery 自訂過濾器 有時候 jquery 的過濾器沒有辦法滿足我們的需求,我們就可以自訂 jquery 的過濾器 DEMO HTML &lt;ul class=&quot;levels&quot;&gt; &lt;li data-level=&quot;1&quot; data-point=&quot;1&quot; data-technologies=&quot;javascript node grunt&quot;&gt;Level 1&lt;/li&gt; &lt;li data-level=&quot;2&quot; data-point=&quot;10&quot; data-technologies=&quot;php composer&quot;&gt;Level 2&lt;/li&gt; &lt;li data-level=&quot;3&quot; data-point=&quot;100&quot; data-technologies=&quot;jquery requirejs&quot;&gt;Level 3&lt;/li&gt; &lt;li data-level=&quot;4&quot; data-point=&quot;1000&quot; data-technologies=&quot;javascript jquery backbone&quot;&gt;Level 4&lt;/li&gt; &lt;/ul&gt; 自</description>
</item>
<item>
<title>UVa 12907 Pie</title>
<link>https://sleepyman212.github.io/post/uva_12097_pie/</link>
<pubDate>Fri, 03 Aug 2018 06:12:31 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/uva_12097_pie/</guid>
<description>題目網址 解題說明: 這一題是要找每個人可以分到的最大塊的派,且一塊派不能由不同的派組成的。所以我們可以使用二分搜來找出要的答案 範例code: #include</description>
</item>
<item>
<title>C的變數儲存類別</title>
<link>https://sleepyman212.github.io/post/c%E7%9A%84%E8%AE%8A%E6%95%B8%E5%84%B2%E5%AD%98%E9%A1%9E%E5%88%A5/</link>
<pubDate>Sat, 07 Jul 2018 00:28:54 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/c%E7%9A%84%E8%AE%8A%E6%95%B8%E5%84%B2%E5%AD%98%E9%A1%9E%E5%88%A5/</guid>
<description>c 的變數儲存類別有以下四種 extern auto register static 常數 extern extern 可以用在變數或函式上,用來告訴編輯器該函數或變數已在其他檔案宣告過,不用在配置記憶體。 //file.c int a = 5; //file2.c</description>
</item>
<item>
<title>About</title>
<link>https://sleepyman212.github.io/about/</link>
<pubDate>Mon, 28 May 2018 17:45:30 +0800</pubDate>
<guid>https://sleepyman212.github.io/about/</guid>
<description>哈囉我是 sleepyman ,這是我一些作筆記的地方,歡迎參考或提出意見</description>
</item>
<item>
<title>Thread練習</title>
<link>https://sleepyman212.github.io/post/thread%E7%B7%B4%E7%BF%92/</link>
<pubDate>Mon, 28 May 2018 02:58:03 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/thread%E7%B7%B4%E7%BF%92/</guid>
<description>JAVA Thread 今天看到Android綠豆湯裡在做,多執行緒的練習,想說很久沒有碰java了,所以就跟著他做了一下練習,就是模擬雪下下來的情形,當我們有</description>
</item>
<item>
<title>2018_ITSA</title>
<link>https://sleepyman212.github.io/post/2018_itsa/</link>
<pubDate>Wed, 23 May 2018 03:11:30 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/2018_itsa/</guid>
<description>原本是想說當天就要寫的,但是最近事情有點多,就拖到到現在了。這次ITSA算是第一次打規模比較大的程式比賽,想說放輕送打,在前一個小時順順利利</description>
</item>
<item>
<title>NQueen</title>
<link>https://sleepyman212.github.io/post/nqueen/</link>
<pubDate>Mon, 21 May 2018 14:15:52 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/nqueen/</guid>
<description>八皇后 這是一題經典的回朔法的題目 題目 皇后的攻擊範圍是米字型,然後給定你一個N*N的棋盤,請問各個皇后不乎相打起來的方法有幾種。這一題算是小變</description>
</item>
<item>
<title>HUGO 架站心血</title>
<link>https://sleepyman212.github.io/post/about/</link>
<pubDate>Thu, 17 May 2018 08:34:57 +0800</pubDate>
<guid>https://sleepyman212.github.io/post/about/</guid>
<description>test for the hugo HUGO 經過一晚的研究終於把 HUGO 大概給用好,原本以前就有打算寫 Blog 的念頭,結果因為太懶惰,都沒有去寫,這次剛好想說透過Blog 來記錄自己的學習</description>
</item>
</channel>
</rss>