示例一

该脚本需区分 对象的管理方式是 自动还是 手动, 对手动管理方式 的表显示很全面

SQL> exec show_space_old('MAN_TAB','DEV','TABLE');

Free Blocks.............................4

Total Blocks............................2560

Total bytes.............................20971520

Unused Blocks...........................98

Unused bytes............................802816

Last Used Ext Fileid....................5

Last Used Ext Blocked...................7296

Last Used Block.........................30

SQL>  exec show_space_old('AUTO_TAB','DEV','TABLE');

BEGIN show_space_old('AUTO_TAB','DEV','TABLE'); END;

*

ERROR at line 1:

ORA-10618: Operation not allowed on this segment

ORA-06512: at "SYS.DBMS_SPACE", line 191

ORA-06512: at "DEV.SHOW_SPACE_OLD", line 21

ORA-06512: at line 1

Show_space_old,脚本如下:

create or replace procedure show_space_old (

p_segname in varchar2,

p_owner in varchar2 default 'dev',

p_type in varchar2 default 'TABLE',

p_partition in varchar2 default null)

as

l_free_blks number;

l_total_blocks number;

l_total_bytes number;

l_unused_blocks number;

l_unused_bytes number;

l_lastusedextfileid number;

l_lastusedextblockid number;

l_last_used_block number;

procedure p(p_label in varchar2,p_num in number)

is

begin

dbms_output.put_line(rpad(p_label,40,'.')||p_num);

end;

begin

dbms_space.free_blocks(

segment_owner=> p_owner,

segment_name=> p_segname,

segment_type=> p_type,

partition_name=> p_partition,

freelist_group_id=> 0,

free_blks=> l_free_blks);

dbms_space.unused_space(

segment_owner => p_owner,

segment_name => p_segname,

segment_type =>  p_type,

partition_name => p_partition,

total_blocks => l_total_blocks,

total_bytes => l_total_bytes,

unused_blocks => l_unused_blocks,

unused_bytes => l_unused_bytes,

last_used_extent_file_id => l_lastusedextfileid,

last_used_extent_block_id => l_lastusedextblockid,

last_used_block =>l_last_used_block);

p('Free Blocks',l_free_blks);

p('Total Blocks',l_total_blocks);

p('Total bytes',l_total_bytes);

p('Unused Blocks',l_unused_blocks);

p('Unused bytes',l_unused_bytes);

p('Last Used Ext Fileid',l_lastusedextfileid);

p('Last Used Ext Blocked',l_lastusedextblockid);

p('Last Used Block',l_last_used_block);

end show_space_old;

示例二

该脚本需区分 对象的管理方式是 自动还是 手动,对 自动管理方式 的表显示很全面

SQL> exec show_space_1810('MAN_TAB','DEV','TABLE');

Total Blocks............................2560

Total Bytes.............................20971520

Unused Blocks...........................98

Unused Bytes............................802816

Last Used Ext FileId....................5

Last Used Ext BlockId...................7296

Last Used Block.........................30

BEGIN show_space_1810('MAN_TAB','DEV','TABLE'); END;

*

ERROR at line 1:

ORA-10614: Operation not allowed on this segment

ORA-06512: at "SYS.DBMS_SPACE", line 214

ORA-06512: at "DEV.SHOW_SPACE_1810", line 93

ORA-06512: at line 1

SQL> exec show_space_1810('AUTO_TAB','DEV','TABLE');

Total Blocks............................3840

Total Bytes.............................31457280

Unused Blocks...........................0

Unused Bytes............................0

Last Used Ext FileId....................4

Last Used Ext BlockId...................4224

Last Used Block.........................128

*************************************************

The segment is analyzed

0% -- 25% free space blocks.............3

0% -- 25% free space bytes..............24576

25% -- 50% free space blocks............1

25% -- 50% free space bytes.............8192

50% -- 75% free space blocks............0

50% -- 75% free space bytes.............0

75% -- 100% free space blocks...........23

75% -- 100% free space bytes............188416

Unused Blocks...........................62

Unused Bytes............................507904

Total Blocks............................3683

Total bytes.............................30171136

