星期二, 12月 08, 2009

FAT32、NTFS 及 exFAT 之比較

FAT32
  • 總磁碟空間:15,674,912 KB(16,051,109,888 位元組)
  • 起始可用空間:15,674,904 KB(16,051,101,696 位元組)
  • 每個配置單元:8 KB (8,192 位元組)
  • 每個檔案的容量限制定 :2^32 = 4 GB


NTFS

  • 總磁碟空間:15,690,239 KB(16,066,801,664 位元組)
  • 起始可用空間:15,623,768 KB(15,998,738,432 位元組)
  • 每個配置單元:4 KB (4,096 位元組)


exFAT

  • 總磁碟空間:15,687,168 KB(16,063,660,032 位元組)
  • 起始可用空間:15,687,040 KB(16,063,528,960 位元組)
  • 每個配置單元: 32 KB(32,768 位元組)
  • 每個檔案的容量限制定 :2^64 = 16 EB
  • 供 Windows XP 使用的 exFAT 檔案系統驅動程式
    http://www.microsoft.com/downloads/details.aspx?FamilyID=1cbe3906-ddd1-4ca2-b727-c2dff5e30f61&displaylang=en




相對於目前電腦硬碟常用的 NTFS 檔案系統,FAT32 的結構和功能都相對簡單,同時不支援視窗的檔案安全權限和壓縮等功能。
但是同時因為它較為簡單的特性,在流動式儲存裝置上使用時,速度會較為理想。

另外再加上 NTFS 系統的檔案安全權限設定是依賴某台特定電腦才能使用,所以 FAT32 就理所當然地成為流動式儲存裝置和記憶卡廠商的必然選擇。


總結:

exFAT 
  • 流動性較低
  • 較能用盡每一吋空間
  • 存放動輒超過 4GB 的檔案
  • 讀取大容量檔案時獲得更理想的速度
  • 微軟針對快閃記憶體而開發

NTFS
  • 提供視窗系統的檔案安全權限、檔案壓縮、檔案連結等功能
  • 有較先進的安全權限設定外
  • 有日誌式的讀寫機制 => 對寫入次數有限的快閃記憶體並非好事

FAT32
  • 在流動式儲存裝置上應用時,速度較為理想
  • 結構和功能相對簡單 


星期一, 12月 07, 2009

Using Adobe Reader 6.0 - Introduction to Adobe Reader 6.0

Topic:Searching PDF documents using Adobe Reader 6.0


Question 1 of 4
What can you do when using the search feature in Adobe Reader?
Choose more than one option.

You can search across multiple Adobe PDF files
You can search bookmarks and comments in Adobe PDF documents
You can search the text in comments and in the document text
You can stop a search in progress, and then can resume it



Question 2 of 4
What are you able to do when performing an advanced search?
Choose more than one option.

You can search for an entire string of characters, including spaces
You can use the Boolean query search for single-document searches
You can use the proximity search for single-document searches
You can use the stemming search to find words that have the specified search word as their root


Question 3 of 4
You have been sent a number of PDF document by email and have opened them in your browser. You want to search through them for a particular name. What is the best way to do this?
Choose an option.

Open the PDF documents in the application and conduct an Advanced search individually
Open the PDF documents in your browser and conduct an Advanced search
Save the PDF documents to your desktop and conduct a search on each one
Save the PDF documents to your desktop and conduct a multiple document search from within the full Reader application


Question 4 of 4
You have opened a PDF file in your browser and want to search through it. Which search options are available to you?
Choose more than one option.

You can search all PDFs on the Internet
You can search bookmarks
You can search comments
You can search multiple documents 


#####################################

Topic:Editing and reviewing documents in Adobe Reader 6.0

Question 1 of 4
What items in a PDF document can you edit using Adobe Reader?
Choose more than one option.

Bookmarks
Images
Layers
Page layout
Tables
Text


Question 2 of 4
What editing features can be enabled in Adobe Reader?
Choose more than one option.

Attach file
Fonts
Highlighting
Page layout


Question 3 of 4
Identify functions of the commenting tools in Adobe Reader 6.0.
Choose more than one option.

Adding a layer
Creating a bookmark
Stamping a page
Underlining text


Question 4 of 4
You are reviewing a PDF document that has commenting enabled. What does Adobe Reader 6.0 enable you to edit?
Choose more than one option.

Comment opacity
Highlighting
Notes
Preferences


#####################################

Topic:Customizing Adobe Reader 6.0


Question 1 of 4
You want to remove the thin white border that is displayed around the edge of an Adobe PDF page before you print it. How should Adobe Reader 6.0 be set?
Choose an option.

To default Page Layout
To display pages edge to edge
To display the transparency grid
To use logical page numbers


Question 2 of 4
Which preference categories can you customize in Adobe Reader 6.0?
Choose more than one option.

Accessibility
Digital Signatures
Fonts
Forms
Internet


Question 3 of 4
You want to download and view PDF documents in Adobe Reader 6.0 one page at a time. How do you do this?
Choose an option.

Adjust the connection speed
Enable background downloading
Enable JavaScript
Enable the Fast Web View feature


Question 4 of 4
In which browsers can you view PDFs?
Choose more than one option.

America Online 6.0 or later
Internet Explorer 5.0 or later
Mozilla Firefox 1.0
Netscape Navigator 6.0 or later


Topic title: Accessibility, images, and eBooks in Adobe Reader 6.0


Question 1 of 4
What can you do when working with images in Adobe Reader?
Choose more than one option.

You can export any number of pictures onto the local machine
You can order prints of your pictures online
You can print pictures to standard photo sizes
You can view any JPEG files in Acrobat reader


Question 2 of 4
What can you do with eBooks downloaded from an online library?
Choose an option.

You can email borrowed eBooks to other users
You can return a borrowed eBook from a mobile device
You can send a borrowed eBook to a mobile device
You have to check in borrowed eBooks manually


Question 3 of 4
In which ways can you access copyrighted eBooks?
Choose more than one option.

You can borrow them from libraries
You can buy them from retailers
You can download them using file-sharing software
You can get them from other users.


Question 4 of 4
Suppose you are viewing a PDF file on your PDA. Which accessibility features are you likely to enable?
Choose more than one option.

Automatic scrolling
Font smoothing
Image viewer
Screen reading
Visibility adjustments

星期五, 12月 04, 2009

Creating rules and out-of-office mail in Lotus Notes 6

1. Which of the following statements about rules are true?

Choose more than one option.

All rules are enabled each time you log on
Exceptions can exist
There can be more than one action
There can be more than one condition


2. In what cases can you set up exceptions to out-of-office mail?

Choose more than one option.

If the body of the message contains specific information
If the person's e-mail address is outside your organization
If the subject contains specific information
If you are cc'ed on the mail
If you have specified the sender



3. Which of the following statements about filtering mail and automatic out-of-office replies to incoming mail are correct?

Choose more than one option.

You can check for messages that arrive on a certain date
You can delegate someone to set up your out-of-office agent
You can delete messages from a certain sender
You can provide special out-of-office replies to designated people
You can use the out-of-office feature to automatically update your Calendar schedule


4. Which of the following actions can be assigned to a rule?

Choose more than one option.

Mail can be deleted
Mail can be encrypted
Mail can be forwarded to another user
Mail can be sent to a particular folder
Mail can expire after a certain date

星期四, 12月 03, 2009

Setting Lotus Notes 6 mail preferences and stationery

1. Which of the following does the Basics tabbed page of the Preferences dialog box allow you to do?

Choose more than one option.

Change your Notes password
Create stationery
Set the spell checker
Specify whether messages in your Trash folder should be deleted automatically after 48 hours
Specify whether sent messages should be stored or deleted



2. Which of the following does the spell checker feature do?

Choose an option.

Spell checks on outgoing and incoming mail
Spell checks on your entire Notes client
Spell checks on your messages
Spell checks on your signatures




3. Which of the following can you specify as preferences?

Choose more than one option.

A hint when you forget your password
A maximum file size for mails
Letterheads
How often you want Notes to check for new mail
Setting both audio and visual alerts for new mail




4. Identify the true statements about setting up preferences for sending mail.

Choose more than one option.

You can add a digital signature to mail that you send
You can create memos in MS Word
You can omit the Fw: prefix on mail that you forward
You can retrieve memos that have been sent but not yet read
You can specify for a Save prompt to appear when you send mail




5. Which of the following can you do with the Stationery feature?

Choose more than one option.

Create a memo from stationery
Add encryption to a memo
Create stationery from a memo that you receive
Import a graphic into a header

星期三, 12月 02, 2009

Managing contacts and groups in Notes 6

1. Which of the following can be categorized?

Choose more than one option.

Contacts
Folders
Groups
Preferences
Views



2. Which of the following can you customize in the Personal Address Book?

Choose more than one option.

Address formats
Contact and contact groups categories
Contact expiry dates
Group members
The order in which names display




3. Which of the following does the Preferences feature allow you to do?

Choose an option.

Add members to existing groups
Manage categories
Manipulate the contact format in your address book
Manipulate the format of your messages

星期二, 12月 01, 2009

Adding contacts and groups to the Lotus Notes 6 PAB

1. Which of the following best describes the Personal Address Book?

Choose an option.

An address book for storing both employee and external contacts
An address book for storing external names and e-mail addresses
An address book for storing groups of external contacts
An organizational address book containing the names of all employees


2. Which of the following are true statements about creating contacts in the Personal Address Book?

Choose more than one option.

It is good practice to add the names of your direct colleagues even though they are in the company address book
You can add family details to a contact
You can add more than one e-mail address for a contact
You must add an e-mail address for each contact



3. Let's say you will be working with an internal team and a group of clients on a specific project. Which of the following can you set up to make it easy to contact these people?

Choose an option.

A draft e-mail containing all relevant addresses, which can be used to copy and paste as necessary
An individual contact containing the addresses of all the clients
One group containing all people
Two groups - one for external people, the other for internal people

星期四, 11月 26, 2009

Sams HTTP Server Keyphrase

Sams HTTP Server Keyphrase 是"schprodsvr"

websams 的 phrase 也是一樣

星期二, 11月 24, 2009

CS3161 (A) OPERATING SYSTEM PRINCIPLES (DR. LIU WENYIN) (09CS3161_LW) - Homework 2

1. Servers can be designed to limit the number of open connections. For example, a server may wish to have only N socket connections at any point in time. As soon as N connections are made, the server will not accept another incoming connection until an existing connection is released. Explain how semaphores can be used by a server to limit the number of concurrent connections.

A semaphore is initialized to the number of allowable open socket connections. When a connection is accepted, the acquire ( ) method is called. When a connection is released, the release ( ) method is called. If the system reaches the number of allowable socket connections, subsequent calls to acquire ( ) will block until an existing connection is terminated and the release method is invoked.

2. What is the meaning of the term busy waiting? What other kinds of waiting are there in an operating system? Can busy waiting be avoided altogether? Explain your answer.

