自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

nokogiri抓取网络资源

 写道Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among Nokogiri’s many features is the ability to search documents via XPath or CSS3 selectors.XML is like violence - if it doesn’t solve y...

2010-08-25 10:18:20 198

利用paperclip实现kindEditoer的图片上传和浏览

 KindEditor是一款优秀的开源HTML编辑器, 它的图片上传和浏览是利用插件的方式进行的。编辑器的参数中imageUploadJson定义了图片上传的后台程序地址, allowFileManager 定义了是否允许浏览服务器图片,fileManagerJson指定了浏览图片时后台程序地址。以下代码根据个人情况应该有所不同。  写道{"error":1, "url"...

2010-08-25 10:11:29 206

原创 strip_tags

strip_tags(html)Strips all HTML tags from the html, including comments. This uses the html-scanner tokenizer and so its HTML parsing ability is limited by that of html-scanner. strip_tags...

2010-05-06 22:23:08 270

format time

 ri Time.strftime  ------------------------------------------------------- Time#strftime time.strftime( string ) => string--------------------------------------------------...

2010-04-21 13:33:49 106

笔记:named_scope的用法

转自 muyu 的bolg, 学习并记录以备日后查询使用。named_scope 与 paginate 联合使用class Product < ActiveRecord::Base named_scope :online, :conditions => {:status => 1}, :include => [:variants, :catalo...

2010-03-15 23:03:34 135

【翻译】railscasts 136:jQuery

136: jQuery原版railscasts ------------------------------------------------------------------------------------------------------------------------------翻译的过程中查询了一些资料,得知如果$.post()设置dataType为‘scri...

2010-03-11 23:45:44 115

paperclip学习使用笔记

    paperclip 是rails处理附件的一个插件, 相对于以往的attachment_fu等在效率和使用上更胜一筹。   paperclip上传的图片附件如果不需要进行改变大小等操作, 则不需要安装ImageMagick。paperclip在window平台下进行图片处理很容易得到这样的错误信息。。。is not recognized by the 'iden...

2010-03-07 22:43:31 468

最大公约数

 k =  f(x, y)求最大公约数  1. 假设x = m*x1 m为质数且 y%m!=0, 所以k = f(m*x1, y) = f(x1, y) 2. 如果x = m*x1, y = m*y1, 所以 k = f(m*x1, m*y1) = m* f(x1, y1) 3. 如果不同时满足上述2点 则 k = f(x, y) = f(y, x-y) (x>=y)  ...

2009-10-09 23:51:16 146

原创 Java Double相加出现的怪事

问题的提出:     编译运行下面这个程序会看到什么public class test { public static void main(String args[]) { System.out.println(0.05 + 0.01); System.out.println(1.0 - 0.42); System.out.println(4.015 * 100);...

2009-09-28 16:39:32 322

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除