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 DictionaryStorageMacro: MemberMacro { | |
public static func expansion(of node: AttributeSyntax, | |
providingMembersOf declaration: some DeclGroupSyntax, | |
in context: some MacroExpansionContext | |
) throws -> [DeclSyntax] { | |
let stringIdentifier = SimpleTypeIdentifierSyntax(name: .identifier("String")) | |
let anyIdentifier = SimpleTypeIdentifierSyntax(name: .keyword(.Any)) | |
let dictionarySyntax = DictionaryTypeSyntax(leftSquareBracket: .leftSquareBracketToken(), | |
keyType: stringIdentifier, |
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
# workflow 이름 지정 | |
name: deploy | |
on: | |
# workflow 를 trigger 조건 설정 - release/ 로 시작하는 branch 가 push 되었을 때 | |
push: | |
branches: [ release/* ] | |
# workflow의 실행은 하나 이상의 job으로 구성 됨 | |
jobs: |
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
# workflow 의 이름 | |
name: Run Test | |
on: | |
# develop 브랜치에 push 나 pull request 이벤트가 일어났을때 해당 workflow 를 trigger | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] |
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 | |
// KakaoMoneyEffect | |
// | |
// Created by naljin on 2021/07/30. | |
// | |
import UIKit | |
class ViewController: UIViewController { |
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 addSnowLayer() { | |
let cell = CAEmitterCell() | |
cell.contents = UIImage(named: "EmojiTwo")!.cgImage | |
cell.birthRate = 5 | |
cell.lifetime = 10 | |
cell.scale = 0.1 | |
cell.yAcceleration = 100 | |
cell.alphaSpeed = -0.2 | |
let emitterLayer = CAEmitterLayer() |
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 UIKit | |
class ViewController: UIViewController { | |
let workerQueue = DispatchQueue(label: "com.sujinnaljin.worker", | |
attributes: .concurrent) | |
let falcon = Falcon(name: "naljin") | |
override func viewDidLoad() { | |
super.viewDidLoad() |
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
//https://stackoverflow.com/questions/15741631/nsarray-from-nscharacterset/15742659#15742659 | |
extension CharacterSet { | |
func characters() -> [Character] { | |
// A Unicode scalar is any Unicode code point in the range U+0000 to U+D7FF inclusive or U+E000 to U+10FFFF inclusive. | |
return codePoints().compactMap { UnicodeScalar($0) }.map { Character($0) } | |
} | |
func codePoints() -> [Int] { | |
var result: [Int] = [] | |
var plane = 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
// | |
// CustomCollectionViewFlowLayout.swift | |
// StickyHeaderCell | |
// | |
// Created by Kang, Su Jin (강수진) on 2021/04/22. | |
// | |
import UIKit | |
class CustomCollectionViewFlowLayout: UICollectionViewFlowLayout { |
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
#include "Servo.h" //서보 라이브러리 | |
//서보 | |
Servo myservo; | |
int servoSignal = 12; //서보 시그널 핀 | |
int servoInitialAngle = 0; //초기 각도 | |
int servoOffAngle = 0; | |
int servoOnAngle = 30; | |
//버튼 |
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
#include "Servo.h" //서보 라이브러리 | |
//서보 | |
Servo myservo; | |
int servoSignal = 12; //서보 시그널 핀 | |
int servoInitialAngle = 0; //초기 각도 | |
int servoOffAngle = 0; | |
int servoOnAngle = 30; | |
//사운드 |
NewerOlder