個人檔案Always相片部落格清單更多 工具 說明

部落格


4月1日

Tiësto

 
12月12日

Wake me up before december ends

IMAGE_016
很久沒上來了 po 一下廢文~~~~
 
1月19日

化妝保養濕紙巾

現在大家都想要方便好用的東西
 
濕紙巾其實還滿方便的
 
可是市面上目前都只有清潔功能的濕紙巾
 
最多拿來卸妝
 
我想現在人都滿懶的
 
應該要推出保養用的濕紙巾才對阿
 
這樣大家要塗各種保養品的時候
 
只要拿出各種不同保養品的濕紙巾就好
 
還滿方便的
 
就不用瓶瓶罐罐的
 
也滿適合女生出門在外使用
 
應該可以申請個專利才對

不知道哪一個Blog比較好用

感覺微軟這個Blog還是限制太多了
 
想要跳槽了~~
 
這裡要找資料查東西還是太麻煩了
 
Sigh~~~
1月18日

__FILE__

如何做一個支援TChar 的__FILE__
 
這篇寫的還不錯
 
 

Sequential-Evaluation Operator

什麼竟然有這種東西~~~~
 
我竟然完全不知道
 
原來這就是我們常用的"  , "
 
expression , expression
 
只不過以前都只有在for迴圈裡面用
 
拿出來我就認不出來了
 
慚愧慚愧

C++程式設計該會些什麼?

以下列出上課該教的大綱

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

1. Course Introduction

  • Course Objectives
  • Overview
  • Suggested References

2. What You Should Already Know-a Review

  • Rationale for a new programming language
  • The language of Object Orientation
  • A typical C++ class
  • Issues regarding member functions vs. non-member functions
  • friend Or non friend
  • functions - returning references
  • Relationships
  • Initialization lists
  • Inheritance in C++
  • Access Levels
  • Simple C++ I/O
  • The uses of const

3. Parameterized Types - Templates

  • Templates
  • Overloading functions
  • Template functions
  • Specializing a template function
  • Disambiguation under specialization
  • Template classes
  • Instantiating a template class object
  • Rules for template classes
  • Non member function w/ a template argument
  • Friends of template classes
  • Templates with multiple type parameters
  • Comments regarding templates

4. Relationships of All Kinds

  • Uses of Member Initialization Lists
  • Member initialization lists under composition
  • Initialization lists under inheritance
  • Initialization lists w/ Multiple Inheritance (MI)
  • Initialization with MI and composition
  • Efficiency
  • operator= and composition
  • Constructors and composition
  • What is not inherited?
  • operator=, construction, and inheritance
  • Public inheritance
  • Virtual functions
  • A shape class hierarchy
  • Polymorphism
  • Pure virtual functions
  • Abstract base classes
  • Private inheritance
  • Using relationships
  • Associations

5. Multiple Inheritance

  • Multiple inheritance
  • Ambiguities
  • virtual base classes
  • The Dominance Rule
  • Member initialization lists
  • operator=

6. Data Structures

  • Introduction
  • A simple List
  • Layering type safe classes upon List
  • A template List class
  • Iterators
  • A template iterator
  • Stack and Queue classes
  • Templates and Inheritance

7. Function Pointers

  • Why have function pointers?
  • Passing functions as arguments
  • Registering functions
  • Function pointers in C++
  • Callback functions
  • A class with a callback object
  • Registration of exceptions handlers

8. Exceptions

  • What are exceptions?
  • Traditional approaches to error handling
  • try, catch, and throw
  • A simple exception handler
  • Multiple catch blocks
  • The exception specification list
  • Rethrowing an exception
  • Cleanup
  • Exception matching
  • Inheritance and exceptions
  • Resource allocation
  • Constructors and exceptions
  • Destructors and exceptions
  • Catch by reference
  • Standard exceptions

9. Standard Template Library

  • The Standard Template Library
  • Design goals
  • STL Components
  • Iterators
  • Example: vector
  • Example: list
  • Example: set
  • Example: map
  • Example: find
  • Example: merge
  • Example: accumulate
  • Function objects
  • Adaptors

10. Disambiguation

  • Conversion
  • int Conversions
  • float + double Conversions
  • Arithmetic and pointer conversions
  • Inheritance based conversion
  • Overloaded functions
  • Exact match
  • Match with promotion
  • Match with standard conversion
  • User defined conversion
  • Constructors as conversion operators
  • Ambiguities

11. File I/O

  • Introduction
  • Manipulators
  • Writing your own manipulators
  • Overloading the I/O operators
  • Disk files
  • Reading and writing objects
  • Internal transmission of data
  • A spell checker
  • Handling Streams in the constructor and destructor
  • Treating a file as an array

