|
2010年1月16日
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();
}
}
新安装了一个FlexBuilder3
可是在运行 Application的时候 报出
CreateProcess: "%ProgramFiles%\Internet Explorer\iexplore.exe" G:\java\Flex\........html error=2
Error=2好像是Windows系统返回的错误
且不去管他. ~
打开Eclipse的--Preferences---General---Web Browser---将Default system Web browser 修改成Internet Explorer或Firefox
问题得以解决 `~
至此问题原因 也很明了
因为我的系统已经使用了很多年了~ Windows默认的是IE6吧~ 已经早就升级成了IE8 但是参数Default Web Browser应该还是指向IE6 , 所以出了问题~~
与Eclipse无关~~
下载地址:dl.google.com/chrome/install/472.53/chrome_installer.exe
472.53为Chrome版本号
set names 'utf8' ;
alter database databaseName character set utf8;
create database mydb character set utf8;
set character_set_client=utf8;
set character_set_connection=utf8;
set character_set_database=utf8;
set character_set_results=utf8;
set character_set_server=utf8;
set collation_connection=utf8_unicode_ci;
set collation_database=utf8_unicode_ci;
set collation_server=utf8_unicode_ci;
Unable to load configuration. - bean - jar:file:/F:/Web/homesite/jsp/struts/WEB-INF/lib/struts2-convention-plugin-2.1.8.jar!/struts-plugin.xml
Struts2下加载的架包:
一般有
:
commons-logging-1.0.4.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
struts2-core-2.1.8.jar
xwork-2.1.6.jar
freemarker-2.3.15.jar
ognl-2.7.3.jar
因为在32位操作系统上执行了如下的操作
alter system set sga_max_size=2G scope=spfile;
之后再重启数据库就会失败
报出错误:
ORA-27102
Out of Memory
解决的方法也很简单:
新建一个文本文件 如initaaa.ora
内容:
SPFILE='../product/10.2.0/db_1/dbs/spfileorcl.ora'
sga_max_size=1073741824
保存之后
如是启动数据库:
SQL>startup pfile=$ORACLE_HOME/dbs/initaaa.ora
启动成功之后就可以把之前的错误参数修改过来了
对于Spfile损坏或者丢失的情况
可以删除原来的Spfile,然后利用系统中备份的pfile 来创建一个新的Spfile
SQL>CREATE SPFILE FROM PFILE='.\pfile\init.ora.83200715416'
------------------------------------------------------------------------------------------------------------------------------------------------------
其他命令(转):
//查看Oracle以pfile还以Spfile方式启动
SQL>Select isspecified,count(*) from v$spparameter group by isspecified;
如果isspecified里有true,表明用spfile进行了指定配置
如果全为false,则表明用pfile启动
//查看Spfile的路径
SQL>show parameter spfile
//从spfile获取pfile
SQL>Create pfile='d:pfileSID.ora' from spfile;
SQL>Create pfile='d:pfileSID.ora' from spfile='spfile_location';
//从pfile获取spfile
SQL>Create spfile from pfile='Your_pfile_location'
SQL>Create spfile='spfile_location' from pfile='Your_pfile_location'
//动态修改参数
SQL>alter system set parameter=Value scope=spfile|both|memory
Startup nomount的时候需要读去spfile或pfile,两者共存,spfile优先
//强制用pfile启动
SQL>startup pfile='Your_Pfile.ora'
SQL>startup spfile='/data/oracle/product/10.2.0/db_1/dbs/dbs/spfile_mqq.ora' force
|