2014年4月1日

摘要: FileFilter和FilenameFilter这两个类的用法都很简单,都只有一个方法FileFilter/*** @parampathnameThe abstract pathname to be tested*/boolean accept(File pathname)用法示例:import java.io.File;import java.io.FileFilter;public class Main { public static void main(String[] args) { File cwd = new File(System.getProperty("user. 阅读全文
posted @ 2014-04-01 14:05 yubinlai 阅读(10908) 评论(0) 推荐(0) 编辑

2014年3月28日

摘要: 在bluehost上花142.2美刀买了个空间玩。速度一般般的样子,装了个WordPress。同时注册了个域名:http://www.hilyb.com要是不好玩,就把钱退回来。 ^_^ 阅读全文
posted @ 2014-03-28 00:50 yubinlai 阅读(132) 评论(0) 推荐(0) 编辑

2013年12月5日

摘要: 下面这段话是网上其他人用最简短的语言解释MapReduce:We want to count all the books in the library. You count up shelf #1, I count up shelf #2. That’s map. The more people we get, the faster it goes.我们要数图书馆中的所有书。你数1号书架,我数2号书架。这就是“Map”。我们人越多,数书就更快。Now we get together and add our individual counts. That’s reduce.现在我们到一起,把所有 阅读全文
posted @ 2013-12-05 15:59 yubinlai 阅读(158) 评论(0) 推荐(0) 编辑

2012年9月12日

摘要: Buffer(缓冲区)是一个用于特定基本类型数据的容器。 Buffer是特定基本类型元素的线性有限序列。除内容外,Buffer的基本属性还包括capacity(容量)、limit(限制)和position(位置): 缓冲区的capacity是它所包含的元素的数量。缓冲区的容量不能为负并且不能更改。 缓冲区的limit是第一个不应该读取或写入的元素的索引。缓冲区的限制不能为负,并且不能大于其容... 阅读全文
posted @ 2012-09-12 11:27 yubinlai 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 1:selectionKey.channel()方法返回的 channel是ServerSocketChannel还是SocketChannel是由前边注册这个key时是注册channel确定的。2:基本处理流程服务器端先注册接收KeyserverSocketChannel.register(selector,SelectionKey.OP_ACCEPT)while(true){selector.... 阅读全文
posted @ 2012-09-12 11:19 yubinlai 阅读(10453) 评论(1) 推荐(1) 编辑

2010年6月3日

摘要: windows7 下使用idea 8.1.2生成grails control,结果出现以下错误: ERROR: JAVA_HOME is set to an invalid directory: D:/JDK/jdk1.6.0_04 Please set the JAVA_HOME variable in your environment to match the location of your... 阅读全文
posted @ 2010-06-03 21:30 yubinlai 阅读(569) 评论(0) 推荐(0) 编辑

2010年4月18日

摘要: // Writes a string to the defined Kettle Log.//// Usage:// writeToLog(var);// 1: String - The Message which should be written to// the Kettle Debug Log//// writeToLog(var,var);// 1: String - The Type ... 阅读全文
posted @ 2010-04-18 15:17 yubinlai 阅读(5441) 评论(0) 推荐(0) 编辑

2010年4月12日

摘要: 在Linux中执行.sh脚本,异常/bin/sh^M: bad interpreter: No such file or directory。 分析:这是不同系统编码格式引起的:在windows系统中编辑的.sh文件可能有不可见字符,所以在Linux系统下执行会报以上异常信息。 解决:1)在windows下转换:        ... 阅读全文
posted @ 2010-04-12 16:35 yubinlai 阅读(2725) 评论(0) 推荐(0) 编辑

2010年4月11日

摘要: 命令说明ps -ef | grep java查看java进程cp -r source dest复制文件夹及里边的内容(要加-r参数才行)rm -r folder删除文件夹及里边的内容tailf logs/catalina.out滚动查看文件的内容(tomcat日志,有新的内容时会自动滚屏显示)cat xx查看文件内容chmod mod file修改文件属性(mod可以是 rxr等的字母形式,也可以... 阅读全文
posted @ 2010-04-11 13:30 yubinlai 阅读(319) 评论(0) 推荐(0) 编辑

2010年3月20日

摘要: // 本月的第一天 Calendar calendar = new GregorianCalendar(); calendar.set( Calendar.DATE, 1 ); SimpleDateFormat simpleFormate = new SimpleDateFormat( " yyyy-MM-dd " ); System.out.println(simpleFormate... 阅读全文
posted @ 2010-03-20 10:17 yubinlai 阅读(294) 评论(0) 推荐(0) 编辑

导航