A process is waiting for an event to occur and it does so by executing instructions.
A process is waiting for an event to occur in some waiting queue (e.g. I/O, semaphore) and it does so without having the CPU assigned to it.
Busy waiting cannot be avoided altogether.

3. Consider the traffic deadlock depicted in Figure 1.
a. Show that the four necessary conditions for deadlock indeed hold in this example.
b. State a simple rule for avoiding deadlocks in this system.

Figure 1 Traffic deadlock.

l Mutual exclusion: Only one car may be occupying a particular spot on the road at any instant.
l Hold and wait: No car ever backs up.
l No pre-emption: No car is permitted to push another car out of the way.
l Circular wait: Each corner of the city block contains vehicles whose movement depends on the vehicles blocking the next intersection.

4. Consider the following snapshot of a system:


Allocation
Max
Available

ABCD
ABCD
ABCD
P0
0012
0012
1520
P1
1000
1750

P2
1354
2356

P3
0632
0652

P4
0014
0656


Answer the following questions using the banker’s algorithm:
a. What is the content of the matrix Need?

Process
A
B
C
D
P0
0
0
0
0
P1
0
7
5
0
P2
1
0
0
2
P3
0
0
2
0
P4
0
6
4
2

b. Is the system in a safe state?

System is in safe state because resources are available (1, 5, 2, 0).

c. If a request from process P1 arrives for (0, 4, 2, 0), can the request be granted immediately?

Request from process P1 can be granted immediately. Request is (0, 4, 2, 0) and available resource is (1, 5, 2, 0).

5. A single-lane bridge connects the two Vermont villages of North tunbridge and South tunbridge. Farmers in the two villages use this bridge to deliver their produce to the neighboring town. The bridge can become deadlocked if both a northbound and a southbound farmer get on the bridge at the same time (Vermont farmers are stubborn and are unable to back up.) Using semaphores, design an algorithm that prevents deadlock. Initially, do not be concerned about starvation (the situation in which northbound farmers prevent southbound farmers from using the bridge or vice versa).


6. Consider a paging system with the page table stored in memory.
(a) If a memory reference takes 200 nanoseconds, how long does a paged memory reference take?

400 nanoseconds; 200 nanoseconds to access the page table and 200 nanoseconds to access the word in memory.


(b) If we add associative registers, and 75 percent of all page-table references are found in the associative registers, what is the effective memory reference time? (Assume that finding a page-table entry in the associative registers takes zero time, if the entry is there.)

Effective access time = 0.75X (200 nanoseconds) + 0.25 X (400 nanoseconds) = 250 nanoseconds.


7. (a) Compare paging with segmentation with respect to the amount of memory required by the address translation structures in order to convert virtual addresses to physical addresses.

Paging requires more memory overhead to maintain the translation structures. Segmentation requires just two registers per segment: one to maintain the base of the segment and the other to maintain the extent of the segment. Paging on the other hand requires one entry per page, and this entry provides the physical address in which the page is located.

(b) Why are segmentation and paging sometimes combined into one scheme?

Segmentation and paging are often combined in order to improve upon each other. Segmented paging is helpful when the page table becomes very large. A large contiguous section of the page table that is unused can be collapsed into a single segment table entry with a page-table address of zero. Paged segmentation handles the case of having very long segments that require a lot of time for allocation. By paging the segments, we reduce wasted memory due to external fragmentation as well as simplify the allocation

星期日, 11月 22, 2009

Ms Word 開啟及關閉速度很慢

近日發現當使用 Microsoft Office Word 2003 時,打開及關閉的速度變得很慢。
以前開關的速度快很多,近日没安裝新的軟件。

現在只有 Microsoft Office Word 2003 有這個問題,而 Microsoft Office Excel 2003 等程式的開啟關閉速度仍然正常。



解決方法:
1, 先關閉與 Microsoft Office 相關的程式
2, 「開始」=>「執行」=>輸入「%appdata%\microsoft\templates」後按「確定」
3, 將 normal.dot 文件刪除即可

星期六, 11月 21, 2009

商業大亨 - 店舖升級點

店舖升級點點先可以拎到??

每4小時就會比1點你, 冇ONLINE佢都會比你

仲有方法,常務工你有機會送,每日登陸獎勵1金幣可換1點,高級商會每日福利都會送

黃金寶箱,深海尋寶都有機率抽中

星期五, 11月 20, 2009

你的自我推銷功力有多高

你是一個王牌大間諜,要執行一項非常重要的任務,你會帶哪一台電腦去呢?

A、無線輕型的電腦,隨時都可以上網。

B、耐用基本型的電腦,不僅基本功能非常的強,而且很耐用。

C、專業訴求功能強的電腦,不管你是哪一行、哪一業,它都可以滿足你的專業。

D、外型時尚的電腦,帶出去時一定要有好看的感覺,覺得是一個很好的配件。
















解析:

A、無線輕型的電腦,隨時都可以上網。

你們是藍鑽型的推銷高手,因為口才一流的你,七分功夫可以說成十分功夫,然後輕鬆的得到大家的欣賞,並且把自己給推銷出去了;其實這類型的朋友,你們對自己的自信是無敵的自信,不管是工作上或專業上,只要你看到老闆的時候,那個光芒就會馬上射出來,然後口若懸河、口才一流,那老闆就會覺得你說的好像都是真的、好像還不錯喔,所以選這個答案的朋友,你就是傳說中高手中的高手喔!



B、耐用基本型的電腦,不僅基本功能非常的強,而且很耐用。

你是白金級的推銷高手,因為懂得把握機會的你,只要遇到適合自己的伯樂出現,你就會把自己最好的一面推銷出去;那這類型的朋友,平常就是默默的在工作,大家都會把他當成空氣一樣,不覺得他的存在,不過當伯樂出現的時候,他會把自己的才華秀出來,這的時候的他就會顯得特別的厲害。



C、專業訴求功能強的電腦,不管你是哪一行、哪一業,它都可以滿足你的專業。

你們推銷自己的功力平平,因為老實謙虛的你只會默默的努力,覺得一分耕耘一分收穫,有把握的時候才會推銷自己,所以你們推銷自己的功力其實是有一點遜的;那這類型的朋友非常的腳踏實地,你會覺得臺上一分功、台下要十年功,所以你們累積很多的時間訓練自己各方面的才能,等到有機會的時候才會站出來,但是只要一讓你表演,一定馬上就會光芒萬丈。



D、外型時尚的電腦,帶出去時一定要有好看的感覺,覺得是一個很好的配件。

你們推銷自己反而會吃閉門羹,所以最好不要推銷自己,因為有時候會因為太緊張而失常的你們,常常會出現反效果;那這類型的朋友其實是非常有才華型的,所以你們不用刻意推銷自己,只要把平時累積的才華很自然的表現出來,老闆就會看得到了。

星期四, 11月 19, 2009

商業大亨 - 天然氣

天然氣交易市場有人賣
如果自己生產沒有開油田的可參考,因為開油田資金太大,有限公司才能開採

1. 工廠設備3級以上,可建煉油場
2. 去交易市場買原油來提煉(1級每天可產24瓶),原油可提煉柴油(增加貨物生產速度)或天然氣
3. 放進店舖使用(1級天然氣可增加店收入10%,8小時耗一瓶)

TPS:柴油可增加貨物生產速度(1級柴油+5%)

星期三, 11月 18, 2009

ASP.NET应用程序

为了创建ASP.NET应用程序,你必须执行下列哪些操作?

把页面和资源放置在ASP.NET目录中
引用\bin目录中的组件
把虚拟或物理目录标记为应用程序
把global.asax文件放置在根文件夹中



Application 指令允许你定义global.asax文件将要使用的基类。



辨别出用来存放ASP.NET程序集的应用程序根目录中的资源。

\bin
global.asa
global.asax
Web.config





辨别ASP.NET应用程序总是调用的方法。

Read和Write
Begin和End
Application_Start和Application_End
Open和Close

星期二, 11月 17, 2009

ASP.NET配置

下列哪个ASP.NET配置节允许你把默认语言从VB更改为C#?


<system.net>
<compilation>
<trace>
<httphandler>
<customerrors>



GetConfig 方法 的功能是检索用户定义的配置设置,而用来访问配置文件节中的配置设置的 属性 是AppSettings。











下列哪些属于ASP.NET配置系统的功能?

ASP.NET提供分层可扩展的基础结构
ASP.NET配置文件适用于任意ASP.NET Web应用程序服务器上的物理目录结构
ASP.NET配置设置存储在名为Web.config的基于XML的文本文件中
ASP.NET配置要求访问本地服务器
ASP.NET可以使应用程序配置数据的更改立刻生效,且不需要用户干涉

星期一, 11月 16, 2009

map printer 問題

因為notebook係無join到domain, 就算我係printer server個安全性度俾哂所有權限俾everyone都唔得...


解決方法:

可以用ipc$呢個share黎做authentication
用net user \\computername\ipc$ password /user:username
最好加埋domain name俾佢
net user \\computername\ipc$ password /user:domainname\username
做完authentication先可以用con2prt黎map個printer

星期日, 11月 15, 2009

.NET程序集介绍

你将使用下列哪个程序集清单属性指定程序集用于Retail还是Debug?

AssemblyDefaultAliasAttribute
AssemblyDescriptionAttribute
AssemblyConfigurationAttribute
AssemblyTitleAttribute



程序集在下列哪个阶段属于最小的粒度单元?

加载
部署
版本化
安全性
JIT编译




下列哪些项必须始终包含在程序集清单中?

简单文本名
绑定策略信息
公用类型信息
所有依赖程序集列表(假设存在一些依赖程序集)
公钥





你希望生成和部署一个使用C#和VB.NET编写的应用程序,并且包括共享的托管代码库和特定区域性资源。可能采用下列哪些解决方案?

把所有文件合并为单个强命名程序集
将每个代码库、资源文件和托管代码文件生成为一个单独的私有程序集,被一个中心强命名程序集引用
把每个库和资源文件生成为单独的强命名程序集,并把语言文件合并为多文件私有程序集
把每个库和资源文件生成为单独的强命名程序集,并把语言文件合并为多文件强命名程序集





选择出有关强命名程序集的正确描述。

它们可以被不同的应用程序共享
私有程序集不能拥有强名称
强名称必须包含区域性
强名称必须包含一个四个数字的版本号
具有强名称的程序集必须始终存放在全局程序集缓存中

星期六, 11月 14, 2009

稽核誰人在伺服器上刪除資料

1. 如果要Audit的share folder存在於Domain Controller,編輯Default Domain Controller Policy。
如果要Audit的share folder存在於普通的File Server,建立一個OU並把File Server移到這個ou,新建一個Group Policy。

2. 選取 [Computer Configuration 電腦設定] à [Windows Settings Windows 設定] à
[Security Settings 安全性設定] à [Local Policies 本機原則] à [Audit Policy 稽核]













3. 選取 [Audit object access 稽核物件存取] à選取 [Success 成功]

















4. 按 [Apply 套用] 和關閉所有視窗。

