over 3 years ago

今天有一個物件的vector,此物件擁有一個變數density,我們想要依照他的density大小來依序存取。但基於某些理由不適合直接排序vector,也不適合用物件們的reference另外來排序。所以只使用物件在vector裡的index加上奇怪的functor來進行排序(我想不到其他的方法了ORZ)

Obj.h
class Obj
{
public:
  double density;
};

struct comp
{// comparator for objs index
  comp(const vector<Obj> &p_obj): obj_(p_obj) {}
  bool operator()(const size_t p_index_1, const size_t p_index_2)
  {
    return obj_[p_index_1].density < obj_[p_index_2].density;
  }
private:
  const vector<Obj> &obj_;
};
main.cpp
int main()
{
  vector<Obj> objs;
  // initialize and fill up objs
  // ...
  vector<size_t> obj_indexs(objs.size());
  for(size_t it = 0; it < obj_indexs.size(); ++it)
  {
    obj_indexs[it] = it;
  }

  // case 1: sort index by compare density of obj
  sort(objs.begin(), objs.end(), comp(objs)); // OK.
  
  return 0;
}

但假如今天改成使用set來維持density的大小關係,並且直接把functor塞進去就會產生error。主因是C++ compiler對於set<size_t, comp> obj_set(comp(objs));這個表示式的解讀跟我們的直覺想法是不同的。簡單說就是他把obj_set(comp(objs))當成funciton declaration,前面的set<size_t, comp>當成function的回傳值,詳細看wiki的例子比較簡單且清楚。
所以要改成第二種先把要用functor定義出來在丟給set的constructor。

參考 wiki 有例子↓
http://en.wikipedia.org/wiki/Most_vexing_parse

main.cpp
  // case 2: 
  //set<size_t, comp> obj_set(comp(objs)); // incorrect.
  
  comp density_comparator(objs);
  set<size_t, comp> obj_set(density_comparator); // OK.
  
  // set operation
  obj_set.inset(0); // Error in first declaration
  
 
over 3 years ago

歐洲學制學分請先參考 ECTS
http://zh.wikipedia.org/wiki/%E6%AC%A7%E6%B4%B2%E5%AD%A6%E5%88%86%E4%BA%92%E8%AE%A4%E4%BD%93%E7%B3%BB

碩士班

Master of Informatics

課程試排
扣掉選修[10]、研討[4]跟碩論[30],反正在交大也沒算入畢業學分,剩76學分進行課程安排跟交大比較看看。
假設主修Software Engineering,副修Databases and Informationsystems、Algorithms and Scientific Computing
(課程後面的L是指Lecture算講課時間,E是Exercise算作業時間,P是實作時間)

  • 專業領域 [18]
    • Patterns in Software Engineering [5] 2L+2E
    • Advanced Topics of Software Testing [5] 2L+2E
    • Software testing: Processes and Methods [5] 2L+2E
    • Software Architectures [3] 2L
  • 副領域 1 [8]
    • Data Mining and Knowledge Discovery [3] 2L
    • Application and Implementation of Database Systems [6] 3L+2E
  • 副領域 2 [8]
    • Efficient Algorithms and Data Structures [8] 4L+2E
  • 超修 [8]
    • Efficient Algorithms and Data Structures II [8] 4L+2E
  • 進階實作 [10]
    • Advanced Practical Course - Operating Systems - Google Android Practical Course [10] 6P
  • 跨領域應用 [16]
    • Dynamic feedback reports for mobile and online 上課[5] 實作[8] 寫文件[2] 報告 [1]
  • Soft Skills [8]
    • Higher education systems in Europe and abroad [4] 2L
    • Intercultural Aspects of Working in Global Teams [4] 2L

帳面看起來相當於交大 1超重主科(作業系統實作) + 2重主科 + 4主科 + 2涼主科 + 1跨領域實作 + 2軟實力課程。另外其中有部分課程作業跟課程是可以分開選的,像是Efficient Algorithms and Data Structures 可能就是4L跟2E分別是兩堂課。

 
over 3 years ago

整理所有覺得有趣跟想修的課程

想修的
[0] Advanced Topics of Software Testing
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950156730&pSpracheNr=2&pMUISuche=FALSE

[2] Algorithms for Scientific Computing II - Sparse Matrices
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950156975&pSpracheNr=2&pMUISuche=FALSE

