- A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
- lengths are in any unit (ex: pixels)
- code snippets are in JavaScript
angleRad = angleDeg * Math.PI / 180;
| var express = require("express"); | |
| var app = express(); | |
| app.get('/', function (req, res) { | |
| res.send("This is the '/' route in ep_app"); | |
| }); | |
| module.exports = app; |
| <?php | |
| // All file paths relative to root | |
| chdir(dirname(__DIR__)); | |
| require "vendor/autoload.php"; | |
| $settings = ['foo' => 'FOO', 'bar' => 'BAR']; | |
| $app = new \Slim\App($settings); | |
| // Set some things into the container |
| /* | |
| I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
| so it's better encapsulated. Now you can have multiple random number generators | |
| and they won't stomp all over eachother's state. | |
| If you want to use this as a substitute for Math.random(), use the random() | |
| method like so: | |
| var m = new MersenneTwister(); |
| #!/usr/bin/env bash | |
| # via http://stackoverflow.com/a/17843908/773209 | |
| # | |
| # Ubuntu variant | |
| # | |
| # if ack-grep isn't found: | |
| # $ sudo apt-get install ack-grep | |
| branch=`git rev-parse --abbrev-ref HEAD` |
| #!/usr/bin/env bash | |
| # Use this one-liner to produce a JSON literal from the Git log: | |
| git log \ | |
| --pretty=format:'{%n "commit": "%H",%n "author": "%an <%ae>",%n "date": "%ad",%n "message": "%f"%n},' \ | |
| $@ | \ | |
| perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \ | |
| perl -pe 's/},]/}]/' |
The advantages of using Grunt with Cordova:
platforms directory without having to commit the generated plugins and platforms directories to version control.Stack Overflow: .gitignore for PhoneGap/Cordova 3.0 projects - what should I commit?
Make sure you have adb installed and that it works. Test this by connecting your phone and running adb devices. In order to proceed past the build stage, your device must be rooted. The device I used is running Cyanogenmod with root enabled for both apps and adb.
You'll need to get the Android NDK. I used r8e, which you can get from here: http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86.tar.bz2. Make sure you get the x86 version, as the x86_64 version will not help you. Let's call the path where you unpack this NDK_PATH.
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html> | |
| <head> | |
| <title> | |
| MobileSafari Live Click Bug | |
| </title> | |
| <script src='http://code.jquery.com/jquery-git.js' type='text/javascript'></script> | |
| <script src='http://media.lib.byu.edu/js/jquery/plugins/jquery.livequery-1.0.3.js' type='text/javascript'></script> | |
| </head> | |
| <body style='font-family: Helvetica;'> |