- 浏览: 50300 次
- 性别:
- 来自: 苏州
最新评论
-
geeksun:
按照代码运行的结果是空指针,方便给一份完整的代码出来吗?
事件驱动工具RRibbit使用 -
LinApex:
Rribbit啥东西
基于Rribbit和Spring MVC搭建REST风格架构 -
liangzi4454:
PD4ML -
zgpinguo:
全篇代码,没有任何笔记。。。
JFreeChart 笔记
文章列表
Rribbit不支持直接部署进Weblogic,原因在于Weblogic解析jar文件的协议是zip,而其它如tomcat,jetty是jar协议。
解决办法如下:
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Enumeration;
import java.util.jar.Ja ...
基于Rribbit事件驱动和Spring MVC搭建Restful风格的架构步骤 :
配置Pom:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
< ...
事件驱动设计可以有效降低模块间耦合度。
添加Rribbit依赖
<dependency>
<groupId>org.rribbit</groupId>
<artifactId>rribbit</artifactId>
<version>2.7.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.springframework</ ...
package com.wx.test;
import java.io.ByteArrayInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.L ...
根据鼠标位置偏移量来计算div的left和top。
<div id="popupDivCommon" class="ui-dialog" style="width:100%;height:100%;display:none;position: absolute;top:0px;left:0px;z-index: 103;" onmousemove="moveDiv()" onmouseup="endMoveDiv()">
<div id="topDivId ...
JFreeChart 笔记
- 博客分类:
- Java
package org.ems.core.utils;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.io.OutputStream;
import java.text.DecimalFormat;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import or ...
Jasper master report
<band height="25"> <subreport> <reportElement x="0" y="0" width="802" height="25"/> <subreportParameter name="caseID"> <subreportParameterExpression><![CDATA[$P{caseID}]]> ...
public class TestActivitiFlow {
/**
* @param args
*/
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext(
"classpath:activiti/activiti-context.xml");
// ProcessEngine processEngine = (ProcessEngine) context.getBean ...
几种报表引擎对HTML支持比较
- 博客分类:
- Report Engine
目前一些比较流行的报表引擎比较:
Jasper Report
可以通过iReport定义jrxml模板,datasource,parameter,field都支持,里面集成使用iText去生产PDF,加入只是用来作为模板引擎的话,可能允许用户编辑内容,即通过在线编辑器编辑content,做为参数传到jasper template,markup="html",这时jasper会对html string做一些预处理,把不认识的html tag丢掉,认识的就转成jasper element,后台iText对html支持也不尽如人意,导致html格式在生成的PDF里面不对。
...
Elixir can generate report by rml template.
Java Code:
public static void main(String[] args) {
try {
ReportEngineFactory.init(new BasicReportHost());
IReportEngine engine = ReportEngineFactory.newEngineInstance();
File outPDF = new File("D:/Elixir/test1.pdf");
FileOut ...
PD4ML is an excellent tool which convert html to pdf, can support most of the standard html tag and css.
Can append string page $[page] of $[total] on page header/footer to display page number.
Java code:
protected Dimension format = PD4Constants.A4;
protected boolean landscapeValue = false;
pr ...
Jasper Report Engine is an open-sourced tool. You can define jrxml template by iReport designer.
Java Code:
JasperReport jasperReport = JasperCompileManager.compileReport("D:/test.jrxml");
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put(" ...
I-Net Clear Report Engine is an excellent tool which also can support standard HTML/CSS well. You can define rpt template by clear designer, and can create datasource to query result from database, pass parameter by java......
import java.io.FileOutputStream;
import com.inet.report.Datasource;
...
create table testabc(
a Number,
b Date
);
insert into testabc(a,b) values(1, TO_DATE('1-MAY-2010/00:00', 'DD-MON-YYYY/HH24:MI'));
insert into testabc(a,b) values(1, TO_DATE('2-MAY-2010/00:00', 'DD-MON-YYYY/HH24:MI'));
insert into testabc(a,b) values(1, TO_DATE('3-MAY-2010/00:00 ...
Oracle Type
- 博客分类:
- Oracle
create or replace type TYPETEST as object(
abc varchar2(20)
);
create or replace type typetest1 is table of TYPETEST;
create or replace function fnTestType return typetest1
is
Result typetest1 := typetest1();
begin
Result := typetest1();
Result.extend;
Result(Result.count) := TY ...