查看被锁的表
select p.spid,a.serial#, c.object_name,b.session_id,b.oracle_username,b.os_user_name from v$process p,v$session a, v$locked_object b,all_objects c where p.addr=a.paddr and a.process=b.process and c.object_id=b.object_id
查看连接的进程
SELECT sid, serial#, usernam ...
引用
1. MySQL(http://www.mysql.com)mm.mysql-2.0.2-bin.jar
Class.forName( "org.gjt.mm.mysql.Driver" );
cn = DriverManager.getConnection( "jdbc:mysql://MyDbComputerNameOrIP:3306/myDatabaseName", sUsr, sPwd );
2. PostgreSQL(http://www.de.postgresql.org)pgjdbc2.jar
Class.forName( "org.po ...
引用 Oracle关于时间/日期的操作
1.日期时间间隔操作
当前时间减去7分钟的时间
select sysdate,sysdate - interval '7' MINUTE from dual
当前时间减去7小时的时间
select sysdate - interval '7' hour from dual
当前时间减去7天的时间
select sysdate - interval '7' day from dual
当前时间减去7月的时间
select sysdate,sysdate - interval '7' month fro ...
引用ORACLE的简单介绍
ORACLE公司是一家提供综合技术产品、方案、服务的数据库公司
ORACLE数据库设计成可大量存储数据,快速查询数据,保证数据的安全和一致性,
跨网络的分布式管理及客户-服务器的配置等。
ORACLE SQL语法符合ANSI 1986标准
SQL 和数据库交流的命令式语言
SQL*PLUS ORACLE的一种工具, 用来运行SQL和PL/SQL语句
PL/SQL ORACLE的过程化编程语言
一、选择行
1. 简单的SELECT 语句
SELECT [DISTINCT] {*,COLUMN [ALIAS], ……} FROM table_name;
字段的 ...
来自:http://www.knowsky.com/344062.html
CREATE Procedure MoneytoChinese22 --阿拉伯数字金额转换为中文大写
@ChangeMoney Money ,@ReturnDaXie varchar(50) output
as
Set Nocount ON
Declare @String1 char(20)
Declare @String2 char(30)
Declare @String4 Varchar(100)
Declare @String3 Varchar(100) --从原A值中取出的值
Declare @i ...
来自:http://www.knowsky.com/344051.html
1.绝对值
S:select abs(-1) value
O:select abs(-1) value from dual
2.取整(大)
S:select ceiling(-1.001) value
O:select ceil(-1.001) value from dual
3.取整(小)
S:select floor(-1.001) value
O:select floor(-1.001) value from dual
4.取整(截取)
S:select cast(-1.002 as int) ...
<bean id="jotm" class="org.springframework.transaction.jta.JotmFactoryBean"/>
<bean id="jtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="userTransaction" ref="jotm"/>
</bean>
<bean id="innerDataSource" class= ...
import java.util.Properties;
import javax.mail.Authenticator;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.MimeMessage;
import org.springframework.mail.MailException;
i ...
两种方法
1。在一个数组中
int[] aa = new int[]{1,2,3,4,5};
int ii = 3;
if (Arrays.binarySearch(aa,ii) >= 0) {
}
2。在一个list中
List aaList = new ArrayList();
aaList.add(new Integer(0));
aaList.add(new Integer(1));
aaList.add(new Integer(2));
Integer aaInt = new Integer(3);
if (aaList.contains( ...
来自 javaeye
public static String getCaller(){
int i;
StackTraceElement stack[] = (new Throwable()).getStackTrace();
for (i=0; i < stack.length; i++) {
StackTraceElement ste=stack[i];
System.out.println(ste.getClassName()+"."+ste.getMethodName()+"(...)");
...
很久以前弄的了 那时候还不会debug 现在嘛........谁知道呢 或许以后会用得到
public static void printSession(HttpServletRequest _req) {
System.out.println("=======================sessionID="+_req.getSession().getId());
for (Enumeration _em = _req.getSession().getAttributeNames(); _em.hasMoreElements();) {
String p ...
这个是好久以前留下来的 现在回头一看 实在是.........
public static String getCharset() {
return "iso-2022-jp";
}
public String iso2gb(String qs) {
try {
if (qs == null)
return "NULL";
else {
return new String(qs.getBytes("iso-8859-1"), "gb2312");
}
}
catch (Exception e) {
...
其中的this为要clone对象
public Object deepClone()
throws IOException, ClassNotFoundException {
//将对象写入流
ByteArrayOutputStream bo =
new ByteArrayOutputStream();
ObjectOutputStream oo =
new ObjectOutputStream(bo);
oo.writeObject( ...
来自 javaeye
import java.util.StringTokenizer;
public class Test{
public static final String SEPARATORS = " ,\t:'';?!";
public static String reverse(String input){
StringTokenizer st = new StringTokenizer(input, SEPARATORS, true);
StringBuffer words = ne ...
通过Struts 1.2提供的validwhen 验证器可以轻松的创建更加复杂灵活的表单验证。
比如说,我们要验证用户两次输入的密码是否相同,或是只有当用户填写表单项“姓氏”时,表单项“名字”才是必须的。
validwhen 需要声明一个叫test的var字段,这个变量的值是一个布尔型的表达式,比如:
<var-name>test</var-name>
<var-value>((orderLines[].partNumber == null) or (*this* != null))</var-value>
当布尔型表达式返回true时,验证 ...
public static String halfToFullWidth(Object halfWidthObj) throws ConfigurationException {
String halfStr = "";
StringBuffer fullStr = new StringBuffer();
if (null == halfWidthObj) {
return "";
}
else {
halfStr = halfWidthObj.toString();
}
getConfig();
// half ...
来自:http://www.hellohiro.com/timezone.htm
◆現在のデフォルトのタイムゾーンの情報の表示
import java.util.TimeZone;
public class ShowDefaultTimeZone {
public static void main(String[] args) {
// 現在のデフォルトのタイムゾーンを取得します
TimeZone timezone = TimeZone.getDefault();
// タイムゾーンの情報を表示します
System.out.println( ...
public Map NullConvertEmptyForMap(Map map) {
Map convertedMap = null;
Set mapset = map.entrySet();
String EMPTYSTR = "";
if (map != null) {
convertedMap = new HashMap();
for (Iterator it = mapset.iterator(); it.hasNext();) {
Entry entry = (Entry) it.next();
if (entry ...
public static String loadAFileToStringDE1(File f) throws IOException {
long beginTime = System.currentTimeMillis();
InputStream is = null;
String ret = null;
try {
is = new BufferedInputStream( new FileInputStream(f) );
long content ...
来自javaeye
import embedded.EmbeddedTomcatLauncher;
public class MyTomcatLauncher extends EmbeddedTomcatLauncher {
public static void main(String[] args) {
//开始运行嵌入式Tomcat,狠简单,就new一下当前类然后startTomcat()就行
new MyTomcatLauncher().startTomcat();
}
//这里返回你要加载的项目的 ...
File inputFile = new File("C:\\0001.DAT");
File outputFile = new File("C:\\0002.DAT");
FileInputStream in;
FileInputStream out;
try {
in = new FileInputStream(inputFile);
out = new FileInputStream(outputFile);
int i;
int j = 0;
while ((i = in.read()) != -1) ...
- 浏览: 98303 次
- 性别:

- 来自: 目前東京

- 详细资料
搜索本博客
我的相册
2008-07-04_154602
共 64 张
共 64 张
最近加入圈子
最新评论
-
用Proxomitron做的百度贴 ...
偶像啊!!
-- by hazzy -
介绍Proxomitron的使用
你好强啊,居然会写这样的东西
-- by hazzy -
我机器里的软件
Notepad++作者已经明确的表态要抵制北京奥运http://notepad- ...
-- by todayz -
那一晚的那个小LOLI
好好好......... 我换...........
-- by ddandyy -
那一晚的那个小LOLI
你这标题越换越没人看,怎么就不听我的建议呢?
-- by hazzy






评论排行榜