2012年11月28日 星期三

[Mac] 執行視窗全螢幕快捷鍵


Mac OSX 提供了應用程式全螢幕操作的功能, 只要是窗右上角如上圖所示即可.

方法:

  • 以滑鼠點選該圖示
  • Ctrl+command+F

2012年11月26日 星期一

[Mac] build wxWidgets2.8.12 from source code in MacOSX


  • 執行以下程式
    • mkdir build
    • cd build
    • arch_flags="-arch -i386"
    • ../configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --enable-unicode --enable-debug --disable-shared --with-osx_cocoa --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
    • make
    • cd ..
    • cd build-carbon-debug/samples;make;cd ../..
    • cd build-carbon-debug/demos;make;cd ../..
  • 發生以下錯誤
    • ../include/wx/mac/carbon/private.h:1459: error: 'Cursor' does not name a type
  • 解決辦法
    • Apple Developer Center 下載 XCode 4.3.3
    • 右鍵選擇 Package Content
    • 將 /Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSC10.6.sdk 整個資料夾 copy到 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
    • build clean
    • build
  • 參考網站

2012年11月18日 星期日

[Android] Android Training Course-My First App


  • 官方教學網站
  • Resources
    • 所有資源存在 gen/R.java中
    • 可以開啟該檔,看到所有資源的 id,以供未來其他檔案使用
    • 但不要手動編輯此檔 !!! Android在每次 build時都會自動重建此檔
    • android:id 定義每個元件的名稱, 以供未來存取
    • +代表第一次宣告該物件
    • @則是在 XML檔中存取其他 resource必須加的 (string與 view等 concrete resource除外)
  • Coding and Debugging
    • Ctrl+Shift+O: 自動補齊缺少的 import class
  • Intent
    • controller of activities
    • 常見功能: 開始另一個 activity(包含傳送資料給另一個 activity)
    • 隨時可用 getIntent()存取目前的 intent
  • Activity
    • 相當於 iOS的 ViewController
    • 是 Context的 subclass
    • Every activity is invoked by an intent!!
  • Manifest
    • 必須在 manifest中定義所有的 activity

2012年11月3日 星期六

[TOEFL] 聽說讀寫攻略


Speaking:
1.     解題步驟:
甲、套適當版型
乙、選擇適當字彙
丙、多聽別人用語
2.     版型:
甲、個人偏好問題(personal preference)
                       i.              例題:
Describe a place you would like to visit, and explain why you choose this location. Use details and examples to support your position.
                     ii.              版型與參考答案:
1.         State personal preference
I would like to visit Italy.
2.         Reason #1
I would choose to visit Italy because it has a lot of history.
3.         Specific detail for reason #1
For example, Italy has many interesting Roman ruins. It would be interesting to see these historic sites.
4.         Reason #2
Another reason I would like to visit Italy is for the culture.
5.         Specific detail for reason #2
Italy has been home to many great artists and the museums there contain some of the most famous works of art.
6.         Reason #3
Finally, I would like to visit Italy to sample the food.
7.         Specific detail for reason #3
I love Italian food and would really like the chance to try some authentic Italian cooking.
                   iii.              備註: 依個人速度可縮減為兩個原因,可練習的基本例題: 個人嗜好、喜歡的顏色、食物、活動。
乙、二選一的選擇題(Option)
                       i.              例題:
Some universities give financial aid in the form of grants, which don’t have to be paid back, whereas others provide financial assistance in the form of loans, which must be paid back. Which option do you think is better and why? Support your decision with reasons and examples.
                     ii.              版型與參考答案:
1.         State option
I think it is better to offer students’ loans.
2.         Reason #1
I prefer loans because they make the student responsible.
3.         Specific detail for reason #1
A student who has to pay back a loan becomes personally responsible for his or her education.
4.         Reason #2
Furthermore, loans are safer for the school.
5.         Specific detail for reason #2
Grants require the school to give away large amounts of money, and there is no guarantee that the school will get the money back.
6.         Reason #3
Lastly, a student with a loan is probably more likely to stay in school.
7.         Specific detail for reason #3
If the student doesn’t complete the degree, it will be harder to pay back the money.
                   iii.              備註:可練習的基本例題: 政治提出的解決議題,諸如學校應不應該….
