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

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

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
  12653 随笔 :: 2 文章 :: 617 评论 :: 609万 阅读

01 2011 档案

摘要:目前看来似乎不影响使用,还未能确定 阅读全文
posted @ 2011-01-31 22:31 lexus 阅读(230) 评论(0) 推荐(0) 编辑

摘要:http://www.cnblogs.com/lovecindywang/archive/2011/01/31/1948233.html lovecindywang 未来是并行计算和SOA的天下 博客园 首页 新闻 新随笔 联系 管理 订阅 随笔-36 文章-0 评论-238 Mongodb和KT的双机房灾备配置方案尝试 假设有2个机房(测试服务器2/3以及123/124)互为灾备(灾备机房在... 阅读全文
posted @ 2011-01-31 22:27 lexus 阅读(788) 评论(0) 推荐(0) 编辑

摘要:墨尔本] Fred Wuifredwu@qq.com 22:15:20总算搞定了rvm + crontab . 呼呼呼[墨尔本] Fred Wuifredwu@qq.com 22:15:21累死了漫步_上海(7054239) 22:16:21啥东东[墨尔本] Fred Wuifredwu@qq.com 22:16:48用whenever来管理crontab[墨尔本] Fred Wu... 阅读全文
posted @ 2011-01-31 22:23 lexus 阅读(160) 评论(0) 推荐(0) 编辑

摘要:http://guides.rubyonrails.org/active_record_querying.html 阅读全文
posted @ 2011-01-31 21:26 lexus 阅读(204) 评论(0) 推荐(0) 编辑

摘要:http://redcareditor.com/ i use komodo for a time 阅读全文
posted @ 2011-01-31 19:57 lexus 阅读(174) 评论(0) 推荐(0) 编辑

摘要:使用Amazon SES批量发送邮件 作者 Abel Avram 译者 张龙 发布于 2011年1月30日 上午9时35分 社区 架构 主题 云计算 , Web服务 标签 亚马逊 , 亚马逊Web服务(AWS) 分享 | Amazon Simple Email Service(SES)是构建在Amazon基础设施之上的批量、事务性的邮件发送服务,多年来已经向无数客户发送了大量邮件... 阅读全文
posted @ 2011-01-31 19:54 lexus 阅读(1193) 评论(0) 推荐(0) 编辑

摘要:还想请教一下update users set a=1 where id in (1,2,3)这句在rails中该如何写呢 云(11753503) 18:31:29 ActiveRecord::Base.connection.execute(str) [上海] Jerry(40578681) 18:34:38人家要rails的写法[上海] Jerry(40578681) 18:35:08User.... 阅读全文
posted @ 2011-01-31 19:49 lexus 阅读(720) 评论(0) 推荐(0) 编辑

摘要:SELECT count(*) from urls where id not in (select distinct url_id from images where site='xx' and kind='image') and site='xx' and kind='detail' and success=1 阅读全文
posted @ 2011-01-31 16:51 lexus 阅读(292) 评论(1) 推荐(0) 编辑

摘要:User.find_each(:conditions=["id ? and id ?",2,10] ) do |u|ruby-1.9.2-p0 puts u.classruby-1.9.2-p0 ? end 阅读全文
posted @ 2011-01-31 15:53 lexus 阅读(283) 评论(0) 推荐(0) 编辑

摘要:find_each(options = {}) public Yields each record that was found by the find options. The find is performed by find_in_batches with a batch size of 1000 (or as specified by the :batch_size option). E... 阅读全文
posted @ 2011-01-31 15:37 lexus 阅读(589) 评论(0) 推荐(0) 编辑

摘要:2007-09-28 rails批量更新关键字: ruby rails批量更新 ruby 代码 user_controller.rb begin User.transaction do User.update(params[:user].keys,params[:user].values) end end rails 提供的批量更新update方法,返回一个对象数组,并不好判断保存数据是... 阅读全文
posted @ 2011-01-31 15:16 lexus 阅读(724) 评论(0) 推荐(0) 编辑

摘要:http://www.dedoimedo.com/computers/portable-virtualbox.html http://vbox.me/ 用了之后发现太复杂,还是算了 阅读全文
posted @ 2011-01-31 11:30 lexus 阅读(251) 评论(0) 推荐(0) 编辑

摘要:class AddIndexToUrlsForMyurlColumn ActiveRecord::Migrationdef self.up add_index :urls,:myurl,:name="urls_myurl_index",:unique=trueenddef self.down remove_index :urls,:myurlendend我的一个程序,在加索引之前很慢,跑了... 阅读全文
posted @ 2011-01-31 09:14 lexus 阅读(986) 评论(0) 推荐(0) 编辑

