查看object的script的function:dbms_metadata.get_ddl()
SQL> select dbms_metadata.get_ddl('TABLE','T') from dual 2 /DBMS_METADATA.GET_DDL('TABLE','T')--------------------------------------------------------------------- CREATE TABLE "PROC"."T" ( "TS" TIMESTAMP (6), "TS_TZ" TIMESTAMP (6) WIT已用时间: 00: 00: 07.26SQL>[@more@]
查看unix/liunx系统的cpu数
linux : cat /proc/cpuinfo|grep processor|wc -lsolaris : prsinfo -v|grep -i "status of processor"|wc =lIBM - AIX: lsdev -C|grep -i process|wc -lHP -UN: ioscan -C processor|grep -i processor|wc -l[@more@]
使用校验方法控制lock
校验函数:dbms_crypto.hash[@more@] 1 begin 2 for x in( select deptno,dname,loc from dept where deptno = 10) 3 loop 4 dbms_output.put_line('Dname: '||x.dname); 5 dbms_output.put_line('dname: '||x.dname); 6 dbms_output.put_line('Hash: '||dbms_crypto.hash(utl_raw.cast_to_raw(x.deptno||'/'||x.dname||'/'||x.loc),dbms_crypto.hash_sh1)); 7 end loop; 8* end;SQL> /PL/SQL 过程已成功完成。已用时间: 00: 00: 00.53SQL> set serveroutput onSQL>
使用perl读取生成excel表格
在Linux或者Unix上操作(生成)Excel,怎么说都是比较困难的困难的事情。CPAN上提供了Spreadsheet::WriteExcel 和 Spreadsheet::ParseExcel这两个模块。下面我们就来看看 Spreadsheet::WriteExcel 和 Spreadsheet::ParseExcel的使用方法:[@more@]1、首先,我们要在服务器上安装相应的模块安装 Excel 模块的 PPM 命令 ppm> install OLE::Storage_Lite ppm> install Spreadsheet::ParseExcel ppm> install Spreadsheet::WriteExcel ppm> install OLE::Storage_Liteppm> install Spreadsheet::ParseExcelppm> install Spr
date -d选项用法
date -d选项可以进行日期运算,用法如下:前一天date +%Y%m%d -d "20090703 +1day"后一天date +%Y%m%d -d "20090703 -1day"前一年date +%Y%m%d -d "20090703 -1year"date +%Y%m%d -d "2007/02/12 -1 month -1 year -24 day "[@more@]
删除文件名含有特殊字符的文件
删除文件名含有特殊字符的文件[@more@]1. 文件名含有特殊字符,直接使用 rm 可能删除不了,可以使用如下方法:1) 使用 ls -i 查处该文件的 inode 号,假设为6543212) 使用find命令删除 find ./ -inum 654321 -ok rm '{}' ;2. 如果文件名是以 - 连字符开头的,可以使用如下方法来删除,如删除 "-filename" 文件:rm -- -filenamerm ./-filename
转:getchar()和EOF总结
getchar()和EOF总结[@more@]一、getchar的两点总结: 1.getchar是以行为单位进行存取的。 当用getchar进行输入时,如果输入的第一个字符为有效字符(即输入是文件结束符EOF,Windows下为组合键Ctrl+Z, Unix/Linux下为组合键Ctrl+D),那么只有当最后一个输入字符为换行符'/n'(也可以是文件结束符EOF,EOF将在后面讨论)时, getchar才会停止执行,整个程序将会往下执行。譬如下面程序段: while((c = getchar()) != EOF) { putchar(c); } 执行程序,输入:abc,然后回车。则程序就会去执行puchar(c),然后输出abc,这个地方不要
int 和 String 互相转换的多种方法
1 如何将字串 String 转换成整数 int? A. 有两个方法: 1). int i = Integer.parseInt([String]); 或 i = Integer.parseInt([String],[int radix]); 2). int i = Integer.valueOf(my_str).intValue(); 注: 字串转成 Double, Float, Long 的方法大同小异. 2 如何将整数 int 转换成字串 String ? A. 有叁种方法: 1.) String s = String.valueOf(i); 2.) String s = Integer.toString(i); 3.) String s = "" + i; 注: Double, Float, Long 转成字串的方法大同小异.[@more@]