LearnHouse

頭痛~總是被派去解很難解決的問題

我念研究所到底是來研究的還是來挑戰不可能的
打從進實驗室就被定位一直產出超出我能力的事
我好想做我想學的東西,可是永遠沒時間
哀~~~~~永遠的loop
while(1)
{
挑戰不可能的coding.......
}

我的論文呢?????從沒思考過,根本沒時間思考
我真的念資管嗎???我想學東西阿~"~
我到底學到什麼?????東跳西跳沒有一個邏輯

2010/4/14
每當debug不出來的時候 不想拿這文憑的感覺就越強烈 ~"~
這三年大概只學到怎麼兜程式了吧!!
碩士生該有的thinking,該有的analysis ability,我有嗎???
我的reserch總是不在paper上,只有在網路上serch可以套到我系統的source code
想把reserch做好,但卻一定要解決根research沒有直接關係的議題上
然後又是同樣的loop.....解決很困難的coding
是我的問題嗎? 是我沒仔細思考過我想要學什麼嗎? 還是我根本不知道我想學什麼?
也許我已經離"成功"這兩個字越來越遠了,一個成功的人不會花時間在這裡抱怨
他只會思考該怎麼解決現在的難題,一步一步的去完成

posted by yuchin in 生活日記 and have No Comments

大嘴巴『永遠在身邊』,原唱青山テルマ 『そばにいるね』

大嘴巴『永遠在身邊』

[原唱]青山黛瑪 青山テルマ- 留我在身邊そばにいるね

posted by yuchin in 影視娛樂 and have No Comments

終於也到做介面的階段了..............

這兩天都在用MFC的東西,原來寫介面也是一個大學問
通常玩程式的人都是從介面開始慢慢深下去
我卻是反其道而行,從socket、thread、timer一路玩上來
一路走來很多東西都想寫篇文章介紹一下,但卻都是心有餘而力不足
以後有機會在慢慢補上了
今天做了幾個PC版暫定版的介面,到時候還有Client WinCE版的!!

Server端

Client端

posted by yuchin in 生活日記 and have No Comments

[C/C++]MFC ComboBox 使用方法

Step1 首先當然是要在工具箱拉Combo Box出來
在Data屬性中可以放入你想要放的值或資料,只要用分號『;』隔開,例如:10;20;30;40

Step2 再來設定變數
CComboBox *m_sTimeout;  //宣告Combo Box物件位址變數
CString strCBTimeout; //宣告所選的值或資料變數
int SetTimeout = 0;    //宣告轉換字串成整數值變數

Step3取得Combo Box物件資料
m_sTimeout = (CComboBox *)GetDlgItem(IDC_COMBOTIMEOUT);

if(m_sTimeout->GetCurSel() >=0)  //當有取到值的時候執行會回傳選取的編號
{
m_sTimeout->GetLBText(m_sTimeout->GetCurSel(), strCBTimeout); //剛選取的編號值放入字串
SetTimeout = atoi(strCBTimeout); //將選取的字串值轉成整數值
}
else
SetTimeout = 8000;

可參考下面解說http://www.codersource.net/mfc/mfc-tutorials/ccombobox-example.aspx

CComboBox Example

Minimize

Combo box controls are space savers. Wherever there is no need for a multi-select from a list of items, combo box is a good choice in such places. This article " CComboBox Example" explains how to use the MFC CComboBox class for manipulation of a list of strings.

CComboBox Example - Initializing a Combo Box:

It is assumed that the readers of the sample have already created a dialog box (either in a dialog based application or SDI/MDI application) and placed a combo box control from the controls toolbox on the Resource Editor.

After placing the combo box control on the dialog box, open the class wizard by pressing Ctrl + W keys or Menu --> View --> ClassWizard. In the Member Variables tab, Add a Variable for the CComboBox class. This CComboBox example assumes that the variable name is,

CComboBox  m_cbExample;

This m_cbExample will be used further in our CComboBox example MFC code.

CComboBox Example - Adding Items to a Combo Box:

The function AddString is used for adding items to a combo box. If there is a constant set of data, these values can also be added in the Resource Editor itself. The Combo Box control properties dialog has a tab for adding data. Otherwise the data can be added as follows.

m_cbExample.AddString("StringData1");
m_cbExample.AddString("StringData2");
m_cbExample.AddString("StringData3");

CComboBox Example - Retrieving Items from a Combo Box:

Usually a requirement for retrieving items from the combo box will arise from selecting the data. This article also assumes the same. Now the data selected in a combo box needs to be retrieved.

To do this, the first step is to find out the index of the selected item inside the combo box control. Then the item at the corresponding position needs to be pulled out as follows.

int nIndex = m_cbExample.GetCurSel();
CString strCBText;
m_cbExample.GetLBText( nIndex, strCBText);

In the above CComboBox example code, the value will be retrieved and stored in strCBText variable. There is another overloaded version for GetLBText. But the version which uses CString is the easiest one.

CComboBox Example - Finding Items inside a Combo Box:

This kind of Find operations on a Combo box will most probably be useful in programs that dynamically modify the values in a combo box. The function FindStringExact is used to find the exact string match inside a combo box.

int nIndex = m_cbExample.FindStringExact(0, "Value to be found");