5. 在 Share Folder 的實體位址按滑鼠右鍵選 [Properties內容] à [Security安全性] à
[Advanced進階] à [Auditing 稽核] à [Add 新增],新增使用者”Everyone”。


















6. 選取 [Delete] 和 [Delete Subfolders and Files]






















* 如另一個Share Drive都要Auditing, 需重做Step 5-6.

係Server的Event Viewer選取 [Security],你可知道誰刪除了檔案。














星期五, 11月 13, 2009

black magic - 有冇

例如:
有: 馬票, 穿PRADA的惡魔, 陳貝兒, 新抱大戰哥斯奶
冇: 鳳凰號, 奇幻世紀, 行運超人, 中華英雄


咁仲有咩野係有 ??











==========







其實, 玩法類似個 iq 題 "女孩子有個部位,爸爸可以碰兩次,老公一次都不能碰"
同"爸爸掂得..媽媽掂得..哥哥同姐姐唔掂得..弟弟唔掂得..妹妹掂得"

咪就係嘴唇囉~
發音有掂嘴唇就有~ ^^

星期四, 11月 12, 2009

商業大亨心得

商業必殺技能

這次說的必殺技想必有玩過大陸版的老手應該都知道,但是很多新手可能也不知道,每週錯失了這些雙倍獎勵,收入不如人,紅人橙人又升級失敗等等...關鍵就在以下的每週定期雙倍活動,懂得恰巧使用,那就等於贏了一倍時間。)



每週星期一:人物常務工作:思考、看報紙、巡視公司、溝通執行後獲得的獎勵雙倍; (遊戲最缺是什麼?沒錯...是店舖升級點,常務是最容易取到的途徑,抽到雙倍時真的會開心死)

每週星期二:人物常務工作:分析、談判、出差、開會執行後所獲得的獎勵雙倍; (同上)

每週星期三:日常任務獎勵雙倍; (全面賺,G幣、經驗、魅力、屬性點通通雙倍)

每週星期四:員工常務工作:接電話、派傳單執行後獲得的獎勵雙倍; (賺雙倍的員工屬性點唷,不可錯過)

每週星期五:員工常務工作:寫報表、策劃方案、腦力訓練、商場促銷執行後獲得雙倍獎勵; (同上)

每週星期六:深造員工成功幾率雙倍; (推薦用於升級藍名員工,升白及綠名員工可以在沒加倍的時倍升也沒差)

每週星期日:黑衣人獎勵雙倍; (預到金幣黑衣人你就爽...)

星期三, 11月 11, 2009

创建和打包.NET程序集

Q1. 辨别有关程序集创建的正确描述。

单文件程序集把它们自己的所有代码、资源和元数据都包含在单个文件中
多文件程序集可以包含多个文件,但是只有一个清单
在多文件程序集中,清单必须在它自己的文件中
把不常使用的资源或代码分割为单独程序集的操作可以减少下载次数
Visual Studio .NET允许你创建单文件程序集和多文件程序集



Q2. 辨别创建和使用延迟签名程序集所需要的步骤的正确顺序。

生成密钥对、使用私钥签名程序集、打开签名验证、使用公钥进行部署
生成密钥对、提取公钥、添加AssemblyDelaySign属性、关闭签名验证、开发完成后使用私钥签名
关闭签名验证、添加AssemblyDelaySign属性、生成密钥对、开发完成后使用私钥签名



Q3. 你要在命令行中使用C#编译器生成可执行文件(DLL)。源文件名为myFile.cs,并且输出到myLibrary.dll中。选择获取该执行结果的命令。

csc myFile.cs
csc /out:myLibrary.dll myFile.cs
csc /t:library /out:myLibrary.dll myFile.cs
csc /out:dll /library:myLibrary myFile.cs



Q4. 你已经创建了一个公用/私有密钥对,还想使用私钥创建一个强命名程序集。下列哪些操作可以提供给你该结果?

把AssemblyKeyFile属性包含在任意一个源文件中
把AssemblyKeyFile属性包含在所有源文件中
使用带/keyfile选项的程序集生成工具
使用强名称工具生成该程序集,然后进行签名

星期二, 11月 10, 2009

.NET中的附属程序集和本地化

Q1. 辨别有关附属程序集创建的正确描述。

可以通过简单命名资源文件来指定区域性
它们包含资源但是没有可执行代码
必须一致地命名结果附属程序集
al/embed选项可使你把资源文件嵌入到程序集中
使用程序集生成工具创建它们


Q2. 查找资源程序集时,资源定位管理器将首先检查下列哪项内容?

检查程序集的子目录,查找父区域性资源文件
检查程序集的主目录,查找特定的匹配程序集
检查GAC,查找匹配程序集
检查GAC,查找匹配的父程序集


Q3. 假设你拥有一套本地化帮助文件资源。每个文件的名称都是HelpFile。美国英语资源文件的正确名称是什么?

HelpFile.resources.en-US
HelpFile.en.US.resources
HelpFile.en-US.resources
en-US.HelpFile.resources
只是HelpFile,因为它将存储在特定区域性目录中


Q4. 为了查找某区域的准确匹配程序集而检查完所有的位置后,资源定位管理器接下来将执行什么操作?

停止搜索并产生异常
查找默认区域性程序集
查找父区域性程序集

星期一, 11月 09, 2009

.NET程序集的绑定策略

1) 选择有关私有程序集的正确描述。

私有程序集可以被随时更新,且不会影响其他应用程序
私有程序集必须总具有一个版本号,但是在绑定时忽略版本号
私有程序集必须位于应用程序的主目录结构中
如果在本地目录结构中没有找到私有程序集,那么CLR将在GAC中探测私有程序集


2) 下列哪个选项准确定义了安全模式?

发行者允许管理员在其中重写默认绑定策略的配置
应用程序开发人员禁止发行者策略在其中重写应用程序策略的配置
管理员在其中完全控制程序集的所有绑定策略的配置
不能在其中重写默认绑定规则的配置


3) 辨别出有关默认绑定的正确描述。

管理员通过管理员策略可以完全控制所有的绑定规则
默认绑定可以在编译后重写,且被包含在程序集清单中
默认绑定可以在编译后重写,但是必须在部署前重写
默认绑定规则可以在三个不同的策略级别中重写
你可以在程序集清单中指定默认绑定规则不被重写


4) 下列哪个序列按照正确的评价顺序正确表示出策略级别?

管理员、应用程序、发行者
管理员、发行者、应用程序
应用程序、发行者、管理员
发行者、应用程序、管理员
发行者、管理员、应用程序

星期日, 11月 08, 2009

NET中的策略配置文件

1. 假设你想通过指定程序集加载程序可以搜索的子目录来帮助程序集加载。下列哪个选项可使你实现该操作?

计算机配置文件中的bindingRedirect元素
计算机配置文件中的codeBase元素
应用程序配置文件中的probing元素
发行者策略文件中的publisherPolicy元素


2. 假设你想指定可被一个新版本替换的依赖程序集的版本范围。在哪个XML元素中指定新旧版本?

dependentAssembly
codeBase
assemblyIdentity
bindingRedirect


3. 选择assemblyIdentity元素中的属性。

culture
name
publicKey
Tokenversion
xmlns



4. codeBase 元素在强名称程序集的版本和href属性中指定它的版本和位置。

星期六, 11月 07, 2009

使用.NET程序集的动态属性

(1) 辨别有关动态属性的正确描述。

任何可移植可执行(PE)文件都可以存储和检索动态属性
在运行时中,Windows应用程序把它们的动态属性存储在app.config文件中
动态属性通常存储在XML配置文件的节中
Web应用程序自动重读被更改的配置文件项,且不需要重新启动或重新部署
只有在重新部署Web应用程序后配置文件项所做的更改才能生效


(2) 辨别有关动态属性的正确描述。

在设计阶段,Windows应用程序把它们的动态属性存储在app.config文件中
动态属性可以在任意数量的配置文件中显示
Web应用程序把它们的动态属性存储在Web.config文件中
Windows应用程序若要读取被更改的属性值配置项,则必须重新启动


(3) 动态属性存储在相关XML配置文件的哪个元素中?

<appsettings>
<assemblybinding>
<codebase>
<runtime>

星期五, 11月 06, 2009

CS3161 (A) OPERATING SYSTEM PRINCIPLES (DR. LIU WENYIN) (09CS3161_LW) - Answers to Tutorial 9 Questions

Q1 When does page fault occur ? Describe the action taken by the operating system when a page fault occurs.

A page fault occurs when an access to a page that has not been brought into main memory takes place (invalid page bit set in page table).
Page Fault Handling procedures,
(1)Scan the page table entry, the page is invalid – page fault occurs;
(2)O.S. generate TRAP interrupt;
(3)Locate the page with data in secondary storage;
(4)I/O requested to read the needed page into the available free frame;
(5)Upon completion of I/O, the process table and page table are updated as valid page and address in memory;
(6)The instruction is restarted.






Q2 (i) What is a page replacement ?(ii) What does the dirty bit mean ?


(i) Page replacement is the scheme (algorithm) to identify a victim page for replacement when all available frames (memory) are all currently used.
Page replacement operation involves selecting a frame (preferably not currently in use) as a victim for replacement; swap it out; swap in the desired page into the free frame; restart program.
Available page replacement scheme include FCFS, LFU, NRU.
(ii) A bit stored in the page table, if set, the page has been modified (dirty page), and must be written back to backing store before being use as a victim for page replacement to create a free frame in physical memory.
It is desirable try not to replace a dirty page, since it will take longer (with the write-back operation).




Q3 (i) What is Thrashing ?(ii) How does the system detect thrashing ?(iii) What can the system do to eliminate it ?


(i) Thrashing in a virtual memory system is a high page fault activities situation, where the system spends most of the time in page swapping than executing processes.
Thrashing is caused by under-allocation of the minimum number of pages required by a process, forcing it to continuously page fault.
(ii) The system can detect thrashing by elevating the level of CPU utilisation as compared to the level of multiprogramming.
The sudden drop in CPU utilisation while increasing the level of multiprogramming (increasing the number of processes) identifies the thrashing point.
(iii) Thrashing can be eliminated by reducing the level of multiprogramming, (that is to decrease the number of processes in the system).

星期二, 11月 03, 2009

CS3161 (A) OPERATING SYSTEM PRINCIPLES (DR. LIU WENYIN) (09CS3161_LW) - Answers to Tutorial 8 Questions

Q1 Explain the difference between internal and external fragmentation in memory management. Suggest ways to reduce or solve of both types of fragmentation.


Internal fragmentation is the area in a region or a page which is not used by the job occupied that region or page. This space is unavailable for use by the system until that job is finished or the region is released.

External fragmentation is a region which is unused and available, but it is too small for any of the waiting jobs.

To reduce or solve problems of fragmentation :
Internal fragmentation - reduce size of individual region / allocation unit.
External fragmentation - break down request into non-contiguous portions, compaction, swapping.



Q2 What is compaction ? Why use it ?


