- Aug 07 Fri 2015 10:27
-
Tryit Editor 雛型 (HTML/CSS/Javascript 測試程式)
- Jul 29 Wed 2015 09:54
-
HTML CSS(v1) Style 的優先次序

快速參考
常見的 CSS(v1) selector 設定套用的次序如下:
<style type="text/css">
div { color: black ; ... } /* 1st level */
.nClass { color: green ; ... } /* +this 2nd level */
#nId { color: blue ; ... } /* +this 3rd level */
...
</style>
...
<div style="color: red; ... "><!-- /* +this 4th level */ -->
- Jul 26 Sun 2015 12:26
-
[轉貼] GCC 常用編譯參數
- Jul 25 Sat 2015 00:31
-
[轉貼] 編織出個好程式--GCC參數篇(二)
這篇是從別人的部落格剪來轉貼的, 花了一點時間校對及重新編排版面.
雖然原 PO 文有點舊了 (2000年), 現在 (2015年) 原 PO 文網址已經連不到了, 還有一部份參數已經不存在了, 但是當新手面對現今的 GCC 參數和選項動則數以百計, 還有厚厚一疊手冊時, 不失為一個不錯的快速入門.
註: 原 PO 文二篇, 本篇為第二篇
雖然原 PO 文有點舊了 (2000年), 現在 (2015年) 原 PO 文網址已經連不到了, 還有一部份參數已經不存在了, 但是當新手面對現今的 GCC 參數和選項動則數以百計, 還有厚厚一疊手冊時, 不失為一個不錯的快速入門.
註: 原 PO 文二篇, 本篇為第二篇
- Jul 24 Fri 2015 13:29
-
[轉貼] 編織出個好程式--GCC參數篇(一)
這篇是從別人的部落格剪來轉貼的, 花了一點時間校對及重新編排版面.
雖然原 PO 文有點舊了 (2000年), 現在 (2015年) 原 PO 文網址已經連不到了, 還有一部份參數已經不存在了, 但是當新手面對現今的 GCC 參數和選項動則數以百計, 還有厚厚一疊手冊時, 不失為一個不錯的快速入門.
註: 原 PO 文二篇, 本篇為第一篇
雖然原 PO 文有點舊了 (2000年), 現在 (2015年) 原 PO 文網址已經連不到了, 還有一部份參數已經不存在了, 但是當新手面對現今的 GCC 參數和選項動則數以百計, 還有厚厚一疊手冊時, 不失為一個不錯的快速入門.
註: 原 PO 文二篇, 本篇為第一篇
- Jul 23 Thu 2015 03:05
-
C 語言:關於變數的二三事

C 語言的變數有所謂的 storage class, 初學時對當中的差異並不是很容易弄清楚, 後來我把各種條件稍作整理, 於是有了下面的表格:
(全域變數)
(區域變數)
- 與同一區塊內的變數同名時, 編譯錯誤.
- 與區塊外層變數同名時, 外層變數被遮蔽.
scope
life-time
及其執行時機
只執行一次, main() 執行前由 "可載入執行檔 ELF" (或二進位影像 binary image) 拷貝至正確之 .data 區段位址內
每一次進入函數或區塊後立即執行
呼叫前執行設定
- Jul 22 Wed 2015 16:15
-
使用 Javascript 修改 stylesheet
下面範例中的 setStyleRule() 可以用來動態增加 stylesheet 中的項目(selector), applyClass() 則可以用來為物件刪除/附加新的 CSS Style Class (只能是 class).
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script type="text/javascript" src="ext_style.js"></script>
<script type="text/javascript">
function fnInit() {
setStyleRule("", "#id1", "color:blue;");
}
window.addEventListener('load', fnInit);
</script>
</head>
<body>
<h1 id="id1">My Heading 1</h1>
<button type="button" onclick="document.getElementById('id1').style.color = 'red'">
Click Me!</button>
</body>
</html>
- Jul 21 Tue 2015 11:57
-
有點給他... 痞客邦部落格 手機模式

前二天心裡有個念頭突然閃過, 於是用手機看了一下自己在部落格的 PO 文.
結果... 昏倒... 手機模式的 CSS Style 設定都沒有出現.
於是寫信給 客服, 客服的回信倒是蠻快的 :)
可是, 回信內容卻是令人十分的不滿意, 就只說 手機模式目前不能自定 CSS Style, 也沒有設定檔可以加. :(
- Jul 20 Mon 2015 19:15
-
C 語言:運算子優先次序和運算次序
運算子優先權 (C 語言) Percedence Table
C 語言運算子優先權重表
運算子
Operator
說 明
Description
結合順序
Associativity
1
()
[]
->
.
++ --
Function call
Array subscripting
Element selection (of
Element selection (of
increment/decrement (suffix) (註1)
左至右(註2)
2
!
~
++ --
+ -
*
&
(type)
sizeof
logic NOT
bitwise NOT
increment/decrement (prefix)
unary plus and minus
Indirection (dereference, right value)
Address-of (left value)
type cast
Size-of
右至左(註2)
3
* / %
Arithmetic multiplication, division, and remainder
左至右
4
+ -
Arithmetic addition, subtraction
左至右
5
<< >>
Bitwise left shift, right shift
左至右
6
< <=
> >=
Relational less than, not greater than
Relational greater than, not less than
左至右
7
== !=
Relational equal, not equal
左至右
8
&
Bitwise AND
左至右
9
^
Bitwise XOR
左至右
10
|
Bitwise OR
左至右
11
&&
Logical AND
左至右
12
||
Logical OR
左至右
13
?:
Ternary conditional
右至左
14
=
+= -=
*= /= %=
&= ^= |=
<<= >>=
Direct assignment
Assignment by sum, difference
Assignment by product, quotient, remainder
Assignment by bitwise AND, XOR, OR
Assignment by bitwise left shift, right shift
右至左
15
,
Comma
左至右
Operator
Description
Associativity
[]
->
.
++ --
Array subscripting
Element selection (of
struct or union) through pointerElement selection (of
struct or union) by referenceincrement/decrement (suffix) (註1)
~
++ --
+ -
*
&
(type)
sizeof
bitwise NOT
increment/decrement (prefix)
unary plus and minus
Indirection (dereference, right value)
Address-of (left value)
type cast
Size-of
> >=
Relational greater than, not less than
+= -=
*= /= %=
&= ^= |=
<<= >>=
Assignment by sum, difference
Assignment by product, quotient, remainder
Assignment by bitwise AND, XOR, OR
Assignment by bitwise left shift, right shift
- Jul 17 Fri 2015 09:54
-
在 body tag 中載入或增加 CSS Style
以往寫網頁都是把 CSS Style 在 <head></head> 區段中載入, 今天發現在 <body></body> 區段中載入也是可以的.
另外如果不是要載入 CSS 檔, 而是要把 CSS Style 插入在 <body></body> 區段中, 則需要用 <div></div> 區段把 <style></style> 區段包住.
另外如果不是要載入 CSS 檔, 而是要把 CSS Style 插入在 <body></body> 區段中, 則需要用 <div></div> 區段把 <style></style> 區段包住.
- Jul 15 Wed 2015 10:36
-
C 語言:typedef 和 #define 大不同
以前以為 typedef 的功能可以用 #define 來完成, 用起來感覺功能也差不多, 例如:
typedef unsigned char bool; // 用這一行或者是下一行 二選一
//#define bool unsigned char
bool flag1, flag2;
- Jul 08 Wed 2015 23:06
-
C 語言:typedef 的用法