12. Miscellaneous Topics

  • Namespaces
  • Use counts
  • Reference counts
  • RTTI
  • Casts
  • Having a limited number of objects
  • Smart pointers

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

原來我到現在才有了大三該有的程度~~~ 

1月17日

全國第一支感應式信用卡手機

 
中國信託為了推廣Visa wave真是用盡了方法,
不過感覺把Visa wave貼到手機上面,真的會吸引人去用嗎?
或是會吸引人去買這隻手機~
 
老實說 我感覺不會,不過他限量開放100名
 
或許多少還是有人會想要用八~~
 
 

Seven Sins of iPhone

雖然我還滿喜歡iPhone的設計
 
但是這篇文章寫的真不錯
 
 
絢麗的外表下,真的如Jobs所說的一樣好用嗎~~
 
話說回來
 
以使用者介面來說
 
M$的Smart phone的UI實在是太差了......
 
尤其是list view讓人看了感覺很廉價
 
看來Smart phone整體來說還是Sybian做的比較好一點
1月9日

死結

既然我叫Locking
 
那我就要介紹一下啥是Deadlock
 
Deadlock是我在作業系統學到的專有名詞
 
作業系統的課其中主要就是在介紹作業系統是如何管理電腦裡面所有的資源,cpu排程,記憶體管理,磁碟管理,I/O管理等等。。。
 
既然要管理這麼多資源
 
再加上現在的電腦已經是多工的了,可以想成電腦同時可以執行很多程式
 
那如果同時有兩個程式想要使用同一個資源,而該資源只能給一個程式使用怎麼辦
 
這時候有可能會發生死結,簡單的例子如
 
車子想要過橋或過山洞,可是山洞只能容許一台車經過
 
此時兩邊都有車子要過
 
兩邊的人都在等者過山洞 可是都沒辦法過去 這種就叫做死結
 
blabla講了一堆
 
課本講了四個發生死結的必要條件(必要條件就是當某件事情成立的時候,必要條件也一定成立)
 
是哪四個ㄌㄟ
 
1.mutual exclusion
2.circular waiting
3.hold and wait
4.no preemptive
 
當時我做了一些筆記
 
以下節錄我以前作業系統上課自己寫的心得筆記
 

  the four necessarily conditions of deadlock
  四個死結的必要條件
  mutual exclusion , circular waiting ,hold and wait ,no preemptive
  互斥,循環的等待,騎驢找馬,不可強佔
  mutual exclusion- u can't have two GFs at the same time
  互斥-妳不可以同時交兩個女朋友
  circular waiting- u r waiting for someone u love but she is also waiting
                   for someone but that guy is not u.and that guy love a
                   girl who love u but u don't love her.
  循環等待-某a愛某b,某b愛某c,某c愛某d,某d愛某a
  hold and wait-   u already have a GF but u want to  get another
  騎驢找馬(或是想要腳踏兩條船)- 妳已經有個女友但想找另外一個
  no preemptive-  u can't get a GF who is having a bf now, u should
                wait until she break up with her bf.
  不可強佔- 妳不可以搶一個已經有男朋友的女生
  當發生死結的時候一定會有上述情況.......
 
其實還滿有趣的
所以其實死結不是電腦的專有名詞
談感情的時候遇到死結
也同樣會有這四個必要條件
 
所以想要解決感情的死結
同樣的也可以設法避掉上述的條件就好~~~
比如說如果可以同時交好幾個男女朋友(就不會有互斥)
或是你改愛別人(就不會有循環等待)
或是妳的男女朋友可以讓給別人(就不會有Hold and wait)
或是妳有辦法可以搶過來(就不會有no preemptive)
 
簡單八~~~~談感情就是這麼簡單
 
 
 

淺入深出

有句話是這麼說
 
深入淺出是功夫,淺入淺出是庸俗,深入深出尚為可,入深出最可惡。
 
還有人更進一步,提出了不入深出的觀點
 
話說淺入深出最可惡
 
那不入深出應該是啥勒~是變魔術嗎~~
 
不論如何,既然都有了不入深出,那應該也有深入不出八
 
深入不出該叫做啥,好問題~~
 
不如叫它Camp
 
深入不出尚坎普
 
為啥叫它Camp
 
因為以前打CS的時候
 
最喜歡躲起來的人,我們都稱它Camper
 
這些人通常都有強大的火力和裝備
 
而且通常下場都滿慘的
 
若以作學問來說,明明已經知道了卻不願意分享他們的知識的人
 
或許也可以叫他們Camper
 
龜龜毛毛又不願意傳授一些知識
 
最討厭~~~
 
切記
有進有出,在進不難
 

PE (Portable Executable File Format) Sections

