oracle sql命令
set time on; 设置时间 alter table flashback_test enable row movement; 开启行移 select * from flashback_test as of timestamp to_timestamp('2019-2-22 09:45:43','yyyy-mm-dd hh24:mi:ss'); 查看时间点的内容 show parameter recyclebin; 查看回收站功能是否开启 select * from t11 versions between timestamp(systimestamp -interval '' minute) and maxvalue; 查询12分组以内的改动 select versions_xid,versions_startscn,versions_endscn,id from t11 versions between timestamp(systimestamp - interval '' minute) and maxvalue; 事务闪回查询 sqlplus sys/123456@oracle01 as sysdba 登入 select status from v$instance; 查看状态 nomount mount open select file#,checkpoint_change# from v$datafile_header; 数据文件头检查 select file#,checkpoint_change#,last_change# from v$datafile; 数据文件检查 select checkpoint_change# from v$database; 系统检查 alter database open 数据库打开 一、switchover_status概念:
A 如果switchover_status为TO_PRIMARY 说明标记恢复可以直接转换为primary库alter database commit to switchover to primary
B 如果switchover_status为SESSION ACTIVE 就应该断开活动会话alter database commit to switchover to primary with session shutdown;
C 如果switchover_status为NOT ALLOWED 说明切换标记还没收到,此时不能执行转换。 SHOW PARAMETER background_dump_dest 查看数据库的日志文件 select status from v$instance; 数据库状态 select * from v$controlfile; 查看控制文件是否正常 select * from v$log;查看日志 select * from v$logfile;查看日志文件 查看表空间物理文件的名称及大小 select tablespace_name,
file_id,
file_name,
round(bytes / (1024 * 1024), 0) filesize
from dba_data_files
order by tablespace_name; 查询表空间的碎片程度 select tablespace_name, count(tablespace_name)
from dba_free_space
group by tablespace_name
having count(tablespace_name) > 10; 查看碎片程度高的表
SELECT segment_name table_name, COUNT(*) extents
FROM dba_segments
WHERE owner NOT IN ('SYS', 'SYSTEM')
GROUP BY segment_name
HAVING COUNT(*) = (SELECT MAX(COUNT(*))
FROM dba_segments
GROUP BY segment_name); 查看表空间的使用情况 select sum(bytes) / (1024 * 1024) as free_space, tablespace_name
from dba_free_space
group by tablespace_name; SELECT A.TABLESPACE_NAME,
A.BYTES TOTAL,
B.BYTES USED,
C.BYTES FREE,
(B.BYTES * 100) / A.BYTES "% USED",
(C.BYTES * 100) / A.BYTES "% FREE"
FROM SYS.SM$TS_AVAIL A, SYS.SM$TS_USED B, SYS.SM$TS_FREE C
WHERE A.TABLESPACE_NAME = B.TABLESPACE_NAME
AND A.TABLESPACE_NAME = C.TABLESPACE_NAME; 查看数据库对象 select owner, object_type, status, count(*) count#
from all_objects
group by owner, object_type, status; 查看数据库的版本 Select version
FROM Product_component_version
Where SUBSTR(PRODUCT, 1, 6) = 'Oracle'; 查看Oracle字符集 select * from sys.props$ where name = 'NLS_CHARACTERSET'; 查看还没提交的事务 select * from v$locked_object;
select * from v$transaction; 查看所有用户:
select * from dba_users;
select * from all_users;
select * from user_users; 查看用户或角色系统权限(直接赋值给用户或角色的系统权限):
select * from dba_sys_privs;
select * from user_sys_privs; 查看角色(只能查看登陆用户拥有的角色)所包含的权限
sql>select * from role_sys_privs; 查看用户对象权限:
select * from dba_tab_privs;
select * from all_tab_privs;
select * from user_tab_privs; 查看所有角色:
select * from dba_roles; 查看用户或角色所拥有的角色:
select * from dba_role_privs;
select * from user_role_privs; 查看哪些用户有sysdba或sysoper系统权限(查询时需要相应权限)
select * from V$PWFILE_USERS 比如我要查看用户 kingle的拥有的权限:
SQL> select * from dba_sys_privs where grantee='kingle'; GRANTEE PRIVILEGE ADMIN_OPTION
------------------------------ ---------------------------------------- ------------
kingle CREATE TRIGGER NO
kingle UNLIMITED TABLESPACE NO 比如我要查看用户 kingle的拥有的角色:
SQL> select * from dba_role_privs where grantee='kingle'; GRANTEE GRANTED_ROLE ADMIN_OPTION DEFAULT_ROLE
------------------------------ ------------------------------ ------------ ------------
kingle DBA NO YES 查看一个用户所有的权限及角色
select privilege from dba_sys_privs where grantee='kingle'
union
select privilege from dba_sys_privs where grantee in
(select granted_role from dba_role_privs where grantee='kingle' );\ 确定数据库 的启动方式:
方式一 show parameter spfile
方式二
SQL> set linesize 120
SQL> col name format a10
SQL> col value format a60
SQL> select name,value from v$parameter where name='spfile';
-- 查看表空间文件
select TABLESPACE_NAME,FILE_NAME from dba_data_files where TABLESPACE_NAME='TEST03';
--查询表空间的free space
select tablespace_name, count(*) AS extends,round(sum(bytes) / 1024 / 1024, 2) AS MB,sum(blocks) AS blocks from dba_free_space group BY tablespace_name;
--查询表空间的总容量
select tablespace_name, sum(bytes) / 1024 / 1024 as MB from dba_data_files group by tablespace_name;
--查询表空间使用率
SELECT total.tablespace_name,
Round(total.MB, 2) AS Total_MB,
Round(total.MB - free.MB, 2) AS Used_MB,
Round(( 1 - free.MB / total.MB ) * 100, 2)
|| '%' AS Used_Pct
FROM (SELECT tablespace_name,
Sum(bytes) / 1024 / 1024 AS MB
FROM dba_free_space
GROUP BY tablespace_name) free,
(SELECT tablespace_name,
Sum(bytes) / 1024 / 1024 AS MB
FROM dba_data_files
GROUP BY tablespace_name) total
WHERE free.tablespace_name = total.tablespace_name;
查看系统的SCN号
select dbms_flashback.get_system_change_number from dual;
select checkpoint_change# from v$database;
回滚查询
1 查询数据库的的回滚段情况
select owner,segment_id,segment_name,tablespace_name,status from dba_rollback_segs;
2 查看系统回滚段基本信息
select segment_name,tablespace_name,bytes,next_extent from dba_segments where segment_type='ROLLBACK';
从上面仅仅是查询到回滚段的基本信息,要了目前各个回滚段的动态信息,还要查询V$ROLLNAME和V$ROLLSTAT视图。V$ROLLNAME视图只存放各回滚段的编号和名字,V$ROLLSTATS存放各个回滚段当前的情况信息。要想得到每个回滚段的信息,就要查询两个表的信息才能得到。如:
select s.usn,n.name,s.extents,s.optsize,s.hwmsize,s.status from v$rollstat s, v$rollname n where s.usn=n.usn
2 查看回滚段的使用情况,哪个用户正在使用回滚段的资源(当提交或回滚后资源释放):
SELECT s.username, u.name FROM
v$transaction t, v$rollstat r, v$rollname u, v$session s WHERE s.taddr =
t.addr AND t.xidusn = r.usn AND r.usn = u.usn ORDER BY s.username;
3 回滚段当前活动的事物(事务提交或回滚后自动清空)
SELECT s.username,t.xidusn,t.ubafil,t.ubablk,t.used_ublk FROM v$session s,v$transaction t;
4 分析 UNDO 的使用情况
SELECT
TABLESPACE_NAME,STATUS,TRUNC(SUM(BLOCKS) * 8 / 1024) AS "Size
M",COUNT(*) Undo_Extent_Num FROM DBA_UNDO_EXTENTS GROUP BY
TABLESPACE_NAME, STATUS;
5 监控undo表空间
SELECT BEGIN_TIME, END_TIME, UNDOTSN, UNDOBLKS, TXNCOUNT,MAXCONCURRENCY AS "MAXCON" FROM V$UNDOSTAT;
6 查询是否有回滚段的争用
select * from v$waitstat;
SELECT name, waits, gets, waits/gets
"Ratio" FROM v$rollstat a, v$rollname b WHERE a.usn = b.usn;
7 查看回滚段的统计信息:
SELECT n.name, s.extents, s.rssize, s.optsize, s.hwmsize, s.xacts, s.status FROM v$rollname n, v$rollstat s WHERE n.usn = s.usn;
8 查询回滚段的事务回退率
transaction rollbacks/(transaction rollbacks+user commits)
select name,value from v$sysstat where name in('user commits','transaction
rollbacks');
9 查询回滚段在使用,扩展,回缩的时候extent在循环的次数
select usn,wraps from v$rollstat;
10 查询回滚段收缩的情况
select usn,optsize,shrinks from v$rollstat;
监控事例的等待
select event,sum(decode(wait_Time,0,0,1)) "Prev",
sum(decode(wait_Time,0,1,0)) "Curr",count(*) "Tot"
from v$session_Wait
group by event order by 4 ;
回滚段的争用情况 select name, waits, gets, waits / gets "Ratio"
from v$rollstat a, v$rollname b
where a.usn = b.usn; 查看回滚段名称及大小 SELECT segment_name,
tablespace_name,
r.status,
(initial_extent / 1024) initialextent,
(next_extent / 1024) nextextent,
max_extents,
v.curext curextent
FROM dba_rollback_segs r, v$rollstat v
WHERE r.segment_id = v.usn(+)
ORDER BY segment_name;
查看控制文件 SELECT NAME FROM v$controlfile; 查看日志文件 SELECT MEMBER FROM v$logfile; 查看前台正在发出的SQL语句 select user_name,sql_text
from v$open_cursor
where sid in (select sid from (select sid,serial#,username,program
from v$session
where status='ACTIVE')); 数据表占用空间大小情况 select segment_name, tablespace_name, bytes, blocks
from user_segments
where segment_type = 'TABLE'
ORDER BY bytes DESC, blocks DESC; 查看表空间碎片大小 select tablespace_name,round(sqrt(max(blocks)/sum(blocks))*
(100/sqrt(sqrt(count(blocks)))),2) FSFI
from dba_free_space
group by tablespace_name order by 1; 查看表空间占用磁盘情况 select
b.file_id 文件ID号,
b.tablespace_name 表空间名,
b.bytes 字节数,
(b.bytes-sum(nvl(a.bytes,0))) 已使用,
sum(nvl(a.bytes,0)) 剩余空间,
sum(nvl(a.bytes,0))/(b.bytes)*100 剩余百分比
from dba_free_space a,dba_data_files b
where a.file_id=b.file_id
group by b.tablespace_name,b.file_id,b.bytes
order by b.file_id; 查看表的大小,倒序排列 每张表都是作为“段”来存储的,可以通过user_segments视图查看其相应信息。
段(segments)的定义:如果创建一个堆组织表,则该表就是一个段 SELECT SEGMENT_NAME, SUM(BYTES) / 1024 / 1024 MBYTESE
FROM USER_SEGMENTS
WHERE SEGMENT_TYPE = 'TABLE'
GROUP BY SEGMENT_NAME
order by MBYTESE desc; 查看表空间物理文件的名称及大小 SELECT tablespace_name,
file_id,
file_name,
round(bytes / (1024 * 1024), 0) total_space
FROM dba_data_files
ORDER BY tablespace_name; 查看Oracle 表空间使用率 SELECT D.TABLESPACE_NAME,
SPACE || 'M' "SUM_SPACE(M)",
SPACE - NVL (FREE_SPACE, 0) || 'M' "USED_SPACE(M)",
ROUND ( (1 - NVL (FREE_SPACE, 0) / SPACE) * 100, 2) || '%'
"USED_RATE(%)",
FREE_SPACE || 'M' "FREE_SPACE(M)"
FROM ( SELECT TABLESPACE_NAME,
ROUND (SUM (BYTES) / (1024 * 1024), 2) SPACE,
SUM (BLOCKS) BLOCKS
FROM DBA_DATA_FILES
GROUP BY TABLESPACE_NAME) D,
( SELECT TABLESPACE_NAME,
ROUND (SUM (BYTES) / (1024 * 1024), 2) FREE_SPACE
FROM DBA_FREE_SPACE
GROUP BY TABLESPACE_NAME) F
WHERE D.TABLESPACE_NAME = F.TABLESPACE_NAME(+)
UNION ALL --如果有临时表空间
SELECT D.TABLESPACE_NAME,
SPACE || 'M' "SUM_SPACE(M)",
USED_SPACE || 'M' "USED_SPACE(M)",
ROUND (NVL (USED_SPACE, 0) / SPACE * 100, 2) || '%' "USED_RATE(%)",
NVL (FREE_SPACE, 0) || 'M' "FREE_SPACE(M)"
FROM ( SELECT TABLESPACE_NAME,
ROUND (SUM (BYTES) / (1024 * 1024), 2) SPACE,
SUM (BLOCKS) BLOCKS
FROM DBA_TEMP_FILES
GROUP BY TABLESPACE_NAME) D,
( SELECT TABLESPACE_NAME,
ROUND (SUM (BYTES_USED) / (1024 * 1024), 2) USED_SPACE,
ROUND (SUM (BYTES_FREE) / (1024 * 1024), 2) FREE_SPACE
FROM V$TEMP_SPACE_HEADER
GROUP BY TABLESPACE_NAME) F
WHERE D.TABLESPACE_NAME = F.TABLESPACE_NAME(+)
ORDER BY 1; SELECT a.tablespace_name "表空间名",
total "表空间大小",
free "表空间剩余大小",
(total - free) "表空间使用大小",
total / (1024 * 1024 * 1024) "表空间大小(G)",
free / (1024 * 1024 * 1024) "表空间剩余大小(G)",
(total - free) / (1024 * 1024 * 1024) "表空间使用大小(G)",
round((total - free) / total, 4) * 100 "使用率 %"
FROM (SELECT tablespace_name, SUM(bytes) free
FROM dba_free_space
GROUP BY tablespace_name) a,
(SELECT tablespace_name, SUM(bytes) total
FROM dba_data_files
GROUP BY tablespace_name) b
WHERE a.tablespace_name = b.tablespace_name 查看Temp 表空间实际使用磁盘大小 Select f.tablespace_name,
d.file_name "Tempfile name",
round((f.bytes_free + f.bytes_used) / 1024 / 1024, 2) "total MB",
round(((f.bytes_free + f.bytes_used) - nvl(p.bytes_used, 0)) / 1024 / 1024,
2) "Free MB",
round(nvl(p.bytes_used, 0) / 1024 / 1024, 2) "Used MB",
round((round(nvl(p.bytes_used, 0) / 1024 / 1024, 2) /
round((f.bytes_free + f.bytes_used) / 1024 / 1024, 2)) * 100,
2) as "Used_Rate(%)"
from SYS.V_$TEMP_SPACE_HEADER f,
DBA_TEMP_FILES d,
SYS.V_$TEMP_EXTENT_POOL p
where f.tablespace_name(+) = d.tablespace_name
and f.file_id(+) = d.file_id
and p.file_id(+) = d.file_id; 查看session使用回滚段 SELECT r.name 回滚段名,
s.sid,
s.serial#,
s.username 用户名,
t.status,
t.cr_get,
t.phy_io,
t.used_ublk,
t.noundo,
substr(s.program, 1, 78) 操作程序
FROM sys.v_$session s,sys.v_$transaction t,sys.v_$rollname r
WHERE t.addr = s.taddr and t.xidusn = r.usn
ORDER BY t.cr_get,t.phy_io; 查看当前临时表空间使用大小与正在占用临时表空间的sql语句 select sess.SID, segtype, blocks * 8 / 1000 "MB", sql_text
from v$sort_usage sort, v$session sess, v$sql sql
where sort.SESSION_ADDR = sess.SADDR
and sql.ADDRESS = sess.SQL_ADDRESS
order by blocks desc; Temp表空间上进程的查询 select a.tablespace, b.sid, b.serial#, a.blocks,c.sql_text
from v$sort_usage a,v$session b,v$sqltext c
where a.session_addr = b.saddr
and b.sql_address = c.address
order by a.tablespace,b.sid,b.serial#,c.address, c.piece; 查看SGA区剩余可用内存 select name,
sgasize/1024/1024 "Allocated(M)",
bytes/1024 "**空间(K)",
round(bytes/sgasize*100, 2) "**空间百分比(%)"
from (select sum(bytes) sgasize from sys.v_$sgastat) s, sys.v_$sgastat f
where f.name = 'free memory'; 监控表空间I/O比例 select df.tablespace_name name,df.file_name "file",f.phyrds pyr,
f.phyblkrd pbr,f.phywrts pyw, f.phyblkwrt pbw
from v$filestat f, dba_data_files df
where f.file# = df.file_id
order by df.tablespace_name; 监控SGA命中率 select a.value + b.value "logical_reads",
c.value "phys_reads",
round(100 * ((a.value+b.value)-c.value) / (a.value+b.value)) "BUFFER HIT RATIO"
from v$sysstat a, v$sysstat b, v$sysstat c
where a.statistic# = 38 and
b.statistic# = 39 and
c.statistic# = 40 ; 监控 SGA 中字典缓冲区的命中率 select parameter, gets,Getmisses , getmisses/(gets+getmisses)*100 "miss ratio",
(1-(sum(getmisses)/ (sum(gets)+sum(getmisses))))*100 "Hit ratio"
from v$rowcache
where gets+getmisses <>0
group by parameter, gets, getmisses ; 监控 SGA **享缓存区的命中率,应该小于1% select sum(pins) "Total Pins", sum(reloads) "Total Reloads",
sum(reloads)/sum(pins) *100 libcache
from v$librarycache; 监控 SGA 中重做日志缓存区的命中率,应该小于1% SELECT name, gets, misses, immediate_gets, immediate_misses,
Decode(gets,0,0,misses/gets*100) ratio1,
Decode(immediate_gets+immediate_misses,0,0,
immediate_misses/(immediate_gets+immediate_misses)*100) ratio2
FROM v$latch WHERE name IN ('redo allocation', 'redo copy'); 监控内存和硬盘的排序比率,最好使它小于 .10 SELECT name, value
FROM v$sysstat
WHERE name IN ('sorts (memory)', 'sorts (disk)') ; 监控字典缓冲区 SELECT SUM(GETS) "DICTIONARY GETS",SUM(GETMISSES) "DICTIONARY CACHE GET MISSES"
FROM V$ROWCACHE ; 非系统用户建在SYSTEM表空间中的表 SELECT owner,table_name
FROM DBA_TABLES
WHERE tablespace_name in('SYSTEM','USER_DATA') AND
owner NOT IN('SYSTEM','SYS','OUTLN', 'ORDSYS','MDSYS','SCOTT', 'HOSTEAC'); 性能最差的SQL SELECT * FROM ( SELECT PARSING_USER_ID EXECUTIONS,SORTS,COMMAND_TYPE,DISK_READS,sql_text
FROM v$sqlarea
ORDER BY disk_reads DESC)
WHERE ROWNUM<100; 读磁盘数超100次的sql select * from sys.v_$sqlarea where disk_reads>100; 查找消耗资源比较的sql语句 Select se.username,
se.sid,
su.extents,
su.blocks * to_number(rtrim(p.value)) as Space,
tablespace,
segtype,
sql_text
from v$sort_usage su, v$parameter p, v$session se, v$sql s
where p.name = 'db_block_size'
and su.session_addr = se.saddr
and s.hash_value = su.sqlhash
and s.address = su.sqladdr
order by se.username, se.sid; 最频繁执行的sql select * from sys.v_$sqlarea where executions>100; 查询使用CPU多的用户session select a.sid,spid,status,substr(a.program,1,40) prog,a.terminal,osuser,value/60/100 value
from v$session a,v$process b,v$sesstat c
where c.statistic#=12 and
c.sid=a.sid and
a.paddr=b.addr
order by value desc; 当前每个会话使用的对象数 SELECT a.sid,s.terminal,s.program,count(a.sid)
FROM V$ACCESS a,V$SESSION s
WHERE a.owner <> 'SYS'AND s.sid = a.sid
GROUP BY a.sid,s.terminal,s.program
ORDER BY count(a.sid) ; 查看数据库库对象 SELECT owner, object_type, status, COUNT(*) count#
FROM all_objects
GROUP BY owner, object_type, status; 查看数据库的版本 SELECT version
FROM product_component_version
WHERE substr(product, 1, 6) = 'Oracle'; 查看数据库的创建日期和归档方式 SELECT created, log_mode, log_mode FROM v$database; 检查角色和权限设置
根据用户名进行授权的对象级特权 select b.owner || '.' || b.table_name obj,
b.privilege what_granted,
b.grantable,
a.username
from sys.dba_users a, sys.dba_tab_privs b
where a.username = b.grantee
order by 1, 2, 3; 根据被授权人进行授权的对象级特权 Select owner || '.' || table_name obj,
privilege what_granted,
grantable,
grantee
from sys.dba_tab_privs
where not exists (select 'x' from sys.dba_users where username = grantee)
order by 1, 2, 3; 根据用户名进行授予的系统级特权 select b.privilege what_granted, b.admin_option, a.username
from sys.dba_users a, sys.dba_sys_privs b
where a.username = b.grantee
order by 1, 2; 根据被授权人进行授予的系统级特权 select privilege what_granted, admin_option, grantee
from sys.dba_sys_privs
where not exists (select 'x' from sys.dba_users where username = grantee)
order by 1, 2; 根据用户名授予的角色 select b.granted_role ||
decode(admin_option, 'YES', ' (With Admin Option)', null) what_granted,
a.username
from sys.dba_users a, sys.dba_role_privs b
where a.username = b.grantee
order by 1; 根据被授权人授予的角色 select granted_role ||
decode(admin_option, 'YES', ' (With Admin Option)', null) what_granted,
grantee
from sys.dba_role_privs
where not exists (select 'x' from sys.dba_users where username = grantee)
order by 1;
用户名及已被授予的相应权限 select a.username,
b.granted_role ||
decode(admin_option, 'YES', ' (With Admin Option)', null) what_granted
from sys.dba_users a, sys.dba_role_privs b
where a.username = b.grantee
UNION
select a.username,
b.privilege ||
decode(admin_option, 'YES', ' (With Admin Option)', null) what_granted
from sys.dba_users a, sys.dba_sys_privs b
where a.username = b.grantee
UNION
select a.username,
b.table_name || '-' || b.privilege ||
decode(grantable, 'YES', ' (With Grant Option)', null) what_granted
from sys.dba_users a, sys.dba_tab_privs b
where a.username = b.grantee
order by 1; 查询用户名及相应的配置文件、默认的表空间和临时表空间 Select username, profile, default_tablespace, temporary_tablespace, created
from sys.dba_users
oracle sql命令的更多相关文章
- oracle sql命令行中上下左右使用
yum -y install readline,rlwrap
- oracle sql 命令类别
1.数据定义语言 DDL 有 create alter drop2.数据操纵语言 DML insert select delete update3.事务控制语言 TCL commit savepoin ...
- Oracle学习笔记四 SQL命令(二):SQL操作语言类别
SQL分为下列语言类别 1.数据定义语言(DDL) Create.Alter.Drop 2.数据操纵语言(DML) Insert.Select.Delete.Update 3.事务控制语言(TCL) ...
- Oracle学习笔记三 SQL命令
SQL简介 SQL 支持下列类别的命令: 1.数据定义语言(DDL) 2.数据操纵语言(DML) 3.事务控制语言(TCL) 4.数据控制语言(DCL)
- [Oracle] SQL*Loader 详细使用教程(2)- 命令行参数
sqlldr工具 SQL*Loader的客户端工具是sqlldr,在操作系统的命令行下输入sqlldr,后面不接任何参数,将显示帮助信息如下所示(所有命令行参数的简单描述及其默认值),所以你并不需 ...
- Windows下使用cmd启动Oracle EM和sql命令使用+主机身份认证
(1)cmd命令下使用sql命令 >sqlplus / as sysdba sql>select * from v$version; (2)cmd命令下启动Oracle EM 安装完ora ...
- 解决Oracle+Mybatis批量插入报错:SQL 命令未正确结束
Mybatis批量插入需要foreach元素.foreach元素有以下主要属性: (1)item:集合中每一个元素进行迭代时的别名. (2)index:指定一个名字,用于表示在迭代过程中,每次迭代到的 ...
- Oracle-01-数据库分类/oracle sql*plus常用命令
一.数据库分类 一.数据库分类1.小型数据库:access.foxbase2.中型数据库:informix.sql server.mysql3.大型数据库:sybase.db2.oracle 二.项目 ...
- MyBatis操作Oracle批量插入 ORA-00933: SQL 命令未正确结束
最近在使用MyBatis操作Oracle数据库的时候,进行批量插入数据,思路是封装一个List集合通过Myabtis 的foreach标签进行循环插入,可是搬照Mysql的批量插入会产生 异常 ### ...
随机推荐
- MATLAB读取写入文本数据最佳方法 | Best Method for Loading & Saving Text Data Using MATLAB
MATLAB读取文件有很多方法.然而笔者在过去进行数据处理中,由于函数太多,相互混杂,与C#,Python等语言相比,反而认为读取文本数据比较麻烦.C#和Python等高级语言中,对于大部分的文本数据 ...
- 编写高质量代码改善C#程序的157个建议——建议3: 区别对待强制转型与as和is
建议3: 区别对待强制转型与as和is 在阐述本建议之前,首先需要明确什么是强制转型,以及强制转型意味着什么.从语法结构上来看,类似下面的代码就是强制转型. secondType = (SecondT ...
- poj3080 Blue Jeans(暴枚+kmp)
Description The Genographic Project is a research partnership between IBM and The National Geographi ...
- angular 工厂模式依赖注入
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; ...
- spring mvc 框架启动报错:nested exception is java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal 解决办法
今天准备将以前自己搭建的一个框架拿出来用一下,结果发现启动报错:nested exception is java.lang.NoClassDefFoundError: org/w3c/dom/Elem ...
- 深入解析mapreduce 笔记
Hadoop组成: mapreduce简单介绍: 伪代码演示: maptask和reducetask执行流程:
- windows下安装newman
1.下载安装node.js,下载地址::https://nodejs.org/en/download/,这里我下载的为v10.15.0-x64.msi,下载后直接安装即可,安装完后可输入node -v ...
- 使用django进行发送 邮件
我们来看一下 django发送 邮件的整个流程 第一步:例先去 网易163注册账号并激活发邮件功能 把授权码进行 开启 来到我们的项目setting中进行 一个配置: # 邮箱的配置信息 EMAIL_ ...
- cf555e
cf555e(缩点) 给一个 n 个点 m 条边的图,以及 q 对点 (s,t),让你给 m 条边定向.问是否存在一种方案,使每对点的 s 能走到 t. \(n,m,q≤ 2×10^5\). 首先,在 ...
- Python编程笔记二进制、字符编码、数据类型
Python编程笔记二进制.字符编码.数据类型 一.二进制 bin() 在python中可以用bin()内置函数获取一个十进制的数的二进制 计算机容量单位 8bit = 1 bytes 字节,最小的存 ...