Chrome Pointer

2019年10月27日 星期日

關係代名詞 - 省略時的用法


★情況一

若關係子句中已經有主詞,而關係代名詞是作為關係子句中的受詞,且前面沒有逗號或介係詞時,關係代名詞可以省略。

簡單來說就是:關係代名詞前面沒有逗號或介係詞,後面接上完整的句子(主詞+動詞)時,關係代名詞可省略。

1.  This is the book that I read yesterday.
(這是我昨天看的書。)

→ 可以看到關係子句中已有主詞 I、動詞 read。這時關係代名詞 that 代替 the book,作為關係子句中 read 的受詞,此時 that 可以省略,所以可以寫成:
This is the book I read yesterday.



2.  He is the man whom I saw at the school yesterday.
(他是我昨天在學校看到的男人。)

關係子句中已有主詞 I、動詞 saw,而關係代名詞 whom 代替 the man,作為關係子句中 saw 的受詞,此時 whom 可以省略,所以可以寫成:
He is the man I saw at the school yesterday.




★情況二

關係代名詞作為關係子句中的主詞,若要省略關係代名詞,後面的 be 動詞要一起省略。

簡單來說就是:當結構是「關係代名詞 be 動詞 現在分詞 / 過去分詞」時,可以省略關係代名詞,後面的 be 動詞也可以連同捨去。


1.       The girl who is sitting over there is my little sister.
(坐在那裡的女孩是我的妹妹。)

關係代名詞 who 為關係子句 who is sitting over there 的主詞角色,若要省略,後面的 be 動詞必須一起省略,因此也可以寫做:
The girl sitting over there is my little sister. 

