<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>O!Hacker Blog</title>
	<atom:link href="http://ohacker.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ohacker.com</link>
	<description>anything to hack</description>
	<lastBuildDate>Fri, 23 Jul 2010 16:26:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>ruby on rails 上安装及使用rspec</title>
		<link>http://ohacker.com/2010/07/23/ruby-rspec-plugin-instal/</link>
		<comments>http://ohacker.com/2010/07/23/ruby-rspec-plugin-instal/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 16:26:37 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://ohacker.com/?p=308</guid>
		<description><![CDATA[rspec 是 ruby 中最有名的测试框架。针对于rails，rspec有个很好的插件 rspec-rails 本文介绍这个插件的安装。]]></description>
		<wfw:commentRss>http://ohacker.com/2010/07/23/ruby-rspec-plugin-instal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>python 插入排序和 快速排序</title>
		<link>http://ohacker.com/2010/07/11/python_sor/</link>
		<comments>http://ohacker.com/2010/07/11/python_sor/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 07:21:54 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[算法]]></category>

		<guid isPermaLink="false">http://ohacker.com/?p=305</guid>
		<description><![CDATA[#python 写的 插入排序和 快速排序 def insert_sort&#40;seq&#41;: for i in range&#40;len&#40;seq&#41;&#41;: j=i-1 value=seq&#91;i&#93; while&#40;j&#62;=0and seq&#91;j&#93;&#62;value&#41;: seq&#91;j+1&#93;=seq&#91;j&#93; j=j-1 seq&#91;j+1&#93;=value return seq def quick_sort&#40;seq&#41;: if&#40;len&#40;seq&#41;&#60;=1&#41;:return seq #把seq[0]作为中值 left=&#91;y for y in seq&#91;1:&#93; if y &#60; seq&#91;0&#93;&#93; right=&#91;y for y in seq&#91;1:&#93; if y &#62;= seq&#91;0&#93;&#93; return quick_sort&#40;left&#41;+&#91;seq&#91;0&#93;&#93;+quick_sort&#40;right&#41; &#160; if __name__ == &#34;__main__&#34;: seq=&#91;5,3,6,7,1,9,3&#93; print insert_sort&#40;seq&#41; print quick_sort&#40;seq&#41; 相关日志算法：Java [...]]]></description>
		<wfw:commentRss>http://ohacker.com/2010/07/11/python_sor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>算法：Java 版 汉诺塔</title>
		<link>http://ohacker.com/2010/07/08/java_hannuota/</link>
		<comments>http://ohacker.com/2010/07/08/java_hannuota/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 15:27:34 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[算法]]></category>

		<guid isPermaLink="false">http://ohacker.com/?p=301</guid>
		<description><![CDATA[Java 版 汉诺塔]]></description>
		<wfw:commentRss>http://ohacker.com/2010/07/08/java_hannuota/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>算法：关于二进制</title>
		<link>http://ohacker.com/2010/07/08/suanfa_erjinzhi/</link>
		<comments>http://ohacker.com/2010/07/08/suanfa_erjinzhi/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 15:24:01 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[算法]]></category>

		<guid isPermaLink="false">http://ohacker.com/?p=294</guid>
		<description><![CDATA[算法：关于二进制,算法，给定一个二进制数n中1所在的位置，求3*n的二进制表达式中1的所在位置]]></description>
		<wfw:commentRss>http://ohacker.com/2010/07/08/suanfa_erjinzhi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hibernte 1:n 最佳抓取策略</title>
		<link>http://ohacker.com/2010/03/10/hibernte-1n-fetch/</link>
		<comments>http://ohacker.com/2010/03/10/hibernte-1n-fetch/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 14:33:44 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[hibernate]]></category>

		<guid isPermaLink="false">http://ohacker.com/?p=292</guid>
		<description><![CDATA[Hibernte 1:n 最佳抓取策略 在orm中实体1:n关联时，要考虑两个问题，分别是经典的n+1问题，和笛卡尔积问题。所以要避免使用默认抓取策略，同时尽量减少结果。hibernate作为最主流的java orm。一般的的优化原则是使用batchsize减少子查询的sql数量，同时在one一端使用懒加载，并且用subselect或者join来代替默认的关联加载。 上代码： @Entity @BatchSize(size=10)//因为一般要获得post，都会调用creator，所以使用预抓(EAGER)策略，同事设置预抓持为10 public class User extends BaseEntity{ @Id @GeneratedValue @Column(name="id") private long id; @OneToMany(mappedBy="creator",fetch=FetchType.LAZY)//懒加载 @Fetch(FetchMode.SUBSELECT)//使用JOIN会产生笛卡尔积的问题，subselect策略是Hibernate.org推荐的解决N+1问题策略 private Set posts=new HashSet(); ...... } @Entity public class Post extends BaseEntity { @Id @GeneratedValue @Column(name="id") private long id; @ManyToOne(fetch=FetchType.EAGER) @JoinColumn(nullable=false) private User creator; .... } 相关日志暂无相关日志]]></description>
		<wfw:commentRss>http://ohacker.com/2010/03/10/hibernte-1n-fetch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用perl脚本解决ant&#8230;非法字符:\65279&#8230;的问题</title>
		<link>http://ohacker.com/2010/02/21/perl-ant-65279/</link>
		<comments>http://ohacker.com/2010/02/21/perl-ant-65279/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 10:41:07 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[ant]]></category>

		<guid isPermaLink="false">http://ohacker.com/?p=287</guid>
		<description><![CDATA[用perl脚本解决ant&#8230;非法字符:\65279&#8230;的问题 用ant管理项目，编译时发现有些utf8编码的java文件无法编译,报错是&#8230;非法字符:\65279&#8230;。 在网上查N多与ant有关的文章，但是大多数的解决方案都不是很理想。因为文件比较多，而且我的 机器上也没有装editplus。 索性自己用perl写了一个脚本 如下： #remove the utf-8 BOM for Ant sub remove_bom &#123; #open( my $in, &#34;+&#60;&#34;, &#34;src/com/umpay/wap20/mobileProxy/MobileProxy.java&#34; ); foreach my $filename &#40;@_&#41; &#123; print $filename,&#34;\n&#34;; open&#40; my $in, &#34;+&#60;&#34;, $filename &#41;; @lines = &#60;$in&#62;; $line1 = $lines&#91;0&#93;; $t_chk1 = substr&#40; $line1, 0, 1 &#41;; #0xef -&#62; 239 $t_chk2 = substr&#40; $line1, 1, [...]]]></description>
		<wfw:commentRss>http://ohacker.com/2010/02/21/perl-ant-65279/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>perl入门之语法及数据类型</title>
		<link>http://ohacker.com/2010/02/19/perl/</link>
		<comments>http://ohacker.com/2010/02/19/perl/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 14:34:03 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://ohacker.com/?p=284</guid>
		<description><![CDATA[perl入门之数据类型]]></description>
		<wfw:commentRss>http://ohacker.com/2010/02/19/perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SIP Servlet入门教程及例子</title>
		<link>http://ohacker.com/2010/02/19/sip-tutorial-and-simple/</link>
		<comments>http://ohacker.com/2010/02/19/sip-tutorial-and-simple/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 14:18:03 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[sailfin]]></category>
		<category><![CDATA[sip]]></category>
		<category><![CDATA[sip servlet]]></category>

		<guid isPermaLink="false">http://ohacker.com/?p=278</guid>
		<description><![CDATA[作为一个SIP Servlet Tutorial，这个文档主要描述了在JavaEE平台下如何开发基于SIP协议的应用服务。当然这个教程也包含了如何将JavaEE技术与SIP应用程序集成。]]></description>
		<wfw:commentRss>http://ohacker.com/2010/02/19/sip-tutorial-and-simple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ant 小记</title>
		<link>http://ohacker.com/2010/02/19/ant-path-fileset/</link>
		<comments>http://ohacker.com/2010/02/19/ant-path-fileset/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 14:09:35 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[ant]]></category>

		<guid isPermaLink="false">http://ohacker.com/?p=272</guid>
		<description><![CDATA[传统的ant 打包的项目需要处理文件和路径。特别是烦人的classpath。Ant内置了很多处理文件和路径的数据类型。比如fileset和path]]></description>
		<wfw:commentRss>http://ohacker.com/2010/02/19/ant-path-fileset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>图片一张</title>
		<link>http://ohacker.com/2010/02/09/fcjp/</link>
		<comments>http://ohacker.com/2010/02/09/fcjp/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 06:34:19 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://ohacker.com/?p=267</guid>
		<description><![CDATA[相关日志暂无相关日志]]></description>
		<wfw:commentRss>http://ohacker.com/2010/02/09/fcjp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
