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
// | |
// ContentView.swift | |
// Banner | |
// | |
// Created by chris.jy on 2023/08/21. | |
// | |
//import SwiftUI | |
//struct ContentView: View { |
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
// | |
// Carousel.swift | |
// Carousel | |
// | |
// Created by junyng on 2022/08/22. | |
// | |
import SwiftUI | |
struct Carousel<Content: View>: View { |
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
let scrollView = UIScrollView() | |
scrollView.translatesAutoresizingMaskIntoConstraints = false | |
let images = [ | |
UIImage(named: "animal1"), | |
UIImage(named: "animal2"), | |
UIImage(named: "animal3"), | |
UIImage(named: "animal4") | |
] | |
let imageViews = images.map { image -> UIImageView in | |
let imageView = UIImageView(image: image) |
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
// | |
// ViewController.swift | |
// CollectionViewPractice | |
// | |
// Created by nTom on 2020/10/26. | |
// Copyright © 2020 CollectionViewPractice. All rights reserved. | |
// | |
import UIKit | |
import SnapKit |
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
class Trie(object): | |
def __init__(self): | |
self.head = Node(None) | |
""" | |
트라이에 문자열을 삽입합니다. | |
""" | |
def insert(self, string): | |
curr_node = self.head | |
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
//: # Setting up Swift 4 KVO | |
import Foundation | |
//: This class has a pair of properties that can be observied by KVO. | |
//: - Note: This class *must* inheret from `NSObject` in order to posess the KVO functionality. | |
class ObservableClass: NSObject { | |
/// An observable string property. Note that it most be annotated with both "@objc" (expose the property to the | |
/// Objective-C runtime) and "dynamic" (enables KVO for the property). | |
@objc dynamic private(set) var stringProperty: String = "Starting string!" |
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
// | |
// main.swift | |
// UnitConverter | |
// | |
// Created by BLU on 2019. 4. 1.. | |
// Copyright © 2019년 BLU. All rights reserved. | |
// | |
import Foundation | |
/// 단위 측정 타입 정의 |
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
// | |
// main.swift | |
// PairProgramming | |
// | |
// Created by Blu X Bean on 2019. 4. 2.. | |
// Copyright © 2019년 Blu Bean. All rights reserved. | |
// | |
import Foundation |
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
# <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
# |<---- Using a Maximum Of 50 Characters ---->| | |
# Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |
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
import hashlib as hasher | |
import datetime as date | |
# Define what a Snakecoin block is | |
class Block: | |
def __init__(self, index, timestamp, data, previous_hash): | |
self.index = index | |
self.timestamp = timestamp | |
self.data = data | |
self.previous_hash = previous_hash |