https://pear.php.net/package/HTTP_Request2/docs/latest/__filesource/fsource_HTTP_Request2__HTTP_Request2-2.0.0beta3docsexamplesupload-rapidshare.php.html
2011年4月20日 星期三
Rapidshare Upload API
https://pear.php.net/package/HTTP_Request2/docs/latest/__filesource/fsource_HTTP_Request2__HTTP_Request2-2.0.0beta3docsexamplesupload-rapidshare.php.html
2011年2月22日 星期二
CURL NOTES
http://net.tutsplus.com/tutorials/php/html-parsing-and-screen-scraping-with-the-simple-html-dom-library/
CURL NOTES
http://net.tutsplus.com/tutorials/php/html-parsing-and-screen-scraping-with-the-simple-html-dom-library/
2010年12月26日 星期日
2010年12月25日 星期六
2010年12月13日 星期一
usort with static comparison function
class Thread{
public static function __compare($thread_a, $thread_b){
return $thread_a->posts_numbers > $thread_b->posts_numbers ? 1 : ($thread_a->posts_numbers == $thread_b->posts_numbers ? 0 : -1);
}
}
usort($this->sorted_threads, array('Thread', '__compare'));
http://php.net/manual/en/function.usort.php
usort with static comparison function
class Thread{
public static function __compare($thread_a, $thread_b){
return $thread_a->posts_numbers > $thread_b->posts_numbers ? 1 : ($thread_a->posts_numbers == $thread_b->posts_numbers ? 0 : -1);
}
}
usort($this->sorted_threads, array('Thread', '__compare'));
http://php.net/manual/en/function.usort.php
2010年7月2日 星期五
Codeigniter set_value() bug
Codeigniter在用set_value還原上一次input的資料時,如果Controller有把form_validation
讀進來,set_value就會透過form_validion這個library來指派資料的。
如果沒有在Controller裡面執行$this->form_validtion->run()的話,set_value就會變得一點用都沒有。
當然,如果沒有把form_validation讀進來的話,就沒有這個問題了。
資料來源:http://codeigniter.com/forums/viewthread/157530/
Codeigniter set_value() bug
Codeigniter在用set_value還原上一次input的資料時,如果Controller有把form_validation
讀進來,set_value就會透過form_validion這個library來指派資料的。
如果沒有在Controller裡面執行$this->form_validtion->run()的話,set_value就會變得一點用都沒有。
當然,如果沒有把form_validation讀進來的話,就沒有這個問題了。
資料來源:http://codeigniter.com/forums/viewthread/157530/
2010年6月24日 星期四
Netbeans Tips
Ctrl + Shift + C: Comments out the
selected block of code.
Ctrl + Shift + (UP/DOWN ) duplicate line up/down
Ctrl + E deletes the current line (very useful)
- Ctrl + Shift + I: Fixes your
imports, handy if you've just written a piece of code that needs a lot
of packages imported.
- alt+ shift + o --> allows you to search and
open any file in your open projects
Netbeans Tips
Ctrl + Shift + C: Comments out the
selected block of code.
Ctrl + Shift + (UP/DOWN ) duplicate line up/down
Ctrl + E deletes the current line (very useful)
- Ctrl + Shift + I: Fixes your
imports, handy if you've just written a piece of code that needs a lot
of packages imported.
- alt+ shift + o --> allows you to search and
open any file in your open projects
2010年6月18日 星期五
GIF Creator Notes
Transparent Color:將會透明的顏色
四種Disposal method 方式分別是:
0 - 不使用處置方法
1 - 不處置圖形,把圖形從當前位置移去
2 - 回覆到背景色
3 - 回覆到先前狀態
GIF Creator Notes
Transparent Color:將會透明的顏色
四種Disposal method 方式分別是:
0 - 不使用處置方法
1 - 不處置圖形,把圖形從當前位置移去
2 - 回覆到背景色
3 - 回覆到先前狀態
2010年6月3日 星期四
PHP array_splice
<h1>array_splice(Array, int offset, int length, mixed replacement)</h1>
刪除Array中從offset開始length個元素,並用replacement取代。
<ol>
<li>offset < 0:從尾端第abs(offset)個元素<b>開始(包括)</b></li>
<li>length < 0:刪除(取代)<b>直到(不包括)</b>尾端第abs(offset)個元素</li>
</ol>
<a href="http://www.php.net/manual/en/function.array-splice.php">Reference</a>
PHP array_splice
<h1>array_splice(Array, int offset, int length, mixed replacement)</h1>
刪除Array中從offset開始length個元素,並用replacement取代。
<ol>
<li>offset < 0:從尾端第abs(offset)個元素<b>開始(包括)</b></li>
<li>length < 0:刪除(取代)<b>直到(不包括)</b>尾端第abs(offset)個元素</li>
</ol>
<a href="http://www.php.net/manual/en/function.array-splice.php">Reference</a>