Skip to content

Instantly share code, notes, and snippets.

View crussell52's full-sized avatar

Chris Russell crussell52

  • Roswell, GA
View GitHub Profile
@crussell52
crussell52 / HumanInput.pseudo
Last active January 29, 2022 17:45
HumanInput module
// pseudo-code to describe a HumanInput class for the robot.
//
// The idea behind HumanInput is to isolate all logic that interprets human input
// into a single location. This allows Commands to extract an interpreted value
// to send into a subsystem instead of a raw value.
//
// All Input manipulation (filtering, smoothing, etc) becomes the responsibility of the
// HumanInput class instead of Commands or Subsystems. The benefit is that you can alter
// the manipulations without ever touching your Command or Subsystem code, reducing the
// chance of side effect.
@crussell52
crussell52 / ant.xml
Created June 18, 2011 02:37
Ant file described.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="export" name="Create Jar for Project PointsOfInterest">
<property name="jar.name" value="PointsOfInterest.jar"/>
<property name="proj.dir" value="D:/Development/bukkit/BukkitPlugins/PointsOfInterest/"/>
<property name="jar.dest" value="${proj.dir}build/${jar.name}"/>
<property name="classes.dir" value="${proj.dir}target/classes/" />
<property name="api.jar" value="D:/Development/bukkit/PointsOfInterestAPI.jar"/>
<property name="export.dir" value="D:/minecraft/bukkit/plugins/"/>
@crussell52
crussell52 / gist:549839
Created August 25, 2010 16:50
borrowing heavily from http://github.com/scottgonzalez/jquery-ui-extensions/blob/master/autocomplete/jquery.ui.autocomplete.html.js, this extension adds support for a callback function for building the text of the item label.
(function ( $ )) {
$.ui.autocomplete.prototype._renderItem = function (ul, item) {
var text = (this.options.label) ? this.options.label( item ) : item.label;
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( $( "<a></a>" )[ this.options.html ? "html" : "text" ]( text );
.appendTo( ul );
}
}