<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[sg552的专栏]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/sg552</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; sg552]]></copyright><item><title><![CDATA[博客搬到了新地址： shensiwei.com  /  siwei.me]]></title><link>https://blog.csdn.net/sg552/article/details/84279536</link><guid>https://blog.csdn.net/sg552/article/details/84279536</guid><author>sg552</author><pubDate>Tue, 28 Aug 2012 15:34:54 +0800</pubDate><description><![CDATA[博客地址发生变化，我搭建了自己的博客，

这里的文章我会慢慢的转载过去。
同时不会再来这里做更新。 

欢迎大家光临： [url]http://www.shensiwei.com[/url]  或者  [url]http://www.siwei.me[/url]

谢谢...]]></description><category></category></item><item><title><![CDATA[转载:  nginx 域名跳转一例~~~(rewrite、proxy) ]]></title><link>https://blog.csdn.net/sg552/article/details/84269815</link><guid>https://blog.csdn.net/sg552/article/details/84269815</guid><author>sg552</author><pubDate>Tue, 07 Aug 2012 13:20:25 +0800</pubDate><description><![CDATA[转载的  ,  [url]http://storysky.blog.51cto.com/628458/486338[/url]

前几天搭了一个论坛服务器并放到了公司的局域网里面，论坛用的是9066端口并在路由器上面做了个端口转发，而且把bbs.xxx.com这个域名也指向了公司的公网IP，因为想让用户在访问的时候不用输入端口号于是就想在公司的web服务器上面做个跳转，将访问bbs.xxx.c...]]></description><category></category></item><item><title><![CDATA[python 读写yaml ]]></title><link>https://blog.csdn.net/sg552/article/details/84269146</link><guid>https://blog.csdn.net/sg552/article/details/84269146</guid><author>sg552</author><pubDate>Mon, 06 Aug 2012 10:39:30 +0800</pubDate><description><![CDATA[[url]http://mikkel.elmholdt.dk/?p=4[/url]

1. install pyyaml:  ([url]http://pyyaml.org/wiki/PyYAMLDocumentation[/url])
1.1 wget http://pyyaml.org/download/pyyaml/PyYAML-3.01.tar.gz
1.2 tar zxvf Py...]]></description><category></category></item><item><title><![CDATA[ruby中的单元测试]]></title><link>https://blog.csdn.net/sg552/article/details/84268640</link><guid>https://blog.csdn.net/sg552/article/details/84268640</guid><author>sg552</author><pubDate>Sat, 04 Aug 2012 09:05:28 +0800</pubDate><description><![CDATA[单元测试中的几个术语：
double:  the generic term for any kind of pretend object used in place of areal object for testing purpose. 是一种通用的称呼，来指： 所有用于替换真实对象的组建。

Dummy: 空对象，啥都不做。仅仅用于某些parameter的占位（ fill paramet...]]></description><category></category></item><item><title><![CDATA[对使用开源项目的一点儿讨论]]></title><link>https://blog.csdn.net/sg552/article/details/84268638</link><guid>https://blog.csdn.net/sg552/article/details/84268638</guid><author>sg552</author><pubDate>Sat, 04 Aug 2012 08:42:51 +0800</pubDate><description><![CDATA[原文地址：  [url]http://ruby-china.org/topics/4646[/url]

求一适合中国国情的B2C Ruby on Rails开源商城项目
开源项目 • n5ken • 于4天前发布 • 最后由 kevin__liu 于3天前回复 • 274次阅读
[quote=&quot;n5ken&quot;]找了一圈Google，Github，国外的最好的应该就是Spree，但是研究一下...]]></description><category></category></item><item><title><![CDATA[capistrano 的几个参数（ logger, set-before) ]]></title><link>https://blog.csdn.net/sg552/article/details/84268382</link><guid>https://blog.csdn.net/sg552/article/details/84268382</guid><author>sg552</author><pubDate>Fri, 03 Aug 2012 14:34:11 +0800</pubDate><description><![CDATA[Capistrano 灰常好用。 不过有几个常用的用法还是要留意一下：

1. 总览：  
[code=&quot;java&quot;]$ cap --help[/code]

2. 使用logger，特别是在其他语言调用CAP时，非常有用（例如被fabric 调用）: 
[code=&quot;java&quot;]$ cap setup --logger STDOUT[/code]

3. 使用变量， 要记得:  ...]]></description><category></category></item><item><title><![CDATA[多个workers下 delayed_job的问题： ]]></title><link>https://blog.csdn.net/sg552/article/details/84267640</link><guid>https://blog.csdn.net/sg552/article/details/84267640</guid><author>sg552</author><pubDate>Thu, 02 Aug 2012 09:52:33 +0800</pubDate><description><![CDATA[会导致“多个workers&quot; （单个 worker 下工作正常）的状态下，导入 CSV 文件之后，不能正常的根据导入的 device进行 query remote, update emails . 这两个操作。

