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 Robot = function(robot){ | |
robot.turnLeft(robot.angle % 90); | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
if (robot.parentId) { | |
robot.ahead(1); | |
robot.turnGunRight(1); | |
} | |
else { |
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 Robot = function(robot) { | |
robot.rotateCannon(-90); | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(); | |
//i'll add a clone but i need to refactor collision | |
//robot.clone(); | |
}; |
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(object): | |
... def bla(self): | |
... print 1 | |
... | |
>>> a = foo() | |
>>> a.bla | |
<bound method foo.bla of <__main__.foo object at 0xb750dfac>> | |
>>> del foo.bla | |
>>> a.bla | |
Traceback (most recent call last): |
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
DEVICE = "/dev/lp0"; | |
STX = chr(2); | |
CR = chr(13); | |
LF = chr(10); | |
DEFAULTS = { | |
'ori': 4, | |
'font': 2, | |
'mh': 2, | |
'mv': 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
# disclaimer | |
# essa implementação é um tanto presa a funções da biblioteca do django | |
# basicamente por pura preguiça/conveniência minha | |
# | |
from django.utils.encoding import smart_str, force_unicode | |
import unicodedata | |
def remove_accents(value): |
NewerOlder