The string position inside the combo box control is the return value. It returns CB_ERR if it was unsuccessful in finding the string.

CComboBox Example - Deleting Items from a Combo Box:

This operation can be done by using the CCombobox member function DeleteString. This function needs the index of the item inside the combo box.

m_cbExample.DeleteString(nIndex);

posted by yuchin in 程式&軟體 and have No Comments

受保護的文章:當一個人孤單的時候

本文受密碼保護,須填寫您的密碼才能閱讀。


posted by yuchin in 生活日記 and have 輸入密碼方能觀看迴響。

要漢堡給脆雞 肯德基優惠民眾看有呷嘸

昨天晚上也因為+1元的優惠,動心的跑去屏東市吃小K
結果也因為沒有「卡啦雞腿堡套餐」,改點店員說的禮拜一的吮指雙雞套餐有+1元優惠
本來還以為只有我們這樣,沒想到全省都有同樣的狀況,而且超沒誠意的,要嘛也要送兩支阿,怎麼才送一支
+1元是多一個主餐漢堡,那吮指雙雞套餐+1元應該要送主餐兩塊炸雞呀!!

更新日期:2010/02/24 02:10 朱芳瑤/台北報導

中國時報【朱芳瑤/台北報導】

新春剛開工,速食業者肯德基祭出「加一元多一件」的優惠,不少消費者樂得搶便宜。但昨天有民眾連跑好幾家門市,得到的答案竟是賣完了!她氣得大罵業者「超沒誠意」、「有優惠卻不多備料,這難道不是欺騙消費者嗎?」公平會正在調查是否有廣告不實的問題。

消基會董事長謝天仁也質疑,「若單一門市偶然性缺貨,還說得過去,若是普遍供貨不及,很難不懷疑業者藉此方式操作,吸引客人上門,但消費者到頭來空歡喜一場!」

行政院公平會發言人施惠芬表示,肯德基廣告未註明限量供應,初步看來,其販售行為與廣告內容確實有出入。

備料不足? 跑好幾家都賣完

肯德基這波促銷廣告登得斗大,每天都有不同優惠,主打「加一元多一件」。昨天星期二是「 啦雞腿堡套餐」,一套一三五元,加一元多送一個 啦雞腿堡。

看準 啦雞腿堡有優惠,黃小姐昨天下午四點在辦公室呼朋引伴,興沖沖地跑到到肯德基門市購買,店員卻澆了她一盆冷水說:「中午太熱銷,已經賣完了!」又說,可以換成禮拜一的「吮指雙雞套餐」優惠,加一元多送一塊吮指脆雞。

「我就是想吃 啦雞腿堡,為什麼要給我炸雞!」黃小姐不死心,再到其他門市詢問,也得到相同答案。店員建議她不妨改購買「紐澳良烤腿堡套餐」,卻補上一句「不過這沒有優惠喔」。黃小姐更傻眼:「肯德基是在『莊孝維』嗎?」

黃小姐質疑,肯德基廣告並未註明限量供應,「根本不該有『賣完了』的情形」,她不想因此買其他餐點,當場走人不吃了。

廣告不實? 公平會正在調查

陸續有民眾上網抱怨,同樣不滿店家改成供應周一的優惠餐點。有網友說,昨天就是要買周二 啦雞腿堡的優惠才來消費,但還不到晚上就說「賣完了」,令人無法接受。

有人怒指,特地避開用餐尖峰時間,但仍買不到,心情實在很差。一名網友痛批,中午排好久終於輪到他點餐,店員卻說沒有麵包了,「會不會太扯?」

posted by yuchin in 新聞報報 and have No Comments

過年期間不斷重播的春晚經典畫面:王菲、劉謙、「老」虎隊

王菲唱就是一整個夢幻

下面是原創劉健

中華民國台灣的魔術師-劉謙 見證奇蹟的時刻

中華民國台灣的魔術師劉謙去年春晚的表演

中華民國台灣曾經的小虎隊,現在是老虎隊了

posted by yuchin in 影視娛樂 and have No Comments

受保護的文章:困惑!?

本文受密碼保護,須填寫您的密碼才能閱讀。


posted by yuchin in 生活日記 and have 輸入密碼方能觀看迴響。

[C/C++]C語言新手十誡(The Ten Commandments for Newbie C Programmers)[轉載]

(1) 本篇旨在提醒新手,避免初學常犯的錯誤(其實老手也常犯:-Q)。
但不能取代完整的學習,請自己好好研讀一兩本 C 語言的好書,
並多多實作練習。

(2) 強烈建議新手先看過此文再發問,你的問題極可能此文已經提出並
解答了。

(3) 以下所舉的錯誤例子如果在你的電腦上印出和正確例子相同的結果,
那只是不足為恃的一時僥倖。

(4) 不守十誡者,輕則執行結果的輸出數據錯誤,或是程式當掉,重則
引爆核彈、毀滅地球(如果你的 C 程式是用來控制核彈發射器的話)。

Read more...

posted by yuchin in 程式&軟體 and have No Comments

受保護的文章:我累了?!真的好累~~~

本文受密碼保護,須填寫您的密碼才能閱讀。


posted by yuchin in 生活日記 and have 輸入密碼方能觀看迴響。