﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-CrackRen</title><link>http://www.blogjava.net/CrackRen/</link><description /><language>zh-cn</language><lastBuildDate>Tue, 21 Apr 2026 06:34:31 GMT</lastBuildDate><pubDate>Tue, 21 Apr 2026 06:34:31 GMT</pubDate><ttl>60</ttl><item><title>屏蔽CCMenu按钮响应</title><link>http://www.blogjava.net/CrackRen/archive/2012/10/20/389913.html</link><dc:creator>CrackRen</dc:creator><author>CrackRen</author><pubDate>Sat, 20 Oct 2012 04:07:00 GMT</pubDate><guid>http://www.blogjava.net/CrackRen/archive/2012/10/20/389913.html</guid><wfw:comment>http://www.blogjava.net/CrackRen/comments/389913.html</wfw:comment><comments>http://www.blogjava.net/CrackRen/archive/2012/10/20/389913.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/CrackRen/comments/commentRss/389913.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/CrackRen/services/trackbacks/389913.html</trackback:ping><description><![CDATA[<br /> <div id="xunlei_com_thunder_helper_plugin_d462f475-c18e-46be-bd10-327458d045bd"></div><p>屏蔽方法:</p>
<p>&nbsp;</p>
<p>进入新的CCLayer时:</p>
<p>[[CCDirector sharedDirector].touchDispatcher addTargetedDelegate:self priority:kCCMenuHandlerPriority swallowsTouches:YES];</p>
<p>&nbsp;</p>
<p>离开此CCLayer时调用</p>
<p>[[CCDirector sharedDirector].touchDispatcher removeDelegate:self];</p>
<p>&nbsp;</p>
<p>重写方法</p>
<p>- (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event;</p>
<p>&nbsp;</p>
<p>解释:</p>
<p>由于CCMenu 按钮接受按键的优先级为-128(值越小优先级越高)，所有不论处在那一层都会接收到点击&nbsp;</p>
<p>[[CCDirector sharedDirector].touchDispatcher addTargetedDelegate:self priority:kCCMenuHandlerPriority swallowsTouches:YES];</p>
<p>priority: 优先级 kCCMenuHandlerPriority(-128)</p>
<p>swallowsToucher: 是否吃掉按钮不叫其他层再接收了&nbsp; 如果为NO其他层还是一样会接收到Touch数据</p>
<p>&nbsp;</p>
<p>注意离开此CCLayer时一定要调用</p>
<p>[[CCDirector sharedDirector].touchDispatcher removeDelegate:self];</p>
<p>否则下面层将不再接收按键</p><img src ="http://www.blogjava.net/CrackRen/aggbug/389913.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/CrackRen/" target="_blank">CrackRen</a> 2012-10-20 12:07 <a href="http://www.blogjava.net/CrackRen/archive/2012/10/20/389913.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Commons-IO 功能简介</title><link>http://www.blogjava.net/CrackRen/archive/2012/10/20/389912.html</link><dc:creator>CrackRen</dc:creator><author>CrackRen</author><pubDate>Sat, 20 Oct 2012 04:06:00 GMT</pubDate><guid>http://www.blogjava.net/CrackRen/archive/2012/10/20/389912.html</guid><wfw:comment>http://www.blogjava.net/CrackRen/comments/389912.html</wfw:comment><comments>http://www.blogjava.net/CrackRen/archive/2012/10/20/389912.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/CrackRen/comments/commentRss/389912.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/CrackRen/services/trackbacks/389912.html</trackback:ping><description><![CDATA[<br /> <div id="xunlei_com_thunder_helper_plugin_d462f475-c18e-46be-bd10-327458d045bd"></div><div id="blog_content" class="blog_content">
    <p><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">Class FileUtils</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">此类包含了一般的通用文件操作工具。</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 读、写文件</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 创建一个目录，如果其上级的各级父目录不存在，也会创建它们</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 拷贝文件和目录</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 删除文件和目录</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 将URL转换成文件</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 通过过滤器或者扩展名列出文件</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 比较文件内容</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 修改文件最后修改日期</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 计算校验和</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">累了，去读意优休息一下下,QQ空间，美文，非主流，网络日记，搞笑短信，祝福短信，热门短信，有意思啊&nbsp;&nbsp;&nbsp;</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">Class IOUtils</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">此类包含了一般的IO流操作工具。</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; closeQuietly &#8211; 忽略 nulls和错误而关闭一个流</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; toXxx/read &#8211; 这些类从一个流读取数据</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; write &#8211; 这些方法写数据到一个流</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; copy &#8211; 这些方法从一个流到另一个流拷贝数据</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; contentEquals &#8211; 这些方法比较两个流的数据</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">Class FilenameUtils</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">此类包含了文件和路径的操作工具。</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">当你将在Windows下开发的Java程序转移到Unix系统时，你可能遇到文件路径的问题，这个类的目标帮你解决这个问题。注意: 你完全可以不用这个类，而使用JDK提供的两个构造参数的File类，File(File,String)。</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">大多数方法识别两个分隔符(/ 和 \), 和两个前缀集合。</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">这个类奖一个文件名称定义成六部分(例如 C:\dev\project\file.txt):</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 前缀 &#8211; C:\</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 路径 &#8211; dev\project\</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 全路径 &#8211; C:\dev\project\</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 文件名称 &#8211; file.txt</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 基本名称 &#8211; file</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp; &#9679; 扩展名 &#8211; txt</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">这个类能够处理以分隔符结尾的目录文件。如果你忽略了最后一个分隔符，它也能识别其是文件还是目录。这个类仅支持UNIX和Windows样式的名称，前缀匹配方式如下：</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">Windows:</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">a\b\c.txt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; ""&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; 相对</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">\a\b\c.txt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; "\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; 当前的绝对驱动器</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">C:a\b\c.txt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; "C:"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; 相对的驱动器</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">C:\a\b\c.txt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; "C:\"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; 绝对</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">\\server\a\b\c.txt&nbsp; &#8211;&gt; "\\server\" &#8211;&gt; UNC</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">Unix:</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">a/b/c.txt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; ""&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; 相对</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">/a/b/c.txt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; "/"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; 绝对</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">~/a/b/c.txt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; "~/"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; 当前用户</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">~&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; "~/"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; 当前用户 (slash added)</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">~user/a/b/c.txt&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; "~user/"&nbsp;&nbsp;&nbsp; &#8211;&gt; 命名用户</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">~user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8211;&gt; "~user/"&nbsp;&nbsp;&nbsp; &#8211;&gt; 命名用户 (slash added)</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">&nbsp;&nbsp;&nbsp;</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">org.apache.commons.io.filefilter&nbsp;</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">此包中包含了大量的文件名称过滤器。</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">DirectoryFilter&nbsp; 仅接受目录</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">PrefixFileFilter 基于前缀</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">SuffixFileFilter 基于后缀</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">NameFileFilter 基于文件名称</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">WildcardFileFilter 基于通配符</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">AgeFileFilter 基于最后修改时间</span><br style="padding: 0px; margin: 0px; color: #383838; font-size: 14px; line-height: 24px; text-align: left;" /><span style="color: #383838; font-size: 14px; line-height: 24px; text-align: left;">SizeFileFilter 基于文件尺寸</span></p>
<p>&nbsp;</p>
<p>下载地址：</p>
<p><a href="http://commons.apache.org/io/">http://commons.apache.org/io/</a>
</p>
  </div><img src ="http://www.blogjava.net/CrackRen/aggbug/389912.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/CrackRen/" target="_blank">CrackRen</a> 2012-10-20 12:06 <a href="http://www.blogjava.net/CrackRen/archive/2012/10/20/389912.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JSplitPane 默认展开/折叠分隔条 </title><link>http://www.blogjava.net/CrackRen/archive/2011/11/24/364716.html</link><dc:creator>CrackRen</dc:creator><author>CrackRen</author><pubDate>Thu, 24 Nov 2011 04:02:00 GMT</pubDate><guid>http://www.blogjava.net/CrackRen/archive/2011/11/24/364716.html</guid><wfw:comment>http://www.blogjava.net/CrackRen/comments/364716.html</wfw:comment><comments>http://www.blogjava.net/CrackRen/archive/2011/11/24/364716.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/CrackRen/comments/commentRss/364716.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/CrackRen/services/trackbacks/364716.html</trackback:ping><description><![CDATA[<div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><span style="font-size: 14pt; font-family: Verdana; ">当使用JSplitpane分隔面板时</span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><span style="font-size: 14pt; font-family: Verdana; ">可以通过 splitPaneMain.setOneTouchExpandable(true);<br /></span></p><div><span style="font-size: 14pt; font-family: Verdana; ">设置&nbsp;oneTouchExpandable&nbsp;属性的值，要使&nbsp;JSplitPane&nbsp;在分隔条上提供一个 UI 小部件来快速展开/折叠分隔条</span></div><p>&nbsp;</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "><div><span style="line-height: normal; font-family: Arial; font-size: 14pt; ">但是如果要初始化时默认就折叠一边的话 网上搜索添加下面几句就可以了，但是验证了下只有在一边没加控件时才行</span></div></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #ffffff; "></p><pre prettyprint"="" style="line-height: 25px; text-align: left; background-color: #ffffff; "><code style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 1em; vertical-align: baseline; background-color: #eeeeee; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-size: small; "><span style="vertical-align: baseline; background-color: transparent; color: gray; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">// Hide left or top</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> <br /></span></span><span style="line-height: normal; white-space: normal; background-color: #ffffff; font-family: 'Comic Sans MS'; font-size: 14pt; ">splitPaneMain</span><span style="font-size: small; "><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">.</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">getLeftComponent</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">().</span><span style="vertical-align: baseline; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; background-color: transparent; ">setMinimumSize</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">(</span><span style="vertical-align: baseline; background-color: transparent; color: #00008b; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">new</span> <span style="vertical-align: baseline; background-color: transparent; color: #2b91af; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">Dimension</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">());</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> <br /></span></span><span style="line-height: normal; white-space: normal; background-color: #ffffff; font-family: 'Comic Sans MS'; font-size: 14pt; ">splitPaneMain</span><span style="font-size: small; "><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">.</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">setDividerLocation</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">(</span><span style="vertical-align: baseline; background-color: transparent; color: #800000; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">0.0d</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">);</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">  <br /><br /></span><span style="vertical-align: baseline; background-color: transparent; color: gray; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">// Hide right or bottom</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> <br /></span></span><span style="line-height: normal; white-space: normal; background-color: #ffffff; font-family: 'Comic Sans MS'; font-size: 14pt; ">splitPaneMain</span><span style="font-size: small; "><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">.</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">getRightComponent</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">().</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">setMinimumSize</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">(</span><span style="vertical-align: baseline; background-color: transparent; color: #00008b; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">new</span> <span style="vertical-align: baseline; background-color: transparent; color: #2b91af; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">Dimension</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">());</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> <br /></span></span><span style="line-height: normal; white-space: normal; background-color: #ffffff; font-family: 'Comic Sans MS'; font-size: 14pt; ">splitPaneMain</span><span style="font-size: small; "><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">.</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">setDividerLocation</span><span style="vertical-align: baseline; background-color: transparent; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">(</span><span style="vertical-align: baseline; background-color: transparent; color: #800000; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'Comic Sans MS'; font-size: 14pt; ">1.0d</span><span style="vertical-align: baseline; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: 'Comic Sans MS'; font-size: 14pt; ">);</span></span></code></pre></div><img src ="http://www.blogjava.net/CrackRen/aggbug/364716.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/CrackRen/" target="_blank">CrackRen</a> 2011-11-24 12:02 <a href="http://www.blogjava.net/CrackRen/archive/2011/11/24/364716.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MD5的使用</title><link>http://www.blogjava.net/CrackRen/archive/2011/10/25/362032.html</link><dc:creator>CrackRen</dc:creator><author>CrackRen</author><pubDate>Tue, 25 Oct 2011 09:37:00 GMT</pubDate><guid>http://www.blogjava.net/CrackRen/archive/2011/10/25/362032.html</guid><wfw:comment>http://www.blogjava.net/CrackRen/comments/362032.html</wfw:comment><comments>http://www.blogjava.net/CrackRen/archive/2011/10/25/362032.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/CrackRen/comments/commentRss/362032.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/CrackRen/services/trackbacks/362032.html</trackback:ping><description><![CDATA[写个工具把不同文件夹下的文件拷贝到一个文件夹下去，碰到格问题，需要考虑到生成唯一文件名，想来想去还是使用MD5计算吧<br /><br /><div><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">import</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;java.security.MessageDigest;<br /><br /></span><span style="font-size: 13px; background-color: #eeeeee; color: #008000; ">/**</span><span style="font-size: 13px; background-color: #eeeeee; color: #008000; "><br />&nbsp;*<br />&nbsp;*&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #808080; ">@author</span><span style="font-size: 13px; background-color: #eeeeee; color: #008000; ">&nbsp;apple<br />&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #008000; ">*/</span><span style="font-size: 13px; background-color: #eeeeee; "><br /></span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">public</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">class</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;xMD5&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">public</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">final</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">static</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;String&nbsp;MD5(String&nbsp;s)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">char</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;hexDigits[]&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">=</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;{</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">0</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">1</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">2</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">3</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">4</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">5</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">6</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">7</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">8</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">9</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">A</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">B</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">C</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">D</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">E</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">,&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">F</span><span style="font-size: 13px; background-color: #eeeeee; ">'</span><span style="font-size: 13px; background-color: #eeeeee; ">};<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">try</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">byte</span><span style="font-size: 13px; background-color: #eeeeee; ">[]&nbsp;strTemp&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">=</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;s.getBytes();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #008000; ">//</span><span style="font-size: 13px; background-color: #eeeeee; color: #008000; ">使用MD5创建MessageDigest对象</span><span style="font-size: 13px; background-color: #eeeeee; color: #008000; "><br /></span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MessageDigest&nbsp;mdTemp&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">=</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;MessageDigest.getInstance(</span><span style="font-size: 13px; background-color: #eeeeee; ">"</span><span style="font-size: 13px; background-color: #eeeeee; ">MD5</span><span style="font-size: 13px; background-color: #eeeeee; ">"</span><span style="font-size: 13px; background-color: #eeeeee; ">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mdTemp.update(strTemp);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">byte</span><span style="font-size: 13px; background-color: #eeeeee; ">[]&nbsp;md&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">=</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;mdTemp.digest();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">int</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;j&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">=</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;md.length;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">char</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;str[]&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">=</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">new</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">char</span><span style="font-size: 13px; background-color: #eeeeee; ">[j&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">*</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; ">2</span><span style="font-size: 13px; background-color: #eeeeee; ">];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">int</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;k&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">=</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; ">0</span><span style="font-size: 13px; background-color: #eeeeee; ">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">for</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;(</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">int</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;i&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">=</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; ">0</span><span style="font-size: 13px; background-color: #eeeeee; ">;&nbsp;i&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">&lt;</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;j;&nbsp;i</span><span style="font-size: 13px; background-color: #eeeeee; ">++</span><span style="font-size: 13px; background-color: #eeeeee; ">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">byte</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;b&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">=</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;md[i];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #008000; ">//</span><span style="font-size: 13px; background-color: #eeeeee; color: #008000; ">将没个数(int)b进行双字节加密</span><span style="font-size: 13px; background-color: #eeeeee; color: #008000; "><br /></span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;str[k</span><span style="font-size: 13px; background-color: #eeeeee; ">++</span><span style="font-size: 13px; background-color: #eeeeee; ">]&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">=</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;hexDigits[b&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">&gt;&gt;</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; ">4</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; ">&amp;</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; ">0xf</span><span style="font-size: 13px; background-color: #eeeeee; ">];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;str[k</span><span style="font-size: 13px; background-color: #eeeeee; ">++</span><span style="font-size: 13px; background-color: #eeeeee; ">]&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">=</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;hexDigits[b&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; ">&amp;</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; ">0xf</span><span style="font-size: 13px; background-color: #eeeeee; ">];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">return</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">new</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;String(str);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">catch</span><span style="font-size: 13px; background-color: #eeeeee; ">&nbsp;(Exception&nbsp;e)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">return</span>&nbsp;<span style="font-size: 13px; background-color: #eeeeee; color: #0000ff; ">null</span><span style="font-size: 13px; background-color: #eeeeee; ">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;<br />}</span></div><img src ="http://www.blogjava.net/CrackRen/aggbug/362032.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/CrackRen/" target="_blank">CrackRen</a> 2011-10-25 17:37 <a href="http://www.blogjava.net/CrackRen/archive/2011/10/25/362032.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CCSprite各种动作介绍和使用</title><link>http://www.blogjava.net/CrackRen/archive/2011/10/14/361961.html</link><dc:creator>CrackRen</dc:creator><author>CrackRen</author><pubDate>Fri, 14 Oct 2011 05:18:00 GMT</pubDate><guid>http://www.blogjava.net/CrackRen/archive/2011/10/14/361961.html</guid><wfw:comment>http://www.blogjava.net/CrackRen/comments/361961.html</wfw:comment><comments>http://www.blogjava.net/CrackRen/archive/2011/10/14/361961.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/CrackRen/comments/commentRss/361961.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/CrackRen/services/trackbacks/361961.html</trackback:ping><description><![CDATA[<p>&nbsp;</p>
<p>&nbsp;</p>
<pre name="code" class="c">// 触摸屏
-(void) ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{

    for( UITouch *touch in touches ) {
		CGPoint location = [touch locationInView: [touch view]];
		location = [[CCDirector sharedDirector] convertToGL: location];

        // 各种动作
        
        // 瞬时动作
        // 设置坐标
        id action0 = [CCPlace actionWithPosition:ccp(240,160)];
        // 隐藏
        id action1 = [CCHide action];
        // 显示
        id action2 = [CCShow action];
        // 隐藏/显示
        id action3 = [CCToggleVisibility action];
        
        // 延时动作
        // 移动
        id action4 = [CCMoveTo actionWithDuration:2 position:ccp(0,0)];
        id action5 = [CCMoveBy actionWithDuration:2 position:ccp(100,100)];
        // 弹跳
        id action6 = [CCJumpTo actionWithDuration:2 position:ccp(0,200) height:30 jumps:5];
        id action7 = [CCJumpBy actionWithDuration:2 position:ccp(100, 0) height:30 jumps:5];
        // 贝塞尔移动
        ccBezierConfig bezier;
        bezier.controlPoint_1 = ccp(0, 0);
        bezier.controlPoint_2 = ccp(100, 300);
        bezier.endPosition = ccp(0,100);
        id action8 = [CCBezierTo actionWithDuration:3 bezier:bezier];
        id action9 = [CCBezierBy actionWithDuration:3 bezier:bezier];
        // 缩放
        id action10 = [CCScaleTo actionWithDuration:2 scale:4];
        id action11 = [CCScaleBy actionWithDuration:2 scale:0.5];
        // 旋转
        id action12 = [CCRotateTo actionWithDuration:2 angle:180];
        id action13 = [CCRotateBy actionWithDuration:2 angle:-180];
        // 闪烁
        id action14 = [CCBlink actionWithDuration:3 blinks:5];
        // 色调变化
        id action15 = [CCTintTo actionWithDuration:2 red:255 green:0 blue:0];
        id action16 = [CCTintBy actionWithDuration:0.5 red:0 green:255 blue:255];
        // 淡化到/淡入/淡出
        id action17 = [CCFadeTo actionWithDuration: 1 opacity:80];
        id action18 = [CCFadeIn actionWithDuration:1.0f];
        id action19 = [CCFadeOut actionWithDuration:1.0f];
        
        // 动画顺序播放
        CCAnimation *animation = [CCAnimation animation];
        [animation setDelay:2];
        // 这里就添加两帧，需要自己添加
        [animation addFrameWithTexture:sprTest.texture rect:CGRectMake(0, 0, 44, 34)];
        [animation addFrameWithTexture:sprTest.texture rect:CGRectMake(0, 34, 44, 34)]; 
        id action20 = [CCAnimate actionWithAnimation: animation];
        
        // 组合动作
        // 动画序列
        id action21 = [CCSequence actions:action19, action18, nil];
        // 重复动作
        id action22 = [CCRepeat actionWithAction:action21 times:10];
        // 延时动作
        id action23 = [CCDelayTime actionWithDuration:1];
        // 同时动作
        id action24 = [CCSpawn actions:action0, action4, action21, nil];
        // 无限循环动作
        id action25 = [CCRepeatForever actionWithAction:action21];
        
        // 扩展动作
        // 回调动作
        id acf0 = [CCCallFunc actionWithTarget:self selector:@selector(CallBack1)];
        // 回调动作，传递动画自身指针
        id acf1 = [CCCallFuncN actionWithTarget:self selector:@selector(CallBack2:)];  
        // 回调动作，传递动画自身指针已经一个参数
        id acf2 = [CCCallFuncND actionWithTarget:self selector:@selector(CallBack3:data:) data:(void*)2];
        id action26 = [CCSequence actions:action19, action18, acf0, action23, action0, nil];
        // 反转动作，只能用在有方向有顺序的动作上
        id action27 = [action9 reverse];

        // 速度变化
        //id ac = [CCSequence actions:action9,action27,nil];
        id actiontest = [CCMoveBy actionWithDuration:0.5 position:ccp(200,0)];
        id  ac = [CCSequence actions:actiontest,actiontest, nil];
        // 渐快
        id action28 = [CCEaseIn actionWithAction:ac rate:3];
        // 渐慢
        id action29 = [CCEaseOut actionWithAction:ac rate:3];
        // 先渐快再渐慢
        id action30 = [CCEaseInOut actionWithAction:ac rate:3];
        // 正弦波移动
        id action31 = [CCEaseSineIn actionWithAction:ac];
        id action32 = [CCEaseSineOut actionWithAction:ac];
        id action33 = [CCEaseSineInOut actionWithAction:ac];
        // 由极慢至极快
        id action34 = [CCEaseExponentialIn actionWithAction:ac];
        // 由极快到极慢
        id action35 = [CCEaseExponentialOut actionWithAction:ac];
        // 由极慢至极快 再由极快到慢
        id action36 = [CCEaseExponentialInOut actionWithAction:ac];
        // 手动设定速度,可通过SetSpeed不断调整
        id action37 = [CCSpeed actionWithAction:ac speed:(CCRANDOM_0_1() * 5)];

        [sprTest runAction:action37];
    
	}  
}
// 回调函数1
- (void) CallBack1
{
	[sprTest runAction:[CCTintBy actionWithDuration:2 red:255 green:0 blue:255]];	
}

// 回调函数2
- (void) CallBack2:(id)sender
{
    [sender runAction:[CCTintBy actionWithDuration:1 red:255 green:0 blue:255]];
}

// 回调函数3
-(void) CallBack3:(id)sender data:(void*)data
{
	[sender runAction:[CCTintBy actionWithDuration:(NSInteger)data red:255 green:0 blue:255]];	
}</pre>&nbsp;<img src ="http://www.blogjava.net/CrackRen/aggbug/361961.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/CrackRen/" target="_blank">CrackRen</a> 2011-10-14 13:18 <a href="http://www.blogjava.net/CrackRen/archive/2011/10/14/361961.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Scene切换特效</title><link>http://www.blogjava.net/CrackRen/archive/2011/10/11/361962.html</link><dc:creator>CrackRen</dc:creator><author>CrackRen</author><pubDate>Tue, 11 Oct 2011 05:57:00 GMT</pubDate><guid>http://www.blogjava.net/CrackRen/archive/2011/10/11/361962.html</guid><wfw:comment>http://www.blogjava.net/CrackRen/comments/361962.html</wfw:comment><comments>http://www.blogjava.net/CrackRen/archive/2011/10/11/361962.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/CrackRen/comments/commentRss/361962.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/CrackRen/services/trackbacks/361962.html</trackback:ping><description><![CDATA[<p>&nbsp;</p>
<p>&nbsp;</p>
<pre name="code" class="c">   //
    -(void) startMenu:(id) sender
    {
        CCScene* scenec = [CCTestScene scene];
        //部落格－－－－－－
        //CCTransitionTurnOffTiles *transitionScene = [CCTransitionTurnOffTiles transitionWithDuration:3 scene:scenec];
        //近远－远近－－－－－
        //CCTransitionShrinkGrow *transitionScene = [CCTransitionShrinkGrow transitionWithDuration:3 scene:scenec];
        //另一个layout左侧进入（视觉感觉是屏幕右移）
        //CCTransitionSlideInL *transitionScene = [CCTransitionSlideInL transitionWithDuration:3 scene:scenec];
        //另一个layout右侧进入（视觉感觉是屏幕左移）
        //CCTransitionSlideInR *transitionScene = [CCTransitionSlideInR transitionWithDuration:3 scene:scenec];
        //另一个layout上侧进入（视觉感觉是屏幕下移）
        //CCTransitionSlideInT *transitionScene = [CCTransitionSlideInT transitionWithDuration:3 scene:scenec];
        //另一个layout下侧进入（视觉感觉是屏幕上移）
        //CCTransitionSlideInB *transitionScene = [CCTransitionSlideInB transitionWithDuration:3 scene:scenec];
        //当前屏幕被分为3列，两则下移，中间上移
        //CCTransitionSplitCols *transitionScene = [CCTransitionSplitCols transitionWithDuration:3 scene:scenec];
        //当前屏幕被分为3列，两则左移，中间右移
        //CCTransitionSplitRows *transitionScene = [CCTransitionSplitRows transitionWithDuration:3 scene:scenec];
        //扇形转换－－－－－
        //CCTransitionRadialCW *transitionScene = [CCTransitionRadialCW transitionWithDuration:3 scene:scenec];
        //平面旋转－－－－－
        //CCTransitionRotoZoom *transitionScene = [CCTransitionRotoZoom transitionWithDuration:3 scene:scenec];
        //近－远－跳动－－－－－－
        //CCTransitionJumpZoom *transitionScene = [CCTransitionJumpZoom transitionWithDuration:3 scene:scenec];
        //立体反转（X轴）－－(还有种从近到远，从远到近的感觉)－－－－－－－－
        //CCTransitionZoomFlipX *transitionScene = [CCTransitionZoomFlipX transitionWithDuration:3 scene:scenec];
        //立体反转（Y轴）－(还有种从近到远，从远到近的感觉)－－－－－－－
        //CCTransitionZoomFlipY *transitionScene = [CCTransitionZoomFlipY transitionWithDuration:3 scene:scenec];
        //立体反转（X,Y轴）－－－(还有种从近到远，从远到近的感觉)－－－－－
        //CCTransitionZoomFlipAngular *transitionScene = [CCTransitionZoomFlipAngular transitionWithDuration:3 scene:scenec];
        //另外一个layout左侧进入覆盖当前layout
        //CCTransitionMoveInL *transitionScene = [CCTransitionMoveInL transitionWithDuration:3 scene:scenec];
        //另外一个layout右侧进入覆盖当前layout
        //CCTransitionMoveInR *transitionScene = [CCTransitionMoveInR transitionWithDuration:3 scene:scenec];
        //另外一个layout上侧进入覆盖当前layout
        //CCTransitionMoveInT *transitionScene = [CCTransitionMoveInT transitionWithDuration:3 scene:scenec];
        //另外一个layout下侧进入覆盖当前layout
        //CCTransitionMoveInB *transitionScene = [CCTransitionMoveInB transitionWithDuration:3 scene:scenec];
        //立体反转（X轴）－－2D平面反转，没有远近感
        //CCTransitionFlipX *transitionScene = [CCTransitionFlipX transitionWithDuration:3 scene:scenec];
        //立体反转（Y轴）－－2D平面反转，没有远近感
        //CCTransitionFlipY *transitionScene = [CCTransitionFlipY transitionWithDuration:3 scene:scenec];
        //立体反转（X,Y轴）－－2D平面反转，没有远近感
        //CCTransitionFlipAngular *transitionScene = [CCTransitionFlipAngular transitionWithDuration:3 scene:scenec];
        //实体－透明－实体(默认无颜色，可以附带颜色)
        //CCTransitionFade* transitionScene = [CCTransitionFade transitionWithDuration:3 scene:scenec withColor:ccWHITE];
        //另外一个直接渐变覆盖当前layout
        //CCTransitionCrossFade *transitionScene = [CCTransitionCrossFade transitionWithDuration:3 scene:scenec];
        //移动（方格状）部落格，从左下往右上
        //CCTransitionFadeTR *transitionScene = [CCTransitionFadeTR transitionWithDuration:3 scene:scenec];
        //移动（方格状）部落格，从右上往左下
        CCTransitionFadeBL *transitionScene = [CCTransitionFadeBL transitionWithDuration:3 scene:scenec];
        //移动（长矩形，宽度是屏幕宽）部落格，从下往上
        //CCTransitionFadeUp *transitionScene = [CCTransitionFadeUp transitionWithDuration:3 scene:scenec];
        //移动（长矩形，宽度是屏幕宽）部落格，从上往下
        //CCTransitionFadeDown *transitionScene = [CCTransitionFadeDown transitionWithDuration:3 scene:scenec];
        [[CCDirector sharedDirector] replaceScene: transitionScene];
    }</pre>&nbsp;&nbsp;<img src ="http://www.blogjava.net/CrackRen/aggbug/361962.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/CrackRen/" target="_blank">CrackRen</a> 2011-10-11 13:57 <a href="http://www.blogjava.net/CrackRen/archive/2011/10/11/361962.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>下载网页</title><link>http://www.blogjava.net/CrackRen/archive/2011/08/31/361963.html</link><dc:creator>CrackRen</dc:creator><author>CrackRen</author><pubDate>Wed, 31 Aug 2011 08:35:00 GMT</pubDate><guid>http://www.blogjava.net/CrackRen/archive/2011/08/31/361963.html</guid><wfw:comment>http://www.blogjava.net/CrackRen/comments/361963.html</wfw:comment><comments>http://www.blogjava.net/CrackRen/archive/2011/08/31/361963.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/CrackRen/comments/commentRss/361963.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/CrackRen/services/trackbacks/361963.html</trackback:ping><description><![CDATA[<p>&nbsp;</p>
<p>
</p>
<pre name="code" class="cpp">BOOL Download( CString szURL, CString szDstFile )
{
	BOOL res = false;
	CInternetSession Session;
	CHttpFile *pHttpFile = NULL;

	try{
		pHttpFile = (CHttpFile*)Session.OpenURL(szURL);
	}catch(CInternetException * m_pException){
		pHttpFile = NULL;
		m_pException-&gt;m_dwError;
		m_pException-&gt;Delete();
		Session.Close();
		res = false;
	}

	CString strLine;
	CFile xmlFile;
	BOOL bResult = xmlFile.Open(szDstFile, CFile::modeCreate | CFile::modeWrite);
	if(pHttpFile != NULL &amp;&amp; bResult)
	{
		while(pHttpFile-&gt;ReadString(strLine) != NULL)
		{
			xmlFile.Write(strLine, strLine.GetLength());
		}
		xmlFile.Close();
		res = true;
	}
	else
	{
		res = false;
	}

	Session.Close();
	pHttpFile-&gt;Close();
	delete pHttpFile;
	pHttpFile = NULL;
	
	return res;
}</pre>&nbsp;<img src ="http://www.blogjava.net/CrackRen/aggbug/361963.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/CrackRen/" target="_blank">CrackRen</a> 2011-08-31 16:35 <a href="http://www.blogjava.net/CrackRen/archive/2011/08/31/361963.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>