2008年9月25日 星期四

Redirect 網址的方法

Reference: [WEB][PHP][SEO] 轉導、轉向(Redirect)網址的方法

在將網站更換成新網址的情況下,可能會在舊網址上使用到一些『轉導網址』的方法,以便將原本的使用者及其流量引導到新的網址去。
以下整理、討論到幾種轉導(Redirect)網址的技術方法,並且探討該方法對 SEO 的影響:

1. 使用 HTTP 通訊協定 301 Moved Permanently 來完成轉導網址 (永久轉址)
(建議使用,不會對 SEO 有不良影響)
PHP 程式範例:
<?php
   header("HTTP/1.1 301 Moved Permanently");
   eader("Location: http://www.new-url.com/");
?>
<p>The document has moved <a href="http://www.new-url.com/">here</a>.</p>
  • 註1: 使用者的瀏覽器必須根據 HTTP header 的 Location 欄位值(稱做URI)來轉導網址。
  • 註2: 除非 Request Method 是 HEAD,不然伺服器端回覆的訊息內必須包含一短的新網址的連結(hyperlink)資訊。
(... 閱讀「Redirect 網址的方法」全文)

2007年9月25日 星期二

[Research] Ontology (Some Notes)

From Wikipedia - Ontology (computer science)
1. ontology:
  • individual - 個體 (object)
  • classes - 個體的集合, 群組
  • attribute - 描述個體的屬性
  • relations - 個體與個體之間的關係 (連結)
  • events - ?
2. classes:
  • extensional - 若 class C 與 class C' 擁有相同成員,則 C = C'。也就是該 class 不受外部影響。
  • intensional - 非 extensional 的 class
(... 閱讀「[Research] Ontology (Some Notes)」全文)

2007年7月26日 星期四

[Research] Related Work

Search keywords: photo, metadata, temporal, social network ZoneTag: Designing Context-Aware Mobile Media Capture to Increase Participation
  • using mobile device and suggested tags to help user annotation.

  • suggested tags: - past tags from the user - user's social network, the public - related tags near the user's location

  • From Context to Content: Leveraging Context to Infer Media Metadata
  • leverage photo metadata when cameraphone capture the picture.

  • use location information to infer context.

  • combining and sharing spatial, temporal, and social contextual metadata from a given user and across users allows us to make inferences about media content.
  • (... 閱讀「[Research] Related Work」全文)

    2007年7月23日 星期一

    [Research] Think about It

  • Suppose we assume that social network has been constructed (in some ways), what can we do based on this network?
  • It is important to experiment conducting social network is necessary.

  • (... 閱讀「[Research] Think about It」全文)

    2007年4月16日 星期一

    AAI Reading Notes - Some Terms(2)

    Reference: 科學哲學課程紀要
  • 演繹法(deduction) 最典型(簡單)的演繹法是亞里斯多德的「三段論法」。 大前提: P -> Q (成立) 小前提: P (為真) 則結論: Q (為真) 例如:
    大前提: 若天下雨則地濕。 小前提:天下雨。 結論: 地濕。
    * 演繹法可以有很複雜的推論過程,但其基本結構即是三段論法。

  • 歸納法(induction) 在觀察了N個實例p1, p2, p3,…,pn均為真之後,歸納出其通則P為真。 例如:
    看了n天的太陽均自東方升起,歸納得到:每天的太陽均由東方升起。

  • 設證法(abduction) 很像演繹法,但演繹法的結論在此是小前提;演繹法的小前提,在此成了結論。結論不一定為真。許多設計的推論過程是設證法。 大前提: P -> Q (成立) 小前提: Q (為真) 則結論: P (不一定為真) 例如:
    大前提: 若杯子有把手,則手不會被燙到。 小前提: (想設計)手不會被燙到(的杯子)。 結論: (設計)有把手的杯子。
    【討論:要設計一個不燙手的杯子,也可能是加一「底座」,而非加「把手」。雖然加上把子可以達成設計目標,但非一定如此不可】

  • 類比法(analogy) 前提一: P -> Q (成立) 前提二: r ≒ P (r 類似 P) 前提三: s ≒ Q (s 類似 Q) 前提四: r (為真) 結論: s (為真) 例如:
    前提一: 健康的肺,可以使身體舒暢。 前提二: 公園綠地如肺。 前提三: 都市如身體。 前提四: 有充分的公園綠地。 結論: 可以有舒暢的都市。
  • (... 閱讀「AAI Reading Notes - Some Terms(2)」全文)

    2007年4月14日 星期六

    Jess Note

    Reference: Jess document
  • salience: use to define the priority of rules, higher value have higher priority.
    Jess> (defrule example-6
    (declare (salience -100))
    (command exit-when-idle)
    =>
    (printout t "exiting..." crlf))
  • the following code can match expressions with one pair parenthesis.
    ?f <- (expr $?front "(" $?middle ")" $?end)
    $?front can match the string until reach the first "(" $?middle can match the string until reach the first ")" so does $?end.
  • clear: clear working memory. The working memory will be empty.
  • reset: reset working memory and insert all facts in deffacts.
  • batch hw2.clp: execute the Jess file named hw2.clp
  • all command must be enclosed with parenthesis
  • (... 閱讀「Jess Note」全文)

    2007年4月9日 星期一

    AAI Reading Notes - Some Terms(1)

  • CYC:(wikipedia)(link1)
  • frame-language: (wikipedia) Like Object-orient language. A structure with slots: frame name, slot name and slot value. Frames are organized as hierarchy structure for inferring and reasoning.
  • Predicate:(citation) A predicate is a verb phrase template that describes a property of objects, or a relationship among objects represented by the variables.
  • CycL: (wikipedia) Based on predicate calculus and has a syntax similar to that of the Lisp programming language.
  • (... 閱讀「AAI Reading Notes - Some Terms(1)」全文)