丙、總結意見(summarize an option question)
                       i.              例題:
Read the following announcement from the university president:
Due to recent budget constraints, the university has decided to close the computer labs during weekends and reduce their operating hours during the week from 8:00 A.M. to 10:00 P.M. to 9:00 A.M. to 8:00 P.M. These changes are necessary in order to compensate for an unexpected budget shortfall. Without these cutbacks, the school would be forced to reduce service in other important areas, such as the library and the cafeteria.

Listen to the track 9. The woman offers her opinion of the announcement. State what her opinion is and what reasons she gives for having that view.
                     ii.              版型與參考答案:
1.         State opinion
The woman believes that the decision to reduce the hours of the computer lab is a bad idea.
2.         Reason #1
Her first reason for claiming this is that she needs a computer for her class work.
3.         Specific detail for reason #1
The woman states that she doesn’t have a computer and that some of her classes require her to use one.
4.         Reason #2
Also, the woman claims it will be harder to complete all of her work.
5.         Specific detail for reason #2
According to the woman, the best time to do work is on the weekends. Now she fears that the labs will be too full during the week.
丁、總結與對照問題(Summarize/Contrast Question)
                       i.              例題:
Read the following passage about captive breeding:

Both environmentalists and animal rights activists consider captive breeding a solution to the threat of extinction of certain endangered species. In captive breeding, endangered animals are caught and bred, and the offspring is then released back into the wild. Unfortunately, the results of this program have been mixed. In many cases, the animals that are released back into the wild are unable to survive. The time spent in human captivity makes it more difficult for them to acquire food and to fit in with other members of their species.

Play Track 11.

The professor describes the results of a captive breeding experiment. Explain how the results of the experiment relate to the reading on the topic.

                     ii.              版型與參考答案:
1.         Main response
The experiment with the lynx shows that captive breeding can be successful.
2.         Characteristic #1 from reading
One problem with captive breeding, according to the reading, is that animals do not always survive when reintroduced into the wild.
3.         Detail #1 from lecture
But the scientists were able to successfully reintroduce the lynx into the wild.
4.         Characteristic #2 from reading
The reading states that a major problem is that the animals don’t know how to hunt.
5.         Detail #2 from lecture
However, for the experiment, biologists first taught the animals how to hunt before releasing them.
6.         Characteristic #3 from reading
Another problem in the reading is that the animals don’t know how to interact with other members of the species.
7.         Detail #3 from lecture
Scientists were able to get around this, however, by keeping the lynx together in a group.
                   iii.              備註: 此問題主要是對比與對照 ReadingListening lecture,看兩者是相支持或對比,嘗試記下兩者的特點,通常會有3-5個特徵。
戊、總結與依個人回答之問題(Summarize/Preference Question)
                       i.              例題:
Play Track 13

The students discuss two possible solutions to the problem. Describe the problem and state which of the two solutions you prefer and why.

                     ii.              版型與參考答案:
1.         State the problem
The man’s problem is that he has two projects due at the same time.
2.         State the solutions
His friend offers two possible solutions. He can ask for an extension, or he can drop the class.
3.         State your preference
I think asking for an extension is a better solution.
4.         Reason #1
An extension is better because dropping the class is too drastic.
5.         Detail for reason #1
It seems silly to drop the entire class just because of one conflict.
6.         Reason #2
I also think an extension is better because the professor will probably give the student one.
7.         Detail for reason #2
The woman told of a similar situation, and she was able to get an extension.
                   iii.              備註: 此問題主要是聽一段對話,然後依自己喜好回答問題,記住,聽的時候,仔細聽他要問啥,以及它提供給你什麼選擇。
己、總結問題(Summarize the Question)
                       i.              例題:
Play Track 15

Using points and examples from the talk, explain how the Internet has contributed to censorship.

                     ii.              版型與參考答案:
1.         State main idea
The professor argues that the Internet actually promotes censorship, rather than fights it.
2.         Reason #1
The first reason given by the professor is that the Internet has so much information on it.
3.         Detail for reason #1
The Internet contains information from a wide variety of sources, including the government and companies.
4.         Link between reason #1 and main idea
This censors information because the huge amount of information means that some views will never be heard.
5.         Reason #2
Furthermore, the Internet makes it harder to find information.
6.         Detail for reason #2
For example, the professor states that search engines only show the most popular websites.
7.         Link between reason #2 and main idea
This contributes to censorship by leading users to a very small number of websites and hiding the other sites from them.
                   iii.              備註: 此問題主要是總結課程大綱,困難點在於你必須找到整段課程到底要說明什麼主題。不要太注意細節,而應該掌握大綱。此問題切記一開始就要點明大綱(main idea),如果妳的焦點都只在細節,反而會失去分數。
