Skip to content

Instantly share code, notes, and snippets.

View dev-yong's full-sized avatar
🤔
Let's think more

LeeGwangYong dev-yong

🤔
Let's think more
  • Viva Republica (TOSS)
  • Korea, Republic of
View GitHub Profile
find . -type f '(' -name '*.storyboard' -o -name '*.xib' -o -name '*.swift' ')' -exec sed -E -i '' 's/[Find]/[Replaced]/g' {} +
class ViewController: UIViewController {
let targetView = UIView(frame: .init(x: 50, y: 150, width: 50, height: 50))
let slider = UISlider(frame: .init(x: 0, y: 100, width: 300, height: 30))
var animator: UIViewPropertyAnimator?
var displayLink: CADisplayLink?
var token: NSKeyValueObservation?
override func loadView() {
import Foundation
import Alamofire
private extension Date {
static func second(from referenceDate: Date) -> Int {
return Int(Date().timeIntervalSince(referenceDate).rounded())
}
}
public class Throttler {
public class DynamicHeightTableView: UITableView {
public var maxHeight: CGFloat = UIScreen.main.bounds.height
override public var contentSize: CGSize {
didSet {
self.invalidateIntrinsicContentSize()
}
}
override public func reloadData() {
// Created by 이광용 on 2018. 7. 3..
// Copyright © 2018년 이광용. All rights reserved.
//
import UIKit
typealias KeyboardInfo = (CGRect, TimeInterval)->()
protocol KeyboardControlDelegate: class {
func setKyeboardControl(willShow: KeyboardInfo?, willHide: KeyboardInfo?)
func removeKeyboardControl()
#include <iostream>
#include <vector>
#include <stack>
using namespace std;
vector<vector<int>> singer_vector;
stack <int> result;
bool visited[1001] = { false };
bool finish[1001] = { false };
bool cycle = false;
@dev-yong
dev-yong / BFS,DFS(vector).cpp
Created March 14, 2017 13:16
vector를 이용한 BFS,DFS
#include<iostream>
#include<algorithm> //sort 함수를 출력하기 위한 헤더
#include<vector>
#include<queue>
using namespace std;
int n, m, v; //n : vertex(정점)의 개수, m : edge(간선)의 개수, v : 정점의 번호
vector<vector<int>> adj; //vector-vector를 선언
vector<bool> visited; //node의 방문 여부에 대한 함수
@dev-yong
dev-yong / BFS,DFS.CPP
Created March 14, 2017 13:15
graph의 행렬 생성, BFS, DFS
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <cstring>
using namespace std;
int arr[1020][1020];
bool visited[1020];
int vertex_num, edge_num;
#include <iostream>
#include <algorithm>
using namespace std;
int chess_size;
int map[11][11];
int max_black = 0, max_white = 0;
bool slash[22];
bool back_slash[22];
void black(int y, int x, int cnt) {