2013年12月17日 星期二

在office 2007的power point貼上visio的圖檔

在visio畫的圖片啊, 直接按ctrl+c和ctrl+v複製到ppt時, 他好像都會自動轉成點陣圖

這樣圖片看起來就很醜 ˊ_>ˋ

以前2003明明都是會自動轉成visio物件啊啊啊啊啊啊

後來發現ppt的左上角, 有個貼上的按鈕, 下面有個小箭頭可以按

選擇"選擇性貼上", 就可以選擇用visio物件了!!



----

原來這邊編輯文章的時候, 也可以ctrl+v貼上圖片 0.0!!

真方便 XD

2013年11月26日 星期二

調整virtualbox的BSD終端機解析度

ref:
http://www.freebsd.org/doc/zh_TW/books/handbook/consoles.html

可以用下面這個指令來查詢機器支援哪些解析度
# vidcontrol -i mode

然後再用這個指令把目前的螢幕解析度改成那個樣子 (1024x768x16)
# vidcontrol MODE_279

如果合胃口的話, 可以把下面這個指令加到/etc/rc.conf, 之後開機就會自動調整為這個解析度
allscreens_flags="MODE_279"
 
 


install error msg on omnet

checking for Tcl/Tk 8.4 with CFLAGS=" -O2 -DNDEBUG=1   -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-stack-protector -DHAVE_SWAPCONTEXT  " LIBS=" -ltk8.4 -ltcl8.4"... no

configure: error: Tcl/Tk not found, needed for all GUI parts. Version 8.4.0+ and devel package required. Check config.log for more info!


[solve]
yum install bison flex perl tcl-devel tk-devel blt libxml2-devel doxygen graphviz openmpi-devel libpcap-devel


(I am using Fedora 13)

another simulator. XD

http://www.omnetpp.org/

OMNeT++ is an extensible, modular, component-based C++ simulation library and framework, primarily for building network simulators.

OMNeT++ is free for academic and non-profit use, and it is a widely used platform in the global scientific community. Commercial users must obtain a license from omnest.com.

----

let's try.....

2013年11月7日 星期四

更新開機選單

裝好ubuntu後, 再去裝Fedora 15, 會發生開機選單被蓋掉的情形.

Fedora 15沒有辦法抓到事先裝好的ubuntu, 如果這個時候再去選安裝boot loader, 之後就不知道要怎麼回去ubuntu了.

其實這個時候可以選"不要安裝boot loader", 然後重開機後會回到ubuntu.

這個時候只要在終端機打 sudo update-grub, 然後ubuntu就會自動把fedora 15的選項也加到開機選單去了.

真是人性化 XD

2013年10月24日 星期四

安裝compat-drivers的錯誤訊息


compat-3.8.h:47:32: error: redefinition of ‘kref_get_unless_zero’


後來根據這篇:
http://ubuntuforums.org/showthread.php?t=2149438

直接修改 compat-drivers-3.9-rc4-2-su/include/linux/compat-3.8.h 這個檔案

把這段註解掉
static inline int __must_check kref_get_unless_zero(struct kref *kref)
{
        return atomic_add_unless(&kref->refcount, 1, 0);
}

然後make就過了 XD

2013年10月18日 星期五

WHR-G300N-V2 半磚修復過程 XD

徵狀: 開機後, LED會閃紅燈. 完全沒有反應. (好像是刷錯韌體造成的? XD)

有參考這個網頁的作法 http://www.dd-wrt.com/wiki/index.php/WHR-G300N_V2
可是沒有試成功 ˊ_>ˋ
(他的接法應該也是網路線插在LAN port上? 之後有需要重刷再研究看看. 科~)

最後就只好開大絕, 直接用console line進去打指令寫入韌體 XD

---------------------------------------------------
PC端的IP設為192.168.11.2 / 255.255.255.0

網路線連接到AP的LAN port!! (不是WAN喔, 接錯會無法傳檔案)

