This file contains hidden or 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
var d = document.createElement("div"); | |
d.style.background = "#FFFF00"; | |
d.style.top = 0; | |
d.style.position = "fixed"; | |
d.style.top = "50%"; | |
d.style.left = "50%"; | |
d.style.marginLeft = "-150px"; | |
d.style.zIndex = "100000"; | |
d.style.width = "300px"; | |
var t = document.createTextNode("Message goes here..."); |
This file contains hidden or 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
// | |
// AppDelegate.h | |
// TabBar | |
// | |
// Created by Dennis Baldwin on 7/12/12. | |
// Copyright (c) 2012 __MyCompanyName__. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
This file contains hidden or 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
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
{ | |
if(_objects.count == 0) { | |
[self performSegueWithIdentifier: @"welcomeSegue" sender: self]; | |
} | |
return _objects.count; | |
} |
This file contains hidden or 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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Create rectangle layer and add it to view | |
rectLayer = [CAShapeLayer layer]; | |
rectLayer.fillColor = [[UIColor colorWithRed:1.0 green:0.0 blue:0.0 alpha:0.2] CGColor]; | |
rectLayer.strokeColor = [[UIColor whiteColor] CGColor]; | |
rectLayer.lineWidth = 3; | |
[self.view.layer addSublayer:rectLayer]; |
This file contains hidden or 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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Get a reference to the user defaults database | |
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; | |
// If this is the first run we're going into this if statement | |
if(![defaults objectForKey:@"firstRun"]) | |
{ |
This file contains hidden or 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
NSArray *upcs = [NSArray arrayWithObjects:@"018208254682", @"885909459865", @"885909480982", @"989898293469", @"725882475691", @"9780060766863", @"9780066620992", nil]; | |
NSString *upc = [upcs objectAtIndex:random()%[upcs count]]; | |
[product setValue: upc forKey: @"upc"]; |
This file contains hidden or 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
brew tap homebrew/science | |
brew install eigen # This was key for opencv to build | |
brew info opencv | |
brew install opencv | |
ln -s /usr/local/Cellar/opencv/2.4.9/lib/python2.7/site-packages/cv.py cv.py |
This file contains hidden or 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
2016-04-12 14:36:10.659 DronePan[1059:246203] New product | |
2016-04-12 14:36:25.083 DronePan[1059:246203] angle: 320.700000 | |
2016-04-12 14:36:25.085 DronePan[1059:246203] angle: 380.700000 | |
2016-04-12 14:36:25.087 DronePan[1059:246203] angle: 440.700000 | |
2016-04-12 14:36:25.089 DronePan[1059:246203] angle: 500.700000 | |
2016-04-12 14:36:25.091 DronePan[1059:246203] angle: 560.700000 | |
2016-04-12 14:36:25.094 DronePan[1059:246203] angle: 620.700000 | |
2016-04-12 14:36:25.095 DronePan[1059:246307] ******************* | |
2016-04-12 14:36:25.096 DronePan[1059:246307] Starting loop with yawSpeed: 30.000000 and yawDestination: 320.700012 | |
2016-04-12 14:36:25.097 DronePan[1059:246307] ******************* |
This file contains hidden or 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
# This gist is based off the YouTube video I posted here: | |
# https://www.youtube.com/watch?v=X0VsL-MxeJ8 | |
# as well as the documentation page here: | |
# http://ardupilot.org/dev/docs/building-px4-for-linux-with-make.html | |
# You'll need vagrant installed | |
# https://www.vagrantup.com/ | |
# Create Ubuntu 32 bit instance | |
vagrant init hashicorp/precise32 |
This file contains hidden or 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
W: 2016/06/05 12:03:49:133 [com.dronepan.queue.gimbal/1755300] GimbalController setAttitude(_:pitch:yaw:roll:) line: 420 Gimbal Controller setAttitude hasn't completed yet count: 1 | |
D: 2016/06/05 12:03:49:133 [com.dronepan.queue.gimbal/1755300] GimbalController setAttitude(_:pitch:yaw:roll:) line: 363 Setting attitude: count 2, pitch 30.0, yaw 0.0, roll 0.0 | |
D: 2016/06/05 12:03:50:145 [com.dronepan.queue.gimbal/1755466] GimbalController check(pitch:yaw:roll:) line: 287 Checking PA: true P: 30.0 CP: 29.9 | |
D: 2016/06/05 12:03:50:145 [com.dronepan.queue.gimbal/1755466] GimbalController check(pitch:yaw:roll:) line: 288 Checking YA: true Y: 0.0 CY: 60.6 CACY: 64.1 ACY: 3.5 | |
D: 2016/06/05 12:03:50:145 [com.dronepan.queue.gimbal/1755466] GimbalController check(pitch:yaw:roll:) line: 289 Checking RA: false R: 0.0 CR: 0.0 | |
W: 2016/06/05 12:03:50:145 [com.dronepan.queue.gimbal/1755466] GimbalController setAttitude(_:pitch:yaw:roll:) line: 420 Gimbal Controller setAttitude hasn't completed yet count: 2 | |
D: 2016/06/05 12:03:50 |
OlderNewer