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
// The Nordic UART Service | |
static const uint8_t uart_base_uuid[] = {0x71, 0x3D, 0, 0, 0x50, 0x3E, 0x4C, 0x75, 0xBA, 0x94, 0x31, 0x48, 0xF1, 0x8D, 0x94, 0x1E}; | |
static const uint8_t uart_tx_uuid[] = {0x71, 0x3D, 0, 3, 0x50, 0x3E, 0x4C, 0x75, 0xBA, 0x94, 0x31, 0x48, 0xF1, 0x8D, 0x94, 0x1E}; | |
static const uint8_t uart_rx_uuid[] = {0x71, 0x3D, 0, 2, 0x50, 0x3E, 0x4C, 0x75, 0xBA, 0x94, 0x31, 0x48, 0xF1, 0x8D, 0x94, 0x1E}; | |
static const uint8_t uart_base_uuid_rev[] = {0x1E, 0x94, 0x8D, 0xF1, 0x48, 0x31, 0x94, 0xBA, 0x75, 0x4C, 0x3E, 0x50, 0, 0, 0x3D, 0x71}; | |
uint8_t txPayload[TXRX_BUF_LEN] = {0,}; | |
uint8_t rxPayload[TXRX_BUF_LEN] = {0,}; | |
GattCharacteristic txCharacteristic (uart_tx_uuid, txPayload, 1, TXRX_BUF_LEN, |
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
// | |
// ViewController.swift | |
// animation810 | |
// | |
// Created by Sunny Cheung on 27/10/14. | |
// Copyright (c) 2014 khl. All rights reserved. | |
// | |
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
// | |
// ViewController.swift | |
// animation71 | |
// | |
// Created by Sunny Cheung on 24/10/14. | |
// Copyright (c) 2014 khl. All rights reserved. | |
// | |
import UIKit | |
import QuartzCore |
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
// | |
// ViewController.swift | |
// animation613 | |
// | |
// Created by Sunny Cheung on 23/10/14. | |
// Copyright (c) 2014 khl. All rights reserved. | |
// | |
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
// Set up Actions for notifications | |
let viewDetailAction:UIMutableUserNotificationAction = UIMutableUserNotificationAction() | |
viewDetailAction.identifier = "VIEW_ACTION" | |
viewDetailAction.title = "View Detail" | |
viewDetailAction.activationMode = UIUserNotificationActivationMode.Foreground | |
viewDetailAction.destructive = false | |
viewDetailAction.authenticationRequired = true | |
let cancelAction:UIMutableUserNotificationAction = UIMutableUserNotificationAction() |
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
// | |
// NSImage+OpenCV.mm | |
// | |
#import "NSImage+OpenCV.h" | |
static void ProviderReleaseDataNOP(void *info, const void *data, size_t size) | |
{ | |
return; | |
} |
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
import cv2 | |
import cv2.cv as cv | |
import config | |
import picamera | |
def detect_faces(image): | |
haar_faces = cv2.CascadeClassifier(config.HAAR_FACES) | |
detected = haar_faces.detectMultiScale(image, scaleFactor=config.HAAR_SCALE_FACTOR, | |
minNeighbors=config.HAAR_MIN_NEIGHBORS, | |
minSize=config.HAAR_MIN_SIZE, |
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
angular.module('googleMapAPI', []) | |
.config(function(googleMapServiceProvider) { | |
googeMapServiceProvider.setLang('zh-HK'); // Configuration that loading Google Map API in Traditional Chinese | |
}) | |
.provider('googleMapService', function () { | |
var language = 'en-US'; | |
function loadScript($document, callback, success) { | |
var scriptTag = $document.createElement('script'); | |
scriptTag.id = "google-map-script"; | |
scriptTag.type = "text/javascript"; |
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
<html ng-app="myApp"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | |
<title>Ionic List Directive</title> | |
<link href="http://code.ionicframework.com/0.9.24/css/ionic.min.css" rel="stylesheet"> | |
<script src="http://code.ionicframework.com/0.9.24/js/ionic.bundle.min.js"></script> | |
</head> |
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
/** | |
Add this to your functions.php file | |
**/ | |
function add_login_css() { | |
wp_enqueue_style('login_style', get_template_directory_uri() . '/css/login.css'); | |
} | |
add_action('login_head', 'add_login_css'); |