I hereby claim:
- I am skypanther on github.
- I am skypanther (https://keybase.io/skypanther) on keybase.
- I have a public key whose fingerprint is 902C 1285 BB32 4F2E 0CF0 FBC5 2329 CA36 9FAB 9DE6
To claim this, I am signing this object:
var myFunction = function() { | |
if(typeof arguments[0] == 'function') { | |
arguments[0](); // throws error: [object Object] is not a function | |
// but this works | |
var cb = arguments[0]; | |
cb(); | |
} | |
}; | |
myFunction(function() { |
function parseColor(color) { | |
// from http://www.bitstorm.org/jquery/color-animation/jquery.animate-colors.js | |
var match, triplet; | |
// Match #aabbcc | |
if (match = /#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(color)) { | |
triplet = [parseInt(match[1], 16), parseInt(match[2], 16), parseInt(match[3], 16), 1]; | |
// Match #abc | |
} else if (match = /#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(color)) { |
Alloy.Globals.winTop = (OS_IOS && parseInt(Ti.Platform.version, 10) >= 7) ? 20 : 0; | |
Ti.UI.backgroundColor = "#fff"; |
// Ti sometimes determines platformWidth before, rather than after a | |
// reorientation. This works around that from @FokkeZB | |
if (OS_ANDROID) { | |
Alloy.Globals.platformWidth = Alloy.Globals.platformWidth / Alloy.Globals.density; | |
Alloy.Globals.platformHeight = Alloy.Globals.platformHeight / Alloy.Globals.density; | |
if (Ti.Gesture.landscape) { | |
console.info('switching!'); |
var _ = require('underscore')._; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
settings: { | |
appName: 'YourAppName', | |
ppUuid: 'uuid', /* Provisioning profile UUID */ | |
distributionName: 'cert_name', /* Distr. certificate name */ | |
keystoreLocation: '/Users/path/to/android.keystore', /* path to keystore */ | |
storePassword: 'keystore_password', /* keystore password */ |
I hereby claim:
To claim this, I am signing this object:
int circumferenceInInches = 123; | |
int pulsesPerRotation = 1000; | |
protected void function auto1() { | |
RobotDrive drive = RobotMap.driveSystemdrive; | |
CANTalon talon = RobotMap.driveSystemCANTalon1; | |
//Change control mode of talon, other options are Follower Mode or Voltage Compensation | |
talon.changeControlMode(ControlMode.Position); | |
//Select either QuadEncoder or Pulse Width / Analog, we want Quad |
/* | |
Instructions | |
1. In the same directory where this js file exists, run `npm install gcm` (to install the required node module) | |
2. Get your GCM/FCM API Key from the Google APIs Console and paste it in place of "YOUR_GCM_API_KEY" below | |
2. You'll need your device's push token. You can get this by logging the token when your GCM-enabled app calls | |
the "success" callback after registering for push services. Paste it in place of "YOUR DEVICE_PUSH_TOKEN" below. | |
3. Run this with `node pushtest.js` | |
4. After a moment, you should get the push notification on your device |
// alternative to built-in base64 encode function, which has outstanding bugs | |
// alternatively, use: | |
// String(Ti.Utils.base64encode(theBlob)).replace(/(\r\n|\n|\r)/gm,""); | |
function Base64EncodeAscii(str) { | |
if (/([^\u0000-\u00ff])/.test(str)) { | |
throw 'String must be ASCII'; | |
} | |
var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; | |
var o1, | |
o2, |
import cv2 | |
from multicam import Multicam | |
mcam = Multicam(gpio_mode='bcm') | |
cv2.imshow('Cam A', mcam.capture(cam='a')) | |
cv2.imshow('Cam B', mcam.capture(cam='b')) | |
cv2.imshow('Cam C', mcam.capture(cam='c')) | |
cv2.imshow('Cam D', mcam.capture(cam='d')) | |
# cv2.imshow('Cam E', mcam.capture(cam='e')) |