2009年10月28日 星期三

【轉載】衝突是幼兒成長必經的歷程

Linux Printing with Samba

SAMBA 伺服器 - 設定成為印表機伺服器 (CUPS 系統)
http://linux.vbird.org/linux_server/0370samba.php#server_printer

CUPS
http://www.cups.org/

CUPS - Download CUPS v1.4.1 (4.2M)
http://ftp.easysw.com/pub/cups/1.4.1/cups-1.4.1-source.tar.bz2


Linux 的列印元件 (列印工作、佇列、服務與印表機)
http://linux.vbird.org/linux_basic/0610hardware.php#cups

如何在 Linux 下列印? (LPRng)
http://www.imacat.idv.tw/tech/lnxprint.html

LPRng
www.lprng.com
http://www.lprng.com/downloads.html

LPRng @ sourceforge
http://sourceforge.net/projects/lprng/
LPRng-3.8.Arc4.tar.gz
http://nchc.dl.sourceforge.net/project/lprng/lprng/release%20candidate%204%20of%203.8.A/LPRng-3.8.Arc4.tar.gz

[ARM] memory sync function _for_cpu series functions won't flash/invalidat memory as requested

linux-2.6.31.1, ARM, without CONFIG_DMABOUNCE
(it seems the code is changed at 2.6.28)

I ported my driver from linux-2.6.27.4 to linux-2.6.31.1, and found that some functions does not work. After some debugging, I found that only the *_for_device series function would actually do the memory invalidate/flush, while the *_for_cpu don't.

dma_sync_single
dma_sync_single_for_cpu

pci_dma_sync_single_for_cpu
dma_sync_single_for_cpu
dma_sync_single_range_for_cpu
dmabounce_sync_for_cpu
==> nothing done.

pci_dma_sync_single_for_device
dma_sync_single_for_device
dma_sync_single_range_for_device

dmabounce_sync_for_device
dma_cache_maint


Any thing call to dma_bounce_sync_for_* will result in a return 1, and nothing else.

With CONFIG_DMABOUNCE not defined:

arch/arm/include/asm/dma-mapping.h
/**
* dma_sync_single_range_for_cpu
* @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
* @handle: DMA address of buffer
* @offset: offset of region to start sync
* @size: size of region to sync
* @dir: DMA transfer direction (same as passed to dma_map_single)
*
* Make physical memory consistent for a single streaming mode DMA
* translation after a transfer.
*
* If you perform a dma_map_single() but wish to interrogate the
* buffer using the cpu, yet do not wish to teardown the PCI dma
* mapping, you must call this function before doing so. At the
* next point you give the PCI dma address back to the card, you
* must first the perform a dma_sync_for_device, and then the
* device again owns the buffer.

*/
static inline void dma_sync_single_range_for_cpu(struct device *dev,
dma_addr_t handle, unsigned long offset, size_t size,
enum dma_data_direction dir)
{
BUG_ON(!valid_dma_direction(dir));

dmabounce_sync_for_cpu(dev, handle, offset, size, dir);
}



arch/arm/include/asm/dma-mapping.h
#ifdef CONFIG_DMABOUNCE

(....................)

#else
static inline int dmabounce_sync_for_cpu(struct device *d, dma_addr_t addr,
unsigned long offset, size_t size, enum dma_data_direction dir)
{
return 1;
}

static inline int dmabounce_sync_for_device(struct device *d, dma_addr_t addr,
unsigned long offset, size_t size, enum dma_data_direction dir)
{
return 1;
}




[ARM] dma: don't touch cache on dma_*_for_cpu()
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.29.y.git;a=commitdiff;h=309dbbabee7b19e003e1ba4b98f43d28f390a84e
author Russell King <rmk@dyn-67.arm.linux.org.uk>
Mon, 29 Sep 2008 18:50:59 +0000 (19:50 +0100)
committer Russell King <rmk+kernel@arm.linux.org.uk>
Tue, 30 Sep 2008 10:01:36 +0000 (11:01 +0100)

As per the dma_unmap_* calls, we don't touch the cache when a DMA
buffer transitions from device to CPU ownership.
Presently, no
problems have been identified with speculative cache prefetching
which in itself is a new feature in later architectures. We may
have to revisit the DMA API later for these architectures anyway.


[PATCH 16/25] [ARM] add highmem support to DMA mapping functions
http://lists.arm.linux.org.uk/lurker/message/20081011.035554.0e3d3b9b.en.html
talks about the reason why don't touch cache on dma_*_for_cpu(), a long thread.

http://lists.arm.linux.org.uk/lurker/message/20080926.034224.1a2bec3e.en.html
BTW what's the point of calling dma_cache_maint() in
dma_sync_single_range_for_cpu()? When the CPU regains ownership of the
buffer, the cache is always clean making this call useless.


http://lists.arm.linux.org.uk/lurker/message/20080929.164105.eb5f7e5a.en.html
Let's consider a DMA buffer which starts in the middle of a cache line
meant to receive data from a device.

