This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List<string> list = new List<string>() { | |
| "Liverpool - 1", | |
| "Liverpool - 11", | |
| "Liverpool - 12", | |
| "Liverpool - 2", | |
| "West Kirby - 1", | |
| "West Kirby - 12", | |
| "West Kirby - 8" }; | |
| var sortedList = list.CustomSort().ToArray(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #LIST DBS# | |
| SELECT name FROM master.sys.databases | |
| #CONNECT TO MSSQL# | |
| sqlcmd -S localhost\SQLEXPRESS -E | |
| #USE DB# | |
| use SQLEXPRESS | |
| #GET COLUMN NAMES OF A TABLE# | |
| SELECT | |
| COLUMN_NAME | |
| FROM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| string path = @"full path of dll"; | |
| Publish obj = new Publish(); | |
| obj.GacInstall(path); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ([ADSISearcher]”Name=Carol Ouellet”).FindAll().Properties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| string path = @"C:\test\test rich.rtf"; | |
| System.Windows.Forms.RichTextBox rtBox = new System.Windows.Forms.RichTextBox(); | |
| // Get the contents of the RTF file. Note that when it is | |
| // stored in the string, it is encoded as UTF-16. | |
| string s = System.IO.File.ReadAllText(path); | |
| // Convert the RTF to plain text. | |
| rtBox.Rtf = s; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static DataTable Parsing(string path, string[] delimiter, bool HasHeader, bool HasFieldsinQuotes) | |
| { | |
| DataTable dt = new DataTable(); | |
| using (TextFieldParser reader = new TextFieldParser(path)) | |
| { | |
| reader.TextFieldType = FieldType.Delimited; | |
| reader.SetDelimiters(delimiter); | |
| reader.HasFieldsEnclosedInQuotes = HasFieldsinQuotes; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $aclfolder "C:\MyFolder" | |
| $acl = Get-Acl $aclfolder | |
| $ar = New-Object System.Security.AccessControl.FileSystemAccessRule("username", "FullControl", "Allow") | |
| $acl.SetAccessRule($ar) | |
| Set-Acl -Path $aclfolder -AclObject $acl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $TDESKEY = 'fhEzg3Svho6nMYPcyCnEJc4qVRTkGY82' | |
| ##ENCODE | |
| $password = "Im a password" | |
| $MS = New-Object System.IO.MemoryStream | |
| $keyb = [Convert]::FromBase64String($TDESKEY) | |
| $TD = New-Object System.Security.Cryptography.TripleDESCryptoServiceProvider | |
| $CS = New-Object System.Security.Cryptography.CryptoStream($MS,$TD.CreateEncryptor($keyb, $TD.IV), [System.Security.Cryptography.CryptoStreamMode]::Write) | |
| $Writer = New-Object System.IO.StreamWriter($CS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| string mainkey = "ghRag3Svho6nMYBbyCnEJc4wVRTkGX82"; | |
| string result = Encrypt("EncryptMe", mainkey); | |
| Console.WriteLine(result); | |
| Console.ReadKey(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <NotepadPlus> | |
| <UserLang name="Focus Procedure" ext="fex" udlVersion="2.1"> | |
| <Settings> | |
| <Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> | |
| <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> | |
| </Settings> | |
| <KeywordLists> | |
| <Keywords name="Comments">03 03 04 04 00-* 00$ 00$$ 01 02</Keywords> | |
| <Keywords name="Numbers, prefix1"></Keywords> | |
| <Keywords name="Numbers, prefix2"></Keywords> |