君子博学而日参省乎己 则知明而行无过矣

博客园 首页 新随笔 联系 订阅 管理
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 106 下一页

2013年6月22日 #

摘要: 五、迷惑不解:为什么要自己消耗资源?令人不解的是为什么我们的Java的New I/O要设计成这个样子?如果说老的I/O不能多路复用,如下图所示,要开N多的线程去挨个侦听每一个Channel (文件描述符),如果这样做很费资源,且效率不高的话。那为什么在新的I/O机制依然需要自己连接自己,而且,还是重复连接,消耗双倍的资源?通过WEB搜索引擎没有找到为什么。只看到N多的人在报BUG,但SUN却没有任何解释。下面一个图展示了,老的IO和新IO的在网络编程方面的差别。看起来NIO的确很好很强大。但似乎比起C/C++来说,Java的这种实现会有一些不必要的开销。六、它山之石:从Apache的Mina框 阅读全文
posted @ 2013-06-22 04:54 刺猬的温驯 阅读(310) 评论(0) 推荐(0) 编辑

摘要: 一、前言自从J2SE 1.4版本以来,JDK发布了全新的I/O类库,简称NIO,其不但引入了全新的高效的I/O机制,同时,也引入了多路复用的异步模式。NIO的包中主要包含了这样几种抽象数据类型:Buffer:包含数据且用于读写的线形表结构。其中还提供了一个特殊类用于内存映射文件的I/O操作。Charset:它提供Unicode字符串影射到字节序列以及逆映射的操作。Channels:包含socket,file和pipe三种管道,都是全双工的通道。Selector:多个异步I/O操作集中到一个或多个线程中(可以被看成是Unix中select()函数的面向对象版本)。我的大学同学赵锟在使用NIO类库 阅读全文
posted @ 2013-06-22 04:38 刺猬的温驯 阅读(433) 评论(0) 推荐(0) 编辑

2013年6月21日 #

摘要: linux 下 shell命令 ,制作md5码 也用于软件的md5校验 MD5算法常常被用来验证网络文件传输的完整性,防止文件被人篡改。MD5全称是报文摘要算法(Message-Digest Algorithm 5),此算法对任意长度的信息逐位进行计算,产生一个二进制长度为128位(十六进制长度就是32位)的“指纹”(或称“报文摘要”),不同的文件产生相同的报文摘要的可能性是非常非常之小的。 在linux或Unix上,md5sum是用来计算和校验文件报文摘要的工具程序。一般来说,安装了Linux后,就会有md5sum这个工具,直接在命令行终端直接运行。 1、使用md5sum来产生指纹(报... 阅读全文
posted @ 2013-06-21 01:12 刺猬的温驯 阅读(1058) 评论(0) 推荐(0) 编辑

2013年6月20日 #

摘要: Solr是一个使用开源的搜索服务器,它采用Lucene Core的索引和搜索功能构建,它可以用于几乎所有的编程语言实现可扩展的搜索引擎。Solr的虽然有很多优点,建立开发环境是不是其中之一。此博客条目​​介绍了我们如何通过使用使用Maven运行Solr,并确保每个开发人员使用相同的configuration, schema 和 Solr版本。我们的Maven构建的要求如下:The properties of our Maven build must be read from an external property file. The only exception to this rule i 阅读全文
posted @ 2013-06-20 00:44 刺猬的温驯 阅读(3438) 评论(0) 推荐(0) 编辑

摘要: 大多数应用都必须具有某种搜索功能,问题是搜索功能往往是巨大的资源消耗并且它们由于沉重的数据库加载而拖垮你的应用的性能这就是为什么转移负载到一个外部的搜索服务器是一个不错的主意,Apache Solr是一个流行的开源搜索服务器,它通过使用类似REST的HTTP API,这就确保你能从几乎任何编程语言来... 阅读全文
posted @ 2013-06-20 00:41 刺猬的温驯 阅读(7280) 评论(8) 推荐(4) 编辑

2013年6月19日 #

摘要: Solris an open source search server which is built by using the indexing and search capabilities ofLucene Core, and it can be used for implementing scalable search engines with almost any programming language.Even though Solr has many advantages, setting up a a development environment is not one of 阅读全文
posted @ 2013-06-19 12:29 刺猬的温驯 阅读(2741) 评论(0) 推荐(0) 编辑

摘要: This is the ninth and the last part of mySpring Data JPA tutorial. Now it is time to take a look of what we have learned, and how we should use it to build better software.Table of ContentsThe contents of my Spring Data JPA tutorial is given in following:Part One: ConfigurationPart Two: CRUDPart Thr 阅读全文
posted @ 2013-06-19 11:55 刺猬的温驯 阅读(1056) 评论(0) 推荐(0) 编辑

摘要: The previous part of my tutorial describedhow you can paginate query results with Spring Data JPA. The example application of this blog entry has the same functional requirements, but it will use Querydsl instead of JPA criteria API. This blog entry assumes that you have got experience from both Que 阅读全文
posted @ 2013-06-19 11:54 刺猬的温驯 阅读(2025) 评论(0) 推荐(0) 编辑

摘要: The previous part of mySpring Data JPA tutorialdescribed how you can sort query results with Spring Data JPA. This blog entry will describe how you can paginate the query results by using Spring Data JPA. In order to demonstrate the pagination support of Spring Data JPA, I will add two new requireme 阅读全文
posted @ 2013-06-19 11:53 刺猬的温驯 阅读(5225) 评论(0) 推荐(0) 编辑

摘要: The fifth part of mySpring Data JPA tutorialdescribed how you cancreate advanced queries with Spring Data JPA and Querydsl. This blog entry will describe how you can use Spring Data JPA for sorting the query results. As an example I will be adding two new requirements for my example application:The 阅读全文
posted @ 2013-06-19 11:52 刺猬的温驯 阅读(5613) 评论(0) 推荐(0) 编辑

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 106 下一页