根据Randy的要求， 导入CSV之后，可以自动的查询远程，然后更新本地的device信息。 所以后来的代码是这样做的：
1. 建立优先级是 0 的JOB （最高）， 来导入CSV...]]></description><category></category></item><item><title><![CDATA[linux link (ln) 的用法 ：  ln -s <目标文件> <link_name>]]></title><link>https://blog.csdn.net/sg552/article/details/84267606</link><guid>https://blog.csdn.net/sg552/article/details/84267606</guid><author>sg552</author><pubDate>Thu, 02 Aug 2012 08:52:48 +0800</pubDate><description><![CDATA[linux link (ln) 的用法 ：  ln -s  

总之，目标文件（被link的文件或文件夹）永远在前面， 

我总是把两者弄混淆。。。  ]]></description><category></category></item><item><title><![CDATA[linux 中的 photoshop/paintshop: GIMP]]></title><link>https://blog.csdn.net/sg552/article/details/84267043</link><guid>https://blog.csdn.net/sg552/article/details/84267043</guid><author>sg552</author><pubDate>Wed, 01 Aug 2012 09:11:53 +0800</pubDate><description><![CDATA[[url]www.gimp.org[/url]

G - GNU
I - Image
M - Manipulation
P - Program

非常棒，正是我想要的！  直追 paint.net ]]></description><category></category></item><item><title><![CDATA[ruby 中的多行字符串(multiple lines of string) %Q, %w, %q ]]></title><link>https://blog.csdn.net/sg552/article/details/84266543</link><guid>https://blog.csdn.net/sg552/article/details/84266543</guid><author>sg552</author><pubDate>Tue, 31 Jul 2012 10:01:38 +0800</pubDate><description><![CDATA[%Q 代表一个 双引号的字符串， 例如 
a = &quot;foo&quot;
a = %Q{ foo }

%q 代表单引号字符串， 不能使用 #{var}的形式。 例如：
b = 'bar 
bar'
b = %q{bar
bar}

[code=&quot;ruby&quot;]  
 CONST = &quot;apple&quot;
 abc = %q[ abc abc
 cde
 def
 this is a C...]]></description><category></category></item><item><title><![CDATA[ruby ,   rspec中测试 module ]]></title><link>https://blog.csdn.net/sg552/article/details/84266067</link><guid>https://blog.csdn.net/sg552/article/details/84266067</guid><author>sg552</author><pubDate>Mon, 30 Jul 2012 10:29:32 +0800</pubDate><description><![CDATA[见：  [url]http://stackoverflow.com/questions/1542945/testing-modules-in-rspec/1546493#1546493[/url]

What mike said. Here's a trivial example:

module code...
[code=&quot;ruby&quot;]
module Say
  def hell...]]></description><category></category></item><item><title><![CDATA[delayed_job 的 基本用法]]></title><link>https://blog.csdn.net/sg552/article/details/84265638</link><guid>https://blog.csdn.net/sg552/article/details/84265638</guid><author>sg552</author><pubDate>Sat, 28 Jul 2012 12:15:31 +0800</pubDate><description><![CDATA[delayed_job 是用来做某些可以延后的，对时间要求不高的任务，例如： 发送1W个邮件，处理10W个数据，不能在规定的时间内（例如1秒）立即执行完的任务。

delayed_job 有两个版本，一个是最初的： 
[url]https://github.com/tobi/delayed_job[/url]
另一个是改进的：
[url]https://github.com/collec...]]></description><category></category></item><item><title><![CDATA[有webservice参与的系统的单元测试, 使用mock object (三)]]></title><link>https://blog.csdn.net/sg552/article/details/84265264</link><guid>https://blog.csdn.net/sg552/article/details/84265264</guid><author>sg552</author><pubDate>Fri, 27 Jul 2012 15:05:03 +0800</pubDate><description><![CDATA[经过近4个工作日的整理，终于把整个系统基本都搞定：

[quote=&quot;使用了MOCK&quot;]Finished in 32.84 seconds
390 examples, 0 failures, 6 pending[/quote]

[quote=&quot;原来的&quot;]Finished in 21 minutes 11.65 seconds
421 examples, 13 failures[/qu...]]></description><category></category></item><item><title><![CDATA[有webservice参与的系统的单元测试, 使用mock object (二)]]></title><link>https://blog.csdn.net/sg552/article/details/84263997</link><guid>https://blog.csdn.net/sg552/article/details/84263997</guid><author>sg552</author><pubDate>Wed, 25 Jul 2012 09:51:39 +0800</pubDate><description><![CDATA[前天写了文章： [url=&quot;http://sg552.iteye.com/blog/1604010&quot;]有webservice参与的系统的单元测试，最好使用mock object[/url]

