2008年6月27日 星期五

JAVA期末報告

到圖書館挑選二本Java課本,寫下這些書名與作者出版社與出版日期,每本書各挑選一個習題進行個人研究,說明以下
1.你為什麼挑選這個習題(只有題目,沒有範例或解答),
2.這個習題讓你學到什麼概念,
3.請你製作一個講義說明這個習題。

Book(1)
書名 : 精解JAVA2

作者 : 袁葆宏 劉豐豪 吳建和

出版社 : 旗標

題目 : 陣列排序

原因 : 想多熟悉此類題目,能夠方便就整理出陣列的順序


Book(2)

書名 : 剖析JAVA程式設計

作者 : 廖榮貴 李正光 謝銘琪 許正憲 王龍發

出版社 : 金禾
題目 : 河內塔解法

原因 : 因為沒學過這種解法,所以挑選這題目來熟悉




網際網路應用系統設計 期末報告 電子四丙 9326361 周沛陽 - Google Docs

網際網路應用系統設計 期末報告 電子四丙 9326361 周沛陽 - Google Docs

網際網路期末報告

http://docs.google.com/Presentation?docid=dcp2vz95_1hpvkhscq&hl=en#

2008年6月22日 星期日

Lab Testing User Interface

kFor housing services, compare the three websites

http://www.housingmaps.com

http://www.urmap.com.tw/asp/kijiji/

http://www.7house.com.tw

List the differences in the user interface design and usability. Make commentsby your use experiences.

美感,直覺性,流暢,預期反應

美感: houseing map就只是單純的一張地圖沒啥美感,urmap一堆文字美感很差,7house藉著許多廣告增添許多色彩。
直覺性:houseing map一看就知道再找房子的,7house廣告有點多,看了一下才知道用途,urmap一開始以為只是找路的地圖。
流暢: 無庸置疑一定是housing對流暢,另外7house還可以一次訂下所有條件也算是個優點,urmap一點都不流暢,難使用。
預期反應: housing比較適合租屋者,條件比較寬鬆,最主要是價格跟地點。7house比較適合購屋者,條件比較多。Urmap很難使用。

Lab Site Traffic Metrics

1. Enter Sitemeter.
2. Put a Sitemeter in your own blog.
2. Check the site meter to see the daily traffic chart, the recent visitors by locations.

Lab Web Stress Test

1. Download Stress Test

2. Take a look at the user manual.

3. Test a static page.Try combinations of stress levels and stress multipliers to simulate 10 users and 100 users.

4. Test a dynamic page.Try combinations of stress levels and stress multipliers to simulate 10 users and 100 users.

5. Compare the response time of both pages and explain why.

2008年6月19日 星期四

Lab Google Mars (AJAX)

1. Observe how Google Mars loads the map and does the zooming. Is the data downloaded oncefor all or retrieved on demand?
ans: retrieved on demand

2. HTML alone cannot perform the functions of Google Mars. So find out which code in the HTMLsource does the map things.

Hints: You may use Nvu to determine what HTML tags are for what.

Lab Simple Use of Web Service

"we make a living by what we get, we make a life by what we give"

Test Drive a web service
1. Take a look at the schema of Zip Code Web Service.
2. Use the lincense key eUhOTOJs9D2mcHU6SiL0CyMQvpJ3I3PqR2/fpRq4BOApWxzSzw7wD2FQ2mOmHEk+pq6iRBomQ4wuQl5EGOgfCitYgkQ3N4vl
to use this web service or subsbcribe to it at Zip codes lookup To apply for the license key by yourselves, be sure to have an email box to receive it.
2. Click GetPlacesInside and play with this operation
3. Enter 61801 as zip code and see what you get in the result.
4. Try again 92345 as zip codeQuestion:
Why do you need a license key to use the service?














Homework 6-7-2008

