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
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"); |
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
// 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; |
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 BinaryTree<T> { | |
T value; | |
BinaryTree<T> leftChild; | |
BinaryTree<T> rightChild; | |
} |