Sunday, April 24, 2011

Error when apply C code to your C++ code

If you get the error message when compiling your C code by C++ compiler.

error: invalid conversion from 'const void*' to 'const unsigned char*'

const void *data;
const unsigned char *sp = data;

Please modify to
const unsigned char *sp = static_cast< const unsigned char* >(data);

Or,
void *resbuf;
uint8_t *hval = resbuf;

Please modify to
uint8_t *hval = static_cast< uint8_t * >(resbuf);

Then you gen pass compiler.

Refer from following,
http://discussion.forum.nokia.com/forum/showthread.php?152300-Open-C-syntax-problem-for-invalid-conversion
http://www.velocityreviews.com/forums/t456262-cannot-convert-const-void-to-const-char-in-c.html

Wednesday, March 2, 2011

NPF設定為自動開啟

http://ask.wireshark.org/questions/1281/npf-driver-problem-in-windows-7

應該是我換了新版的Wireshark和Wincap後,npf被設定成了demand start,
參考上面連結,很清楚的可以設定為auto-start。


Run a cmd.exe as administrator and run the command sc qc npf.

You should get some output like this:

C:\Windows\system32>sc qc npf
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: npf
        TYPE               : 1  KERNEL_DRIVER
        START_TYPE         : 2   AUTO_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : system32\drivers\npf.sys
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : NetGroup Packet Filter Driver
        DEPENDENCIES       :
        SERVICE_START_NAME :
If your driver is not properly started, activate it with the command sc start npf

Finally, to start the service automatically, use the command sc config npf start=auto

Remember to run your cmd.exe as administrator when issuing these command.

Monday, September 27, 2010

Tuesday, September 14, 2010

Very happy to help somebody in the world.

I am really happy to help someone on Internet.
After checking the Google searching result of the following key words,
"jrgemini.blogspot.com/search/label/HTK",
"jrgemini.blogspot.com",
some people did searched solution on Internet.

Even some people did left messages or did send emails for help.
Although I have stop writing on this blog for a while, I will get back soon!

好用免費軟體 - Picasa

Picasa~已經足夠給一般使用者來編輯圖片!
我就曾經拿來做過壞事XD
Picasa is enough to help users edit pictures. I had done bad bad bad by it. LOL.

好用免費軟體 - Free PDF Printer

免費的PDF虛擬印表機 Free PDF Printer
我很喜歡把想保留的網頁或是文章轉成PDF格式,
最簡單的方法就是用虛擬的印表機印成PDF檔案。
I prefer to keep webpages or articles through PDF format, and the easiest way is printing them to PDF files!

Friday, September 10, 2010

Drivers for Asus W5G00AE

I have one Asus W5G00AE installed windows 7.

Someone shared the experience to install drivers of W5G00AE.

According to the author's suggestions, drivers of W5G00AE is compatible with K50IN. http://support.asus.com/download/download.aspx?SLanguage=en-us&model=K50IN

Bluetooth is Bluetooth_BT253_WIN7_32_WIN7_64_6209600.
VID is USB\VID_044E&PID_3001&REV_1392.
You can download the latest version from Eee Box B206. (The suggestion of latest driver is from DriverUpdater)

The VID of webcam is USB\VID_0402&PID_5602&REV_0100.
You can check the Hardware ID in properties of Webcam and select right driver for your device.
But
Additional problem will come out "Can't support ASF file format.
I tried to use latest version of lifeframe, but lifeframe2 and lifeframe3 doesn't support W5G00AE.
Even I tried the lifeframe patch, the problem still exists.

BTW, if you want to update the webcam drivers to later version. You can try the webcam driver of Asus A6Km.

Wireless Console 3 is working well on W5G00AE.

Maybe you will see one device which is not installed driver, VID is PCI\VEN_1180&DEV_0592&SUBSYS_00000000&REV_08.
It is Ricoh Card reader driver. You can install W5AE version.

I also hope to update the latest Audio driver, but I failed.
DriveUpdater suggests Realtek 5.10.0.6043, my version is 5.10.0.5178.

Thursday, February 4, 2010

Me @ GoogleMap!

哈哈哈哈!
記得去年在我家附近看到GoogleStreetView的攝影車後,
總算推出在高雄的Google街景服務啦!

經過查證!我果然出現在地圖裡面啦!請看!
那個回頭看的人就是我!!!

檢視較大的地圖

再來看看更清楚的XD
好俗啊!還回頭看咧!還穿拖鞋咧XD

從另一邊看!更是好笑!
正在讓車的我!

穿著洋基的T-shirt,準備去接女友,騎著SYM悍將XD

Monday, September 14, 2009

肯德基爺爺 in Google Street View @ Taipei

最近聽到一個好笑的消息,from HERE
Google街景在台北上路,為了個人隱私權,臉部辨識軟體會選出人臉後,模糊化處理,以保護個人隱私。
但是,肯德基爺爺也被當作一般人處理了,為了證實這件事情,我決定調查台北市內,所有的肯德基爺爺是不是真的被"糊掉"了!

