Use phpmailer with gmail server to send the mail - LAMP

1)/etc/php5/apache2/php.ini

openssl enabled?

2) Download PHPMailer

class.phpmailer.php:


 public $Host          = 'smtp.gmail.com';
  public $Port          = 465;

3) create sendmail.php




set_time_limit(2000);
include("PHPMailer/class.phpmailer.php");
$mail= new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.gmail.com";
$mail->Port = 465;
$mail->CharSet = "utf-8";

$mail->Username = "";
$mail->Password = "";
$mail->From = "";
$mail->FromName = "";
$mail->Subject ="";
$mail->Body = "";
$mail->IsHTML(true);//true or false
$mail->AddAddress("");
if(!$mail->Send()){
     echo "ERROR: " . $mail->ErrorInfo;
}else{
     echo "
SUCCESS
";
}
?>






git tutorial

Git Object Types - A directed acyclic graph

  • blob
  • tree
  • commit
  • tag

HEAD means the newly commit of current branch
HEAD~1
HEAD~2
HEAD~3
HEAD^
HEAD~1^1
HEAD~1^2


Common Usage:

A:
$ git commit -a -m 'Push Temp'
$ git pull --rebase origin master

# Fix Conflict

$ git reset HEAD~1


B:
$ git stash --include-untracked
$ git pull --rebase origin master
$ git stash pop

# Fix Conflict & merge

C:


git merge-file
http://git-scm.com/docs/git-merge-file


Tutorial on Git / 白話文Git教學http://thoy.blog.ntu.edu.tw/2011/05/01/tutorial-on-git-%E7%99%BD%E8%A9%B1%E6%96%87git%E6%95%99%E5%AD%B8/


Git Tutorial 教學
http://www.slideshare.net/ihower/git-tutorial-13695342


寫給大家的Git教學
http://www.slideshare.net/littlebtc/git-5528339


Git 版本控制系統 (1)(2)(3)http://ihower.tw/blog/archives/2591http://ihower.tw/blog/archives/2620http://ihower.tw/blog/archives/2622

Remember

Remember

2012/11/12



Start .

mmap vs munmap

除錯, Debug, syslog, GDB, gprof

DEBUG MACRO

e.g.

#define BASIC_DEBUG 1
#define EXTRA_DEBUG 2
#define SUPER_DEBUG 4

#if (DEBUG & EXTRA_DEBUG)
.................
#endif


  • Use the compiler to define the DEBUG such as -DDEBUG=5

assert

善用assert巨集,判斷程式執行正確。assert 會將錯誤資訊送到stderr,隨後呼叫abort終止程式

e.g.
#include <assert.h>
void assert(int expression);

利用NDEBUG來定義assert這個巨集,如果NDEBUG被定義,就會取消assert定義。所以在編譯過程中,如果加上-DNDEBUG或是在程式碼assert.h之前加入 #define NDEBUG,就會關閉assertion的動作

syslog

當程式無法將錯誤訊息輸出到stdout 或是 stderr 時,善用syslog

e.g.
#include <syslog.h>
void syslog(int priority,char *format,...);
void openlog( char *ident, int option, int  facility);
void closelog( void );

GDB


e.g.

  1. gcc -g -o xxx xxx.c
  2. gdb
  3. (gdb)file ./xxx
  4. r


e.g.
  1. gcc -g -o xxx xxx.c
  2. gdb --args ./add 3 5
  3. r

e.g.

core dump,檔案名稱為core,這是程式的記憶體映像


  • r = (run)執行一個程式
  • bt = (backtrace)堆疊追蹤
  • p = (print)檢驗變數
  • l = (list)程式列表
  • b = (break)設定中斷點
  • c = (cont)讓程式繼續執行
  • display 程式在遇到中斷點而停止時,自動顯示陣列數值

  • commands ... end 指定一些命令,這些命令會在遇到中斷點時被執行
  • info display 查看display的狀況
  • info break 查看中斷點的狀況
  • disable break 1  暫停中斷點1


gprof

Use gprof to profiling C program on Ubuntu 12.04

e.g.

  1. gcc -pg xxx.c -o xxx
  2. ./xxx          # it will generate gmon.out at this step
  3. gprof xxx gmon.out > xxx.gprof          # use gprof to generate document
  4. vim xxx.gprof


ctags

cxref

cflow

ElectricFence Library - 記憶體除錯

