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
function intersect(x1, y1, x2, y2, x3, y3, x4, y4){ | |
var a1, a2, b1, b2, c1, c2; | |
var r1, r2 , r3, r4; | |
var denom, offset, num; | |
// Compute a1, b1, c1, where line joining points 1 and 2 | |
// is "a1 x + b1 y + c1 = 0". | |
a1 = y2 - y1; | |
b1 = x1 - x2; | |
c1 = (x2 * y1) - (x1 * y2); |
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 app = require('http').createServer(handler), fs = require('fs'); | |
var port = Number(process.env.PORT || 5000); | |
app.listen(port, function() { | |
console.log("Listening on " + port); | |
}); | |
function handler(req, res) { | |
fs.readFile(__dirname + req['url'], function(err, data) { |
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
#pragma config(Sensor, S1, HTSPB, sensorI2CCustom9V) | |
///Requires Xander's drivers | |
#include "drivers/hitechnic-superpro.h" | |
task main() { | |
HTSPBsetupIO(HTSPB, 0x3F); | |
while(true) { | |
nxtDisplayTextLine(1, "B0: %d", HTSPBreadIO(HTSPB, 0x00)); |
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
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAC0AAAAYyCAYAAACscm9qAAAMFWlDQ1BJQ0MgUHJvZmlsZQAASImVlwdUk8kWx+crKYSEFoiAlNCbIL1K7x3pYCMkAUKJIRBU7OiigmsXERQVXRFRcS2ALCoiioVFwF5fLKisrIsFGypvkgD63LfnnTfnzPf9cufeO/+ZzHxnBgBFe5ZAkI0qAZDDzxdGB/owE5OSmSQxwAEdqAIAzFnsPIF3VFQY+Mfy7gZAJO+rlpJc/+z3X4syh5vHBgCJgpzKyWPnQD4GAK7JFgjzASB0Q7vBnHyBhN9CVhVCgQAQyRJOl7GWhFNlbC31iY32hewHAJnKYgnTAVCQ5GcWsNNhHgUBZGs+h8eHvBOyBzuDxYEshjwpJ2c2ZEUqZNPU7/Kk/0fO1PGcLFb6OMvGIi1kP16eIJs17/+cjv9dcrJFY33ow0rNEAZFS8YM521f1uxQCUPtSAs/NSISsgrkCzyO1F/CdzJEQXGj/gPsPF84Z4ABAAo4LL9QyHAuUYYoK857lG1ZQmks9EcjePnBsaOcKpwdPZofLeDm+ceMcQY3OGw050p+dsQYV6XxAoIhw5WGHivMiE2Q6UTbC3jxEZAVIHfnZcWEjvo/KMzwjRjzEYqiJZoNIb9NEwZEy3ww9Zy8sXFhVmyWVIM6ZK/8jNggWSyWyM1LDBvTxuH6+cs0YBwuP25UMwZXl0/0aGyxIDtq1B+r4mYHRsvmGTucVxAzFtubDxeYbB6wR5mskCiZfuydID8qVqYNx0EY8AV+gAlEsKaC2SAT8LoGGgfgL1lLAGABIUgHXGA5ahmLSJC28OEzBhSCPyFxQd54nI+0lQsKoP3LuFX2tARp0tYCaUQWeAo5B9fEPXA3PAw+vWC1xZ1xl7E4puJYr0R/oh8xiBhANBvXwYaqs2EVAt7fbd8iCU8JPYRHhOsEMeE2CIWtXDhmiUL++MjiwRNpltHfs3hFwh+UM0E4EMO4gNHRpc |