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
var Robot = function(robot){ | |
robot.turnLeft(robot.angle % 90); | |
//robot.turnGunRight(90); | |
robot.clone(); | |
this.direction = 1; | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(1); | |
if (robot.parentId) { |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.rotateCannon(360); |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
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
def test_widget_obter_contexto_semantico(self): | |
with mock.patch("semantica.repositories.SparqlRepository") as MockClass: | |
instance = MockClass.return_value | |
instance.select.return_value = [{'label': 'Rio de Janeiro', 'slug': 'rio-de-janeiro', 'sigla': 'rj'}] | |
widget = WidgetHeaderPaginaCidade(None, None) | |
# mock do container | |
widget.conteudo_container = { | |
'contexto': { |
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
Django ORM - Melhores práticas | |
Criando sua base de dados | |
Criando seu modelo( Vale para qualquer base de dados do universo, Sql ou não) | |
1. Tente usar poucos joins. Não existe problema se um campo nem sempre for | |
preenchido, campos podem ser nulos por isso mesmo. |
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
help: | |
grep '^[^#[:space:]].*:' Makefile | awk -F ":" '{print $$1}' |
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
> var objeto = new Objeto(); | |
> objeto.atributo1 | |
1 | |
> var objeto_filho = new ObjetoFilho(); | |
> objeto_filho.atributo1 | |
1 |
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 ObjetoFilho() { | |
Objeto.call(this); | |
} | |
ObjetoFilho.prototype = new Objeto(); |
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 Objeto() { | |
this.atributo1 = 1; | |
this.atributo2 = 2; | |
} | |
Objeto.prototype.metodo1 = 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
git grep "search" | awk -F ":" '{print $1}' | xargs vim -p |