**Valgrind - 偵測陣列錯誤存取與記憶體除錯

e.g.

$ valgrind --leak-check=yes -v ./add_vec

相關文件

Virtual Host

1)sudo vim /etc/apache2/httpd.conf

VirtualHost
    ServerName xxxxxxxxxxxx_url
    DocumentRoot /var/www/xxx
/VirtualHost

2) sudo /etc/init.d/apache2 restart

Vi & Vim Tutorial

cite:
http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html


:set wrap
:set nowrap

Replace all string in document



  • : %s / ______________ /\ ________________/ g

Set tab spaces

1. vim /etc/vim/vimrc
2. set ts=4


利用字串取代('^M' 要用 Ctrl+V 不要放開 Ctrl 再按 M 才能打出來喔!)
   :%s/^M/\r/g


Display the line number in vim



  1. vim /etc/vim/vimrc
  2. :set number


Foreground and Background Switch

1) Ctrl + z
2) fg ....
http://arjanvandergaag.nl/blog/foreground-and-background-processes.html

Set current line highlight

set cursorline
hi CursorLine cterm=NONE ctermbg=darkred ctermfg=white
hi CursorColumn cterm=NONE ctermbg=darkred ctermfg=white

lightmagenta darkgray lightgrey darkgrey lightgreen lightgray darkmagenta gray white red grey darkred brown darkblue darkgreen lightblue yellow cyan

Folding codes in vim

1. visual select the codes (v) (ctrl+v)
2. zf
3. za

相關文件

libcutils pthread

http://endroid.blogspot.com/2011/07/android-development-notes.html
------------------------------------------------------------------------------------------
http://www.cnblogs.com/ouling/archive/2011/09/08/2171337.html

The C Preprocessor

4. Conditionals

  • A program may need to use different code depending on the machine or operating system it is to run on. In some cases the code for one operating system may be erroneous on another operating system; for example, it might refer to data types or constants that do not exist on the other system. When this happens, it is not enough to avoid executing the invalid code. Its mere presence will cause the compiler to reject the program. With a preprocessing conditional, the offending code can be effectively excised from the program when it is not valid.
  • You may want to be able to compile the same source file into two different programs. One version might make frequent time-consuming consistency checks on its intermediate data, or print the values of those data for debugging, and the other not.
  • A conditional whose condition is always false is one way to exclude code from the program but keep it as a sort of comment for future reference.
  • e.g.
    • #ifdef
    • #ifndef
    • #endif
  • e.g.
    • #if (!defined(_DEBUG) && defined(USE_MYLIB))
    • #endif
    • 好處: 可同時檢測多個預編譯變數
  • e.g.
    • #if
    • #else
    • #endif
  • e.g.
    • #if
    • #elif
    • #elif
    • #else
    • #endif
  • Delete codes
    • #if 0
    • #endif

5. Diagnostics (診斷)

  • #error
    • The directive ‘#error’ causes the preprocessor to report a fatal error ( enforce the compiler stopping compile ). The tokens forming the rest of the line following ‘#error’ are used as the error message.
    • #ifdef  A
    • #error "ERROR A"
    • #endif
  • #warning
    • The directive ‘#warning’ is like ‘#error’, but causes the preprocessor to issue a warning and continue preprocessing. The tokens following ‘#warning’ are used as the warning message.

6. #line

  • The C preprocessor informs the C compiler of the location in your source code where each token came from.
  • e.g.
    • #line linenum
    • #line linenum filename
    • #line anything else

7. #pragma

  • The method specified by the C standard for providing additional information to the compiler.
  • e.g. #pragma token-sequence
    • If token-sequence exist, then doing the correspond action.

8. #ident


9.#using


10. Operator in preprocessor

  • #
    • stringizing operator
  • ##
    • token pasting operator
  • define()

11. Miscellaneous directive

  • #pragma
  • #line
  • #error

gcc 編譯過程


一個編譯過程通常需要4道程序
  1. 預處理 (Pre-Processing) 先處理那些#ifdef #define這些東西並做一些巨集代換
  2. 編譯 (Compiling) 做語意分析,翻譯成組合語言
  3. 彙編 (Assembling) 翻成機器碼與OS有關的格式,做成relocatable obj檔
  4. 鏈接 (Linking)  找到symbol(函式,變數名)與程式庫(shared obj)中的副程式 ,做成可執行obj檔(executable obj)

  • gcc -Wall -pedantic -ansi  (常用)



