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.

Lab 26 Create Img using DOM

1. Open Nvu
2. Hand code a javascript that loads an image from Internet based onthe DOM model.
3. Use window.onload to load the image.

4. Use a button to load the image. Try how onclick works.Hint: The javascript code should be enclosed by script tags.Reference: DOM (Document Object Model)Reference:Scripting For The 6.0 Browsers, By Scott Andrew LePera



New stuff with Microsoft

In the Harry Shum's keynote speech at WWW 2008 and one of the industrial tracks by Tao, Microsoft feature the following two search services, one called virtual earth and the other photosynth. They look like fun. Definitely, we should try them out.
http://maps.live.com (does not only provide satellite image which is low resolution but also aerial views taken by airplanes flight-by)
http://www.labs.live.com/photosynth/ (it's an amazing way to view the photos people took and
ans: published on the net)ANS:總覺得用起來還是google map 比較好用,微軟的3Dmap優點是可以從不同的角度看圖,且能夠清楚的看到建築物的造型,是真實的照片。缺點是網路頻寬要求高,若速度不夠會相當的花時間。google的map雖然沒有各種的角度圖,也不能放大到太近的距離。但相對的比較不花時間,可以快速的搜尋,兩者所強調的不同,一個是著重在品質,一個是著重在迅速。

2008年5月12日 星期一