<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feeds.feedsky.com/styles/temp01.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feeds.feedsky.com/csdn.net/andycpp" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feeds.feedsky.com/csdn.net/andycpp" type="application/rss+xml"></fs:self_link><lastBuildDate>Mon, 23 May 2011 04:01:00 GMT</lastBuildDate><title>华丽的痘痘</title><description>努力成为一个有价值的程序员</description><link>http://blog.csdn.net/blogrss.aspx?username=andycpp</link><item><title>堆排序算法</title><link>http://blog.csdn.net/andycpp/archive/2011/05/23/6439337.aspx</link><description>终于整明白啥是堆排序了，原来堆只是个幻象，是个虚拟模型，不必要真的弄一棵树出来，直接操作的对象仍然是数组。若要升序排序，则构造大顶堆，每次将堆顶元素删除后放置到堆尾的后一个位置，堆不断缩小。直接上代码	/**
	 * 堆排序演示程序
	 */
	public static void main(String[] args) {
		int[] a = createArray(20);
		System.out.println(Arrays.toString(a));
		heapSort(a);
		System.out.println(Arrays.toString(a));
	}
	
	/**
	 * 利用堆排序算法，对整型数组进行升序排序
	 * @param a 整型数组
	 */
	private static void heapSort(int[] a) {
		//最后一个非叶节点的索引为 a.length / 2 - 1
		int i, adjust;
		for(i=a.length/2&lt;img src=&quot;http://www1.feedsky.com/t1/520665358/andycpp/csdn.net/s.gif?r=http://blog.csdn.net/andycpp/archive/2011/05/23/6439337.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><pubDate>Mon, 23 May 2011 12:01:00 +0800</pubDate><author>华丽的痘痘</author><guid isPermaLink="false">http://blog.csdn.net/andycpp/archive/2011/05/23/6439337.aspx</guid><dc:creator>华丽的痘痘</dc:creator><fs:srclink>http://blog.csdn.net/andycpp/archive/2011/05/23/6439337.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/andycpp/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/andycpp/~1074616/520665358/1074615</fs:itemid></item><item><title>找出符合条件的组合</title><link>http://blog.csdn.net/andycpp/archive/2010/09/29/5914247.aspx</link><description>将0~9共10个数字填入下面的表达式，使得该表达式成立。找出所有可能的情况。【 】【 】【 】 + 【 】【 】【 】 = 【 】【 】【 】【 】public class MainTest {
	public static void main(String[] args) {
		showAllResult(10);
	}
	
	private static void showAllResult(int num) {
		int[] nums = new int[num];
		findAll(0, num-1, nums);
	}
	
	/**
	 * 用递归的方法找到所有n个数字的组合
	 * @param level - 当前正在考察组合中的第几位数字，从0开始算
	 * @param max_level - 该组合中元素的数目，从0开始算
	 * @param nums - 用于存放生成的组合
	 */
	private static void findAll(int level, int max_level&lt;img src=&quot;http://www1.feedsky.com/t1/520665359/andycpp/csdn.net/s.gif?r=http://blog.csdn.net/andycpp/archive/2010/09/29/5914247.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><pubDate>Wed, 29 Sep 2010 14:29:00 +0800</pubDate><author>华丽的痘痘</author><guid isPermaLink="false">http://blog.csdn.net/andycpp/archive/2010/09/29/5914247.aspx</guid><dc:creator>华丽的痘痘</dc:creator><fs:srclink>http://blog.csdn.net/andycpp/archive/2010/09/29/5914247.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/andycpp/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/andycpp/~1074616/520665359/1074615</fs:itemid></item><item><title>小技巧</title><link>http://blog.csdn.net/andycpp/archive/2010/09/29/5913497.aspx</link><description>&lt;br /&gt;在新闻标题中加入“new”标志：&quot;  &quot;&lt;img src=&quot;http://www1.feedsky.com/t1/520665360/andycpp/csdn.net/s.gif?r=http://blog.csdn.net/andycpp/archive/2010/09/29/5913497.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><pubDate>Wed, 29 Sep 2010 09:51:00 +0800</pubDate><author>华丽的痘痘</author><guid isPermaLink="false">http://blog.csdn.net/andycpp/archive/2010/09/29/5913497.aspx</guid><dc:creator>华丽的痘痘</dc:creator><fs:srclink>http://blog.csdn.net/andycpp/archive/2010/09/29/5913497.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/andycpp/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/andycpp/~1074616/520665360/1074615</fs:itemid></item><item><title>如何重载equals方法</title><link>http://blog.csdn.net/andycpp/archive/2010/09/27/5909954.aspx</link><description>&lt;br /&gt;1、参数是Object类型的，将参数命名为otherObject&lt;br /&gt;2、检测两个引用是否指向同一个对象&lt;br /&gt;if (this == otherObject) return true;&lt;br /&gt;3、如果otherObject是null，则返回false&lt;br /&gt;if (otherObject == null) return false; &lt;br /&gt;4、比较两个对象是否属于同一个类&lt;br /&gt;if (getClass() != otherObject.getClass()) return false;&lt;br /&gt;5、进行强制转换&lt;br /&gt;ClassName other = (ClassName) otherObject&lt;br /&gt;6、检查父类中的数据是否相等&lt;br /&gt; if (!super.equals(otherObject)) return false;&lt;br /&gt;7、逐条比较本类中特有的数据是否相等&lt;img src=&quot;http://www1.feedsky.com/t1/520665361/andycpp/csdn.net/s.gif?r=http://blog.csdn.net/andycpp/archive/2010/09/27/5909954.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><pubDate>Mon, 27 Sep 2010 16:18:00 +0800</pubDate><author>华丽的痘痘</author><guid isPermaLink="false">http://blog.csdn.net/andycpp/archive/2010/09/27/5909954.aspx</guid><dc:creator>华丽的痘痘</dc:creator><fs:srclink>http://blog.csdn.net/andycpp/archive/2010/09/27/5909954.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/andycpp/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/andycpp/~1074616/520665361/1074615</fs:itemid></item><item><title>JAVA格式化字符串速查</title><link>http://blog.csdn.net/andycpp/archive/2010/09/25/5906041.aspx</link><description>&lt;br /&gt;语法规则：&lt;br /&gt;%[argument_index$][flags][width][.precision]conversion&lt;br /&gt;&lt;br /&gt;正规使用方法：&lt;br /&gt;StringBuilder sb = new StringBuilder();
Formatter formatter = new Formatter(sb, Locale.US);
formatter.format(&quot;%4$2s %3$2s %2$2s %1$2s&quot;, &quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;)&lt;br /&gt;&lt;br /&gt;便捷方法：&lt;br /&gt;System.out.format(&quot;Local time: %tT&quot;, Calendar.getInstance());
String s = String.format(&quot;Duke's Birthday: %1$tm %1$te,%1$tY&quot;, c);&lt;br /&gt;&lt;br /&gt;转换器：&lt;br /&gt;
b 或 B ：将null转换为&quot;false&quot;，将Boolean值转换为字符串，将其他值转换为&quot;true&quot;&lt;br /&gt;
    s = Str&lt;img src=&quot;http://www1.feedsky.com/t1/520665362/andycpp/csdn.net/s.gif?r=http://blog.csdn.net/andycpp/archive/2010/09/25/5906041.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><pubDate>Sat, 25 Sep 2010 22:17:00 +0800</pubDate><author>华丽的痘痘</author><guid isPermaLink="false">http://blog.csdn.net/andycpp/archive/2010/09/25/5906041.aspx</guid><dc:creator>华丽的痘痘</dc:creator><fs:srclink>http://blog.csdn.net/andycpp/archive/2010/09/25/5906041.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/andycpp/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/andycpp/~1074616/520665362/1074615</fs:itemid></item><item><title>取得汉字拼音</title><link>http://blog.csdn.net/andycpp/archive/2010/09/08/5871258.aspx</link><description>&lt;br /&gt;用输入法生成器
&lt;br /&gt;
&quot;C:\Program Files\Windows NT\Accessories\Imegen.exe&quot;
&lt;br /&gt;
逆转换拼音输入法文件C:\WINNT\SYSTEM32\WINPY.MB
&lt;br /&gt;
会生成一个同名的TEXT文件&lt;img src=&quot;http://www1.feedsky.com/t1/520665363/andycpp/csdn.net/s.gif?r=http://blog.csdn.net/andycpp/archive/2010/09/08/5871258.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><pubDate>Wed, 08 Sep 2010 16:22:00 +0800</pubDate><author>华丽的痘痘</author><guid isPermaLink="false">http://blog.csdn.net/andycpp/archive/2010/09/08/5871258.aspx</guid><dc:creator>华丽的痘痘</dc:creator><fs:srclink>http://blog.csdn.net/andycpp/archive/2010/09/08/5871258.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/andycpp/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/andycpp/~1074616/520665363/1074615</fs:itemid></item><item><title>mysql环境变量</title><link>http://blog.csdn.net/andycpp/archive/2010/09/04/5862942.aspx</link><description>&lt;br /&gt;通过  show variables like &quot;sql_safe_updates&quot;  查看环境变量的当前值&lt;br /&gt;通过  set sql_select_limit = 0;  修改环境变量&lt;br /&gt;mysql手册的5.1.4小节是环境变量介绍&lt;img src=&quot;http://www1.feedsky.com/t1/520665364/andycpp/csdn.net/s.gif?r=http://blog.csdn.net/andycpp/archive/2010/09/04/5862942.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><pubDate>Sat, 04 Sep 2010 11:29:00 +0800</pubDate><author>华丽的痘痘</author><guid isPermaLink="false">http://blog.csdn.net/andycpp/archive/2010/09/04/5862942.aspx</guid><dc:creator>华丽的痘痘</dc:creator><fs:srclink>http://blog.csdn.net/andycpp/archive/2010/09/04/5862942.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/andycpp/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/andycpp/~1074616/520665364/1074615</fs:itemid></item><item><title>Mysql中用load data命令载入中文数据</title><link>http://blog.csdn.net/andycpp/archive/2010/09/02/5859616.aspx</link><description>1、数据库编码为utf-82、存放数据的txt文档采用无BOM的utf-8编码，具体设置方式为使用notepad++软件，如下图所示3、使用可视化mysql客户端进行操作，既MySQL Workbench 5.2 CE4、使用如下语句：     load data local infile 'd:/aaa.txt' into table teacher set department=replace(department,'\r','');     其中department为teacher表的最后一个字段，默认情况下，该字段的中文结尾都会跟一个回车符，因此用set department=replace(department,'\r','')语句将最后的回车符去掉，不然该字段的数据是不正确的。&lt;img src=&quot;http://www1.feedsky.com/t1/520665365/andycpp/csdn.net/s.gif?r=http://blog.csdn.net/andycpp/archive/2010/09/02/5859616.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><pubDate>Thu, 02 Sep 2010 18:53:00 +0800</pubDate><author>华丽的痘痘</author><guid isPermaLink="false">http://blog.csdn.net/andycpp/archive/2010/09/02/5859616.aspx</guid><dc:creator>华丽的痘痘</dc:creator><fs:srclink>http://blog.csdn.net/andycpp/archive/2010/09/02/5859616.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/andycpp/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/andycpp/~1074616/520665365/1074615</fs:itemid></item><item><title>一副扑克52张牌（没有大小王），模拟洗牌</title><link>http://blog.csdn.net/andycpp/archive/2009/08/21/4471050.aspx</link><description>纸牌类，代表一张纸牌：public class Card {	public CardSuit suit;	//花色	public int value;	//点数，1代表A，11代表J	public Card(CardSuit suit, int value) {		this.suit = suit;		this.value = value;	}	@Override	public String toString() {		StringBuilder sb = new StringBuilder();		switch(suit) {		case SPADE:			sb.append(&quot;黑桃&quot;);			break;		case HEART:			sb.append(&quot;红桃&quot;);			break;		case DIAMOND:			sb.append(&quot;方片&quot;);			break;		case CLUB:			sb.append(&quot;梅花&quot;);			break;&lt;img src=&quot;http://www1.feedsky.com/t1/520665366/andycpp/csdn.net/s.gif?r=http://blog.csdn.net/andycpp/archive/2009/08/21/4471050.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><pubDate>Fri, 21 Aug 2009 19:23:00 +0800</pubDate><author>华丽的痘痘</author><guid isPermaLink="false">http://blog.csdn.net/andycpp/archive/2009/08/21/4471050.aspx</guid><dc:creator>华丽的痘痘</dc:creator><fs:srclink>http://blog.csdn.net/andycpp/archive/2009/08/21/4471050.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/andycpp/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/andycpp/~1074616/520665366/1074615</fs:itemid></item><item><title>给定一个集合（字符数组），打印出它的所有子集</title><link>http://blog.csdn.net/andycpp/archive/2009/07/25/4378403.aspx</link><description>打印出一个集合的所有子集&lt;img src=&quot;http://www1.feedsky.com/t1/520665367/andycpp/csdn.net/s.gif?r=http://blog.csdn.net/andycpp/archive/2009/07/25/4378403.aspx&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><pubDate>Sat, 25 Jul 2009 00:03:00 +0800</pubDate><author>华丽的痘痘</author><guid isPermaLink="false">http://blog.csdn.net/andycpp/archive/2009/07/25/4378403.aspx</guid><dc:creator>华丽的痘痘</dc:creator><fs:srclink>http://blog.csdn.net/andycpp/archive/2009/07/25/4378403.aspx</fs:srclink><fs:srcfeed>http://blog.csdn.net/andycpp/feed.aspx</fs:srcfeed><fs:itemid>csdn.net/andycpp/~1074616/520665367/1074615</fs:itemid></item></channel></rss>
