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
""" | |
This module handles the classes reponsible for creating a TCP socket server. | |
It should be resuable for any telnet-like application, and should not contain | |
any game logic or formatting code. | |
TODO: register event handlers so that our engine can hook in to server events | |
TODO: needs asynchronicity | |
""" | |
import socket |
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
""" | |
This module handles the classes reponsible for creating a TCP socket server. | |
It should be resuable for any telnet-like application, and should not contain | |
any game logic or formatting code. | |
TODO: register event handlers so that our engine can hook in to server events | |
TODO: needs asynchronicity | |
""" | |
import socket |
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 Language(models.Model): | |
name = models.CharField(max_length=100) | |
def __unicode__(self): | |
return self.name | |
class Solution(models.Model): | |
problem = models.ForeignKey(Problem) | |
author = models.ForeignKey(User) | |
title = models.CharField(max_length=100, blank=True) | |
submitted = models.DateField(auto_now_add=True) |
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
# encoding: utf-8 | |
import datetime | |
from south.db import db | |
from south.v2 import DataMigration | |
from django.db import models | |
class Migration(DataMigration): | |
def forwards(self, orm): | |
"Write your forwards methods here." |
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
print "Hello World!" |
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
print 'Hellllllo World!' |
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
<script type="text/javascript"> | |
function getData() { | |
$.getJSON("script.php", function(data) { | |
$.each(data, function(index) { | |
$("#high").html(data[index].high + "<br />" + Math.floor(Math.random()*111)); | |
}); | |
}); | |
} | |
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
#include <stdio.h> | |
int main(int l, char **a) { | |
for(int i = 0; i < l/2; a[++i] = (((int)a[i]+(int)a[l-i])-(int)(a[l-i]=a[i])) ); | |
for(int i = 1; i < l; ++i) | |
printf("%s ", a[i]); | |
return 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
/* sixthgear's horrible inplace reverse */ | |
#include <stdio.h> | |
int | |
main() | |
{ | |
int i; | |
int l = 9; | |
int a[] = {1,2,3,4,5,6,7,8,9}; |
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 JQuery to pull files from italy.xml*/ | |
$(document).ready(function() { | |
$.ajax({ | |
type: "GET", | |
url: "xml/italy.xml", | |
dataType: "xml", | |
success: handleResponse | |
}); | |
}); //end ready |
OlderNewer