- 浏览: 147171 次
- 性别:
- 来自: 西安
-
最新评论
-
zuogangju108:
你好问一下double[][] 是什么类型的数据 能举例说明 ...
jfreeChart 柱状图和折线图结合
文章列表
/**
* 写入文件
*
* @param sb
* @param fileName
*/
public static void saveToText(StringBuffer sb, String fileName) {
if (sb == null || fileName == null) {
return;
}
File batFile = new File(fileName);
if (!batFile.exists()) {
try {
batFile.createNewFile();
} catch (IOExcept ...
/**
* 复制文件
*
* @param sourceFile
* @param descFile
*/
public static void copyFiles(File sourceFile, File descFile) {
if (sourceFile == null || !sourceFile.exists()
||descFile == null || !descFile.exists()) {
return;
}
File[] files = sourceFile.listFiles();
if (files == null ...
/**
* 判断是否是数字
*
* @param str
* @return
*/
public static boolean isNumeric(String str) {
Pattern pattern = Pattern.compile("^((-?|\\+?)\\d+)(\\.\\d+)?$"); // 数字
if (str != null && !"".equals(str.trim())) {
Matcher isNum = pattern.matcher(str.trim());
i ...
public static boolean executeBat(String filePath) {
if (filePath == null || "".equals(filePath.trim())
|| !new File(filePath).exists()) {
return false;
}
BufferedReader bufferedReader = null;
ProcessBuilder processBuilder = null;
Process process = null;
InputStream fis = ...
两个double数组的组合
- 博客分类:
- java_基础篇
public static double[] appendDouble(double[] a, double[] b) {
double[] result = new double[a.length + b.length];
System.arraycopy(a, 0, result, 0, a.length);
System.arraycopy(b, 0, result, a.length, b.length);
return result;
}
public class Test {
/**
* @param args
*/
public static void main(String[] args) {
String date1 = "2012-11-07 23:59:59";
String format = "yyyy-MM-dd HH:mm:ss";
Date date_1 = formatStrToDate(date1, format);
String date_2 = formatDateToStr(date_1, format);
}
/** ...
获取指定日期的前几天或者后几天
- 博客分类:
- java_基础篇
/**
* 获取指定日期的前几天(days<0)或者后几天(days>0)
*
* @param date
* @param days
* @param format
* @return
*/
public static String defineDayBefore2Object(Date date, int days,
String format) {
if (date == null || days == 0) {
return null;
}
if (format == null || format.equals(&qu ...
取当前日期的前几天或后几天
- 博客分类:
- java_基础篇
public static Date dayBeforeDate(int days) {
if (days == 0) {
return null;
}
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, days);
Date date = calendar.getTime();
return date;
}
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.GradientPaint;
import java.awt.geom.Ellipse2D;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.DecimalFormat;
import java.text.NumberFormat;
im ...
import java.awt.Color;
import java.awt.Font;
import java.awt.GradientPaint;
import java.awt.geom.Ellipse2D;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree. ...
JFreeChart实现实时曲线图
- 博客分类:
- jfreeChart
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.plot.XYPlot;
import org.jfree.data.time.Millisecond;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCol ...
Public Sub 技巧4_151()
Dim myRange As Range
Set myRange = Range("A1") '指定任意单元格
With myRange
.Value = "ExcelVBA实用技巧大全"
.HorizontalAlignment = xlRight
MsgBox "水平右对齐。"
.HorizontalAlignment = xlLeft
MsgBox "水 ...
ExtJs 4.0图表_jsp
- 博客分类:
- ExtJs
<%@ page language="java" contentType="text/html;charset=utf-8"
pageEncoding="utf-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Line Chart</title>
<!-- Ext ...
ExtJs 4.0图表访问sevlet
- 博客分类:
- ExtJs
Ext.require('Ext.chart.*');
Ext.require('Ext.layout.container.Fit');
Ext.require(['Ext.data.*']);
Ext.onReady(function() {
Ext.Loader.setConfig({
enabled : true
});
Ext.define("stat", {
extend : "Ext.data.Model",
fields : [{
name : 'name'
...
类Ext.MessageBox
- 博客分类:
- ExtJs
用来生成不同样式的消息框的实用类。还可以使用它的别名Ext.Msg。Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.
需要注意的是 MessageBox 对象是异步的。不同于 JavaScript中原生的alert(它会暂停浏览器的执行),显示 MessageBox 不会中断代码的运行。由于这个原因,如果你的代码需要在用户对 MessageBox 做出反馈之后执行,则必须用到回调函数(详情可见show方法中的function参数)。Note ...