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
class CustomOrderRequest { | |
private (set) var products = [Product]() | |
} | |
protocol OrderCommand { | |
// | |
} | |
protocol OrderManagerProtocol { | |
func send(command : OrderCommand) |
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
class Customer : | |
Entity, | |
AggregateProtocol | |
{ | |
private (set) var id : UUID | |
private (set) var email : String | |
private var orders : Array<Order> | |
init?(email : String, name : String, uniqueChecker : CustomerUniqueCheckerDelegate) { | |
id = UUID.init() |
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
protocol CustomerRepositoryProtocol { | |
} | |
protocol ProductRepositoryProtocol { | |
} | |
struct ConversionRate { | |
var fromCurrency : String |
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 | |
// HugeLadderGame | |
// | |
// Created by JK on 21/08/2018. | |
// Copyright © 2018 codesquad. 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
// | |
// LadderMasonTest.swift | |
// LadderMasonTest | |
// | |
// Created by JK on 05/04/2018. | |
// Copyright © 2018 JK. All rights reserved. | |
// | |
import XCTest |
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
class Animal : Codable { | |
var type : String { | |
return "animal" | |
} | |
} | |
class Dog : Animal { | |
override var type : String { | |
return "dog" | |
} |
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
struct FizzBuzz { | |
func makeIf(with value: Int) -> String { | |
guard value > 0 else { return "" } | |
if value % 15 == 0 { | |
return "fizzbuzz" | |
} | |
else if value % 3 == 0 { | |
return "fizz" | |
} | |
else if value % 5 == 0 { |
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 <Carbon/Carbon.h> | |
#import <dlfcn.h> | |
/* | |
* 컴파일 명령 : gcc process.c -framework CoreServices | |
*/ | |
CFArrayRef CopyLaunchedApplicationsInFrontToBackOrder(void) | |
{ | |
CFArrayRef (*_LSCopyApplicationArrayInFrontToBackOrder)(uint32_t sessionID) = NULL; | |
void (*_LSASNExtractHighAndLowParts)(void const* asn, UInt32* psnHigh, UInt32* psnLow) = NULL; |
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
// | |
// ViewController.swift | |
// SideView | |
// | |
// Created by JK on 2019/11/11. | |
// Copyright © 2019 codesquad. All rights reserved. | |
// | |
import UIKit |
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
struct User { | |
var username: String | |
private var age : Int = 1 | |
init(username : String) { | |
self.username = username | |
} | |
} |