KFC官網上面,地址在台北市的有,
  • 台北三越餐廳 台北市100中正區忠孝西路一段66號B1(新光三越百貨)
  • 在地下室,拍不到。
  • 台北漢口餐廳 台北市100中正區漢口街一段50號
  • 肯德基爺爺沒糊!
  • 台北承德餐廳 台北市103大同區承德路一段38號
  • 肯德基爺爺糊了!
  • 台北中山餐廳 台北市104中山區南京東路三段222號1-4樓
  • 肯德基爺爺糊了!
  • 台北中山北餐廳 台北市104中山區中山北路二段109號1-3樓
  • 這個角度有糊
  • 這個角度沒糊
  • 台北中崙餐廳 台北市104中山區八德路二段306號B1
  • 地下室看不到!
  • 大直愛買餐廳 台北市104中山區敬業三路123號1樓
  • 在賣場裡看不到!
  • 台北南京東餐廳 台北市105松山區南京東路五段82號
  • 糊了!
  • 台北八德餐廳 台北市105松山區松山區八德路四段721號
  • 糊了!
  • 台北仁愛餐廳 台北市106大安區仁愛路四段418號
  • 這個角度糊了!
  • 這個角度沒糊!
  • 台北台大餐廳 台北市106大安區新生南路三段96-1號
  • 小的糊了!
  • 大的沒糊!
  • 台北成都餐廳 台北市108萬華區成都路87號
  • 肯德基爺爺糊了!
  • 台北峨嵋餐廳 台北市108萬華區峨嵋街14-16號2樓
  • 肯德基爺爺沒糊!
  • 台北信義(二)餐廳 台北市110信義區市府路45號B1(台北101大樓)
  • 地下室看不到!
  • 台北士林餐廳 台北市111士林區文林路88號
  • 小的糊了,大的沒糊!
  • 台北天母餐廳 台北市111士林區天母東路6-4號1樓
  • 沒提供Google Street View
  • 北投光明餐廳 台北市112北投區泉源路3之1號
  • 沒糊!
  • 台北內湖餐廳 台北市114內湖區內湖路一段230號
  • 有些有糊,有些沒糊!
  • 台北東湖二餐廳 台北市114內湖區東湖路122-124號
  • 糊了!
  • 台北興隆餐廳 台北市116文山區興隆路三段114號
  • 小的糊了!大的沒糊!
統計結果,總共有20間。
  • 看不到的有5間。
  • 糊了,12間。
  • 沒糊,3間。
另外針對有些有糊,有些沒糊,有兩點推論,
  • 肯德基爺爺所在的高度:太高,人不太可能出現的高度,不會被模糊!
  • 肯德基爺爺臉的大小:太大也不會!
不過都只是推論^^
蠻好玩的,不過好累XD

Sunday, August 30, 2009

免費掃毒軟體

Avast Antivirus
Avira AntiAir
Panda Cloud Antivirus
AVG Free Antivirus
ClamWin Free Antivirus Opensource
至於以上產品的爭測速度,就不野人獻曝了,我不夠專業去比較這些。
網路上有很多類似的比較文章,例如下列,注意更新時間,自行參酌。
如果以Google trends來看看這四個產品,
世界的話,AVG最高,Avast次之,Avira第三。
台灣的話,Avast和AVG伯仲之間,Avast比較高些,Avira仍是第三,
可是我身邊的人比較多人用Avira。

Saturday, August 29, 2009

Asus PL-X31電力網路實測和配置

PLC Power Line Communicattion,電力線通訊自從開始有商業化產品後,我就一直再注意了。
因為一定會有速度更快的,價錢更理想的產品推陳出新,終於200M的出來了。
產考了價錢和許多網友的分享文,
我決定買Asus的PL-X31。
官方介紹

我買了三台PL-X31,分別放在三個房間,我的臥室,客廳,和書房(娛樂間)。
網路來源就透過ADSL modem,再加上一台比較強效的無線路由器,來分配網路位址。
我申請的是一個實體IP加上七個虛擬IP的ADSL網路服務。
客廳需要網路的原因是因為想利用一台一公升電腦當作娛樂中心,透過此電腦可以在電視上欣賞影片,MOD(高畫質電視節目)也可以使用。
另外的好處就是電視遊樂器也可以很方便在客廳連接上網路。(特別是Xbox360和未來會加入的PS3 Slim)
書房是家庭成員使用電腦的地方,所以一定要提供網路。
如果沒有PLC,光是佈線就非常頭大!
那使用者最在乎的速度呢?實測後,PL-X31真的提供了很不錯的效果!應該說200M規格以上的,應該都符合大多人的需求了。

以下是粗糙的連線速率結果,只測一次,沒有做多次取平均,不過基本上都差不多。

在書房的PC,連線速度是8.5Mpbs。

在書房的NB,連線速度是9.7Mpbs

在客廳的一公升電腦,連線速度是8.4Mpbs。

在書房的另一台一公升電腦,連線速度是9.4Mpbs
在臥房的PC,沒透過PLC的連線速度,9.7Mpbs。

