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 | |
//영상과 요구사항 | |
struct Video {} | |
struct Requirement {} | |
class Youtuber { | |
var editor: Editor? | |
func editVideo() { |
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
func main() { | |
let input = InputView.read() | |
if Validator.isLessThanNine(input) == false { return } | |
guard let convertedInput = Converter.toInt(input) else { return } | |
let burgers = GodOfHamburger.hamburger(with: convertedInput) | |
print(burgers) | |
} | |
main() |
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
func main() { | |
guard let inputedNumber = InputView.read() else { return } //값 입력받음 | |
let burgers = GodOfHamburger.hamburger(with: inputedNumber) //햄버거 신에게 해당 개수만큼 햄버거 받음 | |
print(burgers) //햄버거 출력 | |
} | |
main() | |
class InputView { | |
static func read() -> Int? { |
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
let scalar = Unicode.Scalar("흥") | |
let consonantIndex = (scalar.value - 0xac00) / 28 / 21 | |
let consonantScalar = Unicode.Scalar(consonantIndex + 0x1100)! | |
print(consonantScalar) //ㅎ |
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
let familyNameSortDescriptor = NSSortDescriptor(key: CNContact.familyNameSortKey, ascending: true, selector: #selector(NSString.localizedStandardCompare(_:))) | |
let givenNameSortDescriptor = NSSortDescriptor(key: CNContact.givenNameSortKey, ascending: true, selector: #selector(NSString.localizedStandardCompare(_:))) | |
let sortDescriptors = [familyNameSortDescriptor, givenNameSortDescriptor] | |
let sortedContacts = (contacts as NSArray).sortedArray(using: sortDescriptors) | |
guard let contacts = sortedContacts as? [CNContact] else { return } | |
self.contacts = contacts |
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
// | |
// main.swift | |
// UnitConverter | |
// | |
// Created by 조재흥 on 2018. 9. 11.. | |
// Copyright © 2018년 hngfu. All rights reserved. | |
// | |
import Foundation |
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
//: Playground - noun: a place where people can play | |
import Cocoa | |
////MARK: - 2, 3단 구현 - 계산과 출력 | |
var str = "Hello, IOS World" | |
//2단 | |
print("\(2*1)") | |
print("\(2*2)") |
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
var gist = 'gist 테스트.'; | |
function gistTest(str){ | |
console.log(str); | |
} | |
gistTest(gist); |