Movement of processes to eliminate small free memory partitions. Compaction is used to eliminate memory fragmentation (external) and to increase memory utilization.

It allows smaller memory partitions to form fewer bigger ones, thus allowing larger processes to run.





Q3 Given memory partition of 100K, 500K, 200K, 300K, and 600K (in order), how each of the First-fit, Best-fit, and Worst-fit algorithms place processes of 212K, 417K, 112K, and 426K (in order) ? Which algorithm makes the most efficient use of memory ?


(1) First-fit :
212K is put in 500K partition
417K is put in 600K partition
112K is put in 288K partition (new partition 288K = 500K - 212K)
426K must wait
(2) Best-fit :
212K is put in 300K partition
417K is put in 500K partition
112K is put in 200K partition
426K is put in 600K partition
(3) Worst-fit :
212K is put in 600K partition
417K is put in 500K partition
112K is put in 388K partition
426K must wait

In this example, the best-fit turns out to be the best algorithm.



Q4 (i) What is paging ?(ii) What is a frame ?(iii) What is contained in the page table ?(iv) How many frames are needed for each page ?(V)Draw the diagram to show how paging works.


(i) Splitting program up into a group of fixed-equal-sized partitions, allowing the parts to be non-contiguous in memory, during the execution of the process.
(ii) Fixed-size block of physical memory, each block must be of the same size as one page.
(iii) Page number, frame number, base address of each frame, presence, protection (permission), dirty bit.
(iv) One.

星期一, 11月 02, 2009

商業大亨 - 員工深造機率說明

如下是有關說明:(內容較多,請耐心細看)

白升綠,基礎成功機率 40%;能力值每增加10點,成功機率增加1%,最多累積 10%;熟練度每超過基礎值的20%,成功機率增加10%,最多累計 40%;公司等級加成=公司等級 * 1%。最高機率 99%

綠升藍,基礎成功機率 20%;能力值每增加10點,成功機率增加0.5%,最多累積 5%;熟練度每超過基礎值的20%,成功機率增加5%,最多累積 10%;公司等級加成=公司等級 * 1%。普通情況最高機率為 44%,週六基礎成功機率雙倍,即40%,最高成功機率 64%。

藍升紫,基礎成功機率 5%,能力值每增加10點,成功機率增加0.1%,最多累積 1%;熟練度每超過基礎值的20%,成功機率增加2%,最多累計 2%;公司等級加成=公司等級 * 1%。普通情況最高機率為 17%,週六基礎成功機率雙倍,即10%,最高成功機率 22%

紫升紅,基礎成功機率 1%,能力值每增加10點,成功機率增加0.05%,最多累積 0.5%;無熟練度加成;公司等級加成=公司等級 * 1%。普通情況最高機率 10.5 %,週六基礎成功機率雙倍,即2%,最高成功機率 11.5%

總結:
白升綠,成功率40%〜99%
綠升藍,成功率20%〜44%,週六為:40%〜64%
藍升紫,成功率5%〜17%,週六為:10%〜22%
紫升紅,成功率1%〜10.5%,週六為:2%〜11.5% .
能力值,熟練度,公司等級高,相對成功率也高。
週六要抓住機會深造!

星期日, 11月 01, 2009

black magic - 風水師

風水師幫過咩野睇相 ??


劉羽琦有, 陳法拉有, 陳奕冇
無線有, 亞視冇,
外圍賭錢有, 香港賽馬會冇,
新版銀紙有, 紀念馬票冇,
2012 末日預言冇, 宮心計都冇, 但係皇上有.
咁佢仲有睇過咩野 ??







====







開估:
















有金木水火土既字就有..
所以...劉(金)羽琦(土), 陳法(土)拉, 無線(水) ,外圍賭錢(金), 新(木)版銀(金)紙, 皇(土)上都有 ~

星期六, 10月 31, 2009

查看 Windows 7 RC 使用期限

近日有很多人嘗試破解 win 7 Release Candidate, 轉為 OEM 版的Windows 7 Ultimate 。
但如何得知成功與否?

WINVER: 版本顯示器, 它可以快速打開顯示系統版本資訊的視窗, 包括版本及有否使用期限。

星期三, 10月 28, 2009

CS3161 (A) OPERATING SYSTEM PRINCIPLES (DR. LIU WENYIN) (09CS3161_LW) - Answers to Tutorial 7 Questions

Q1 What is a critical section problem ? What is a safe state ?


Critical Section Problem
- A critical section is a section of code, sharing or interacts with other processes in which only one process (among processes) at a time can be executing.
- Critical section problem involved in design an algorithm which allows at most one process into the critical section at a time, without deadlock.

Safe State
- A set of resource allocations such that the system can allocate resources to each process (up to its maximum requested resources) and in some order (completion sequence), and still avoid a deadlock.





Q2 Define deadlock and the four necessary conditions needed before deadlock can occur ?


A situation where every process is waiting for an event which can be triggered only by another process.
The four necessary conditions for deadlock to occur :
1 Mutual exclusion: At least one resource must be held in a non-sharable mode.
2 Hold and wait: A process holding at least one resource is waiting for more resources held by other processes.
3 No preemption: Resource cannot be preempted.
4 There must be a circular waiting condition for processes.






Question 3

Consider the following snapshot of a system. There are no current outstanding queued unsatisfied requests.
Maximum resources
r1 r2 r3 r4
6 7 12 12
current allocation maximum demand
process r1 r2 r3 r4 r1 r2 r3 r4
p1 0 0 1 2 0 0 1 2
p2 2 0 0 0 2 7 5 0
p3 0 0 3 4 6 6 5 6
p4 2 3 5 4 4 3 5 6
p5 0 3 3 2 0 6 5 2
Is this system current in a safe or unsafe state ? Why ?




needs
r1 r2 r3 r4
0 0 0 0
0 7 5 0
6 6 2 2
2 0 0 2
0 3 2 0
Running the Banker's Algorithm, we see processes can finished in the order p1, p4, p5, p2, p3. The system is in a safe state since there is a completion path.

星期三, 10月 21, 2009

一項數學挑戰^^-你若是工程師,你應該可在三分鐘內解開這道題!!‏

答案是多少啊? 算的出來嗎?

這是項數學挑戰!有這麼一種說法:

你若是工程師,你應該可在三分鐘內(30秒左右吧)解開這道題;你若是建築師,給你三小時;你若是醫生,給你六小時;你若是會計師,三個月吧~假若你是律師,大概永遠也解不出來。

你若擅長數學或邏輯性的問題,解開這道挑戰題,並以答案為密碼,打開附件,將你的名字加在名人堂裡面。

問題如下:空格中的數字為?

1, 2, 6, 42, 1806, ____???


答案就是密碼,可以打開附件檔案。你若能順利解題,請將你的名字加上,存檔後再

寄給你的朋友^^








==========================














答案: 3263442

1st: 1
2nd: 1 + 1X1
3rd: 2 + 2x2
4th: 6 + 6x6
5th: 42 + 42x42
6th: 1806 + 1806x1806

星期二, 10月 20, 2009

CS3161 (A) OPERATING SYSTEM PRINCIPLES (DR. LIU WENYIN) (09CS3161_LW) - Answers to Tutorial 6 Questions

Q1 Study of The Producer-Consumer Problem (Bounded Buffer Problem)(i) Using pseudo code to represent the problem;(ii) Provides a solution using semaphore;(iii) Provides a solution using monitor;


(i) Description of the problem
. Two processes share a common, fixed-size buffer
. One process, the producer, puts data into the buffer, the other process, the consumer, takes it out.
. When producer wants to put a datum into the buffer, but it is full, producer goes to sleep, to be awakened when the consumer removes one or more data.
. When consumer wants to remove a datum from the buffer, when the buffer is empty, consumer goes to sleep, until producer put one datum into the buffer.
nRepresentation of the producer-consumer problem
. count = variable, to keep track of the number of data in buffer
N = maximum number of data number the buffer can hold

. consumer test count,
either count = 0 , go to sleep
or count = count -1
. each process tests if the other process should be sleeping, if not, wakes it up
. SLEEP and WAKEUP are system call for process manipulation
. enter_data and remove_data are procedures for putting and taking data in and out of the buffer





Code representing the Producer-consumer problem :
#include “prototypes.h”
#define N 100 /* number of slots in the buffer */
int count = 0; /* number of data items in buffer */
void producer (void)
{
int data;
while (TRUE) { /* repeat forever */
data = produce_data(); /* generate next data */
if (count == N) sleep(); /* if buffer is full, go to sleep */
enter_data(data); /* put data in buffer */
count ++; /* increment count of data number in buffer */
if (count == 1) wakeup(consumer); /* buffer not empty now and can be consumed now, notify consumer…*/
}
}
void consumer(void)
{
int data;
while (TRUE) { /* repeat forever */
if (count == 0) sleep(); /* if buffer is empty, go to sleep */
data = remove_data(); /* take data out of buffer */
count --; /* decrement count of data number in buffer */
if (count == N -1) wakeup(producer); /* buffer becomes not full and can be put more data, should notify producer */
consume_data(data); /* print data */
}
}



. Race Condition can occur executing the above code :

count++ could be implemented as
register1 = count
register1 = register1 + 1
count = register1

count-- could be implemented as
register2 = count
register2 = register2 - 1
count = register2

Consider this execution interleaving with “count = 5” initially:

S0: producer execute register1 = count {register1 = 5}
S1: producer execute register1 = register1 + 1 {register1 = 6}
S2: consumer execute register2 = count {register2 = 5}
S3: consumer execute register2 = register2 - 1 {register2 = 4}
S4: producer execute count = register1 {count = 6 }
S5: consumer execute count = register2 {count = 4}






(ii) Semaphores
. Semaphore is an integer variable
. When semaphore = 0, no resource is available
when semaphore > 0, # of resource abailable
. Semaphore can be operated in two operations ( Wait, Signal) :
Wait (sleep)
(i) checks to see if the semaphore value > 0 or = 0
(ii) if semaphore > 0, decrement the value, process execute critical section…,
if semaphore = 0, process put to sleep
Signal (wakeup)
(i) increment semaphore by 1
(ii) one of the sleeping process is awaken
. Wait () and Signal () operations are all done as a single, indivisible atomic action
. Signal and Wait are implemented as system calls; interrupts are disabled during execution to ensure atomic action ( protected by a lock variable mutex if necessary, as mutual exclusion)






The producer-consumer problem using semaphore
. Three semaphores are used :
full - counting the number of slots that are full.
empty - counting the number of slots that are empty.
The full and empty semaphores ensure that producer stops running when the buffer is full, consumer stops running when it is empty.
mutex - to make sure consumer and producer do no access the buffer at the same time.
mutex = 0 , no process can operate on semaphore ;
mutex = 1, process can perform Signal or Wait.
. Initially :
full = 0
empty = number of slot in the buffer.
mutex = 1 (can only take 1 or 0 - binary semaphore).
. Each process does a Wait before entering its critical region,
a Signal after leaving the critical region.




