浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年1月13日

摘要: em-synchronyem-http-requesttyphoeuseventmachineem-http-request exampleSimple client exampleMulti-request exampleFire and wait for multiple requests to complete via the MultiRequest interface.Basic-Aut... 阅读全文
posted @ 2011-01-13 23:03 lexus 阅读(676) 评论(0) 推荐(0)

摘要: http://raflabs.com/blogs/silence-is-foo/2010/07/19/installing-a-gem-fork-from-github-source/http://stackoverflow.com/questions/2577346/how-to-install-gem-from-github-sourceup vote 4 down vote accepted... 阅读全文
posted @ 2011-01-13 22:50 lexus 阅读(1134) 评论(0) 推荐(0)

摘要: Scraping with Typhoeus and NokogiriJune 12th, 2009 · 1 CommentI’ve been working on some cool new functionality at OneSpot. We want to provide a widget that can give the reader more context about a gi... 阅读全文
posted @ 2011-01-13 21:11 lexus 阅读(345) 评论(0) 推荐(0)

摘要: Thread: PaperClip: Attach files through script/console LinkBack LinkBack URL About LinkBacks Bookmark & Share Digg this Thread! Add Thread to del.icio.us Bookmark in Technorati Tweet this Thread! ... 阅读全文
posted @ 2011-01-13 21:02 lexus 阅读(289) 评论(0) 推荐(0)

摘要: http://www.oschina.net/code/snippet_104010_2806http://www.mikeperham.com/2009/06/12/scraping-with-typhoeus-and-nokogiri/ 阅读全文
posted @ 2011-01-13 20:25 lexus 阅读(180) 评论(0) 推荐(0)

摘要: 此文绝对给力http://www.infoq.com/cn/news/2007/09/ruby-1-9-fibers http://www.igvita.com/2009/05/13/fibers-cooperative-scheduling-in-ruby/ http://www.mikeperham.com/2010/03/30/using-activerecord-with-eventmac... 阅读全文
posted @ 2011-01-13 19:13 lexus 阅读(428) 评论(0) 推荐(0)

摘要: ruby GB2312和UTF-8编码转换 关键字: iconv,iconv,编码转换,gb2312,utf-8最近在做RSS导入功能,用了rubyforge上的feedtool,还不错。就是代码转换老是报错:Iconv::IllegalSequence后来发现原因是网络编码很混乱,一定要加上IGNORE参数,就好了。记录一下。Iconv.iconv("UTF-8//IGNORE","GB2312... 阅读全文
posted @ 2011-01-13 16:59 lexus 阅读(616) 评论(0) 推荐(0)

摘要: [转载]Ruby的并发的一些基本限制因为是feedburner的feeds,所以我就转过来。Concurrency is a Myth in RubybyIlya GrigorikConcurrency introduces parallelism into our applications, and threading is, of course, one way to achieve conc... 阅读全文
posted @ 2011-01-13 16:36 lexus 阅读(926) 评论(0) 推荐(0)

摘要: http://www.infoq.com/news/2008/06/eventmachineintroduce代码如下,经过测试require 'rubygems'require 'eventmachine'require 'em-http'require 'pp'$stdout.sync = trueclass KeyboardHandler EM::Connectioninclude EM... 阅读全文
posted @ 2011-01-13 16:30 lexus 阅读(306) 评论(0) 推荐(0)

摘要: How to fetch URLs in parallell with EventMachine and Ruby Ruby posted 10 months ago by christianSave time by doing things in parallell:Output:ConclusionSpeeds up blocking operations.EventMachine is cu... 阅读全文
posted @ 2011-01-13 15:56 lexus 阅读(364) 评论(0) 推荐(0)

摘要: http://css.dzone.com/news/ruby-based-image-crawler 阅读全文
posted @ 2011-01-13 15:30 lexus 阅读(191) 评论(0) 推荐(0)

摘要: Ruby将网页中的图片保存到本地该用户已被和谐 发布于 2010年12月07日 15时 (0评) 2人收藏此代码, 我要收藏(?) 将网页中的图片保存到本地。简单示例。 标签: Ruby , 下载图片代码片段(1)[代码] 下载网页中图片view sourceprint?1require 'net/http'23Net::HTTP.start("www.google.com.hk")... 阅读全文
posted @ 2011-01-13 14:56 lexus 阅读(235) 评论(0) 推荐(0)

摘要: str.gsub(pattern, replacement) → new_str str.gsub(pattern, hash) → new_str str.gsub(pattern) {|match| block } → new_str str.gsub(pattern) → enumerator Returns a copy of str with the all occurrences o... 阅读全文
posted @ 2011-01-13 14:06 lexus 阅读(1748) 评论(0) 推荐(0)

摘要: site:www.xy1982.com inurl:prosite:www.xy1982.com intitle:pro 阅读全文
posted @ 2011-01-13 14:01 lexus 阅读(151) 评论(0) 推荐(0)

摘要: 男的找老婆两个标准,找妈的,找抽的 还有找妈抽的 by 洪晃 高晓波 物质主义 剥削主义 “被” Quora 国外问答网站   具体生活方式有哪些重要改变,我大概回想了一下最近的一些成功消费品公司。有以下关键词供大家参考:“速活”、“地铁和高铁”、“全民娱乐”、“奢侈平民化”。 http://tech.sina.com.cn/i/2011-01-12/13385086699.shtml d... 阅读全文
posted @ 2011-01-13 00:46 lexus 阅读(305) 评论(0) 推荐(0)