自定制 OSGi Console 进行组建和服务生命周期管理模块化编程的好处已经很好地被理解了约 40 年,但在 OSGi 之前,开发人员不得不自己发明模块化设计和系统。随着软件应用体系结构的不断发展,OSGi 已经成为了一种很好的软件体系模型。基于 OSGi 框架的应用程序因为其模块化、动态性和面... Read More
posted @ 2014-04-23 16:31 liheping Views(1637) Comments(0) Diggs(0) Edit
通过Apache Felix Remote Shell提供的org.apache.felix.shell.remote能使用telnet客户端访问远程的[Apache Felix Shell]和[Apache Felix Gogo]服务,只是简单的匿名访问,不需要认证.因此这种远程shell访问不会... Read More
posted @ 2014-04-09 16:24 liheping Views(3025) Comments(1) Diggs(0) Edit
在数据结构【二】:简单阻塞队列BlockingQueue的基础上添加权限属性:priority,并控制enqueue时根据priority排序插入.1.定义priority取值范围0~92.dequeue取出priority值最大的节点(最高进先出 largest-in,first-out ).3.若priority相等,则继续遵循FIFO原则注意 :此代码未经生产环境检验,仅供学习参考.PriorityQueue.h#ifndef CUR_PRIORITYQUEUE_H#define CUR_PRIORITYQUEUE_H#include #include struct node{ i... Read More
posted @ 2014-01-01 13:55 liheping Views(1019) Comments(0) Diggs(0) Edit
在POSIX多线程【一】:简单队列simple queue的基础上使用内部互斥锁和条件变量来控制并发以达到线程安全的目的,其主要用于 [生产者-消费者] 队列.1.BlockingQueue初始化时会确定队列容量(_capacity),如果队列已满(capacity=0),则会阻塞enqueue操作.2.关闭BlockingQueue(调用queue_free)是一个延迟的操作,它会等待所有元素都dequeue,期间,该队列的一切enqueue操作将无效.3.此代码未经生产环境检验,仅供学习参考.BlockingQueue.h#ifndef CUR_BLOCKINGQUEUE_H#define Read More
posted @ 2013-12-31 13:48 liheping Views(990) Comments(0) Diggs(0) Edit
简单的FIFO队列实现,非线程安全!1.queue.h :abstract data type queue#ifndef CUR_QUEUE_H#define CUR_QUEUE_H#includestruct node{ int value; struct node * next;};typedef struct queue{ int max,cur; struct node * head, * tail;}queue;extern queue* empty_queue(int _max);extern int queue_free(queue *q);exter... Read More
posted @ 2013-12-30 16:46 liheping Views(812) Comments(0) Diggs(0) Edit
过程记录 :1.下载gsoap_2.8.17.zip 并 解压 :$unzip gsoap_2.8.17.zip2.进入解压后的目录gsoap-2.83.自动配置编译环境: $./configure –prefix=$(pwd)/_install配置失败原因:error: C++ compiler cannot create executables解决办法:You need to install c++ on your computer. even if you installed gcc that doesn’t automatically install g++. Try to run o Read More
posted @ 2013-12-26 14:17 liheping Views(5588) Comments(0) Diggs(0) Edit
前一段时间,我在Eclipse碰到一个SVN错误,出现的原因是我的Eclipse的SVN插件是1.6,服务器的SVN版本是1.5.4,然后我在工程目录下做了一次提交操作(不是Eclipse里),到最后,我用Eclipse做同步操作时报如下错误:Unsupported working copy formatsvn: This client is too old to work with working copy 'E:\workspace\eps_qdzj\webapp'; please get a newer Subversion client在网上找了一些文档,都说的是SVN Read More
posted @ 2013-11-19 13:31 liheping Views(2783) Comments(0) Diggs(0) Edit
在使用openjpa 的时候和使用hibernate不一样.因为hibernate是使用cglib在运行是动态修改字节码来对entity进行增强的。而openjpa则不一样.它是在编译时字节码增强的.编译时字节码增强的有很多种实现方式,例如 jvm代理,使用第三方类加载器..等等..========================================================是用OpenJPAEclipseTool是基于IDE eclipse之上.OpenJPAEclipseTool是eclipse的一个插件...使用OpenJPAEclipseTool编译增强字节码很简单, Read More
posted @ 2012-03-09 11:30 liheping Views(1740) Comments(0) Diggs(0) Edit
在使用spring-data-jpa的发生异常Caused by: java.lang.IllegalAccessError: tried to access method org.springframework.core.GenericTypeResolver.getTypeVariableMap(Ljava/lang/Class;)Ljava/util/Map; from class org.springframework.data.util.ClassTypeInformation at org.springframework.data.util.ClassTypeInformat... Read More
posted @ 2012-03-06 14:00 liheping Views(12660) Comments(0) Diggs(0) Edit
一、字符串字面值字符串字面值是一串常量字符,字符串字面值常量用双引号括起来的零个或多个字符表示,为兼容C语言,C++中所有的字符串字面值都由编译器自动在末尾添加一个空字符。字符串没有变量名字,自身表示自身"Hello World!" //simple string literal"" //empty string literal"\nCC\toptions\tfile.[cC]\n" //string literal using newlines and tabs字符字面值: 'A' //single quote:ch Read More
posted @ 2011-12-28 11:21 liheping Views(14297) Comments(2) Diggs(1) Edit