#include “prototypes.h”
#define N 100 /* number of slots in the buffer */
typedef int semaphore; /* semaphores are a special kind of int */
semaphore mutex = 1; /* controls access to critical region */
semaphore empty = N; /* counts empty buffer slots */
semaphore full = 0; /* counts full buffer slots */
void producer(void)
{
int data;
while (TRUE) { /* TRUE is the constant 1 */
data = produce_data(); /* generate data to put in buffer */
Wait(&empty); /* decrement empty count */
Wait(&mutex); /* enter critical region */
enter_data(data); /* put new data in buffer */
Signal(&mutex); /* leave critical region */
Signal(&full); /* increment count of full slots */
}
}
void consumer(void)
{
int data;
while (TRUE) { /* infinite loop */
Wait(&full); /* decrement full count */
Wait(&mutex); /* enter critical region */
data = remove_data(); /* take data from buffer */
Signal(&mutex); /* leave critical region */
Signal(&empty); /* increment count of empty slots */
consume_data(data); /* do something with the data */
}
}




(iii) Monitors
. monitor - a collection of procedures, variables and data structures in a package
. only one process can be active in a monitor at any instant
. compiler knows they are special monitor procedures (different from other procedure calls) and ensure only one process allows in the monitor, otherwise the calling process will be suspended until other process has left (mutual exclusion).
. Example of a monitor :
monitor example
integer i;
condition c;
procedure producer(x);


end;
procedure consumer(x);


end;
end monitor;
. A way for process to block when they cannot proceed - condition variables and operations WAIT and SIGNAL
When a monitor procedure finds that it cannot continue (such as for producer finds the buffer is full), it WAIT on the condition variable, full. The calling process will block itself, allowing another process (previously been blocked) to enter monitor
When a process (such as the consumer) wake up other sleeping process by doing a SIGNAL on the condition variable that other process is waiting on and must exited from the monitor immediately. SIGNAL must appear as the last statement (before exit) in a monitor.
The WAIT must come before the SIGNAL




Solution for the producer-consumer problem using monitor :
monitor ProducerConsumer
condition full, empty;
integer count, N;
function enter(data:integer);
begin
if count = N then wait(full);
enter_data(data);
count := count + 1;
if count = 1 then signal(empty)
end;
function remove(data:integer);
begin
if count = 0 then wait(empty);
data = remove_data;
count := count - 1;
if count = N - 1 then signal(full)
end;
count := 0;
end monitor;


procedure producer;
begin
while true do
begin
data = produce_data;
ProducerConsumer.enter(data)
end
end;
procedure consumer;
begin
while true do
begin
ProducerConsumer.remove;
consume_data(data)
end
end;
. monitors are a programming language concept and monitor procedures must be recognised by compiler to enforce mutual exclusion.

星期一, 10月 19, 2009

情人節該送多少枝玫瑰花

玫瑰花象徵愛情,為萬花中之女王,為世人所鐘愛。玫瑰花在日本古代稱為庚甲花、月季花或長壽花;是因一年當中庚甲之季第一朵玫瑰花開花,並一年開多次花,故又名長壽花。


送不同數目的玫瑰花,有著不同的心意。
1朵 你是唯一 2朵 你儂我儂
3朵 我愛你 4朵 誓言;承諾
5朵 無悔 6朵 順利
7朵 喜相逢 8朵 彌補
9朵 堅定的愛 10朵 完美的你;十全十美
11朵 一心一意;最美 12朵 心心相印
13朵 暗戀 17朵 好聚好散
20朵 此情不渝 21朵 最愛
22朵 雙雙對對 24朵 思念
33朵 我愛你;三生三世 36朵 海誓山盟
44朵 至死不渝 50朵 無悔的愛
56朵 吾愛 57朵 吾愛吾妻
66朵 情場順利;真愛不變 77朵 有緣相逢
88朵 用心彌補 99朵 長相守
100朵 白頭偕老;百年好合 101朵 唯一的愛
108朵 求婚 111朵 無盡的愛
144朵 愛你生生世世 365朵 天天想你
999朵 天長地久 1001朵 直到永遠

星期日, 10月 18, 2009

5个笑话‏

5个笑话解读男女区别



1、关于本能

  一家专营女性婚姻服务的店在市中心全新开张,女人们可以直接进去挑选—个心仪的配偶。在店门口,立了一面告示牌:—个人只能进去逛—次!店里共有六层楼,随着高度的上升,男人的质量也越高,不过请注意,顾客能在任何一层楼选—个丈夫或者选择上楼,但不能回到以前逛过的楼层……

  —个女人来这家店寻找—个老公。

一楼写着:这里的男人有工作。女人看也不看就上了第二层楼,
二楼写着:这里的男人有工作而且热爱小孩。女人上了三楼,
三楼写着:这里的男人有工作而且热爱小孩,还很帅。哇!她叹道,但仍强迫自己往上爬。
四楼:这里的男人有工作而且热爱小孩。令人窒息的帅,还会帮忙做家务。哇!饶了我吧!女人叫道,我快站不住脚了!接着她仍然爬上了五楼。
五楼:这里的男人有工作而且热爱小孩,令人窒息的帅,还会帮忙做家务,更有着强烈的浪漫情怀。女人简直想留在这一层楼,但仍抱着满腹期待走向最高一层。

第六楼出现了一面巨大的电子告示板,上面写道:你是这层楼的第123456789位访客,这里不存在任何男人,这层楼的存在只是为了证明女人有多么不可能取悦。谢谢光临……

  不久,一家专营男性婚姻服务的店在街对面开张,经营方式与前者—模—样。第一层的女人长得漂亮。第二层的女人长得漂亮并且有钱……结果,二层以上,第三层至六层的楼层从来没有男人上去过……

解读:女人的本能是幻想。男人的本能是现实。这就是为什么优秀的剩女永远多于优秀的剩男的原因,也是为什么婚姻里的怨女多过怨男的理由。与其两手空空,还是抓住现有的优点吧,和爱人的优点过日子。

2、关于信任

  —个女人有—晚没回家,隔天跟老公说自己睡在—个女性朋友那里,她老公打电话给她最好的1O个朋友,没有—个朋友知道这件事!

  —个男人有—晚没回家睡,隔天他跟老婆说他睡在—个兄弟那里,她老婆打电话给他最好的10个朋友,有8个好兄弟确定她老公睡在他们家……
还有2个说:“今天你老公还在我那儿!”

  某人把此帖给老婆看,没想到他老婆兴致大发,立刻打电话给他的朋友问他是否在他们那里。结果可想而知,再次论证了上述观点!更离谱的是有一哥们竟然说他在他家喝醉了,正睡着呢,还问他老婆要不要喊他起来接电话?

  在挂了电话后,那哥们的电话马上打到他手机上,一接通没等他说话就大喊:在哪呢?快回家吧,你老婆找你呢,我说你在我家喝醉了……回去前别忘了先喝酒……通完话,他看着老婆默默无语……

解读:我们都听过狼来了的故事。却不知道自己每天都在喊着狼来了。当我们口口声声要求对方的信任时。不要忘了信任的另一面是问心无愧。

3、关于性别

  男生用提款卡领钱:把车停在提款机旁,插入提款卡,按入密码,拿钱,取卡和收据。

  女生用提款卡领钱:把车停在提款机旁,用后视镜补补妆,把引擎熄火,把钥匙放在皮包里,下车。翻遍皮包找提款卡,插入提款卡,翻遍皮包找那张写有密码的口香糖锡箔纸,按入密码,读屏幕上的指示,花掉两分钟。按取消键,重新输入正确的密码,查询账户结余,再读一次屏幕指示,选择提取现金。走进车子,用后视镜补补妆,翻遍皮包找钥匙,发动引擎,开了5米停止。倒车回到ATM,用后视镜补补妆,下车,拿钱、提款卡和收据,上车,用后视镜补补妆,翻遍皮包找个位置放提款卡。换倒挡,排档,开车。开了十公里后,把手刹放掉。

解读:看完此文,终于明白为什么上帝要在制造男人后又制造出女人,因为两者的完全不可替代性。所以不要要求男人像女人那样细心体贴吧,就像不要要求女人像男人那样干脆果断。

4、关于改变

  热恋的时候,男人抱着女人睡。女人说:你抱得我太紧了,我快窒息了。男人笑着说:喜欢抱着你,否则我睡不着。当他们成为夫妻以后,有一天女人投诉:你晚上睡觉都没抱着我,这和我—个人睡有什么分别?男人说:抱在一起,大家都睡不好,难道你不觉得吗?

  某天,男人会突然在闹市中把女人抱起,走长长的一段路。女人笑说:你疯了吗?快把我放下来,让人看到不好。男人说:怕什么?我喜欢抱着你。若干年以后,女人在闹市中向男人撒娇:抱我!男人说:你疯了吗?

  某天,女人跟男人说:抱我!男人乖乖弯腰,把女人抱上床。若干年以后,女人跟男人说:抱我上床!男人没好气地说:你脚断了吗?

  某天,男人向女人许诺:即使你将来变成—个大肥婆,我也要天天抱你;你变成老太婆,我也继续抱着你。若干年之后,女人胖了,老了,要男人抱。男人没好气地说:你想压死我吗?

解读:很难相信,当天抱你和若干年之后不抱你的,竟是同—个男人。



5、关于需求

0-5岁:女→妈妈 / 男→妈妈。
6-10岁:女→不是讨厌的男孩子就可以了 / 男→可以陪我欺负女孩子的男孩
11-15岁:女→十五六七八岁的大哥哥 / 男→足球,篮球,网球,乒乓球……
16-20岁:女→十七八岁大家都称赞的“大帅哥” / 男→女人,女人就可以了!
21-25岁:女→25-29岁的男人,有事业、品位、才华…… / 男→20~24岁漂亮又有身材的女人
26-30岁:女→仍是坚持要比自己年纪大的男人 / 男→20~24岁漂亮又有身材的女人
30-40岁:女→心灵契合的好男人 / 男→20~24岁漂亮又有身材的女人
40-50岁:女→男人 / 男→20~24岁漂亮又有身材的女人
50-60岁:女→可与她终老的男人 / 男→20~24岁漂亮又有身材的女人
70-80岁:女→五六十岁时找到的那个,不需要自己照顾 / 男→20~24岁漂亮又有身材的女人
80-90岁:女→比自己迟死的男人 / 男→虽然我已经老花眼,看不清楚……但是我还是希望是20~24岁……

总结:男人打从20岁后,对女人的需求就十分专一!

解读:女人,25岁前尽情恋爱。25岁以后就彻底告别爱情梦想吧,与其把梦寄托在男人身上,不如把梦寄托在自己身上,反正,男人从20岁以后就没救

星期四, 10月 15, 2009

CS3161 (A) OPERATING SYSTEM PRINCIPLES (DR. LIU WENYIN) (09CS3161_LW) - Answers to Tutorial 5 Questions

Q1 Define the difference between Preemptive and Non-preemptive scheduling. State why strict non-preemptive scheduling is unlikely to be used in a computer centre, suggest a better scheme for interactive users.


