깃을 사용합시다. 깃을 쓰자. 깃을 쓰란 말야!!
-
SVN은 변경이력이 많아질수록 속도가 느리지.
-
커밋 및 처리속도가 빠르다. 변경이력이 많이 축적되어 있어도 속도저하가 거의 없다.
-
-
커밋찍기가 어렵다.
public Bitmap rotateBitmap(Bitmap original, float degrees) { | |
int width = original.getWidth(); | |
int height = original.getHeight(); | |
Matrix matrix = new Matrix(); | |
matrix.preRotate(degrees); | |
Bitmap rotatedBitmap = Bitmap.createBitmap(original, 0, 0, width, height, matrix, true); | |
Canvas canvas = new Canvas(rotatedBitmap); | |
canvas.drawBitmap(original, 5.0f, 0.0f, null); |
//iOS 7 스토리보드 대신 xib 방식으로 개발하기 | |
//solution 1 | |
1. empty application 생성 | |
2. new class file 생성 -> name : ViewController, UIViewController sub class, with XIB check | |
3. appdelegate 헤더 파일 수정 | |
@class ViewController; | |
@property (strong, nonatomic) ViewController *viewController; | |
4. appdelegate m 파일 수정 |
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
import UIKit | |
extension UISegmentedControl { | |
func goVertical() { | |
self.transform = CGAffineTransformMakeRotation(CGFloat(M_PI_2)) | |
for segment in self.subviews { | |
for segmentSubview in segment.subviews { | |
if segmentSubview is UILabel { | |
(segmentSubview as UILabel).transform = CGAffineTransformMakeRotation(CGFloat(-M_PI_2)) | |
} |
InputStream is = getContentResolver().openInputStream(uri); | |
Bitmap bitmap = BitmapFactory.decodeStream(is); | |
is.close(); |
##Debouncing using GCD on iOS
The idea of "Debouncing" is to limit the rate a function or task can execute by waiting a certain amount of time before executing it. In the example below, if a user rapidly enters input, it will only execute once, 1 second after all that input. This is the implementation of a sample class showing how to do so, while using Grand Central Dispatch to create a timer. The timer fires on a global queue in this example - but you can change the queue to any queue where you want the timer to execute, regardless of where you set it up.
#import <Foundation/Foundation.h>
@interface DebounceExample : NSObject
private static func createUserEventData(user:SKUser, eventType:SKEventType, sticker:Sticker?) { | |
// server endpoint | |
let endpoint = "https://app.stickerkit.io/userEvent/v1/\(user.projectID)" | |
guard let endpointUrl = URL(string: endpoint) else { | |
return nil | |
} | |
//Make JSON to send to send to server |
public extension UIView { | |
func addBorder(to edges: UIRectEdge, color: UIColor = UIColor.white, thickness: CGFloat = 1) { | |
var borders = [UIView]() | |
func border() -> UIView { | |
let border = UIView(frame: CGRect.zero) | |
border.backgroundColor = color | |
border.translatesAutoresizingMaskIntoConstraints = false |