import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
public class FindDates
{
public static void main(String[] args) throws
Exception
{
Calendar cal = Calendar.getInstance();
String start = '2012-02-01';
String end = '2012-03-02';
SimpleDateFormat sdf = new
SimpleDateFormat('yyyy-MM-dd');
Date dBegin = sdf.parse(start);
Date dEnd = sdf.parse(end);
List<Date> lDate = findDates(dBegin, dEnd);
for (Date date : lDate)
{
System.out.println(sdf.format(date));
}
}
public static List<Date> findDates(Date dBegin, Date
dEnd)
{
List lDate = new ArrayList();
lDate.ad
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
public class ReadBig
{
public static void MappedByteBuffer(String fff) throws
Exception
{
final int BUFFER_SIZE = 0x300000;// 缓冲区大小为3M
File f = new File(fff);
MappedByteBuffer inputBuffer = new RandomAccessFile(f,
'r').getChannel().map(FileChannel.MapMode.READ_ONLY, 0,
f.length());
byte[] dst = new byte[BUFFER_SIZE];// 每次读出3M的内容
for (int offset = 0; offset <
inputBuffer.capacity(); offset += BUFFER_SIZE)
{
if (inputBuffer.capacity() - offset >=
BUFFER_SIZE)
{
for (int i = 0; i < BUFFER_SIZE;
i++)
package com;
import java.util.Timer;
import java.util.TimerTask;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
//第一步:创建一个任务管理类,实现ServletContextListener接口
public class TaskManager implements ServletContextListener
{
public static final long PERIOD_DAY = 86400000L;//
DateUtils.MILLIS_IN_DAY;
public static final long PERIOD_WEEK = PERIOD_DAY * 7;
public static final long NO_DELAY = 0;
private Timer timer;
private static Log log =
LogFactory.getLog(TaskManager.class);
public void contextInitialized(ServletContextEvent
event)
{
log.debug('开始创建任务...');
// 定义定时器
timer = new Timer(
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
public class Zip
{
public static void main(String args[]) throws
IOException
{
String src[] =
{ 'D:\\ddd.xls',
'D:\\eee.doc' ,'D:\\zip\\Clocker.java'};
test1(src,
'd:\\aaa.zip');
}
public static void test1(String src[], String
dist) throws IOException
{
ZipOutputStream zos = new
ZipOutputStream(new FileOutputStream(dist));
zos.setComment('none');//
设置注释
&nbs
1、创建页面
<html>
<head>
<meta http-equiv='Content-Type' content='text/html;
charset=utf-8'>
<title>Office在线编辑</title>
</head>
<body>
<script language='javascript'>
function CreateDoc()
{
document.all.OA1.CreateNew(
'Word.Document');
}
function CreateExcel()
{
document.all.OA1.CreateNew(
'Excel.Sheet');
}
function CreatePPT()
{
document.all.OA1.CreateNew(
'PowerPoint.Slide');
}
function OpenFromLocal()
{
document.all.OA1.OpenLocalDialog();
}
function ShowToolbars()
{
var x =
document.all.OA1.GetToolbarsIsShow();
document.all.OA1.ShowToolbars
<html>
<head>
<title>大屏幕显示</title>
<meta http-equiv='refresh'
content='600'></meta>
</head>
<body topmargin='0' bgcolor='black'>
<br>
<marquee direction='left'
behavior='alternate'>
<center><h1
style='color=red;font-family=黑体'>甘孜州劳动力市场求职用工登记信息</h1></center>
</marquee>
&nb
<HTML>
<HEAD>
<TITLE>获取客户端硬件信息与执行客户端程序</TITLE>
<META http-equiv=Content-Type content='text/html;
charset=gb2312'>
<SCRIPT language=JScript
event=OnObjectReady(objObject,objAsyncContext) for=foo>
if(objObject.IPEnabled!=null&&objObject.IPEnabled!='undefined'&&objObject.IPEnabled==true)
{
if(objObject.MACAddress !=
null && objObject.MACAddress != 'undefined')
MACAddr =
objObject.MACAddress;
if(objObject.IPEnabled
&& objObject.IPAddress(0) != null &&
objObject.IPAddress(0) != 'undefined')
IPAddr =
objObject.IPAddress(0);
if(objObject.DNSHostNam
(2011-10-12 13:04)
Liferay portal 5.2.3 开发环境搭建
<script>
document.onkeydown=function(evt)
{
var isie = (document.all) ?
true : false;
var key;
var
srcobj;
if (isie)