如果某个mock对象，要求模拟 POST 这样的修改数据的操作，而不是简单的GET 这样的查询，该如何做呢？

我现在使用的办法，是 使用yaml文件来存储数据，达到简单的模仿 数据库的目的。

...]]></description><category></category></item><item><title><![CDATA[RUBY中重新定义常量（redefine constants in Ruby) ]]></title><link>https://blog.csdn.net/sg552/article/details/84263344</link><guid>https://blog.csdn.net/sg552/article/details/84263344</guid><author>sg552</author><pubDate>Tue, 24 Jul 2012 07:09:27 +0800</pubDate><description><![CDATA[有个需求：    生产环境中的代码， 有一个常量。
但是需要在测试环境中修改它，把它从一个真正的对象变成mock object. 

(提示：核心方法：  const_set, const_defined? , remove_const ) 

所以搜索了一下，有这个文章：
( [url]http://stackoverflow.com/a/3377188/445908[/url] )...]]></description><category></category></item><item><title><![CDATA[有webservice参与的系统的单元测试，最好使用mock object]]></title><link>https://blog.csdn.net/sg552/article/details/84262898</link><guid>https://blog.csdn.net/sg552/article/details/84262898</guid><author>sg552</author><pubDate>Mon, 23 Jul 2012 10:03:22 +0800</pubDate><description><![CDATA[手头上的一个项目，是以另外一个系统的webservice做为底层基础。

里面大约有50的操作，最终都要调用这些 web service。

大约有200个test case, 跑完一边居然要15～ 30分钟。因为调用一次WS，大约25秒左右。而且随着远程webservice 服务器的性能问题，这个时间还在增加。

程序员感觉很麻烦。因为调试的时候，如果远程 Webservice出了问...]]></description><category></category></item><item><title><![CDATA[curl 的典型用法]]></title><link>https://blog.csdn.net/sg552/article/details/84251211</link><guid>https://blog.csdn.net/sg552/article/details/84251211</guid><author>sg552</author><pubDate>Tue, 17 Jul 2012 10:11:46 +0800</pubDate><description><![CDATA[
1. 最简单的用法 （GET 80端口）：
 
$ curl www.site.com 
 
1.2 如果希望待上参数，记得用引号把URL 括起来：
 
$ curl 'www.somesite.com?param1=foo&amp;amp;param2=bar'
 
2. 使用 POST 请求：
$ curl www.site.com -X POST -d &quot;say=hi&quot;
 
...]]></description><category></category></item><item><title><![CDATA[delayed_job 的 workers 至关重要啊。。。。]]></title><link>https://blog.csdn.net/sg552/article/details/84247845</link><guid>https://blog.csdn.net/sg552/article/details/84247845</guid><author>sg552</author><pubDate>Wed, 11 Jul 2012 16:36:09 +0800</pubDate><description><![CDATA[之前使用delayed_job , 发现从来不并发。都是顺序执行。
 
今天才发现，必须要启动多个workers，才行。   之前是由于只启动了一个worker...所以。。。。
 
$ RAILS_ENV=production script/delayed_job -n 8 start
 
这样就可以启动8 个进程了。  ^_^...]]></description><category></category></item><item><title><![CDATA[学习 PYTHON 看哪本书。。。]]></title><link>https://blog.csdn.net/sg552/article/details/84245479</link><guid>https://blog.csdn.net/sg552/article/details/84245479</guid><author>sg552</author><pubDate>Sat, 07 Jul 2012 07:30:09 +0800</pubDate><description><![CDATA[http://stackoverflow.com/q/111857/445908
 
The best way to learn python (or any programming language) is to pick something you want to do and start doing it in the language you want to learn.
Pick ...]]></description><category></category></item><item><title><![CDATA[conjecture: the architecture of some portal ]]></title><link>https://blog.csdn.net/sg552/article/details/84242398</link><guid>https://blog.csdn.net/sg552/article/details/84242398</guid><author>sg552</author><pubDate>Sun, 01 Jul 2012 18:43:18 +0800</pubDate><description><![CDATA[1. 用全文检索进行搜索

2. 用的是JAVA 

3. 信息量很大，会不定时的进行各个城市服务器之间的信息汇总。

4. 在同步时，信息发布的时间不是特别精确。 估计只精确到分，造成了多个服务器的数据合并之后，顺序跟原有顺序不相同的情况。 
每次同步，会有 2K 个打算顺序的数据产生。
其中1K2是原有的重复数据， 0.8K是 新数据。
07-02 846 newed, 48...]]></description><category></category></item></channel></rss>