Skip to content

Instantly share code, notes, and snippets.

View meikj's full-sized avatar

John Meikle meikj

  • Glasgow, Scotland
View GitHub Profile
#!/usr/bin/env python
'''
Udacity CS101
Lesson 1, Homework 1
'''
PAGE = '''
<html xmlns="http://www.w3.org/1999/xhtml"><br/> <head><br/><title>Udacity</title> <br/></head><br/><br/><body> <br/><h1>Udacity</h1><br/><br/> <p><b>Udacity</b> is a private institution of <a href="http://www.wikipedia.org/wiki/Higher_education"> higher education founded by</a> <a href="http://www.wikipedia.org/wiki/Sebastian_Thrun">Sebastian Thrun</a>, David Stavens, and Mike Sokolsky with the goal to provide university-level education that is "both high quality and low cost".<br/>It is the outgrowth of a free computer science class offered in 2011 through Stanford University. Currently, Udacity is working on its second course on building a search engine. Udacity was announced at the 2012 <a href="http://www.wikipedia.org/wiki/Digital_Life_Design">Digital Life Design</a> conference.</p><br/></body><br/></html>
'''
#!/usr/bin/env python
import asyncore
import socket
HOST = 'localhost'
PORT = 8080
class EchoHandler(asyncore.dispatcher_with_send):
public class Node {
private Node left;
private Node right;
private int value;
public Node(int value) {
this.left = null;
this.right = null;
this.value = value;