2008年11月29日 星期六
2008年11月27日 星期四
A quick way to get memcached status
http://www.mysqlperformanceblog.com/2008/11/26/a-quick-way-to-get-memcached-status/
echo stats | nc 127.0.0.1 11211
watch "echo stats | nc 127.0.0.1 11211"
echo stats | nc 127.0.0.1 11211
watch "echo stats | nc 127.0.0.1 11211"
2008年11月26日 星期三
upload file in rails
http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm
http://manuals.rubyonrails.com/read/chapter/79
http://manuals.rubyonrails.com/read/chapter/78
http://manuals.rubyonrails.com/read/chapter/77
http://www.practicalecommerce.com/blogs/post/432-Multiple-Attachments-in-Rails
http://izumi.plan99.net/blog/index.php/2007/04/07/ruby-on-railss-handling-of-uploaded-files/
http://manuals.rubyonrails.com/read/chapter/79
http://manuals.rubyonrails.com/read/chapter/78
http://manuals.rubyonrails.com/read/chapter/77
http://www.practicalecommerce.com/blogs/post/432-Multiple-Attachments-in-Rails
http://izumi.plan99.net/blog/index.php/2007/04/07/ruby-on-railss-handling-of-uploaded-files/
About the uploaded file object
While the uploaded file is a special beast,it is not difficult to use. The object
rails receives are processed by a CGI object. The object that CGI returns to Rails
isn’t actually a file object, but it’s close enough for our purposes.
Details from the CGI class documentation
... the value is not a string, but an IO object, either an IOString for small files,
or a Tempfile for larger ones.
This object also has the additional singleton methods:
local_path(): the path of the uploaded file on the local filesystem
original_filename(): the name of the file on the client computer
content_type(): the content type of the file
訂閱:
文章 (Atom)