Show_space_1810,脚本如下:

create or replace procedure show_space_1810

( p_segname_1 in varchar2,

p_owner_1 in varchar2 default user,

p_type_1 in varchar2 default 'TABLE',

p_space in varchar2 default 'AUTO',

p_analyzed in varchar2 default 'Y'

)

as

p_segname varchar2(100);

p_type varchar2(10);

p_owner varchar2(30);

l_unformatted_blocks number;

l_unformatted_bytes number;

l_fs1_blocks number;

l_fs1_bytes number;

l_fs2_blocks number;

l_fs2_bytes number;

l_fs3_blocks number;

l_fs3_bytes number;

l_fs4_blocks number;

l_fs4_bytes number;

l_full_blocks number;

l_full_bytes number;

l_free_blks number;

l_total_blocks number;

l_total_bytes number;

l_unused_blocks number;

l_unused_bytes number;

l_LastUsedExtFileId number;

l_LastUsedExtBlockId number;

l_LAST_USED_BLOCK number;

procedure p( p_label in varchar2, p_num in number )

is

begin

dbms_output.put_line( rpad(p_label,40,'.') ||

p_num );

end;

begin

p_segname := upper(p_segname_1); -- rainy changed

p_owner := upper(p_owner_1);

p_type := p_type_1;

if (p_type_1 = 'i' or p_type_1 = 'I') then --rainy changed

p_type := 'INDEX';

end if;

if (p_type_1 = 't' or p_type_1 = 'T') then --rainy changed

p_type := 'TABLE';

end if;

if (p_type_1 = 'c' or p_type_1 = 'C') then --rainy changed

p_type := 'CLUSTER';

end if;

dbms_space.unused_space

( segment_owner => p_owner,

segment_name => p_segname,

segment_type => p_type,

total_blocks => l_total_blocks,

total_bytes => l_total_bytes,

unused_blocks => l_unused_blocks,

unused_bytes => l_unused_bytes,

LAST_USED_EXTENT_FILE_ID => l_LastUsedExtFileId,

LAST_USED_EXTENT_BLOCK_ID => l_LastUsedExtBlockId,

LAST_USED_BLOCK => l_LAST_USED_BLOCK );

if p_space = 'MANUAL' or (p_space <> 'auto' and p_space <> 'AUTO') then

dbms_space.free_blocks

( segment_owner => p_owner,

segment_name => p_segname,

segment_type => p_type,

freelist_group_id => 0,

free_blks => l_free_blks );

p( 'Free Blocks', l_free_blks );

end if;

p( 'Total Blocks', l_total_blocks );

p( 'Total Bytes', l_total_bytes );

p( 'Unused Blocks', l_unused_blocks );

p( 'Unused Bytes', l_unused_bytes );

p( 'Last Used Ext FileId', l_LastUsedExtFileId );

p( 'Last Used Ext BlockId', l_LastUsedExtBlockId );

p( 'Last Used Block', l_LAST_USED_BLOCK );

/*IF the segment is analyzed */

if p_analyzed = 'Y' then

dbms_space.space_usage(segment_owner => p_owner ,

segment_name => p_segname ,

segment_type => p_type ,

unformatted_blocks => l_unformatted_blocks ,

unformatted_bytes => l_unformatted_bytes,

fs1_blocks => l_fs1_blocks,

fs1_bytes => l_fs1_bytes ,

fs2_blocks => l_fs2_blocks,

fs2_bytes => l_fs2_bytes,

fs3_blocks => l_fs3_blocks ,

fs3_bytes => l_fs3_bytes,

fs4_blocks => l_fs4_blocks,

fs4_bytes => l_fs4_bytes,

full_blocks => l_full_blocks,

full_bytes => l_full_bytes);

dbms_output.put_line(rpad(' ',50,'*'));

dbms_output.put_line('The segment is analyzed');

p( '0% -- 25% free space blocks', l_fs1_blocks);

p( '0% -- 25% free space bytes', l_fs1_bytes);

p( '25% -- 50% free space blocks', l_fs2_blocks);

p( '25% -- 50% free space bytes', l_fs2_bytes);