e.g.

Syntax

#define identifier replacement-list(optional)(1)
#define identifier( parameters ) replacement-list(2)
#define identifier( parameters, ... ) replacement-list(3)(since C99)
#define identifier( ... ) replacement-list(4)(since C99)
#undef identifier(5)

Explanation

#define directives

The #define directives define the identifier as a macro, that is they instruct the compiler to replace all successive occurrences of identifier with replacement-list, which can be optionally additionally processed. If the identifier is already defined as any type of macro, the program is ill-formed unless the definitions are identical.
Object-like macros
Object-like macros replace every occurrence of a defined identifier with replacement-list. Version (1) of the #definedirective behaves exactly like that.
Function-like macros
Function-like macros replace each occurrence of a defined identifier with replacement-list, additionally taking a number of arguments, which then replace corresponding occurrences of any of the parameters in the replacement-list. The number of arguments must be the same as the number of arguments in the macro definition (parameters) or the program is ill-formed. If the identifier is not in functional-notation, i.e. does not have parentheses after itself, it is not replaced at all.
Version (2) of the #define directive defines a simple function-like macro.
Version (3) of the #define directive defines a function-like macro with variable number of arguments. The additional arguments can be accessed using __VA_ARGS__ identifier, which is then replaced with arguments, supplied with the identifier to be replaced.
Version (4) of the #define directive defines a function-like macro with variable number of arguments, but no regular arguments. The arguments can be accessed only with __VA_ARGS__ identifier, which is then replaced with arguments, supplied with identifier to be replaced.

# and ## operators

In function-like macros, a # operator before an identifier in the replacement-list runs the identifier through parameter replacement and encloses the result in quotes, effectively creating a string literal. In addition, the preprocessor adds backslashes to escape the quotes surrounding embedded string literals, if any, and doubles the backslashes within the string as necessary. All leading and trailing whitespace is removed, and any sequence of whitespace in the middle of the text (but not inside embedded string literals) is collapsed to a single space. This operation is called "stringification". If the result of stringification is not a valid string literal, the behavior is undefined.
When # appears before __VA_ARGS__, the entire expanded __VA_ARGS__ is enclosed in quotes:
#define showlist(...) puts(#__VA_ARGS__)
showlist();            // expands to puts("")
showlist(1, "x", int); // expands to puts("1, \"x\", int")
(since C99)
## operator between any two successive identifiers in the replacement-list runs parameter replacement on the two identifiers and then concatenates the result. This operation is called "concatenation" or "token pasting". Only tokens that form a valid token together may be pasted: identifiers that form a longer identifier, digits that form a number, or operators + and = that form a +=. A comment cannot be created by pasting / and * because comments are removed from text before macro substitution is considered. If the result of concatenation is not a valid token, the behavior is undefined.
Note: some compilers offer an extension that allows ## to appear after a comma and before __VA_ARGS__, in which case the ## does nothing when __VA_ARGS__ is non-empty, but removes the comma when __VA_ARGS__ is empty: this makes it possible to define macros such as fprintf (stderr, format, ##__VA_ARGS__)



Macro offsetof


#include
#define offsetof(type, member) (size_t)&(((type*)0)->member)



Macro container_of


#include <linux/kernel.h>
#define container_of(ptr, type, member) ({ \
     const typeof( ((type *)0)->member ) *__mptr = (ptr); \
     (type *)( (char *)__mptr - offsetof(type,member) );})    


相關文件

Program Elapsed time


#include <stdio.h>
#include <time.h>
clock_t start = clock();
/* Code you want timed here */
printf("Time elapsed: %f\n", ((double)clock() - start) / CLOCKS_PER_SEC);

Reduce execution time of a C program?



1) Use the right algorithms. Look into the Big O efficiency of any algorithms you are using, and make sure there aren't more efficient algorithms available. 

2) Think about trading using more memory for a faster algorithm. Perhaps pre-computing tables of intermediate results. 

3) Use a profiler to see where the bottle necks are and try improving them. 

4) Optimize the inner most loops using assembly language to get the last little bit faster. 

5) Run it on a faster computer. 

6) Make it run in parallel across many computers or CPUs. This is especially good on the newer Intel chips where you have access to multiple CPUs on one chip. Distributed network computing sometimes is a good idea. Cloud computing is another possibility these days. 

7) Make sure that C really is the right answer. It might not be in all cases. 

