Total Pageviews

2014/10/23

要去哪裡查詢零股交易的相關資訊


有時候股票除了配現金以外,還會給零股給投資大眾,為了讓買賣比較容易(因為零股只能利用盤後交易),故通常會利用盤後交易來買零股湊成一張

我們如果要去查詢零股最佳一檔買、賣價格的話,可以到基本市況報導網站( http://newmis.twse.com.tw/stock/oddTrade.jsp ) 查詢


 假設如果我要找的是『食品類股』,在上市類股下拉單選取『食品工業』

 該網站就會顯示相關食品類股的零股揭示買價、賣價、成交價以及成交股數


有關零股更多資訊可以參考 http://www.masterlink.com.tw/service/qanda/Q&A-6.htm 

2014/10/21

How to copy text from Notepad++ to Microsoft Word and keep its color to distinguish keywords


Notepad++ can distinguish between different languages source code can be written in. For example, a language could distinguish certain keywords that have to be differently interpreted, and as such it can be useful to distinguish these keywords using another color or font. 


For example.
The language is Java.

The language is SQL.


Scenario
If we would like to copy SQL statement from Notepad++ to Microsoft Word in my system design document, but it seems cannot keep its color to distinguish keywords. 
For example.

Resolution
Step1. Select text you would like to copy.

Step2. Plugins --> NppExport --> Copy RTF to clipboard

Step3. Paste text to Microsoft word


2014/10/16

How to display Tradition Chinese Character in Git Bash

Problem
Why I cannot display Tradition Chinese Character in Git Bash correctly?

Solution
You need to edit three files under git\etc

1. edit gitconfig file and append configuration as following:
1:  [gui]  
2:  encoding = utf-8   
3:  #log编码  
4:  [i18n]  
5:  commitencoding = utf-8   
6:  #支持中文路径  
7:  [svn]  
8:  pathnameencoding = utf-8   

2. edit git-completion.bash file and append configuration  as following:
1:  #正常顯示中文  
2:  alias ls='ls --show-control-chars --color=auto'  

3. edit inputrc file and append configuration  as following:
1:  #bash中可以正常输入中文  
2:  set output-meta on   
3:  set convert-meta off  

Check Result

2014/10/15

JRebel - Reload any changes without restart server

As a developer, we do not want to waste time to restart server again and again to see the implace of code changes.
You can try JRebel to save your time.

If you are using Eclipse, here has good step-by-step installation and configuration guide: http://manuals.zeroturnaround.com/jrebel/ide/eclipse.html

For more information, please check http://zeroturnaround.com/software/jrebel/learn/

Demo

Here has code snippet, and it will print debug message as entering this method
1:    @RequestMapping(value = "/query/tab1", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)  
2:    public @ResponseBody  
3:    List findTab1(@RequestBody Fms420rFormBean formBean, Alerter alerter) {  
4:      log.debug("test");  
5:      List dataList = service.queryTab1(formBean.getYear(), formBean.getMonth());  
6:      if (CollectionUtils.isEmpty(dataList)) {  
7:        alerter.info(Messages.warning_notFound());  
8:      } else {  
9:        alerter.info(Messages.success_find());  
10:      }  
11:      return dataList;  
12:    }  

And the console will print "test" debugging message as entering this method:
1:  19:15:45,493 INFO [stdout]  [20123] DEBUG gov.nta.fms.web.rest.Fms420rResource - test  

In order to test JRebel, I just modified the debug message to "JRebel test" and submit query without restart application server
1:    @RequestMapping(value = "/query/tab1", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)  
2:    public @ResponseBody  
3:    List findTab1(@RequestBody Fms420rFormBean formBean, Alerter alerter) {  
4:      log.debug("JRebel test");  
5:      List dataList = service.queryTab1(formBean.getYear(), formBean.getMonth());  
6:      if (CollectionUtils.isEmpty(dataList)) {  
7:        alerter.info(Messages.warning_notFound());  
8:      } else {  
9:        alerter.info(Messages.success_find());  
10:      }  
11:      return dataList;  
12:    }  

See....I don't redeploy and restart application server, but the console print the up-to-date debug message. 
1:  19:16:19,742 INFO [stdout]  [20123] DEBUG gov.nta.fms.web.rest.Fms420rResource - JRebel test  

It's because of JRebel reload any changes classes automatically. 
When you change any class or resource in your IDE, the change will reflect in you application immediately, skipping the build and redeploy phases.




2014/10/14

How to find out the PID (process ID) of processes in Windows

Problem
If I would like to find out the PID of javaw.java proecess, how do I do?
Windows task manager seems does not have PID information.

Solution 1
View-->Selected Columns-->Checked PID-->OK

Then we can find out the PID information.


Solution 2
Open command prompt, and execute tasklist /fi "Imagename eq JAVAW.exe"
Then we can get the PID information
映像名稱                       PID 工作階段名稱      工作階段 #    RAM使用量
========================= ======== ================ =========== ============
javaw.exe                    10368 Console                    1  1,620,884 K



Reference

2014/10/01

[閱讀筆記] 拆開獲利的糖衣



  1. 債券價格的變動與利率負相關,利率上升,債券價格會下跌;利率下降,債券價格會上漲
  2. 短期投資來說,股票的波動大於債券。但是,若是拉長到30年,股票的波動只有債券的一半,但報酬好很多
  3. 波動是投資主要風險,但不是唯一風險。對許多長期投資者來說,如果採用波動不夠大的投資組合,這樣的投資成本長期看來會造成更大的壞處
  4. 多頭市場是在悲觀中生成,在懷疑中成長,在樂觀中成熟,在亢奮中消逝
  5. 股市是經濟的領先指標,投資人不會等經濟資料顯示經濟復甦才開始投資,他們會提前哄抬股價
  6. 如果你的投資期間很長,長期來說,由於貨幣升貶本質是零和、不規則的循環,貨幣對全球投資組合的影響會互相抵消,接近于零
  7. 貨幣的波動很大,長期來說,投資人很難掌握短期的市場時機,靠交易外匯獲利
  8. 如果每個人都在關注某一件事,你知道你可以放心忽略那件事,往別的方向看,關注大家沒注意的事,以及可能對未來市場走向有很大影響的事
  9. 衡量市場氛圍往往不是一種科學,反而更像藝術


2014/09/30

2014/09 南投

溪頭漢光樓

大學池


溪頭天空步道




竹山紫南宮