p( '50% -- 75% free space blocks', l_fs3_blocks);

p( '50% -- 75% free space bytes', l_fs3_bytes);

p( '75% -- 100% free space blocks', l_fs4_blocks);

p( '75% -- 100% free space bytes', l_fs4_bytes);

p( 'Unused Blocks', l_unformatted_blocks );

p( 'Unused Bytes', l_unformatted_bytes );

p( 'Total Blocks', l_full_blocks);

p( 'Total bytes', l_full_bytes);

end if;

end show_space_1810;

**************************** 3 **************************************

示例三

该脚本需 区分 对象的管理方式是 自动还是 手动,只对管理方式是 手动管理 的表有效

SQL> exec show_space('MAN_TAB','DEV','TABLE');

Free Blocks.............................4

Total Blocks............................2560

Total bytes.............................20971520

Unused Blocks...........................98

Unused bytes............................802816

Last Used Ext Fileid....................5

Last Used Ext Blocked...................7296

Last Used Block.........................30

PL/SQL procedure successfully completed.

SQL> exec show_space('AUTO_TAB','DEV','TABLE');

BEGIN show_space('AUTO_TAB','DEV','TABLE'); END;

*

ERROR at line 1:

ORA-10618: Operation not allowed on this segment

ORA-06512: at "SYS.DBMS_SPACE", line 191

ORA-06512: at "DEV.SHOW_SPACE", line 21

ORA-06512: at line 1

Show_space脚本,如下:

create or replace procedure show_space (

p_segname in varchar2,

p_owner in varchar2 default 'dev',

p_type in varchar2 default 'TABLE',

p_partition in varchar2 default null)

as

l_free_blks number;

l_total_blocks number;

l_total_bytes number;

l_unused_blocks number;

l_unused_bytes number;

l_lastusedextfileid number;

l_lastusedextblockid number;

l_last_used_block number;

procedure p(p_label in varchar2,p_num in number)

is

begin

dbms_output.put_line(rpad(p_label,40,'.')||p_num);

end;

begin

dbms_space.free_blocks(

segment_owner=> p_owner,

segment_name=> p_segname,

segment_type=> p_type,

partition_name=> p_partition,

freelist_group_id=> 0,

free_blks=> l_free_blks);

dbms_space.unused_space(

segment_owner => p_owner,

segment_name => p_segname,

segment_type =>  p_type,

partition_name => p_partition,

total_blocks => l_total_blocks,

total_bytes => l_total_bytes,

unused_blocks => l_unused_blocks,

unused_bytes => l_unused_bytes,

last_used_extent_file_id => l_lastusedextfileid,

last_used_extent_block_id => l_lastusedextblockid,

last_used_block =>l_last_used_block);

p('Free Blocks',l_free_blks);

p('Total Blocks',l_total_blocks);

p('Total bytes',l_total_bytes);

p('Unused Blocks',l_unused_blocks);

p('Unused bytes',l_unused_bytes);

p('Last Used Ext Fileid',l_lastusedextfileid);

p('Last Used Ext Blocked',l_lastusedextblockid);

p('Last Used Block',l_last_used_block);

end show_space;

**************************** 4 **************************************

示例四

该脚本不需 区分 对象的管理方式是 自动还是 手动,确实很智能

SQL> exec show_space_1052(P_SEGNAME_1=>'MAN_TAB',P_TYPE_1=>'TABLE',P_OWNER_1=>'DEV');

Free Blocks.............................4

Total Blocks............................2560

Total Bytes.............................20971520

Unused Blocks...........................98

Unused Bytes............................802816

Last Used Ext FileId....................5

Last Used Ext BlockId...................7296

Last Used Block.........................30

SQL> exec show_space_1052(P_SEGNAME_1=>'AUTO_TAB',P_TYPE_1=>'TABLE',P_OWNER_1=>'DEV');

Total Blocks............................3840

Total Bytes.............................31457280

Unused Blocks...........................0

Unused Bytes............................0

Last Used Ext FileId....................4

Last Used Ext BlockId...................4224

Last Used Block.........................128

执行该脚本,需要事先 授予 对象的 select权限,如下