Upon dma_map_single() the first cache line is first cleaned then the
whole buffer is invalidated.

Upon dma_unmap_single() nothing is done. However, if the first part of
the shared cache line gets a miss, the whole cache line could be
repopulated _before_ the device has stored its data in memory
corresponding to the second half of the same cache line, hence driver
will obtain bad data from the DMA buffer.

If instead we use dma_sync_single_for_cpu() which currently perform
another cleaning of the shared cache line and invalidation of the whole
buffer then the issue above won't occur. things can be even worse when
that first half cache line gets dirty though. Upon the cleaning of that
first cache line, the device data stored in memory corresponding to the
second half cache line will be overwritten and lost. Not cleaning the
first cache line and simply invalidating the whole buffer would preserve
integrity of the device data but will lose the first half cache line
content which is not any better, and only if cache eviction doesn't
happen first.

So I don't see how the cache maintenance performed in
dma_sync_single_range_for_cpu() solves anything besides wasting cycles.
Sure, DMA buffers may span cache lines that overlaps with other data,
but if that data is touched while the DMA buffer is owned by the device
then we're screwed anyway, and I don't see any solution for that besides
completely forbiding DMA mappings that don't start and end on cache line
boundaries as well as disabling cache prefetching.

Since this doesn't appear to be a significant issue in practice given
that luck is on our side and things just work anyway, we could remove
that false "protection" from dma_sync_single_range_for_cpu().

2009年10月23日 星期五

7... 7... 7... 7 7 7 7 7 7

http://www.youtube.com/watch?v=Bsl19-J_H4s


http://www.friends-tv.org/zz411.html

Chandler is nervous about being intimate with Kathy since she used to be Joey's girlfriend; feeling his performance is only adequate, he asks advice from Monica and Rachel; Kathy is very grateful.

(............)

Monica: All right, I'm gonna show you something a lot of guys don't know. Rach, give me that pad, please? All right. Now...
Chandler: Wait, you don't have to draw an actual wo.... Whoa! She's hot!
Monica: Now everybody knows the basic erogenous zones. You got one, two, three, four, five, six, and seven!
Chandler: There are seven?

Chandler: That's one?
Monica: Kind of an important one!
Chandler: Oh, y'know... y'know what? I was looking at it upside down.
Rachel: Well, y'know, sometimes that helps.

Monica: All right uh, the important thing is to take your time, you want to hit ‘em all, and you mix ‘em up. You gotta keep them on their toes.
Rachel: Oo, toes!! Well, for some people.

Monica: All right. You could, uh, start out with a little 1, a 2, a 1-2-3, a 3, a 5, a 4, a 3-2, 2, a 2-4-6, 2-4-6, 4, 2, 2, 4-7, 5-7, 6-7, 7... 7... 7... 7 7 7 7 7 7... seven.


http://tieba.baidu.com/f?kz=357663785

monica给chandler指出了7个点
http://www.mtime.com/group/friends4ever/discussion/394395/
1——嘴 2——脖子 3——乳房 4——肚脐 5——臀部 6——小腹 7——阴部

(........................)

最后说明一下关于toes的问题,这并不是Mon说的敏感区域,有些人可能没看仔细。当时的对话是这样: Monica: All right uh, the important thing is to take your time, you want to hit ‘em all, and you mix ‘em up. You gotta keep them on their toes. Rachel: Oo, toes!! Well, for some people. on one's toes 在美语中的意思是,保持机警,振奋精神。Mon说You gotta keep them on their toes 意思是说你要让他们保持在兴奋(机警)状态。这里用了比喻的手法。而瑞秋听见Mon说脚趾(toes) 就显得非常兴奋。因为性学家做过一个调查,大约有15%的女性地脚趾异常敏感,甚至只刺激脚趾就可以使其达到高潮。Rachel显然是其中之一

2009年10月21日 星期三

兆赫 藍光奇機 ZIN5005HD 開箱

ZIN-5005HD (官方網頁,沒有韌體下載)
http://www.zinwell.com.tw/dig_detail.php?productsid=392

比特數位 ZIN-5005HD (代理商網頁,韌體要在這裡下載)
http://www.i-bt.com.tw/ZIN-5005HD.html

ZIN-5005HD 燒燙燙使用心得
http://www.mobile01.com/topicdetail.php?f=347&t=1210166&r=2&p=1
http://www.mobile01.com/topicdetail.php?f=347&t=1210166&r=2&p=14#14650706

速度跟電腦可以差不多,不過要注意需將6881-6890的Port Maping機器的IP上。

http://www.mobile01.com/topicdetail.php?f=347&t=1210166&r=2&p=18#14855848
設定你的IP分享器..
把5005HD的MAC address綁定到你指定得一個固定IP,
然後用NAT將Port對應到那個IP.