Preemptive scheduling allows a process to be interrupted in the midst of its execution, taking the CPU away from it and allocating it to another process.

Non-preemptive scheduling ensures that a process relinquishes control of the CPU only when it finishes with its current burst.

Non-preemptive would not likely be used in a computer centre, especially in a time sharing system, because it cannot guarantee that each user gets a share of the CPU at regular intervals. Non-preemptiveness allows programs to run infinitely long thus making turnaround time (response time) for other submitted jobs even longer.

Round-Robin is a preemptive scheme that makes use of interrupt/context switching operation to allow processor switching between jobs. Long jobs cannot delay shorter ones, because short jobs are guaranteed of getting the processor periodically. Interactive users will thus receive the processor frequently enough to maintain good response times.





Q2 Explain the difference in degree to which the following scheduling algorithms discriminate in favour of short jobs.(i) First Come, First Served(ii) Round Robin(iii) Multi-level feedback queues


(i) First Come, First Served (FCFS) - discriminates against short jobs since any short jobs arriving after long jobs will have a long waiting time.
(ii) Round-Robin - treats all jobs equally (giving them equal bursts of CPU time) so short jobs will be able to leave the system faster since they will finish first.
(iii) Multi-Level Feedback Queues - discriminate very favourably toward short jobs since it works similar to the round robin algorithm.






Q3 What effect does the size of time quantum have on the performance of a round robin (RR) algorithm?



At one extreme, if the time quantum is extremely large, the RR policy is the same as the FCFS policy. If the time quantum is small, it must be large with respect to context switch, otherwise overhead is too high.






Q4 What advantage is there in having different quantum sizes on different levels of a multi-level feedback queuing system ?



The advantage is that the short jobs will have highest priority if they are shorter than the initial quantum. This serves them fast and frees the CPU to concentrate on longer jobs.
The jobs that are pushed to the next level (lower priority), now can be given more time than the initial quantum since the goal is to run as many programs as fast as possible with minimal delays to other programs.
Therefore, by increasing the quantum with the level, shorter jobs will be allowed higher priority, and longer jobs will be allowed to run simultaneously with minimum delays.

星期一, 10月 12, 2009

CS3161 (A) OPERATING SYSTEM PRINCIPLES (DR. LIU WENYIN) (09CS3161_LW) - Answers to Tutorial 4 Questions

Q1 List the four major categories of the benefits of multithreaded programming. Briefly explain each.

The benefits of multithreaded programming fall into the categories: responsiveness, resource sharing, economy, and utilization of multiprocessor architectures.
Responsiveness means that a multithreaded program can allow a program to run even if part of it is blocked. Resource sharing occurs when an application has several different threads of activity within the same address space. Threads share the resources of the process to which they belong. As a result, it is more economical to create new threads than new processes. Finally, a single threaded process can only execute on one processor regardless of the number of processors actually present. Multiple threads can run on multiple processors, thereby increasing efficiency.

Q2 What resources are used when a thread is created ?
How do they differ from those used when a process is created ?

Thread context must be created, including a register set, location for storage during a context switching and a local stack to record the procedure call arguments, return values and return addresses and thread local storage.
Code and data are shared with parent process or parent thread (no loading or allocation of memory necessary).

Process creation similar to thread storage (as above), with extra storage for program instructions and data.
Codes and data may be loaded for every process into the allocated memory and no sharing with other processes.


Q3 What is a thread pool and why is it used?

A thread pool is a collection of threads, created at process startup, that sit and wait for work to be allocated to them. This allows one to place a bound on the number of concurrent threads associated with a process and reduce the overhead of creating new threads and destroying them at termination.

Q4 What are the differences between user-level threads and kernel-support threads ?

User-levels thread have no kernel support, so they are very inexpensive (in terms of resources demand) to create, destroy, and switch among threads do not cause interrupt to CPU.

Kernel support thread are more expensive (in resources) because system calls are needed to create and destroy them and the kernel must schedule them to share access to CPU. They are more powerful because they are independently scheduled and block individually.

星期四, 10月 08, 2009

CS3161 (A) OPERATING SYSTEM PRINCIPLES (DR. LIU WENYIN) (09CS3161_LW) - Answers to Tutorial 3 Questions

Q1 What is PCB? What information are usually stored in PCB?

PCB Stands for Process Control Block.

Process State
Program Counter
CPU Registers
CPU Scheduling information
Memory management information
I/O Status
Accounting information



Q2 Explain the concept of a context switch.

Whenever the CPU starts executing a new process, the old process's state must be preserved. The context of a process is represented by its process control block. Switching the CPU to another process requires performing a state save of the current process and a state restore of a different process. This task is known as a context switch. When a context switch occurs, the kernel saves the context of the old process in its PCB and loads the context of the new process scheduled to run.


Q3 Explain the main differences between a short-term and long-term scheduler.

The primary distinction between the two schedulers lies in the frequency of execution. The short-term scheduler is designed to frequently select a new process for the CPU, at least once every 100 milliseconds. Because of the short time between executions, the short-term scheduler must be fast. The long-term scheduler executes much less frequently; minutes may separate the creation of one new process and the next. The long-term scheduler controls the degree of multiprogramming. Because of the longer interval between executions, the long-term scheduler can afford to take more time to decide which process should be selected for execution.



Q4 We can describe much of processor management in terms of process state transition diagrams, such as:

Run 2 1 3 4 Wait Ready (Blocked)

(i) Give one example of "event" that causes each of the mark transitions ?
(ii) When we view all the processes in the system, we can see that a state transition by one process could cause another process to make a state transition also. Under what circumstances could transition 3 by one process immediately cause transition 1 by another process ? List all similar situations.


Q4 Process State Transitions

(i) Transition 1 - Last process completed or blocked, another process on the ready queue will be allocated the CPU for execution (Dispatch).
Transition 2 - Preemptive scheduling system
Transition 3 - Process requests an I/O operation
Transition 4 - I/O device completion, process joins the ready queue.

(ii) Process Transitions :
Process request I/O operation - When a process make an I/O service request (Transition 3), when the I/O device is not available at that time, it will go through a transition from run state to wait (blocked) state. At the same time another process on the ready queue will be allocated the CPU for execution (Transition 1) during that time.

Process exceeded the CPU allowance, completed execution or abortion in error condition (Transition 2), another process dispatch to use the CPU (Transition 1).

星期三, 10月 07, 2009

朗文電子課本 msvcr80.dll error

為何我的電子書在裝有 Microsoft Window Vista 或 Microsoft Office 2007 的電腦上運行不到?
由於 Microsoft Window Vista 和 Microsoft Office 2007 上有一個 dll 檔案和電子書有所衝突以致未能運作。解決方法如下:

1. 在你的硬碟〈例如:C drive〉上建立一個資料夾〈例如:ebook,不可以是中文名稱〉。
2. 把電子書光碟的所有檔案複製到新建立的資料夾〈例如:C:\ebook〉。
3. 到下列網址下載一個名為 2006_eBook_Update.zip 的檔案。
http://www.ilongman.com/temp/2006_eBook_Update.zip
4. 將上述檔案解壓於桌面,桌面上將會出現兩個檔案 〈shell.exe, main.exe〉。
5. 將上述兩個檔案複製到硬碟上的電子書 program 資料夾內〈例如:C\ebook\program〉,確定取代舊有的兩個檔案。
6. 啟動電子書資料夾內的 startcd.exe。

星期六, 10月 03, 2009

開心水族館養扇貝虧錢

養扇貝是一種浪費錢的舉動.....

不但虧錢, 連經驗值都不會給

算式如下:

扇貝一個1.2w,假若每次10小時都準時收成,那麼…
24h(天) x 15天(使用期限) = 360(H)
360(H) / 10(H) = 36顆
36顆 x 200元 = 7200元
12000-7200=4800(虧損)

星期二, 9月 22, 2009

什麼是影像

影像的分類:

一般影像分為點陣式圖及向量式圖。

點陣式圖,是由許多點所組合成的這些點又稱之為"像素"。點陣圖中就是記錄
這些像素的座標及顏色,非常真實,接近照片

也因為如此,所以點陣式的圖檔非常的大,且受解析度的限制,無法任意放大縮
小,否則就會出現鋸齒狀的線條與失真。但是其創造出的影像非常接近真實,而
且與影像軟體配合產生千變萬化的結果,是向量圖所不及的。

一般來說,點陣圖可經由掃描器掃描而的或由數位像機拍攝而得。而用來處理點
陣圖的軟體,常見的有:
Paint Shop、Adobe PhotoShop、Corel Photopaint、Ulead Photoimpact 等
向量式圖,不以點為記錄單位,而以繪圖元素為記錄單位的圖形。繪圖元素為點、
直線、圓、矩形等,每一圖形利用數學公式計算所使用的繪圖元素在圖形中的位
置、大小、方向等。

所以圖形放大縮小後,會重新計算資料,不會產生失真的問題。但是向量圖不是
忠實計錄每個點的色彩,不容易表現精緻的圖形。因為只記錄位置及計算公式等
資料,向量式圖檔案都不大。用來處理向量式圖的軟體,常見的有:
Corel DRAW、Adobe Iustrator 等。

影像類型:
16 色:一個影像用16 種顏色來表現。2^4=16
256 色:一個影像用256 種顏色來表現。2^8=256
全彩:一個影像用1677 萬種顏色來表現。2^24=1677 萬
PhotoImpact 可以開啟或儲存的格式很多,例如:BMP(點陣圖)、TIF、PSD(Photoshop
的檔案)、JPG(常應用於網路,壓縮檔)、GIF(常應用於網路)、UFO(友立
物件檔)

繪圖物件:
簡稱物件,直線、矩形、圓形、文字、插入的影像等都稱為繪圖物件,每一個單
一物件可以任意移動位置、改變大小等。

星期六, 9月 19, 2009

電子書 could't find library MSVCR80.dll?

為何我的電子書在裝有 Microsoft Window Vista 或 Microsoft Office 2007 的電腦上運行不到?

由於 Microsoft Window Vista 和 Microsoft Office 2007 上有一個 dll 檔案和電子書有所衝突以致未能運作。解決方法如下:

1. 在你的硬碟〈例如:C drive〉上建立一個資料夾〈例如:ebook,不可以是中文名稱〉。
2. 把電子書光碟的所有檔案複製到新建立的資料夾〈例如:C:\ebook〉。
3. 到下列網址下載一個名為 2006_eBook_Update.zip 的檔案。
http://www.ilongman.com/temp/2006_eBook_Update.zip
4. 將上述檔案解壓於桌面,桌面上將會出現兩個檔案 〈shell.exe, main.exe〉。
5. 將上述兩個檔案複製到硬碟上的電子書 program 資料夾內〈例如:C\ebook\program〉,確定取代舊有的兩個檔案。
6. 啟動電子書資料夾內的 startcd.exe。

星期四, 9月 10, 2009

rsync command Example

The following command will backup the desktop to the mybackups folder