SQL> grant select on dba_segments  to public;

Grant succeeded.

SQL> grant select on dba_tablespaces to public;

Grant succeeded.

SQL> grant select on dba_tablespaces to dev;

Grant succeeded.

SQL> grant select on dba_segments  to  dev;

Grant succeeded.

show_space_1052脚本如下:

create or replace procedure show_space_1052

( p_segname_1 in varchar2,

p_type_1 in varchar2 default 'TABLE' ,

p_analyzed in varchar2 default 'N',

p_owner_1 in varchar2 default user)

authid current_user

as

p_segname varchar2(100);

p_type varchar2(10);

p_owner varchar2(30);

p_space varchar2(10);

l_unformatted_blocks number;

l_unformatted_bytes number;

l_fs1_blocks number;

l_fs1_bytes number;

l_fs2_blocks number;

l_fs2_bytes number;

l_fs3_blocks number;

l_fs3_bytes number;

l_fs4_blocks number;

l_fs4_bytes number;

l_full_blocks number;

l_full_bytes number;

l_free_blks number;

l_total_blocks number;

l_total_bytes number;

l_unused_blocks number;

l_unused_bytes number;

l_LastUsedExtFileId number;

l_LastUsedExtBlockId number;

l_LAST_USED_BLOCK number;

procedure p( p_label in varchar2, p_num in number )

is

begin

dbms_output.put_line( rpad(p_label,40,'.') ||

p_num );

end;

begin

p_segname := upper(p_segname_1); -- rainy changed

p_owner := upper(p_owner_1);

p_type := p_type_1;

if (p_type_1 = 'i' or p_type_1 = 'I') then --rainy changed

p_type := 'INDEX';

end if;

if (p_type_1 = 't' or p_type_1 = 'T') then --rainy changed

p_type := 'TABLE';

end if;

if (p_type_1 = 'c' or p_type_1 = 'C') then --rainy changed

p_type := 'CLUSTER';

end if;

select t.segment_space_management into p_space

from dba_tablespaces t , dba_segments s

where s.tablespace_name = t.tablespace_name

and s.segment_name = p_segname

and s.owner = p_owner

and s.segment_type = p_type ; -- RollingPig change it.

-- if you compile with error,you may login with sys and grant select on dba_tablespace,dba_segments to current_user

dbms_space.unused_space

( segment_owner => p_owner,

segment_name => p_segname,

segment_type => p_type,

total_blocks => l_total_blocks,

total_bytes => l_total_bytes,

unused_blocks => l_unused_blocks,

unused_bytes => l_unused_bytes,

LAST_USED_EXTENT_FILE_ID => l_LastUsedExtFileId,

LAST_USED_EXTENT_BLOCK_ID => l_LastUsedExtBlockId,

LAST_USED_BLOCK => l_LAST_USED_BLOCK );

if p_space = 'MANUAL' or (p_space <> 'auto' and p_space <> 'AUTO') then

dbms_space.free_blocks

( segment_owner => p_owner,

segment_name => p_segname,

segment_type => p_type,

freelist_group_id => 0,

free_blks => l_free_blks );

p( 'Free Blocks', l_free_blks );

end if;

p( 'Total Blocks', l_total_blocks );

p( 'Total Bytes', l_total_bytes );

p( 'Unused Blocks', l_unused_blocks );

p( 'Unused Bytes', l_unused_bytes );

p( 'Last Used Ext FileId', l_LastUsedExtFileId );

p( 'Last Used Ext BlockId', l_LastUsedExtBlockId );

p( 'Last Used Block', l_LAST_USED_BLOCK );

/*IF the segment is analyzed */

if p_analyzed = 'Y' then

dbms_space.space_usage(segment_owner => p_owner ,

segment_name => p_segname ,

segment_type => p_type ,

unformatted_blocks => l_unformatted_blocks ,

unformatted_bytes => l_unformatted_bytes,

fs1_blocks => l_fs1_blocks,

fs1_bytes => l_fs1_bytes ,

fs2_blocks => l_fs2_blocks,

fs2_bytes => l_fs2_bytes,

fs3_blocks => l_fs3_blocks ,

fs3_bytes => l_fs3_bytes,

fs4_blocks => l_fs4_blocks,

fs4_bytes => l_fs4_bytes,

full_blocks => l_full_blocks,

full_bytes => l_full_bytes);

