2017年9月27日 星期三

latex 語法

簡單說  文章出現fl或fi之類的字
會變成同一個字
https://tex.stackexchange.com/questions/33476/why-cant-fi-be-separated-when-being-copied-from-a-compiled-pdf

可以參考這個 XD  (懶得寫太多字)

後來用下面這兩行就解決
\usepackage{microtype}
\DisableLigatures{encoding=*,family=*}


------
懶得寫  繼續改論文 QQQQQQQQ

2017年9月14日 星期四

設定群組信箱

久違的更新 XD

之前實驗室的mail server有設定群組信箱 (/etc/aliases)
然後就可以把信自動轉寄到裡面的人

只是gmail好像有調整一些垃圾信的判斷方式(!?)
後來發現群組信箱的轉寄都很常卡住 QQ
使用非gmail的人可以即時收到信 XD (ex: hotmail)

後來翻翻log, 有看到這串網址
大量寄件者指南
https://support.google.com/mail/answer/81126?hl=zh-Hant

看到這一個項目
* 在郵件中加入 [Precedence: bulk] 標頭欄位,指明其為大量郵件。

然後就研究一下mail server的設定
在這邊找到討論串
https://unix.stackexchange.com/questions/44123/add-header-to-outgoing-email-with-postfix

1. 修改 /etc/postfix/main.cf, 把 header_checks 設定成這個路徑 (檔名可自訂)
header_checks = regexp:/etc/postfix/my_custom_header

2. 然後再建立 /etc/postfix/my_custom_header 這個檔案, 再加上這句
/^Content-Transfer-Encoding:/i PREPEND Precedence: bulk 

3. 重新啟動mail server: /etc/init.d/postfix restart


目前看起來好像群組信箱復活了(!?)
再觀察一段時間吧  科科

2016年12月7日 星期三

用命令列的方式設定WIFI

用命令列的方式設定WIFI
https://www.raspberrypi.com.tw/2152/setting-up-wifi-with-the-command-line/

----

其實原本都好好的(!?)
很久沒打開, 剛剛打開時突然發現無法連到wifi   囧!!!

網路重新啟動N次也是一樣, 後來就到處看設定檔

原本這個檔案有設定多組ssid
/etc/wpa_supplicant/wpa_supplicant.conf

後來只留一組就突然連線成功了 ˊ_>ˋ


所以是建議只留一組就好!? 平常用#註解起來, 需要時再打開? XD

2016年11月15日 星期二

asus ux305ua 滑鼠手勢突然失效

前一陣子不知道怎麼搞的, 滑鼠手勢突然GG orz....

後來重新安裝程式也不行, 想移除也怪怪的, 會顯示 找不到 pre_all.bat

剛剛四處亂按, 似乎成功了 XDDD

------------

去新增移除程式, 把 ATK Packapge 與 ASUS Smart Gesture 解除安裝

只是我之前解除安裝 ASUS Smart Gesture, 都會出現錯誤訊息
可是在新增移除程式的畫面裡, 在這個程式上按右鍵, 選"變更"

他就會重新安裝ASUS Smart Gesture了, 然後馬上移除程式, 就可以解除安裝了 XD

接著安裝這兩個驅動
ATKPackage_Win10_64_VER100039
SmartGesture_WIN10_64_VER405

然後再重開機, 滑鼠手勢終於回來了 QAQ

-------------

只是為啥會突然失效啊? 真怪 -.-

2016年4月1日 星期五

latex error

最近用win10跑latex, 同樣的東西在XP可以編, 可是win10就不行 QQ
一直出現這個錯誤訊息:
has a comma at the end for entry while executing

後來在這邊看到相同的問題
http://tex.stackexchange.com/questions/156377/when-running-bibtex-with-a-statement-that-has-a-comma-at-the-end-this-is-obscur

照他的方式, 把bib裡面的 author 改成雙括號 {{ }}

像這樣:
author = {{XXXX XXXXX}},

2016年3月8日 星期二

壓縮虛擬機的硬碟

環境: Virtualbox(win7) + Fedora虛擬機