摘要:[求助]KIS7.4模拟狗第一次安装后成功,可卸了再装就变成演示版的了~ Post By:2005-8-27 4:07:00 如题,我已经把那只狗狗卸了重装过了,也把KIS7.4卸了,然后把KIS的目录也DEL了,还把SYSTEM32下的所有今天安装的文件都DEL了也不行,现在正处于郁闷中~请各位大虾指点迷经啊~小弟在此多谢鸟~支持(0)中立(0)反对(0) 心想事成小大2楼 个性首页 | 信息 | 搜索 | 邮箱 | 主页 | UC 加好友 发短信 等级:论坛游民 帖子:60 积分:348 威望:0 精华:0 注册:2005-8-27 12:28:00 Post By:2005-8 阅读全文
posted @ 2011-01-30 23:27 lexus 阅读(469) 评论(0) 推荐(0) 编辑

摘要:在我的概念中,mysql中的text字段应该是没有长度限制的,但是今天事实告诉我,text类型的长度是有限制的。其中mysql的text类型有64K长度限制的,MEDIUMTEXT中型是2G,LONGTEXT大型是4G . Creating MEDIUMTEXT columns in MySQL using RailsBY AMY ON 2010.01.23 AT 15:11 ·FILED UND... 阅读全文
posted @ 2011-01-30 17:17 lexus 阅读(4099) 评论(0) 推荐(0) 编辑

摘要:mysql show variables like '%timeout%' - ;http://fykyx521.javaeye.com/blog/522138http://hi.baidu.com/jaryer/blog/item/5b3946347d91184b251f14a3.htmlhttp://www.javaeye.com/wiki/topic/522138http://sarin... 阅读全文
posted @ 2011-01-30 16:23 lexus 阅读(204) 评论(0) 推荐(0) 编辑

摘要:mysql show variables like '%timeout%' - ; 阅读全文
posted @ 2011-01-30 16:13 lexus 阅读(181) 评论(0) 推荐(0) 编辑

