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
// ArkanoidPlayer | |
ArkanoidPlayer.prototype = Object.create(DrawableBlock.prototype); | |
ArkanoidPlayer.prototype.constructor = DrawableBlock; | |
function ArkanoidPlayer(drawingContext, color, blockHeight, blockWidth, stageWidth, stageHeight) { | |
var self = this; | |
self.stageWidth = stageWidth; | |
self.stageHeight = stageHeight; | |
self.cornerX = 0; | |
self.cornerY = 0; | |
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
//DrawableCircle: DrawableEntityBase | |
DrawableCircle.prototype = Object.create(DrawableEntityBase.prototype); | |
DrawableCircle.prototype.constructor = DrawableEntityBase; | |
function DrawableCircle(drawingContext, color, radius, centerX, centerY) { | |
DrawableEntityBase.call(this, drawingContext, color); | |
var self = this; | |
self.radius = radius; | |
self.centerX = centerX; | |
self.centerY = centerY; | |
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
// helper: grid calculator for coordinate system | |
function GridCalculator(realHeight, realWidth, numColumns, numRows) { | |
var self = this; | |
self.numColumns = numColumns; | |
self.numRows = numRows; | |
var getNumRows = function() { | |
return self.numRows; | |
} | |
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
Ball.prototype = Object.create(DrawableCircle.prototype); | |
Ball.prototype.constructor = DrawableCircle; | |
function Ball(drawingContext, color, radius, stageHeight, stageWidth) { | |
var self = this; | |
self.centerBall = function() { | |
self.centerX = (stageWidth - radius*2) / 2; | |
self.centerY = (stageHeight - radius*2) / 2; | |
} | |
self.centerBall(); | |
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
html { font-size: 18px; } | |
p { font-size: 0.8rem; } | |
p small { font-size: 0.5rem; } |
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
html { font-size: 18px; } | |
p { font-size: 0.8em; } | |
p small { font-size: 0.625em; } |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<configSections> | |
<section name="managedFusion.rewriter" type="ManagedFusion.Rewriter.Configuration.ManagedFusionRewriterSectionGroup"/> | |
</configSections> | |
<!-- ... más configuraciones... --> | |
<system.webServer> | |
<!-- ... más configuraciones... --> | |
<modules> |
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
RewriteEngine On | |
# Uncomment these lines to enable logging | |
# RewriteLog "log.txt" | |
# RewriteLogLevel 9 | |
RewriteRule ^/api/(.*) http://api.anotherserver.com/$1 [QSA,P,NC] | |
RewriteRule ^/testing/(.*) http://blog.alphasmanifesto.com/$1 [QSA,P,NC] |
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
svg.append('line') | |
.attr('x1', arrowOrigin.x) | |
.attr('y1', arrowOrigin.y) | |
.attr('x2', arrowDestiny.x) | |
.attr('y2', arrowDestiny.y) | |
.attr('stroke-width', 2) | |
.attr('stroke', 'black'); |
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
// example as described in http://blog.alphasmanifesto.com/2014/04/12/what-now-graficando-dependencias/ | |
function arrangeInLayers(graph) { | |
var nodesToVisit = graph.slice(0); | |
var visitedNodes = []; | |
var layers = []; | |
var currentLayer = []; | |
while (nodesToVisit.length) { | |
for (var i = nodesToVisit.length - 1; i >= 0; i--) { |