http://www.mobile01.com/topicdetail.php?f=347&t=1210166&r=2&p=19#14885995
ZIN-5005HD播放圖片有沒有數量限制...
(似乎沒人要理我)

ZINWELL兆赫 藍光奇機多媒體影音播放器.....又出新機了..
http://www.mobile01.com/topicdetail.php?f=347&t=1203358&p=1

ZINWELL兆赫 藍光奇機高畫質多媒體影音播放器(ZIN-5005HD)
http://shopping.pchome.com.tw/?mod=item&func=exhibit&IT_NO=DMAA3Q-A43108099&SR_NO=DMAA3Q&ROWNO=1


有鑑於我的source大多是DTS的音軌,我不想動不動轉個幾百G的檔案操硬碟,所以昨天下班就去拎了一台(新竹店還賣完了,是跑去竹北店才買到...)。一回來就update過firmware先。

基本上藍光奇機多了DTS downmix、網路、bt,已經大大勝出,可是在有些小地方上,仍有些過與不及之處。

優點
WDTV在關電源時會有發熱的情形,所以平常沒看時我都會拔插頭;藍光奇機 關電源時不會發熱(至少感覺不出來),工作時也不會過熱。

藍光奇機 對ISO沒有特殊要求,我用CloneDVD產出的ISO檔都可以播;我從網路上下載的ISO WDTV可以播,但是我自己做的都還沒成功過。
缺點

WDTV機身與遙控器的質感都較好;藍光奇機 機身 "看"起來還好,拿起來一整個輕。但是遙控氣質感就遜掉了,看起來就是沒什麼設計的感覺,感覺上就是便宜塑膠製品。介面一整個複雜。常用鍵如字幕選擇、聲道選擇、播放、停止 都小小的很難找,不適合給長輩使用。而且我還在思考,那個"頻道"選擇是幹什麼用的....

另外WDTV有附機身與遙控器的止滑貼紙,非常細心;相較於WDTV,藍光奇機 就顯的粗糙許多。

藍光奇機 的 字幕選擇 沒有提示是什麼字幕;WDTV至少會有CHT/ENG之類的提示。





跟WDTV疊疊樂。明顯大一號,不過反而比較輕


遙控器也是,搞的很像 電視 遙控器。常用鈕都小小的,眼力要很好才行。

2009年10月20日 星期二

日文動詞

余秋菊 「日語文法,讀這本就夠了!」

日文的動詞分類
http://blog.goo.ne.jp/szyu/e/e1b3e09a93b6b5fa17f53839235223cf

明智 周「日文結構的秘密:跨越初級障礙」



動詞
  • G1: 語尾非る,或者 語尾是る,但上一音為あうお段
    • 五段動詞
    * 例外: 有一些看起來是G2,但實際上卻是G1,如:走(はし)る, 入(はい)る...
  • G2: 語尾是る,但上一音為いえ段
    • 一段動詞=上一段(い)+下一段(え)
  • G3: する, 来(く)る
    • 不規則動詞=カ行變格動詞(来る) + サ行變格動詞(する)

變化

あ變
  • G1: う段-->あ段
    * あ --> わ
  • G2: 去る
  • G3: 不一定

否定:ない形: ~ない 是 ~ません 的普通形,~なかった 是 ~ませんでした 的普通形。變形容詞
  • G1,G2: あ變+ない
  • G3:
    する --> しない
    来(く)る--> 来(こ)ない
否定古法:
あ變+ぬ/ん/ず

被動: 變G2動詞(上下一段)
  • G1: あ變+れる
  • G2: あ變+られる
  • G3:
    する --> される
    来(く)る--> 来(こ)られる

使役: 變G2動詞(上下一段)
  • G1: あ變+せる
  • G2: あ變+させる
  • G3:
    する --> させる
    来(く)る--> 来(こ)させる

使役被動: 變G2動詞(上下一段)
  • G1: あ變+せられる
  • G2: あ變+させる
  • G3:
    する --> させる
    来(く)る--> 来(こ)させる


あ變+ぬ
あ變+ず

い變
  • G1: う段-->い段
  • G2: 去る
  • G3:
    する --> します
    来(く)る--> 来(き)ます


想要: 變形容詞
い變+たい

第三人稱想要:
い變+たがる

好像: 變漢字形容詞
い變+そうだ

一邊: 固定不能再變
い變+ながら

い變+に
日本へ和(わ)服(ふく)を買いに行く
新宿(じゅく)へ酒を飲みに行く
部屋へ傘(かさ)を取(と)りに戻(もど)る


ます形: 敬體 助動詞,禮貌的 ~ます、~ました、~ません、~ませんでした、~ましょう
  • G1: い變+ます
  • G2: 去る+ます
  • G3:
    する --> します
    来(く)る--> 来(き)ます
客氣命令:
い變+なさい

い變+なさい

う變
詞書形: 就是動詞的 原形 或 基本形。~ます 的普通形

似乎: 變漢字形容詞
  • う變+ようだ