dbms_output.put_line(rpad(' ',50,'*'));

dbms_output.put_line('The segment is analyzed');

p( '0% -- 25% free space blocks', l_fs1_blocks);

p( '0% -- 25% free space bytes', l_fs1_bytes);

p( '25% -- 50% free space blocks', l_fs2_blocks);

p( '25% -- 50% free space bytes', l_fs2_bytes);

p( '50% -- 75% free space blocks', l_fs3_blocks);

p( '50% -- 75% free space bytes', l_fs3_bytes);

p( '75% -- 100% free space blocks', l_fs4_blocks);

p( '75% -- 100% free space bytes', l_fs4_bytes);

p( 'Unused Blocks', l_unformatted_blocks );

p( 'Unused Bytes', l_unformatted_bytes );

p( 'Total Blocks', l_full_blocks);

p( 'Total bytes', l_full_bytes);

end if;

end show_space_1052;

示例五

该脚本不需 区分 对象的管理方式是 自动还是 手动,确实很智能,只是简单的 把 输入参数 upper处理下

SQL> exec show_space_1052(P_SEGNAME=>'MAN_TAB',P_TYPE=>'TABLE',P_OWNER=>'DEV');

Free Blocks.............................4

Total Blocks............................2560

Total Bytes.............................20971520

Unused Blocks...........................98

Unused Bytes............................802816

Last Used Ext FileId....................5

Last Used Ext BlockId...................7296

Last Used Block.........................30

SQL> exec show_space_1052(P_SEGNAME_1=>'AUTO_TAB',P_TYPE_1=>'TABLE',P_OWNER_1=>'DEV');

Total Blocks............................3840

Total Bytes.............................31457280

Unused Blocks...........................0

Unused Bytes............................0

Last Used Ext FileId....................4

Last Used Ext BlockId...................4224

Last Used Block.........................128

执行该脚本,需要事先 授予 对象的 select权限,如下

SQL> grant select on dba_segments  to public;

Grant succeeded.

SQL> grant select on dba_tablespaces to public;

Grant succeeded.

SQL> grant select on dba_tablespaces to dev;

Grant succeeded.

SQL> grant select on dba_segments  to  dev;

Grant succeeded.

show_space_1052脚本如下:  只是稍微修改下,把输入参数 upper 处理

create or replace procedure show_space_1052

( p_segname in varchar2,

p_type in varchar2 default 'TABLE' ,

p_analyzed in varchar2 default 'N',

p_owner in varchar2 default user)

authid current_user

as

p_segname varchar2(100);

p_type varchar2(10);

p_owner varchar2(30);

p_space varchar2(10);

l_unformatted_blocks number;

l_unformatted_bytes number;

l_fs1_blocks number;

l_fs1_bytes number;

l_fs2_blocks number;

l_fs2_bytes number;

l_fs3_blocks number;

l_fs3_bytes number;

l_fs4_blocks number;

l_fs4_bytes number;

l_full_blocks number;

l_full_bytes number;

l_free_blks number;

l_total_blocks number;

l_total_bytes number;

l_unused_blocks number;

l_unused_bytes number;

l_LastUsedExtFileId number;

l_LastUsedExtBlockId number;

l_LAST_USED_BLOCK number;

procedure p( p_label in varchar2, p_num in number )

is

begin

dbms_output.put_line( rpad(p_label,40,'.') ||

p_num );

end;

begin

p_segname := upper(p_segname_1); -- rainy changed

p_owner := upper(p_owner_1);

p_type := p_type_1;

if (p_type_1 = 'i' or p_type_1 = 'I') then --rainy changed

p_type := 'INDEX';

end if;

if (p_type_1 = 't' or p_type_1 = 'T') then --rainy changed

p_type := 'TABLE';

end if;

if (p_type_1 = 'c' or p_type_1 = 'C') then --rainy changed

