This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
</head> | |
<body onload="execDaumPostcode()"> | |
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0"/> | |
<div id = "layer" style = "display:block; position:absolute; overflow:hidden; z-index:1; -webkit-overflow-scrolling:touch; "> | |
</div> |
This file contains 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
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}") | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}" |
This file contains 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 struct HashTable<Key: Hashable, Value> { | |
fileprivate typealias Element = (key: Key, value: Value) | |
fileprivate typealias Bucket = [Element] | |
fileprivate var buckets: [Bucket] | |
fileprivate(set) var count = 0 | |
public init(capacity: Int) { | |
assert(capacity > 0) | |
buckets = .init(repeating: [], count: capacity) |
This file contains 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
infix operator ??? | |
infix operator ?-> | |
// user.name ??? sendMessage() | |
// is euqual to | |
// if let name = user.name { | |
// sendMessage() | |
// } |
This file contains 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
import Foundation | |
func quicksort<T: Comparable>(array: [T]) -> [T] { | |
if array.count <= 1 { return array } | |
let pivot: T = array[array.count/2] | |
return quicksort(array: array.filter ({ $0 < pivot })) + array.filter ({ $0 == pivot }) + quicksort(array: array.filter ({ $0 > pivot })) | |
} | |
// http://www.slideshare.net/ssuserae280e/quicksort-in-swift |
This file contains 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
import XCTest | |
@testable import Quicksort | |
class QuicksortTests: XCTestCase { | |
// RED | |
// / \ | |
// REFACTOR GREEN |
This file contains 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
/* #Heap Sort | |
###Input : | |
- ์ฒซ ๋ฒ์งธ ๋ผ์ธ์๋ ์ ๋ ฅํ ํค์ ๊ฐฏ์(1 โค N โค 100,000)์ ์ ์ k๋ฅผ ์ ๋ ฅํฉ๋๋ค.(1 โค k โค 30) | |
- ๋ค์ ๋ผ์ธ ๋ถํฐ N๊ฐ์ ํค๋ฅผ ์ ๋ ฅ ํฉ๋๋ค. | |
###Output : | |
- ์ฒซ ๋ฒ์งธ ๋ผ์ธ์ ํ์์ k๊ฐ์ elements ๊ฐ์ํ๋ ์์๋ก ์ถ๋ ฅ ํฉ๋๋ค. | |
- ๋ ๋ฒ์งธ ๋ผ์ธ์ ํ์์ ์ฆ๊ฐํ๋ ์์๋ก k ๊ฐ๋ฅผ ์ถ๋ ฅํฉ๋๋ค. |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>IDECodeSnippetCompletionPrefix</key> | |
<string>trilliwon-screen-name</string> | |
<key>IDECodeSnippetCompletionScopes</key> | |
<array> | |
<string>ClassImplementation</string> | |
</array> |
This file contains 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
import Foundation | |
func insertionSort(array: [Int]) -> [Int] { | |
var array = array | |
for index in 1..<array.count { | |
let nextValue = array[index] | |
var aux = index - 1 | |
while aux >= 0 && array[aux] > nextValue { |
This file contains 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
import Foundation | |
import UIKit | |
// Usage Examples | |
let system12 = Font(.system, size: .standard(.h5)).instance | |
let robotoThin20 = Font(.installed(.RobotoThin), size: .standard(.h1)).instance | |
let robotoBlack14 = Font(.installed(.RobotoBlack), size: .standard(.h4)).instance | |
let helveticaLight13 = Font(.custom("Helvetica-Light"), size: .custom(13.0)).instance | |
struct Font { |
OlderNewer