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
package com.qualcomm.ftcrobotcontroller.opmodes; | |
import com.qualcomm.robotcore.eventloop.opmode.OpMode; | |
import com.qualcomm.robotcore.hardware.DcMotor; | |
import com.qualcomm.robotcore.util.Range; | |
/** | |
* Created by mharsch on 9/12/15. | |
*/ | |
public class VSpeedTeleOp extends OpMode { |
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
Random integer in range algorithm: | |
given that rand() produces a random number between 0 and RAND_MAX (defined in stdlib.h) | |
and we want a random integer (rand_index) between 0 and page_range where page_range = malloc_size / page_size | |
page_range = malloc_size / page_size; | |
if ( RAND_MAX > page_range ) { | |
rand_index = ( rand() % page_range ) * page_size; | |
} else { |
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
var qs = require('querystring'); | |
var request = require('request'); | |
var fbapp = { | |
id: '<your fb app id>', | |
secret: '<your fb app secret>' | |
}; | |
var fb_perm = 'email,user_birthday,user_interests,user_location,friends_birthday,friends_interests,friends_location,publish_stream,offline_access,sms'; |
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
--- notes from my initial pass trying to get wesolows/v8plus to work on linux --- | |
Download source for both SPL (Solaris Portability Layer) and ZFS from | |
zfsonlinux.org. Build both SPL and ZFS packages. Now you have the libnvpair | |
library and the necessary solaris header files to build v8plus. | |
Modify v8plus Makefile.v8plus.defs as follows | |
add '-I' include directives to CPPFLAGS for /tmp/zfs/lib/libspl/include and | |
/tmp/zfs/include (assuming you downloaded the zfs on linux repo to /tmp) | |
add -DHAVE_IOCTL_IN_UNISTD_H to CPPFLAGS |
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
libnvpair is available as a nice independent bundle from the ZFS on Linux project. | |
To install libnvpair (and it's dependencies) on Ubuntu: | |
sudo add-apt-repository ppa:zfs-native/stable | |
sudo apt-get update | |
sudo apt-get install libnvpair1 |
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
Connecting a 2012 samsung chromebook XE303C12 ($249 ARM-based model) to a Dell E2209W 22" | |
widescreen LCD monitor (using a DVI to HDMI cable) produces inconsistent resolution | |
detection for the external monitor. The E2209W reports it's optimal resolution | |
(when connected to the chromebook) to be 1680x1050@60Hz, but often syncs at 1788x1050@60Hz. | |
On my system, this produces a black stripe on the right side of the screen. The state of | |
the external monitor (on/off, connected/disconnected) at boot-time determines whether | |
or not the resolution will successfully sync to the optimal setting. Through | |
trial-and-error, I've determined that the following sequence always lands on the optimal | |
monitor resolution: |
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
mharsch@linbrook:~/tmp$ uname -a | |
Linux linbrook 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux | |
mharsch@linbrook:~/tmp$ cd papi-5.0.1/ | |
mharsch@linbrook:~/tmp/papi-5.0.1$ cd src/components/cuda | |
mharsch@linbrook:~/tmp/papi-5.0.1/src/components/cuda$ echo $LD_LIBRARY_PATH | |
/usr/local/cuda-5.0/lib64:/usr/local/cuda-5.0/extras/CUPTI/lib64:/lib: | |
mharsch@linbrook:~/tmp/papi-5.0.1/src/components/cuda$ echo $PATH | |
/home/mharsch/local/bin:/usr/local/cuda-5.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games | |
mharsch@linbrook:~/tmp/papi-5.0.1/src/components/cuda$ ./configure --help|grep with-cu | |
--with-cuda_incdir=<path> Specify path to CUDA includes |
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
ls *.flv | awk '{ print "file '\''"$1"'\''" }' |
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
Notes for final nodebots day organizer's meeting: | |
Chris will record his intro video and give to dshaw before Thursday | |
length will be 20min max | |
content will include 'get to blinking led' bootstrap sequence | |
dshaw recommends following up with all attendees this week to combat attrition | |
Medellín is considering streaming video toward the end of their event |
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
pi@raspberrypi ~ $ cat /etc/network/interfaces | |
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
allow-hotplug wlan0 | |
iface wlan0 inet static | |
address 10.0.0.1 | |
netmask 255.0.0.0 |
OlderNewer