應該: 變漢字形容詞
  • う變+べきだ

子句: 固定不能再變
  • う變+こと

好像傳聞: い變+そうだ
聽說據說: う變+そうだ

みたいだ

假設: 說到~、若是~
  • う變+なら
らしい
だろう
まい

打算
  • う變+つまり

え變
  • G1: う段-->え段
  • G2: 去る
  • G3:
假設: ば形: 固定不能再變
  • G1: え變+ば
  • G2: え變+れば
  • G3:
    する --> すれば
    来(く)る--> 来(く)れば

能力: 可能: 變G2動詞(上下一段)
  • G1: え變+る
  • G2: え變++える
  • G3:
    する --> できる
    来(く)る--> 来(こ)れる


命令: 上對下命令。固定不能再變
  • G1: え變
  • G2: え變+ろ
  • G3:
    する --> しろ、せよ
    来(く)る--> 来(こ)い


お變
  • G1: う段-->お段
  • G2: 去る
  • G3:

勸誘: 意向形: ~ましょう 的 普通形
  • G1: お變+う
  • G2: お變+よう
  • G3:
    する --> しよう
    来(く)る--> 来(こ)よう


音便
  • G1:
    • 語尾くぐ --> い音便: 去く(ぐ) +い+て(で)/た(だ)
    • 語尾うつる --> 促音便: 去うつる +っ+て/た
    • 語尾ぶむぬ --> 鼻音便: 去ぶむぬ +ん+で/だ
    • 語尾す --> 無音便, ます形+て/た
  • G2: 無音便, い變+て/た
  • G3: 無音便, い變+て/た


接續: て形: 用來接續動詞。變動詞。
  • 音便+て

即使:音便+ても
之後:接著:音便+てから
~看看:音便+てみる(みます)
正在:音便+ている(います)
希望:音便+てほしい
請:音便+てくだしい
很遺憾地發生了~:音便+てしまう(しまいます)


た形: 過去式。 ~ました 的普通形。(應該?)固定不能再變。
  • 音便+た(だ)
因為
  • 音便+たから
之後
  • 音便+たあと

列舉: (應該?)固定不能再變。
  • 音便+たり

假設: 一旦: (應該?)固定不能再變。
  • 音便+たら

普通形: 包括 ない形、なかって形(?)、辭書形、た形,是不含敬意的口語表現

客氣文體衍生變化
動詞い變+ます
否定: ません
勸誘: ましょう
過去: ました
接續: まして
否定過去: ませんでした


名詞+です
否定: ではありません 、 ではないです
推測: でしょう
過去: でした
接續: でして
否定: ではありませんでした 、 ではなかったです

形容詞です
否定: くありません 、 くないです
推測: でしょう
過去: かったです
過去否定: くありませんでした 、 くなかったです

2009年10月19日 星期一

Linux Printing

http://sjc.dlut.edu.cn/doc/HOWTO/zh-html/Printing-HOWTO-7.html

CONFIG_USB_PRINTER
module: usblp

echo -e '1234\r\n' > /dev/usb/lp0
echo -e '12345678\r\n' > /dev/usb/lp0
echo -e '1234567890\r\n\0014' > /dev/usb/lp0


Ascii Table
http://mkl-note.blogspot.com/2008/03/ascii-table-ascii-character-codes-and.html

2009年10月12日 星期一

091012 午 頭前溪竹北岸 再探 之差點回不來

本來今天只想簡單的繞一下就好的...沒想到差點回不來

先是在過河後才發現沒路,四處探查後,路不是沒有,只是"最好"要有開山刀...繞了一下後,放棄...再把車扛回竹北岸...不爽...不想就這樣回去...決定再騎下去...-_-""

可是由於沒有研究新中正橋附近的地圖(是說研究了也沒用,gmap的路有時是僅供參考的...),到了橋附近卻不知道要走哪裡回到大路上,又因為時間有點緊迫(下午還要上班ㄌㄟ...),試了第四條才找到對的。

軌跡

Name WBT201
Points 1277
Distance 24.18Km(15.03mi)
Time 2h 2m 50s
Move Time 2h 0m 42s
Stop Time 2m 8s
Average Speed All 11.8116
Average Speed Move 12.0204
Fast Speed 37
Highest Altitude 115
Lowest Altitude 36
Zone +00:00

2009年10月8日 星期四

etrade no-load, no-transaction-fee (NTF) funds

小結:
eTrade手續費是Firstrade兩倍
NTF fund種類Firstrade是eTrade的2310倍
而且 非美國居民 不能在eTrade買基金;Firstrade則可以
這...比不下去了吧.......


[etrade]必須要居住在美國才能買基金?
http://mkl-note.blogspot.com/2009/11/etrade.html
所以可能etrade "很體貼地" 把我導回登入主頁.....
不知道為什麼,但是在Firstrade開的帳戶 據說 是可以買基金的