摘要:Ruby中的数组过滤galekiposted @ 2007年7月16日 13:06 inRuby&Rails进修with tags过滤数组ruby, 1861 阅读数组可以算是计算机编程中用到的最多的一个数据结构了,ruby中也是如此,这次我们来看看如何对数组中的项进行过滤,选出自己需要的项。首先,假如有一个包含人名的数组: name = %w{zhangsan lisi wangwu zha... 阅读全文
posted @ 2011-01-30 10:33 lexus 阅读(640) 评论(0) 推荐(0) 编辑

摘要:%= render :partial='admin/products/new_brand'%我是在admin/brands下调用admin/product/下的_new_brand.html.erb这里需要指定的路径要从admin开始,这个是要注意的地方,一般我们可能会以为从同级目录开始就好了,事实并非如此 阅读全文
posted @ 2011-01-30 09:15 lexus 阅读(253) 评论(0) 推荐(0) 编辑

摘要:$("table tr:first-child")a=$("table tr:eq(1)")$(a).before($("table tr:eq(3)"))以下是一个实现向上移,最上,最下,向下移的一个排序加上checkbox全选 反选 的操作最近发现jquery写代码快起来了,可能真是写得多了有点熟番起来了%=flash[:info] unless flash[:info].nil?%这个界... 阅读全文
posted @ 2011-01-29 13:24 lexus 阅读(2638) 评论(0) 推荐(0) 编辑

摘要:Search using conditions on columnsInstead of explaining what Searchlogic can do, let me show you. Let’s start at the top:Any named scope Searchlogic creates is dynamic and created via method_missing. ... 阅读全文
posted @ 2011-01-29 09:11 lexus 阅读(255) 评论(0) 推荐(0) 编辑

摘要:每天一剂Rails良药之The Console Is Your FriendROR2008-03-13 13:27:35阅读6评论0字号:大中小订阅我们要多使用ruby script/console,在开发Rails程序时最好启动一个console窗口我们来看看我们可以使用console干什么:Java代码Person.find_by_first_name("Chad").email Calend... 阅读全文
posted @ 2011-01-29 08:53 lexus 阅读(286) 评论(0) 推荐(0) 编辑

摘要:http://zjnet.zjaic.gov.cn/common/connectUs.action工商范畴中国商务信用认证平台http://bcp.ec.com.cn/zhtml/tags/BCP56894178.html 阅读全文
posted @ 2011-01-28 12:19 lexus 阅读(242) 评论(0) 推荐(0) 编辑

摘要:2010-12-21rails validation文章分类:Ruby编程rails3中的验证,以下方法会触发验证 Java代码 createcreate!savesave!updateupdate_attributesupdate_attributes!以下方法则会跳过验证,将数据保存到数据库中 Java代码 decrement!decrement_counterincrement!increm... 阅读全文
posted @ 2011-01-27 22:38 lexus 阅读(854) 评论(0) 推荐(0) 编辑

摘要:jQuery CheckBox全选Learning, by 木公.其实这个只要熟悉了jQuery,基本上都能写得出来。在没接触jQuery之前,使用原生的JS写,虽然代码不是很多,但是也挺麻烦的。在这里不得不赞叹jQuery的选择器是多么的好用!代码如上,#inputChkAll用来全选或者全不选的CheckBox控件,其控制了name='chkJob'这个复选组。现在回过头再来看看以前用JS如何... 阅读全文
posted @ 2011-01-27 12:25 lexus 阅读(959) 评论(0) 推荐(0) 编辑

摘要:问题http://stackoverflow.com/questions/4023087/could-not-find-gem-error-when-specifying-a-forked-version-of-a-gem-from-githubinsalllhttp://stackoverflow.com/questions/4310120/rails-3-meta-search-usage 阅读全文
posted @ 2011-01-27 10:32 lexus 阅读(570) 评论(0) 推荐(0) 编辑

摘要:上海波波乐,乐悠悠,杭州嘉年华,浙江乐淘淘,朵朵 duoduo520.com http://shop.dreamclub.com.cn/index.php 邮购经营许可证和工商部门颁发的营业执照 什么是邮购广告 http://wiki.mbalib.com/wiki/%E9%82%AE%E8%B4%AD%E5%B9%BF%E5%91%8A 阅读全文
posted @ 2011-01-26 21:47 lexus 阅读(181) 评论(0) 推荐(0) 编辑

摘要:http://wenku.baidu.com/view/64ebcf1cc281e53a5802ffb9.html http://www.100way.cn/art_show.asp?id=3 阅读全文
posted @ 2011-01-26 20:10 lexus 阅读(242) 评论(0) 推荐(0) 编辑

摘要:职责与体制 来源:本站编辑 时间:2010-09-27 Tag:请用英文格式的逗号,标示多个关键字! 主要职责: ☆ 贯彻执行国家关于电信行业管理的方针政策和法律、法规,对本地区公用电信网、专用电信网实行统筹规划与行业管理; ☆ 负责受理、核发本地区电信业务经营许可证和电信设备进网管理,会同地方价格管理部门和质量技术监督部门监督、管理本地区的电信服务价格与服务质量; ☆ 保证公用电信网的互联互通和... 阅读全文
posted @ 2011-01-26 18:01 lexus 阅读(347) 评论(0) 推荐(0) 编辑

摘要:好网站,快递订单查询http://www.kuaidi100.com/index.htmlkis=keep it simaple金蝶KIS video tutorialhttp://www.acc6.com/html/jindie/友商网很强大,细分的市场kis standard教程http://bbs.erp100.com/thread-31030-1-1.htmlhttp://www.mefei.com/blog/PC/232.html金蝶KIS财务软件V7.5破解版0本文作者:木中小风发布于:2009-8-22分类:电脑点击:780 这次将要上传的KIS7.5标准版没有任何的时间和次数限 阅读全文
posted @ 2011-01-24 23:24 lexus 阅读(3202) 评论(0) 推荐(0) 编辑

摘要:http://dueam.org/2010/09/ubuntu-server-%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AElnmp%E5%B9%B6%E5%AE%89%E8%A3%85wordpress/这篇文章写得仔细http://blog.sina.com.cn/s/blog_4560b80b0100m65w.htmlhttp://jin-dou.... 阅读全文
posted @ 2011-01-23 23:06 lexus 阅读(894) 评论(0) 推荐(0) 编辑

摘要:使用 Nginx 静态化动态网站http://blog.chenlb.com/2010/01/nginx-cache-dynamic-web.html 阅读全文
posted @ 2011-01-23 23:06 lexus 阅读(630) 评论(0) 推荐(0) 编辑

摘要:http://www.dizzy.co.uk/ruby_on_rails/cheatsheets/rails-migrations 阅读全文
posted @ 2011-01-23 17:59 lexus 阅读(291) 评论(0) 推荐(0) 编辑

摘要:http://www.bokee.net/ 阅读全文
posted @ 2011-01-23 17:45 lexus 阅读(235) 评论(0) 推荐(0) 编辑

摘要:首页RSS关于留言板TwitterToday's the day向软件大牛炫耀我会单片机,向硬件大牛炫耀我会 Rails,向软硬件大牛炫耀我生物 -_-!Ruby中的字符串与符号重新审视 VimRuby中的数组过滤 galeki posted @ 2007年7月16日 13:06 in Ruby&Rails进修 with tags 过滤 数组 ruby , 1848 阅读数组可以算是计算机编程... 阅读全文
posted @ 2011-01-22 23:12 lexus 阅读(1136) 评论(0) 推荐(0) 编辑

摘要:http://www.chinagsdq.org/alpb/134789/index.html义乌凌志哎呀呀honghu针织http://www.purcotton.com/about.php?id=78http://www.ectrustprc.org.cn/listsearch.php?type=trust&web=&page=6http://www.2008pfw.com/http://ww... 阅读全文
posted @ 2011-01-22 16:33 lexus 阅读(197) 评论(0) 推荐(0) 编辑

摘要:这个问题也是困扰了好几天 阅读全文
posted @ 2011-01-21 13:43 lexus 阅读(117) 评论(0) 推荐(0) 编辑

摘要:http://www.stnc.com.cn 阅读全文
posted @ 2011-01-21 10:48 lexus 阅读(188) 评论(0) 推荐(0) 编辑

摘要:URL Encode关键字: ruby url encode在Ruby中:URI.escape == URI.encode URI.unescape ==URI.decodeURI.escape(str):采用ISO Latin字符集对指定的字符串进行编码。所有的空格符、标点符号、特殊字符以及其他非ASCII字符都将被转化成%xx格式的字符编码(xx等于该字符在字符集表里面的编码的16进制数字)。... 阅读全文
posted @ 2011-01-21 09:22 lexus 阅读(955) 评论(0) 推荐(0) 编辑

摘要:今天花了一天时间将py下抽取html数据的代码,用ruby的方式写了一遍, 总得过程感觉清晰度没有python好,但是ruby的写法多,所以代码还是省了不少,另外也优雅了使用了mixin 晚上正在慢慢下图片,现在我的爬虫是完全基于数据库了,之前在写python时完全文本化的脚本,部分中间过程的代码放在sqlite中,最终得脚本都可以独立于数据库存在,不过由于用的python的库多,还是依赖非常... 阅读全文
posted @ 2011-01-21 00:40 lexus 阅读(295) 评论(0) 推荐(0) 编辑

摘要:a[\s\S]*?href=("|')(?Plink[^\1]*?)\1[\s\S]*?img[\s\S]*?src=("|')(?Pimg[^\3]*?)\3 阅读全文
posted @ 2011-01-20 21:42 lexus 阅读(365) 评论(0) 推荐(0) 编辑

摘要:用ruby下载图片2009-08-04 22:38from: http://bbs.railschina.com/thread-23-1-1.htmlrequire "open-uri"data=open("http://bbs.railschina.com/images/default/logo.gif"){|f|f.read}open("logo.gif","wb"){|f|f.write(d... 阅读全文
posted @ 2011-01-20 21:42 lexus 阅读(600) 评论(0) 推荐(0) 编辑

摘要:http://simohayha.javaeye.com/blog/147438 Alex学Ruby[ Hash方法汇总 ] 2008-07-20 21:24:36标签:Ruby 语法原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://blackanger.blog.51cto.com/140924/88709一。给Hash添加默认... 阅读全文
posted @ 2011-01-20 20:07 lexus 阅读(242) 评论(0) 推荐(0) 编辑

摘要:#coding:utf-8class ::Stringdef find_tag_idx(tag,count=1) #html=html.to_s html=self current_count=0 idx=0 start=0 puts "===========" puts count puts current_count while current_count count idx=html.... 阅读全文
posted @ 2011-01-20 19:05 lexus 阅读(591) 评论(0) 推荐(0) 编辑

摘要:Infinity = 1.0/0# a rather useless rangeeverything = -Infinity..Infinityputs everything.includes?(5) #- true 阅读全文
posted @ 2011-01-20 14:08 lexus 阅读(493) 评论(0) 推荐(0) 编辑

摘要:#coding:utf-8def get_part(html,args={})puts htmlputs argsputs args[:s]puts "========"puts args["s"]puts args.key?(:s)puts args.key?("s")endhtml="abcd_abcd"s="a"e="d"get_part(html,:s=1,:e=2)a="中国a"pu... 阅读全文
posted @ 2011-01-20 10:27 lexus 阅读(233) 评论(0) 推荐(0) 编辑

摘要:(一)Ruby中一切都是对象,包括一个常数.比如可以用.class属性来查看一个对象的类型,你可以看下1.class,会发现常数1的类型是Fixnum,1不过是Fixnum的一个实例。还可以使用-37这个Fixnum的实例方法abs来取得绝对值:-37.abs()会返回37又如输入一个1.1.class,会返回Float。(二)Ruby语法Ruby中的类以class开始 以end结束,类名首字母的... 阅读全文
posted @ 2011-01-20 09:56 lexus 阅读(2587) 评论(0) 推荐(0) 编辑

摘要:网吧传媒同城分类 阅读全文
posted @ 2011-01-20 01:07 lexus 阅读(125) 评论(0) 推荐(0) 编辑

摘要:http://lanwen.wordpress.com/2009/04/18/%E6%8A%8Ayahoo-yql-%E5%BD%93%E5%81%9A-crawler-%E6%9D%A5%E4%BD%BF%E7%94%A8/ Style: Background Foreground Link Color Link Visited Size: Width:More ▼ Open ModeOv... 阅读全文
posted @ 2011-01-20 00:26 lexus 阅读(255) 评论(0) 推荐(0) 编辑

摘要:字符串的取代 将字符串的一部分换成其他的字符串的这种操作称为"取代"。Ruby有sub与gsub这两个方法用来做取代的操作,这两个方法的差异在于sub方法是取代最先找到的地方,而gsub方法会取代所有找到的地方。 关于sub方法与gsub方法,请参见"14.6.1 sub方法与gsub方法"一节的介绍。另外,sub方法与gsub方法还有破坏性的版本sub!方法与gsub!方法,同样在该节进行介绍。... 阅读全文
posted @ 2011-01-19 23:02 lexus 阅读(5479) 评论(0) 推荐(0) 编辑

摘要:确实是一个不错的合作,省得自建机房了 阅读全文
posted @ 2011-01-19 21:21 lexus 阅读(185) 评论(0) 推荐(0) 编辑

摘要:虎翼风51.net cdn服务商 http://www.mediatemple.net/webhosting/procdn/ http://www.maxcdn.com/ 阅读全文
posted @ 2011-01-19 19:31 lexus 阅读(196) 评论(0) 推荐(0) 编辑

摘要:http://www.blueidea.com/tech/site/2011/8271.asp 阅读全文
posted @ 2011-01-19 00:41 lexus 阅读(213) 评论(0) 推荐(0) 编辑

摘要:Ubuntu下使用sysv-rc-conf管理服务 http://javasky.172baby.com/posts/123554.html 阅读全文
posted @ 2011-01-19 00:12 lexus 阅读(198) 评论(0) 推荐(0) 编辑

摘要:事实上如果没什么特别需求,到这里 OpenSSH Server 就算安装好了。但是进一步设置一下,可以让 OpenSSH 登录时间更短,并且更加安全。这一切都是通过修改 openssh 的配置文件 sshd_config 实现的。 首先,您刚才实验远程登录的时候可能会发现,在输入完用户名后需要等很长一段时间才会提示输入密码。其实这是由于 sshd 需要反查客户端的 dns 信息导致的。我们可以通过... 阅读全文
posted @ 2011-01-18 22:50 lexus 阅读(192) 评论(0) 推荐(0) 编辑

摘要:WebLuker 阅读全文
posted @ 2011-01-18 00:22 lexus 阅读(376) 评论(0) 推荐(0) 编辑

摘要:问:我现在有个朋友,他做了一个网站,现在每天也有好几千人在线,他现在想开始自己攒一台服务器来到机房去托管,但是不太清楚该选择什么样的配置。 答:您的问题,稍微还是有点笼统,其实这也是许多第一次组装服务器的朋友容易犯的错误,也就是所谓同时在线人数的误区,这个问题不搞清楚,您很难界定自己需要什么配置的服务器。下面我来详细说下: 第 一,您说他的网站现在每天也有好几千人在线,这个说的是每天有好几千人访问... 阅读全文
posted @ 2011-01-17 22:32 lexus 阅读(1921) 评论(0) 推荐(0) 编辑

摘要:我是在下载一个字体时感染上这个病毒的,当安装完之后就知道中招了,担是很顽强,用一般的方法删除不掉它, 开机就能恢复,打开ie就是这个网址, 后来升级360都没用,最后使用360网盾,最核心的是它在加入了360中一个信任文件,把这个信任文件删除,然后再来ie一键恢复就搞定了,花了一个多小时, 阅读全文
posted @ 2011-01-17 21:44 lexus 阅读(798) 评论(0) 推荐(0) 编辑

摘要:CloudFront 我知道的国内CDN服务提供商: chinacache,fastweb,chinanetcenter. 阅读全文
posted @ 2011-01-17 21:38 lexus 阅读(498) 评论(0) 推荐(0) 编辑

摘要:git还原 阅读全文
posted @ 2011-01-17 21:24 lexus 阅读(703) 评论(0) 推荐(0) 编辑

摘要:http://www.51idc.com/tuoGuan.html http://www.cnmdy.com/contact.htm http://www.1g.com.cn/user/host.asp 西部数码 零刻数据 企商在线 bgp介绍 http://blogold.chinaunix.net/u2/84280/showart_2183352.html 杭州世导 目前在国外注册的域名将无法... 阅读全文
posted @ 2011-01-17 02:29 lexus 阅读(198) 评论(0) 推荐(0) 编辑

摘要:sudo apt-get install libxml2 libxml2-dev libxslt1-devgem install nokogirihttp://www.javaeye.com/topic/557485 阅读全文
posted @ 2011-01-16 22:38 lexus 阅读(196) 评论(0) 推荐(0) 编辑

摘要:sudo apt-get install libxml2 libxml2-dev libxslt1-devgem install nokogiri 阅读全文
posted @ 2011-01-16 22:37 lexus 阅读(150) 评论(0) 推荐(0) 编辑

摘要:Net::HTTP Cheat Sheethttp://www.rubyinside.com/nethttp-cheat-sheet-2940.htmlhttp://juretta.com/log/2006/08/13/ruby_net_http_and_open-uri/ 阅读全文
posted @ 2011-01-16 22:16 lexus 阅读(180) 评论(0) 推荐(0) 编辑

摘要:新的Ruby解析HTML/XML的ruby库 - NokogiriAaron Patterson和Mike Dalessio开发了一个新的Ruby解析HTML/XML的ruby库 - Nokogiri。他的速度比目前应用的最广泛的Hpricot还要快许多。经过Benchmark测试表明,Nokogiri在加载XML文档的速度是Hpricot的7倍,在XPATH搜索的速度是Hpricot的5倍,而在... 阅读全文
posted @ 2011-01-16 22:15 lexus 阅读(774) 评论(0) 推荐(0) 编辑

摘要:http://www.quarkruby.com/2009/9/22/rails-utf-8-and-html-screen-scrapinghttp://www.rubyrailways.com/data-extraction-for-web-20-screen-scraping-in-rubyrails/想弄一个网页爬虫,google了一下’ruby采集web网页’,在http://www.o... 阅读全文
posted @ 2011-01-16 22:02 lexus 阅读(543) 评论(0) 推荐(0) 编辑

摘要:如果上传碰到“413 Request Entity Too Large”错误,请在nginx.conf增加 client_max_body_size 8m; 增加上传大小限制 顶端 阅读全文
posted @ 2011-01-16 17:42 lexus 阅读(432) 评论(0) 推荐(0) 编辑

摘要:http://ihower.tw/blog/archives/2941一个ruby爬虫的例子http://hi.baidu.com/anspider/blog/item/9da210425a0e4e179213c6fb.html 阅读全文
posted @ 2011-01-16 13:37 lexus 阅读(278) 评论(0) 推荐(0) 编辑

摘要:但是,这个方法的缺点是太简单,无法设置超时时间。在超时的情况下,他会无限的请求下去,直到达到了默认的超时时间,这个时间很长http://www.renren.it/a/bianchengyuyan/Ruby/20101023/40036.html了保险起见,在要考虑超时处理或者其他设定的情况下,还是使用Net::HTTP除了能设置超时时间之外,还能设置其他的请求参数,例如user-agent这个u... 阅读全文
posted @ 2011-01-16 13:32 lexus 阅读(934) 评论(0) 推荐(0) 编辑

摘要:http://railsftw.bryanbibat.net/ 阅读全文
posted @ 2011-01-15 01:03 lexus 阅读(249) 评论(0) 推荐(0) 编辑

摘要:http://www.infoq.com/news/2009/06/Twitter-Architecture http://www.cnblogs.com/wuvist/archive/2011/01/14/MoSonic_1_Cache-Money_FriendFeed_Thrift_In_SubSonic.html read-through write-through http://www... 阅读全文
posted @ 2011-01-15 00:30 lexus 阅读(248) 评论(0) 推荐(0) 编辑

摘要:regexp = /a/result = subject.scan(regexp)ruby-1.9.2-p0 result = subject.scan(regexp)NameError: undefined local variable or method `subject' for main:Object from (irb):8 from /home/mlzboy/.rvm/rubies... 阅读全文
posted @ 2011-01-14 22:17 lexus 阅读(703) 评论(0) 推荐(0) 编辑

摘要:http://www.cnblogs.com/cnblogsfans/archive/2009/09/19/1569918.html http://www.cnblogs.com/cnblogsfans/archive/2009/09/17/1568804.html 二、读取文件 view source print? 1file=File.open(File.join("C:","Test.txt... 阅读全文
posted @ 2011-01-14 12:58 lexus 阅读(633) 评论(0) 推荐(0) 编辑

摘要:2010年12月09日 星期四 下午 12:44#foo.rb:p‍uts "中文abc123".to_utf8c:foo.rb a.txta.txt编码为Unicode(UTF-8 without signature) - Codepage 阅读全文
posted @ 2011-01-14 12:51 lexus 阅读(205) 评论(0) 推荐(0) 编辑

摘要:我們以class object這個乍看奇怪的語法用來取得object的eigenclass範圍:o1 = Object.newclass o1def say puts 'yo'endendo1.say= yoo2 = Object.newo2.say= NoMethodError ... 阅读全文
posted @ 2011-01-14 12:01 lexus 阅读(196) 评论(0) 推荐(0) 编辑

摘要:ruby way之Enumerables2010年10月15日 下午 01:50Enumerable 模块是一个很重要的模块,ruby中的很多类都有mix这个模块,比如array,hash等等。因此如果你想要自己定义一个collection,则不要继承一个存在的collection,而是应该mix Enumerable 模块。数组是最常用,最有代表性的mix Enumerable模块的一个集合。因... 阅读全文
posted @ 2011-01-14 11:29 lexus 阅读(367) 评论(0) 推荐(0) 编辑

摘要:if __FILE__ == $0$:.unshift File.join(File.dirname(__FILE__), '..')require 'eventmachine'# TODO: real tests# TODO: pass in one object instead of two? .each{ |iter| puts iter.current; iter.next }# TODO... 阅读全文
posted @ 2011-01-14 11:24 lexus 阅读(314) 评论(0) 推荐(0) 编辑

摘要:http://rubylearning.com/blog/2010/10/01/an-introduction-to-eventmachine-and-how-to-avoid-callback-spaghetti/http://20bits.com/articles/an-eventmachine-tutorial/ 阅读全文
posted @ 2011-01-14 11:17 lexus 阅读(156) 评论(0) 推荐(0) 编辑

摘要:timeout.rb Path:timeout.rb Last update:Tue May 25 13:04:11 -0700 2010 Ruby version:Ruby 1.9.2 timeout.rb execution timeout SynopsisDescriptionA way of performing a potentially long-running operation ... 阅读全文
posted @ 2011-01-14 09:51 lexus 阅读(344) 评论(0) 推荐(0) 编辑

摘要:http://simohayha.javaeye.com/blog/157709 http://my4java.itpub.net/post/9983/55407 阅读全文
posted @ 2011-01-14 09:44 lexus 阅读(140) 评论(0) 推荐(0) 编辑

摘要:http://www.infoq.com/cn/articles/eval-options-in-ruby 阅读全文
posted @ 2011-01-14 09:42 lexus 阅读(159) 评论(0) 推荐(0) 编辑

摘要:http://www.cxyclub.cn/n/5652/ Ruby | Block和迭代器 2007-04-16 15:40:43 标签:Ruby ROR Rails 敏捷开发 yield 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://blackanger.blog.51cto.com/140924/23876 Bloc... 阅读全文
posted @ 2011-01-14 09:38 lexus 阅读(376) 评论(0) 推荐(0) 编辑

摘要:分享到... 复制网址邮件QQ空间新浪微博MSN腾讯微博人人网开心网百度搜藏谷歌Buzz搜狐微博腾讯朋友淘江湖网易微博豆瓣查看更多(96) 这是什么工具? JiaThis 分享到各大网站 复制网址收藏夹邮件谷歌BuzzQQ空间百度搜藏新浪微博搜狐微博网易微博腾讯微博人人网开心网搜狐白社会淘江湖百度空间腾讯朋友天涯社区凤凰微博饭否手机优士网GMAIL邮箱Hotmail邮箱Yahoo! ma... 阅读全文
posted @ 2011-01-14 09:36 lexus 阅读(258) 评论(0) 推荐(0) 编辑

摘要:https://github.com/archiloque/rest-client http://stackoverflow.com/questions/184178/ruby-how-to-post-a-file-via-http-as-multipart-form-data fiber介绍 http://andyhu1007.javaeye.com/blog/634916 proc类 em-... 阅读全文
posted @ 2011-01-14 01:47 lexus 阅读(1549) 评论(0) 推荐(0) 编辑

摘要:http://ruby-doc.org/docs/ProgrammingRuby/html/tut_containers.html C:\Users\Administratorirbirb(main):001:0 def a(name)irb(main):002:1 yieldirb(main):003:1 puts "hello"irb(main):004:1 yieldirb(mai... 阅读全文
posted @ 2011-01-14 00:21 lexus 阅读(436) 评论(0) 推荐(0) 编辑

摘要: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 阅读(671) 评论(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 阅读(1122) 评论(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 阅读(336) 评论(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 阅读(278) 评论(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 阅读(168) 评论(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 阅读(423) 评论(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 阅读(608) 评论(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 阅读(912) 评论(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 阅读(299) 评论(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 阅读(354) 评论(0) 推荐(0) 编辑

摘要:http://css.dzone.com/news/ruby-based-image-crawler 阅读全文
posted @ 2011-01-13 15:30 lexus 阅读(182) 评论(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 阅读(226) 评论(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 阅读(1739) 评论(0) 推荐(0) 编辑

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

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

摘要:Brasero是一款为GNOME桌面而开发的CD/DVD刻录软件。Brasero作为Nautilus CD Burner和Serpentine的补充和替代,在Ubuntu 8.04中也将其整合进来了。和Nero Linux 3(下载版 官网售价198.00 元)相比,Brasero在功能上还是有一定的差距,但对于日常的应用来说,Brasero这款小而五脏具全的刻录软件来说完全能满足。下面我来简单... 阅读全文
posted @ 2011-01-10 14:25 lexus 阅读(327) 评论(0) 推荐(0) 编辑

摘要:将本地的代码修改提交到本地的gitgit add .git commit -a使用git status查看要提交的代码,看看哪些不需要的使用git rm -r --cached xxx进行删除,之后将本地的更改提交到远程的git库git remotegit push linode master之后将public下的system目录,使用tar -jcvf system.2011.01.10.bz2... 阅读全文
posted @ 2011-01-10 14:19 lexus 阅读(293) 评论(0) 推荐(0) 编辑

摘要:AOC 2217V+ 22寸16:10 940AOC iF23 IPS屏 23寸16:9 1120AOC 2430V+ 24寸16:9 1150AOC 2441V 24寸16:9 1140AOC V24T 带TV/HDMI 1320 阅读全文
posted @ 2011-01-09 12:41 lexus 阅读(374) 评论(0) 推荐(0) 编辑

摘要:怎么感觉此人一频一笑,很吸引人呢 难道演技如此出众,还是很对我味口 另外,小青为原来演娘妻的演员,也厉害 阅读全文
posted @ 2011-01-08 00:52 lexus 阅读(390) 评论(0) 推荐(0) 编辑

摘要:sop=standard operation procedure 阅读全文
posted @ 2011-01-07 22:53 lexus 阅读(181) 评论(0) 推荐(0) 编辑

摘要:c悬赏分:0 - 解决时间: 2009年10月01日 19时07分 Adobe收购的Macromedia之后,保留了Fireworks,那么新的Adobe Fireworks和Photoshop定位有什么不同呢?有没有重叠的地方,Photoshop的功能是不是Fireworks的超集? 提问者: yinn_ivan77 - 中级魔法师 六级 发消息 加为好友 最佳答案 当然不是,photosh... 阅读全文
posted @ 2011-01-07 21:32 lexus 阅读(335) 评论(0) 推荐(0) 编辑

摘要:http://www.kuaikuai.cn/helper/dep/ 阅读全文
posted @ 2011-01-07 20:48 lexus 阅读(431) 评论(0) 推荐(0) 编辑

摘要:义乌财务代理 http://qyfwdl.com/cn/index.asp http://www.591zcgs.com/ 公司注册地址的要求 一 、房屋提供者应根据房屋权属情况,分别出具以下证明: 1、房屋提供者如有房产证应另附房产证复印件并在复印件上加盖产权单位公章或由产权人签字。 2、无产权证的由产权单位的上级或房产证发放单位在“需要证明情况”栏内说明情况,并盖章确认;也可由当地政府或其派出... 阅读全文
posted @ 2011-01-07 11:40 lexus 阅读(203) 评论(0) 推荐(0) 编辑

摘要:Nginx+Passenger的使用遇到的一些问题 1. 无法上传文件。 如果用ruby script/server 开启 Mongrel, 并且用3000端口访问程序,这样上传文件是能够正常工作的。但是如果用nginx+passenger来访问程序,上传直接不能用。这个说明以程序是无关的,应该是nginx的配置问题。nginx的配置中sendfile为on,client_max_body_si... 阅读全文
posted @ 2011-01-06 19:44 lexus 阅读(221) 评论(0) 推荐(0) 编辑

摘要:masochism 阅读全文
posted @ 2011-01-06 19:43 lexus 阅读(256) 评论(0) 推荐(0) 编辑

摘要:定位为集成化家居公司, 公司提供连锁加盟服务,这个就是一人聚钱的一个把戏。没实在的 首先,公司在当地猛打广告,对施工人员进行统一的着装,打着低价策略,288每平米,比如在钱江晚报上打广告,之后有人会上勾, 使用格式合同,签署后要付全款,这个是前提,为什么要付全款是因为,工程施工出现异议,主动权在公司手上,格式合同,更加有利于这一点。 设计图纸和施工是两回事,完全托节,没有以顾客至上,当然在这人浮躁... 阅读全文
posted @ 2011-01-06 19:43 lexus 阅读(231) 评论(0) 推荐(0) 编辑

摘要:word选项-》信任中心-启用宏 阅读全文
posted @ 2011-01-06 19:43 lexus 阅读(337) 评论(0) 推荐(0) 编辑

摘要:有什麼好處? Article.create!(:name=”ddd”) !的作用是什麼? 阅读全文
posted @ 2011-01-06 19:43 lexus 阅读(121) 评论(0) 推荐(0) 编辑

摘要:respond_to do |format| format.html format.xml{render :xml=@products} end repsond_to :html,:xml respond_with(@products) respond_with(@product,location=prudct_url) cookies.permanet[:last_product_id]=... 阅读全文
posted @ 2011-01-06 19:43 lexus 阅读(258) 评论(0) 推荐(0) 编辑

摘要:是我目前用到ubuntu系中感覺最好的一款,有機會大家也試試 阅读全文
posted @ 2011-01-06 19:43 lexus 阅读(252) 评论(0) 推荐(0) 编辑

摘要:curl –I http://www.sina.com.cn 查看服務器header 阅读全文
posted @ 2011-01-06 19:43 lexus 阅读(160) 评论(0) 推荐(0) 编辑

摘要:good good soft 光影魔术手 阅读全文
posted @ 2011-01-03 21:12 lexus 阅读(252) 评论(0) 推荐(0) 编辑

摘要:您还未登录 ! 我的应用 登录 注册 论坛首页 → Web前端技术版 → JQuery → jQuery必知必熟基础知识 全部 JavaScript EXT AJAX UI CSS prototype dojo YUI DWR GWT JQuery JavaFX Web综合 甘特图、网络图、日历图、项目管理中间件 浏览 1835 次 主题:jQuery必知必熟基础知识 精华帖 (0) :: 良好... 阅读全文
posted @ 2011-01-03 21:04 lexus 阅读(520) 评论(0) 推荐(0) 编辑

摘要:http://www.javaeye.com/topic/855388 http://www.javaeye.com/topic/810957 http://www.javaeye.com/topic/406220 阅读全文
posted @ 2011-01-03 21:04 lexus 阅读(141) 评论(0) 推荐(0) 编辑

摘要:给力!!! 要给力!!! 要很给力!!! 要很很给力!!! 给很很很很力!!! 给很很很很很力!!! 给很很很很很很力!!! 给力!!! 给力!!! 给力!!! 给力!!! 给力!!! 给力!!! 给力!!! 给力!!! 给力!!! 阅读全文
posted @ 2011-01-01 00:39 lexus 阅读(154) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示