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 people = [ | |
{ | |
name: "J.D. Zamfirescu", | |
food: "宫保鸡丁", | |
color: "blue" | |
}, | |
{ | |
name: "Adam Smith", | |
food: "小笼包", | |
color: "red" |
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 jd = { | |
name: "J.D. Zamfirescu", | |
food: "宫保鸡丁", | |
color: "blue" | |
}; | |
textAlign(CENTER); | |
fill(0); | |
textSize(15); |
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 hues = [14,134,13,65,134,243,95,68,345]; | |
colorMode(HSB); | |
noStroke(); | |
for (var i = 0; i < hues.length; i += 1) { | |
fill(hues[i], 100, 100); | |
ellipse(20+i * 30, height/2, 15); | |
} |
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 poses = [ | |
{ | |
"nose": { | |
"x": 333.79916958873963, | |
"y": 281.8711811385424, | |
"confidence": 0.9843198657035828 | |
}, | |
"leftEye": { | |
"x": 385.9717814127604, | |
"y": 245.32875046163042, |
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
-ENDMESSAGE- because it :: 0.8181818181818182 (9:2) | |
-ENDMESSAGE- mile :: 0.18181818181818182 (2:9) | |
-ENDMESSAGE- thank you :: 0.7692307692307693 (10:3) | |
able to :: 0.7692307692307693 (10:3) | |
all agree :: 0.14285714285714285 (2:12) | |
all agree -ENDMESSAGE- :: 0.09090909090909091 (1:10) | |
average :: 0.21739130434782608 (5:18) | |
be able :: 0.8181818181818182 (9:2) | |
be able to :: 0.8181818181818182 (9:2) | |
be around :: 0.23076923076923078 (3:10) |
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
class Blinker { | |
public: | |
Blinker(int pin, float periodSeconds, float onSeconds = 0.5, float delayUntilStart = 0.0) { | |
this->pin = pin; | |
period = periodSeconds * 1000; | |
onTime = onSeconds * 1000; | |
offset = delayUntilStart * 1000; | |
nextOn = millis() + offset; | |
pinMode(pin, OUTPUT); | |
} |
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
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> | |
<script type="text/javascript" src="tracery.js"></script> | |
<title>Text Generator</title> | |
</head> | |
<body> | |
<button onclick="addNewTrace()">One more!</button> | |
<div id="main"></div> |
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 puck = { | |
x: 200, | |
y: 200, | |
xSpeed: 3, | |
ySpeed: -1, | |
r: 15 | |
}; | |
var edgeOffset = 20; | |
var player1 = { |
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 circles = []; | |
function setup() { | |
createCanvas(400, 400); | |
for (var index = 0; index < 100; index = index + 1) { | |
circles[index] = { | |
x: width / 2, | |
y: height / 2, | |
xSpeed: random(-5, 5), |
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 x = []; | |
var y = []; | |
var xSpeed = []; | |
var ySpeed = []; | |
var colors = []; | |
function setup() { | |
createCanvas(400, 400); | |
for (var index = 0; index < 100; index = index + 1) { |