etrade有很多資訊,而且本來就應該有的,但是不知道是我太傻還是其他人太聰明,我就是找不到某些資訊。像下面這幾頁,是無意間找到的,我還是不知道從 etrade home怎麼點過去....

Investing Products -> Mutual Funds
https://us.etrade.com/e/t/invest/mutualfunds
(如果我登入後再到這頁,都會被導到Accounts -> Complete View下,所以不能登入!!)

Fund screener (需要login)
https://www.etrade.wallst.com/etrade/v1/fundresearch/mutualfundscreener/fund_screener.asp


Fund list and tools
https://us.etrade.com/e/t/invest/wsoddirect?wsod_page=/fundresearch/fundfamilies/fundfamilies.asp

1,000 no-load, no-transaction-fee funds
https://us.etrade.com/e/t/invest/wsoddirect?wsod_page=/fundresearch/mutualfundscreener/fund_screener_results.asp?c=SETFFees:LIKE:No%2520Load%2520No%2520Transaction%2520Fee

Firstrade的fund screener的NTF fund有23139個.....是etrade的23倍之多沒那麼多,似乎是firstrade的fund screener有問題,這個數字是 所有 的基金,firstrade自己說的數字大概是10,000左右,也是etrade的10倍左右


Automatic Investment Plan(AIP)
https://us.etrade.com/e/t/pict/automaticinvestment#

etrade
initial purchase後,只要再買同一支基金都算是additional purchase
定期定額 叫 Automatic Investment Plan(AIP),在initial purchase後可以去這頁設定
https://us.etrade.com/e/t/pict/automaticinvestment#
但是 只能 設定 NTF fund,所以也沒有手續費或佣金怎麼扣的問題

[Investing Products] -> [Mutual Funds] -> [Easy-to-Use Tools] -> [Sign up for Automatic Investing]
https://us.etrade.com/e/t/invest/aihome


View Commissions & Fees
https://us.etrade.com/e/t/prospectestation/pricing?id=1206010000

FEES AND COMMISSIONS
https://us.etrade.com/e/t/invest/apptemplate?gxml=master_disclosure.html&skinname=none

Mutual Funds
No-load, no-transaction-fee funds¹: $0
Transaction-fee funds: $19.99 (買/賣 都要收手續費)
Load funds: See prospectus for amount of load (沒看過要收的,但是有back-end load 與 front-end load的不同)
Broker-assisted trades: $45 plus the applicable commission

front-end load: 買的時候收,通常依購買金額大小有不同的%
back-end load: 賣的時候收,通常依持有期間長短有不同的%

靠~etrade收的手續費是firstrade的兩倍有餘....

為什麼要開海外券商交易戶
http://greenhornfinancefootnote.blogspot.com/2007/05/blog-post_936.html
(稍微整理過)
firstrade
有佣基金
(買入/賣出)都不必繳交交易手續費。 (但是還是有佣金)

免佣基金
單筆投資-買賣都要收手續費
定期定額(Periodic Investment Plan)-第一次買進時收一次手續費,之後買進不收交易手續費。賣出時,收每筆9.95美金的交易手續費。

免交易手續費基金
無論買進還是賣出,皆不收佣金也不收交易手續費。


Firstrade 的 Periodic Investment Plan
http://www.firstrade.com/public/en_us/productsservices/investmentchoices/mutualfunds/
不用ACH,因為我又沒開bank account,只要把錢wire過去,initial purchase過(會收一次手續費),再setup PIP即可。但是它不能在網路上設定,一定要寄實體申請書。

091008 午 頭前溪竹北岸

新竹岸的風景我已經覺得不錯了,竹北岸的風景更讚!!

扛車渡河
雖然可以走經國大橋,但是就覺得扛車渡河更有fu。過河後就一直走到堤頂,沿著堤頂往高鐵鐵道的方向走。

這裡要走高鐵下面的堤外道路
大概在快到高鐵鐵道前,下面就有路了。走沒多久,精采的就來了,與其說它是路,還不如說是小溪才對,不管怎麼走都有潺潺流水。水勢不大,但是對第一次走這路的我們可是提心吊膽的。平坦的地方就是一大漥,稍有坡的就是小溪。我還好是穿了涼鞋,descent穿的是布鞋,一直在哇哇叫....

這一段走堤頂風景超讚的啦
旁邊 高鐵三家基地(??) ,這一段的堤頂有鋪紅磚道,不過沒有路下來,把車子拎上去了就是了。
藍天白雲,微風徐徐(....其實應該是強風才對....),旁邊整片的稻田在身旁玩波浪舞。在這種地方騎車真的是種享受...

這裡又走堤外
堤防內的風景是不錯,走著走著看到有上堤頂的斜坡,心裡就癢癢的,又爬出去了。經過水泥廠的廢棄房子,走堤內道路是走不到的。


軌跡


WBT-201的軟體升級到TMX3,看起來很好看,但是功能卻變陽春了,找時間再換回來好了...

