KK

Kim-'s-Blog.Object-Everything.I'm POJO.

.紀-錄.爲了忘卻的記憶..真的勇士,要敢于直面遇到的問題,敢于正視繁雜的原碼......在實踐中積累!

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  74 Posts :: 1 Stories :: 70 Comments :: 0 Trackbacks

2014年4月24日 #

使用Chrome浏览器,静默打印 Silent Print,直接打印,全屏模式

同事遇到这样一个需求:在Chrome浏览器中希望可以静默打印,直接打印

查了些资料,发现Chrome本身的设置就可以满足,

同时Chrome的一些其他设置可以用在软件开发中.


在地址栏敲: about:flags ,打开设置界面:

停用:Enable Print Preview Registration Promos Windows, Linux, Chrome OS

 

Chrome快捷方式增加:

--kiosk-printing

 


这样就可以静默,打印,直接使用默认打印机进行打印。


另:如需是Chrome全屏+静默打印: 使用 --kiosk --kiosk-printing

posted @ 2014-04-24 16:11 Kim' 阅读(17222) | 评论 (3)编辑 收藏

2014年3月4日 #

让你更多关注手上的工作,而不是其他什么地方.如图
.
posted @ 2014-03-04 10:14 Kim' 阅读(238) | 评论 (0)编辑 收藏

2011年12月1日 #

没有对应的列,增加该列 OK
posted @ 2011-12-01 11:50 Kim' 阅读(750) | 评论 (0)编辑 收藏

2011年11月30日 #

需要用svn cleanup上次关闭时的锁定


右键文件夹,清理
posted @ 2011-11-30 16:13 Kim' 阅读(368) | 评论 (0)编辑 收藏

2011年1月16日 #

posted @ 2011-01-16 22:07 Kim' 阅读(404) | 评论 (1)编辑 收藏

2011年1月13日 #

Facebook就是使用的此类数据库,效率相当高。


NOSQL的优势
易扩展

NoSQL数据库种类繁多,但是一个共同的特点都是去掉关系数据库的关系型特性。数据之间无关系,这样就非常容易扩展。也无形之间,在架构的层面上带来了可扩展的能力。

大数据量,高性能

NoSQL数据库都具有非常高的读写性能,尤其在大数据量下,同样表现优秀。这得益于它的无关系性,数据库的结构简单。一般MySQL使用Query Cache,每次表的更新Cache就失效,是一种大粒度的Cache,在针对web2.0的交互频繁的应用,Cache性能不高。而NoSQL的Cache是记录级的,是一种细粒度的Cache,所以NoSQL在这个层面上来说就要性能高很多了。

灵活的数据模型

NoSQL无需事先为要存储的数据建立字段,随时可以存储自定义的数据格式。而在关系数据库里,增删字段是一件非常麻烦的事情。如果是非常大数据量的表,增加字段简直就是一个噩梦。这点在大数据量的web2.0时代尤其明显。

高可用

NoSQL在不太影响性能的情况,就可以方便的实现高可用的架构。比如Cassandra,HBase模型,通过复制模型也能实现高可用。

 

 

posted @ 2011-01-13 21:03 Kim' 阅读(256) | 评论 (0)编辑 收藏

2009年11月18日 #

使用Struts2 上传 zip rar
使用的 MIME:
<interceptor-ref name="fileUpload">
 <param name="allowedTypes">application/zip,application/x-zip-compressed,application/rar,application/octet-stream</param>
 <param name="maximumSize">3145728</param>
</interceptor-ref>

通过Debug FileUploadInterceptor可知,
zip文件是[application/x-zip-compressed]
rar是[application/octet-stream]

posted @ 2009-11-18 15:24 Kim' 阅读(1082) | 评论 (5)编辑 收藏

2009年11月13日 #

