Skip to content

Instantly share code, notes, and snippets.

class BinaryTree<T> {
T value;
BinaryTree<T> leftChild;
BinaryTree<T> rightChild;
}
// Original: https://gist.github.com/rherrmann/b1a2a633cd4c9b607fe7
// package com.codeaffine.scrolledcomposite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import java.io.*;
import java.net.*;
public class Httpd {
public static void main(String[] args) throws IOException {
ServerSocket v = new ServerSocket(8080);
for (;;) {
Socket s = v.accept();
try {
InputStream i = new FileInputStream(new BufferedReader(new InputStreamReader(s.getInputStream())).readLine().split(" ")[1]);
new PrintStream(s.getOutputStream()).println("HTTP/1.0 200 OK\n");