Wednesday, March 21, 2007

浪費我時間的 Wordpress

首先聲明: 不是 wordpress 不好用, 其實是我在要用Wordpress 時沒先搞清楚是什麼東西, 等都裝好了設好了才覺得不適合我使用, 浪費了我的時間了解這東西.

第一: 這是給要自行架設blog的人用的, 所以用別人架好的blog寫文章的人(如我)就不適用了
第二: 要裝wordpress時, 你要準備好能執行 PHP 的環境與安裝或找個MYSQL資料庫, 連名稱都看不懂的人(如很多人...)也就不適用了
第三: 就算會使用PHP與MYSQL, 但要找台電腦來裝這些, 還要隨時Online, 這也不是一般人可以做得到的, 雖然用 Google 搜尋會發現不少免費的, 但是你要有心理準備這些站不穩或是掛掉讓你心血全沒的打算. 那還是算了吧......

結論, 下次想裝一個別人都說好用的東西之前, 還是得先仔細看看這碗糕到底適不適合自己的需求,以免浪費寶貴時間.

Tuesday, March 20, 2007

Google + wikipedia = googlepedia

googlepedia 這是一個不錯的 firefox plugin

在google 的搜尋界面上, 搜尋結果也會同步顯是在 wikipedia 上的搜尋結果
如圖:

Google ig - Select Theme !!

Google ig 出現了一個新功能, 選擇佈景(Theme),

##CONTINUE##

(在圖片右下角)

總共有7種不同的佈景主題可以選, 而且每種佈景隨著時間變化會出現不同的圖樣



比較機車的一點是, 你必須將「語言偏好設定」改成不是「繁體中文」,像我是改成「English」, 這樣這個新功能就會出現了~~

XBMC 選擇字幕

XBMC 在這一版本可以自由的選擇字幕檔, 不用再像以前一定要將字幕檔名與影片檔名
編成同樣名稱. eg: 字幕檔名為 abc.srt . 影片檔名為 abc.avi
##CONTINUE##
方法如下:

1. 在撥放影片時, 選擇 start 鍵.
2. 選擇 聲音圖示
3. 就會出現"字幕"與"選擇字幕.... "兩各項目
4. "字幕'' 選擇上下鍵就可選擇不同語言的字幕, 如你在電腦用mplayer2觀看一樣
5. "選擇字幕.... " 就會出現檔案目錄讓你選擇你要的字幕檔案

ps. 還可以選擇壓縮檔內的字幕檔, 有機會在試看看此功能....

Sunday, March 04, 2007

JAVA 認證心得 -- SCWCD 1.4 (5)

  • Form Based Authentication

Username -> j_username

Password -> j_password

##CONTINUE##

  • jsp:useBean id=”name” scope=”page|request|session|application”

beandetail are :

type=”typeName”

class =”className”

class =”className” type=”typeName”

beanName=”beanName” type=”typeName”

  • The session management implementation in the servlet API revolves around the HttpSession interface
  • attribute

    name

    required

    rtexprvalue

    type

  • security-constraint

    web-resource-collection

    web-resource-name

    url-pattern

    http-method

    /web-resource-collection

    auth-constraint

    role-name

    /auth-constraint

    login-config

    auth-method

    realm-name

    /login-config

  • The setHeader() method of the HttpServletResponse interface is used to set headers of an Http response

  • jsp:declaration
  • SingleThreadModel

JAVA 認證心得 -- SCWCD 1.4 (4)

  • jspInit() _jspService jspDestory()
##CONTINUE##
  • body-element empty , JSP , tagdependent
  • 301 Moved permanently , 302 Moved temporarily
  • web-app

    listener

    listener-class></listener-class

    /listener

    /web-app

  • RequestDispatcher è using getRequestDispathcher method of ServletContext ingerface
  • When a JSP custom tag is read, and an action started, the pageContext object is passed to the tag object so that its environment can be initialized
  • Web application servlet initialization param

    web-app

    context-param

    param-name></param-name

    param-value></param-value

    /context-param

    /web-app

  • The implicit JSP arguments are only visible in the jspService() method
  • The object implementing the ServletContextAttributeListener interface is notified of changes to the attributes list on the servlet context of a web application
  • Init-param

    param-name

    param-value

JAVA 認證心得 -- SCWCD 1.4 (3)

  • SKIP_BODY EVAL_BODY_INCLUDE