p_type := 'CLUSTER';

end if;

select t.segment_space_management into p_space

from dba_tablespaces t , dba_segments s

where s.tablespace_name = t.tablespace_name

and s.segment_name = p_segname

and s.owner = p_owner

and s.segment_type = p_type ; -- RollingPig change it.

-- if you compile with error,you may login with sys and grant select on dba_tablespace,dba_segments to current_user

dbms_space.unused_space

( segment_owner => p_owner,

segment_name => p_segname,

segment_type => p_type,

total_blocks => l_total_blocks,

total_bytes => l_total_bytes,

unused_blocks => l_unused_blocks,

unused_bytes => l_unused_bytes,

LAST_USED_EXTENT_FILE_ID => l_LastUsedExtFileId,

LAST_USED_EXTENT_BLOCK_ID => l_LastUsedExtBlockId,

LAST_USED_BLOCK => l_LAST_USED_BLOCK );

if p_space = 'MANUAL' or (p_space <> 'auto' and p_space <> 'AUTO') then

dbms_space.free_blocks

( segment_owner => p_owner,

segment_name => p_segname,

segment_type => p_type,

freelist_group_id => 0,

free_blks => l_free_blks );

p( 'Free Blocks', l_free_blks );

end if;

p( 'Total Blocks', l_total_blocks );

p( 'Total Bytes', l_total_bytes );

p( 'Unused Blocks', l_unused_blocks );

p( 'Unused Bytes', l_unused_bytes );

p( 'Last Used Ext FileId', l_LastUsedExtFileId );

p( 'Last Used Ext BlockId', l_LastUsedExtBlockId );

p( 'Last Used Block', l_LAST_USED_BLOCK );

/*IF the segment is analyzed */

if p_analyzed = 'Y' then

dbms_space.space_usage(segment_owner => p_owner ,

segment_name => p_segname ,

segment_type => p_type ,

unformatted_blocks => l_unformatted_blocks ,

unformatted_bytes => l_unformatted_bytes,

fs1_blocks => l_fs1_blocks,

fs1_bytes => l_fs1_bytes ,

fs2_blocks => l_fs2_blocks,

fs2_bytes => l_fs2_bytes,

fs3_blocks => l_fs3_blocks ,

fs3_bytes => l_fs3_bytes,

fs4_blocks => l_fs4_blocks,

fs4_bytes => l_fs4_bytes,

full_blocks => l_full_blocks,

full_bytes => l_full_bytes);

dbms_output.put_line(rpad(' ',50,'*'));

dbms_output.put_line('The segment is analyzed');

p( '0% -- 25% free space blocks', l_fs1_blocks);

p( '0% -- 25% free space bytes', l_fs1_bytes);

p( '25% -- 50% free space blocks', l_fs2_blocks);

p( '25% -- 50% free space bytes', l_fs2_bytes);

p( '50% -- 75% free space blocks', l_fs3_blocks);

p( '50% -- 75% free space bytes', l_fs3_bytes);

p( '75% -- 100% free space blocks', l_fs4_blocks);

p( '75% -- 100% free space bytes', l_fs4_bytes);

p( 'Unused Blocks', l_unformatted_blocks );

p( 'Unused Bytes', l_unformatted_bytes );

p( 'Total Blocks', l_full_blocks);

p( 'Total bytes', l_full_bytes);

end if;

end show_space_1052;