3.     字彙
甲、個人偏好的用字:
                        i.              Preference: favorite, best, most, better, superior, and favorable
                      ii.              Opposites: worse, less, inferior, worst, and least
乙、描述用字:
                       i.              描述(describe)
                     ii.              總結(Summarize)
1.         常用片語
甲、According to the reading/lecture/speaker…
乙、The reading/lecture/speaker states that
丙、The reading/lecture/speaker argues that
丁、The reading/lecture/speaker asserts that
戊、The reading/lecture/speaker holds that
己、The reading/lecture/speaker claims that
庚、The reading/lecture/speaker expresses the point/reason/opinion
辛、One reason/explanation presented by the reading/lecture/speaker…
2.         例子
甲、題目:
Read the following passage and then summarize the points made by the author.
New research in the field of neuroscience is leading some researchers to change their beliefs about how the brain forms. An early view of the brain held that intelligence was primarily determined by genes. Now, however, a new study casts doubt on that view. Researchers have discovered that the neurons in the brain develop in the early stages of infancy. The more stimulation these neurons receive, the more connections the neurons make with other neurons. Cognitive scientists believe that intelligence is partly based on the number of connections between neurons in the brain.
乙、參考解答:
According to the reading, some scientists have to change their views about the brain. The reading states that the early view of the brain is wrong. One reason given, according to the reading, is that there is a new study. The reading claims that the new study shows that brain development occurs during childhood. It also argues that the amount of stimulation a child receives leads to a higher intelligence.
                   iii.              對比(Contrast)
1.         常用片語
甲、In contrast to
乙、One difference between…
丙、Unlike
丁、One distinction between…
戊、Dissimilarly
己、One disagreement between…
庚、One inconsistency between…
辛、One point at that issue is…
2.         例子
甲、題目:
Read the following passage:
For more than three hundred years, the world understood physics as a predictable system. Isaac Newton’s three laws of motion allowed physicists to predict the motion of not just falling apples and thrown balls, but comets, planets, and stars as well. The amazing degree of accuracy these predictions had convinced scientists that the universe obeyed precise laws, a belief that in many ways was reassuring because it was comforting to think of the universe as an orderly, predictable place.

Now read the following lecture on the same topic:
What would you guys think if I told you I could walk right through that wall over there? You probably wouldn’t believe me. As you all know from, uh, basic physics, two solid objects cannot occupy the same space. But the truth is that… is that that neither I nor the wall is really solid. That’s right…. I am mostly made up of empty space. I know it’s weird, but think about it. I’m made of atoms, and atoms are mostly empty space. And it was in the early um, early twentieth century when the discovery was made that atoms can pass through other objects. If you shoot a number of atoms…I think it was Neils Bohr who did this experiment…at a sheet of metal, some of them will pass right through it. And although the probability is extremely unlikely…because I have so many atoms in my body….if I walked into that wall an infinite number of times, at some point I would pass right through it. So our world isn’t as nice and predictable as we may believe.

Explain how the lecture casts doubt on or otherwise relates to the reading.
乙、參考解答:
One difference between the two is the predictable nature of physics. The reading states that the universe is predictable. In contrast to this idea, the professor says the world isn’t always predictable. Unlike the reading, the lecture gives some information on how atoms can be unpredictable. This is inconsistent with the reading, which talks about larger objects, such as planets. However, the biggest point at issue between the two is whether or not we can predict events in the universe.
丙、轉接詞(Transition)
                       i.              接續或進行用語(sequence or progression)
First, Second, Third, Next, After, Lastly, Then, Previously, Before, Following, Finally
                     ii.              連接與關連性用語(connection between ideas)
Because, Therefore, Thus, And, Also, Furthermore, Additionally, So
                   iii.              矛盾與反意用語(contradiction)
However, Despite, Yet, Although, But, In contrast to, On the other hand