Language summary

  • Published on
    31-May-2015

  • View
    412

  • Download
    22

Embed Size (px)

Transcript

<ul><li> 1. v1.0 Crifan Li Word VBA,Excel VBA,Python,C++,Javascript,C# HTML7zip1HTML8HTMLs 2HTMLs 9PDF3PDF10CHM4CHM11TXT5TXT12RTF6RTF13WEBHELP 7WEBHELP 14HTML http://www.crifan.com/files/doc/docbook/language_summary/release/html/language_ summary.html bug http://www.crifan.com/bbs/categories/language_summary/ 1.02012-08-09crl1. 2. WindowscmdPython 3. C++ 4. Javascript 5. Word VBA 6. Excel VBA 17. Pythonhttp://www.crifan.com/files/doc/docbook/language_summary/release/html/language_summary.html http://www.crifan.com/files/doc/docbook/language_summary/release/htmls/index.html 3 http://www.crifan.com/files/doc/docbook/language_summary/release/pdf/language_summary.pdf 4 http://www.crifan.com/files/doc/docbook/language_summary/release/chm/language_summary.chm 5 http://www.crifan.com/files/doc/docbook/language_summary/release/txt/language_summary.txt 6 http://www.crifan.com/files/doc/docbook/language_summary/release/rtf/language_summary.rtf 7 http://www.crifan.com/files/doc/docbook/language_summary/release/webhelp/index.html 8 http://www.crifan.com/files/doc/docbook/language_summary/release/html/language_summary.html.7z 9 http://www.crifan.com/files/doc/docbook/language_summary/release/htmls/index.html.7z 10 http://www.crifan.com/files/doc/docbook/language_summary/release/pdf/language_summary.pdf.7z 11 http://www.crifan.com/files/doc/docbook/language_summary/release/chm/language_summary.chm.7z 12 http://www.crifan.com/files/doc/docbook/language_summary/release/txt/language_summary.txt.7z 13 http://www.crifan.com/files/doc/docbook/language_summary/release/rtf/language_summary.rtf.7z 14 http://www.crifan.com/files/doc/docbook/language_summary/release/webhelp/language_summary.webhelp.7z 2</li></ul><p> 2. 8. C# 9. PythoncrifanLib.py 10. C#crifanLib.cs 11. PythonBeautifulSoup 12. Pythonbook 13. C#book 3. : Crifan Liv1.0 2012-08-09 2012 Crifan, http://crifan.com 15- 2.5 (CC BY-NC 2.5)15http://www.crifan.com/files/doc/docbook/soft_dev_basic/release/html/soft_dev_basic.html#cc_by_nc 4. 1. .............................................................................................................. 1 1.1. ................................................................................................... 1 2. .............................................................................................................................. 2 2.1. ............................................................................................................. 2 2.2. Python ........................................................................................................ 2 2.3. Word VBA ................................................................................................................ 2 2.3.1. word vbaVBA ................................................................... 2 2.3.2. Word VBA .............................................................................. 2 2.3.3. Word vba ......................................................................................... 3 2.3.4. ........................................................................................ 9 2.4. Excel VBA ............................................................................................................... 10 2.4.1. Excel VBA ....................................................................... 10 2.4.2. Excel VBA .......................................................................... 13 2.4.3. Excel VBA ............................................................................. 14 2.4.4. ...................................................................................... 15 2.5. Javascript ................................................................................................................ 16 2.5.1. javascript ........................................................................................ 16 2.6. PHP ........................................................................................................................ 19 2.6.1. PHP ................................................................................................ 19 2.6.2. crifanPHP .............................................................................................. 19 2.6.2.1. ......................................................................... 20 2.6.2.1.1. :addTailSlash .................................................... 20 2.6.2.1.2. :removeFirstSlash ............................................ 20 2.6.2.1.3. :strExistInArr ....................... 20 2.6.2.1.4. :genValidSuffix ...................... 21 2.6.2.2. ............................................................................ 22 2.6.2.2.1. :getFileSuffix ................................................ 22 2.6.2.2.2. ............................. 22 2.7. Linux Shell .............................................................................................................. 22 2.7.1. Linux Shell ...................................................................................... 22 2.7.2. Linux Shell ...................................................................................... 25 2.8. Windows Batch File ................................................................................................ 25 2.8.1. Windows Batch File .............................................................................. 25 2.8.2. Windows Batch File ........................................................................ 25 2.8.3. Windows Batch File ........................................................................ 25 3. ............................................................................................................................ 26 3.1. ........................................................................................................... 26 3.2. C# ............................................................................................................. 26 3.3. C++ ........................................................................................................................ 26 3.3.1. C++ ................................................................................................ 26 4. .................................................................................................................. 28 4.1. XML ........................................................................................................................ 28 4.1.1. XML ...................................................................................... 28 4.2. HTML ..................................................................................................................... 28 4.2.1. HTMl .............................................................................................. 28 4.2.2. HTML .................................................................................... 28 ................................................................................................................................ 30iv 5. 3.1. protectedpublicprivate ............................................................................ 26v 6. 2.1. 2.2. 2.3. 2.4.addTailSlash ...................................................................................................... strExistInArr ....................................................................................................... genValidSuffix ................................................................................................... getFileSuffix ......................................................................................................20 21 22 22vi 7. 1 1.1. 1 8. 2 2.1. 2.2. Python PythonPython12.3. Word VBA 2.3.1. word vbaVBA VBAVisual Basic For Application VBApplicationApplicationExcelword wordVBWord VBA Excel "Excel" wordexcel word xml [2]"VBAVBA VBAVBA "2.3.2. Word VBA Word VBAstory, character,table,cell,row, columnsection,paragrah,line,SelectionSelection.XXX XXX 1. Story word 1http://www.crifan.com/files/doc/docbook/python_summary/release/html/python_summary.html2 9. 2. Text 3. Sections wordstory 4. Paragraphs 5. Sentences 6. Words 7. Characters 8. TablesCellsRowsColumns cellcell Range Print Selection.Tables(2).Cell(3, 4) Cell(2,3)1 CExcel0 9. End Start Selection.StartSelection.End Selection.StartSelection.End slection_len = Selection.End - Selection.Start 10.2.3.3. Word vba 1. range Selection.Text Selection.Range.Text3 10. 2. VBA""C"!=" 3. wdMovewdExtend Range Selection.MoveDown Unit:=wdLine , Count:=1, Extend:=wdExtend wdLineUnit UnitwdParagraphwdWindowwdScreen WdExtendwdMode VBA wdMove wdExtend wdMove mdMove wdExtend 4. / Selection.GoTo What:=wdGoToHeading , Which:=wdGoToAbsolute , Count:=5 Goto wdGoToHeadingheading wdGoToAbsolute wdGoToFirst, wdGoToRelativewdGoToLast,wdGoToNext,wdGoToPrevious,[3] / Selection.HomeKey Unit:=wdStory , Extend:=wdMove wdStorywdUnits wdColumnwdLinewdRow 5. 4 11. 2.1 PAPRBY / RubyVerifoneDefaults 2.1 2.1 Selection.Bookmarks("headinglevel ").Range.ListFormat.ListString headinglevelVBA [5] 6. VBAHelp Function [Public | Private | Friend] [Static] Function name [(arglist)] [As type] [statements] [name = expression ] [Exit Function] [statements] [name = expression] End Function name expression name 0 ("")Variant Empty Function name Set Nothing BinarySearch False Function BinarySearch(......) As Boolean ...... ' False If lower &gt; upper Then BinarySearch = False Exit Function 5 12. End If ...... End FunctionVBAHelpgoogle [name = expression] 7. VBAoffice 2010 VBAhelp StrCompStrConvFormat, LCase, UCaseSpace, StringLenFormatLSet, RSetInStr, Left, LTrim, Mid, Right, RTrim, TrimOption Compare ASCII ANSI Asc, Chr C a.Space, String Space10" space"Space(10) 10 String(number,characterToRepeate) string Space(10)=String(10, 32) 32=0x20spaceASCIIString 0x0~0x1F b. InStr, InStrRev InStrCstrstr InStr([start, ]string1, string2[, compare])6 13. " Variant (Long)" InStrRevInStr"" posOfPoint = InStr("abc.def", ".") "abc.def"".",4 c.Asc, Chr AscASCIIChrASCII MyNumber = Asc("A") ' 65 MyChar = Chr(97) ' ad. VBAlog. i.1 Function createFileTest() ' the name of the file to be output, including full path Dim FileName As String FileName = "D:create_file.txt" ' open the file ouput text stream output, overwritng is necessary Dim fs As Object Set fs = CreateObject("Scripting.FileSystemObject") Dim file As Object Set file = fs.CreateTextFile(FileName, True) file.WriteLine "test string..." file.Close End Functionii.2 Public gFileNum As Integer Function createOutputFile() Dim outputFileNameWithPath As String Dim gDestFile As String Dim outputFileNameWithPath As String Dim openFileOK As Boolean openFileOK = True ' 1. create an XML file outputFileNameWithPath = "D:test_output.txt" gDestFile = outputFileNameWithPath ' Obtain next free file handle number. gFileNum = FreeFile() ' Turn error checking off. On Error Resume Next ' Attempt to open destination file for output. 7 14. Open gDestFile For Output As #gFileNum ' If an error occurs report it and end. If Err 0 Then openFileOK = False MsgBox "Cannot create file: " &amp; gDestFile End If ' Turn error checking on. On Error GoTo 0 createOutputFile = openFileOK End Function Sub createFileTest() Print #gFileNum, "Test output string to this file..." Print #gFileNum, "Test done." Close #gFileNum End Sub e. i.ActiveDocument.Path ""ii.ActiveDocument.Nameiii. ActiveDocument.FullName f.VB office 2010help Visual Basic Visual Basic for Applications Calendar CallType Color Compiler Date DirGetAttr SetAttr IMEStatus InstrStrComp Keycode Miscellaneous MsgBox QueryClose QueryClose Shell 8 15. StrConv VarType Visual Basic Miscellaneous Visual Basic for Applications vbCrLfChr(13) Chr(10)+ vbCrChr(13)vbLfChr(10)vbNewLineChr(13) + Chr(10) or, on the Macintosh, Chr(13)vbNullCharChr(0) 0 vbNullString 0 ("") vbObjectError-2147221504 Err.Raise Number = vbObjectError + 1000vbTabChr(9)Tab vbBackChr(8)vbFormFeedChr(12) Microsoft Windows or on the Macintosh vbVerticalTabChr(11) Microsoft or on the Macintosh Windows 2.3.4. 1. VBAHelp wordVBAvba //F1 VBAFunction Help Function funcName() 'XXXXXX9 16. End Function FunctionF1HelpFunction 2. office 2010VBAhelp variant 3. http://office.microsoft.com/zh-cn/access-help/CH010072891.aspx?CTT=972.4. Excel VBA VBAword VBA 2.3 Word VBA2.4.1. Excel VBA ExcelExcel Excel Excelsheet sheet ExcelWorkbook Worksheet Column, Row Cell Excel VBA WorkbooksExcel10 17. 1. Workbook workbookworkbooksworkbooksworkbook workbook Workbooks.Item(N) Workbooks(N) Workbooks("excel_file_name.xlsx") Workbook Workbook.Open Workbook.Add Workbook.Save Workbook.SaveAs 2. Worksheet worksheetExcelsheet worksheetworksheets ExcelExcel3sheetworkbook worksheets3worksheet worksheet Workbooks.Item(1).Sheets.Item(N) Workbooks.Item(1).Sheets.Item("sheet_name") 3. Column "C" Columns(3) Columns("C") 35 Columns("C:E") Range("C:E") 1, 578911 18. Range("A:A, E:E, G:G, H:H,I:I").Select Columns("C").ColumnWidth = 4.5 Selection.Columns.AutoFit Columns("C").hidden=True 4. Row 26 Rows("2:6").Select Rows(1).Select 578 Range("5:5, 7:7,8:8").Select Rows(6).RowHeight = 2.5 6 Rows("6:6").Select Selection.EntireRow.Hidden = TrueRowColumn ,"C" "Name Box" "Col3" Columns("C") Columns("Col3") Columns("XXX")XXX 5. Cell12 19. cell Range("D6") Range("B3).Font.Name = "Cambria" Range("B3).Font.Bold = True D2H6 Range("B2:H6") Range("D4:D4") Range("B2:C5,EC4:G8").Select Range("B2:C5, C4:G8").Select ActiveWindow.DisplayGridlines = False2.4.2. Excel VBA 1. VBA"'" REMRem REM this is a excel maro ' this is a excel maro 2. a.Msgbox Msgbox :13 20. MsgBox "Currently opening Excel file is: " &amp; ActiveWorkbook.Name /&amp; b. log loglog VBAlog 3. Excel Word VBAActiveDocumentExcelActiveWorkbook Excel ActiveWorkbook.Path ActiveWorkbook.FullName = ActiveWorkbook.Path + '' + ActiveWorkbook.Name MsgBox ActiveWorkbook.Name MsgBox ActiveWorkbook.FullName MsgBox ActiveWorkbook.FullNameURLEncoded MsgBox ActiveWorkbook.Path 4. workbooksheet.Select Sheets("sheet_name").Select .Name Sheets("sheet_name").Name move workbooksheetAdd2.4.3. Excel VBA 1. VBA for Microsoft Office Excel 2007 Excel VBA 2 VBA for Microsoft Office Excel 2007 2. Excel 2007 VBA Excel VBA 2http://www.functionx.com/vbaexcel/14 21. Excel 2007 VBA [PDF]3 ed2k:// |file|%5BExcel.2007.VBA%E5%8F%82%E8%80%83%E5%A4%A7%E5%85%A8%5D.%EF%BC %88%E7%BE%8E%EF%BC%89%E6%A0%BC%E6%9E%97.%E6%89%AB%E6%8F%8F %E7%89%88.pdf|253406092|3cf57fc49d0fa875826ecc462cd9976c| h=eed6g2e25uuzc4c52obch2txlm7w65fx|/2.4.4. 2.3 Word VBA VBA VBA 1. VBAObject Browser VBA workbookworkbookObject Browser,Object Browser 2. Help F1VBAHelp workbookExcelworkbook F1Helpworkbook 4Workbook Object Members Article Represents a Microsoft Excel workbook. Methods Name Description AcceptAllChanges Accepts all changes in the specified shared...</p>