TOM大师脚本-show space 多个版本,谢谢大牛们的更多相关文章

  1. TOM大师脚本01-查找未建索引的外键

    [oracle@Oracle11g 2016]$ cat 022201.sql column columns format a30 word_wrappedcolumn tablename forma ...

  2. Fiddler录制jmeter脚本--V4.4..0.1版本

      圣诞节到了,圣诞老人送平安,我们送技术,我们知道以前jmeter的脚本来源有三个,手动书写.badboy录制.自带的录制功能(jmeter3.0该功能还比较好),目前我们又多了一个fiddler生 ...

  3. shell脚本自动化安装pgsql10.5版本

    看到有个大佬写了个很实用的脚本,于是这里做了转载 #!/bin/bash #进入软件的制定安装目录 echo "进入目录/usr/local,下载pgsql文件" cd /usr/ ...

  4. linux脚本判断当前的linux版本是6还是7

    #!/bin/sh version="release 7." release=$(cat /etc/redhat-release) echo $release result=$(e ...

  5. 在Python脚本中判断Python的版本

    引自:http://segmentfault.com/q/1010000000127878 如果是给人读,用 sys.version,如果是给机器比较,用 sys.version_info,如果是判断 ...

  6. shell 脚本判断linux 的发行版本

    原文vi ./Get_Dist_Name.sh #!/bin/bash Get_Dist_Name() { if grep -Eqii "CentOS" /etc/issue || ...

  7. shell脚本实现自动化安装linux版本的loadrunner agent(centos6.8)

    #!/bin/bash #Centos6下安装LoadRunner负载机 #@author Agoly #@date #@source 高级测试技术交流圈: yum -y install expect ...

  8. 用shell脚本安装MySQL-5.7.22-Percona版本

    #!/bin/bash MySQL_Package=Percona-Server-5.7.22-22-Linux.x86_64.ssl101.tar.gz Package_Source=Percona ...

  9. bat脚本修改dns(判断系统版本)

    @echo off systeminfo if "%OS 名称%"=="%7%" goto windows7:windows7echo 正在设置本机主DNS , ...

随机推荐

  1. c++ RTTI(runtime type info)

    RTTI(Run-Time Type Information,通过运行时类型信息)程序能够使用基类的指针或引用来检查这些指针或引用所指的对象的实际派生类型. RTTI提供了以下两个非常有用的操作符: ...

  2. C++ Prime:decltype类型指示符

    decltype作用是选择并返回操作数的数据类型. decltype(f()) sum = x; // sum的类型就是函数f的返回类型 如果decltype使用的表达式是一个变量,则decltype ...

  3. 对于利用pca 和 cca 进行fmri激活区识别的理解

    1.pca 抛开fmri研究这个范畴,我们有一个超长向量,这个超长向量在fmri研究中,就是体素数据.向量中的每个数值,都代表在相应坐标轴下的坐标值.这些坐标轴所组成的坐标系,其实是标准单位坐标系.向 ...

  4. 余弦距离、欧氏距离和杰卡德相似性度量的对比分析 by ChaoSimple

      1.余弦距离 余弦距离,也称为余弦相似度,是用向量空间中两个向量夹角的余弦值作为衡量两个个体间差异的大小的度量. 向量,是多维空间中有方向的线段,如果两个向量的方向一致,即夹角接近零,那么这两个向 ...

  5. Android Fragment实现分屏

    在项目中碰到一个问题,新开发一个平板APP,项目要求是把原来的一个手机端APP放在项目左侧显示,右侧添加新加的功能. 首先想到了Fragment,以前做过Fragment的一些简单的Demo,但是都没 ...

  6. Hibernate 以流的方式获取数据

    hibernateQuery.setFetchSize(Integer.MIN_VALUE); results = hibernateQuery.scroll(ScrollMode.FORWARD_O ...

  7. 《Linear Algebra and Its Applications》-chaper4-向量空间-子空间、零空间、列空间

    在线性代数中一个非常重要的概念就是向量空间R^n,这一章节将主要讨论向量空间的一系列性质. 一个向量空间是一些向量元素构成的非空集合V,需要满足如下公理: 向量空间V的子空间H需要满足如下三个条件: ...

  8. Centos6.5 nginx+nginx-rtmp配置流媒体服务器

    之前使用命令方式安装nginx并配置了反向代理,由于想做一个视频直播的小项目,查了流媒体服务器的方案,发现nginx有相关模块,于是开始搞起. nginx-rtmp模块需要在nginx编译时,以模块方 ...

  9. TreeComboBox控件范例

    本文转载:http://www.cnblogs.com/hoodlum1980/archive/2008/01/30/1058140.html 在我印象中有很多各种各样的自定义控件(例如TreeLis ...

  10. PPT扁平化风格设计手册

    钱文嘉:颜色选择,搭配 http://www.pptfans.cn/341917.html