Content analysis做完之後,請針對分析數字結果,給予適當詮釋,背後的現象是什麼? (至少100字)
ans: Total:118
C : 16 (13.559%)
R : 94 (79.661%)
U : 8 (6.780%)
A : 67 (56.780%)
D : 14 (11.864%)
M : 37 (31.356%)
E : 37 (31.356%)
P : 79 (66.949%)
N : 2 (1.695%)
由上述分析來看.最多的回應以"RAP"為主.代表回應屬於有思考過並給予正向回應的.而"UDN"是最少比例的.推文以有思考過但卻持反面意見並帶有強烈措辭甚至情緒話的字眼為主所以可以知道大部分的人對作者都會持正面積極的態度.少部分會消極且情緒化.

Lab Packet Sniffer

1. Install Protocol Analyzer Ethereal at http://www.wireshark.org/
2. Capture the packets at your Ethernet interface card.
3. Enter a login required website that you often go to, such as web mail. Don't use the real account or password.
4. Try to catch the packet that contains the password.

Lab SSL

1. Try Yam membership enrollmentfor using SSL encrypted Internet communications.

2. Note the lock at the lower right corner is secured when SSL is enabled.

3. Click the lock icon and a message window should pop up.

4. What kind of encryption is used in this SSL? How many bits are there in the encryption key?
ans : MIS 128
5. Who issued the certificate you are seeing? (Who is the certificate authority, CA, for this website?)
ans : UTN-USERFirst-Hardware
6. Until when is the certificate valid?
ans : 時效3年
7. What kind(s) of hash is/are used in the CA's digital signature?
ans : SHA1 , MD5
8. How many bits are there in the hash(es)?
ans : 128

Lab Hash

1. Install SlavaSoft HashCalc
2. Open the file readme.txt of this software
3. Calculate the cash.
4. Open another copy of HashCalc
5. Open the file readme.txt and delete the first space fo the file.
6. Calculate the hash of the modified file.
7. Compare the hashes of two files



Lab Checking dead links

W3C Link Check 可以檢查 dead links, 而且只要輸入首頁,就可以依據指定深度自動向下檢查, 而且也可以檢查對外連結(外站).Link Checker 首先要設定檢查深度(Check linked documents recursively, recursion depth=?), 如果沒有設定, 它就只有檢查首頁.因此如果出現 deadlink, 就是在首頁.如果你設定檢查深度, 它就會逐一檢查此深度內的每一頁,在檢查某一頁開始時, 它會先顯示現正在檢查的 URL, 然後在逐一爬行該頁內每個 link.報表輸出很漂亮. 請參閱http://validator.w3.org/checklink請檢查三個你最常使用的網站, 看看連結的品質如何?紀錄有錯誤連結 (HTTP Error 404) 的次數.

ilearing

itouch

bbs









Lab XHTML Validation

1. Use the W3C Markup Validation Service to check the XHTML sample.
2. You may want to select the direct input option.
3. How many errors and warnings are there?
4. Fix the problem and recheck it until it is strictly XHTML 1.0 compliant.





2008年6月16日 星期一

Lab Java Constructor

Use Display 4.14 to call 4.13 (2nd ed.) or
Display 4.12 to call 4.11 (1st ed.).

After you finish the above, try the following

Date birthday = new Date("Jan",1,2000);

birthday.Date("Feb",1,2000);
birthday.setDate("Feb",1,2000);
birthday=new Date("Mar",1,2000);

Lab Overloading

Do Display 4.11

Lab ADT, accessor, mutator

Define a Complex class and write an object oriented program to compute (2+3i)+(4+5i) in Java.The methods should include an access and a mutator.

Homework 5-19-2008

1. Do Temperature Project, which is Project 7 (3rd, 2nd ed.) or Project 3 (1st ed.).

Lab Magic Parking Tower