[X] Basic Mathematical Methods for Imaging and Visualization
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950157565&pSpracheNr=2&pMUISuche=FALSE

[2] Data Mining and Knowledge Discovery
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950157191&pSpracheNr=2&pMUISuche=FALSE

[0] Design Patterns in Software Engineering
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950156835&pSpracheNr=2&pMUISuche=FALSE

[2] Efficient Algorithms and Data Structures
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950158063&pSpracheNr=2&pMUISuche=FALSE

[2] Introduction to Scientific Computing 1
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950158807&pSpracheNr=2&pMUISuche=FALSE
或多或少都學了一點,但好像沒有完整修過

[2] Program Optimization
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950159202&pSpracheNr=2&pMUISuche=FALSE

[X] Scientific Visualization - Algorithms for Data Visualization
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950160338&pSpracheNr=2&pMUISuche=FALSE

[1] Software Architectures
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950157701&pSpracheNr=2&pMUISuche=FALSE

邪笑的
Advanced Programming
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950156890&pSpracheNr=2&pMUISuche=FALSE

Practical Advanced Programming
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950159802&pSpracheNr=2&pMUISuche=FALSE

有趣的
Auction Theory and Market Design
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950156242&pSpracheNr=2&pMUISuche=FALSE
跟賽局有關的,我也看不太懂

Computational Social Choice
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950159585&pSpracheNr=2&pMUISuche=FALSE
賽局+社會規則??

Environmental modeling and decision support systems
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950156964&pSpracheNr=2&pMUISuche=FALSE
講各種modeling,好像跟AI有關?

Global Business Studies
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950156516&pSpracheNr=2&pMUISuche=FALSE

High Performance Computing - Algorithms and Applications
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950160193&pSpracheNr=2&pMUISuche=FALSE
我好像修不起,先修要數值方法+平行程式設計

Higher education systems in Europe and abroad
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950156578&pSpracheNr=2&pMUISuche=FALSE
留學交換介紹

Information and Knowledge Management
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950156873&pSpracheNr=2&pMUISuche=FALSE
跟資訊管理有關?

Intercultural Aspects of Working in Global Teams
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950156400&pSpracheNr=2&pMUISuche=FALSE

iOS Practical Course
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950164027&pSpracheNr=2&pMUISuche=FALSE

Java Script Technology
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950164083&pSpracheNr=2&pMUISuche=FALSE
交大甚麼時候這種課可以算學分QQ

Master your thesis (Überfachliche Grundlagen)
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950156157&pSpracheNr=2&pMUISuche=FALSE

Personal Effectiveness (Soft Skills)
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950158732&pSpracheNr=2&pMUISuche=FALSE
各種軟實力課程

Public Relations - Making your case
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950158930&pSpracheNr=2&pMUISuche=FALSE

Tutorial
https://campus.tum.de/tumonline/wblv.wbShowLvDetail?pStpSpNr=950155879&pSpracheNr=2&pMUISuche=FALSE
Computational Social Choice的附屬課程

 
over 3 years ago

2014

11/21 Fri. 電機學院交換申請截止
12/18 Thu. 電機學院交換通過名單公告

2015

01/16 Fri. 校級交換申請截止
01/30 Fri. 校級交換通過名單公告
01/19-02/23 寒假期間
02/03 Tue. 托福考試報名
03/07 Sat. 托福考試
03/13 Fri. 獎學金申請送件 (系所)
03/17 Tue. 托福考試出分
04/17 Fri. 姊妹校交換申請文件通知
04/20 Mon. 托福紙本成績 (不確定)
05/08 Fri. 姊妹校交換申請文件截止 (交大)
05/15 Fri. 姊妹校交換申請文件截止 (TUM)
06/03 Wed. TUM寄信通知表示已收到申請資料
06/11 Thu. 交換/雙聯行前說明會 (校級)
06/12 Fri. 預約辦理簽證
06/13 Sat. 交換學生行前說明會 (院級)
06/22 Mon. 找旅行社訂機票
07/13 Mon. 收到慕尼黑入學許可
07/21 Tue. 辦理德國簽證
08/10 Mon. 開始找宿舍
08/13 Thu. 收到德國簽證通知(補保險機票)
09/11 Fri. 收到德國簽證(2人)

預計行程

