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
package net.noiseinstitute.lambda; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.List; | |
public class Map { | |
public static <T,U> List<U> map (Collection<T> collection, MapCallback<T,U> callback) { | |
List<U> list = new ArrayList<U>(); |
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 matrix:Matrix = new Matrix(); | |
matrix.scale(0.2); | |
var bitmapData:BitmapData = new BitmapData(width, height); | |
bitmapData.draw(movieClip, matrix); |
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 sprite2ToSprite1:FlxPoint = VectorMath.subtract(sprite1.centre, sprite2.centre); | |
var sprite2ToSprite1UnitVector:FlxPoint = VectorMath.normalize(sprite2ToSprite1); | |
var sprite2SpeedTowardsSprite1:Number = VectorMath.dotProduct(sprite2.velocity, sprite2ToSprite1UnitVector); | |
var sprite1ToSprite2UnitVector:FlxPoint = VectorMath.negate(sprite2ToSprite1UnitVector); | |
var sprite1SpeedTowardsSprite2:Number = VectorMath.dotProduct(sprite1.velocity, sprite1ToSprite2UnitVector); | |
var sumOfThoseSpeeds:Number = sprite1SpeedTowardsSprite2 + sprite2SpeedTowardsSprite1; | |
var sprite1VelocityChange:FlxPoint = | |
VectorMath.multiply(sprite2ToSprite1UnitVector, sumOfThoseSpeeds/2); | |
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
svn status | | |
Select-String '^\?' | | |
ForEach-Object { | |
[Regex]::Match($_.Line, '^[^\s]*\s+(.*)$').Groups[1].Value | |
} | | |
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue |
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
function escapeSelector(selector) { | |
return "".replace.call(selector, | |
/(^[^_a-zA-Z\u00a0-\uffff]|[^-_a-zA-Z0-9\u00a0-\uffff])/g, | |
"\\$1"); | |
} | |
// Use this to escape CSS identifiers that may contain reserved characters. | |
// For example, in JQuery, to select the element whose identifier is named by the variable 'id': | |
$('#' + escapeSelector(id)); |
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
svn status --no-ignore | | |
Select-String '^[?I]' | | |
ForEach-Object { | |
[Regex]::Match($_.Line, '^[^\s]*\s+(.*)$').Groups[1].Value | |
} | | |
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue |
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 uriBuilder = new UriBuilder(); | |
uriBuilder.Query = "foo=bar"; | |
Console.WriteLine(uriBuilder.Query); // prints "?foo=bar" | |
uriBuilder.Query = uriBuilder.Query; | |
Console.WriteLine(uriBuilder.Query); // prints "??foo=bar" | |
// Someone at Microsoft needs a swift kick in the balls. |
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 Foo { | |
function hatstand():void {} | |
function lampshade():void { | |
Tablecloth.onRemove(hatstand); // <- this allocates | |
} | |
} | |
class Foo { | |
var f:Function; | |
function Foo() { |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Mathieu 'p01' Henri http://www.p01.org/releases/ | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
#!/bin/sh | |
# This turned out to be easier than expected. | |
SWF="$1" | |
fdb "$SWF" |
OlderNewer