A parking tower is out of order someday. If you park a Benz, you will end up with a Torben. Write a program to simulate this scenario. First create a class called CarParked which has a static method called outOfOrder. Name an object called yourCar, which happens to be a Benz. Your program should contain a class called CarParked and a test program called CarParkedDemo which test the method by CarParked.outOfOrder(yourCar).

Hint: You may study Display 5.14 to get some ideas.

Lab Static method

Define a Complex class with a static method for computing complex addition. Use (2+3i)+(4+5i) in your test.


Homework 6-02-2008


lab Fraction equality test

Write a program to implement a method that can check whether 2 fractions are equal. You will implement a class called Fraction consisting of a numerator and a denominator. The equality test of 2 fractions should return a boolean value.

Use the following as the tests.

1/2, 2/4
5/6, 6/7

Hints:

Fraction f1, f2;
f1.equals(f2);







lab Fraction Addition

Write a program to implement a method that can do additions of 2 fractions. You will implement a class called Fraction consisting of a numerator and a denominator. The additions of2 fractions should be equal to a fraction.Use 1/2+1/3 as the test.


lab counter




Class Definition 3

Do Display 4.7 (3rd, 2nd ed.) or 4.5 (1st ed.). Then use Display 4.8 to call 4.7.


Question
In Display 4.7, if the method setDate has the parameter as setDate(int month, int day, int year), what kind of changes should be made in its body of codes?



2008年5月29日 星期四

Lab Content Analysis




According to the scheme above, the content of comments was characterized by the three independent dimensions. The intention of the analysis was to reveal any emergent correlations among three attributes of comments collected in the dataset.





The affective dimension was generally quite straightforward and lent itself to comparatively easy classification. To probe the range between agreement and disagreement requires more careful judgment and usually involves more reading between the lines. The boundary between reflection and non-reflection was somewhat blurred for some occurrences of comments. Some comments showed no reflection as all; some comments demonstrated sufficient reflection while others appeared to possess marginal reflection.





Perform content analysis on the dataset of comments on the essay blogs.






統計數:103個C:14 13% R:84 81% U:15 14%A:74 71% D:17 16% M:22 21%E:18 17% P:92 89% N:3 29%

2008年5月17日 星期六

Lab: Drag-and-Drop by AJAX

1. Go to Laszlo and enter (Laszlo in 10 minutes).
2. Study and play around the "drag-and-drop" example.

3. Use this method to control movie playing as in the previous lab.

4. If you drag and drop the photo to the "play" area, the movie plays.

5. If you drap and drop the photo to the "pause" area, the movie pauses.






Lab: Movie Player by AJAX

1. Go to Laszlo and enter (Laszlo in 10 minutes).

2. Study and play around the "scripting" and "video" examples.

3. Use this script to control movie playing.

4. If you push the "pause" button, the movie pauses.

5. If you push the "resume" button, the movie resumes.


2008年5月16日 星期五

Lab 25: XML and XSLT, Part III

1. Given the RSS of Class Blog, write an XSLT fileand use Xray to generate an HTML that contains the titles of items in the RSS.

2. Open the XML file by Word and you will see the document structure.

3. View the formatted HTML file.

lab 24: XSLT Part II

1. Register and Download Xray, an XML, XSLT editor and processor.
2. Given theListing 1. An XML document representing the results of a soccer tournament
Listing 2. A basic style sheet for the soccer results
use the XSLT as in the Listing 2 to transform the XML file as in the Listing 1.
3. View the formatted HTML file.


4. Given theListing 1.

An XML document representing the results of a soccer tournamentListing 3.

A style sheet that computes team standingscompute the team standings in a table.

5. View the formatted HTML file.




lab 23: Lab XML & XSLT