出國前

  • 辦理簽證
    • 送件
    • 面試
    • 收到回覆
  • 役男出境
  • 送交校內出國應備文件

時間&手續
07/13 收到TUM入學許可
07/17 收到TUMonline帳密=>重設密碼、上傳相片

  • 繳交雜費並寄信通知alagha
  • 買保險並寄信通知alagha

交換期間

  • 銀行帳戶申請
  • 住宿居留登記
  • 地鐵月票申請
  • 延簽申請
  • 提供國外聯絡資訊
  • 繳交期中心得報告
  • 交換期間選課單
  • 課程登陸申請表

回國後

  • 取得國外成績單
  • 辦理成績登錄及學分抵免
  • 送交校內回國應備文件
 
over 3 years ago

字母

Ä ä、Ö ö、Ü ü、ß

講義

Grüße (Greetings)

德文 解釋
Hallo 你好
Guten Morgen 早安
Guten Tag 日安
Guten Abend 夜安
Gute Nacht 晚安
Auf Wiedersehen 再見
Tschüs 再見 (親近用法)

Vielen Dank 非常感謝
Danke (schön) (非常)感謝
bitte (schön) 請、不客氣
Entschuldigung 抱歉
tut mir leid 抱歉
Das macht nichts 沒關係

問詞

wie how
woher wherefrom
wo where
was what
wohin whereto

人稱

ich
du
er/sie/es
wir
ihr
sie/Sie

動詞

1. 規則變化

kommen come
komme kommst kommt kommen kommt kommen
wohnen live
wohne wohnst wohnt wohnen wohnt wohnen

2. -s, -ß + en

heißen call
heiße heißt heißt heißen heißt heißen

3. -t, -d + en

arbeiten work
arbeite arbeitest arbeitet arbeiten arbeitet arbeiten
machen make
mache machst macht machen macht machen

4. 不規則變化

sein be
bin bist ist sind seid sind
fahren drive
fahre fahrst fährt fahren fahrt fahren
schlafen sleep
schlafe schläfst schläft schlafen schlaft schlafen

介係詞

im at/in
in in
aus from
nach towards

第一課

Guten Tag

Lektion lesson
sprechen speak
lesen read
schreiben write
hören listen
viel many
Kurs course
Frage question
Antwort answer
Herr Mr.
Frau Mrs.
mein my
ja yes
nein no
Name name

Die Welt

德文 中文
und and

Mittern in Europa

Ein Zug in Deutschland

ein a/an/one
Zug train
nicht not
spielen play
Karte card
Urlaub vacation

Hard
Situation situation
richtig right
falsch false

Auf Wiedersehen

Im Deutschkurs

 
almost 4 years ago
  • 起手式

    • R:20 L:19 S:18 W:21 (2015/03/07)
    • Total:78
  • 簡介

    • 考試形式:聽/說/讀/寫 各30分,共120分
    • 考試時間:共約4小時
    • 報名費:US$170
    • 報名時間:7~3天前 (一個月)
  • 相關的東西

  • 基礎能力提升

    • 單字量7000+ (9000~12000)
    • 閱讀
      • TPO題目
      • CNN News / NY times
    • 聽力
      • 60 seconds science
      • 看影集效果有限
    • 口說
      • 練習用英文自言自語
    • 寫作
      • 英打 30+ wps
      • 拼寫正確
  • 準備時間:四週 (我的準備流程)

    • 第一週 其實還沒開始準備,只是先開始背單字而已跟看電影
    • 第二週 過年,開始看相關考試流程跟題目類型,找網路上的資源,先做一次TPO
    • 第三週 回新竹,主要練閱讀
    • 第四周 練閱讀,留三天再練一下聽力、口說、寫作,並把模板背熟一點,最後一天看一下機精
  • 正確的觀念 (準備)

    • 寫TPO就對了
    • 題目有固定題型
    • 模板非常適合給短期準備者
  • 建議的準備方法

    1. 了解托福+準備材料 (1 week)
    2. 加強基本能力 (嘗試適合的方法) (4+ week)
    3. 針對考試題目做特化練習 (2-4 week)
    4. 練題目修細節,看機經 (1-2 week)
  • 優先序:單字 > 聽力 > 閱讀 > 口說 > 寫作

  • 心得

    • 交大托福分數要求:79分,大概是全民英檢中高級的程度 (獎學金使用)
    • 考甚麼? 工作選TOEIC 留學選TOEFL+GRE (for CS) IELTS (歐洲學校)
    • 準備三週英文其實不太會進步,但可以學習如何念英文
 