作法參考
http://superuser.com/questions/529149/how-to-compact-virtualboxs-vdi-file-size

在linux虛擬機裡面, 產生一個很大的檔案把全部空間占滿
sudo dd if=/dev/zero of=/bigemptyfile bs=4096k

然後再把它刪掉
sudo rm -f /bigemptyfile

之後再去virtualbox安裝程式資料夾裡, 使用VBoxManage來壓縮磁碟機
(直接跑這個似乎沒啥效果, 要先做前面的步驟 -.-)
VBoxManage.exe modifyhd c:\path\to\thedisk.vdi --compact



2016年2月19日 星期五

CSThreshold, RXThreshold in ns2

複製下來當備份 XD
原文沒有斷行, 好難閱讀 QQ


from http://mailman.isi.edu/pipermail/ns-users/2004-June/043128.html

 
Well, it is actually the other way. RXthreshold and CSthreshold are inherent 
properties of the card (that depends on modulation/demodulation, among other 
things). So for usual commercial cards, CSThreshold is considered to be about
-90dBm (exact numbers are usually not released by the manufacturers). 
RXThreshold depends on the packet size. In my experience, -65 dBm is sufficient 
to decode very large packets (about 2000 byte) with very low probability of error; 
for very small packets, even -80 dBm may be enough. Also remember that these 
are not parameters of the card; meaning that you cannot control them. 
It just so happens that the card can reliably detect carrier only when 
the power is more than -90dBm; same with the packet.

threshold.cc actually calculates what should the RXThreshold be if you "want" 
the receive range to be 250m (or whatever is the distance). The same program 
will tell you what the CSThreshold should be if you want the carrier sense 
range to be 550m (which should be around -90 dBm). So it is simply provides 
a way to "cheat" in the simulation. In other words, if you want to simulate 
a situation where the RX-range is 400m and CSrange is 450m, using threshold.cc 
you can set the RXthresh_ and CSThresh_ appropriately, but that does not 
mean that there exists a physical card which will have those values of RX 
and CS thresholds.

2016年2月9日 星期二

用script 執行ns2 & 載入 lib

好難下標題&解說.....

就當作是給自己看的!? XDDD

好處就是可以在電腦上安裝多個不同版本的ns2


#!/bin/bash
export PATH=/bin:/sbin:/usr/bin:/usr/sbin

NS2_FOLDER=/ns2/ns-allinone-2.34.ubuntu

export PATH=$PATH:$NS2_FOLDER/bin:$NS2_FOLDER/tcl8.4.18/unix:$NS2_FOLDER/tk8.4.18/unix

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NS2_FOLDER/otcl-1.13:$NS2_FOLDER/lib

export TCL_LIBRARY=$TCL_LIBRARY:$NS2_FOLDER/tcl8.4.18/library

/ns2/ns-allinone-2.34.ubuntu/ns-2.34/ns $@



2016年2月8日 星期一

ns2 的 GOD

好像該開始學ns3了... (離題 XD)


在tcl裡, 會有這個參數
set god_ [create-god $val(nn)]

這邊的god全名是 General Operations Director

這個網頁有GOD的介紹
http://www.mathcs.emory.edu/~cheung/Courses/558/Syllabus/18-WirelessSim/intro.html

以下是那個網頁提到的內容 (貼過來順便當備份)

"God (General Operations Director) is the object that is used to store global information about the state of the environment, network or nodes that an omniscent observer would have, but that should not be made known to any participant in the simulation."
  • Currently, the God object stores:
    • the total number of mobilenodes
    • a table of shortest number of hops required to reach from one node to another.
  • The next hop information is normally loaded into god object from movement pattern files, before simulation begins.That is because calculating this on the fly during simulation runs can be quite time consuming.

2016年2月3日 星期三

ath9k_htc 的意思 XD

這個htc, 不是那個htc喔 XDDD

HTC - host target communications

Responsible for:
    Communication between host and target
    Registering services. For example WMI, RX, TX, Beacon...
    Routing messages to services
    credits system.


https://github.com/qca/open-ath9k-htc-firmware/wiki/HTC