
例子:
1.遊戲中,按下power key, 遊戲暫停,及一些過程中開啟的thread需要停止
2.鬧鐘響鈴,按power key,將鬧鐘停止
問題:一般抓取keyevent
- /**按键按下触发的事件*/

例子:
1.遊戲中,按下power key, 遊戲暫停,及一些過程中開啟的thread需要停止
2.鬧鐘響鈴,按power key,將鬧鐘停止
問題:一般抓取keyevent
開始工作好幾個星期了,一直想說要把學到的東西寫下來,
做一個學習筆記,也順便釐清自己的思緒,不過人就是懶,
現在開始寫第一篇,依主題可能會再回過頭來修改,也不知道會持續寫多久,反正就是個開端
現在要講的 Canvas,翻譯叫"畫布"
在畫點 畫線 畫圓乃至畫圖,都需要用到這個api

為了參加前同事的婚禮,繞了半個台灣到了台灣的後花園-花蓮,仔細想想,好像沒有到花蓮玩過,於是就把握這次機會,順便實現了人生第一次的自由行。
拿了hostel給的美食地圖到了市區開始吃東西,發現這裡的排隊比其他地方看到的厲害,好像被推薦過的攤子就是排滿滿的,如下
蚵仔煎
自強夜市的燒番麥
這次是一個人自由行沒有多餘人力,所以只好放棄這些排滿滿的攤子

主要是發現GQ在放正妹圖只讓人看,不讓人直接下載,不過進到原始檔內有提供圖檔連結,
所以心血來潮花了一個下午,試著寫一個"抓GQ 的性感女人頁面的圖"的小程式,第一次寫抓圖的程式
學會:
1.如何抓網頁的原始碼
2.如何下載檔案

時間:2013.10.19
地點:台北
<<前言>>
今天是一大早起床,坐上了首班車前往台北,為了參加 canon 第五屆的攝影馬拉松,
第一次聽到這個活動,直覺相機那麼重還要背著跑馬拉松,是 想整人嗎!!
android developers 原文中的說明
A Handler allows you to send and process Message and Runnable objects associated with a thread's MessageQueue. Each Handler instance is associated with a single thread and that thread's message queue. When you create a new Handler, it is bound to the thread / message queue of the thread that is creating it -- from that point on, it will deliver messages and runnables to that message queue and execute them as they come out of the message queue.
There are two main uses for a Handler: (1) to schedule messages and runnables to be executed as some point in the future; and (2) to enqueue an action to be performed on a different thread than your own.
Scheduling messages is accomplished with the post(Runnable), postAtTime(Runnable, long), postDelayed(Runnable, long), sendEmptyMessage(int), sendMessage(Message), sendMessageAtTime(Message, long), and sendMessageDelayed(Message, long) methods. The post versions allow you to enqueue Runnable objects to be called by the message queue when they are received; the sendMessage versions allow you to enqueue a Messageobject containing a bundle of data that will be processed by the Handler's handleMessage(Message) method (requiring that you implement a subclass of Handler).
When posting or sending to a Handler, you can either allow the item to be processed as soon as the message queue is ready to do so, or specify a delay before it gets processed or absolute time for it to be processed. The latter two allow you to implement timeouts, ticks, and other timing-based behavior.
http://kevingo75.blogspot.tw/2009/04/arg-arg-max.html
複製來的內容,只是記錄一下常見的東西
最近在讀paper時看到了這個數學式子 y* = argmax f(t),想當初數學這麼爛的我一定不懂argmax是什麼,找了好一會兒才找到,記錄一下避免忘記 :)
這邊重點是講特性在介面需要性及用法
interface IStingPatrol
{
int AlertLevel{get;} <<<<<<<<<<<<<<<<<<<<<<使用"特性"來"存"資料,實際上介面是不能存資料的,也就是不能宣告變數,但用"特性"來讓其實作時,能有欄位存資料以使用
int StingerLength(get;set;)
參考:http://www.dotblogs.com.tw/atowngit/archive/2009/08/26/10253.aspx
抽象類別:
是用來定義相同種類的物件,所需要具備的共通特性;例如動物(Animal),是所有動物的基底,所有動物具有吃、喝、睡覺等等共同的特性,但是,每種動物吃的東西不一樣(人類屬雜食,老虎只吃肉...),所以我們可以將這些基本特性,寫成抽象類別與方法,讓其他類別來繼承並且實做方法,這就就抽象類別的意義。
介面:
http://msdn.microsoft.com/zh-tw/library/cc488006.aspx
物件皆是多型
在作多型的應用時,常用基底類別的參考來存放衍生類別的物件
在想使用衍生類別的方法時,必須轉回衍生類別,
在這種情況下嘗試進行簡單轉型卻會有擲回 InvalidCastException 的風險