rsync -rlpt --stats Desktop /volumes/LaCieDrive/mybackups

Options used above:
-r = Recursive, traverse into subdirectories
-l = Treat symlinks as symlinks; don't follow them
-p = Preserve permissions
-t = Preserve creation and modification dates and times
--stats = Show file transfer statistics

星期三, 9月 09, 2009

數碼相機的應用

數碼相機與今日記者形影不離,
數碼相機是一種以數碼形式記錄影像、毋須使用菲林的相機。

傳統相機以光學方式呈像在菲林上,幾乎是不失真的方法,
不過底片保存不易,在拍攝時有失誤又無法察覺,容易錯失珍貴畫面,
而且買底片也是一筆開銷。

數位相機以數位方式保存畫面,但是因為經過計算壓縮會有失真的情況,
但將畫面保存在記憶卡,燒成光碟保存,沒有不易保存的問題,
一但拍的不好可以立即重拍,
失敗的照片可以少很多,快捷、方面、便宜是它成功的原因。

星期五, 8月 21, 2009

block 死網址唔俾學生玩 game 方法

1. policy 度點 set 內容警告 既野, 不過淨係限制到ie


user configuration- >Windows Setting- >Internet Explore Maintenance- >Security- >Security Zone Content Ratings
 
 
2. Set proxy
 
user configuration- >Windows Setting- >Internet Explore Maintenance
 
 
 
 
 
============
 
 
知道學生平時上咩野網既方法:
 
 
- 如果有firewall而隻firewall又有得set log既話係可以set到既

- 如果係用proxy上網既係proxy度搞就會方便d
 
 
 
==========
 
Q:
比如我block 左 http://www.facebook.com 咁學生用呢個網址就上唔到facebook


但係有d學生識用https://www.facebook.com 去 login...

咁我都唔想比人用https://www.facebook.com 去login facebook 咁我應該要點做先得?


A:

你可以試下block www.facebook.com


最好就block *facebook.com

咁就會連冇www.都可以block到

星期四, 8月 20, 2009

在麥當勞見網友的十大理由

1、價格不會太高,檔次不會太低。

2、既然是快餐,遇到青蛙男或恐龍妹時可以馬上打包走人,遇到美眉或帥哥也可以慢慢吃!

3、味道全球統一,不會吃不慣。

4、衛生情況還可以,不會有吃到蒼蠅、蟑螂、老鼠等的尷尬場面。

5、人比較多,遇到青蛙男或恐龍妹想開溜時還可以很有風度地說:「我們走吧,把位置讓給別人!」

6、絕對不會有人酗酒鬧事,最多就是小朋友搗亂,易於保護美眉,特別對瘦弱的男生來說,是一個不錯的選擇。

7、屬於一個地方的標誌性建築,容易找,特別對方向感比較差的美眉來說,在麥當勞見面是一個不錯的選擇。

8、受《第一次親密接觸》毒害太深!

9、不用花很多時間去研究該吃什麼才好。

10、遇到糾紛不會出人命,最多是一杯可樂從頭淋到腳。(吃西餐時可能會飛過來一把刀,吃中餐時可能會一雙筷子向眼睛插過來,如果躲閃不及的話……)

星期三, 8月 19, 2009

老公很強的真相

有一對已結婚一段時間的夫妻在性方面已經沒什麼興趣,可以說粉不幸福,

老婆也無法滿足,後來老婆就去找了心理醫師治療,回來第一天晚上老婆穿著性感衣服真的粉惹火,

兩人就過了快樂的一夜,第二天老婆更是火辣辣,兩人又過了風起雲湧的一夜,

老公就覺得很好奇,第三天晚上就偷偷的看老婆在做什麼??

只見老婆對著鏡子大喊:我很年輕!我很年輕!

後來老公覺得心理醫師很有效,也跑去看心理醫師,回來第一天晚上只見老公有如猛虎出岬,

堅挺不拔,讓老婆很 High 第二天老公依然像超人般欲罷不能,搞的老婆有一點受不了,

老婆就覺得很訝異,第三天晚上就偷偷的看老公在做什麼??

只見老公對著鏡子大喊:[她不是我老婆!她不是我老婆! ]

星期五, 8月 07, 2009

小學六年級中文科閱讀工作紙 - 在進入自己的家園前須先取得警署簽發的通行證?

小學六年級中文科閱讀工作紙


請先細閲下面的文字,然後回答問題。

你有沒有想過,在進入自己的家園前,須先取得警署簽發的通行證?這種事情你可能覺得不可思議,但的確發生在新界一些村落的居民身上。

1898年,中國英國簽訂<<展拓香港界址專條>>,專條內容為中國允許英國租借九龍界限街以北、深圳河以南的地方,為期99年。期間,深圳河兩岸的居民依然可以自由往來。直至1951年,香港的非法入境問題惡化,跨境罪案上升,當時的香港政府便沿著新界北部邊境設立禁區,作為緩衝地帶。無論是當地居民或訪客,凡進入禁區都要辦理「通行證」。

在禁區範圍內,最著名的要數沙頭角中英街。在專條簽訂翌年,中英正式勘定新界北部邊界,沿一條河的河床把沙頭角分割為「華界」與「英界」兩部份。後來,河床淤塞、乾涸,形成一條長約250米,寬約3、4米的小路。人們在小路兩側搭建房屋、商店,中英街的雛形出現了。

中英街的街心沒有圍欄,只以若干界碑分開兩地,並由香港深圳兩地政府共同管理,形成「一街兩制」的獨特景象。在香港回歸前,不少內地民眾前往中英街,體味中英兩個政治體制的差異與融合。80年代起,內地實行改革開放。那時內地的商品選擇少,價錢昂貴;中英街的商品卻價錢廉宜,加上種類齊全,琳瑯滿目,所以吸引了大量內地民眾前去購物。據深圳的統計數字顯示,中英街全盛期的遊客量每天超過10萬人次,場面壯觀。一條歷盡滄桑的小街立時成了聞名全國的「購物天堂」。

隨著香港回歸祖國,中英街漸漸歸於平靜。特區政府實施「個人遊」計劃,讓內地遊客轉而前往香港市區旅遊購物。而內地發展快速,商品供應充足,內地民眾再也無須前往中英街購物了。從門庭若市到門可羅雀,中英街只經歷了短短二十年。

中英街的背景是特殊的,它的繁榮是短暫的,卻成就了它的知名度。近年,特區政府決定將邊境禁區的範圍由約2800公頃縮減至約400公頃。不過,中英街卻不在解禁之列。這條小街的命運如何?還有待時間見證。






從文中找出適當的詞語,填在1-2題句子的橫線上,使句子的意思完整。
(1)外公動手術後,病情一直穩定,可今天卻 惡化 起來,令我們擔心不已