在臥房連線臥房內的無線路由器,連線速度是8.9Mpbs。
在臥房連線客廳的無線路由器,連線速度是6.7Mpbs。
沒透過PLC速度是9.7Mbps。
有透過PLC速度分別是8.5Mbps, 9.7Mbps, 8.4Mbps。
無線的速度分別是8.9Mbps, 6.7Mbps。
由此可見,透過PLC甚至跑出沒透過PLC一樣的速度,雖然僅供參考,但是已經表示原本有限網路的100M,已經和PLC 200M有並駕齊驅的表現了。

看似無線效果也不錯,但是其實這是最好的狀況,我也沒特定去找死角來測,有些房間要收到無線訊號其實不是很容易。

我應該會把客廳的無線AP拿到書房去,這樣起碼可以將整個家以無線網路涵蓋起來,另外要使用有線網路的話,有三個地方可以提供,有需要的話,再添購PLC即可。
總之,PLC真是好物啊!

Thursday, August 6, 2009

快來產生自己的Quick Response Code吧!

http://qrcode.kaywa.com/

Quick Response Code 簡稱QR Code,
就像本部落格右側方塊中的一個黑白方塊的圖片,
可參考Wiki的說明,
http://zh.wikipedia.org/wiki/QR%E7%A2%BC

實用性也大於傳統的條碼,因此在日本超級流行,台灣雖然還是少數使用,不過以台灣一向愛學習日本的特性,也有可能會慢慢流行也說不定,只要RFID沒那麼塊普及的話XD

PS: 不過RFID市場大很多,搞不好會跳過QR code也說不定。

Thursday, July 30, 2009

1-of-K representation

Reference from Machine Learning and Pattern Recognition, Bishop

Section 2.2 P.74
A particularly convenient representation is the 1-of-K scheme in which the variable is represented by a K-dimensional vector x in which one of the elements xk equals 1, and all remaining elements equal 0.

Keyword: 1-of-K, representation

Tuesday, July 21, 2009

Generative model and Discriminative model


簡單的名詞解釋上的區別是
discriminative model 估計的是條件概率分布(conditional distribution, posterior class probabilities)
p(class|observed x)
generative model 估計的是聯合機率分布(joint probability distribution)
p(observed x, class),之所以稱為Generative model,就是因為根據Joint probabilities,利用各種sampling方法,就可以產生人工資料(Synthetic data)。

Christoper M. Bishop, Pattern Recognition and Machine Learning Section 1.5.4, p.43有提到這兩者的區別。在這裡作者Bishop也點出了第三種學習方法,discriminative function.
Sampling方法,可在此書的第11章找到各式方法。

在目前的研究上,
有學者研究綜合兩者的優點的Hybrid方法,
  • Hybrid Generative-Discriminative Models for Speech and Speaker Recognition (2002)
  • Multi-Conditional Learning: Generative/Discriminative Training for Clustering and Classfication(2006)
  • Bias-Variance tradeoff in Hybrid Generative-Discriminative models(2007)
  • A hybrid generative/discriminative approach to text classification with additional information(2007)
  • A mixed generative-discriminative framework for pedestrian classification(2008)
  • Combining Evidence from a Generative and a Discriminative Model in Phoneme Recognition(2008)
也有學者提出透過Discriminative model去學習generative model.
  • Learning Generative Models via Discriminative Approaches(2007)
兩者的比較
  • Generative versus discriminative methods for object recognition(2005)

Monday, July 20, 2009

好用免費軟體 - 7zip

7zip免費且支援很多壓縮格式,缺點是介面不太漂亮,也沒辦法double click打開壓縮檔。

教學網站

Sunday, July 19, 2009

Memo: how to type doubledash "--" and underline "_" in LaTex?

How to type double dash in LaTex?
Sometimes we need to type "--" in LaTex, but the parser of Tex will deal with it into one dash.
If you try "- -" a space in two dash, it is not the same with "--".

So you can try
  • \texttt{ }: I think it is good but the format and size of character should be customized.
  • -{}-: Excellent. Nature!
Reference from

Underline is reserved character of LaTex
The reserved characters are
  • $ : dollar sign
  • & :
  • %
  • #
  • _
  • {
  • }
  • ~
  • ^
  • \
If you want to type them, just add a "\" before them.

Wednesday, May 20, 2009

Memo: How to put a character below or under a word?

http://www.gamedev.net/community/forums/topic.asp?topic_id=436284

Use \underset and \overset

%
\begin{equation}\label{Eq:formula3}
    \hat{P} = \underset{P}{\text{argmin}}\{F(P)\},
\end{equation}
%

You will get

Tuesday, May 19, 2009

Memo to use matplotlib.legend

Assume the legend example is like this
  • fig1.legend(E_on, ejection, loc = 7)
E_on is figure vector, ejection is string vector, loc is the location of legend.

You can use append to construct E_on and ejection
  • E_on.append(fig1_on.plot(x[k][j], y[k][j]))
Then you will get a very good legend figure like this.

Memo to use matplotlib.use( )

Just remind myself to use matplotlib.use( ).

If you claim the matplotlib.use( ) to save figure in a given format, just need to define it in your main python file.
Otherwise, you will get a error message about this function.

Thursday, May 14, 2009

Clicky

Clicky Web Analytics