|
2010年5月6日
set d=%date:~0,10%
set d=%d:-=%
set d=%d: =0%
set t=%time:~0,8%
set t=%t::=%
set t=%t: =0%
echo "%p%%d%%t%"
pause
public static String getHexRGB(int x, int y, Robot robot) {
if (robot == null)
return "null";
Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
BufferedImage bi = robot.createScreenCapture(new Rectangle(0, 0,
dimension.width, dimension.height));
return Integer.toHexString(16777216 + bi.getRGB(x, y));
}
注册表:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon
DefaultUserName 值 为要登陆的用户名:
DefaultPassword 为你的密码:
AutoAdminLogon 值为1
修改注册表 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SysPlant下"Start" DWORD的值为"4"
import flash.utils.ByteArray;
function clone(source:Object):*
{
var myBA:ByteArray = new ByteArray();
myBA.writeObject(source);
myBA.position = 0;
return(myBA.readObject());
}
enum DatabaseProduct {
ACCESS,
UNKNOWN,
DERBY,
DB2_OLD_AS400,
DB2_AS400,
DB2,
FIREBIRD,
GREENPLUM,
HSQLDB,
INFORMIX,
INFOBRIGHT,
INGRES,
INTERBASE,
LUCIDDB,
MSSQL,
NETEZZA,
NEOVIEW,
ORACLE,
POSTGRESQL,
MYSQL,
SQLSTREAM,
SYBASE,
TERADATA,
VERTICA;
/**
* Return the root of the family of products this database product
* belongs to.
*
* <p>For {@link #DB2_AS400} and {@link #DB2_OLD_AS400} returns
* {@link #DB2}; for all other database products, returns the same
* product.
*
* @return root of family of database products
*/
public DatabaseProduct getFamily() {
switch (this) {
case DB2_OLD_AS400:
case DB2_AS400:
return DB2;
default:
return this;
}
}
}
net stop "sawjavahostsvc"
net stop "sawsvc"
net stop "Oracle BI Server"
echo 即将开启OracleBiee服务
pause
net start "sawjavahostsvc"
net start "sawsvc"
net start "Oracle BI Server"
private static String[] COLOR = { "'AFD8F8'", "'F6BD0F'", "'8BBA00'",
"'FF8E46'", "'008E8E'", "'D64646'", "'8E468E'", "'588526'",
"'B3AA00'", "'008ED6'", "'9D080D'", "'A186BE'" };
服务端代码:
@Action(value = "/imageload")
public String imageLoad ()throws Exception {
File f = new File ("d:/down.jpg");
FileInputStream in = new FileInputStream (f);
byte[] b = new byte[in.available()];
in.read(b);
HttpServletResponse response = ServletActionContext.getResponse();
// response.setCharacterEncoding("UTF-8");
response.setContentType("image");
OutputStream pwt = response.getOutputStream();
pwt.write(b);
pwt.flush();
pwt.close();
return null;
}
客户端代码:
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
</head>
<body>
<img id="img1" src=""></img>
<script type="text/javascript">
function load() {
$('#img1').attr('src', 'subject/imageload.action');
}
</script>
<button onclick=load();>点击获取</button>
</body>
</html>
问题又始于IE与Firefox
试问你用一个最新版的Firefox去与远古级的IE6做比较有意义么,
可是偏偏有许多人喜欢这么去比较,借此来宣传Firefox.
马克思说了很多费话,但还是有一句说的蛮对的,我们要辩证地看待事物.
刘翔他跑了世界冠军破了世界纪录也与我无关,
临场退赛也与我无关,他跑了第一也不代表黄种人就怎么怎么样了
我一直用IE 我也用Firefox 我也用Chrome 我也用Safari
我也不用杀毒软件,我也不中木马病毒.
我就知道,倒卖大蒜,白痴都能挣钱,我也知道,程序员同样龙鱼混杂.我们很少听到龙啸,看到的都是鱼在冒泡.
每天都是IE与Firefox ,Windows与Linux, C与Java
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Main {
/** *//**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Main
.ListFilesInDirectory("E://WorkShop/source");
}
static void ListFilesInDirectory(String path) {
File file = new File(path);
File[] files = file.listFiles();
for (File fl : files) {
if (fl.isDirectory())
ListFilesInDirectory(fl.toString());
else {
if (fl.getName().endsWith("java")) {
System.out.println(fl.getName());
try {
Main.ReadFile(fl);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
}
public static void ReadFile(File f) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(
new FileInputStream(f)));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(
new FileOutputStream(new File("d://output1.txt"), true)));
String tmp = new String();
while ((tmp = br.readLine()) != null) {
if (tmp.matches("\\s+") || tmp.length() == 0)
continue;
if (tmp.matches("^\\s*(/\\*).*") || tmp.matches("^\\s*\\*.*")||tmp.matches("^\\s*//.*")
|| tmp.matches("^\\s+\\*/.*")){
continue;
}
bw.write(tmp);
bw.newLine();
}
br.close();
bw.close();
}
}
|