Read more: http://wiki.answers.com/Q/How_do_you_reduce_execution_time_of_a_C_program#ixzz24RwdgPVY

CPU bound v.s. I/O bound

From Stackoverflow, I saw a good comparison between CPU bound and I/O bound applicaition.
--------------------------------------------------------------------------------------------------------

It's pretty intuitive:
A program is CPU bound if it would go faster if the CPU were faster, i.e. it spends the majority of its time simply using the CPU (doing calculations). A program that computes new digits of π will typically be CPU-bound, it's just crunching numbers.
A program is I/O bound if it would go faster if the I/O subsystem was faster. Which exact I/O system is meant can vary; I typically associate it with disk. A program that looks through a huge file for some data will often be I/O bound, since the bottleneck is then the reading of the data from disk.

除權除息

除息日申報參考價 = 前一交易日收盤價 -現金股利金額

例如:A公司決定於8月7日除息,發放現金股利3元。8月6日收盤價為50元,那麼在8月7日的開盤參考價將為(50-3)元,為47元。

除權參考價=前一交易日該股票收盤價/(1+配股率)
例如:B公司決定於7月15日發放股票股利五百股(即配股率為50%0。7月14日的收盤價為150元。那麼在7月15日除權當天的參考價將為(150/1+0.5)=100元

原文網址: 什麼是除權除息? http://www.ipobar.com/read.php?tid-68746.html#ixzz23V3u7mUQ

SELECT LIMIT

select * from table LIMIT 3;

select * from table LIMIT 3,5;

設定Monitor by nvidia-settings

GeForce GT 435M
============================================
$gksu nvidia-settings
============================================
Reference1:
http://viktorstanchev.com/blog/ubuntu-11.04-rotate-only-one-of-two-monitors

Refrence2:
http://www.libre-software.net/ubuntu-linux-external-monitor-nvidia-rotate
Rotate / pivot / tilt your screen

Set the display(s) you want to rotate to "Separate X screen" as described in part A. Then edit the xorg.conf file:
gksudo gedit /etc/X11/xorg.conf
Add the RandRRotation option somewhere in the "Screen" section to allow rotation:
Section "Screen"
...
Option "RandRRotation" "True"
....
Complete example:
Section "Screen"
    Identifier   "Screen0"
    Device       "Device0"
    Monitor      "Monitor0"
    DefaultDepth 24
    Option       "TwinView" "0"
    Option       "metamodes" "CRT: nvidia-auto-select +0+0"
    Option       "RandRRotation" "True"
    SubSection "Display"
        Depth 24
    EndSubSection
EndSection
Finally, restart your computer. You'll then be able to rotate your screen through the NVIDIA utility, or via the command line:
xrandr -o left
xrandr -o normal
Use man xrandr for more details and options.

execution time on terminal

Reference:
http://manpages.ubuntu.com/manpages/maverick/man1/time.1.html


NAME

       time - run programs and summarize system resource usage

SYNOPSIS

       time   [ -apqvV ] [ -f FORMAT ] [ -o FILE ]
              [ --append ] [ --verbose ] [ --quiet ] [ --portability ]
              [ --format=FORMAT ] [ --output=FILE ] [ --version ]
              [ --help ] COMMAND [ ARGS ]

DESCRIPTION

       time  run  the  program  COMMAND with any given arguments ARG....  When
       COMMAND finishes, time displays information  about  resources  used  by
       COMMAND  (on  the standard error output, by default).  If COMMAND exits
       with non-zero status, time displays a  warning  message  and  the  exit
       status.

       time  determines  which information to display about the resources used
       by the COMMAND from the string FORMAT.  If no format  is  specified  on
       the  command  line, but the TIME environment variable is set, its value
       is used as the format.  Otherwise, a default format built into time  is
       used.

       Options  to  time  must  appear  on  the  command  line before COMMAND.
       Anything on the command line after COMMAND is passed  as  arguments  to
       COMMAND.

OPTIONS

       -o FILE, --output=FILE
              Write  the  resource  use  statistics  to FILE instead of to the
              standard error stream.  By default, this  overwrites  the  file,
              destroying  the file's previous contents.  This option is useful
              for collecting information on interactive programs and  programs
              that produce output on the standard error stream.
       -a, --append
              Append  the  resource use information to the output file instead
              of overwriting
               it.  This option is only useful with  the  `-o'  or  `--output'
              option.
       -f FORMAT, --format FORMAT
              Use  FORMAT  as  the  format  string that controls the output of
              time.  See the below more information.
       --help Print a summary of the command line options and exit.
       -p, --portability
              Use the following format  string,  for  conformance  with  POSIX
              standard 1003.2:
                        real %e
                        user %U
                        sys %S
       -v, --verbose
              Use  the  built-in verbose format, which displays each available
              piece of information on the program's resource use  on  its  own
              line, with an English description of its meaning.
       --quiet
              Do  not report the status of the program even if it is different
              from zero.
       -V, --version
              Print the version number of time and exit.

FORMATTING THE OUTPUT

       The format string FORMAT controls the contents of the time output.  The
       format  string  can  be  set  using  the  `-f'  or  `--format', `-v' or
       `--verbose', or `-p' or  `--portability'  options.   If  they  are  not
       given,  but  the TIME environment variable is set, its value is used as
       the format string.  Otherwise, a built-in default format is used.   The
       default format is:
         %Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
         %Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps

       The   format   string   usually   consists   of  `resource  specifiers'
       interspersed with plain text.  A  percent  sign  (`%')  in  the  format
       string  causes  the following character to be interpreted as a resource
       specifier, which  is  similar  to  the  formatting  characters  in  the
       printf(3) function.

       A  backslash (`\') introduces a `backslash escape', which is translated
       into a single printing character  upon  output.   `\t'  outputs  a  tab
       character,  `\n'  outputs  a  newline, and `\\' outputs a backslash.  A
       backslash followed by any other character outputs a question mark (`?')
       followed  by  a backslash, to indicate that an invalid backslash escape
       was given.

       Other text in the format string is copied verbatim to the output.  time
       always prints a newline after printing the resource use information, so
       normally format strings do not end with a newline character (or `0).

       There are many resource specifications.  Not all resources are measured
       by  all  versions  of  Unix, so some of the values might be reported as
       zero.  Any character following a percent sign that is not listed in the
       table below causes a question mark (`?') to be output, followed by that
       character, to indicate that an invalid resource specifier was given.

       The resource specifiers, which are a superset of  those  recognized  by
       the tcsh(1) builtin `time' command, are:
              %      A literal `%'.
              C      Name  and  command  line  arguments  of the command being
                     timed.
              D      Average size of the  process's  unshared  data  area,  in
                     Kilobytes.
              E      Elapsed  real  (wall  clock) time used by the process, in
                     [hours:]minutes:seconds.
              F      Number of  major,  or  I/O-requiring,  page  faults  that
                     occurred while the process was running.  These are faults
                     where the page  has  actually  migrated  out  of  primary
                     memory.
              I      Number of file system inputs by the process.
              K      Average   total   (data+stack+text)  memory  use  of  the
                     process, in Kilobytes.
              M      Maximum resident set  size  of  the  process  during  its
                     lifetime, in Kilobytes.
              O      Number of file system outputs by the process.
              P      Percentage  of  the  CPU that this job got.  This is just
                     user + system times divided by the total running time. It
                     also prints a percentage sign.
              R      Number  of minor, or recoverable, page faults.  These are
                     pages that are not valid (so they fault) but  which  have
                     not  yet  been  claimed by other virtual pages.  Thus the
                     data in the page is still valid  but  the  system  tables
                     must be updated.
              S      Total  number of CPU-seconds used by the system on behalf
                     of the process (in kernel mode), in seconds.
              U      Total  number  of  CPU-seconds  that  the  process   used
                     directly (in user mode), in seconds.
              W      Number  of  times  the  process  was  swapped out of main
                     memory.
              X      Average  amount  of  shared  text  in  the  process,   in
                     Kilobytes.
              Z      System's  page  size,  in  bytes.   This  is a per-system
                     constant, but varies between systems.
              c      Number  of  times  the   process   was   context-switched
                     involuntarily (because the time slice expired).
              e      Elapsed  real  (wall  clock) time used by the process, in
                     seconds.
              k      Number of signals delivered to the process.
              p      Average unshared stack size of the process, in Kilobytes.
              r      Number of socket messages received by the process.
              s      Number of socket messages sent by the process.
              t      Average resident set size of the process, in Kilobytes.
              w      Number  of  times  that  the program was context-switched
                     voluntarily,  for  instance  while  waiting  for  an  I/O
                     operation to complete.
              x      Exit status of the command.

EXAMPLES

       To run the command `wc /etc/hosts' and show the default information:
            time wc /etc/hosts

       To  run  the command `ls -Fs' and show just the user, system, and total
       time:
            time -f "%E real,%U user,%S sys" ls -Fs

       To edit the file BORK and have  `time'  append  the  elapsed  time  and
       number of signals to the file `log', reading the format string from the
       environment variable `TIME':
            export TIME="%E,%k" # If using bash or ksh
            setenv TIME "%E,%k" # If using csh or tcsh
            time -a -o log emacs bork

       Users of the bash shell need to use an explicit path in  order  to  run
       the  external time command and not the shell builtin variant. On system
       where time is installed in /usr/bin, the first example would become
            /usr/bin/time wc /etc/hosts

ACCURACY

       The elapsed time is not collected atomically with the execution of  the
       program;  as  a  result,  in bizarre circumstances (if the time command
       gets stopped or swapped out in between when  the  program  being  timed
       exits  and  when  time calculates how long it took to run), it could be
       much larger than the actual execution time.

       When the running time of a command is very  nearly  zero,  some  values
       (e.g.,  the  percentage  of  CPU  used)  may be reported as either zero
       (which is wrong) or a question mark.

       Most information shown by time is  derived  from  the  wait3(2)  system
       call.   The numbers are only as good as those returned by wait3(2).  On
       systems  that  do  not  have  a  wait3(2)  call  that  returns   status
       information,  the  times(2)  system  call is used instead.  However, it
       provides much less information than wait3(2), so on those systems  time
       reports the majority of the resources as zero.

       The `%I' and `%O' values are allegedly only `real' input and output and
       do not include those supplied  by  caching  devices.   The  meaning  of
       `real'  I/O  reported by `%I' and `%O' may be muddled for workstations,
       especially diskless ones.

DIAGNOSTICS

       The  time  command  returns  when  the  program  exits,  stops,  or  is
       terminated  by  a  signal.   If the program exited normally, the return
       value of time is the return  value  of  the  program  it  executed  and
       measured.  Otherwise,  the  return  value is 128 plus the number of the
       signal which caused the program to stop or terminate.

AUTHOR

       time was written by David MacKenzie. This man page was  added  by  Dirk
       Eddelbuettel <edd@debian.org>, the Debian GNU/Linux maintainer, for use
       by the Debian GNU/Linux distribution but  may  of  course  be  used  by
       others.

SEE ALSO

       tcsh(1), printf(3)

Instruction in Ubuntu


updatedb
------------------------------------------------------
locate (file)
------------------------------------------------------
vimdiff
------------------------------------------------------

影片製作


Requiem for a dreamhttp://www.youtube.com/watch?v=KSY4Yi2ypno
http://www.youtube.com/watch?v=22ut_pzoWgY&feature=related
http://www.youtube.com/watch?v=Z4iW8pDnft8

http://www.youtube.com/watch?v=56dw9NCnNVs
http://www.youtube.com/watch?v=Hz4VRJ6tmtw
http://www.youtube.com/watch?v=kv8mT1L8h0Q
http://www.apple.com/tw/ilife/imovie/

Steve Jobs
http://www.afu.tw/index.php?option=com_content&view=article&id=187:--steve-jobs-&catid=14:2010-11-28-05-07-48&Itemid=18
http://www.techbang.com/posts/6811-steve-jobs-wonderful-paragraph-10-videos-10-photos-10-of-speech
http://www.youtube.com/watch?v=2-ntLGOyHw4

FB
http://www.youtube.com/watch?v=lB95KLmpLR4
TOP 10
http://www.youtube.com/watch?v=7hqGIGq5PmQ&feature=related
#10 Halo 3 - Finish the Fight
#9 Ace Combat 5 - The Unsung War
#8 X-Ray Dog - Dethroned
#7 Immediate Music - Avenger
#6 The Chronicles of Narnia - The Battle
#5 Pirates of the Caribbean - He's a Pirate
#4 E.S. Posthumus - Unstoppable
#3 Immediate Music - Lacrimosa
#2 Clint Mansell - Requiem for a Dream
#1 Immediate Music - Europa (instrumental)
12-tips for better film editing
http://digitalfilms.wordpress.com/2008/12/16/12-tips-for-better-film-editing/




http://www.findsounds.com/
特色:可以直接搜尋關鍵字

1.閃吧(簡體)
特色:分類很詳細、資源很多,現在又有搜尋功能!
http://www.flash8.net/download.shtml

2.Free Sound Effect(英文)
http://www.a1freesoundeffects.com/
特色:也有分類,有很多日常生活中的聲音
使用:進去網頁後,點選右邊的Free Sound Effects

3.I Love Wavs(英文)
http://www.ilovewavs.com/
特色:音效都是wav檔,甚至有電影音樂音效!

後面兩個是英文的,是國外很大的免費音效分享站
資料庫都很豐富,可以輔助交換使用。

4.FindSounds (英文)
http://www.findsounds.com/
特色:可以直接搜尋關鍵字




Free Play
http://www.freeplaymusic.com/

OneMusic Sound Samples
BBC所提供!超過一千種以上音效素材。以音效的型態做區分,
http://www.bbc.co.uk/radio1/onemusic/sample/index.shtml

I Love WAVs
提供免費 WAV檔音效素材
http://www.ilovewavs.com/

A1 Free Sound Effects
網址http://www.a1freesoundeffects.com/

Tingatel Sound Archive
網址 http://freesoundfiles.tintagel.net/Audio/

Royalty
網址 http://www.partnersinrhyme.com/pir/PIRsfx.shtml

MIDI4u
提供免費MIDI檔案與karaoke檔案!
網址 http://www.midi4u.com/

WavPlanet
有許多電視或電影影集的Wav, Midi檔案。
網址 http://www.wavplanet.com/

Reel Wavs
主要蒐集免費電影WAV檔,
網址 http://www.reelwavs.com/

FindSounds
提供音效搜尋,可選擇檔案類型、聲道、辨識率、比率、檔案大小,
搜尋後會顯示音頻的曲線圖,還提供一些常用的音效類型,
搜尋時必須輸入英文!
網址 http://www.findsounds.com/

Movie Sounds Central
免費較高音質的WAV檔案,
主要擷取電影片段對話並有口白和介紹。
網址 http://www.moviesoundscentral.com/

Soundsnap
http://www.soundsnap.com/
素材分類良好!開放網友上傳分享!
三種音樂檔格式可供下載!

ACIDplanet.com
SONY ACID 8pack 每禮拜提供免費高音質音樂素材給大家!
還有網有自製上傳的音效!挺酷!
當然最主要是在賣高階ACID音效編輯軟體!
http://www.acidplanet.com/

----------------------------------------------------------------------------------------------------------
Reference:

http://www.jtps.tyc.edu.tw/information/studies01/024_9403DV%A9%E7%C4%E1%A7%DE%A5%A9/DV%A9%E7%C4%E1%A7%DE%A5%A9.pdf
http://deepblueread.blogspot.tw/2010/05/blog-post_18.html
http://sg.ck.tp.edu.tw/ckad/camera/2005_10_24052049.asp
好萊塢大師級鏡頭教程
http://www.tudou.com/programs/view/s-JGBUnzWlE/
Three point video
http://www.youtube.com/watch?v=gkUqBJoxZ-I
剪輯影片教學
http://www.videocopilot.net/tutorials/q/title/


http://www.youtube.com/watch?v=ouFqIrjrWos&feature=player_embedded
http://allthingsd.com/20120627/with-sights-dead-set-on-the-living-room-google-debuts-a-streaming-media-device/

劇本:
對話            人名 : 「」 加冒號跟單引號 
旁白            人名 OS:「」 OS冒號跟單引號 
插入說明       (  )  描述演員心境或語氣等,與攝影鏡頭技術 
鏡頭資訊          描述鏡頭下人事物互動,與攝影鏡頭技術


鏡頭技術:
1.畫面構成技術:拍攝尺寸  位置 與角度

 1-1尺寸:ELS LS MS CS CU ECU 尺寸越大,畫面的張力越強

 1-2位置:高位置(遠眺場景) 平視位置(較自然中庸) 低位置(趣味 不平凡畫面)

 1-3角度:高角度(角色定位) 平角度(較自然中庸) 低角度(高聳 偉大)

2.動態視感技術:鏡頭運動技巧

 2-1 Cut 靜態鏡頭

 2-2 Pan 橫搖鏡頭

 2-3 Tilt 直搖鏡頭

 2-4 Dollyin Dolly out 推拉鏡頭

 2-5 Truck 側向鏡頭

 2-6 Arc 曲線鏡頭

 2-7 Zoom in Zoom out 變焦鏡頭