Name WBT201
Points 780
Distance 14.22Km(8.84mi)
Time 1h 8m 34s
Move Time 1h 8m 34s
Stop Time 0s
Average Speed All 12.4477
Average Speed Move 12.4477
Fast Speed 53
Highest Altitude 132
Lowest Altitude 40
Zone +00:00

2009年10月7日 星期三

投資資料

AMERICAN CENTURY LIVESTRONG 2045 INV AROIX
AMERICAN CENTURY LIVESTRONG 2035 INV ARYIX
AMERICAN CENTURY LIVESTRONG 2025 INV ARWIX
AMERICAN CENTURY LIVESTRONG 2015 INV ARFIX
AMERICAN CENTURY TARGET MAT 2010 INV BTTNX
MATTHEWS CHINA MCHFX
MATTHEWS PACIFIC TIGER MAPTX


Schwab S&P 500 Index Sel (SWPPX)
http://finance.yahoo.com/q/pr?s=SWPPX

Vanguard 500 Index Investor (VFINX)
http://finance.yahoo.com/q?s=VFINX

Fidelity Spartan 500 Index Investor (FSMKX)
http://finance.yahoo.com/q/pr?s=FSMKX

Min Initial Investment: $10,000
Min Subsequent Investment: $1,000

太高貴了.......



為什麼要開海外券商交易戶
http://greenhornfinancefootnote.blogspot.com/2007/05/blog-post_936.html

Vanguard以外的選擇---Fidelity Spartan Series
http://greenhornfinancefootnote.blogspot.com/2008/02/vanguard-fidelity-spartan-series.html

Vanguard以外的選擇續—Schwab的指數型基金
http://greenhornfinancefootnote.blogspot.com/2009/08/vanguardschwab.html

什麼是美元指數?(What is US Dollar Index?)
http://greenhornfinancefootnote.blogspot.com/2009/09/what-is-us-dollar-index.html

2009海外券商投資報稅心得(How to File for Tax Refund with Form 1040NR)
http://greenhornfinancefootnote.blogspot.com/2009/06/2009how-to-file-for-tax-refund-with.html

2009年10月5日 星期一

Pattern Day Trader

[wiki] Pattern day trader
http://en.wikipedia.org/wiki/Pattern_day_trader

... margin customer who buys and sells a particular security in the same trading day (day trades), and does this four or more times in any five consecutive business day period. .... must maintain an equity balance of at least $25,000 in a margin account ...


Day trade, Swing trade and Trend trade
http://quet.blog.hexun.com/26319167_d.html
Day trader基本都是机构和职业投资/投机者,每天交易几十甚至几百次。需要紧盯盘面,快进快出。这是一项压力很大的工作,普通的业余投资者基本没可能做day trade。

Day trade 也可以用margin。很多券商给pattern day trader的margin比例比一般人更高,可以到25%,即放大4倍的资金。由于一般day trade在收盘前都要结清,而margin是隔夜才算利息,所以day trade实际上可以免费用margin。


美股即日交易的限制 Pattern Day Trader 惯性当日冲销交易者
http://www.guduo.net/2009/01/000158.html
为了进行即日交易,账户必须有至少25,000美元的净清算价值,这里的净清算价值包括现金、股票、期权和期货盈亏。


美股融資買進規則(Margin Transactions and Margin Requirements)
http://greenhornfinancefootnote.blogspot.com/2008/04/margin-transactions-and-margin.html
....美股融資買進... Margin的定義是,The part of the total value of the securities that the investor pays with cash. ... 一筆股票中,投資人以自有現金買進的部份



http://tw.dictionary.yahoo.com/search?ei=UTF-8&p=margin
margin
....
7. 保證金,定金

母乳白天晚上成分不一樣

Breast milk should be drunk at the same time of day that it is expressed
http://www.physorg.com/news173611270.html

http://seb-x.blogspot.com/2009/10/blog-post_4970.html

各位媽媽們,妳是否發現有時寶寶晚上不睡覺、偏偏白天才要睡﹖或是睡眠時間不太穩定,時醒時睡﹖科學家發現,這也許和母乳的餵食習慣有關!

科學家發現,白天和晚上母奶的成份會不同。

早晨的母奶像Cappuccino(卡布奇諾);晚上的母奶像Horlicks(好立克)。


早晨喝母奶的嬰兒有精神,因為母奶含天然無害的興奮刺激物。

晚上喝母奶的嬰兒助睡眠,因為母奶含有鎮靜作用的化合物質。

所以晚上若給寶寶喝白天預先擠好的母乳,則寶寶可能會睡不著。

研究人員發現,母奶裡有主要3種不同的《核甘酸》(nucleotide)成份:

1.《adenosine》(腺甘酸)
2.《guanosine》 (鳥嘌呤核酸)
3.《uridine》( 尿嘧啶核酸)

這些成分的組成,能刺激或放鬆中樞神經,達到提振寶寶精神或讓寶寶想睡的作用。

