printer->a" />

久久99精品久久久久久琪琪,久久人人爽人人爽人人片亞洲,熟妇人妻无码中文字幕,亚洲精品无码久久久久久久

Latex使用小結

時間:2019-05-13 17:16:38下載本文作者:會員上傳
簡介:寫寫幫文庫小編為你整理了多篇相關的《Latex使用小結》,但愿對你工作學習有幫助,當然你在寫寫幫文庫還可以找到更多《Latex使用小結》。

第一篇:Latex使用小結

LATEX使用小結

2010-10-03 09:04:49| 分類: 默認分類|字號 訂閱

原文地址:LATEX使用小結

作者:丁三家的小包子 虛擬打印機轉換eps格式

1.建立一個虛擬打印機:控制面板->printer->add a printer->add a local printer->FILE:(print to file)->然后從列表中隨便選擇一個支持postscript的打印機.2.設置:右擊剛建立的虛擬打印機圖標,properties->general->printing preferences->advanced->document options->PostScript Options->PostScript Output Options,選Encapsulated PostScript(EPS), 完工。

將8位圖像轉換為eps格式時,只需用Snagit的convert功能即可。

而在24位真彩色圖轉換時,有人推薦用Konvertor轉換軟件。我發現轉換后,圖像的分辨率大大降低,visio圖像很容易出現漏字,圖片模糊。用虛擬打印機轉換eps格式就不會影響原圖的分辨率。步驟如下:

右擊打印,然后選中圖片,選擇之前創建的虛擬打印機,填寫輸出文件路徑(D:fig1.eps

Latex排版時,如何用bibtex管理參考文獻。

BibTeX 是一個使用數據庫的的方式來管理參考文獻程序, 用于協調LaTeX的參考文獻處理.BibTeX 文件的后綴名為.bib.先來看一個例子: @article{Gettys90,author = {Jim Gettys and Phil Karlton and Scott McGregor}, title = {The {X} Window System, Version 11}, journal = {Software Practice and Experience}, volume = {20}, number = {S2}, year = {1990}, abstract = {A technical overview of the X11 functionality.This is an update of the X10 TOG paper by Scheifler & Gettys.} } 說明: 第一行@article 告訴 BibTeX 這是一個文章類型的參考文獻.其它格式: article, book, booklet, conference, inbook, incollection, inproceedings, manual, misc, mastersthesis, phdthesis, proceedings, techreport, unpublished 等等.在LaTeX中使用BibTeX 為了在 LaTeX 中使用BibTeX 數據庫, 你必須先做下面四件事情: 1)包含宏包 usepackage{natbib} 2)設置參考文獻的類型(bibliography style).標準的為 plain: bibliographystyle{plain} 其它的類型包括:

unsrt – 基本上跟 plain 類型一樣, 除了參考文獻的條目的編號是按照引用的順序, 而不是按照作者的字母順序.alpha – 類似于 plain 類型, 當參考文獻的條目的編號基于作者名字和出版年份的順序.abbrv – 縮寫格式.3)標記引用(Make citations).當你在文檔中想使用引用時, 插入 LaTeX命令 cite{標號} 例如:、cite{Gettys90},根據cls文件的不同定制,以及在正文引用格式的不同要求,也可能是citet或者citep命令。

“標記”就是前邊定義@article后面的名稱.4)告訴 LaTeX 生成參考文獻列表.在 LaTeX 的結束前輸入 bibliographystyle{jmb}

% this can be plain, alpha, etc.bibliography{./MYREFS} 文件中應包含jmb.bst(定義參考文獻類型)文件和MYREFS.bib文件

運行 BibTeX分為下面四步

1.用LaTeX編譯你的.tex 文件 , 這是生成一個.aux 的文件, 這告訴BibTeX 將使用那些引用.2.用BibTeX 編譯.bib 文件.3.再次用LaTeX 編譯你的.tex 文件, 這個時候在文檔中已經包含了參考文獻, 但此時引用的編號可能不正確.4.最后用 LaTeX 編譯你的.tex 文件, 如果一切順利的話, 這是所有東西都已正常了.獲取bib文件

(1)使用如下網址可以將springer文獻格式變成bibtex: http://www.tmdps.cn}, publisher = {ACM}, address = {New York, NY, USA}, };

@book條目為有確定出版社的書籍。

不可少域author或editor, title, publisher, year.可省略域volume或number, series, address, edition, month, note.@booklet條目為印制的有封皮的作品,但沒有出版社或贊助機構的名稱。不可少域title.可省略域author, howpublished, address, month, year, note.@conference與下面的@inproceedings相同。

@inbook條目為一本書的一部分(章,節或某些頁)。