準備好console line, 插在AP上面

不過要先自行把AP打開, 把針腳位置的銲錫清掉, 然後再自己焊接四個針腳上去 XD

把WAN/LAN port, 電源線朝下, LED燈在上方, 針腳的位置依序是
VCC
GND
TX
RX

不過在連接的時候, VCC不用接喔!! 只需要接後面三個就好

---------------------------------------------------
http://www.right.com.cn/forum/thread-53267-1-1.html

參考這篇, 去抓
http://115.com/file/aq7n3f3f#
firmware(whr-g300n_v2串口修复).bin

然後檔名改成firmware.bin
接著打開tftp程式, 讓他去讀取這個資料夾
---------------------------------------------------

準備就緒後, 用tera term連進去.
  Baud rate = 115200
  Data Bits = 8
  Parity = none
  Stop bits = 1
  Flow control = none

沒問題的話, 電源打開後可以在終端機看到訊息, 反正就一直按ctrl+c, 最後就可以取得控制權, 能在終端機上面打字

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

上面的東西都準備好後

(tftp和檔案, 網路線有接好, PC的IP有設定好)

然後在終端機直接打 run ut_fw

AP就會自己去下載檔案來寫入機器

ps. 我當時有試著用過別的版本firmware.bin, 可是只有中國的這個檔案可以成功寫入. XD

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

完成後, 應該就會自動重開機(有點忘了)

預設的ddwrt帳密是 root/admin

不過我當時弄完之後, console會一直出現錯誤訊息
resetting; code: 01

我也不知道是啥原因 ˊ_>ˋ


刷完這版的韌體後, 可以打開web介面, 於是我又去抓whr-g300nv2-firmware-MULTI.bin下來

http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads%2Fothers%2Feko%2FBrainSlayer-V24-preSP2%2F2013%2F07-24-2013-r22118%2Fbuffalo_whr_g300nv2/

利用他原本的web介面upgrade, 並且把設定值全部清除.

目前看起來應該是沒問題了 XD

2013年10月2日 星期三

BSD 安裝 kernel source

最近跑去旁聽一門BSD的實驗課 XDDDD

順便學一下BSD好了, 科科~

----

在用portmaster安裝virtualbox-ose時, 會出現一些錯誤訊息.

其中一段是說要安裝kernel source.

然後查了一下, 一開始是用 sysinstall  去勾選src的東西 (忘記在哪看到了XD)
可是接下來就會一直出現無法連線的錯誤訊息. 囧~~

大概像這樣吧!?
Unable to transfer the sbase distribution from 
ftp://ftp.freebsd.org.                         
Do you want to try to retrieve it again?

後來在這邊找到另一個解決方法
http://forums.freebsd.org/showthread.php?t=29172

我的是9.1-RELEASE, 所以要把相關連結換成9.1
先把檔案抓下來, 然後解壓縮複製到相應的路徑, 之後再用svn更新.

一開始好像沒有svn可以用, 可以用portmaster去安裝subversion.

wget ftp://ftp.tw.freebsd.org/pub/FreeBSD/releases/i386/9.1-RELEASE/src.txz
tar -C / -xvzf src.txz
svn checkout https://svn0.us-west.freebsd.org/base/releng/9.1 /usr/src


然後一個晚上過去, 似乎是安裝完了??
沒有看到錯誤訊息 XD
可是能不能用還是未知數(???)

2013年9月4日 星期三

重新安裝 ns2

重裝ns2時, 要先把舊的設定檔/暫存都清掉, 才可以用 ./install 重新安裝.
不然就一定要放在相同路徑才可以安裝. @@

以下是我用的清除腳本, 應該是還可以再簡化一點, 可是我懶得弄 XDDDD

----------------------------------------------------------------
#! /bin/sh
# enter all folder to make clean
# only for ns 2.29

CUR_PATH=`echo $(pwd)`

