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 the .to chainable | |
expect(1).to.equal(1); | |
# Using the .to and .be chainables | |
expect(1).to.be.an('Int'); |
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 reflection; | |
class Animal { | |
func Animal (self, name) { | |
self.name = name; | |
} | |
func canBark (self) { | |
reflection.hasAttribute (self, "bark"); | |
} |
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
func main (args) { | |
if (args.getSize () == 0) { | |
print ("Hello, world!"); | |
} | |
print ("Hello, {}".format (args [0])); | |
} |
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
#!/usr/bin/mono /usr/lib/iodine/bin/iodine.exe | |
func main() { | |
print("Content-type: text/html\n"); | |
print("<p>Insert HTML here!</p>"); | |
} |
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
server { | |
listen 80; | |
server_name example.com; | |
access_log /path/to/descant/access.log; | |
error_log /path/to/descant/error.log; | |
location /static { | |
root /path/to/descant/static; | |
} |
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 Choice(models.Model): | |
... | |
class Vote(models.Model): | |
author = models.ForeignKey('auth.User') | |
vote_choice = models.ForeignKey(Choice) | |
# Example | |
c = Choice(...) |