##CONTINUE##
  • SKIP_PAGE EVAL_PAGE
  • String username = (String) request.getSession().getAttribute(“ttt”);
  • %@page isTreadSafe=”false”%
  • the three type of JSP directive type are include , taglib , page
  • In JSP , the default import list is

    java.lang.*

    java.servlet.http.*

    java.servlet.*

    java.servlet.jsp.*

  • login-config (auth-method?,realm-name?,form-login-config?)
  • servlet-mapping(servlet-name,url-pattern)
  • setContentType() belong to ServletResponse
  • res.sendRedirect(“dd”); req.getParameter(“dd”)
  • ServletContext interface and GenericServlet class provide log method
  • ServletOutputStream out = response.getOutputStream()

    OutputStream out = response.getOutputStream()

  • GenericServlet is abstract class , so must implement service(req,res)
  • getIntHeader(“xxx”) of HttpServletRequest
  • all the sub element of web-app are optional
  • HttpSessionActivationListener === session migrated

    HttpSessionAttributeListener === notify whether add remove replace method attributes in HttpSession objects

  • Notified change attr in ServletContext. Must implement ServletContextAttributeListener

  • HttpServletResponse setStatus(int c) sendError(int c)
  • This.getServletContext().log() log()
  • Notify objects add remove form session must implement HttpSessionBindingListener interface
  • HttpSessionListener notify a session is created or destroyed

    sessionCreated(HttpSessionEvent se)

    sessionDestroyed(HttpSessionEvent se)

JAVA 認證心得 -- SCWCD 1.4 (2)

  • getAuthType() method of HttpServletRequest returns name of the authenticating scheme used to protect the servlet
##CONTINUE##
  • invalidate() is used to expunge or invalidate a session object
  • The sendError method causes the server to generate and send an appropriate server-specific page describing the error

  • UnavailableException exception indicates to the web container that the servlet is either temporarily or permanently available

  • getLastModified method belongs to which HttpServlet interface
  • sessionCreated and sessionDestroyed are the valid methods of HttpSessionListener
  • HttpSessionActivationListener interface is designed to handle sessions that migrate from one server to another
  • getInitParameterNames returns names of the context's initialization parameters as Enumeration of String objects
  • taglib

    taglib-uri></taglib-uri

    taglib-location></taglib-location

    /taglib

    ! taglib id

  • The getResource() and getResourceAsStream() belong to ServletContext interface
  • session-config

    session-timeout1/session-timeout 1 min

    /session-config

    session-timeout0/session-timeout never expire

JAVA 認證心得 -- SCWCD 1.4 (1)

  • HttpServletResponse.encodeURL()
##CONTINUE##
  • findAttribute method Searches for the named attribute in page, request, session and application scope(s)
  • The Valid return types for doAfterBody are EVAL_BODY_AGAIN or SKIP_BODY
  • Fa~de pattern provides a layer between clients and subsystems of a complex system; shields clients from subsystem components, making the subsystems easier to use
  • The Default value for body-content element of tag library descriptor is JSP
  • Write the tag library descriptor element name that specifies that the value of attribute may be dynamically calculated at request time rtexprvalue
  • The two sub elements of taglib element are taglib-uri and taglib-location
  • Application jsp implicit object provides access to resources of the servlet engine (resources, attributes, init context parms, request dispatcher, server info, URL & MIME resources)
  • Instance variables are thread-safe if the servlet implements SingleThreadModel
  • isRequestedSessionIdFromCookie method checks whether the requested session id came in as cookie
  • The Valid values of transport-guarantee of user-data-constraint element of Deployment Descriptor are None, INTEGRAL or CONFIDENTIAL
  • transport-guaranteeNONE or INTEGRAL or CONFIDENTIAL/transport-guarantee

    /user-data-constraint

JAVA 認證心得 -- SCWCD 1.4

我當初參加的是 Beta Exam, (Sun Certified Web Component Developer for J2EE 1.4 beta exam)
也就是只要考過的話, 不但不用繳考試費, 而且是全世界第一批取得該證照的人.
這也是我在考取SCJP後第二張JAVA認證. 當時尚未以系統化的方式準備考試
所以所寄的筆記皆為重點是摘要, 不像其他認證心得有根據其考試章節分類紀錄重點.
不過應該也具參考價值, 有興趣的就參考參考囉

接下幾篇是我當初準備 SCWCD 認證的心得筆記~~~