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
player.intersectScale = function(other) { | |
return this.x < other.x + (other.width * other.scaleX) && | |
other.x < this.x + (this.width * this.scaleX) && | |
this.y < other.y + (other.height * other.scaleY) && | |
other.y < this.y + (this.height * this.scaleY); | |
}; |
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
def myset(a1, a2) | |
h = Hash.new(0) | |
a1.each{|a| h[a] += 1} | |
a2.each{|a| h[a] += 1} | |
puts "a and b" | |
p h.select{|k, v| v == 2}.keys | |
puts "a or b" | |
p h.keys |
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
use AnyEvent; | |
use AnyEvent::HTTP; | |
my $w; | |
my $cv = AE::cv; | |
my @urls = qw{ | |
http://localhost:5000/ | |
http://localhost:5001/ | |
}; | |
my @watchers; |
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 DateTime = function() { | |
var now = new Date(); | |
this.year = now.getFullYear(); | |
this.month = ('00' + now.getMonth()).slice(-2); | |
var monthEndDate = new Date(this.year, this.month, 0); | |
this.startDate = this.year + '-' + this.month + '-01'; | |
this.endDate = this.year + '-' + this.month + '-' + monthEndDate.getDate(); | |
} | |
var Profile = function(profileName, tableId) { |
NewerOlder