研究人員從30名女性所提供的母奶樣本中,觀察母奶24小時的成份變化。

觀察結果顯示,從晚上8點到隔天早上8點所取的母奶樣品,其核甘酸的濃度最高,而在白天,核甘酸的濃度則降低。

西班牙埃斯特雷馬度拉大學(University of Extremadura)的研究人員Cristina L. Sánchez表示:

「這有助於我們了解,母奶能幫助寶寶入眠。」

「你不會在晚間時間給任何人喝咖啡,這和寶寶喝母奶的道理一樣。白天的母乳含有特殊成份能刺激寶寶的活動能力;晚上則分泌不同成份來幫助寶寶入眠。」

為了提供寶寶最好的營養,除了餵母奶的時間固定之外,切勿先將母奶擠起來放,然後放到其他時間才餵寶寶。

也就是說,白天擠的母奶最好在白天給寶寶喝,夜晚擠的母奶則應在夜晚喝完。否則,寶寶白天喝到昨夜的母奶,可能會使寶寶昏昏欲睡;反之,晚上喝到白天取的母乳,則寶寶可能會睡不著。

醫生表示,母奶是寶寶前六個月的最佳食物,因為不僅預防寶寶生病、拉肚子及嬰兒猝死等症狀,同時還能避免氣喘、過敏、肥胖等疾病,而且還能促進智力發展。

餵食寶寶母奶的媽媽,每天約可消耗500到700卡熱量,對產後恢復身材很有幫助,同時可預防貧血、高血壓、產後憂鬱、糖尿病、高膽固醇、心臟病及降低停經前罹患乳癌、卵巢癌的機率及降低65歲以上骨質疏鬆的發生機率。

該研究刊載於《營養神經科學》(Nutritional Neuroscience)期刊中。

-

簡單來說,就是晚上擠的母奶,核甘酸濃度較高,會使寶寶想睡;白天擠的母奶,核甘酸的濃度很低,使寶寶不想睡。

所以,親愛的媽媽們,如果寶寶有睡眠問題的話,不妨試著改變餵食母奶的習慣。

不過以上所說,是針對習慣先將母乳取出存放的媽媽,若直接讓寶寶吸奶餵食,我想應該不會有這種影響。


http://tw.news.yahoo.com/article/url/d/a/091005/128/1sbun.html
母乳白天晚上成分不一樣
台灣新生報 更新日期:"2009/10/05 00:07" 【記者蘇湘雲/綜合外電報導】

白天、晚上,母乳成分不一樣,所以寶寶晚上喝母乳可幫助睡眠。

西班牙埃斯特雷馬度拉大學(Univer-sityofExtremadura)研究發現,母奶成分會隨小孩的營養需求作調整,因此,白天、晚上不同時段的母奶成分不盡相同。

研究人員分析母乳主要三種成分,有的成分可以刺激中樞神經系統,讓寶寶活力十足,有些成分則會幫助中樞神經系統放鬆,為寶寶助眠,研究人員以24小時時間觀測母乳成分變化。

結果發現,晚上八點到隔日早上八點所取樣的母乳樣本含有高濃縮物質,母乳成分出現明顯改變。研究人員克里斯提娜‧珊雀斯(CristinaL.Sanchez,)表示,「這項發現讓我們了解到,母乳可以幫助寶寶進入夢鄉。」

克里斯提娜‧珊雀斯補充,「你不會在晚上的時候還讓人喝下咖啡,讓寶寶喝母乳也是一樣的道理。白天含特殊成分的母乳會刺激嬰兒的活動能力,而晚上的母乳成分則會幫助寶寶休養生息。」

研究人員解釋,母親如果在晚上取母乳儲存,白天時將這母乳餵給寶寶吃,寶寶可能在白天就顯得昏昏欲睡。反之,寶寶晚上喝到白天製造的母乳,則會變得精力充沛。為了幫寶寶提供適當養分,晚上取的母乳應該讓寶寶在晚上飲用,白天所取的母乳就應該讓寶寶在白天喝。這項研究發表於最新一期的「營養神經科學期刊」(NutritionalNeuroscience)。總共有30位女性提供母乳樣本。

2009年10月4日 星期日

在Debian下安裝.rpm

http://blog.ligj.eol.cn/656
1.用alien轉格式(rpm <---> deb)

apt-get install alien
alien -i xxx.rpm 直接安装
alien -d xxx.rpm 生成Debian包


2. 安裝RPM系統
apt-get install rpm
mkdir /var/lib/rpm
rpm --initdb
rpm -ivh xxx.rpm


3.自运行:在RedHat里有chkconfig,ntsysv 工具,在Debian下,可以用rcconf
apt-get install rcconf
rcconf


http://blog.roodo.com/schonrosemary/archives/4362693.html
在 Debian 使用 alien 處理 RPM 套件

