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
| // | |
| // Set.swift | |
| // Hover | |
| // | |
| // Created by Chen Hongzhi on 7/12/14. | |
| // Copyright (c) 2014 One Artisan. All rights reserved. | |
| // | |
| import Foundation |
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
| // Modified from http://code.google.com/p/jsxobjc/source/browse/trunk/source/JSXore/JSXObjCInterpreter.m | |
| @implementation JSValue (CHAdditions) | |
| - (BOOL)ch_isArray | |
| { | |
| static dispatch_once_t onceToken; | |
| static JSStringRef lengthString = NULL; | |
| static JSStringRef arrayString = 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
| NSString *CHRegexPatternForWildcardString(NSString *string) | |
| { | |
| if (string.length == 0) { | |
| return string; | |
| } | |
| static dispatch_once_t onceToken; | |
| static NSRegularExpression *asteriskRegex = nil; | |
| static NSRegularExpression *questionmMarkRegex = nil; | |
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
| SecCertificateRef cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certData); | |
| status = SecCertificateAddToKeychain(cert, keychain); | |
| if (status == errSecDuplicateItem) { | |
| status = errSecSuccess; | |
| } | |
| if (status == errSecSuccess) { | |
| int allowErr = -2147409654; | |
| SecPolicyRef x509Policy = SecPolicyCreateBasicX509(); |