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
| using System; | |
| using System.Linq; | |
| public class Program { | |
| public static void Main() { | |
| for (int i = 10; i < 100; i++) { | |
| if (CountDigits(i, 111 - i) == 4) { | |
| for (int j = 10; j < 100; j++) { | |
| if (CountDigits(j, i + j, i, 111 - i) == 8 && i + j > 9 && i + j < 100) { | |
| Console.WriteLine(string.Format("{2} - {3} = {0} + {1} = 111", i, 111 - i, j, i + j)); |
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
| /* | |
| * JavaScript Obfucator is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | |
| * | |
| * JavaScript Obfucator is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| * GNU General Public License for more details. |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.IO; | |
| using System.Globalization; | |
| namespace ngram { | |
| public class NGramAnalyzer { | |
| private bool cjkOnly; |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace Text { | |
| public class MessageTemplate { | |
| private static Dictionary<string, MessageTemplate> cache = new Dictionary<string, MessageTemplate>(); | |
| private string format; |
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
| public static string GetSAMAccountName(string firstName, string lastName, string domain) { | |
| string result = string.Empty; | |
| string connectionPrefix = "LDAP://" + domain; | |
| using (DirectoryEntry entry = new DirectoryEntry(connectionPrefix)) | |
| using (DirectorySearcher searcher = new DirectorySearcher(entry)) { | |
| searcher.Filter = string.Format("(&(objectClass=user)(&(sn={1})(givenName={0})))", firstName, lastName); | |
| SearchResult searchResult = searcher.FindOne(); | |
| if (searchResult == null) { |
NewerOlder