code_snippets
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| code_snippets [2009/01/14 00:57] – stephen | code_snippets [2009/01/15 00:01] (current) – removed stephen | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== General ===== | ||
| - | |||
| - | ==== Newlines ==== | ||
| - | |||
| - | C# = Environment.Newline\\ | ||
| - | VB = vbNewline | ||
| - | |||
| - | ===== C# ===== | ||
| - | |||
| - | ==== I/O ==== | ||
| - | |||
| - | === Read Entire File into a String === | ||
| - | |||
| - | ...in one easy step. | ||
| - | |||
| - | <code c#> | ||
| - | String wholeFile = File.ReadAllText(@" | ||
| - | </ | ||
| - | |||
| - | === Filename to StreamReader === | ||
| - | |||
| - | ...in one easy step. | ||
| - | |||
| - | <code c#> | ||
| - | StreamReader sr = File.OpenText(@" | ||
| - | </ | ||
| - | |||
| - | ===== VB ===== | ||
| - | |||
| - | |||
| - | |||
| - | ==== Comments ==== | ||
| - | |||
| - | === Change Note === | ||
| - | |||
| - | <code vb> | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | </ | ||
| - | | ||
| - | === Method Header === | ||
| - | |||
| - | <code vb> | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | ''' | ||
| - | </ | ||
| - | |||
| - | ===== SQL ===== | ||
| - | |||
| - | ==== Fix Orphaned User ==== | ||
| - | |||
| - | <code SQL> | ||
| - | sp_change_users_login ' | ||
| - | </ | ||
| - | |||
| - | For example: | ||
| - | |||
| - | <code SQL> | ||
| - | sp_change_users_login ' | ||
| - | </ | ||
| - | |||
| - | ===== Regular Expressions ===== | ||
| - | |||
| - | ==== Notepad++ ==== | ||
| - | |||
| - | === Searching for Email Addresses === | ||
| - | |||
| - | < | ||
| - | [A-Za-z\-]+\.[A-Za-z\-]+@ccc\.govt\.nz | ||
| - | </ | ||
| - | |||
| - | ===== MS-DOS Batch File ===== | ||
| - | |||
| - | ==== General Backup Script ==== | ||
| - | |||
code_snippets.1231894671.txt.gz · Last modified: 2017/01/01 19:48 (external edit)
