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 init() | |
| seekVehicle = new SimpleVehicle(); | |
| seekVehicle.setPosition(Math.random() * displayWidth, 0, Math.random() * displayHeight); | |
| seekVehicle.radius = 10; | |
| seekVehicle.maxForce = 800.0; //steering force | |
| seekVehicle.maxSpeed = 300.0; //velocity | |
| seekVehicle.speed = 100; | |
| seekBoid = this.addBoid(seekVehicle, 0x00CC00); | |
| // function update(currentTime:Number, elapsedTime:Number) |
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
| <!-- Fix IE's mind-blowing idiocy --> | |
| <script type="text/javascript" charset="utf-8"> | |
| if (!window.console) { | |
| window.console = {}; | |
| } | |
| if (!window.console.log) { | |
| window.console.log = function () {}; | |
| } | |
| if (!window.console.error) { | |
| window.console.error = function () {}; |
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
| package { | |
| import com.transmote.flar.FLARManager; | |
| import com.transmote.flar.marker.FLARMarker; | |
| import com.transmote.flar.marker.FLARMarkerEvent; | |
| import flash.display.Sprite; | |
| import flash.events.Event; | |
| import flash.media.Video; | |
| import org.libspark.flartoolkit.support.pv3d.FLARCamera3D; |
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
| if(collisionAvoidance != Vec3::zero) | |
| applySteeringForce (collisionAvoidance, elapsedTime); | |
| else | |
| { | |
| float distHomeToBall = Vec3::distance (m_home, m_Ball->position()); | |
| if( distHomeToBall < 12.0f) | |
| { | |
| // go for ball if I'm on the 'right' side of the ball | |
| if( b_ImTeamA ? position().x > m_Ball->position().x : position().x < m_Ball->position().x) | |
| { |
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 require_clean_index() | |
| { | |
| # TODO: Allow to manually set which git directory | |
| git diff-index --quiet --cached HEAD | |
| if [ $? -ne 0 ]; then | |
| echo "This command requires a clean index. Please reset or commit changes and try again."; | |
| exit 2; | |
| fi | |
| } |
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
| if (this.ticksCatchable > 0) | |
| { | |
| --this.ticksCatchable; | |
| } | |
| else | |
| { | |
| short var28 = 500; | |
| if (this.worldObj.canLightningStrikeAt(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY) + 1, MathHelper.floor_double(this.posZ))) | |
| { |
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
| // Originally by @pleclech | |
| // via http://pastebin.com/1MDyFVJA | |
| var o:Object = { foo:"bar", hello:"world", one:"one", two:"two" }; | |
| var values:Array = []; | |
| for each (values[values.length] in o); | |
| trace(values); // world,one,two,bar | |
| var keys:Array = []; |
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
| $ svn checkout -r 958 https://eventlist.svn.sourceforge.net/svnroot/eventlist/trunk | |
| svn: E195012: Unable to find repository location for 'https://eventlist.svn.sourceforge.net/svnroot/eventlist/trunk' in revision 958 |
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
| $ telnet jw.org 80 | |
| Trying 54.246.51.69... | |
| Connected to jw.org. | |
| Escape character is '^]'. | |
| GET / HTTP/1.0 | |
| HTTP/1.1 403 Forbidden | |
| Server: Varnish | |
| Content-Type: text/html; charset=utf-8 | |
| Content-Length: 318 |
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
| #!/bin/bash | |
| if [ $# -lt 1 ]; then | |
| echo "[clear-git-directory.sh] Please specify the GIT repository to clear." | |
| exit 1; | |
| elif [ ! -d "$1/.git" ]; then | |
| echo "[clear-git-directory.sh] Cannot find a GIT repository in '$1'." | |
| exit 1; | |
| else | |
| cd "$1"; |