1. Register and Download Xray, an XML, XSLT editor and processor.
2. Given the the XML file and XSLT file ,use Xray to do the transformation of the XML into HTML.You have to replace [ with <. 3. View the formatted HTML file




Homework 4-11-2008

1. What does a CGI output contain in the HTTP header? Hint: Such as Content-type. More details in Appendix A of Textbook.
ans :
CGI資料輸出以STDOUT方式送出,而送出的資料是要遵照HTTP的協定(一種很簡單的client-server通訊協定,client和server之間的溝通由兩部分所組成,一是HTTP headers,另一就是文件或資料本身了,中間則以一個空白行隔開。)。為了要讓WWW伺服主機能辨識不同的資料型態,所以CGI在送出資料前,必須先送出MIME資訊以分辨資料型態。也就是HTML的檔頭(HEADER)部分。WWW收到檔頭後,如果無法判讀資料形態,就會毫不改變的將原資料送給使用者端的瀏覽器上。為避免這種情形,CGI程式應該送出符合MIME資料型態的格式:檔頭格式Content-type。如果使用者不希望由WWW伺服主機包裝,則可以自行將CGI程式輸出加入"HTTP/1.0"的訊息及完整的訊息封包,如此主機只要檢查到有此字串,會視此文件為已包裝,而直接將文件送到使用者端的瀏覽器上。輸出到使用者瀏覽器上的文件因為不是事先存在WWW伺服主機上的文件,所以稱為動態網頁。簡單來說就是:資料傳輸要讓WWW辨識不同資料類型,由Content-type定義網頁內容類型,而我們不希望由WWW伺服主機包裝,就自行將CGI程式輸出加入"HTTP/1.0"的訊息及完整的訊息封包,也就是將CGI輸出包涵在HTTP header中。

2. If you want to upload an mp3 file, should you use the GET or POST method? Why?
ans :
(1).用method="POST"。
(2).Form中的get和post方法,在數據傳輸過程中分別對應了HTTP協議中的GET和POST方法。二者主要區別如下:
Get是用來從服務器上獲得數據,而Post是用來向服務器上傳遞數據。
Get將表單中數據的按照variable=value的形式,添加到action所指向的URL後面,並且兩者使用「?」連接,而各個變量之間使用 「&」連接;Post是將表單中的數據放在form的數據體中,按照變量和值相對應的方式,傳遞到action所指向URL。
Get是不安全的,因為在傳輸過程,數據被放在請求的URL中,而如今現有的很多服務器、代理服務器或者用戶代理都會將請求URL記錄到日誌文件中,然後 放在某個地方,這樣就可能會有一些隱私的信息被第三方看到。另外,用戶也可以在瀏覽器上直接看到提交的數據,一些系統內部消息將會一同顯示在用戶面前。 Post的所有操作對用戶來說都是不可見的。
Get傳輸的數據量小,這主要是因為受URL長度限制;而Post可以傳輸大量的數據,所以在上傳文件只能使用Post(當然還有一個原因,將在後面的提到)。
Get限制Form表單的數據集的值必須為ASCII字符;而Post支持整個ISO10646字符集。
Get是Form的默認方法。

3. Reading Assignments:XML (Page 187-188 on the Textbook)

Homework 5-2-2008

[Lab]

1. Open NVu
2. Based on the code as in http://www.scottandrew.com/weblog/articles/dom_4write a code to generate the table of 9*9 products. (九九乘法表)
Hint: The javascript code should be enclosed by script tags.[Reading]
AJAXA New Approach to Web Applications Jesse GarrettAJAX 簡介 Brett McLaughlin











閱讀以上兩篇文章,整理成500字以上摘要。
ANS:
Ajax is mean Asynchronous JavaScript and XML, inside is similar with Dynamic HTML, and the most important thing is to enhance the interactivity, speed, and usability of homepage. Ajax it’s really several technologies, incorporates: standards-based presentation using XHTML and CSS; dynamic display and interaction using the Document Object Model; data interchange and manipulation using XML and XSLT; asynchronous data retrieval using XMLHttpRequest; and JavaScript binding everything together. XMLHttpRequest is only part of the Ajax equation, and is the technical component that makes the asynchronous server communication possible.