(2)這小店的食物價廉物美,難怪從早上到晚間都是人山人海, 門庭若市 
根據文章內容,選出最合適的答案,並把代表答案的英文字母填在(  )內。
(3) 下列哪一項是第二段的段意?                             3.( D 
A 指出禁區的作用。
B 說明新界北部邊境的治安欠佳。
C 說明英國租借新界中英街的歷史意義。
  解釋部分新界村民需要使用「通行證」的原因。

(4) 文中哪兩段說明中英街盛衰的情況?                    4.(C ,D 
A 第二段
B 第三段
C 第四段
  第五段
E   第六段

(5) 文中第四後,作者引用統計數字的目的是                 5.( C 
A 說明遊人前往中英街的目的。
B 解釋中英街聞名全國的原因。
C 指出中英街遊人絡繹不絕的盛況。
D 比較中英街在香港回歸前後的不同狀況。

(6) 根據文章內容,下列哪一項是不正確的?                6.( C 
A 中英街位於香港深圳的邊界上,橫跨兩地。
B 中英街的知名度與它的歷史背景有關。
C 中英街目前依然是禁區,禁止市民前往。
D 中英街有各式商店,居民可在那裡自由購物。

(7) 作者寫這篇文章的主要目的是介紹                     7.(A , B 
(請選擇兩個正確答案)
A 中英街的歷史。
B 中英街的發展概況。
C 香港回歸前後的變化。
D 中英街沙頭角的關係。
E  內地改革開放政策的影響。

星期四, 8月 06, 2009

如何檢測鳥類性別

不像一般的動物,大部份鳥類都不可以從外貌去區別公母。
有些雀鳥的性別能夠透過外表去識別,例如折衷鸚鵡,公鳥是綠色,而母鳥則是紅色。




1. DNA檢測法
利用染色體的差異來鑑定性別,是較為準確的方法。
並且此方法對鳥類沒有任何不良的影響,而且對年齡没有限制。


2. 外科檢測法
從腹部切創利用內視鏡來鑑定性別是較為有風險的方法。
此方法不適合年幼的小鳥,並且需要麻醉。

3. 糞便檢測法
利用新鮮糞便的荷爾蒙來鑑定性別
此方法安全性較高,但準確度會因應很多外來因素而有所不同,如運送及採樣過程。

星期三, 8月 05, 2009

Commands and applications used at layers 1 and 2

1. What would the following command allow you to do?
winipcfg

Capture events relating to data-link layer protocols
Identify a path to a destination device
View IP information for hosts running Windows 9x and Me
View the status of all connected devices and links without querying a DNS server


2. You are a network engineer working to isolate problems at the data-link layer with an end-system running a MAC OS X operating system. You want to view the path a packet takes through the network to 10.215.34.124.
What command allows you to do this?

trace 10.215.34.124
tracert [-d] 10.215.34.124
traceroute 10.215.34.124
track 1 ip route 10.215.34.124



3. Suppose you want to isolate a problem at the data-link layer by sending an echo request packet to the address www.easynomadtravel.com.
What command would allow you to do this?

arp -a
ping www.easynomadtravel.com
show ip interface brief
trace http://www.easynomadtravel.com/



4. You are a network engineer working to isolate problems at the data-link layer. As part of your troubleshooting strategy, you want to view entries in the ARP table of a Cisco router.
What command allows you to do this?

arp -a
show ip arp
show ip interface brief
show arp table

星期二, 8月 04, 2009

Correcting physical and data-link layer problems

1. Identify the command that will allow the Cisco IOS software to return to the default LMI type on interface Serial 0/1. The LMI command is already set to the LMI type defined jointly by Cisco and three other companies.

Router(config)no frame-relay lmi-type ansi
Router(config-if)#no frame-relay lmi-type ansi
Router(config-if)#no frame-relay lmi-type cisco
Router(config-if)#no frame-relay lmi-type q933a




2. What end-system command would you use to delete a specific entry from an ARP table?

arp -a
arp -d ip-address
arp -s ip-address
arp -a -N interface_address



3. Which of the following commands activates an interface?

arp -d
clock rate
interface
no shutdown




4. What is the default encapsulation type on a synchronous serial interface?

Frame Relay
HDLC
PPP
SLIP

星期一, 8月 03, 2009

Physical and data-link layer support resources

1. Suppose that you are a network engineer troubleshooting a problem at the physical layer. In doing this, you want to quickly access information about the latest industry standards.
The web sites of which organizations are most likely to provide this information?

ATM Forum
IETF
ITU-T
Microsoft



2. Suppose you are troubleshooting a problem at the data-link layer. You are at the stage of evaluating and documenting the changes you are making.
If you perform a set of problem-solving steps, which are completely unsuccessful, what should you do?

You evaluate and document the changes and the results of each change that you make
You should immediately undo any changes that you have made
You make initial hardware and software configuration changes
You verify that the changes you made actually fixed the problem without introducing any new problems
You verify that you have a valid saved configuration for any device on which you intend to modify the configuration



3. Suppose you are troubleshooting a problem at the data-link layer. You are at the stage of evaluating and documenting the changes you are making and realize that the problem is intermittent.
What should be the next step you perform?

You evaluate and document the changes and the results of each change that you make
You make initial hardware and software configuration changes
You need to wait to see if the problem occurs again before you can evaluate the effect of your changes
You verify that the changes you made actually fixed the problem without introducing any new problems
You verify that you have a valid saved configuration for any device on which you intend to modify the configuration



4. As a general approach when correcting an isolated problem at the physical or data-link layer, what is the first thing you should do?

You evaluate and document the changes and the results of each change that you make
You make initial hardware and software configuration changes
You verify that the changes you made actually fixed the problem without introducing any new problems
You verify that you have a valid saved configuration for any device on which you intend to modify the configuration




5. Which website would you most likely use to find the latest detailed technical documentation about the PPP protocol?

www.apple.com
www.ietf.org
www.linux.org
www.sniffers.com

星期日, 8月 02, 2009

Isolating problems occurring at layers 1 and 2

1. If you encounter a line protocol down message on a router interface, what is is an indication of?

The IGRP neighbour agencies are operational on that interface
The problem lies with another router
There is a problem with the interface at the data-link layer that prevents it from functioning properly
There is a problem with the interface at the physical layer that prevents it from functioning properly



2. A group of users reports that its connection to the network has gone down due to a problem in either the physical or data-link layer. You check the operational status, errors, and configuration of the affected interfaces. You still have not found the cause of the problem.
Which guideline for isolating a problem at the physical and data-link layers have you omitted?

Checking cable configuration
Disabling Spanning Tree
Verifying the IP address of the default gateway
Viewing TCP information on a host




3. While testing your FastEthernet 0/1 interface, you have noticed some packet loss. What command should you use to isolate this problem?

debug frame-relay lmi
show interface FastEthernet 0/1
show ip interface brief
show running-config interface




4. While working on the FastEthernet 0/1 interface, you realise that it is performing poorly under load. After running a diagnostic, you discover that there are a high number of late collisions recorded. What is this an indication of?

That the duplex configuration may be mismatched
That the interface has lost its connection to the device on the other end of the Ethernet cable
That the interface has restarted itself after an error condition
That there is a problem with the interface at the data-link layer

星期六, 8月 01, 2009

Identifying symptoms of problems at layers 1 and 2

1. Which command output would you most likely see if you had a problem at the physical layer?

Ethernet 0/0 is down, line protocol is down
Invalid command, no available connection
Neighbor 172.10.160.2 (Serial 1/1) is down: holding time expired
Serial 1/0 is up, line protocol is administratively down


2. Identify the true statements regarding the symptoms of data-link layer problems.

Data-link optimization problems are arguably the least common
Framing errors appear
There are large quantities of broadcast traffic
The interface is down, and the line protocol is down




3. Which command output would you most likely see if you had a problem at the data link layer?

Ethernet 0/1 is down, line protocol is down
Interface Serial 1/0, changed state to up
Serial 0/1 is down, line protocol is down
Serial 0/1 is up, line protocol is down



4. You are a network engineer working on a network experiencing problems. You use the ping command to help you isolate the problems.

Identify the ping command output that would indicate the problems are at the data-link layer of the network.

address is 0007.8580.1581
Packets: Sent = 4, Received = 2, Lost = 2 (50% loss)
Tracing route to 172.27.227.9
0 input errors, 0 CRC, 0 frame, 0 overrun



5. If you were investigating problems on the network at the physical layer, which of these would you be likely to see?

Abnormal LEDs
ARP errors
Excessive utilization
Increased buffer failures


6. What commands do you use to verify the ARP cache on a Windows end-system and the ARP table in a Cisco router?

arp -a
arp -s
show arp
show arp table
show arp ip


7. Identify the output from a traceroute that indicates the network is experiencing physical layer problems.

Excessive packet loss
Excessive runts
Increased buffer failures
Line coding errors

星期一, 7月 27, 2009

Facebook已同意廣告商運用你既相片

請注意!
Facebook已同意第三者廣告商任意運用你地係Facebook入面0既相片,
"請Click Settings入面0既Privacy Settings,
再選擇News Feeds & Wall, 選擇Facebook Ads果頁,
係drop down box選擇No One再Save changes."
咁就可以避免你0既相係其他網站廣告出現..

《煩請自己copy開去,通知你們嘅好友》

星期二, 7月 21, 2009

Backup websams http server 步驟

1. 以 root 身份登入

2. 輸入以下指令:
mount /mnt/cdrom
sh /mnt/cdrom/grepconfig.sh


3. 問你係咪 confirm,就答 y

4. 問你資料正唔正確,答 0

5. 問你係咪 copy 落 floppy,答 y

6. 完成後將 floppy 內資料抄起,因為 floopy 的壽命....

p.s. default setting 係用 floppy backup configure,但係都可以改 setting 做用其他野 backup~

星期一, 6月 22, 2009

兵臨城下WEB

任務名稱 聞達諸侯
任務目標 聲望的獲得途徑?(多選)
建造升級建築
研究科技
聲望的作用?(多選)
新建更多的城池
升級城池 任務名稱 修繕官邸一
任務目標 [已完成] 升級官邸(等級2)

任務名稱 修繕官邸二
任務目標 [已完成] 升級官邸(等級3)

任務名稱 輕徭薄稅
任務目標 稅收的獲得途徑?(單選)
空閒人口
怎樣調整稅率?(單選)
在官府裡

任務名稱 廣施教育一
任務目標 [已完成] 建造大學殿(等級1)
[已完成] 升級資源科技中的伐木技巧(等級1)

任務名稱 廣施教育二
任務目標 [已完成] 升級大學殿(等級2)
[已完成] 升級資源科技中的挖掘技巧(等級1)

任務名稱 廣施教育三
任務目標 [已完成] 建造大學殿(等級3)
[已完成] 升級其它科技中的撫民技巧(等級1)

任務名稱 招賢納士
任務目標 [已完成] 建造客棧(等級1)
[已完成] 建造酒館(等級1)

任務名稱 有條不紊
任務目標 [已完成] 啟動建築排程

任務名稱 選賢任能
任務目標 [已完成] 建造聚賢樓(等級1)
[已完成] 招募1名文官
[已完成] 為城池任命太守

任務名稱 統帥之才
任務目標 [已完成] 建造點將台(等級1)
[已完成] 招募一名武將

任務名稱 名將傳聞
任務目標 歷史名將的初始屬性比一般武將?(單選)


任務名稱 修築城防一
任務目標 [已完成] 城牆(等級1)
[已完成] 建造城防工事:10個陷阱

任務名稱 修築城防二
任務目標 [已完成] 城牆(等級2)
[已完成] 建造城防工事:10個滾木

任務名稱 宏圖霸業
任務目標 威望的獲得途徑?(多選)
戰勝其他君主
討伐任務
威望的作用?(多選)
佔領更多的城池
領取俸祿

任務名稱 霸業之初
任務目標 [已完成] 建造兵器鋪(等級1)
[已完成] 建造防具鋪(等級1)
[已完成] 建造車馬間(等級1)

任務名稱 打造裝備
任務目標 [已完成] 製造10個魚鱗甲
[已完成] 製造20個透甲槍

任務名稱 趕制軍備
任務目標 軍械速造需要消耗什麼?(單選)
元寶

任務名稱 招募鄉勇
任務目標 [已完成] 建造校場(等級1)
[已完成] 徵募10名新兵

任務名稱 陣前點兵
任務目標 [已完成] 武裝10名步兵
[已完成] 並提升士氣到30

任務名稱 休整軍隊
任務目標 怎樣調整士兵的裝備?(單選)
在武將軍事介面裡

任務名稱 大興商貿
任務目標 [已完成] 建造市場(等級1)

任務名稱 出售軍械
任務目標 [已完成] 在市場中將你未裝備的透甲槍出售。

任務名稱 糧草先行一
任務目標 [已完成] 建造驛站(等級1)

任務名稱 糧草先行二
任務目標 [已完成] 升級驛站(等級2)

任務名稱 糧草先行三
任務目標 [已完成] 升級驛站(等級3)

任務名稱 提拔將領
任務目標 文官經驗獲得途徑有哪些?(多選)
任命太守
打擂臺
隨軍謀士
任命軍師
武將經驗獲得途徑有哪些?(多選)
行軍戰鬥
打擂臺

任務名稱 聯結諸侯
任務目標 [已完成] 建造鴻臚寺(等級1)
[已完成] 創建或加入聯盟

任務名稱 城擴百里
任務目標 當聲望到達能控制幾座城池時,能進行第一次升級?(單選)
4座
當聲望到達能控制幾座城池時,能進行第二次升級?(單選)
9座

任務名稱 民心所向
任務目標 [已完成] 使用一次安撫百姓的賑災,使民怨恢復到0值

任務名稱 征戰天下
任務目標 新手保護期內的玩家能進攻他人的城池或者被其他玩家進攻麼?(單選)
不能

任務名稱 百姓依附
任務目標 [已完成] 提升人口上限到600

任務名稱 戰略儲備四
任務目標 [已完成] 升級倉庫(等級4)
[已完成] 升級資源科技中的種植技巧(等級1)

任務名稱 戰略儲備五
任務目標 [已完成] 升級倉庫(等級5)
[已完成] 升級資源科技中的冶煉技巧(等級1)

任務名稱 戰略儲備六
任務目標 [已完成] 升級倉庫(等級6)
[已完成] 升級資源科技中的伐木技巧(等級2)

任務名稱 戰略儲備七
任務目標 [已完成] 升級倉庫(等級7)
[已完成] 升級其他科技中挖掘技巧(等級2)

任務名稱 戰略儲備八
任務目標 [已完成] 升級倉庫(等級8)
[已完成] 升級資源科技中的種植技巧(等級2)

任務名稱 戰略儲備九
任務目標 [已完成] 升級倉庫(等級9)
[已完成] 升級資源科技中的冶煉技巧(等級2)

任務名稱 戰略儲備十
任務目標 [已完成] 升級倉庫(等級10)
[已完成] 升級倉儲科技(等級1)

任務名稱 唯才是舉
任務目標 [已完成] 升級客棧(等級2)
[已完成] 升級聚賢樓(等級2)
[已完成] 再招募一個文官

任務名稱 步步為營
任務目標 [已完成] 建立一座營寨