使用Jbpm4.2 集成Spring 出现问题:
  
   2009-11-12 15:49:51,640 ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine' defined in file [......\WEB-INF\classes\spring\applicationContext-jbpm.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.cfg.SpringConfiguration.buildProcessEngine()] threw exception; nested exception is java.lang.NullPointerException

  Caused by: java.lang.NullPointerException
 at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:177)

 userCommandService 为null

  经调试发现,使用Spring后userCommandService 确实是null,
  配置中缺少什么东西?未知。 文档中并无特殊说明,
 4.1没有出现问题~ 
 应该是4.2的Bug

posted @ 2009-11-13 14:45 Kim' 阅读(3544) | 评论 (1)编辑 收藏

2009年10月29日 #

最近遇到的问题比较少,
不知是好事还是坏事~
也许是太忙了~
看来要抽空主动去研究点什么东西了~

 

posted @ 2009-10-29 15:38 Kim' 阅读(232) | 评论 (1)编辑 收藏

2009年9月7日 #

Jbpm4.1特性:
4.1与Tomcat集成的很好
4.1提供基于Web的流程编辑功能

在开发指南中有相关整合章节:

Replace the standard-transaction-interceptor with the spring-transaction-interceptor. The hibernate session needs the attribute current=”true”. Also, the <transaction/> must be removed from the transaction-context if you want the transactions to be handled by Spring only. This forces jBPM to search for the current session, which will be provided by Spring.

<process-engine-context>
<command-service>
<spring-transaction-interceptor />
...
</command-service>
...
</process-engine-context>
<transaction-context>
...
<hibernate-session current="true"/>
</transaction-context>

 

The Spring integration provides a special context, which is added to the set of context where the jBPM engine will look for beans. Using this SpringContext, it is now possible to retrieve beans from the Spring Application Context. For the Spring context to be known, a SpringConfiguration must be created. This class extends the JbpmConfiguration but will add itself as a context. The single constructor take the location of the jBPM configuration.

<bean id="jbpmConfiguration" class="org.jbpm.pvm.internal.cfg.SpringConfiguration">
<constructor-arg value="be/inze/spring/demo/jbpm.cfg.xml" />
</bean>

 

The jBPM services can also be defined in the Spring applicationContext, as following:

<bean id="processEngine" factory-bean="jbpmConfiguration" factory-method="buildProcessEngine" />
<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
<bean id="executionService" factory-bean="processEngine" factory-method="getExecutionService" />

 

The previous section already showed how the jBPM services can be made accessible for other Spring services. The other use case is calling Spring beans from within a process. This can be done by using an expression which resolves to the name of a Spring bean.

<java name="echo" expr="#{echoService}" method="sayHello" >
<transition name="to accept" to="join1"/>
</java>

The scripting engine will look into all contexts from the bean named echoService. If you configured the ScriptManager as above, Spring will be the last context to search for. You can also add a Spring bean to the Spring Application context (eg IdentitySessionImpl with id identitySession) and use it in the jBPM config (eg by adding <env class="identitySession" />)

整合过程与 4 基本相同。
jbpm.cfg.xml
<?xml version="1.0" encoding="UTF-8"?>

<jbpm-configuration>

  
<import resource="jbpm.default.cfg.xml" />
  
<import resource="jbpm.tx.spring.cfg.xml" />
  
<import resource="jbpm.jpdl.cfg.xml" />
  
<import resource="jbpm.identity.cfg.xml" />
  
<import resource="jbpm.businesscalendar.cfg.xml" />

  
<!-- Job executor is excluded for running the example test cases. -->
  
<!-- To enable timers and messages in production use, this should be included. -->
  
<!--
  <import resource="jbpm.jobexecutor.cfg.xml" />
  
-->
  
<import resource="jbpm.jobexecutor.cfg.xml" />
  
<import resource="jbpm/jbpm.mail.templates.examples.xml" />
  
</jbpm-configuration>

工作日历从 default中分离
整合XML在原生的jbpm.tx.spring.cfg.xml 中

posted @ 2009-09-07 15:15 Kim' 阅读(2148) | 评论 (2)编辑 收藏

jj