Sunday, July 08, 2012

Disable "warning as errors" in ns-3

When you're including third party open source code to the ns-3, very often you will be seeing at lot of "Warning treated as error". That's quite annoying when you don't brother to fix them all (usually when time is a concern). So a quick fix comes to your mind must be - forget warnings, just let me through, please. Here is how you can do that:

CXXFLAGS="-Wall -g -O0" ./waf configure


ref: https://www.nsnam.org/wiki/index.php/HOWTO_build_old_versions_of_ns-3_on_newer_compilers

Monday, June 04, 2012

configure proxy for mercurial

There are two quick way of doing it:

1: If you are temporarily behind a proxy, simply,  hg pull --config http_proxy.host=proxyhost:port. If your proxy requires username and password, add --config http_proxy.user=username --config http_proxy.passwd=password as well.

2: If you are behind a proxy, you may want to add the following to .hg/hgrc

[http_proxy]
host=proxyhost:port
passwd=password
user=username

 
 

Thursday, September 04, 2008

AVG Free 8 Invalid Update Control CTF File

AVG Free 8 could not update due to "Invalid Update Control CTF File" error messages. I don't know what caused such problem (and I don't care :) ).

Here is my way to solve this problem on Windows Vista.
1. type "cmd" in start search (which is similar to Run on Windows XP)



2. right click on the cmd.exe



3. choose "run as administrator"



4. type "cd c:\ProgramData\avg8\update\download"

5. type "del *.ctf " to delete all *.ctf files

6. update from AVG8 again.

Install software packages on ubuntu

sudo apt-get install software-package-to-be-installed is a good command to install extra packages on ubuntu.

for example, i would like to install Anjuta IDE
type:

sudo apt-get install anjuta

after that I'd like to install minicom too
again, type:

sudo apt-get install minicom


Thursday, August 21, 2008

鸚鵡 來了

北冕剛走,鸚鵡又來了。對於打工仔來說無疑又是一個喜訊。

昨天中午同友人談天,
友人曰: 今年颱風特別多。
我答: 非也,今年乃回復正常。


鸚鵡 路徑圖。


今晚 10:00pm 鸚鵡 路徑圖。

Wednesday, August 06, 2008

北冕 記念日

八號風球 北冕中午最接近 (08:25)

2008年8月6日

天文台在今早5時40分發出八號東北烈風或暴風信號,預計「北冕」將在中午最接近本港。

天文台表示,本港現時平均風速每小時超過62公里。在上午8時,強烈熱帶風暴「北冕」集結在香港以南約150公里,預料向西北偏西移動,時速約14公里,繼續移近香港。

過去數小時,本港風力繼續增強。離岸海域及高地間中吹暴風。按照目前途徑,本港風向在日間將由東北轉為東南,本來受遮蔽的地方可能會變得當風。市民應提防風向的轉變,及早作好準備。

在過去一小時,橫瀾島、西貢及昂坪分別錄得的最高持續風速為每小時105、64及158公里。

Sunday, June 22, 2008

適當的飲食時間表

摘自香港電台一分鐘閱讀

適當的飲食時間表

吳醫生提出的飲食時間表是:

凌晨四點到中午十二點 ,是身體的排泄時間,需要多吃新鮮蔬果,讓蔬果纖維幫助消化器官和各細胞組織,排除體內多餘的毒素,最好在中午十二點之前就有兩次排便。

由中午十二點到晚上八點,是身體吸收營養時間,其中午餐是一天中最重要的一餐,建議以大量的蔬果和新鮮調味香菜和香料為主,同時配
海鮮類;而晚餐盡量安排在六點以前進食,可以吃五穀米跟發芽的豆類,有加速睡眠的功效,盡量不要吃肉類,因為肉類的氨基酸會影響睡眠。

晚上八點到凌晨四點 ,是身體修復及營養分配時間,尤其晚上十一點到凌晨二點為免疫和自癒系統修補時間,可以說是黃金睡眠時間。如果我們三餐吃了足夠的植物生化素,就可以提供 免疫系統充足的糧餉,同時也可以提供自癒系統修補。但是如果沒有補充足夠的植物生化素,就算每天多早睡覺也沒有用,因為免疫系統和自癒系統無法發揮它們全 面的功能。

吳醫生經常在世界各地演說,教導自然療法,許多國家的營養師、醫生、生機飲食老師都上過他的課程。經過20多年臨床實驗和各地傳授,吳醫生才寫成這本新書《不一樣的自然養生法》。


