1:检查alter日志文件,输出常见的报错信息
#!/bin/bash
source /home/oracle/.bash_profile
ORACLE_SID=orcldb ##sid
export ORACLE_SID
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 ##oracle home
export ORACLE_HOME
HOST_NAME=`uname -n`
export HOST_NAME
JOB_HOME=$HOME/jobs
export JOB_HOME
DUMP_DEST=/u01/app/oracle/diag/rdbms/btmesdb/"$ORACLE_SID"/trace
export DUMP_DEST
IPADDR=`ifconfig |grep "inet"|awk -F: 'NR==1{print substr($1,13,13)}'` ##不通版本os 这里可能需要修改
export IPADDR
LOG_NAME="alert_$ORACLE_SID.log"
CHECK_LINES=50
ERR_MSG="ORA-|Failure|alter|unusable|shutdown|startup"
ERR_EXC="ORA-02068|ORA-03113|ORA-02050|ORA-12012|ORA-06512|ORA-12541|ORA-12005|ORA-03113|ORA-02396|ORA-02063|ORA-01012|ORA-000060|ORA-02054|ORA-12535|ORA-02053|ORA-01013|ORA-3136|ORA-03135"
OLD_LOG_1=`echo "old_1_$ORACLE_SID.log"`
OLD_LOG_2=`echo "old_2_$ORACLE_SID.log"`
export LOG_NAME CHECK_LINES ERR_MSG OLD_LOG_1 OLD_LOG_2 ERR_EXC
tail -$CHECK_LINES $DUMP_DEST/$LOG_NAME|egrep -i $ERR_MSG|egrep -v $ERR_EXC|egrep -v "ALTER DATABASE BACKUP CONTROLFILE"|egrep -v "ALTER SYSTEM ARCHIVE LOG" > /tmp/new.log
num=`cat /tmp/new.log |wc -l`
if [ $num -gt 0 ]
then
if [ ! -f /tmp/$OLD_LOG_1 ]
then
touch /tmp/$OLD_LOG_1
fi
if [ ! -f /tmp/$OLD_LOG_2 ]
then
touch /tmp/$OLD_LOG_2
fi
if [ `cat /tmp/$OLD_LOG_2|wc -l` -eq 0 ]
then
var=$num
else
cmp -s /tmp/new.log /tmp/$OLD_LOG_2
var=$?
fi
if [ $var -ge 1 ]
then
# echo "**********************************************************************"
# echo "There are alerts"
tail -$CHECK_LINES $DUMP_DEST/$LOG_NAME|mail -s "$IPADDR btmes_81 Check Alert Log" `cat $JOB_HOME/dba_mail.addr|grep -v \#` ##dba_mail.addr存放邮件地址
echo "**********************************************************************"
cp /tmp/$OLD_LOG_1 /tmp/$OLD_LOG_2
cp /tmp/new.log /tmp/$OLD_LOG_1
fi
else
>/tmp/$OLD_LOG_1
>/tmp/$OLD_LOG_2
fi
shif
2:监控数据库实例状态,异常的时候mail告警
#!/bin/bash
source /home/oracle/.bash_profile
HOST_NAME=`hostname`
#IPADDR=`ifconfig |grep "inet addr"|awk -F: 'NR==1{print substr($2,1,14)}'` ##不同版本os 这里需要调整
ORACLE_SID=orcldb ##oracle sid
JOB_PWD=$HOME/jobs
export JOB_PWD
vin=`ps -ef|grep pmon|grep $ORACLE_SID|wc -l`
if [ $vin -eq 0 ]
then
echo " $ORACLE_SID Instance down"|mailx -s "$ORACLE_SID instance down" `cat $JOB_PWD/dba_mail.addr|grep -v \#`
fi
3:表空间mail告警
multiplication test in some of England's primary schools is sparking debate in both the UK and China – where the test originates.
英国部分小学推行的乘法表测试在中英两国引发热议,乘法表源自中国。
The new multiplication test, or times table check, will be trialed at England' s primary schools in March. Some 7,250 pupils in Year 4 at 290 primaries, are expected to take part in the multiplication check before it becomes mandatory throughout the country in 2020.
今年3月起,英国小学将试推行这套新的乘法表测试。预计来自290所小学的约7250名4年级学生将参与该测试,之后将于2020年在全英国强制推行。
The test, which assesses knowledge of the times tables up to 12, is believed to be more suitable than the Chinese version which goes up to 9, since the duodecimal system is widely adopted in the UK.
英国人认为,这套12*12口算乘法表测试比中国的九九乘法表更适合英国学生,因为该国广泛采用的是十二进制系统。
The test is extensively favored in Chinese schools, and is being gradually introduced to the UK, following the results of an experiment where British pupils who were taught math in the traditional Chinese way outperformed their peers by 10 percent. The experiment took place at Bohunt School in Hampshire in 2015.
乘法表测试在中国的学校中广受欢迎,2015年汉普郡博航特中学进行的一项实验结果显示,通过传统的中国教学方式学习数学的英国小学生数学成绩比同龄人高出10%,由此乘法表也将逐步引入英国。
Supporters have hailed the new test, saying it contributes to a grasp of fundamental math.
支持者们对这项新测试表示欢迎,认为它对掌握基础数学有帮助。
"We have been teaching [the] times tables in our after school class for over 35 years and without doubt it is the most important skill we give our students," a reader, whose screen name is "mad scientist," wrote in a comment on the BBC's website.
网友“mad scientist”在英国广播公司网站上评论道:“我们的课后班教乘法口诀表已经超过35年了,毫无疑问,这是我们传授给学生最重要的技能。”
"I still don't know them, and it's been a source of embarrassment to me ever since," boundah, another reader, said on the same website.
网友“boundah”也在该网站留言称:“我现在还不会乘法表,这一直让我很尴尬。”
"Happy for the British pupils! They will do an even better job than their Chinese peers," said scorpion_wa on Chinese microblogging platform Weibo.
国内微博网友“scorpion_wa”称:“为英国小学生感到开心!他们的数学要超过中国小学生了。”
However, not everyone is pleased with the move.
然而,并不是所有人都对这一举措感到满意。
"There are so many things wrong with math education in this country that a times table test is really just picking at a sore," said Mike Cameron on Twitter.
麦克•卡梅隆在推特上称:“英国的数学教育存在太多问题了,乘法口诀表测验只是治标不治本。”
"British students will hate Chinese," joked Weibo user Bujiubujiu.
微博网友“Bujiubujiu”开玩笑称:“英国学生要恨死中国人啦。”
"I believe it is a pressure on them," said another Weibo user Feixufeixu.
另一位微博网友“Feixufeixu”则表示:“我认为这对他们有压力。”
The UK has been trying to replicate the success of math education in China by encouraging teachers to use a series of textbooks called "Real Shanghai Mathematics," which have been translated directly from Chinese into English.
为了复制中国数学教育的成功,英国一直试图倡导教师使用《真正上海数学》系列教材,这是一套被翻译成英文的中文教科书。
Despite these efforts, the question of would a Chinese-style math education work in the UK, still remains to be answered.
尽管英国采取了上述措施,但关于中国式数学教育是否适用于英国的问题仍没有明确答案。
英文来源:CGTN
编译:董静
审校:yaning
读本文约需要10分钟,您可以先关注我们,避免下次无法找到。
HTML基础教程上篇介绍了HTML的基础知识及一些常用的标签,本篇文章主要介绍HTML的样式、表单、Table、框架等内容。下面我们就一起来了解吧!
所有的HTML可以通过设置其style属性来设置标签的样式,下面我们就来演示几个常用的HTML样式设置。
1)设置标签宽度与高度
我们创建一个div标签,然后设置其高度与宽度,但由于div标签默认没有颜色我们看不到效果,所以在设置其高度与宽度时,同时为其设置一个背景颜色,具体示列如下:
1. <!DOCTYPE html>
2. <html>
3. <head>
4. <title>HTML基础教程</title>
5. <meta charset="utf-8" />
6. </head>
7. <body>
8. <!-- 给div宽度设置为一个长宽都为400px的正方形块,同时背景色代码块为#46a6ff -->
9. <div style="width: 400px; height: 400px; background-color: #46a6ff;"></div>
10. </body>
11. </html>
2)设置字体类型与大小
我们在上面div块中加入文字,并给加入的文字设置字体类型与大小,同时为其加粗,具体示列如下:
1. <!DOCTYPE html>
2. <html>
3. <head>
4. <title>HTML基础教程</title>
5. <meta charset="utf-8" />
6. </head>
7. <body>
8. <!-- font-family是设置字体类型;font-size是设置字体大小;font-weight是给字体加粗 -->
9. <div style="width: 400px; height: 400px;
10. background-color: #46a6ff; font-family: 'Microsoft YaHei'; font-size: 40px; font-weight: bold">
11. 我是div块
12. </div>
13. </body>
14. </html>
3)设置字体水平与垂直居中
上面我们给div加了字体样式但并没有居中,现在我们来看看怎么设置字体居中
1. <!DOCTYPE html>
2. <html>
3. <head>
4. <title>HTML基础教程</title>
5. <meta charset="utf-8" />
6. </head>
7. <body>
8. <!-- text-align给文字设置水平居中;line-height将其值设为与height一致,文字内容就可以垂直居中 -->
9. <div style="width: 400px; height: 400px;
10. background-color: #46a6ff; font-family: 'Microsoft YaHei';
11. font-size: 40px; font-weight: bold;
12. text-align: center; line-height: 400px">
13. 我是div块
14. </div>
15. </body>
16. </html>
在HTML页面开发时我们经常会用到表格进行数据展示,HTML的表格是由标签<table>来定义的,每个表格均有若干行(<tr> 标签定义),每行被分割为若干单元格(由<td> 标签定义)。表格中常用的标签与样式属性如下:
下面我们创建两个表格示列,分别设置上述属性具体如下
1. <!DOCTYPE html>
2. <html>
3. <head>
4. <title>HTML基础教程</title>
5. <meta charset="utf-8" />
6. </head>
7. <body>
8. <!-- 表格示列1 -->
9. <table border="1" bordercolor="black" width="450" height="100">
10. <caption>表格示列1</caption>
11. <tr bgcolor="red" > <!-- tr为一行的起始与结束 -->
12. <th>Column 1</th> <!-- 表格头 -->
13. <th>Column 2</th>
14. <th>Column 3</th>
15. </tr>
16.
17. <tr bgcolor="cyan"> <!-- 设置表格背景色 -->
18. <td>Data 1</td> <!-- td单元格 -->
19. <td>Data 2</td>
20. <td>Data 3</td>
21. </tr>
22.
23. <tr bgcolor="yellow">
24. <td colspan="2">New Data 1</td> <!-- 设置该单元格合并这一行上的两列 -->
25. <td>New Data 2</td>
26. </tr>
27. </table>
28.
29. <!-- 表格示列2 -->
30. <table border="1" bordercolor="black" width="80%" height="100"> <!-- 设置单元格宽与高为百分比 -->
31. <caption> 表格示列2</caption>
32. <tr bgcolor="red" >
33. <th>Column 1</th>
34. <th>Column 2</th>
35. <th>Column 3</th>
36. </tr>
37.
38. <tr>
39. <td rowspan="2">Data 1</td> <!-- 设置该单元格合并这一列上的两行 -->
40. <td>Data 2</td>
41. <td>Data 3</td>
42. </tr>
43.
44. <tr>
45. <td>Data 2</td>
46. <td>Data 3</td>
47. </tr>
48. </table>
49. </body>
50. </html>
HTML 表单是一个包含表单元素的区域,用于搜集不同类型的用户输入。HTML表单在我们日常浏览网页时很常见,比如各网站的登录页面,就是典型的HTML表单应用。HTML表单常用的标签元素有如下几种:
1)Text input:字符输入框,一般账户与密码输入都是用的该标签
2)Text area:文本输入框,一般需要输入较多文本内容使用
3)Radio button:单选框
4)Checkbox:多选框
5)Select box:选择框
6)File select:文件选择框
7)Buttons:按钮
表单元素常用的属性及值设置如下表所示:
结合上表我们创建一个表单示列,按照上表的属性值进行设置,具体操作如下
1. <!DOCTYPE html>
2. <html>
3. <head>
4. <title>HTML基础教程</title>
5. <meta charset="utf-8" />
6. </head>
7. <body>
8. <form>
9. <h4>Input输入框</h4>
10. 用户名 : <input type="text" name="user_name" size="4" value="成哥" maxlength="10"><br>
11. 密码 : <input type="password" name="user_pass" ><br>
12. <h4> Radio单选框:(name值设置时必须一致)</h4>
13. <input type="radio" name="r_gender"> Male
14. <input type="radio" name="r_gender"> Female
15. <input type="radio" name="r_gender" checked> Infant
16. <h4> Check box多选框 :(name值设置时必须不一样)</h4>
17. <input type="checkbox" name="c_male" checked> Male
18. <input type="checkbox" name="c_female"> Female
19. <input type="checkbox" name="c_infant"> Infant
20. <h4> Select box :选择框(单选)</h4>
21. <select name="s_box">
22. <option value="s_male">Male</option>
23. <option value="s_female" selected>Female</option>
24. <option value="s_infant">Infant</option>
25. </select>
26. <h4> Select box :择框(多选)</h4>
27. <!-- 选择项默认展示4个,其它的选择内容需要通过鼠标滚动 -->
28. <select name="s_box" size="4" multiple>
29. <option value="s_male" selected>Male</option>
30. <option value="s_female" selected>Female</option>
31. <option value="s_infant">Infant 1</option>
32. <option value="s_infant" selected>Infant 2</option>
33. <option value="s_infant">Infant 3</option>
34. <option value="s_infant">Infant 4</option>
35. </select>
36. <h4> Text文本输入框</h4>
37. <textarea rows="10" cols="80" name="txt_area">文本框
38. HTML基础教程
39. 表单示列
40. </textarea>
41. </form>
42. </body>
43. </html>
下面我们再创建一个button的表单示列,具体如下
1. <!DOCTYPE html>
2. <html>
3. <head>
4. <title>HTML基础教程</title>
5. <meta charset="utf-8" />
6. </head>
7. <body>
8.
9. <!-- 设置表单提交方式为get, 跳转的url为"http://www.baidu.com" -->
10. <form method="get" action="http://www.baidu.com">
11. <h4> Buttons按钮表单示列</h4>
12. 用户名 : <input type="text" name="user_name" size="4" value="成哥" maxlength="16"><br>
13. 密码 : <input type="password" name="user_pass" ><br>
14. <!-- 点击在游览器上方显示Say Hello -->
15. <input type="button" onclick="alert('Hello')" name="b_alert" value="Say Hello"/><br>
16. <!-- 点击跳转到百度 -->
17. <input type="submit" name="b_submit" value="百度走起"/>
18. <!-- 点击重置会重置表单内输入的内容 -->
19. <input type="reset" name="b_reset" value="重置"/><br>
20. </form>
21.
22. </body>
23. </html>
使用HTML框架可以在同一个浏览器窗口中显示多个页面,iframe的语法格式如下所示
1. <iframe src="URL">
2. <!-- URL指向不同的页面 -->
3. </iframe>
我们现在创建一个iframe框架使用示列具体如下
1. <!DOCTYPE html>
2. <html>
3. <head>
4. <title>HTML基础教程</title>
5. <meta charset="utf-8" />
6. </head>
7. <body>
8.
9. <h4>iframe使用示列一(简单的iframe使用)</h4>
10. <!-- 给iframe显示区域设置宽度为800,高度为200,同时去掉其边框 -->
11. <iframe src="http://www.baidu.com" width="800" height="200" frameborder="0"></iframe>
12.
13. <br/>
14. <br/>
15.
16. <h4>iframe使用示列二(通过点击指定链接在iframe中显示)</h4>
17. <!-- a标签中的target名称必须与iframe的name一致都为qq -->
18. <a href="http://www.qq.com" target="qq">点击我在iframe中显示qq页面</a>
19. <iframe name="qq" width="800" height="200" frameborder="0"></iframe>
20. </body>
21. </html>
至此我们《HTML基础教程》就全部讲完了,有任何问题都可以在文章后面留言。最后如果喜欢本篇文章不要忘了点赞、关注与转发哦!
-END-
@IT管理局专注计算机领域技术、大学生活、学习方法、求职招聘、职业规划、职场感悟等类型的原创内容。期待与你相遇,和你一同成长。
文章推荐:
*请认真填写需求信息,我们会在24小时内与您取得联系。