Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
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
+(CGFloat)pixelToPoints:(CGFloat)px { | |
CGFloat pointsPerInch = 72.0; // see: http://en.wikipedia.org/wiki/Point%5Fsize#Current%5FDTP%5Fpoint%5Fsystem | |
CGFloat scale = 1; // We dont't use [[UIScreen mainScreen] scale] as we don't want the native pixel, we want pixels for UIFont - it does the retina scaling for us | |
float pixelPerInch; // aka dpi | |
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { | |
pixelPerInch = 132 * scale; | |
} else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { | |
pixelPerInch = 163 * scale; | |
} else { | |
pixelPerInch = 160 * scale; |
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
group :production do | |
gem 'unicorn' | |
# Enable gzip compression on heroku, but don't compress images. | |
gem 'heroku-deflater' | |
# Heroku injects it if it's not in there already | |
gem 'rails_12factor' | |
end |
- x : not worked
- o: worked (able to open in quicktime but need conversion)
- oo: worked well (preview worked but wrong aspect ratio)
- ooo: worked very well (preview worked, and aspect ratio’s right)
(Codecs are extracted from https://web.archive.org/web/20120722124832/http://opencv.willowgarage.com/wiki/QuickTimeCodecs )
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
extension UIImage | |
{ | |
func tint(color: UIColor, blendMode: CGBlendMode) -> UIImage | |
{ | |
let drawRect = CGRectMake(0.0, 0.0, size.width, size.height) | |
UIGraphicsBeginImageContextWithOptions(size, false, scale) | |
let context = UIGraphicsGetCurrentContext() | |
CGContextClipToMask(context, drawRect, CGImage) | |
color.setFill() | |
UIRectFill(drawRect) |
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
/* | |
* SimpleAdHocTracker.cpp | |
* | |
* Created on: Mar 15, 2015 | |
* Author: roy_shilkrot | |
* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Roy Shilkrot | |
* |
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
# install dependencies | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y cmake | |
sudo apt-get install -y libgtk2.0-dev | |
sudo apt-get install -y pkg-config | |
sudo apt-get install -y python-numpy python-dev | |
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev | |
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev | |
Please refer to the TimeLapseBuilder-Swift repository on GitHub from now on.
I will leave the original code here as a reference, but new comments may be removed. Please open an issue on GitHub if you have questions or would like to contribute.
Thanks!
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
// | |
// SimpleScrollingStack.swift | |
// A super-simple demo of a scrolling UIStackView in iOS 9 | |
// | |
// Created by Paul Hudson on 10/06/2015. | |
// Learn Swift at www.hackingwithswift.com | |
// @twostraws | |
// | |
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
extension CMDeviceMotion { | |
func gaze(atOrientation orientation: UIInterfaceOrientation) -> SCNVector4 { | |
let attitude = self.attitude.quaternion | |
let aq = GLKQuaternionMake(Float(attitude.x), Float(attitude.y), Float(attitude.z), Float(attitude.w)) | |
let final: SCNVector4 | |
switch orientation { |
OlderNewer