alien 可處理 .deb、.rpm、.slp、.tgz 等檔案格式, 進行轉檔或安裝.
於 Debian 安裝非 Debian 套件時, 可使用 alien 進行安裝.
安裝 alien 套件: apt-get install alien

* 在 Debian 安裝 RPM 套件: alien -i quota-3.12-7.i386.rpm
* 製作成 deb 的套件格式: alien -d quota-3.12-7.i386.rpm
* 製作成 rpm 的套件格式: alien -r quota_3.12-6_i386.deb

dpkg 軟體維護工具

http://blog.longwin.com.tw/archives/000359.html

dpkg的用法:
-S 顯示特定檔案所屬的套件名稱 dpkg -S /etc/samba/smb.conf
-i 安裝套件 dpkg -i
-P 完全移除某一個套件 dpkg -p samba
-l 顯示已經安裝的套件 dpkg -l
-L 顯示某一個已安裝的套件的檔案名稱及安裝路徑 dpkg -L samba
-p 顯示已安裝套件的詳細訊息 dpkg -p samba
-s 查詢系統是否安裝了某一個套件 dpkg -s samba


http://tavi.debian.org.tw/index.php?page=dpkg

顯示目前裝在系統中的所有 packages(rpm 用 rpm -qa)
dpkg --list


想知道總共有那些檔案安裝在系統中(rpm 為 rpm -ql samba)
dpkg --listfiles samba


或是在系統中有某個執行檔, 想知道屬於那個 package, 這樣在別台機器中才有辦法安裝
$ which smbd
/usr/sbin/smbd
$ dpkg --search /usr/sbin/smbd
samba: /usr/sbin/smbd


最前面的 samba 即為 package 名稱, 先用 which 找到 smbd 這個執行檔放在那個路徑, 再用 dpkg --search 來找到 package 名稱(redhat 中則用 rpm -qf /usr/sbin/smbd)

看 package 的說明(redhat 為 rpm -qi samba)
dpkg --status package_name

dpkg -s package_name


假設我們由網路上自行抓了一個 .deb 的檔回來, 這時就要用 dpkg 來安裝(redhat 為 rpm -i xxx.rpm)
dpkg --install package_name.deb

dpkg -i package_name.deb


移除某個 package(rpm 為 rpm -e package_name)
dpkg --remove package_name

dpkg -r package_name

徹底移除 package
dpkg --purge package_name

dpkg -P package_name


在還未安裝到系統中前, 查看會安裝那些檔案在系統中(rpm 用 rpm -qlp xxx.rpm)
dpkg --contents package_name.deb

dpkg -c package_name.deb


在還未安裝到系統中前, 查看 deb 檔es的資訊(rpm 用 rpm -qip xxx.rpm)
dpkg --info xxx.deb


顯示目前各個軟體套件的安裝狀態(未安裝、正確安裝、被移除、完整移除、安裝失敗等等)
dpkg --get-selections


如何在升級套件時, 讓某些套件不要更新:
echo "packagename hold" | dpkg --set-selections

2009年10月1日 星期四

USB Human Interface Device (HID)

The Linux USB sub-system
http://www.linux-usb.org/USB-guide/book1.html
USB Human Interface Device (HID) Configuration
http://www.linux-usb.org/USB-guide/x194.html
看起來像是2.4的,不過還是提供了不少有用的資訊

modprobe hid.ko;modprobe usbhid;
mount -t usbfs none /proc/bus/usb;mkdir /dev/input -p;

//mouse
modprobe mousedev.ko;
mknod /dev/input/mice c 13 63;
//keyboard
modprobe evdev.ko;modprobe xtkbd.ko;
a=0;while [ $a -le 10 ] ; do mknod /dev/input/event$a c 13 $(($a+64));a=$(($a+1));done;
modprobe atkbd.ko;

//to test mouse...
hexdump /dev/input/mice;
//to test keyboard, usually at event0...
a=0;while ! hexdump /dev/input/event${a} ; do a=$(($a+1));if [ $a -gt 10 ] ; then break; fi;done;
a=0;while ! hexdump /dev/input/event${a} ; do a=$(($a+1));if [ $a -gt 10 ] ; then a=0; fi;done;



The Linux keyboard and console HOWTO
http://tldp.org/HOWTO/Keyboard-and-Console-HOWTO.html
Keyboard-and-Console-HOWTO.pdf
http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/pdf/Keyboard-and-Console-HOWTO.pdf

the standalone Boot Protocol (HIDBP)
full featured HID driver

USB Human Interface Device (HID)


CONFIG_HID_SUPPORT
Defined at drivers/hid/Kconfig:4

PrintWhatYouLike 讓我們可以去除網頁裡不必要的部份 列印真正有用的內容

[Bookmarklet] PrintWhatYouLike 讓我們可以去除網頁裡不必要的部份 列印真正有用的內容
http://blog.joaoko.net/archives/2096

到下面這個網頁:
http://www.printwhatyoulike.com/bookmarklet
將「PrintWhatYouLike」這個連結拖放到書籤列