.pdata section-The data structure is a table stored in a COFF .pdata section. The .pdata section contains an array of function table entries for exception handling, and is pointed to by the exception table entry in the image data directory.
In most cases, PDATA structure occupies only eight bytes per function. For functions that have an exception handler, the PDATA_EHstructure requires an additional eight bytes.
 
.text section that contains the code bytes concatenated from all the object files.
.data section contains all the initialized global and static data,
.bss section contains the uninitialized data.
.rdata section contains the read-only data, such as string literals and constants. This section also contains some other read-only structures, such as the debug directory, the Thread Local Storage (TLS) directory, and so on,
.edata section contains information about the functions exported from a DLL,
.idata section stores information about the functions imported by an executable or a DLL.
.rsrc section contains various resources, such as menus and dialog boxes.
.reloc section stores the information required for relocating the image while loading.

Synchronization objects comparison

這個初學者就該知道的, 我竟然回答的很差~~~~~~~
1.Events

An event is simply an object that can become signaled. No one "owns" an event, but it can be used for synchronization. Events can be named which means they are "global" and many processes can open them by name. They can also just be unnamed and as such would only be seen within that process space.

Events can be manual reset or automatic. Automatic means as soon as a waiting thread gets signaled, the system automatically resets the event to 'not signaled'. If the event is manual, then the thread or any thread must eventually reset the event in order for it to become non signaled.

MS support two ways to signal the events

  • SetEvent does not automatically reset the event object to a nonsignaled state.
  • PulseEvent signals the event and then resets the event.

    For manual events, PulseEvent unblocks all threads waiting on the event.

    For automatic events, PulseEvent unblocks only one thread.

2.Mutex

A mutex is a synchronization object that can also be used globally by specifying a name. This means that multiple applications may also use the same mutex, and thus again it exists in the kernel. A mutex will only allow one thread to acquire it at a time.

3.Semaphore

The only real difference between a Semaphore and a Mutex is that a Semaphore can have a count > 1. While a mutex will only let one owner attempt access, a Semaphore can be assigned a number and allow "x" number of threads access.

4.Spinlocks

A spinlock is a synchronization object that is used to keep multiprocessor systems from accessing the same resource at the same time. The difference between a spinlock and a critical section is that the second processor will spin on this lock until it is able to acquire it, instead of allowing other threads to be scheduled to run.

On a single processor system, a spinlock will simply raise the IRQL level so that nothing else is scheduled in the time this code is executing. This means that you cannot access pageable memory, and you should perform only a small operation as you do not want to hog the processor.

1月5日

深入淺出DOA4

什麼是DOA?
抄一段搭特愛上面的解釋
abbr.
1. =date of arrival 到達日期
2. =date of availability 有效日期
3. =dead on arrival (警察驗屍報告用語)到達時已死亡
4. =direction of approach 進場著落方向
5. =disposal of assets 財產處置
6. =dissolved oxygen analysis 液態氧分析
 
其中以Dead on arrival最常聽到
 
但是在玩家心中
當然以上解釋都不是啦
當然是"デッドオアアライブ"
 
DOA吸引人的地方在於
她是第一個加入猜拳系統的遊戲,非常符合日本人喜愛玩野球拳的特性
所謂猜拳系統就是攻,摔,反制
攻剋摔,摔剋反制,反制剋攻
當然後面幾代的系統又加入的其他的特性 已經不完全這麼簡單
但是基本上還是這樣
比較特別的是OH(攻擊反制Offensive Hold)
這個看起來是摔技,但是可以剋攻擊
可以剋攻擊的摔技..穩~~~那不是無敵了嗎?
那OH到底有啥缺點ㄌㄟ,OH準備動作長,當敵人發現妳要OH的時候他可以摔妳
此時會大失血........
所以對高手還是小心使用為妙
尤其是對我學了這麼久 還是遜咖的人~~~
 
 
DOA人氣狂飆,我覺得有一個原因是她出了DOAX
陽光沙灘和比基尼女郎
實在是很吸引人
更猛的是2003年台北電玩展
MS請來的Showgirl更是一絕
 
難怪我會這麼喜歡DOA
 
 
 
 
 
1月4日

想玩Halo3 beta嗎?

Microsoft Reveals Two New Ways to Enter the Halo 3 Beta
 
第一個方法是買Crackdown
第二個方法是在2/1~2/3玩Halo2超過三小時 就會收到邀請
 
可惜
只給北美的玩家......
大失望~~
1月3日

How to declaire a pointer to a static member function?

The pointer to member function is different from a pointer to static member function.
 
Folloing is the example.
-------
class Foo {
public:
    static int One() {
        return otherVar;
    }
};
Void main(){
int (*fPtr)() = &SomeClass::someFunction;
cout << fPtr() << endl;
}