- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
- lxml - Pythonic binding for the C libraries libxml2 and libxslt.
- boto - Python interface to Amazon Web Services
- Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
- Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
- PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
- Celery - Task queue to distribute work across threads or machines.
- pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.
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
| // hasClass, takes two params: element and classname | |
| function hasClass(el, cls) { | |
| return el.className && new RegExp("(\\s|^)" + cls + "(\\s|$)").test(el.className); | |
| } | |
| /* use like below */ | |
| // Check if an element has class "foo" | |
| if (hasClass(element, "foo")) { |
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 jq = document.createElement('script'); | |
| jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
| document.getElementsByTagName('head')[0].appendChild(jq); | |
| // ... give time for script to load, then type. | |
| jQuery.noConflict(); |
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
| import threading | |
| def set_interval(func, sec): | |
| def func_wrapper(): | |
| set_interval(func, sec) | |
| func() | |
| t = threading.Timer(sec, func_wrapper) | |
| t.start() | |
| return t |
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
| <path to>/blockly_compressed.js:70 | |
| ssertionError";goog.asserts.DEFAULT_ERROR_HANDLER=function(a){throw a;};goog.a | |
| ^ | |
| AssertionError: Assertion failed: Error: "controls_if" is an unknown language block. | |
| at new goog.asserts.AssertionError (/home/techplex/Documents/projects/blockly/blockly/blockly_compressed.js:70:597) | |
| at Object.goog.asserts.doAssertFailure_ (/home/techplex/Documents/projects/blockly/blockly/blockly_compressed.js:71:126) | |
| at Object.goog.asserts.assertObject (/home/techplex/Documents/projects/blockly/blockly/blockly_compressed.js:74:104) | |
| at Blockly.Block.fill (/home/techplex/Documents/projects/blockly/blockly/blockly_compressed.js:987:485) | |
| at Blockly.Block.initialize (/home/techplex/Documents/projects/blockly/blockly/blockly_compressed.js:986:401) | |
| at Function.Blockly.Block.obtain (/home/techplex/Documents/projects/blockly/blockly/blockly_compressed.js:986:269) |
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
| wget https://github.com/google/closure-library/archive/master.zip | |
| unzip master.zip | |
| mv closure-library-master closure-library |
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
| public class XboxController { | |
| private Joystick joystick_; | |
| XboxController(int port) { | |
| joystick_ = new Joystick(port); | |
| } | |
| public boolean isA() { | |
| joystick_.getRawButton(0); |
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
| import edu.wpi.first.wpilibj.Joystick; | |
| public class Example { | |
| public Example() { | |
| Joystick a = new Joystick(1); | |
| Joystick b = new Joystick(1); | |
| Xbox x = (Xbox) b; //this is what I wanted to do | |
| Xbox_1 = new Xbox_1(b); //this is what I ended up doing | |
| } | |
| } |
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
| /** | |
| * map a number from one range to another | |
| * @param {num} value the value to be mapped | |
| * @param {num} old_min the minimum of value | |
| * @param {num} old_max the maximum of value | |
| * @param {num} new_min the new minimum value | |
| * @param {num} new_max the new maximum value | |
| * @return {num} the value remaped on the range [new_min new_max] | |
| */ | |
| public double map(double value, double old_min, double old_max, double new_min, double new_max) { |