不可少域author或editor, title, chapter和/或pages, publisher,year.可省略域volume或number, series, type, address, edition, month,note.@incollection條目為一本書中有自己題目的一部分。不可少域author, title, booktitle, publisher, year.可省略域editor, volume或number,series, type, chapter, pages,address, edition, month, note.@inproceedings條目為會議論文集中的一篇文章。不可少域author, title, booktitle, year.可省略域editor, volume或number, series, pages, address, month, organization, publisher, note.@InProceedings{b07name, author = {a and b},title = {title}, booktitle = {Proceedings of the conference}, address = {Sydney, Australia}, month = Nov, year = 2008, pages = {1-2}, affiliation = {Uni-name, Country}, URL = {http://url/} };@manual條目為科技文檔。不可少域title.可省略域author, organization, address, edition, month, year, note.@mastersthesis條目為碩士論文。不可少域author, title, school, year.可省略域type, address, month, note.@misc條目為不屬于其它任何類型的作品。不可少域沒有。

可省略域author, title, howpublished, month, year, note.@misc{name,author = “a”, title = “title”, howpublished = “Website”,};year = {2008}, note = {url{http://www.tmdps.cn}} @phdthesis條目為博士論文。不可少域author, title, school, year.可省略域type, address, month, note.@proceedings條目為會議論文集。不可少域title, year.可省略域editor,volume或number, series, address, month, organization, publisher, note.@techreport條目為學校或其它研究機構印制的報告。不可少域author, title, institution, year.可省略域type, number, address, month, note.@techreport{name, author = {a and b} title = {title}, institution = {institution rpt no.} year = {2008} };

@unpublished條目為有作者和標題的還未出版的作品。不可少域author, title, note.可省略域month, year.在每項條目中還可以有可省略域key和crossref.參考文獻及圖片表格等超鏈接。包含宏包

usepackage[dvipdfm]{hyperref} 然后在正文中使用latex命令 cite{} ref{} 就可以實現文檔中參考文獻及圖片表格等超鏈接。

圖片命令 begin{figure} begin{center} includegraphics[width=7in]{sc.eps} caption{Framework of inspection system} label{fig1} end{center} end{figure} 若是一個雙欄文檔,使用begin{figure*}可實現跨欄排版,適用于表格編排。

子圖排版 begin{figure*} begin{center} subfigure[subfigure1]{includegraphics[width=1.5in]{fig6(a).eps}} subfigure[subfigure2]{includegraphics[width=1.5in]{fig6(b).eps}} subfigure[subfigure3]{includegraphics[width=1.5in]{fig6(c).eps}} subfigure[subfigure4]{includegraphics[width=1.5in]{fig6(d).eps}} subfigure[subfigure5]{includegraphics[width=1.5in]{fig6(e).eps}} subfigure[subfigure6]{includegraphics[width=1.5in]{fig6(f).eps}} subfigure[subfigure7]{includegraphics[width=1.5in]{fig6(g).eps}} subfigure[subfigure8]{includegraphics[width=1.5in]{fig6(h).eps}} caption{Wavelet smoothing results} label{fig6} end{center} end{figure*} 每個子圖屬性顯示為(a)subfigure1,(b)subfigure2.......三線表格 begin{table} centering

caption{it is an example}

vspace*{10pt}

begin{tabular}{@{}lcccc@{}} %% toprule {aa} & multicolumn{2}{c}{bb} & multicolumn{2}{c}{cc}[-2pt] cmidrule(1){2-5} {aa} & {bb} &{cc} & {dd}&{ee} hline {1} &a &b &c &d mbox{2}

&a &b &c &d mbox{3}

&a &b &c &d mbox{4}

&a &b &c &d mbox{5}

&a &b &c &d mbox{6}

&a &b &c &d mbox{7}

&a &b &c &d bottomrule end{tabular} end{table} cmidrule(1){2-5}實現2-5列的短劃線。

第二篇:4AUnit 7 It’s late

Unit 7 It’s late Language targets: 1.Using numbers to tell the times.2.Using expressions to communicate with other learners Eg: What’s the time, please? It’s….What time do you get up/go to school? I … at …

Four skills: the numbers from 1 to 100.What’s the time, please? It’s….3.Be able to count the numbers from 1 to 100.4.Learn the sounds of the letters “ n, p”.5.Be able to sing a song: “ Go to school!”

6.Revision focus: a zoo, a park, a cinema, a supermarket, the Great Wall.Lesson 1 Language skills: Listening: Locate specific information in response to proper expressions: Speaking: Using “What’s the time? It’s….” to communicate with other learners.Writing: one, two, three, four, five, six, seven, eight, nine, ten.The learning materials: ______________________________________________________________________________________________________________ The learning course: Pre-task preparation: 1.Free talk Practise in pairs.Invite some pairs to have a talk.2.Revision a.Count the numbers from “1 to 10”.b.Count the numbers from “ 11 to 20”.Pay attention to the pronunciation “teen”.3.Listen and act.Clap 1, 2, 3….While-task procedure: 1.Numbers a.Show and read 30, 40, 50, 60, 70, 80, 90, 100 Pay attention to the pronunciation “ ty”

b.Play a guessing game.What’s in my hand?(hiding the numbers)It’s …

c.Show and read.35, 45, 55, 65, 75, 85, 95.(one by one)2.Time a.T: What’s the time? It’s …..Read the sentences after the teachers.b.Practise the reading.6:20, 9:34, 5:45, 12:15 c.Show a clock and ask: T: What’s the time? S1, S2,S3….d.Play a game.The teacher turn the time and let the students guess.S1, S2, S3… 3.Practise the reading.4.Copy: one, two, three, four, five, six, seven, eight, nine, ten.Post-task activity: Divide the class into groups.Play a guessing game.One writes the time and the others guess.Consolidation: Listen and repeat.Read and words.Homework: 1.Listen and read.2.Dictate the learned words.Lesson 2 Language skills: Listening: Locate specific information in response to proper expressions: Speaking: Using “What’s the time? It’s….” to communicate with other learners.Writing: What’s the time? It’s … The learning materials: ______________________________________________________________________________________________________________ The learning course: Pre-task preparation: 1.Free talk Practise in pairs.Invite some pairs to have a talk.4.Revision a.Numbers.Show and read.b.Time.Read the times one by one.Pay attention to “ teen, ty” While-task procedure: 1.Show the clock and ask: What’s the time? It’s ….2.Work in pairs.Invite some to say.3.Play a guessing game.Guess: What’s the time?….4.Ask and answer P55 Practise in pairs.Check the answers.Post-task activity: Play “listening and drawing” in groups.Consolidation: 1.Copy: What’s the time? It’s…..2.Listen and draw: I want to see 7:15/8:30.Homework: Listen and read.Dictation.Lesson 3 Language skills: Listening: Locate specific information in response to proper expressions: Speaking: Using “What time do you….? I … at….” to communicate with other learners.Pronouncing the sounds of the letters “n, p” correctly.Reading: Read the text fluently.The learning materials: ______________________________________________________________________________________________________________ The learning course: Pre-task preparation: 1.Have a free talk 2.Revision: What’s the time? It’s….While-task procedure: 1.T to Ss: I get up at…(repeat sometimes)What time do you get up? 2.Encourage the students to answer: I get up at six o’clock.3.Learn to say: What time do you get up? I get up at six.4.Show some picture and learn to say: have breakfast, have lunch, have supper, go to school, watch TV 5.Listen to the tape and answer.Mike goes to school at ….Mike comes home at… 6.Listen and repeat.7.Practise the reading in parts and in roles.8.Listen and repeat Name new panda Peter The new panda’s name is Peter.Post-task activity: Do a survey.1.Find out your friends’ timetable by using “ What time do you…?” 2.Report _____ at ______ Consolidation: 1.Listen and read.2.Dictation.Homework: Listen and read.Finish the survey after class.Lesson 4 Language skills: Listening: Locate specific information in response to proper expressions: Speaking: Using the learned phrases to communicate with other learners.Writing: What time do you ….? I … at ….The learning materials: ______________________________________________________________________________________________________________ The learning course: Pre-task preparation: 1.Free talk 2.Revision Play a game.Count from one to hundred.Don’t say the multiples of “3”.Say “Hello”.Eg one, two, hello, four…

If one makes a mistake the other say.“… you’re out.”

3.Look and read.Have breakfast have lunch have supper go to school watch TV 4.Report.Talk about the survey finished after class.Find out: Who has the best time? Give some suggestions to sb.You … at….It’s too …

5.Copy: have breakfast

have lunch have supper go to school watch TV What time do you get up?

I get up at … While-task procedure: 1.Ss’ book page 52-53.Listen and repeat.2.Show some pictures and revise the words A supermarket

a park

a zoo a cinema the Great Wall 3.T to S1/S2 Excuse me, What’s the time? It’s… It’s time to go home/go to school.Yes.Let’s go.4.Make a dialogue in pairs.5.S1 to T Elicit: Shall we go by bus? Learn to say.Post-task activity: Make a dialogue in groups.Each one writes down a time and talk about the time and where to go Consolidation: Workbook p27-30 Homework: Listen and read.Dictation.Lesson 5 Language skills: Listening: Locate specific information in response to proper expressions: Speaking: Using the learned phrases to communicate with other learners.Writing: The learned words and sentences in Unit7.The learning materials: ______________________________________________________________________________________________________________ The learning course: Pre-task preparation: 1.Free talk: invite some students to say.2.Revision Revision

Look and march:

6:30a.m

go to bed

7:10a.m

watch TV

7:20a.m

have breakfast

9:00a.m

have lunch

11:30a.m

go home

4:40p.m

get up

5:30p.m

play a game

8:00p.m

have a supper

9:00p.m

go to bed

Look and do pair work.What’s the time? It’s….What time do you…?

While-task procedure: 1.Look and read P58 a.Read by oneself.b.Invite to read.c.Find out which picture is the funniest.Why? 2.Learn to sing a song.a.Learn to say the sentences.b.Practise the reading by adding actions.c.Learn to sing the song line by line.d.Practise the singing in groups.e.Invite some groups to sing.Post-task activity: Make a new song.Divide the students to make a new song.Encourage the students to make a new song.Enjoy the new songs.Consolidation: 1.Finish the workbook.2.Dictation.Homework: Listen and read.Dictation.

第三篇:sqlldr使用小結

sqlldr使用小結

sqlldr userid=lgone/tiger control=a.ctl

LOAD DATA

INFILE ’t.dat’ // 要導入的文件

// INFILE ’tt.date’ // 導入多個文件

// INFILE * // 要導入的內容就在control文件里 下面的BEGINDATA后面就是導入的內容

INTO TABLE table_name // 指定裝入的表

BADFILE ’c:\bad.txt’ // 指定壞文件地址

************* 以下是4種裝入表的方式

APPEND // 原先的表有數據 就加在后面

// INSERT // 裝載空表 如果原先的表有數據 sqlloader會停止 默認值

// REPLACE // 原先的表有數據 原先的數據會全部刪除

// TRUNCATE // 指定的內容和replace的相同 會用truncate語句刪除現存數據

************* 指定的TERMINATED可以在表的開頭 也可在表的內部字段部分

FIELDS TERMINATED BY ’,’ OPTIONALLY ENCLOSED BY ’“’

// 裝載這種數據: 10,lg,”“"lg”“",”lg,lg“

// 在表中結果: 10 lg ”lg“ lg,lg

// TERMINATED BY X ’0Array’ // 以十六進制格式 ’0Array’ 表示的// TERMINATED BY WRITESPACE // 裝載這種數據: 10 lg lg

TRAILING NULLCOLS ************* 表的字段沒有對應的值時允許為空

************* 下面是表的字段

(col_1 , col_2 ,col_filler FILLER // FILLER 關鍵字 此列的數值不會被裝載

// 如: lg,lg,not 結果 lg lg)

// 當沒聲明FIELDS TERMINATED BY ’,’ 時

//(// col_1 [interger external] TERMINATED BY ’,’ ,// col_2 [date ”dd-mon-yyy“] TERMINATED BY ’,’ , // col_3 [char] TERMINATED BY ’,’ OPTIONALLY ENCLOSED BY ’lg’

//)

// 當沒聲明FIELDS TERMINATED BY ’,’用位置告訴字段裝載數據

//(// col_1 position(1:2),// col_2 position(3:10),// col_3 position(*:16), // 這個字段的開始位置在前一字段的結束位置

// col_4 position(1:16),// col_5 position(3:10)char(8)// 指定字段的類型

//)

BEGINDATA // 對應開始的 INFILE * 要導入的內容就在control文件里

10,Sql,what

20,lg,show

=======================================

//////////// 注意begindata后的數值前面不能有空格***** 普通裝載

LOAD DATA

INFILE *

INTO TABLE DEPT

REPLACE

FIELDS TERMINATED BY ’,’ OPTIONALLY ENCLOSED BY ’”’

(DEPTNO,DNAME,LOC)

BEGINDATA

10,Sales,“"”USA“"”

20,Accounting,“Virginia,USA”

30,Consulting,Virginia

40,Finance,Virginia

50,“Finance”,“",Virginia // loc 列將為空

60,”Finance“,Virginia // loc 列將為空***** FIELDS TERMINATED BY WHITESPACE 和 FIELDS TERMINATED BY x’0Array’ 的情況

LOAD DATA

INFILE *

INTO TABLE DEPT

REPLACE

FIELDS TERMINATED BY WHITESPACE

--FIELDS TERMINATED BY x’0Array’

(DEPTNO,DNAME,LOC)

BEGINDATA Sales Virginia ***** 指定不裝載那一列

LOAD DATA

INFILE *

INTO TABLE DEPT

REPLACE

FIELDS TERMINATED BY ’,’ OPTIONALLY ENCLOSED BY ’”’

(DEPTNO,FILLER_1 FILLER, // 下面的 “Something Not To Be Loaded” 將不會被裝載

DNAME,LOC)

BEGINDATA

20,Something Not To Be Loaded,Accounting,“Virginia,USA” ***** position的列子

LOAD DATA

INFILE *

INTO TABLE DEPT

REPLACE

(DEPTNO position(1:2),DNAME position(*:16), // 這個字段的開始位置在前一字段的結束位置

LOC position(*:2Array),ENTIRE_LINE position(1:2Array))

BEGINDATA

10Accounting Virginia,USA

***** 使用函數 日期的一種表達 TRAILING NULLCOLS的使用

LOAD DATA

INFILE *

INTO TABLE DEPT

REPLACE

FIELDS TERMINATED BY ’,’

TRAILING NULLCOLS // 其實下面的ENTIRE_LINE在BEGINDATA后面的數據中是沒有直接對應

// 的列的值的 如果第一行改為

10,Sales,Virginia,1/5/2000, 就不用TRAILING NULLCOLS了

(DEPTNO,DNAME “upper(:dname)”, // 使用函數

LOC “upper(:loc)”,LAST_UPDATED date ’dd/mm/yyyy’, // 日期的一種表達方式 還有’dd-mon-yyyy’ 等

ENTIRE_LINE “:deptno||:dname||:loc||:last_updated”)

BEGINDATA

10,Sales,Virginia,1/5/2000

20,Accounting,Virginia,21/6/1ArrayArrayArray 30,Consulting,Virginia,5/1/2000

40,Finance,Virginia,15/3/2001 ***** 使用自定義的函數 // 解決的時間問題

create or replace

function my_to_date(p_string in varchar2)return date

as

type fmtArray is table of varchar2(25);

l_fmts fmtArray := fmtArray(’dd-mon-yyyy’, ’dd-month-yyyy’,’dd/mm/yyyy’,’dd/mm/yyyy hh24:mi:ss’);

l_return date;

begin

for i in 1..l_fmts.count

loop

begin

l_return := to_date(p_string, l_fmts(i));

exception

when others then null;

end;EXIT when l_return is not null;

end loop;

if(l_return is null)

then

l_return :=

new_time(to_date(’01011Array70’,’ddmmyyyy’)+ 1/24/60/60 *

p_string, ’GMT’, ’EST’);

end if;

return l_return;

end;

/

LOAD DATA

INFILE *

INTO TABLE DEPT

REPLACE

FIELDS TERMINATED BY ’,’

TRAILING NULLCOLS

(DEPTNO, DNAME “upper(:dname)”,LOC “upper(:loc)”,LAST_UPDATED “my_to_date(:last_updated)” // 使用自定義的函數)

BEGINDATA

10,Sales,Virginia,01-april-2001

20,Accounting,Virginia,13/04/2001

30,Consulting,Virginia,14/04/2001 12:02:02

40,Finance,Virginia,Array872682Array7

50,Finance,Virginia,02-apr-2001

60,Finance,Virginia,Not a date ***** 合并多行記錄為一行記錄

LOAD DATA

INFILE *

concatenate 3 // 通過關鍵字concatenate 把幾行的記錄看成一行記錄

INTO TABLE DEPT

replace

FIELDS TERMINATED BY ’,’

(DEPTNO, DNAME “upper(:dname)”,LOC “upper(:loc)”,LAST_UPDATED date ’dd/mm/yyyy’)

BEGINDATA

10,Sales, // 其實這3行看成一行 10,Sales,Virginia,1/5/2000

Virginia,1/5/2000

// 這列子用 continueif list=“,” 也可以

告訴sqlldr在每行的末尾找逗號 找到逗號就把下一行附加到上一行

LOAD DATA

INFILE *

continueif this(1:1)= ’-’ // 找每行的開始是否有連接字符-有就把下一行連接為一行

// 如-10,Sales,Virginia,// 1/5/2000 就是一行 10,Sales,Virginia,1/5/2000

// 其中1:1 表示從第一行開始 并在第一行結束 還有continueif next 但continueif list最理想

INTO TABLE DEPT replace

FIELDS TERMINATED BY ’,’

(DEPTNO,DNAME “upper(:dname)”,LOC “upper(:loc)”,LAST_UPDATED date ’dd/mm/yyyy’)

BEGINDATA // 但是好象不能象右面的那樣使用

-10,Sales,Virginia,-10,Sales,Virginia,1/5/2000 1/5/2000

-40, 40,Finance,Virginia,13/04/2001

Finance,Virginia,13/04/2001 ***** 載入每行的行號

load data

infile *

into table t

replace

(seqno RECNUM //載入每行的行號

text Position(1:1024))

BEGINDATA fsdfasj //自動分配一行號給載入 表t 的seqno字段 此行為 1

fasdjfasdfl // 此行為 2...Array ***** 載入有換行符的數據

注意: unix 和 windows 不同 \\n & /n

< 1 > 使用一個非換行符的字符

LOAD DATA

INFILE *

INTO TABLE DEPT

REPLACE

FIELDS TERMINATED BY ’,’

TRAILING NULLCOLS

(DEPTNO,DNAME “upper(:dname)”,LOC “upper(:loc)”,LAST_UPDATED “my_to_date(:last_updated)”,COMMENTS “replace(:comments,’\n’,chr(10))” // replace 的使用幫助轉換換行符)

BEGINDATA

10,Sales,Virginia,01-april-2001,This is the Sales\nOffice in Virginia

20,Accounting,Virginia,13/04/2001,This is the Accounting\nOffice in Virginia

30,Consulting,Virginia,14/04/2001 12:02:02,This is the Consulting\nOffice in Virginia

40,Finance,Virginia,Array872682Array7,This is the Finance\nOffice in Virginia

< 2 > 使用fix屬性

LOAD DATA

INFILE demo17.dat “fix 101”

INTO TABLE DEPT

REPLACE

FIELDS TERMINATED BY ’,’

TRAILING NULLCOLS

(DEPTNO,DNAME “upper(:dname)”,LOC “upper(:loc)”,LAST_UPDATED “my_to_date(:last_updated)”,COMMENTS)

demo17.dat 10,Sales,Virginia,01-april-2001,This is the Sales

Office in Virginia

20,Accounting,Virginia,13/04/2001,This is the Accounting

Office in Virginia

30,Consulting,Virginia,14/04/2001 12:02:02,This is the Consulting

Office in Virginia

40,Finance,Virginia,Array872682Array7,This is the Finance

Office in Virginia

// 這樣裝載會把換行符裝入數據庫 下面的方法就不會 但要求數據的格式不同

LOAD DATA

INFILE demo18.dat “fix 101”

INTO TABLE DEPT

REPLACE

FIELDS TERMINATED BY ’,’ OPTIONALLY ENCLOSED BY ’“’

TRAILING NULLCOLS

(DEPTNO, DNAME ”upper(:dname)“,LOC ”upper(:loc)“,LAST_UPDATED ”my_to_date(:last_updated)“,COMMENTS)

demo18.dat

10,Sales,Virginia,01-april-2001,”This is the Sales

Office in Virginia“

20,Accounting,Virginia,13/04/2001,”This is the Accounting

Office in Virginia“

30,Consulting,Virginia,14/04/2001 12:02:02,”This is the Consulting

Office in Virginia“

40,Finance,Virginia,Array872682Array7,”This is the Finance

Office in Virginia“

< 3 > 使用var屬性

LOAD DATA

INFILE demo1Array.dat ”var 3“

// 3 告訴每個記錄的前3個字節表示記錄的長度 如第一個記錄的 071 表示此記錄有 71 個字節

INTO TABLE DEPT

REPLACE

FIELDS TERMINATED BY ’,’

TRAILING NULLCOLS

(DEPTNO,DNAME ”upper(:dname)“,LOC ”upper(:loc)“,LAST_UPDATED ”my_to_date(:last_updated)“,COMMENTS)

demo1Array.dat

07110,Sales,Virginia,01-april-2001,This is the Sales

Office in Virginia

07820,Accounting,Virginia,13/04/2001,This is the Accounting

Office in Virginia

08730,Consulting,Virginia,14/04/2001 12:02:02,This is the Consulting

Office in Virginia

07140,Finance,Virginia,Array872682Array7,This is the Finance

Office in Virginia

< 4 > 使用str屬性

// 最靈活的一中 可定義一個新的行結尾符 win 回車換行 : chr(13)||chr(10)

此列中記錄是以 a|\r\n 結束的select utl_raw.cast_to_raw(’|’||chr(13)||chr(10))from dual;

結果 7C0D0A

LOAD DATA

INFILE demo20.dat ”str X’7C0D0A’“

INTO TABLE DEPT

REPLACE

FIELDS TERMINATED BY ’,’

TRAILING NULLCOLS

(DEPTNO,DNAME ”upper(:dname)“,LOC ”upper(:loc)“,LAST_UPDATED ”my_to_date(:last_updated)",COMMENTS)

demo20.dat 10,Sales,Virginia,01-april-2001,This is the Sales

Office in Virginia|

20,Accounting,Virginia,13/04/2001,This is the Accounting

Office in Virginia|

30,Consulting,Virginia,14/04/2001 12:02:02,This is the Consulting

Office in Virginia|

40,Finance,Virginia,Array872682Array7,This is the Finance

Office in Virginia|

================================

象這樣的數據 用 nullif 子句

10-jan-200002350Flipper seemed unusually hungry today.10510-jan-20000ArrayArray45Spread over three meals.id position(1:3)nullif id=blanks // 這里可以是blanks 或者別的表達式

// 下面是另一個列子 第一行的 1 在數據庫中將成為 null

LOAD DATA INFILE *

INTO TABLE T

REPLACE

(n position(1:2)integer external nullif n=’1’,v position(3:8))

BEGINDATA 10

20lg

-----------------------------

第四篇:GridCtrl使用小結

http://www.tmdps.cn/

GridCtrl使用詳解

CGridCtrl類主要是通過grid樣式顯示數據 在單文檔中的使用方法

步驟一 初始化 在CView類的.h頭文件中包含文件:

#include “Gridctrl.h” 并且手寫加入如下的成員函數:

CGridCtrl * m_pGridCtrl;步驟二 構造與析構 構造函數中:

m_pGridCtrl = NULL;析構函數中:

if(m_pGridCtrl)

delete m_pGridCtrl;步驟三 如果需要打印功能的話添加同名打印函數代碼 在CView類的OnBeginPrinting()函數中添加如下代碼: if(m_pGridCtrl)

m_pGridCtrl->OnBeginPrinting(pDC,pInfo);//簡單吧,這就是類的好處其它兩個打印函數也一樣的做法.步驟四 在OnInitaUpdate()函數中或者你自己添加的要顯示Grid的消息函數中如下初始化: //創建非模式對話框 CDlg *dlg;dlg=new CDlg();dlg->Create(IDD_Dlg,this);

//初始化GridCtrl控件 if(m_pGridCtrl!=NULL){ deletem_pGridCtrl;m_pGridCtrl=NULL;} if(m_pGridCtrl == NULL){ // Create the Gridctrl object m_pGridCtrl = new CGridCtrl;if(!m_pGridCtrl)return 0;// Create the Gridctrl window CRectrect;GetClientRect(rect);m_pGridCtrl->Create(rect, this, 100);// fill it up with stuff m_pGridCtrl->SetEditable(false);m_pGridCtrl->SetTextBkColor(RGB(0xFF, 0xFF, 0xE0));//黃色背景 m_pGridCtrl->EnableDragAndDrop(false);try { m_pGridCtrl->SetRowCount(k);//設置行數為k行 m_pGridCtrl->SetColumnCount(4);//k列

m_pGridCtrl->SetFixedRowCount(1);//標題行為一行

http://www.tmdps.cn/

m_pGridCtrl->SetFixedColumnCount(1);//同上 } catch(CMemoryException* e){ e->ReportError();e->Delete();return 0;} //填充列標題 int row=0;for(int col=0;col<4;col++){ GV_ITEM Item;Item.mask = GVIF_TEXT|GVIF_FORMAT;Item.row = row;Item.col = col;if(col==0){ Item.nFormat = DT_CENTER|DT_WORDBREAK;Item.strText.Format(_T(“【類別】”),col);} else if(col==1){ Item.nFormat = DT_LEFT|DT_WORDBREAK;Item.strText.Format(_T(“第一列”),col);} else if(col==2){ Item.nFormat = DT_LEFT|DT_WORDBREAK;Item.strText.Format(_T(“第二列”),col);} m_pGridCtrl->SetItem(&Item);} // fill rows/cols with text for(row = 1;row < k;row++)for(col = 0;col < h;col++){ GV_ITEM Item;Item.mask = GVIF_TEXT|GVIF_FORMAT;Item.row = row;Item.col = col;if(col < 1){ //行標題頭

Item.nFormat = DT_CENTER|DT_VCENTER |DT_SINGLELINE|DT_END_ELLIPSIS |DT_NOPREFIX;Item.strText.Format(_T(“%d”),row);

http://www.tmdps.cn/

} else if(col==1){ //第一列的值 Item.nFormat = DT_CENTER|DT_VCENTER |DT_SINGLELINE|DT_END_ELLIPSIS |DT_NOPREFIX;str=“aa”;Item.strText.Format(_T(“%s”),str);}else if(col==2){ //第二列第值 Item.nFormat = DT_CENTER|DT_VCENTER |DT_SINGLELINE|DT_END_ELLIPSIS |DT_NOPREFIX;CStringstr;str=“bb”;Item.strText.Format(_T(“%s”),str);} m_pGridCtrl->SetItem(&Item);} m_pGridCtrl->AutoSize();

//--------------設置行列距------------------for(int a=1;aSetRowHeight(a,21);//設置各行高 m_pGridCtrl->SetRowHeight(0,24);//設置0行高 m_pGridCtrl->SetColumnWidth(1,110);//設置2列寬 m_pGridCtrl->SetColumnWidth(2,160);//設置3列寬 m_pGridCtrl->SetColumnWidth(3,100);//設置4列寬 } 上例取自實際工程,稍有修改!部分注釋: void SetVirtualMode(TRUE)//設為虛模式 BOOL SetRowCount(intnRows)//設置總的行數。BOOL SetFixedRowCount(intnFixedRows = 1)//設置固定的行數據 BOOL SetColumnCount(intnCols)//設置列數 BOOL SetFixedColumnCount(intnFixedCols = 1)//設置固定的列數

步驟五: 添加WM_SIZE消息,調整控件的界面占屏幕大小

if(m_pGridCtrl->GetSafeHWnd())

{

CRectrect;

GetClientRect(rect);

m_pGridCtrl->MoveWindow(rect);

}

在對話框中的使用方法 步驟一 創建數據顯示表格對話框

在資源管理器中新創建一個對話框,假設為CDlgTestReportBox。從工具箱中加入Custom Control,就是人頭像的那個,將其區域拉伸至要顯示數據表格的大小,充滿整個對話框。

在CDlgTestReportBox類的頭文件中: #include “GridCtrl.h”

http://www.tmdps.cn/

再定義成員變量: CGridCtrl* m_pGrid;添加OnShowWindow()消息處理函數如下:

voidCDlgTestReportBox::OnShowWindow(BOOL bShow, UINT nStatus){ CDialog::OnShowWindow(bShow, nStatus);// TODO: Add your message handler code here if(m_pGrid!=NULL){ deletem_pGrid;m_pGrid=NULL;} if(m_pGrid==NULL){ m_pGrid=new CGridCtrl;CRectrect;GetDlgItem(IDC_ReportAera)->GetWindowRect(rect);//得到顯示區域 ScreenToClient(&rect);m_pGrid->Create(rect,this,100);m_pGrid->SetEditable(false);m_pGrid->SetTextBkColor(RGB(0xFF, 0xFF, 0xE0));//黃色背景 try { m_pGrid->SetRowCount(10);//初始為10行

m_pGrid->SetColumnCount(11);//初始化為11列 m_pGrid->SetFixedRowCount(1);//表頭為一行 m_pGrid->SetFixedColumnCount(1);//表頭為一列 } catch(CMemoryException* e){ e->ReportError();e->Delete();// return FALSE;} for(int row = 0;row GetRowCount();row++)for(int col = 0;col GetColumnCount();col++){ //設置表格顯示屬性 GV_ITEM Item;Item.mask = GVIF_TEXT|GVIF_FORMAT;Item.row = row;Item.col = col;if(row==0&&col==0)//第(0,0)格

http://www.tmdps.cn/

{ Item.nFormat = DT_CENTER|DT_WORDBREAK;Item.szText.Format(_T(“報表顯示”),col);} else if(row < 1)//設置0行表頭顯示 { Item.nFormat = DT_CENTER|DT_WORDBREAK;Item.szText.Format(_T(“ 項目%d”),col);} else if(col < 1)//設置0列表頭顯示 { if(rowGetRowCount()-4){ Item.nFormat = DT_CENTER|DT_VCENTER|DT_SINGLELINE|DT_END_ELLIPSIS;Item.szText.Format(_T(“第%d次”),row);} } else { Item.nFormat = DT_CENTER|DT_VCENTER|DT_SINGLELINE|DT_END_ELLIPSIS;Item.szText.Format(_T(“"),2);} m_pGrid->SetItem(&Item);} m_pGrid->Invalidate();} //--------------設置行列距------------------for(int a=0;aGetRowCount();a++)m_pGrid->SetRowHeight(a,16);//設置各行高 m_pGrid->SetColumnWidth(0,58);//設置0列寬 for(int b=1;bGetColumnCount();b++)m_pGrid->SetColumnWidth(b,59);//設置各列寬 }

步驟二 嵌入上面的對話框 顯示數據

在你需要顯示數據的對話框上的頭文件中,假設為CDlgTest,加入 #include ”GridCtrl.h“ CDlgTestReportBox* m_pTestReportBox;將數據顯示對話框放入你的對話框相應位置上,在CDlgTest::OnInitDialog()中:

if(!m_pTestReportBox){

m_pTestReportBox=new CDlgTestReportBox(this);} m_pTestReportBox->Create(IDD_DlgTestReportBox,this);

http://www.tmdps.cn/

//定義區域變量 CRectrectDraw;GetDlgItem(IDC_AeraReport)->GetWindowRect(rectDraw);ScreenToClient(&rectDraw);//動態測試數據顯示區域rectDraw //將對應的對話框放到指定區域 m_pTestReportBox->MoveWindow(rectDraw);m_pTestReportBox->ShowWindow(SW_SHOW);自定義填充數據的函數:CDlgTest::FillGrid()如下: CGridCtrl* pGrid=m_pTestReportBox->m_pGrid;for(int row = pGrid->GetRowCount()-1;row >= pGrid->GetRowCount()-3;row--){ for(int col = 1;col <= pGrid->GetColumnCount();col++){ GV_ITEM Item;Item.mask = GVIF_TEXT|GVIF_FORMAT;Item.row = row;Item.col = col;if(row==pGrid->GetRowCount()-3&&col>0)//平均值 { if(col==10){ Item.nFormat = DT_CENTER|DT_WORDBREAK;Item.szText.Format(_T(” %6.2f “),avjch);} else{ Item.nFormat = DT_CENTER|DT_WORDBREAK;Item.szText.Format(_T(” %6.2f “),av[col-1]);} } pGrid->SetItem(&Item);//提交數據 if(row==0||col==0){ COLORREF clr = RGB(0, 0, 0);pGrid->SetItemBkColour(row, col, clr);pGrid->SetItemFgColour(row, col, RGB(255,0,0));} }//循環結束

pGrid->Invalidate();} CGRIFCTRL原理:

DBGRID和一般的GRID的不同之處在于,一般的GRID并不適合顯示大的數據量,如果一個表中有上萬條記錄都要插入到GRID中,這將是一個很慢的過程,并且在GRID中移動滾動條時,它的記錄的滾動也是很慢。而DBGRID并不會真正把這些記錄的數據全部插入到控件中,當DBGRID的滾動條滾動時,它會根據DBGRID的顯示面積的大小和查詢得到的總記錄數計算出當前應該顯示哪些行,然后插入

http://www.tmdps.cn/

到表格中,這樣一來,速度肯定快,而且沒有數據量多少的限制。幸運的是,CGridCtrl類已經為我們提供了這種機制,它是采用虛模式實現的。使用這種方式,即使你向這個該控件插入一百萬條數據,它并不會真的生成一百萬行,而是隨著你的滾動條的滾動,計算出在屏幕上要顯示的行和列,然后會向你提供一個接口,通過這個接口,你可以在這兒設置你要顯示的數據。下面給出使用CGridCtrl控件的虛模式的步驟: 步驟一 初始化

在視圖的初始化函數里添加如下代碼:

void SetVirtualMode(TRUE)

設為虛模式

BOOL SetRowCount(intnRows)

設置總的行數。

BOOL SetFixedRowCount(intnFixedRows = 1)

設置固定的行數據 BOOL SetColumnCount(intnCols)

設置列數 BOOL SetFixedColumnCount(intnFixedCols = 1)設置固定的列數 步驟二 響應消息 顯示數據

我們假設CGridCtrl是放在單文檔視圖中,而且它關聯的變量是m_GridCtrl,利用ClassWizard添加視圖的OnNotify響應函數。這個響應函數的寫法是固定的,類似下面的代碼:

BOOL CGridCtrlTestView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult){ if(wParam ==(WPARAM)m_Grid.GetDlgCtrlID()){ *pResult = 1;GV_DISPINFO *pDispInfo =(GV_DISPINFO*)lParam;if(GVN_GETDISPINFO == pDispInfo->hdr.code){ //這是添加的函數,在這個函數里設置當前要顯示的數據 SetGridItem(pDispInfo);return TRUE;} } returnCGridCtrlTestView::OnNotify(wParam, lParam, pResult);} 在上面的代碼中,SetGridItem(pDispInfo)是添加的函數,在這個函數里我們設置當前要顯示的數據。pDispInfo是一個GV_DISPINFO的結構體對象,它包含了每個單元格的信息,如行號,列號,有沒有位圖,背景色,前景色等。CGRIDCTRL會把當前要顯示那個單元格行號,列號傳遞給我們,我們只要設置里面顯示的數據就可以了。如下面是一個顯示數據的例子。

voidCGridCtrlTestView::SetGridItem(GV_DISPINFO *pDispInfo){

pDispInfo->item.strText.Format(”row%d,col%d",pDispInfo->it

http://www.tmdps.cn/

em.row, pDispInfo->item.col);}

第五篇:git使用小結

git使用小結

1.git-config 配置git,一般需要配置的是user.name,user.email,有時sendemail.smtpserver也要配置,比如,我使用msmtp:

git-config –global sendemail.smtpserver /usr/local/bin/msmtp 如果你僅僅是想給這一個項目配置,把–global選項去掉。查看配置的選項是–list。2.git-pull git-pull沒必要帶后面那長長的url(-_-b 我那么用了好多次,不過我用的是!git-pull)。如果你在給Linux內核這樣的項目工作,記得git-pull之前檢查是不是在master分支。3.git-format-patch 如果發送多于一個補丁,最好用[PATCH n/m]的形式,加上-n。加signed-off-by那行是-s。指定為幾次commit生成補丁,直接加數字,比如,$ git-format-patch-3 檢查補丁是–check,最好加上這個。4.git-send-email 如果一次提交補丁比較多,最好用–no-chain-reply-to,因為如果不用的話,在thread嵌套會太深,不利于別人閱讀。這個也可以通過選項sendemail.chainreplyto來控制。–signed-off-by-cc,要加上,可以省去手工處理的麻煩。–compose用來編輯[PATCH 0/m],這個一般是對整個patchset的描述。–smtp-server,如果你不想用git-config指定的話,用它也行。–cc和–to就不用說了。5.git-commit 在git-commit之前最好git-add。git-commit幾個常用的選項有:-s 會增加Signed-off-by行,-e編輯commit message,-a表示all,-m是指定commit信息。同樣,刪除文件是先git-rm。查看commit列表用git-rev-list,查看某個commit用git-show,查看commit的日志用git-log,-p是以補丁的形式查看。6.其它 git-diff也可以比較不同版本之間的差異,某個版本的某個文件的差異,如: $ git-diff v2.6.22 $ git diff v2.6.20 init/main.c $ git-diff v2.6.23 v2.6.24-rc1 init/main.c git-whatchanged也差不多: $ git-whatchanged-p init/main.c 7.錯誤提交了commit怎么辦? a)git-revert 這個本身就會產生一個commit,如果用得多了會讓你的log看起來不那么干凈。;-)b)git-reset 用這個要當心,它會把那個commit之后的commit全部刪除。一個好的辦法是:先建立一個臨時的分支,然后再git-reset,再git-rebase,最后再刪除臨時的分支。詳細可以看這里。

下載Latex使用小結word格式文檔
下載Latex使用小結.doc
將本文檔下載到自己電腦,方便修改和收藏,請勿使用迅雷等下載。
點此處下載文檔

文檔為doc格式


聲明:本文內容由互聯網用戶自發貢獻自行上傳,本網站不擁有所有權,未作人工編輯處理,也不承擔相關法律責任。如果您發現有涉嫌版權的內容,歡迎發送郵件至:645879355@qq.com 進行舉報,并提供相關證據,工作人員會在5個工作日內聯系你,一經查實,本站將立刻刪除涉嫌侵權內容。

相關范文推薦

    ICC使用小結

    ICC使用小結(1) ICC的輸入文件 MilkyWay(physical library),TLUPlus文件(interconnect文件),lib文件(logical library),netlist,constraints(sdc),floorplan文件(.fp或.def) 由于ICC會使用Mil......

    Heritrix使用小結

    Heritrix使用小結 1. Heritrix 簡介 Heritrix是一個專門為互聯網上的網頁進行存檔而開發的網頁檢索器。它使用Java編寫并且完全開源。它主要的用戶界面可以通過一個web流量......

    NB-IOT使用小結

    一、NB-IOT簡介 萬物互聯的時代正以極其迅速的腳步走進我們的生活,據估計2020年大約有500億臺設備連接到互聯網。而實現萬物互聯的基礎之一在于安全、可靠的數據傳輸。隨著5G......

    雅思口語a situation of being late

    “遲到”這類題目是最近出現頻率比較高的雅思口語話題。而在短短的1分鐘之內,考生們很難一下子想到如何去描述遲到這一場景。所以環球雅思老師為考生們來具體分析這個話題,并......

    Unit 7 Its late 教案

    Unit 7 It’s late (A) 教學內容:Unit 7 part A 教學目標: 1、知識目標: (1)、掌握單詞,詞組: have breakfast, come home, thirty-five, forty. (2)、能聽懂、會說、會讀日常交際......

    Cover late(英文版求職信)r

    Cover later Dear Mr.Norman, I am a second year student majoring Business English at zilang college . I love English very much , this is probably why I choose th......

    late autumn 晚秋經典英文影片簡介

    Late autumn Anna a Chinese- American who has been in prison for 7 years because she killed her husband during their fight when he happened to know that she was......

    LoadRunner檢查點使用小結

    LoadRunner檢查點使用小結 LR中檢查點有兩種:圖片和文字。這兩種檢查點可用以下三個函數實現:web_find()、web_reg_find()和web_image_check() 下面分別介紹三種函數的用法 1......

主站蜘蛛池模板: 久久亚洲男人第一av网站| 亚洲乱亚洲乱妇50p| 日本午夜免a费看大片中文4| 亚洲乱码日产精品一二三| 99久久精品无码一区二区毛片| 亚洲精品第一国产综合亚av| 中文字幕专区高清在线观看| 亚洲欧美国产精品久久| 亚洲中文字幕精品久久久久久直播| 少妇无码av无码专区线| 亚洲国产福利成人一区| 无码日韩做暖暖大全免费不卡| 国产精品第一区揄拍无码| 欧美丰满肥婆videos| 亚洲人成精品久久久久| 欧洲美熟女乱又伦av影片| 天堂网www中文在线| 午夜亚洲国产理论片二级港台二级| 国产真实交换多p免视频| 精品国产福利拍拍拍| 国产一区二区无码蜜芽精品| 国产二级一片内射视频插放| 亚洲人成影院在线观看| 男人的天堂aⅴ在线| 亚洲综合激情另类小说区| 亚洲人成小说网站色在线| 免费看久久久性性| 国产美女亚洲精品久久久久| 纯肉无遮挡无码日本动漫| 女人被爽到高潮视频免费| 亚洲精品久久久久久久不卡四虎| 国语自产精品视频在 视频| 亚洲色无码中文字幕yy51999| 永久天堂网av手机版| 精品人妻一区二区三区四区| 日韩精品无码一区二区三区视频| 亚洲午夜无码毛片av久久京东热| 欧美午夜精品一区二区蜜桃| 中文字幕日韩人妻不卡一区| 欧美人与动牲交a精品| 天天狠天天透天干天天怕∴|