int getaddrinfo( const char* pHostName, const char* pServiceName, const struct addrinfo* pHints,
struct addrinfo **pResults);
getaddrinfo() 用來取得 host 上某 service 的一系列的 IP addresses 和 port numbers。
舉例來說
struct addrinfo hints, *result;
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
int error = getaddrinfo("www.kame.net", "http", &hints, &result);
This blog is about my anxiety and eagerness. Please don't spread anything and don't let me know you're watching.
2016年4月17日 星期日
2016年4月5日 星期二
Vocabulary Set 4.
- dual-earner couples
- 雙薪夫妻
- mortgage /ˋmɔrgɪdʒ/ (n)
- 抵押
- mire /maɪr/ (v)
- 使陷入泥沼
- incur /ɪn`kɝ/ (v)
- to come into or acquire
- formaldehyde /fɔrˋmældə͵haɪd/ (n)
- 甲醛
- ply /plaɪ/
- a thickness or layer of folded material
- 夾層; 多層板
- plywood
- 夾板; 多層板
- particleboard
- 膠粒版
- symptom/ˋsɪmptəm/ (n)
- 症狀
2016年4月4日 星期一
Vocabulary Set 3.
Today's vocabulary set is from an article talking about the mobile home in U.S..
- quasi /ˋkwesaɪ/ (a)
- resembling; seeming; virtual; 準
- quasi-homelessness
- rural /ˋrʊrəl/ (a)
- of, relating to the country life; 田園的
- rural America
- solicit /səˋlɪsɪt/ (v.t.)
- to seek for something by entreaty;
- He solicited aid from minister.
- earnest /ˋɝnɪst/ (adj.)
- seriously in intention; 真誠的
- entreaty means "earnest request"
- entreaty /ɪn`tritɪ/ (adj.)
- earnest request
- to seek for aid by entreaty (aid is uncountable)
- tout /taʊt/ (v.t.)
- To solicit business, employment, votes, or the like importunately.
- Owning a manufactured home (often also known as a "mobile home") in a rural trailer park is often touted to these families as an affordable "next best thing"—and a step toward conventional homeownership.
- In the above sentence, the meaning of `touted` is similar to `sold`
- decline /dɪklaɪn/ (v)
- vulnerable /`vʌlnərəb!/ (adj) (`l` 不發音)
- capable to being wounded or hurt; 易受傷的, vuln 是古英文的 wound
- serfdom /`sɝfdəm/ (n)
- 農奴身份, serf 是農奴, Hsinchu Code Serf
- Owning a mobile home but renting the land it stands on in a trailer park amounts to "a kind of serfdom"
- mercy /`mɝsɪ/ (n)
- 慈悲
- recourse /rɪ`kors/ (n)
- a source of helps in a difficult situation
- "Being landless leaves trailer owners at the park landlord's mercy," explains Salamon. "Because the park is private property, the owners have little recourse if they're evicted."
- evict /ɪˈvɪkt/ (v)
- To expel a person from a land; 從某地驅逐
2016年4月3日 星期日
Vocabulary Set 2
A list of words clipped from recent readings - HBR, Advanced, Fictions, and technology reports.
My zoology thesis was a functional analysis of the thyroid gland of the three-toed sloth. I chose the sloth because its demeanour - calm, quite and introspective - did something to soothe my shattered self.
- dawdle (vi)
- to waste time
- Everyone dawdles from time to time
- procrastinate (vi)
- to keep delaying something that must be done
- pursue /pərˈsu/ (vt)
- follow something in order to catch or attack them
- exert /ɪɡˈzərt/ (vt)
- to use something such as authority, power, influence, etc. in order to make something happen
- genetics
- dopamine
- gratify
- to give someone pleasure or satisfaction
- His praise will gratify all who worked so hard to earn it.
- fleeting
- quick
- nuisance
- loom (v)
- to appear as a large, often frightening or unclear shape or object
- sheer (adj)
- nothing other than
- The suggestion is sheer nonsense.
- gloomy (adj)
- dark
- tenure (n)
- being the legal owner of land, a job, or an official public position, or the period of time during which you own it
- zoology (n)
- sloth /slɔθ/ (n)
- 樹懶
- cosmogony /koz-mog-uh-nee/ (n)
- 天體演化學
- thyroid /ˈθaɪrɔɪd/ (n) i.e. thyroid gland
- 甲狀腺
- gland /ɡlænd/ (n)
- 線體
- an organ in the human or animal body that secretes particular chemical substances for use in the body or for discharge into the surroundings.
- demeanour = demeanor
- behavior; facial appearance; a way of looking and behaving
- introspective (a)
- The act or process of looking into oneself.
- 反省的
- soothe /suð/ (vt)
- to make someone feel calm or less worried
- A shot of brandy may soothe his nerves.
- To soothe a crying baby.
- shatter /ˋʃætɚ/ (v)
- to (cause something to) break suddenly into very small pieces
- break or cause to break suddenly and violently into pieces.
- The window was shattered by a stone.
- The glass shattered into a thousand tiny pieces.
- blotch /blɑtʃ/ (n)
- an irregular patch or unsightly mark on a surface, typically the skin; 紅斑
- The overlapping windows create blotches, whenever you forget to refresh the windows in the proper order.
- despair /dɪˋspɛr/ (n)
- the complete loss or absence of hope; 絕望
- She was in despair.
- obviate /ˋɑbvɪ͵et/ (vt).
- remove (a need or difficulty);
- obscure /əbˋskjʊr/ (adj)
- not clear or plain; ambiguous; vague; or uncertain
My zoology thesis was a functional analysis of the thyroid gland of the three-toed sloth. I chose the sloth because its demeanour - calm, quite and introspective - did something to soothe my shattered self.
2016年3月27日 星期日
Vocabulary Set 1
- muzzle
- empathy
- ethical
- judiciously
- having, showing or done with good judgement or sense.
明智地
- inadvertently
- not resulting from deliberate planning
- 非故意的
- stereotyped /`stɛrɪə͵taɪp/ (a)
- fierce /fɪrs/ (a)
- wild
- fierce animals
- a fierce look
- pointe shoe
- shank
- 小腿
- flex
- to bend an arm, leg, etc..
- indigenous /ɪnˈdɪdʒənəs/
- aboriginal /æbəˋrɪdʒən!/ (omit o)
- cerebral /sɛrəbrəl/
Women and Minorities Are Penalized for Promoting Diversity
- minority
- a small number of part, esp. the number is less than half the whole number
- penalize
- The verb form of penalty
- budge /bʌdʒ/ (verv)
- make the slightest movement
- She won't budge from her opinion.
- budget /ˋbʌdʒɪt/
- reinforce
- advocate /ˋæd və kɪt/ (omit d)
- (noun) a person who publicly supports or recommends a particular cause or policy
- 擁護者
- (verb) publicly recommend or support
- garner /ˋgɑrnɚ/ (verb)
- gather or collect
- scrutiny /ˋskrutənɪ/ (noun)
- critical observation or examination
- Every aspect of local government was placed under scrutiny
- demographic /diməˋgræfɪk/ (adj)
- 人口統計學的
- fictitious /fɪkˋtɪʃəs/ (adj)
- not real or true
2016年3月23日 星期三
bash complete 怎麼使用
Bash complete 的概念是,將某些 regression expression 與某個指令做連結,如此一來,就可以對該指令使用 tab tab 來 auto-completion。
先看一個 example:
假設我的家目錄底下有 A.cpp, B.cpp C.cpp 這些檔案
建立一個新的可執行檔,叫做 example,我們之後要讓 example 可以跟 *.cpp 做 auto-completion
建立連結:
馬上來實驗:
先看一個 example:
假設我的家目錄底下有 A.cpp, B.cpp C.cpp 這些檔案
$ ls
A.cpp B.cpp C.cpp
建立一個新的可執行檔,叫做 example,我們之後要讓 example 可以跟 *.cpp 做 auto-completion
$ touch example
$ chmod +x example
建立連結:
$ complete -f -X '!*.cpp'example
馬上來實驗:
$ example [tab] [tab]
A.cpp B.cpp C.cpp
2015年12月13日 星期日
訂閱:
文章 (Atom)