Monday, March 03, 2008

Using telnet on Windows Vista

由於工作需要而再次使用telnet,便谷歌(Google)了一下。哈哈,第一個結果便是來自一位朋友之作,雖然他的Reference也是來自Google。

在此,我不重複,直接引用朋友的blog。
-------------------------------------------------------------------------------
Vista 上用 telnet (By Ben Crox)

Friday, February 29, 2008

曾經擁有的第一輛車 (Echo Verso Deluxe)




不在乎天長地久,只在乎曾經擁有。

Tuesday, February 12, 2008

黃金比例 - The Golden Ratio

昨晚又重新拿起了"The golden ratio (The Golden Ratio - the story of Phi, the world's most astonishing number - by Mario Livio)"這本書。說起來都覺得自己有點過份,此書借於2-Mar-2007,但到了快一年後才開始看。

黃金比例是一個數,一個無理數(irrational number),它是一個不循環(never repeating),不完結(never-ending),它是1.6180339887...

由此可見今時今日主流電腦"芒"由 4:3 到 16:9 再到 16:10 是一個不斷向 黃金比例 接近的變革,而並不是毫無根據。

Wednesday, January 30, 2008

中國雪災

比起阿嬌事件,個人認為國內雪災更加值得關心。
正值中國農曆新年之際,且不論受災各省的災民,大批等待回家過年的民工滯留在各大火車站,正面臨各種危機。 可耻的某些中國人,眼看國人身處困境之中,他們不但沒有伸出援手,還趁火打劫。


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following pictures are relayed from www.bbc.com.

Copyright by BBC.COM

In pictures: China weather chaos
original link: http://news.bbc.co.uk/2/hi/in_pictures/7213852.stm

Cyclist rides in snow, Shanghai, 26 Jan 2008

China is facing transport chaos and power shortages after heavy snowfalls - in some places the worst for 50 years.

Bikes buried in snow in Nanjing, Jiangsu province, 28 Jan 2008

Roads have been blocked and airports closed, while power rationing has been introduced in 17 provinces as soaring demand depletes coal stockpiles.

Passengers wait for a bus, Nanjing, 27 Jan 2008

The cold snap has come as hundreds of millions of people are trying to travel to their home provinces to celebrate the Chinese New Year.

Stationary trains at Hankou railway station, Wuhan, Hubei province, 27 Jan 2008

Many trains are stationary because of power cuts and blocked tracks...

Passengers wait at Hankou Railway Station, Wuhan, 27 Jan 2008

...leaving more than 100,000 people stranded at railway stations.

Worker shovels snow from collapsed car showroom, Wuhan, 28 Jan 2008

This car showroom is among 100,000 buildings that have collapsed. Another 400,000 have been damaged, state media reports.

A man moves a bike, Wuhan, 27 January 2008

More than 20 people have died in the cold spell since 10 January, and many more are thought to have died in accidents on the icy roads.

Chefs clear the street in Nanjing, 26 Jan 2008

Economic losses from the severe weather are estimated at some 18.2 billion yuan (US$2.5 billion, £1.7 billion), officials say.

Residents walk in a wood, Nanjing, 26 Jan 2008

Fourteen of China's 31 provinces have been hit, with nearly 80 million people directly affected.

Woman covers her face, Lanzhou, Gansu province, 27 Jan 2008

With more snow forecast, the misery looks set to continue.


In pictures: Stuck in China freeze
original link: http://news.bbc.co.uk/2/hi/in_pictures/7215183.stm

People wait in the freezing cold on Linzhu highway

Chris Pert took what should have been a 12-hour bus ride from Wuhan to Guangzhou. The chaos caused by the weather meant the journey ended up taking four days.

The bus stuck on Linzhu highway

"The major delay was a crash involving 10 lorries on the Linzhu highway. We sat on this bus for three days."

Pigs stuck in a lorry stranded for four days

"Conditions were disgusting for many of us. The road was littered with rubbish and one toilet serviced our stretch of the highway. These pigs remained in this truck for all that time."

An impromptu economy has set up on the highway - woman selling food and supplies

"The jam was an opportunity for some. People started bringing round supplies such as food and water and selling at an extortionate rate."

People inside the bus on the long journey to Guangzhou

"The people we were on the bus with managed to keep their spirits up even though our group found it extremely difficult."

People stuck on the road in the cold weather

"I feel very aggrieved at the lack of help provided by the government for those stuck in these freezing conditions. We finally got to Guangzhou but it's even worse for people here."