Tuesday, April 28, 2009

Ubuntu hibernate suspend

Some commands to hibernate/suspend, tested on Ubuntu Hardy (8.04). Note that the effects of these command on laptop and desktop may be different with the same version of Ubuntu.


pmi action hibernate

pmi action suspend


pm-hibernate

pm-suspend


/etc/acpi/sleep.sh

/etc/acpi/hibernate.sh


/usr/lib/hal/scripts/linux/hal-system-power-hibernate-linux

/usr/lib/hal/scripts/linux/hal-system-power-suspend-linux



BONUS:

gnome-screensaver-command --lock

sudo apt-get install uswsusp && sudo s2ram --force

sudo apt-get install uswsusp && sudo s2disk

Sunday, April 19, 2009

Oracle and Sun

A big acquisition !

XPath quick notes

The most useful path expressions to select nodes:


Expression Description
nodename Selects all child nodes of the named node
/ Selects from the root node
// Selects nodes in the document from the current node that match the selection no matter where they are
. Selects the current node
.. Selects the parent of the current node
@ Selects attributes


XPath wildcards to select unknown XML elements.


Wildcard Description
* Matches any element node
@* Matches any attribute node
node() Matches any node of any kind


XPath axes defines a node-sets relative to the current node.


AxisName Result
ancestor Selects all ancestors (parent, grandparent, etc.) of the current node
ancestor-or-self Selects all ancestors (parent, grandparent, etc.) of the current node and the current node itself
attribute Selects all attributes of the current node
child Selects all children of the current node
descendant Selects all descendants (children, grandchildren, etc.) of the current node
descendant-or-self Selects all descendants (children, grandchildren, etc.) of the current node and the current node itself
following Selects everything in the document after the closing tag of the current node
following-sibling Selects all siblings after the current node
namespace Selects all namespace nodes of the current node
parent Selects the parent of the current node
preceding Selects everything in the document that is before the start tag of the current node
preceding-sibling Selects all siblings before the current node
self Selects the current node

Monday, April 06, 2009

English Talking Practice

Sau bài về cách luyện kỹ năng nghe thì có một số bạn hỏi tôi có tips nào tương tự như thế để luyện nói hay không .

Dĩ nhiên là có rồi :-)

Nhưng nên nhớ có nhiều phương pháp học tiếng Anh và bạn có thể áp dụng vài cách trong số đó miễn là bạn cảm thấy phù hợp với mình và có hiệu quả.
Điều quan trọng là không nên áp dụng TẤT CẢ quy tắc hoặc cách học của người khác. Khi học theo một cách nào đó, nên thử chỉ 1 cách đó hoặc tối đa là 2, 3 cách; đừng dại dột mà thử nhiều cách mới cùng lúc, bởi khi đó bạn sẽ khó nhận thấy kết quả.


Sau đây là một số quy tắc quan trọng để học tiếng Anh, chủ yếu giúp cải thiện khả năng Talking, mà bản thân tôi cảm thấy rất hiệu quả. Nếu bạn đã có căn bản về ngữ pháp tiếng Anh thì áp dụng những cách này sẽ giúp bạn cải thiện việc giao tiếp với người nước ngoài trong thời gian ngắn !


1/ Từ vựng: học theo CỤM TỪ (câu ngắn cũng có thể xem là 1 cụm từ)
REASON:


2/ Gặp người nước ngoài: đừng bận tâm ngữ pháp
REASON:


3/ Trong lớp học: chỉ dùng tiếng Anh (các địa điểm như English Club cũng vậy)
REASON:


4/ Nghiền ngẫm: nghe lặp đi lặp lại để hiểu (ko dùng thiết bị thì tự mình đọc)
REASON:


5/ Ngữ pháp: nắm vững cơ bản (Simple Past, Simple Present, Present Perfect, Simple Future) qua các đoạn kể.
REASON:


6/ Cập nhật: học từ vựng thực tế, hiện đại qua các bản tin và Internet sites.
REASON:


7/ Phản xạ với tiếng Anh: bằng các đoạn Hỏi Đáp đơn giản thực tế
REASON:



Have fun ! and Good Luck !