Moved to repository: https://github.com/Mailcloud/swift-serializer
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
| // Variables used by Scriptable. | |
| // These must be at the very top of the file. Do not edit. | |
| // icon-color: darkgray; icon-glyph: rocket; | |
| // | |
| // Copyright (C) 2020 | |
| // | |
| // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL | |
| // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
| // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |
| // IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE |
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
| extension String { | |
| func md5() -> String! { | |
| let str = self.cStringUsingEncoding(NSUTF8StringEncoding) | |
| let strLen = CUnsignedInt(self.lengthOfBytesUsingEncoding(NSUTF8StringEncoding)) | |
| let digestLen = Int(CC_MD5_DIGEST_LENGTH) | |
| let result = UnsafeMutablePointer<CUnsignedChar>.alloc(digestLen) | |
| CC_MD5(str!, strLen, result) | |
| var hash = NSMutableString() |
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
| /** | |
| 초성 중성 종성 분리 하기 | |
| 유니코드 한글은 0xAC00 으로부터 | |
| 초성 19개, 중상21개, 종성28개로 이루어지고 | |
| 이들을 조합한 11,172개의 문자를 갖는다. | |
| 한글코드의 값 = ((초성 * 21) + 중성) * 28 + 종성 + 0xAC00 | |
| (0xAC00은 'ㄱ'의 코드값) |
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
| /** | |
| * Based off of the Lucene prolog parser in the wordnet contrib package within the | |
| * main Lucene project. It has been modified to remove the Lucene bits and generate | |
| * a synonyms.txt file suitable for consumption by Solr. The idea was mentioned in | |
| * a sidebar of the book Solr 1.4 Enterprise Search Server by Eric Pugh. | |
| * | |
| * @see <a href="http://lucene.apache.org/java/2_3_2/lucene-sandbox/index.html#WordNet/Synonyms">Lucene Sandbox WordNet page</a> | |
| * @see <a href="http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/contrib/wordnet/">SVN Repository of the WordNet contrib</a> | |
| * @see <a href="https://www.packtpub.com/solr-1-4-enterprise-search-server/book">Solr 1.4 Enterprise Search Server Book</a> | |
| */ |
