2015年5月15日 星期五

領導的境界


李開復的FB提到:

用你想被領導的方式去領導別人,你就可能達到更高的境界!
境界一:員工因為你的職位而服從你;
境界二:員工因為你的能力而服從你;
境界三:員工因為你的培養而服從你,他們感恩於你對他們的尊重、培養和付出;
境界四:員工因為你的為人、魅力、風範、價值觀而擁戴你。

文茜的異想世界(2015-05-12):訪問黃心怡

陳文茜訪問黃心怡


父母該給孩子匱乏的經驗,而不是努力滿足孩子的需求。
孩子被養得太精緻/太敏感,以至於容易放大自己的感受,造成挫折容忍度低。
孩子闖禍時,適度放手讓他自己去解決,別太快介入,孩子可能失去體驗痛苦的機會。
父母給孩子:利他、分享和合作的經驗,否則孩子容易養成自私沒有同理心的人格特質。


2015年5月9日 星期六

2015年5月5日 星期二

Verilog Random Seed Generation

Random Seed Generation in Verilog

在Verilog中有system task $random來產生亂數,
其需要一個亂數種子才能讓每次產生的亂數不同.
以下使用時間產生亂數種子的方法.
產生的NowInSeconds帶入$random(NowInSeconds),
則每次可得不同的亂數.



From : http://www.edaboard.com/thread75097.html

integer FP;
integer fgetsResult;
integer sscanfResult;
integer NowInSeconds;
reg [8*10:1] str;

// call "date" and put out time in seconds since Jan 1, 1970 (when time began, no doubt)
// and put the results in a file called "now_in_seconds"
$system("date +%s > now_in_seconds");                                                   

// open the file for reading
FP = $fopen("now_in_seconds","r");

// get a string from the open file - "fgetsResult" should be a 1 - you can test 
// that for completeness if you'd like
fgetsResult = $fgets(str,FP);

// convert the string to an integer - "sscanfResult" should also be a 1, and
// you can test that, too, 
sscanfResult = $sscanf(str,"%d",NowInSeconds);

// close the file...
$fclose(FP);  // closes the file

// use the number as a seed...
process::self.srandom(NowInSeconds);

2015年5月4日 星期一

民國105年連續假期整理

From : http://udn.com/news/story/9/879997

行政院今日核定105年政府行政機關辦公日曆表,明年有7個連續假期,放假總日數為116日。其中,明年度春節連假自2月6日至2月14日總共9天,其餘6個連續假期,包括元旦、228和平紀念日、國慶日3天連假;清明節、端午節、中秋節是4天連假。
明年全年總放假天數116日,比今年增加1日。連續假期也比今年多了一個,也更多4天連假。根據核定的行事曆,除春節連假外,3天連假與4天連假各有3個,包括:元旦至1月3日、228和平紀念日2月27日至29日、兒童節及民族掃墓節4月2日至4月5日、端午節6月9日至6月12日、中秋節9月15日至9月18日,以及國慶日10月8日至10月10日。