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小時內與您取得聯系。