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
// | |
// Console.swift | |
// | |
// Created by c0ming on 16/7/15. | |
// Copyright © 2016 c0ming. All rights reserved. | |
// | |
import Foundation | |
private let dateFormatter: DateFormatter = { |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
protocol Delegate { | |
func foo(); | |
} | |
extension Delegate { | |
func foo() { |
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
<key>Custom</key> | |
<dict> | |
<key>Insert New Line Below Current Line</key> | |
<string>moveToEndOfLine:, insertNewline:</string> | |
<key>Duplicate Lines</key> | |
<string>selectLine:, copy:, moveToEndOfLine:, insertNewline:, paste:, deleteBackward:</string> | |
<key>Delete Current Lines</key> | |
<string>deleteToBeginningOfLine:, moveToEndOfLine:, deleteToBeginningOfLine:, deleteBackward:, moveDown:, moveToBeginningOfLine:</string> | |
</dict> |
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
// 1.usedEncoding. try to determine the encoding, and return the encoding which was used. | |
NSURL *url = xxx; | |
NSStringEncoding encoding = NSUTF8StringEncoding; | |
NSError *error = nil; | |
NSString *foo = [NSString stringWithContentsOfURL:url usedEncoding:&encoding error:&error]; | |
if (foo == nil) { | |
NSLog(@"%@", error); | |
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
#!/bin/bash | |
# e.g. libmms http://sourceforge.net/projects/libmms/ | |
# set -x | |
BUILD_DIR=`pwd`"/build" | |
STATIC_LIB_NAME="libmms.a" | |
STATIC_LIB_NAME_ARM="libmms.a.arm" | |
STATIC_LIB_NAME_X86="libmms.a.x86" |