這是我的工作酸甜苦辣,與大家分享,希望彼此都有收穫:) This is my working experience in my life. It is good to share with you :)
Thursday, October 27, 2016
Monday, June 27, 2016
strcat() like in AWK language
str_var = "abc"
str_var = str_var "your new string"
Please refer to
http://www.unix.com/unix-for-dummies-questions-and-answers/12459-awk-question.html
str_var = str_var "your new string"
Please refer to
http://www.unix.com/unix-for-dummies-questions-and-answers/12459-awk-question.html
Sunday, June 26, 2016
Friday, April 1, 2016
OMNeT++/OMNEST priority schedule for the event at the same time
In OMNeT++/OMNEST, sometimes two events may arrive at the same time. However, the OMNeT++/OMNEST can only handle both events in sequence based on the arrival time of each event. If we hope to always handle a event before the other event, we can use the following function to handle this problem.
where p is the priority, the smaller number of p has higher priority.
refer to.
https://omnetpp.org/doc/omnetpp/api/classcMessage.html#a205278b4eaf8a54a901537f6e6cfae59
Examples:
cMessage *timer1 = new cMessage("tiemr1");
cMessage *timer2 = new cMessage("tiemr2");
timer1->setSchedulingPriority(1); // lower priority
timer1->setSchedulingPriority(-1); // high priority
send(timer1, Gate);
send(timer2, Gate);
setSchedulingPriority(short p)
where p is the priority, the smaller number of p has higher priority.
refer to.
https://omnetpp.org/doc/omnetpp/api/classcMessage.html#a205278b4eaf8a54a901537f6e6cfae59
Examples:
cMessage *timer1 = new cMessage("tiemr1");
cMessage *timer2 = new cMessage("tiemr2");
timer1->setSchedulingPriority(1); // lower priority
timer1->setSchedulingPriority(-1); // high priority
send(timer1, Gate);
send(timer2, Gate);
Thursday, March 24, 2016
查詢當下linux folder中資料夾的大小
請下這個指令
du -B M . --max-depth=1 | sort -g
http://nathanmint.pixnet.net/blog/post/178733376-linux---du%E6%8C%87%E4%BB%A4-:-%E6%AA%A2%E6%9F%A5%E5%90%84%E5%80%8B%E8%B3%87%E6%96%99%E5%A4%BE%E7%9A%84%E6%AA%94%E6%A1%88%E5%A4%A7%E5%B0%8F%EF%BC%9B
du -B M . --max-depth=1 | sort -g
http://nathanmint.pixnet.net/blog/post/178733376-linux---du%E6%8C%87%E4%BB%A4-:-%E6%AA%A2%E6%9F%A5%E5%90%84%E5%80%8B%E8%B3%87%E6%96%99%E5%A4%BE%E7%9A%84%E6%AA%94%E6%A1%88%E5%A4%A7%E5%B0%8F%EF%BC%9B
Thursday, March 10, 2016
Source Insight無法讀取.cc檔
當你load檔時,發現缺少.cc的載入怎麼辦
照著這個步驟
1. 打開Options -> Document Options,
2. 在Document Type選擇C++ Source File
3. 在File Filter中加入 ;*.cc
在sync一次應該就出現拉XD
照著這個步驟
1. 打開Options -> Document Options,
2. 在Document Type選擇C++ Source File
3. 在File Filter中加入 ;*.cc
在sync一次應該就出現拉XD
Tuesday, January 26, 2016
git恢復成未下指令前的狀態
當你不小心手殘來硬的git reset --hard HEAD^後,發現砍錯了,恢復不了怎麼辦?怎麼辦?!!!
你的救星來了!!! 請參考下面操作~~~
>> git reset --hard HEAD^ (向前砍一次commit,心淌血了T^T)
>> git reset --hard HEAD^ (向前又砍了一次commit,心又再一次的淌血T^T)
>> git log --oneline
c825428 [TMAC] refactor TMAC FSM to support RTS+CTS+DATA+BA
cbca69b [TMAC] 1.add info in TRxreq and TRxsts 2. add a simple FSM in PPU Conflicts: examples/wireless/throughput/omnetpp.ini src/linklayer/ieee80211/mac/TrxReq.msg
73727ff Handle SIFS TX Request within TXOP
>> git reflog (查看之前下的歷史紀錄跟當下的hash值)
c825428 HEAD@{0}: reset: moving to HEAD^ (發現這是你第二次砍完的版本)
6da934d HEAD@{1}: reset: moving to HEAD^ (發現這是你第一次砍完的版本)
1c0dbcc HEAD@{2}: rebase finished: returning to refs/heads/DEV_BR_802.11ax
恢復到你還沒砍之前的狀態
>> git reset --hard 1c0dbcc
HEAD is now at 1c0dbcc [802.11x][RMAC][Feature] receive the Radio state at RMAC and change message between RPU and CAU
所以你可以看到又多出兩筆先前commit的資料
>> git log --oneline
1c0dbcc [802.11x][RMAC][Feature] receive the Radio state at RMAC and change message between RPU and CAU
6da934d [802.11x][RMAC][Feature] Add the replyInterval in RxReq message
c825428 [TMAC] refactor TMAC FSM to support RTS+CTS+DATA+BA
cbca69b [TMAC] 1.add info in TRxreq and TRxsts 2. add a simple FSM in PPU Conflicts: examples/wireless/throughput/omnetpp.ini src/linklayer/ieee80211/mac/TrxReq.msg
73727ff Handle SIFS TX Request within TXOP
有沒有頓時覺得用git用得很開勳阿>///<
請大家繼續開心的寫程式唄!
傻孩子下台一鞠躬! <(_ _)>
你的救星來了!!! 請參考下面操作~~~
>> git reset --hard HEAD^ (向前砍一次commit,心淌血了T^T)
>> git reset --hard HEAD^ (向前又砍了一次commit,心又再一次的淌血T^T)
>> git log --oneline
c825428 [TMAC] refactor TMAC FSM to support RTS+CTS+DATA+BA
cbca69b [TMAC] 1.add info in TRxreq and TRxsts 2. add a simple FSM in PPU Conflicts: examples/wireless/throughput/omnetpp.ini src/linklayer/ieee80211/mac/TrxReq.msg
73727ff Handle SIFS TX Request within TXOP
>> git reflog (查看之前下的歷史紀錄跟當下的hash值)
c825428 HEAD@{0}: reset: moving to HEAD^ (發現這是你第二次砍完的版本)
6da934d HEAD@{1}: reset: moving to HEAD^ (發現這是你第一次砍完的版本)
1c0dbcc HEAD@{2}: rebase finished: returning to refs/heads/DEV_BR_802.11ax
恢復到你還沒砍之前的狀態
>> git reset --hard 1c0dbcc
HEAD is now at 1c0dbcc [802.11x][RMAC][Feature] receive the Radio state at RMAC and change message between RPU and CAU
所以你可以看到又多出兩筆先前commit的資料
>> git log --oneline
1c0dbcc [802.11x][RMAC][Feature] receive the Radio state at RMAC and change message between RPU and CAU
6da934d [802.11x][RMAC][Feature] Add the replyInterval in RxReq message
c825428 [TMAC] refactor TMAC FSM to support RTS+CTS+DATA+BA
cbca69b [TMAC] 1.add info in TRxreq and TRxsts 2. add a simple FSM in PPU Conflicts: examples/wireless/throughput/omnetpp.ini src/linklayer/ieee80211/mac/TrxReq.msg
73727ff Handle SIFS TX Request within TXOP
有沒有頓時覺得用git用得很開勳阿>///<
請大家繼續開心的寫程式唄!
傻孩子下台一鞠躬! <(_ _)>
Subscribe to:
Posts (Atom)