almost 4 years ago

口說

  • 第三題 學校vs學生意見

The school is going to ... (the student’s proposal is that)
However/Well, the man/woman disaprees/agrees with this new policy/proposal for several reasons.

First, the man/woman says that ... Therefore ...
Second, the man/woman mentions that ... As a result ...

In conclusion, those are the reasons behind his/her opinion regarding to the reading passage.

  • 第五題 學生選方案

The man/woman has a problem that ... And he discuss two solutions.
First ...
Second ...
I prefer the first/second solution for several reasons.

My first reason is that ...
My second reason is ...

In conclusion, those are the reasons behind my opinion.

  • 第四題 學術篇 名詞解釋 一閱讀一聽力

The reading passage and lecture are talking about ____(科學名詞) which is defined as ...(閱讀內容)
And the prefessor introduces one/two example about ... to ilustrate this topic.

According to the professor, the first example is ... And it explains the topic...

In conclusion, that's how the prefessor illustrate the topic.

  • 第六題 學術篇 名詞解釋 一長聽力

The professor is talking about ...
And he/she introduces one/two example to illustrate this topic.

The first example is about ... Therefor ...
The second example is about ... As a result...

In conclusion, these are ideas for the professor's opinion.

寫作

  • 整合寫作 (約300字)

Both the reading passage and the lecturer discuss ____. The writer claims a conclusion that ____(his statement). However, the lecturer disagrees with this conclusion.

First of all, the writer mentions that ____, but this is very different from the lecturer's claim that ____. Thus, the lecturer believes that ____.

Second, although the writer states that ____, the lecturer holds a different viewpoint. According to he lecturer ____. Furthermore, ____ Therefore, the lecturer concludes that ____.

Third, the lecturer disagrees the writer's opinion that ____. The lecturer points out that ____ Hence, the lecturer holds that ____.

In summary, the lecturer thinks that the writer's point are not convincing. Thus, reading and listening contents are different.


Part a
First of all / Second / Third

the writer mentions that ____, but it's very different from the lecturer's claim that ____.
although the writer points out that ____, the lecturer holds a different viewpoint. According to the lecturer ____. Furthermore, ____.
the lecturer disagree the writer's opinion that ____. The lecturer points out that ____.

Part b
[Thus / Therefore / Hence], the lecturer [believes / concludes / holds] that ____.
is questionable / still has problems /


同義詞替換

  1. professor, speaker, lecturer, man, he
  2. mention, point out, indicate, say, talk about, claim
  3. hence, therefore, thus, as a result
  4. conclude, hold, believe
  5. opinion, claim, viewpoint, points of view
  • 獨立寫作

Some people believe that ____ others _. However, I agree/disagree with the statement that _.

First of all, _. For example _. Meanwhile

In addition _. For instance _. Hence

Last but not least _. As an example _. As a result ____.

 
almost 4 years ago

考試內容

  • Reading
    • 3篇文章,各20分鐘
    • 1題1分,少數2分
    • 每篇13題,共39題
  • Listening
    • 2段對話,4篇課堂演講,各5分鐘,共約50分鐘
    • 1題1分
    • 對話每篇5題,演講每篇6題,共34題
  • Speaking
    • 一、二題自由發揮,三、四題閱讀與聽短文,五、六題聽對話回答問題,共六題,約20分鐘
    • 每題評分0~4分
  • Writing
    • 整合寫作與獨立寫作各1篇,整合20分鐘,獨立30分鐘
    • 每題評分0~5分

https://www.ptt.cc/bbs/TOEFL_iBT/M.1419778047.A.D5B.html

 
almost 4 years ago

How to learn any language in six months | Chris Lonsdale | TEDxLingnanUniversity
http://youtu.be/d0yGdNEWdn0

5 Principles

1. Focus on language content that is relevant to you
2. Use your new language as a tool to communicate from day 1
3. When you first understand the message you will unconsciously acquire the language
4. Physiological Training
5. Psycho-physiological state matters

7 Actions

1. Listen a lot
2. Focus on getting the meaning first (before the words)
3. Start mixing
4. Focus on the core
5. Get a language parent
6. Copy the Face
7. Direct connect to mental images