Skip to content

Instantly share code, notes, and snippets.

Stefan Haustein stefanhaustein

Block or report user

Report or block stefanhaustein

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Httpd.java
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");
View VerticallyScrolledForm.java
// 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;
View BinaryTree.java
class BinaryTree<T> {
T value;
BinaryTree<T> leftChild;
BinaryTree<T> rightChild;
}
You can’t perform that action at this time.