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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Global Composite Operation</title> | |
<link rel="stylesheet" href="venn.css" type="text/css"> | |
</head> | |
<body> | |
<div id="container"> | |
<p>Canvas Global Composite Operation</p> | |
<canvas id="venn" width="1000" height="600"></canvas> |
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
<script type="text/javascript" charset="utf-8"> | |
var buffer = new ArrayBuffer( 16 ); | |
var int32View = new Int32Array( buffer ); | |
for ( var i = 0; i < int32View.length; i++ ) { | |
int32View[i] = i * 2; | |
} | |
alert( int32View[ 3 ] ); // Alerts 6 in 4.2.1 | |
</script> |
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
#oadingL, #oadingL marquee { | |
font-size:1px; | |
-moz-border-radius:16px; | |
-webkit-border-radius:16px; | |
border-radius:16px; | |
} |
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
CACHE MANIFEST | |
# v0.1 | |
index.html | |
lib/jquery-1.4.4.min.js | |
main.css | |
main.js | |
images/eng2fr.png |
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
http://img.brothersoft.com/icon/softimage/0/2004_top_tank-27153.jpeg |
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
onRobotScanned: function(enemy) { | |
var angle = enemy.bearing - this.gunBearing | |
angle = angle < -180 ? 360 + angle : angle | |
this.turnGunRight(angle) | |
this.state = 'lock' | |
if(Math.abs(angle) <= 1 && this.energy > 10) { | |
this.fire(enemy.velocity < 1 ? 4 : 1) | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Collection mapping: jQuery vs jQuery vs JavaScript</title> | |
</head> | |
<body> | |
<h1>Comparing Maps</h1> | |
<h2>jQuery vs jQuery vs JavaScript</h2> | |
<p>Output is in the JavaScript console.</p> | |
<p>For more info, view source (or visit <a href="http://www.mrspeaker.net/2011/04/27/reducing-map/">Mr Speaker's "reducing map"</a>) |
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
/* | |
Make Google+ like Twitter. So, you know, it's useful. | |
by Mr Speaker | |
Limits post size to 80px high. | |
Double click to expand/contract. | |
Relies on jQuery (included by default with dotjs) | |
*/ | |
(function AddStylez() { |
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
These are the scripts I use to create the playlists for the AI Class (available here: http://www.mrspeaker.net/2011/10/26/ai-class-playlists/). It's not pretty, but it works. I put them up here due to popular demand. | |
The first stage is to grab the video list HTML from YouTube and extract/sort the videos. This is done with the Video_ID_scraper.html file (instructions there). | |
Next, paste the video info into the YouTube_Playlist_Uploader.py script and it generates the playlist. It relies on the GData APIs so you need a dev key etc. | |
Any questions to mrspeaker@gmail.com |
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
/* | |
After watching a few of Notch's (and Mojan's) "write a game in a weekend" livecasts and | |
pulling apart some of the code (http://www.mrspeaker.net/2011/12/30/colorising-sprites-1/) | |
I've noticed that the collision detection routines are broken into two methods - usually | |
called "move" and "move2". | |
The move method gets the amount the entity will move on the X axis and calls | |
move2 with move2(x, 0). Then the same thing is done with the Y: move2(0,y). | |
Why would this be necessary? I've broken the code down into pseudo code to see if I |
OlderNewer