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
{- | |
FizzBuzz implementation using Haskell | |
http://codingdojo.org/cgi-bin/wiki.pl?KataFizzBuzz | |
-} | |
fizzBuzz = [ | |
if x `mod` 3 == 0 then | |
"Fizz" | |
else | |
if x `mod` 5 == 0 then |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics.Contracts; | |
using System.Web.Http.Dependencies; | |
using Ninject; | |
using Ninject.Syntax; | |
public class NinjectDependencyScope : IDependencyScope | |
{ | |
private IResolutionRoot resolver; |
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
/* | |
underscore-1.4.4.d.ts may be freely distributed under the MIT license. | |
Copyright (c) 2013 Josh Baldwin https://github.com/jbaldwin/underscore.d.ts | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without | |
restriction, including without limitation the rights to use, | |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
module Y { | |
interface Anim extends Base { | |
} | |
interface App extends App_Base, App_Content, App_Transitions, PjaxContent { | |
(config?: any); | |
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
terminal = require('terminal') | |
console.log terminal.ANSIFormat("{{magenta}}Hello {{blue}}World!{{reset}}") | |
console.log terminal.ANSIStyle('red;inverse') + "ERROR:" + terminal.ANSIStyle('default;noinverse') + " method not found" |
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
using System.Text; | |
using System.Linq; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace TestProject1 | |
{ | |
[TestClass] | |
public class TestSmsDojo | |
{ | |
[TestMethod] |
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
PASSOS: | |
1) alterar no arquivo index.js o nome do projeto de "node-ant" para "node_ant" na geração da tag <project>. Isso foi necessário para conseguirmos recuperar a referência ao nome do projeto no código javascript que iremos escrever no teste item (3). Não sei como o ant gera o nome quando usamos "-" no meio desse nome. | |
2) alterar no arquivo jxon.js o trecho de código: | |
... | |
else if (key === 'keyValue') { | |
keyValue = cur; | |
} |
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
<h1>teste</h1> |
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(exports){ | |
function Carro(marca){ | |
this.marca = marca; | |
// este é um campo privado. | |
// campos privados precisam ser definidos dentro do construtor da classe. | |
_km = 0; | |
} | |
Carro.prototype.getKm = function(){ |
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(exports){ | |
function Carro(marca){ | |
this.marca = marca; | |
} | |
Carro.prototype.Km = 0; | |
Carro.prototype.andar = function(){ | |
console.log(textoFormatado.call(this)); | |
} |