星期五, 3月 16, 2018
auto execution self script
auto execution self script
==========================================
#!/bin/sh
tail -n +$((`grep -an "^### end of script" $0 | head -1 | cut -d: -f1`+1)) $0 | cat -
exit 0
### end of script ###
aaaa
bbb
星期五, 3月 09, 2018
星期二, 3月 06, 2018
CLUSTERING ANALYSIS
CLUSTERING ANALYSIS
- Hierarchical
- Distance
- 歐式距離 (Euclidean distance):

- 曼哈頓距離 (Manhanttan distance):

- 坎培拉距離 (Canberra distance):

- Classfied
- 單一連結法 (Single Linkage):

- 完全連結法 (Complete Linkage):

- 平均法 (Average Linkage):

- 中心法 (Centroid Method):

- Nonhierarchical.
- K-means
- Self-organizing map
Reference:
- 小羊的研究筆記
- https://kknews.cc/tech/rrkly3x.html
- https://read01.com/zh-tw/LNRzxM.html#.Wp56Q-huaUk
- Distance
- 歐式距離 (Euclidean distance):
- 曼哈頓距離 (Manhanttan distance):
- 坎培拉距離 (Canberra distance):
- Classfied
- 單一連結法 (Single Linkage):
- 完全連結法 (Complete Linkage):
- 平均法 (Average Linkage):
- 中心法 (Centroid Method):
- K-means
- Self-organizing map
星期一, 2月 12, 2018
[Live-devel] RTSPServer port reuse
http://lists.live555.com/pipermail/live-devel/2011-October/013966.html
> I am using Live555 to run an RTSP server on an embedded system, and I would like to restart the server programmatically. However, the current RTSPServer implementation does not allow the same port to be re-used if the socket is in a TIME_WAIT state. > > I had a look around and saw a previous thread regarding this issue (http://lists.live555.com/pipermail/live-devel/2011-July/013664.html). Actually, this thread starts at http://lists.live555.com/pipermail/live-devel/2011-July/013648.html I suggest reading this entire thread to better understand the issues involved. > For debugging it is not too difficult to reboot my system or wait for the TIME_WAIT state to end, but for restarting programmatically it would be nice if there were an option to tell the RTSPServer class that I want it to reuse the same port even if there is a socket on that port in the TIME_WAIT state. > > I can obviously change the code, and have done so, but thought I would throw my vote in for allowing this behavior by design. If you would like a patch for the changes I made (basically adding a default parameter ‘Boolean allowPortReuse = false’ to the relevant RTSPServer functions), I would be happy to send one. I don't want to add a runtime parameter for this - in part because there are already three default parameters to "RTSPClient::createNew()", and I'd rather not add another one. (Also, I don't want to make it too easy for people to disable the 'port reuse' check unless (like you) they know what they doing - otherwise we might actually end up with people trying to have more than one server running on the same port at the same time.) What I can do, however, is add a #ifndef/#endif around the "NoReuse dummy;" statement on line 156 of "RTSPServer.cpp" - i.e., making it: #ifndef ALLOW_RTSP_SERVER_PORT_REUSE NoReuse dummy; #endif Then, you can add -D ALLOW_RTSP_SERVER_PORT_REUSE=1 to the "COMPILE_OPTS =" line of your "config." file. I hope that will work for you...
標籤:
live
星期五, 2月 09, 2018
play rtsp
<object type='application/x-vlc-plugin' pluginspage="http://www.videolan.org/" id='vlc' events='false' width="1600" height="800">
<param name='mrl' value='rtsp://192.168.0.99:554/0.live' />
<param name='volume' value='50' />
<param name='autoplay' value='true' />
<param name='loop' value='false' />
<param name='fullscreen' value='false' />
<param name='controls' value='false' />
</object>
<param name='mrl' value='rtsp://192.168.0.99:554/0.live' />
<param name='volume' value='50' />
<param name='autoplay' value='true' />
<param name='loop' value='false' />
<param name='fullscreen' value='false' />
<param name='controls' value='false' />
</object>
星期二, 1月 23, 2018
pointer basic
簡單版, 把 *t 改成 **t 會複雜一些
#include <stdio.h>
struct AAA{
int a;
int b;
int c;
char d;
};
int main(){
struct AAA *t;
int buf[1024];
int i,j;
memset( buf, 0, 1024);
for(i =0; i< 1024; i++ ) buf[i]= i;
printf("t size=%d pt=%d\n", sizeof( struct AAA*), sizeof( struct AAA) );
printf("sizeof t=%d\n", sizeof(t));
printf("buf=%p\n", buf);
printf("t=%p\n", &t);
printf("t0=%p \n", &t[0]);
printf("t1=%p\n", &t[1]);
t = &buf;
//t[0] = &t+ sizeof( struct AAA*);
printf("\n\n t=%p->%p buf=%p\n", &t, t, &buf);
printf("t+=%p\n", (void*)(t+3) );
printf("t0=%p t[0]=%d\n", &t[0], t[0].a);
printf("t1=%p t[1]=%d\n", &t[1], t[1].b);
printf("t2=%p t[2]=%d\n", &t[2], t[2].a);
}
~
#include <stdio.h>
struct AAA{
int a;
int b;
int c;
char d;
};
int main(){
struct AAA *t;
int buf[1024];
int i,j;
memset( buf, 0, 1024);
for(i =0; i< 1024; i++ ) buf[i]= i;
printf("t size=%d pt=%d\n", sizeof( struct AAA*), sizeof( struct AAA) );
printf("sizeof t=%d\n", sizeof(t));
printf("buf=%p\n", buf);
printf("t=%p\n", &t);
printf("t0=%p \n", &t[0]);
printf("t1=%p\n", &t[1]);
t = &buf;
//t[0] = &t+ sizeof( struct AAA*);
printf("\n\n t=%p->%p buf=%p\n", &t, t, &buf);
printf("t+=%p\n", (void*)(t+3) );
printf("t0=%p t[0]=%d\n", &t[0], t[0].a);
printf("t1=%p t[1]=%d\n", &t[1], t[1].b);
printf("t2=%p t[2]=%d\n", &t[2], t[2].a);
}
~
星期二, 12月 19, 2017
EAA 必需胺基酸
紅色 EAA
黑色 Non-essential amino acid
人體無法合成的九種(幼小動物十種)胺基酸包括:
1.苯丙胺酸 (Phenylalanine)
2.纈胺酸 (Valine)
3.蘇胺酸 (Threonine)
4.色胺酸 (Tryptophan)
5.異亮胺酸 (Isoleucine)
6.亮胺酸 (Leucine)
7.甲硫胺酸 (Methionine)
8.離胺酸 (Lysine)
9.組胺酸 (Histidine)
10.精胺酸(嬰兒) (Arginine)
專注度
- Tyrosine 酪胺酸 UAC和UAU
- Phenylalanine 苯丙氨酸
- 苯丙胺酸是大腦和神經細胞之間往來的化學物質,是腦部及神經細胞製造神輕傳導物新腎上腺素(norepinephrine)的原料,苯丙氨酸在體內會轉變為新副腎素(norepinephrine)和多巴胺(dopamine),兩者都屬於刺激的傳導體,因此可使人心情飛揚,使精神上保持警覺,能提高人體的靈敏度與活力。用來治療抑鬱症,改善記憶、學習、及對抗憂鬱、有助帕金森氏症的治療,能抑制食欲、防治肥胖症。也可控制疼痛,尤其是關節炎痛非常有效。但體內若缺乏維生素C,苯丙氨酸會無法新陳代謝。但孕婦、糖尿病、高血壓、抑鬱症患者慎用。
- Caffeine 咖啡因
- 茶氨酸
- Taurine 牛磺酸
- Beta-Alanine 丙胺酸
- Histidine 組胺酸 甲基組胺酸(L-1-Methylhistidine):
- 組胺酸對成人為非必需氨基酸,但對嬰幼兒來說卻是必需氨基酸,缺乏時易患濕疹,對成長尤其重要。組胺酸也是尿毒症患者的必需氨基酸。是人體血紅素的主要成份之一,對嬰兒和兒童生長、組織修護、潰瘍、胃酸過多、消化及胃液等均有重要作用。可治療過敏、風濕性關節炎、貧血,及製造紅細胞、白細胞,都需要此胺基酸,缺乏時會造成聽力減退。甲基組胺酸(L-1-Methylhistidine)能輔助治療免疫相關疾病,如過敏、風濕性關節炎等,也有助於胃酸過多,胃潰瘍病患者改善病情
- L-Arginine 精胺酸
- Citrulline 瓜胺酸
- Threonine 蘇氨酸, 羥丁胺酸
- 酥胺酸是協助蛋白質為人體吸收利用不可缺少的氨基酸,也是人體膠原蛋白和牙齒琺瑯質的重要成分。幫忙維持體內蛋白質平衡,可協助控制癲癇突然發作。當它與天門冬氨酸及甲硫氨酸結合時,能協助肝功能。心臟、中樞神經、骨骼肌均有此胺基酸。酥胺酸還可防止肝臟脂肪堆積,促進胃腸道功能更平順。缺乏蘇氨酸容易出現肝脂肪病變
- Methionine 甲硫氨酸 (蛋氨酸):
- 有助於促進消化系統功能,以解除有害物質的毒性,幫助衰竭的肌肉恢復功能,及能防止頭髮、皮膚及指甲之病變,對治療風濕性熱及懷孕引起的毒血症很重要。能輔助脂肪分解,預防肝及動脈的脂肪堆積,可降低膽固醇濃度、降低肝脂肪,而且對化學過敏與骨質疏鬆症也有益處。身體會利用甲硫胺酸來衍生大腦的養分(膽鹼),在飲食中應補充膽鹼或卵磷脂(此物富含膽鹼),使體內甲硫氨酸不至於被耗盡,可防止某些腫瘤形成。
修復肌肉
- BCAA
- Glutamine 谷氨先酸
- Lysine 離胺酸 (賴氨酸) Lys, K C6H14N2O2
- 可幫助鈣質吸收,促進膠原蛋白形成,是孩童正常生長與骨骼發育所需的,也能幫助製造肌肉蛋白質,對剛開刀過及運動傷害的復原者尤其重要。能抵抗感冒瘡及皰疹病毒,還能協助抗體、激素、酶的製造,減低血清脂肪。輕度缺乏會令兒童成長遲緩。嚴重缺乏會產生頭髮褪色、水腫、嗜睡、肝臟受損、肌肉和脂肪減少、皮膚受損、體力衰弱、注意力不集中、暴躁易怒、眼睛充滿血絲、脫髮、貧血、生長受阻及生殖方面的毛病。如果經常感到疲倦、注意力不集中、眼睛容易紅腫充血、噁心頭暈、容易掉頭髮和貧血,可能是缺乏賴氨酸的緣故。
纈胺酸(結氨酸 Valine):
- 缺乏時會導致身體的氫不平衡。與亮氨酸及異亮氨酸一起使用,可促進肌肉新陳代謝、改善肌肉協調功能,促進腦力,安定情緒。晚期肝功能病人因肝功能受損,容易形成高胰島素血症,而使血液中支鏈氨基酸減少。因此,臨床上常用纈氨酸等支鏈氨基酸的注射液來治療肝功能衰竭。纈胺酸也可作為加快創傷癒合的治療劑。
色胺酸(色氨酸 Tryptophan):
- 天然的精神鬆弛劑,能改善失眠,幫助穩定情緒,減輕焦慮及憂慮,減輕壓力,改善頭痛,加強免疫功能,減少心臟血管疾病機會,協助控制體重,促進製造維生素B6所必需的生長激素分泌,幫助控制孩童的過度活躍。也是合成血清素(serotonin)的原料。色氨酸與維生素B6、菸鹼酸和鎂一起在大腦作用,合成一種叫做5-羥色氨的神經傳導物質,有幫助睡眠的效果。在睡前一個半小時一起服用,效果最佳。可以搭配果汁或開水服用,切忌與牛奶或其他蛋白質一起服用。
白胺酸(亮氨酸 Leucine):
- 白胺酸是人體許多重要生化成份的原料,包括影響能量代謝的物質,以及與腦部和警覺性有關的神經傳導物質,能降低血糖濃度。白胺酸可用於診斷和治療兒童的突發性高血糖症,也可作為治療頭暈和營養滋補劑。缺乏白胺酸可能導致大腦發育不全。
異白胺酸(異亮氨酸 Isoleucine):
- 異白氨酸是形成血紅蛋白必需的,能調節血糖與能量的含量。缺乏異白氨酸可導致類似低血糖的症狀。它必須與異白胺酸、纈氨酸均衡地服用,能促進骨頭、皮膚、肌肉組織的修復。也是開刀後的復原者應該攝取的補充品
Reference:
- https://smallcollation.blogspot.tw/2013/03/essential-amino-acids.html#gsc.tab=0
星期三, 11月 22, 2017
Daily Suppliment
1.ON ISOLATE
淡淡的, 很容易溶解


2.ON Gold standard CASEIN
稍濃, 不會很甜, 要用搖的


3.ON Pro BCAA



4.BSN SYNTHA-6
不會很甜, 味道像花生奶昔, 超容易溶解, 比ON isolate 快



http://g9677606.blogspot.tw/2017/12/eaa.html
星期六, 10月 14, 2017
Course
- Incline Bench Press 4 x (6 - 8) ( 2 mins reset )
- Flat Bench Dumbbell Press 4 x (6 - 8) ( 2 mins reset )
- Heavy Dumbbell Flys ( Incline Dumbbell Flys ) 4 x 10 ( 1 min reset )
- Cable Flys 4x15 (1.5 mins reset)
星期三, 10月 11, 2017
NSCA CPT
ACE-CPT 自學私人教練證照心得
[閒聊] 四大證照進修考試
ACSM
resources for the personal trainer 4th
NSCA
四大國際證照(ACSM、ACE、NASM、NSCA)
ICE & NCCA
ICE組織成立於1977年全稱為(Institute for Credentialing Excellence),中文名:卓越認證協會。ICE的組織機構資質認證業務主要通過其分支結構NCCA(National Commission for Certifiying Agencies國家認證機構委員會)執行。通過NCCA資質鑒定的職業範圍很廣泛,包括護士,汽車相關職業,呼吸治療師,老師,急救人員,吊車司機等。由於NCCA管轄範圍下的證照,一定要到指定中心應考,在第三方機構監督下,得以維持考試公信力。
ACSM的內容偏醫學較多,比較適合醫療特殊需求者,或者特殊族群的訓練和監控;NSCA的內容比較適合需要提升運動表現的人群,或者是專業運動員的教練;而ACE和NASM更適用於普通民眾
唯一的區別在於ACE是非營利性機構,它會將更多的經費用於健康產業科學研究,比如:每一位通過ACE考試的教練,每個月都會收到從美國直郵過來的科學研究雜誌,ACE會針對時下最流行的議題進行科學論證,用科學資料證明真偽,説明大家辨別偽科學的存在。
https://youtu.be/0wDsH8b3vZ8?t=461
7:40
桿子 3000 (erico 5萬), 槓片一組2萬(14萬)
Reference:
[閒聊] 四大證照進修考試
私教四大證照解析
ACSM
resources for the personal trainer 4th
NSCA
20171021美國專業運動教練證照精研班_台北:NSCA-CSCS
四大國際證照(ACSM、ACE、NASM、NSCA)
ICE & NCCA
ICE組織成立於1977年全稱為(Institute for Credentialing Excellence),中文名:卓越認證協會。ICE的組織機構資質認證業務主要通過其分支結構NCCA(National Commission for Certifiying Agencies國家認證機構委員會)執行。通過NCCA資質鑒定的職業範圍很廣泛,包括護士,汽車相關職業,呼吸治療師,老師,急救人員,吊車司機等。由於NCCA管轄範圍下的證照,一定要到指定中心應考,在第三方機構監督下,得以維持考試公信力。
- 美國運動委員會ACE(American Council on Exercise)
- 美國運動醫學會ACSM (American College of Sports Medicine)
- NASM 美國國家運動醫學會(National Academy of Sports Medicine)
- NSCA 美國肌力體能協會(National Strength and Conditioning Association)
ACSM的內容偏醫學較多,比較適合醫療特殊需求者,或者特殊族群的訓練和監控;NSCA的內容比較適合需要提升運動表現的人群,或者是專業運動員的教練;而ACE和NASM更適用於普通民眾
唯一的區別在於ACE是非營利性機構,它會將更多的經費用於健康產業科學研究,比如:每一位通過ACE考試的教練,每個月都會收到從美國直郵過來的科學研究雜誌,ACE會針對時下最流行的議題進行科學論證,用科學資料證明真偽,説明大家辨別偽科學的存在。
https://youtu.be/0wDsH8b3vZ8?t=461
7:40
桿子 3000 (erico 5萬), 槓片一組2萬(14萬)
Reference:
- https://www.fittaiwan.com/index.php?option=com_content&view=article&id=82&catid=14&Itemid=250
訂閱:
文章 (Atom)