(這時 sitting over there 角色變成分詞片語,用以修飾前面的 the girl




2.       The books that were written by J.K. Rowling are popular among teenagers.
(由 J.K. 羅琳寫的書在青少年之間很受歡迎。)

關係代名詞 that 為關係子句 that were written by J.K. Rowling 的主詞角色,若要省略,後面的 be 動詞 were 必須一起省略,只留下過去分詞 written,因此可以寫做:
The books written by J.K. Rowling are popular among teenagers.

(這時 written by J.K. Rowling 角色變成分詞片語,用以修飾前面的 the books





★情況三

關係代名詞作為關係子句中的主詞,若要省略關係代名詞,後面的動詞要跟著變化,主動動詞必須改成現在分詞。

簡單來說就是:若是關係代名詞後面直接接上動詞,要省略時必須將動詞改寫成現在分詞(V-ing)形式


1.  I have an aunt who teaches English at our school.
(我有一個在我們學校教英文的阿姨。)


who 作為關係子句 who teaches English at our school 中的主詞,若要省略關係代名詞,後面的主動動詞 teaches 必須改成現在分詞 teaching,因此就變成:
I have an aunt teaching English at our school.

(這時 teaching English 變成分詞片語,用以修飾前面的 an aunt





2. The dog that sits over there is my grandma’s dog.
(坐在那裡的那隻狗是我奶奶的狗。)

that 作為關係子句 that sits over there 中的主詞,若要省略關係代名詞,後面的主動動詞 sits 必須改成現在分詞 sitting,因此就變成:
The dog sitting over there is my grandma’s dog.

(這時 sitting over there 變成分詞片語,用以修飾前面的 the dog





關係代名詞 Who / Whom 用法


代替人的關係代名詞,除了"who"之外,依其在形容詞子句中所扮演的角色,也可能使用whomwhose


1.     "who"主格,在形容詞子句裡作為主詞

The man [who is sitting there] is my brother.
坐在那裡的男人是我哥哥。


"who"在這裡是形容詞子句"who is sitting there"的主詞喔!



2.   "whom"受格,在形容詞子句裡做為受詞用,通常可以省略

The boy [whom you saw yesterday] is here.
你昨天看到的男孩在這裡。

在這個句子,"whom"代替"the boy",是"whom you saw yesterday"這個形容詞子句的受格。


※ 原則上,在口語中可用who 代替whom



3.  "whose"所有格關係代名詞,在形容詞子句裡代替先行詞的所有格,
後面接名詞。

I have a friend [whose father is a bus driver]. 
我有個朋友,他的父親是公車司機。





引用自希平方

1. Who
若要代替的「人」在關係子句裡是「主詞」,就用主格 who


I went to the library with Anthony.(我和 Anthony 一起去圖書館。)
Anthony is also in my math class.Anthony 和我上同一堂數學課。)


可以看到第二句話是用來補充說明前一句的 Anthony 是什麼人,如果用關係代名詞來改寫,就可以寫成:
I went to the library with Anthony, who is also in my math class.
(我和 Anthony 一起去圖書館,他也和我上同一堂數學課。)

who is also in my math class 是關係子句,用來補充說明前面的 Anthony



2. Whom
若要代替的「人」在關係子句裡是「受詞」,就用受格 whom


This is the man.(這是那位男人。)
You want to see the man.(你想見那位男人。)

可以看到在第二句話中,the man 是受詞,因此要用關係代名詞改寫的話,就會變成:
This is the man whom you want to see.
(這是你想見的那位男人。)

whom you want to see 是關係子句,用來修飾前面的 the man


來源 : 希平方https://www.hopenglish.com/understanding-relative-pronouns-2

2019年10月18日 星期五

分詞構句 教學


1. _________ by the high ticket prices,
many of the exhibition's visitors were reluctant to enter the place and chose to go somewhere else. 
(A) To surprise
(B) Surprising
(C) Surprise
(D) Surprised
解析:
首先,遊客不會主動去驚嚇票價,一定是被票價嚇到,
更重要且簡單的是,看到空格後面有個by,表示被動,
答案一定是(D)

2. ___________ to become the top supplier in this industry,
VocalBeauty expanded its distribution chain into Europe.
(A) Strive
(B) To strive
(C) Striving
(D) Striven
解析:
空格strive(奮鬥,努力)
主詞VocalBeauty(某一間公司,看似是東西,但是沒有人就無法組成公司,
所以要記得
『公司company、機構organization、協會institute、基金會foundation、部門department
都是『人』的意思
公司跟奮鬥,很明顯是主動關係,因為人有腦有手有腳有意志力就會奮鬥,
答案一定是(C)

3. __________ of his unfinished proposal,
Tom jumped out of the bed immediately. 
(A) Thought
(B) Thinking
(C) Thinks
(D) To think
解析:
空格think(想,思考)
主詞Tom(很明顯是人)
人跟思考,很明顯是主動關係,因為人有腦有手有腳有意志力就會思考,
答案一定是(B)
備註:think of是想到的意思,但是大家熟悉的think about則是考慮,請注意,考試會考。

4. Having __________ the first research project successfully and efficiently,
the R&D department could finally focus on another one and dedicated much time to it.
(A) finishing
(B) to finish
(C) finished
(D) finishes
解析:
光是看到開頭是Having,那就知道答案一定是p.p.
三秒就解題完了!清潔溜溜!
答案一定是(C)




★主詞主動進行動作
若省略的主詞是「主動」進行動作,合併成分詞構句後,省略主詞那句的動詞就要改成「現在分詞」形式。以下舉幾個例子:

I felt ashamed. + I burst into tears in class.

若用連接詞連接兩句子,可以說:
I burst into tears in class because I felt ashamed.

若要改成分詞構句,就先去掉連接詞 because,省略相同的主詞 I動詞 felt 改成現在分詞形式
Feeling ashamed, I burst into tears in class.
(感到很羞愧,我在課堂上大哭。)


Sandy didn't know when John would come. + Sandy waited for two hours.

若用連接詞連接兩句子,可以說:
Sandy waited for two hours since Sandy didn't know when John would come.

若要改成分詞構句,就先去掉連接詞 since,省略相同的主詞 Sandy動詞 know 改成現在分詞形式:
Not knowing when John would come, Sandy waited for two hours.
(不知道 John 什麼時候會到,Sandy 等了兩個小時。)
※ 小提醒:若原句子為否定句,省略時助動詞也一併省略,只需保留 not





★主詞被動進行動作
若省略的主詞是「被動」進行動作,合併成分詞構句後,省略主詞那句的動詞就要改成「過去分詞」形式。以下舉幾個例子:

The musicians stood up. + The musicians were surrounded by applause.

若用連接詞連接兩句子,可以說:
The musicians stood up while the musicians were surrounded by applause.


若要改成分詞構句,就先去掉連接詞 while,省略相同的主詞 the musicians被動式 were surrounded 保留過去分詞
Surrounded by applause, the musicians stood up.
(被掌聲圍繞,音樂家們站起身來。)

The people were surprised by the government’s decision. + The people knew they had to do something.

若用連接詞連接兩句子,可以說:
The people were surprised by the government’s decision, so the people knew they had to do something.


若要改成分詞構句,就先去掉連接詞 so,省略相同的主詞 the people動詞用過去分詞形式 surprised
Surprised by the government’s decision, the people knew they had to do something.
(驚訝於政府的決策,民眾知道他們必須有所動作。)


2019年10月2日 星期三

Firebase 讀取資料,並且用innerHTML顯示在網頁上 之教學 ~

<!DOCTYPE html>
<!-- Website template by freewebsitetemplates.com -->
<html>
<head>
<meta charset="UTF-8">
<title>公司資訊</title>


<script src="https://www.gstatic.com/firebasejs/6.6.1/firebase-app.js"></script>

<script src="https://www.gstatic.com/firebasejs/6.6.1/firebase-firestore.js"></script>

<script>

// 把語法從Firebase專案設定裡面 複製過來
var firebaseConfig = {
    apiKey: "",
    authDomain: "",
    databaseURL: "",
    projectId: "",
    storageBucket: "",
    messagingSenderId: "",
    appId: "  "
 };

  // Initialize Firebase
  firebase.initializeApp(firebaseConfig);
 

// Firebase 專案設定開始


var db = firebase.firestore();
function storedata(cpname)
{
db.collection("NTUNHS").
where("name", "==", cpname).get().then(function(querySnapshot)
{
querySnapshot.forEach(function(doc)
{
// doc.data() is never undefined for query doc snapshots
console.log(doc.id, " => ", doc.data());
document.getElementById("table1").innerHTML=doc.data().name;
document.getElementById("table2").innerHTML=doc.data().address;
document.getElementById("table3").innerHTML=doc.data().phone[0]+"<br />"+doc.data().phone[1]+"<br />"+doc.data().phone[2] ;

});
})


};

//innerHTML 讓資料庫裡面的資料顯示在網頁上

</script>


</head>
<body>
<span style="font-family:DFKai-sb; font-size:50px; " >請輸入欲查詢的公司名稱</span>

公司名稱 : <input type="text" name="name" id="text1" /> <br /><br />
<button onclick="storedata(text1.value)">GO</button>


<table border="1" >
  <tr>
  <td align="center" style="font-weight:bold; font-size:20px;" >公司名稱</td>
<td align="center" style="font-weight:bold; font-size:20px;">住址</td>
<td align="center" style="font-weight:bold; font-size:20px;">電話</td>
  </tr>
<tr>
  <td id="table1">公司名稱</td>
<td id="table2">住址</td>
<td id="table3">電話</td>
  </tr>
</table>

//getElementById("table1").innerHTML 讓資料顯示在網頁上 id為"table1"的地方上~


</body>
</html>

Firebase 寫入資料教學


<!DOCTYPE html>
<!-- Website template by freewebsitetemplates.com -->
<html>
<head>
<meta charset="UTF-8">
<title>公司資訊</title>


<script src="https://www.gstatic.com/firebasejs/6.6.1/firebase-app.js"></script>

<script src="https://www.gstatic.com/firebasejs/6.6.1/firebase-firestore.js"></script>
//^上面這2行程式一定要打^

<script>
// 把語法從Firebase專案設定裡面 複製過來
var firebaseConfig = {
    apiKey: "",
    authDomain: "",
    databaseURL: "",
    projectId: "",
    storageBucket: "",
    messagingSenderId: "",
    appId: "  "
 };

  // Initialize Firebase
  firebase.initializeApp(firebaseConfig);


// Firebase 專案設定開始


var db = firebase.firestore();

function storedata(cpname,cpaddress,phone1,phone2,phone3) //把onclick的值傳過來
{
db.collection("NTUNHS").doc("Company").set({
name: cpname,
address: cpaddress,
phone: [phone1, phone2, phone3]
});
}


</script>


</head>
<body>
<span style="font-family:DFKai-sb; font-size:50px; " >請輸入公司資訊</span>

公司名稱<input type="text" name="name" id="text1" /> <br /><br />
公司住址<input type="text" name="address" id="address" /> <br /><br />
公司電話1<input type="text" name="phone1" id="phone1" /> <br /><br />
公司電話2<input type="text" name="phone2" id="phone2"> <br /><br />
公司電話3<input type="text" name="phone3" id="phone3"> <br /><br />

<button onclick="storedata
(text1.value,address.value,phone1.value,phone2.value,phone3.value)">GO</button>
//當按下button後,把<input  id 的值傳到function storedata 裡面 ~

<form action="1001_2.php" method="POST" >
<input type="submit" value="前往查詢頁面">
</form>


</body>
</html>