rm -f $CUR_PATH/xgraph-12.1/config.cache
rm -f $CUR_PATH/tcl8.4.11/unix/config.cache
rm -f $CUR_PATH/tk8.4.11/unix/config.cache

cd $CUR_PATH/cweb; make distclean; make clean;
cd $CUR_PATH/cweb/examples; make distclean; make clean;
cd $CUR_PATH/sgb; make distclean; make clean;
cd $CUR_PATH/tclcl-1.17; make distclean; make clean;
cd $CUR_PATH/otcl-1.11; make distclean; make clean;
cd $CUR_PATH/zlib-1.2.3; make distclean; make clean;
cd $CUR_PATH/zlib-1.2.3/contrib/blast; make distclean; make clean;
cd $CUR_PATH/zlib-1.2.3/contrib/untgz; make distclean; make clean;
cd $CUR_PATH/zlib-1.2.3/contrib/puff; make distclean; make clean;
cd $CUR_PATH/zlib-1.2.3/contrib/minizip; make distclean; make clean;
cd $CUR_PATH/xgraph-12.1; make distclean; make clean;
cd $CUR_PATH/tcl8.4.11/macosx; make distclean; make clean;
cd $CUR_PATH/tcl8.4.11/unix; make distclean; make clean;
cd $CUR_PATH/tcl8.4.11/unix/dltest; make distclean; make clean;
cd $CUR_PATH/nam-1.11; make distclean; make clean;
cd $CUR_PATH/ns-2.29/indep-utils/cmu-scen-gen/setdest; make distclean; make clean;
cd $CUR_PATH/ns-2.29/indep-utils/dosdbell; make distclean; make clean;
cd $CUR_PATH/ns-2.29/indep-utils/webtrace-conv/nlanr; make distclean; make clean;
cd $CUR_PATH/ns-2.29/indep-utils/webtrace-conv; make distclean; make clean;
cd $CUR_PATH/ns-2.29/indep-utils/webtrace-conv/epa; make distclean; make clean;
cd $CUR_PATH/ns-2.29/indep-utils/webtrace-conv/dec; make distclean; make clean;
cd $CUR_PATH/ns-2.29/indep-utils/webtrace-conv/ucb; make distclean; make clean;
cd $CUR_PATH/ns-2.29/indep-utils/model-gen; make distclean; make clean;
cd $CUR_PATH/ns-2.29; make distclean; make clean;
cd $CUR_PATH/ns-2.29/ns-tutorial; make distclean; make clean;
cd $CUR_PATH/ns-2.29/emulate/support/src/nrgarp; make distclean; make clean;
cd $CUR_PATH/ns-2.29/doc; make distclean; make clean;
cd $CUR_PATH/ns-2.29/doc/kfall; make distclean; make clean;
cd $CUR_PATH/tk8.4.11/macosx; make distclean; make clean;
cd $CUR_PATH/tk8.4.11/unix; make distclean; make clean;
cd $CUR_PATH/gt-itm/sgb2ns; make distclean; make clean;
cd $CUR_PATH/gt-itm/src; make distclean; make clean;
----------------------------------------------------------------

2013年8月30日 星期五

error message (when installing backports)

I got an error message when I install backports.
(how to type Chinese under Ubuntu? orz....)

the following is the error message:

-----------------------------------------------------------
backports-3.10-2$ make menuconfig

Generating local configuration database from kernel ... done.
cc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -DCURSES_LOC="" -DLOCALE   -c -o mconf.o mconf.c
In file included from mconf.c:23:0:
lxdialog/dialog.h:38:21: fatal error: ncurses.h: No such file or directory
compilation terminated.
make[2]: *** [mconf.o] Error 1
make[1]: *** [menuconfig] Error 2
make: *** [menuconfig] Error 2

-----------------------------------------------------------
and, the solution is just using apt-get to install some packages. XD

sudo apt-get install libncurses5-dev libncursesw5-dev