Skip to content

Instantly share code, notes, and snippets.

public class HelloWorld
{
public static void main(String[] args)
{
Node one = new Node(2, new Node(1, null, null), null);
Zipper zipper = new Zipper(null, one);
System.out.println(zipper.left().set(5).newLeft(3).up().up().set(10).newRight(15).newLeft(12).reconstruct());
}
}
class ListZipperDemo {
// arguments are passed using the text field below this editor
public static void main(String[] args) {
Node oneThruFive = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));
Zipper zipper = new Zipper(null, oneThruFive);
System.out.println(zipper.next().next().set(30).next().remove().insert(40).reconstruct());
}
}
class Node {
@rickyclarkson
rickyclarkson / A.java
Last active December 17, 2015 10:59 — forked from ohcibi/A.java
public abstract class A<T> {
public T b;
public A(T b) {
this.b = b;
}
}
$ sbt
[info] Building project migscala 1.0 against Scala 2.8.1
[info] using MigScalaProject with sbt 0.7.5 and Scala 2.7.7
> update
[info]
[info] == update ==
java.lang.IllegalArgumentException: Cannot add dependency 'com.miglayout#miglayo
ut;3.7.4' to configuration 'swing' of module migscala#migscala_2.8.1;1.0 because
this configuration doesn't exist!
class Person {
final String address = makeAddress();
public String getAddress() {
return address;
}
static String makeAddress() {
String result = "1, The Crescent\n";
result += "Codeville";
class After {
final String address = makeAddress();
public String getAddress() {
return address;
}
static String makeAddress() {
String result = "1, The Crescent\n";
result += "Codeville";
package uk.org.netvu.util;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import java.io.ByteArrayOutputStream;
import java.io.FilterOutputStream;
import java.io.IOException;
public class Base64Encoder {
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.ArrayList;
import java.util.List;
class Main {
public static void main(String[] args) {
System.out.println("Version 1");
MutableComplex.main();
AlarmImage=Imagem de alarme
SiteInfo=Informações do site
SitePlan=Plano do sítio
LogEvent=Registrar o Evento
Exception=Exceção
Info=Informação
EventList=Lista de Eventos
Online=Conectado
Offline=Desligado
ReviewCurrentCall=Reproduzir a Chamada Actual
def Given(name: String, body: Either[String => String, (Int, String) => String]) = {
body match {
case Left(b) => b("bob")
case Right(b) => b(5, "belly")
}
}
Given("I have (\\d+) cukes in my (.*)", Right("You have " + _ + " cukes in your " + _))
Given("my name is (.*)", Left("Your name is " + _))