本文提供HSV與YCrCb兩種顏色空間的膚色偵測流程
- Face Detection and Tracking
- Hand Detection and Tracking
- Pornographic Filter
| final class SampleViewController: StoryboardBackedViewController { | |
| // Unfortunately this must be an IUO var, so that we can set the value after super.init | |
| private var member: Foo! | |
| // Proper dependency injection in a storyboard backed VC! | |
| init(foo: Foo) { | |
| super.init(storyboardIdentifier: "SampleViewControllerIdentifier") | |
| // We have to set the members *after* calling super.init, since it changes the instance of `self`. | |
| self.member = foo |
| /** | |
| * Using Operator Mono in Atom | |
| * | |
| * 1. Open up Atom Preferences. | |
| * 2. Click the “Open Config Folder” button. | |
| * 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up. | |
| * 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden! | |
| * 5. Tweak away. | |
| * | |
| * Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png): |
| #!/bin/sh | |
| # enable-charles-proxy.sh | |
| # | |
| # Created by John Boiles on 9/21/15. | |
| # | |
| # This script sets :NSAppTransportSecurity:NSAllowsArbitraryLoads to true in the Info.plist file if building the Debug configuration. | |
| # This enables debugging from https proxies such as Charles. | |
| INFO_PLIST="${TARGET_BUILD_DIR}/${INFOPLIST_PATH}" |
Cartfile using one of the following: github "ReactiveCocoa/ReactiveCocoa" # GitHub.com
github "https://enterprise.local/ghe/desktop/git-error-translations" # GitHub Enterprise
git "https://enterprise.local/desktop/git-error-translations2.git"
git "/Users/user/foo/bar.git"…optionally followed by one of the following version specifiers:
| * { | |
| -webkit-font-smoothing: antialiased; | |
| -webkit-font-feature-settings: "liga" on, "calt" on; | |
| } | |
| atom-text-editor .cursor-line { | |
| -webkit-font-feature-settings: "liga" off, "calt" off; | |
| } |
Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)
This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.
| /* iPhone 6 landscape */ | |
| @media only screen and (min-device-width: 375px) | |
| and (max-device-width: 667px) | |
| and (orientation: landscape) | |
| and (-webkit-min-device-pixel-ratio: 2) | |
| { } | |
| /* iPhone 6 portrait */ | |
| @media only screen | |
| and (min-device-width: 375px) |
| import UIKit | |
| import CoreBluetooth | |
| class ViewController: UIViewController, CBCentralManagerDelegate, CBPeripheralDelegate { | |
| let centralManager:CBCentralManager! | |
| var connectingPeripheral:CBPeripheral! | |
| required init(coder aDecoder: NSCoder) { | |
| import UIKit | |
| /// Wrapper for the NSNotification userInfo values associated with a keyboard notification. | |
| /// | |
| /// It provides properties that retrieve userInfo dictionary values with these keys: | |
| /// | |
| /// - UIKeyboardFrameBeginUserInfoKey | |
| /// - UIKeyboardFrameEndUserInfoKey | |
| /// - UIKeyboardAnimationDurationUserInfoKey | |
| /// - UIKeyboardAnimationCurveUserInfoKey |