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) { |
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
| 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
| /* | |
| * 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.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
| using System; | |
| using System.Linq; | |
| using System.Text; | |
| public class Program { | |
| public static void Main(string[] args) { | |
| var @base = 16; | |
| var pLength = 4; | |
| var n = (pLength - 1) * 4; | |
| var max = Max(pLength - 1, @base); |
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
| var http = WScript.CreateObject('Msxml2.XMLHTTP.6.0'); | |
| // Retrieve the url parameter | |
| var url = WScript.Arguments.Item(0) | |
| // Make the request | |
| http.open("GET", url, false); | |
| http.send(); |
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
| #region CPL License | |
| /* | |
| Nuclex Framework | |
| Copyright (C) 2002-2012 Nuclex Development Labs | |
| This library is free software; you can redistribute it and/or | |
| modify it under the terms of the IBM Common Public License as | |
| published by the IBM Corporation; either version 1.0 of the | |
| License, or (at your option) any later version. |
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
| REM Usage: hugin_stitch.bat template-XiaomiMijiaMiJPG.pto IMG_20171231_172305.jpg | |
| @echo off | |
| SET PATH=%PATH%;C:\Program Files\Hugin\bin | |
| FOR %%i IN ("%2") DO ( | |
| SET Name=%%~ni | |
| ) | |
| pto_gen %2 %2 --output=%Name%_stitched.pto |
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
| { | |
| "embeddings": [ | |
| { | |
| "tensorName": "三國演義", | |
| "tensorShape": [ | |
| 3957, | |
| 100 | |
| ], | |
| "tensorPath": "https://gist.githubusercontent.com/compustar/793dce1ea65e26ee38ee97b73e3208b5/raw/f9a32bf3b004145cb011cdb4ce528f12e4370b19/three_kingdoms.tsv", | |
| "metadataPath": "https://gist.githubusercontent.com/compustar/793dce1ea65e26ee38ee97b73e3208b5/raw/f9a32bf3b004145cb011cdb4ce528f12e4370b19/three_kingdoms_meta.tsv" |
OlderNewer