Full Code of nurkiewicz/completablefuture for AI

master ca32c78fc1bc cached
33 files
471.3 KB
123.6k tokens
100 symbols
1 requests
Download .txt
Showing preview only (490K chars total). Download the full file or copy to clipboard to get everything.
Repository: nurkiewicz/completablefuture
Branch: master
Commit: ca32c78fc1bc
Files: 33
Total size: 471.3 KB

Directory structure:
gitextract_nam_xqsx/

├── .gitignore
├── README.md
├── pom.xml
└── src/
    └── test/
        ├── java/
        │   └── com/
        │       └── nurkiewicz/
        │           └── reactive/
        │               ├── S00_About.java
        │               ├── S01_Introduction.java
        │               ├── S02_Creating.java
        │               ├── S03_Map.java
        │               ├── S04_FlatMap.java
        │               ├── S05_Zip.java
        │               ├── S06_AllAny.java
        │               ├── S07_AsyncCallback.java
        │               ├── S08_ErrorHandling.java
        │               ├── S09_Promises.java
        │               ├── S10_AsyncHttp.java
        │               ├── S11_Cancelling.java
        │               ├── S12_RxJava.java
        │               ├── stackoverflow/
        │               │   ├── ArtificialSleepWrapper.java
        │               │   ├── FallbackStubClient.java
        │               │   ├── HttpStackOverflowClient.java
        │               │   ├── InjectErrorsWrapper.java
        │               │   ├── LoadFromStackOverflowTask.java
        │               │   ├── LoggingWrapper.java
        │               │   ├── Question.java
        │               │   └── StackOverflowClient.java
        │               └── util/
        │                   ├── AbstractFuturesTest.java
        │                   ├── Futures.java
        │                   └── InterruptibleTask.java
        └── resources/
            ├── clojure-questions.html
            ├── groovy-questions.html
            ├── java-questions.html
            ├── logback-test.xml
            ├── scala-questions.html
            └── twitter4j.properties

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
target
.idea
*.iml
.idea


================================================
FILE: README.md
================================================
# CompletableFuture in Java 8 - asynchronous processing done right

## Tomasz Nurkiewicz

Twitter: [@tnurkiewicz](https://twitter.com/tnurkiewicz)

Works for: [@4financeit](https://twitter.com/4financeit)

E-mail: my last name `@gmail.com`

Home: [www.nurkiewicz.com](http://www.nurkiewicz.com)

Source code: [www.github.com/nurkiewicz/completablefuture](http://www.github.com/nurkiewicz/completablefuture)


================================================
FILE: pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.nurkiewicz</groupId>
	<artifactId>completablefuture</artifactId>
	<version>0.0.1-SNAPSHOT</version>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<dependencies>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.4</version>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>18.0</version>
		</dependency>
		<dependency>
			<groupId>org.jsoup</groupId>
			<artifactId>jsoup</artifactId>
			<version>1.7.3</version>
		</dependency>

		<!-- Logging -->
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.1.3</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jul-to-slf4j</artifactId>
			<version>1.7.5</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>log4j-over-slf4j</artifactId>
			<version>1.7.5</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>1.7.5</version>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<version>1.1.3</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.ning</groupId>
			<artifactId>async-http-client</artifactId>
			<version>1.8.8</version>
		</dependency>
		<dependency>
			<groupId>io.reactivex</groupId>
			<artifactId>rxjava</artifactId>
			<version>1.0.11</version>
		</dependency>

		<!-- Testing -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>3.0.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>1.9.5</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>3.2.4.RELEASE</version>
		</dependency>

	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.4</version>
			</plugin>
		</plugins>
	</build>

</project>


================================================
FILE: src/test/java/com/nurkiewicz/reactive/S00_About.java
================================================
package com.nurkiewicz.reactive;

/**
 *
 * Tomasz Nurkiewicz
 *
 * @tnurkiewicz | @4financeit
 *
 * www.nurkiewicz.com
 *
 * www.github.com/nurkiewicz/completablefuture
 *
 */
public class S00_About {
}


================================================
FILE: src/test/java/com/nurkiewicz/reactive/S01_Introduction.java
================================================
package com.nurkiewicz.reactive;

import com.nurkiewicz.reactive.stackoverflow.LoadFromStackOverflowTask;
import com.nurkiewicz.reactive.util.AbstractFuturesTest;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.Callable;
import java.util.concurrent.Future;

public class S01_Introduction extends AbstractFuturesTest {

	private static final Logger log = LoggerFactory.getLogger(S01_Introduction.class);

	/**
	 * Broken abstraction - blocking method calls
	 */
	@Test
	public void blockingCall() throws Exception {
		final String title = client.mostRecentQuestionAbout("java");
		log.debug("Most recent Java question: '{}'", title);
	}

	@Test
	public void executorService() throws Exception {
		final Callable<String> task = () -> client.mostRecentQuestionAbout("java");
		final Future<String> javaQuestionFuture = executorService.submit(task);
		//...
		final String javaQuestion = javaQuestionFuture.get();
		log.debug("Found: '{}'", javaQuestion);
	}

	/**
	 * Composing is impossible
	 */
	@Test
	public void waitForFirstOrAll() throws Exception {
		final Future<String> java = findQuestionsAbout("java");
		final Future<String> scala = findQuestionsAbout("scala");

		//???
	}

	private Future<String> findQuestionsAbout(String tag) {
		final Callable<String> task = new LoadFromStackOverflowTask(client, tag);
		return executorService.submit(task);
	}

}



================================================
FILE: src/test/java/com/nurkiewicz/reactive/S02_Creating.java
================================================
package com.nurkiewicz.reactive;

import com.nurkiewicz.reactive.util.AbstractFuturesTest;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.CompletableFuture;

public class S02_Creating extends AbstractFuturesTest {

	private static final Logger log = LoggerFactory.getLogger(S02_Creating.class);

	/**
	 * Already completed future
	 */
	@Test
	public void completed() throws Exception {
		final CompletableFuture<Integer> answer =
				CompletableFuture.completedFuture(42);

		final int fortyTwo = answer.get();  //does not block
	}

	/**
	 * Built-in thread pool
	 */
	@Test
	public void supplyAsync() throws Exception {
		final CompletableFuture<String> java =
				CompletableFuture.supplyAsync(() ->
								client.mostRecentQuestionAbout("java")
				);
		log.debug("Found: '{}'", java.get());
	}

	/**
	 * Custom thread pool, equivalent (*) to submit()
	 */
	@Test
	public void supplyAsyncWithCustomExecutor() throws Exception {
		final CompletableFuture<String> java =
				CompletableFuture.supplyAsync(
						() -> client.mostRecentQuestionAbout("java"),
						executorService
				);
		log.debug("Found: '{}'", java.get());
	}

}



================================================
FILE: src/test/java/com/nurkiewicz/reactive/S03_Map.java
================================================
package com.nurkiewicz.reactive;

import com.nurkiewicz.reactive.util.AbstractFuturesTest;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.CompletableFuture;

public class S03_Map extends AbstractFuturesTest {

	private static final Logger log = LoggerFactory.getLogger(S03_Map.class);

	@Test
	public void oldSchool() throws Exception {
		final CompletableFuture<Document> java =
				CompletableFuture.supplyAsync(() ->
								client.mostRecentQuestionsAbout("java"),
						executorService
				);

		final Document document = java.get();       //blocks
		final Element element = document.
				select("a.question-hyperlink").get(0);
		final String title = element.text();
		final int length = title.length();
		log.debug("Length: {}", length);
	}

	/**
	 * Callback hell, doesn't compose
	 */
	@Test
	public void callbacksCallbacksEverywhere() throws Exception {
		final CompletableFuture<Document> java =
				CompletableFuture.supplyAsync(() ->
								client.mostRecentQuestionsAbout("java"),
						executorService
				);

		java.thenAccept(document ->
				log.debug("Downloaded: {}", document));
	}

	@Test
	public void thenApply() throws Exception {
		final CompletableFuture<Document> java =
				CompletableFuture.supplyAsync(() ->
								client.mostRecentQuestionsAbout("java"),
						executorService
				);

		final CompletableFuture<Element> titleElement =
				java.thenApply((Document doc) ->
						doc.select("a.question-hyperlink").get(0));

		final CompletableFuture<String> titleText =
				titleElement.thenApply(Element::text);

		final CompletableFuture<Integer> length =
				titleText.thenApply(String::length);

		log.debug("Length: {}", length.get());
	}

	@Test
	public void thenApplyChained() throws Exception {
		final CompletableFuture<Document> java =
				CompletableFuture.supplyAsync(() ->
								client.mostRecentQuestionsAbout("java"),
						executorService
				);

		final CompletableFuture<Integer> length = java.
				thenApply(doc -> doc.select("a.question-hyperlink").get(0)).
				thenApply(Element::text).
				thenApply(String::length);

		log.debug("Length: {}", length.get());
	}

}



================================================
FILE: src/test/java/com/nurkiewicz/reactive/S04_FlatMap.java
================================================
package com.nurkiewicz.reactive;

import com.nurkiewicz.reactive.stackoverflow.Question;
import com.nurkiewicz.reactive.util.AbstractFuturesTest;
import org.jsoup.nodes.Document;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;

import java.util.concurrent.CompletableFuture;

public class S04_FlatMap extends AbstractFuturesTest {

	private static final Logger log = LoggerFactory.getLogger(S04_FlatMap.class);

	@Test
	public void thenApplyIsWrong() throws Exception {
		final CompletableFuture<CompletableFuture<Question>> future =
				javaQuestions()
						.thenApply(doc ->
								findMostInterestingQuestion(doc));
	}

	@Test
	public void thenAcceptIsPoor() throws Exception {
		javaQuestions().thenAccept(document -> {
			findMostInterestingQuestion(document).thenAccept(question -> {
				googleAnswer(question).thenAccept(answer -> {
					postAnswer(answer).thenAccept(status -> {
						if (status == HttpStatus.OK.value()) {
							log.debug("OK");
						} else {
							log.error("Wrong status code: {}", status);
						}
					});
				});
			});
		});
	}

	@Test
	public void thenCompose() throws Exception {
		final CompletableFuture<Document> java = javaQuestions();

		final CompletableFuture<Question> questionFuture =
				java.thenCompose(doc -> findMostInterestingQuestion(doc));

		final CompletableFuture<String> answerFuture =
				questionFuture.thenCompose(question -> googleAnswer(question));

		final CompletableFuture<Integer> httpStatusFuture =
				answerFuture.thenCompose(answer -> postAnswer(answer));

		httpStatusFuture.thenAccept(status -> {
			if (status == HttpStatus.OK.value()) {
				log.debug("OK");
			} else {
				log.error("Wrong status code: {}", status);
			}
		});
	}

	@Test
	public void chained() throws Exception {
		javaQuestions().
				thenCompose(doc -> findMostInterestingQuestion(doc)).
				thenCompose(question -> googleAnswer(question)).
				thenCompose(answer -> postAnswer(answer)).
				thenAccept(status -> {
					if (status == HttpStatus.OK.value()) {
						log.debug("OK");
					} else {
						log.error("Wrong status code: {}", status);
					}
				});
	}

	private CompletableFuture<Document> javaQuestions() {
		return CompletableFuture.supplyAsync(() ->
						client.mostRecentQuestionsAbout("java"),
				executorService
		);
	}

	private CompletableFuture<Question> findMostInterestingQuestion(Document document) {
		return CompletableFuture.completedFuture(new Question());
	}

	private CompletableFuture<String> googleAnswer(Question q) {
		return CompletableFuture.completedFuture("42");
	}

	private CompletableFuture<Integer> postAnswer(String answer) {
		return CompletableFuture.completedFuture(200);
	}

}


================================================
FILE: src/test/java/com/nurkiewicz/reactive/S05_Zip.java
================================================
package com.nurkiewicz.reactive;

import com.nurkiewicz.reactive.util.AbstractFuturesTest;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.CompletableFuture;

public class S05_Zip extends AbstractFuturesTest {

	private static final Logger log = LoggerFactory.getLogger(S05_Zip.class);

	@Test
	public void thenCombine() throws Exception {
		final CompletableFuture<String> java = questions("java");
		final CompletableFuture<String> scala = questions("scala");

		final CompletableFuture<Integer> both = java.
				thenCombine(scala, (String javaTitle, String scalaTitle) ->
						javaTitle.length() + scalaTitle.length()
				);

		both.thenAccept(length -> log.debug("Total length: {}", length));
	}

	@Test
	public void either() throws Exception {
		final CompletableFuture<String> java = questions("java");
		final CompletableFuture<String> scala = questions("scala");

		final CompletableFuture<String> both = java.
				applyToEither(scala, title -> title.toUpperCase());

		both.thenAccept(title -> log.debug("First: {}", title));
	}


}



================================================
FILE: src/test/java/com/nurkiewicz/reactive/S06_AllAny.java
================================================
package com.nurkiewicz.reactive;

import com.nurkiewicz.reactive.util.AbstractFuturesTest;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

public class S06_AllAny extends AbstractFuturesTest {

	private static final Logger log = LoggerFactory.getLogger(S06_AllAny.class);

	@Test
	public void allOf() throws Exception {
		final CompletableFuture<String> java = questions("java");
		final CompletableFuture<String> scala = questions("scala");
		final CompletableFuture<String> clojure = questions("clojure");
		final CompletableFuture<String> groovy = questions("groovy");

		final CompletableFuture<Void> allCompleted =
				CompletableFuture.allOf(
						java, scala, clojure, groovy
				);

		allCompleted.thenRun(() -> {
			try {
				log.debug("Loaded: {}", java.get());
				log.debug("Loaded: {}", scala.get());
				log.debug("Loaded: {}", clojure.get());
				log.debug("Loaded: {}", groovy.get());
			} catch (InterruptedException | ExecutionException e) {
				log.error("", e);
			}
		});
	}

	@Test
	public void anyOf() throws Exception {
		final CompletableFuture<String> java = questions("java");
		final CompletableFuture<String> scala = questions("scala");
		final CompletableFuture<String> clojure = questions("clojure");
		final CompletableFuture<String> groovy = questions("groovy");

		final CompletableFuture<Object> firstCompleted =
				CompletableFuture.anyOf(
						java, scala, clojure, groovy
				);

		firstCompleted.thenAccept((Object result) -> {
			log.debug("First: {}", result);
		});
	}

}



================================================
FILE: src/test/java/com/nurkiewicz/reactive/S07_AsyncCallback.java
================================================
package com.nurkiewicz.reactive;

import com.nurkiewicz.reactive.util.AbstractFuturesTest;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class S07_AsyncCallback extends AbstractFuturesTest {

	private static final Logger log = LoggerFactory.getLogger(S07_AsyncCallback.class);

	protected final ExecutorService poolAlpha =
			Executors.newFixedThreadPool(10, threadFactory("Alpha"));
	protected final ExecutorService poolBeta =
			Executors.newFixedThreadPool(10, threadFactory("Beta"));
	protected final ExecutorService poolGamma =
			Executors.newFixedThreadPool(10, threadFactory("Gamma"));

	@Test
	public void whichThreadInvokesCallbacks() throws Exception {
		final CompletableFuture<String> java = CompletableFuture
				.supplyAsync(
						() -> client.mostRecentQuestionAbout("java"),
						poolAlpha);
		final CompletableFuture<String> scala = CompletableFuture
				.supplyAsync(
						() -> client.mostRecentQuestionAbout("scala"),
						poolBeta);

		final CompletableFuture<String> first = java
				.applyToEither(scala, question -> {
					log.debug("First: {}", question);
					return question.toUpperCase();
				});

		first.thenAccept(q -> log.debug("Sync: {}", q));
		first.thenAcceptAsync(q -> log.debug("Async: {}", q));
		first.thenAcceptAsync(q -> log.debug("Async (pool): {}", q),
				poolGamma);
		first.get();        //block
	}

}



================================================
FILE: src/test/java/com/nurkiewicz/reactive/S08_ErrorHandling.java
================================================
package com.nurkiewicz.reactive;

import com.nurkiewicz.reactive.util.AbstractFuturesTest;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.CompletableFuture;

public class S08_ErrorHandling extends AbstractFuturesTest {

	private static final Logger log = LoggerFactory.getLogger(S08_ErrorHandling.class);

	@Test
	public void exceptionsShortCircuitFuture() throws Exception {
		final CompletableFuture<String> questions = questions("php");

		questions.thenApply(r -> {
			log.debug("Success!");
			return r;
		});
		questions.get();
	}

	@Test
	public void handleExceptions() throws Exception {
		//given
		final CompletableFuture<String> questions = questions("php");

		//when
		final CompletableFuture<String> recovered = questions
				.handle((result, throwable) -> {
					if (throwable != null) {
						return "No PHP today due to: " + throwable;
					} else {
						return result.toUpperCase();
					}
				});

		//then
		log.debug("Handled: {}", recovered.get());
	}

	@Test
	public void shouldHandleExceptionally() throws Exception {
		//given
		final CompletableFuture<String> questions = questions("php");

		//when
		final CompletableFuture<String> recovered = questions
				.exceptionally(throwable -> "Sorry, try again later");

		//then
		log.debug("Done: {}", recovered.get());
	}

}



================================================
FILE: src/test/java/com/nurkiewicz/reactive/S09_Promises.java
================================================
package com.nurkiewicz.reactive;

import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.nurkiewicz.reactive.util.AbstractFuturesTest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.Duration;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

public class S09_Promises extends AbstractFuturesTest {

	private static final Logger log = LoggerFactory.getLogger(S09_Promises.class);

	private static final ScheduledExecutorService pool =
			Executors.newScheduledThreadPool(10,
					new ThreadFactoryBuilder()
							.setDaemon(true)
							.setNameFormat("FutureOps-%d")
							.build()
			);

	public static <T> CompletableFuture<T> never() {
		return new CompletableFuture<>();
	}

	public static <T> CompletableFuture<T> timeoutAfter(
			Duration duration) {
		final CompletableFuture<T> promise = new CompletableFuture<>();
		pool.schedule(
				() -> promise.completeExceptionally(new TimeoutException()),
				duration.toMillis(), TimeUnit.MILLISECONDS);
		return promise;
	}

}



================================================
FILE: src/test/java/com/nurkiewicz/reactive/S10_AsyncHttp.java
================================================
package com.nurkiewicz.reactive;

import com.ning.http.client.AsyncCompletionHandler;
import com.ning.http.client.AsyncHttpClient;
import com.ning.http.client.Response;
import com.nurkiewicz.reactive.util.AbstractFuturesTest;
import org.junit.AfterClass;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;

public class S10_AsyncHttp extends AbstractFuturesTest {

	private static final Logger log = LoggerFactory.getLogger(S10_AsyncHttp.class);

	private static final AsyncHttpClient asyncHttpClient = new AsyncHttpClient();

	@AfterClass
	public static void closeClient() {
		asyncHttpClient.close();
	}

	@Test
	public void asyncHttpWithCallbacks() throws Exception {
		loadTag(
				"java",
				response -> log.debug("Got: {}", response),
				throwable -> log.error("Mayday!", throwable)
		);
		TimeUnit.SECONDS.sleep(5);
	}

	public void loadTag(
			String tag,
			Consumer<String> onSuccess,
			Consumer<Throwable> onError) throws IOException {
		asyncHttpClient
				.prepareGet("http://stackoverflow.com/questions/tagged/" + tag)
				.execute(
						new AsyncCompletionHandler<Void>() {

							@Override
							public Void onCompleted(Response response) throws Exception {
								onSuccess.accept(response.getResponseBody());
								return null;
							}

							@Override
							public void onThrowable(Throwable t) {
								onError.accept(t);
							}
						}
				);
	}

	public CompletableFuture<String> loadTag(String tag) throws IOException {
		final CompletableFuture<String> promise = new CompletableFuture<>();
		asyncHttpClient.prepareGet("http://stackoverflow.com/questions/tagged/" + tag).execute(
				new AsyncCompletionHandler<Void>() {

					@Override
					public Void onCompleted(Response response) throws Exception {
						promise.complete(response.getResponseBody());
						return null;
					}

					@Override
					public void onThrowable(Throwable t) {
						promise.completeExceptionally(t);
					}
				}
		);
		return promise;
	}
}



================================================
FILE: src/test/java/com/nurkiewicz/reactive/S11_Cancelling.java
================================================
package com.nurkiewicz.reactive;

import com.nurkiewicz.reactive.util.AbstractFuturesTest;
import com.nurkiewicz.reactive.util.InterruptibleTask;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

import java.util.concurrent.*;

public class S11_Cancelling extends AbstractFuturesTest {

	private static ExecutorService myThreadPool;

	@BeforeClass
	public static void init() {
		myThreadPool = Executors.newFixedThreadPool(10);
	}

	@AfterClass
	public static void close() {
		myThreadPool.shutdownNow();
	}

	@Test
	public void shouldCancelFuture() throws InterruptedException, TimeoutException {
		//given
		InterruptibleTask task = new InterruptibleTask();
		Future future = myThreadPool.submit(task);
		task.blockUntilStarted();

		//when
		future.cancel(true);

		//then
		task.blockUntilInterrupted();
	}

	@Ignore("Fails with CompletableFuture")
	@Test
	public void shouldCancelCompletableFuture() throws InterruptedException, TimeoutException {
		//given
		InterruptibleTask task = new InterruptibleTask();
		CompletableFuture<Void> future = CompletableFuture.supplyAsync(task, myThreadPool);
		task.blockUntilStarted();

		//when
		future.cancel(true);

		//then
		task.blockUntilInterrupted();
	}
}



================================================
FILE: src/test/java/com/nurkiewicz/reactive/S12_RxJava.java
================================================
package com.nurkiewicz.reactive;

import com.nurkiewicz.reactive.util.AbstractFuturesTest;
import com.nurkiewicz.reactive.util.Futures;
import org.junit.Test;
import rx.Observable;

import java.util.List;
import java.util.concurrent.CompletableFuture;

import static java.util.concurrent.TimeUnit.SECONDS;
import static org.assertj.core.api.Assertions.assertThat;

public class S12_RxJava extends AbstractFuturesTest {

	public static final String MSG = "Don't panic";

	@Test
	public void shouldConvertCompletedFutureToCompletedObservable() throws Exception {
		//given
		CompletableFuture<String> future = CompletableFuture.completedFuture("Abc");

		//when
		Observable<String> observable = Futures.toObservable(future);

		//then
		assertThat(observable.toList().toBlocking().single()).containsExactly("Abc");
	}

	@Test
	public void shouldConvertFailedFutureIntoObservableWithFailure() throws Exception {
		//given
		CompletableFuture<String> future = failedFuture(new IllegalStateException(MSG));

		//when
		Observable<String> observable = Futures.toObservable(future);

		//then
		final List<String> result = observable
				.onErrorReturn(Throwable::getMessage)
				.toList()
				.toBlocking()
				.single();
		assertThat(result).containsExactly(MSG);
	}

	@Test
	public void shouldConvertObservableWithManyItemsToFutureOfList() throws Exception {
		//given
		Observable<Integer> observable = Observable.just(1, 2, 3);

		//when
		CompletableFuture<List<Integer>> future = Futures.fromObservable(observable);

		//then
		assertThat(future.get(1, SECONDS)).containsExactly(1, 2, 3);
	}

	@Test
	public void shouldConvertObservableWithSingleItemToFuture() throws Exception {
		//given
		Observable<Integer> observable = Observable.just(1);

		//when
		CompletableFuture<Integer> future = Futures.fromSingleObservable(observable);

		//then
		assertThat(future.get(1, SECONDS)).isEqualTo(1);
	}

	<T> CompletableFuture<T> failedFuture(Exception error) {
		CompletableFuture<T> future = new CompletableFuture<>();
		future.completeExceptionally(error);
		return future;
	}


}



================================================
FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/ArtificialSleepWrapper.java
================================================
package com.nurkiewicz.reactive.stackoverflow;

import org.jsoup.nodes.Document;

import java.util.Random;
import java.util.concurrent.TimeUnit;

public class ArtificialSleepWrapper implements StackOverflowClient {

	private static final Random RANDOM = new Random();

	private final StackOverflowClient target;

	public ArtificialSleepWrapper(StackOverflowClient target) {
		this.target = target;
	}

	@Override
	public String mostRecentQuestionAbout(String tag) {
		final long start = System.currentTimeMillis();
		final String result = target.mostRecentQuestionAbout(tag);
		artificialSleep(1000 - (System.currentTimeMillis() - start));
		return result;
	}

	@Override
	public Document mostRecentQuestionsAbout(String tag) {
		artificialSleep(1000);
		final long start = System.currentTimeMillis();
		final Document result = target.mostRecentQuestionsAbout(tag);
		artificialSleep(1000 - (System.currentTimeMillis() - start));
		return result;
	}

	protected static void artificialSleep(long expected) {
		try {
			TimeUnit.MILLISECONDS.sleep((long) (expected + RANDOM.nextGaussian() * expected / 2));
		} catch (InterruptedException e) {
			throw new RuntimeException(e);
		}
	}

}


================================================
FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/FallbackStubClient.java
================================================
package com.nurkiewicz.reactive.stackoverflow;

import com.google.common.base.Throwables;
import org.apache.commons.io.IOUtils;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.net.URL;

public class FallbackStubClient implements StackOverflowClient {

	private static final Logger log = LoggerFactory.getLogger(FallbackStubClient.class);

	private final StackOverflowClient target;

	public FallbackStubClient(StackOverflowClient target) {
		this.target = target;
	}

	@Override
	public String mostRecentQuestionAbout(String tag) {
		try {
			return target.mostRecentQuestionAbout(tag);
		} catch (Exception e) {
			log.warn("Problem retrieving tag {}", tag, e);
			switch(tag) {
				case "java":
					return "How to generate xml report with maven depencency?";
				case "scala":
					return "Update a timestamp SettingKey in an sbt 0.12 task";
				case "groovy":
					return "Reusing Grails variables inside Config.groovy";
				case "clojure":
					return "Merge two comma delimited strings in Clojure";
				default:
					throw e;
			}
		}
	}

	@Override
	public Document mostRecentQuestionsAbout(String tag) {
		try {
			return target.mostRecentQuestionsAbout(tag);
		} catch (Exception e) {
			log.warn("Problem retrieving recent question {}", tag, e);
			return loadStubHtmlFromDisk(tag);
		}
	}

	private Document loadStubHtmlFromDisk(String tag) {
		try {
			final URL resource = getClass().getResource("/" + tag + "-questions.html");
			final String html = IOUtils.toString(resource);
			return Jsoup.parse(html);
		} catch (IOException e) {
			throw Throwables.propagate(e);
		}
	}
}


================================================
FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/HttpStackOverflowClient.java
================================================
package com.nurkiewicz.reactive.stackoverflow;

import com.google.common.base.Throwables;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import java.io.IOException;

public class HttpStackOverflowClient implements StackOverflowClient {

	@Override
	public String mostRecentQuestionAbout(String tag) {
		return fetchTitleOnline(tag);
	}

	@Override
	public Document mostRecentQuestionsAbout(String tag) {
		try {
			return Jsoup.
					connect("http://stackoverflow.com/questions/tagged/" + tag).
					get();
		} catch (IOException e) {
			throw Throwables.propagate(e);
		}
	}

	private String fetchTitleOnline(String tag) {
		return mostRecentQuestionsAbout(tag).select("a.question-hyperlink").get(0).text();
	}

}


================================================
FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/InjectErrorsWrapper.java
================================================
package com.nurkiewicz.reactive.stackoverflow;

import org.jsoup.nodes.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public class InjectErrorsWrapper implements StackOverflowClient {

	private static final Logger log = LoggerFactory.getLogger(InjectErrorsWrapper.class);

	private final StackOverflowClient target;
	private final Set<String> blackList;

	public InjectErrorsWrapper(StackOverflowClient target, String... blackList) {
		this.target = target;
		this.blackList = new HashSet<>(Arrays.asList(blackList));
	}

	@Override
	public String mostRecentQuestionAbout(String tag) {
		throwIfBlackListed(tag);
		return target.mostRecentQuestionAbout(tag);
	}

	@Override
	public Document mostRecentQuestionsAbout(String tag) {
		throwIfBlackListed(tag);
		return target.mostRecentQuestionsAbout(tag);
	}

	private void throwIfBlackListed(String tag) {
		if (blackList.contains(tag)) {
			ArtificialSleepWrapper.artificialSleep(400);
			log.warn("About to throw artifical exception due to: {}", tag);
			throw new IllegalArgumentException("Unsupported " + tag);
		}
	}

}


================================================
FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/LoadFromStackOverflowTask.java
================================================
package com.nurkiewicz.reactive.stackoverflow;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.Callable;

public class LoadFromStackOverflowTask implements Callable<String> {

	private static final Logger log = LoggerFactory.getLogger(LoadFromStackOverflowTask.class);

	private final StackOverflowClient client;
	private final String tag;

	public LoadFromStackOverflowTask(StackOverflowClient client, String tag) {
		this.client = client;
		this.tag = tag;
	}

	@Override
	public String call() throws Exception {
		return client.mostRecentQuestionAbout(tag);
	}
}


================================================
FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/LoggingWrapper.java
================================================
package com.nurkiewicz.reactive.stackoverflow;

import com.google.common.base.Joiner;
import com.google.common.base.Splitter;
import com.google.common.collect.Iterables;
import org.jsoup.nodes.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LoggingWrapper implements StackOverflowClient {

	private static final Logger log = LoggerFactory.getLogger(LoggingWrapper.class);

	private final StackOverflowClient target;

	public LoggingWrapper(StackOverflowClient target) {
		this.target = target;
	}

	@Override
	public String mostRecentQuestionAbout(String tag) {
		log.debug("Entering mostRecentQuestionAbout({})", tag);
		final String title = target.mostRecentQuestionAbout(tag);
		log.debug("Leaving mostRecentQuestionAbout({}): {}", tag, title);
		return title;
	}

	@Override
	public Document mostRecentQuestionsAbout(String tag) {
		log.debug("Entering mostRecentQuestionsAbout({})", tag);
		final Document document = target.mostRecentQuestionsAbout(tag);
		if (log.isTraceEnabled()) {
			log.trace("Leaving mostRecentQuestionsAbout({}): {}", tag, htmlExcerpt(document));
		}
		return document;
	}

	private String htmlExcerpt(Document document) {
		final String outerHtml = document.outerHtml();
		final Iterable<String> lines = Splitter.onPattern("\r?\n").split(outerHtml);
		final Iterable<String> firstLines = Iterables.limit(lines, 4);
		final String excerpt = Joiner.on(' ').join(firstLines);
		final int remainingBytes = Math.max(outerHtml.length() - excerpt.length(), 0);
		return excerpt + " [...and " + remainingBytes + " chars]";
	}
}


================================================
FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/Question.java
================================================
package com.nurkiewicz.reactive.stackoverflow;

public class Question {
}

================================================
FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/StackOverflowClient.java
================================================
package com.nurkiewicz.reactive.stackoverflow;

import org.jsoup.nodes.Document;

public interface StackOverflowClient {

	String mostRecentQuestionAbout(String tag);
	Document mostRecentQuestionsAbout(String tag);

}


================================================
FILE: src/test/java/com/nurkiewicz/reactive/util/AbstractFuturesTest.java
================================================
package com.nurkiewicz.reactive.util;

import com.google.common.util.concurrent.ThreadFactoryBuilder;
import com.nurkiewicz.reactive.stackoverflow.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.TestName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.*;

public class AbstractFuturesTest {

	private static final Logger log = LoggerFactory.getLogger(AbstractFuturesTest.class);

	protected final ExecutorService executorService = Executors.newFixedThreadPool(10, threadFactory("Custom"));

	@Rule
	public TestName testName = new TestName();

	protected ThreadFactory threadFactory(String nameFormat) {
		return new ThreadFactoryBuilder().setNameFormat(nameFormat + "-%d").build();
	}

	protected final StackOverflowClient client = new FallbackStubClient(
			new InjectErrorsWrapper(
					new LoggingWrapper(
							new ArtificialSleepWrapper(
									new HttpStackOverflowClient()
							)
					), "php"
			)
	);

	@Before
	public void logTestStart() {
		log.debug("Starting: {}", testName.getMethodName());
	}

	@After
	public void stopPool() throws InterruptedException {
		executorService.shutdown();
		executorService.awaitTermination(10, TimeUnit.SECONDS);
	}

	protected CompletableFuture<String> questions(String tag) {
		return CompletableFuture.supplyAsync(() ->
				client.mostRecentQuestionAbout(tag),
				executorService);
	}

}


================================================
FILE: src/test/java/com/nurkiewicz/reactive/util/Futures.java
================================================
package com.nurkiewicz.reactive.util;

import rx.Observable;

import java.util.List;
import java.util.concurrent.CompletableFuture;

public class Futures {

	public static <T> CompletableFuture<T> fromSingleObservable(Observable<T> observable) {
		final CompletableFuture<T> future = new CompletableFuture<>();
		observable
				.doOnError(future::completeExceptionally)
				.single()
				.forEach(future::complete);
		return future;
	}

	public static <T> CompletableFuture<List<T>> fromObservable(Observable<T> observable) {
		final CompletableFuture<List<T>> future = new CompletableFuture<>();
		observable
				.doOnError(future::completeExceptionally)
				.toList()
				.forEach(future::complete);
		return future;
	}

	public static <T> Observable<T> toObservable(CompletableFuture<T> future) {
		return Observable.create(subscriber ->
				future.whenComplete((result, error) -> {
					if (error != null) {
						subscriber.onError(error);
					} else {
						subscriber.onNext(result);
						subscriber.onCompleted();
					}
				}));
	}

}


================================================
FILE: src/test/java/com/nurkiewicz/reactive/util/InterruptibleTask.java
================================================
package com.nurkiewicz.reactive.util;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.function.Supplier;

public class InterruptibleTask implements Runnable, Supplier<Void> {

	private final CountDownLatch started = new CountDownLatch(1);
	private final CountDownLatch interrupted = new CountDownLatch(1);

	@Override
	public Void get() {
		run();
		return null;
	}

	@Override
	public void run() {
		started.countDown();
		try {
			Thread.sleep(10_000);
		} catch (InterruptedException ignored) {
			interrupted.countDown();
		}
	}

	public void blockUntilStarted() throws InterruptedException {
		started.await();
	}

	public void blockUntilInterrupted() throws InterruptedException, TimeoutException {
		if (!interrupted.await(1, TimeUnit.SECONDS)) {
			throw new TimeoutException("Not interrupted within 1 second");
		}
	}
}

================================================
FILE: src/test/resources/clojure-questions.html
================================================
<!DOCTYPE html>
<html>
<head>

    <title>Newest &#39;clojure&#39; Questions - Stack Overflow</title>
    <link rel="shortcut icon" href="//cdn.sstatic.net/stackoverflow/img/favicon.ico?v=038622610830">
    <link rel="apple-touch-icon image_src" href="//cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png?v=fd7230a85918">
    <link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="/opensearch.xml">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:domain" content="stackoverflow.com"/>
    <meta name="og:type" content="website" />
    <meta name="og:image" content="http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon@2.png?v=fde65a5a78c6"/>
    <meta name="og:title" content="Newest &amp;#39;clojure&amp;#39; Questions" />
    <meta name="og:description" content="Q&amp;A for professional and enthusiast programmers" />
    <meta name="og:url" content="http://stackoverflow.com/questions/tagged/clojure"/>



    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script src="//cdn.sstatic.net/Js/stub.en.js?v=a085b0b86607"></script>
    <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/stackoverflow/all.css?v=7dd1e240cf1a">

    <link rel="alternate" type="application/atom+xml" title="newest clojure questions feed" href="/feeds/tag?tagnames=clojure&amp;sort=newest" />


    <script>
        StackExchange.init({"locale":"en","stackAuthUrl":"https://stackauth.com","serverTime":1399046949,"networkMetaHostname":"meta.stackexchange.com","styleCode":true,"enableUserHovercards":true,"site":{"name":"Stack Overflow","description":"Q&A for professional and enthusiast programmers","isNoticesTabEnabled":true,"recaptchaPublicKey":"6LdchgIAAAAAAJwGpIzRQSOFaO0pU6s44Xt8aTwc","recaptchaAudioLang":"en","nonAsciiTags":true,"enableSocialMediaInSharePopup":true},"user":{"fkey":"f7c22c31aff962a89f9edae6fedbf1d3","isAnonymous":true,"ab":{"welcome_email":{"v":"3","g":2}}}});
        StackExchange.using.setCacheBreakers({"js/prettify-full.en.js":"d987e8ba02e8","js/moderator.en.js":"852a9590ae2d","js/full-anon.en.js":"e0135be99202","js/full.en.js":"252aef4827ba","js/wmd.en.js":"d9dc7a9550f9","js/third-party/jquery.autocomplete.min.js":"e5f01e97f7c3","js/third-party/jquery.autocomplete.min.en.js":"","js/mobile.en.js":"dcf6dd539af8","js/help.en.js":"ceae85b045a1","js/tageditor.en.js":"7f54d0efc81e","js/tageditornew.en.js":"0bf79a6484e0","js/inline-tag-editing.en.js":"d00846e90065","js/revisions.en.js":"9a2b9be85a69","js/review.en.js":"063e88635927","js/tagsuggestions.en.js":"bb4721d888d2","js/post-validation.en.js":"0e52d1a0290c","js/explore-qlist.en.js":"24424eb238e8","js/events.en.js":"203491ffdbd7"});
        StackExchange.using("gps", function() {
            StackExchange.gps.init(true);
        });

    </script>

    <script>
        StackExchange.ready(function () {
            $('#nav-tour').click(function () {
                StackExchange.using("gps", function() {
                    StackExchange.gps.track("aboutpage.click", { aboutclick_location: "headermain" }, true);
                });
            });
        });
    </script>
</head>
<body class="tagged-questions-page new-topbar">
<noscript><div id="noscript-padding"></div></noscript>
<div id="notify-container"></div>
<div id="overlay-header"></div>
<div id="custom-header"></div>
<div class="topbar">
    <div class="topbar-wrapper">

        <div class="js-topbar-dialog-corral">

            <div class="topbar-dialog siteSwitcher-dialog dno">
                <div class="header">
                    <h3><a href="//stackoverflow.com">current community</a></h3>
                </div>
                <div class="modal-content current-site-container">
                    <ul class="current-site">
                        <li>
                            <div class="related-links">
                                <a href="http://chat.stackoverflow.com"     data-gps-track="site_switcher.click({ item_type:6 })"
                                        >chat</a>
                                <a href="http://blog.stackoverflow.com"     data-gps-track="site_switcher.click({ item_type:7 })"
                                        >blog</a>
                            </div>




                            <a href="//stackoverflow.com"
                               class="current-site-link site-link js-gps-track"
                               data-id="1"
                               data-gps-track="
        site_switcher.click({ item_type:3 })">
                                <div class="site-icon favicon favicon-stackoverflow" title="Stack Overflow"></div>
                                Stack Overflow
                            </a>

                        </li>
                        <li class="related-site">
                            <div class="L-shaped-icon-container">
                                <span class="L-shaped-icon"></span>
                            </div>





                            <a href="http://meta.stackoverflow.com"
                               class="site-link js-gps-track"
                               data-id="552"
                               data-gps-track="
            site.switch({ target_site:552, item_type:3 }),
        site_switcher.click({ item_type:4 })">
                                <div class="site-icon favicon favicon-stackoverflowmeta" title="Meta Stack Overflow"></div>
                                Meta Stack Overflow
                            </a>

                        </li>
                        <li class="related-site">
                            <div class="L-shaped-icon-container">
                                <span class="L-shaped-icon"></span>
                            </div>

                            <a class="site-link"
                               href="//careers.stackoverflow.com"
                               data-gps-track="site_switcher.click({ item_type:9 })"
                                    >
                                <div class="site-icon favicon favicon-careers" title="Stack Overflow Careers"></div>
                                Careers 2.0
                            </a>
                        </li>
                    </ul>
                </div>

                <div class="header" id="your-communities-header">
                    <h3>
                        your communities        </h3>

                </div>
                <div class="modal-content" id="your-communities-section">

                    <div class="call-to-login">
                        <a href="https://stackoverflow.com/users/signup?returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2ftagged%2fclojure" class="js-gps-track"     data-gps-track="site_switcher.click({ item_type:10 })"
                                >Sign up</a>
                        or
                        <a href="https://stackoverflow.com/users/login?returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2ftagged%2fclojure" class="js-gps-track"     data-gps-track="site_switcher.click({ item_type:11 })"
                                >log in</a>

                        to customize your list.
                    </div>
                </div>

                <div class="header">
                    <h3><a href="//stackexchange.com/sites">more stack exchange communities</a></h3>
                </div>
                <div class="modal-content">
                    <div class="child-content"></div>
                </div>
            </div>
        </div>

        <div class="network-items">

            <a href="//stackexchange.com"
               class="topbar-icon icon-site-switcher yes-hover js-site-switcher-button js-gps-track"
               data-gps-track="site_switcher.show"
               title="A list of all 123 Stack Exchange sites">
                <span class="hidden-text">Stack Exchange</span>
            </a>

        </div>

        <div class="topbar-links">

            <div class="links-container">
                    <span class="topbar-menu-links">
                            <a href="https://stackoverflow.com/users/signup?returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2ftagged%2fclojure" class="login-link">sign up</a>
                            <a href="https://stackoverflow.com/users/login?returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2ftagged%2fclojure" class="login-link">log in</a>
                            <a href="/tour">tour</a>

                            <a href="#" class="icon-help js-help-button" title="Help Center and other resources">
                                help
                                <span class="triangle"></span>
                            </a>
    <div class="topbar-dialog help-dialog js-help-dialog dno">
        <div class="modal-content">
            <ul>
                <li>
                    <a href="/tour"     class="js-gps-track" data-gps-track="help_popup.click({ item_type:1 })"
                            >
                        Tour
                        <span class="item-summary">
                            Start here for a quick overview of the site
                        </span>
                    </a>
                </li>
                <li>
                    <a href="/help"     class="js-gps-track" data-gps-track="help_popup.click({ item_type:4 })"
                            >
                        Help Center
                        <span class="item-summary">
                            Detailed answers to any questions you might have
                        </span>
                    </a>
                </li>
                <li>
                    <a href="//meta.stackoverflow.com"     class="js-gps-track" data-gps-track="help_popup.click({ item_type:2 })"
                            >
                        Meta
                            <span class="item-summary">
                                Discuss the workings and policies of this site
                            </span>
                    </a>
                </li>
            </ul>
        </div>
    </div>

                            <a href="//careers.stackoverflow.com">careers 2.0</a>
                    </span>
            </div>

            <div class="search-container">
                <form id="search" action="/search" method="get" autocomplete="off">
                    <input name="q" type="text" placeholder="search" value="[clojure]" tabindex="1" autocomplete="off" maxlength="240" />
                </form>
            </div>

        </div>
    </div>
</div>
<script>
    StackExchange.ready(function () {
        //topbar.init();
        StackExchange.topbar.init();
    });
</script>
<div class="container">
<div id="header" class=headeranon>
    <br class="cbt">
    <div id="hlogo">
        <a href="/">
            Stack Overflow
        </a>
    </div>
    <div id="hmenus">
        <div class="nav mainnavs mainnavsanon">
            <ul>
                <li class="youarehere"><a id="nav-questions" href="/questions">Questions</a></li>
                <li><a id="nav-tags" href="/tags">Tags</a></li>
                <li><a id="nav-tour" href="/about">Tour</a></li>
                <li><a id="nav-users" href="/users">Users</a></li>
            </ul>
        </div>
        <div class="nav askquestion">
            <ul>
                <li>
                    <a id="nav-askquestion"  href="/questions/ask">Ask Question</a>
                </li>
            </ul>
        </div>
    </div>
</div>




<div id="content">


<div id="mainbar">
<div class="subheader">
    <h1>Tagged Questions</h1>


    <div id="tabs">
        <a href="/tags/clojure/info" title="information about this tag">info</a>
        <a class="youarehere" href="/questions/tagged/clojure?sort=newest&pageSize=15" title="The most recently asked questions">newest</a>
        <a href="/questions/tagged/clojure?sort=frequent&pageSize=15" title="Questions with the most links">frequent</a>
        <a href="/questions/tagged/clojure?sort=votes&pageSize=15" title="Questions with the most votes">votes</a>
        <a href="/questions/tagged/clojure?sort=active&pageSize=15" title="Questions that have recent activity">active</a>
        <a href="/questions/tagged/clojure?sort=unanswered&pageSize=15" title="Questions that have no upvoted answers">unanswered</a>
    </div>
</div>
<div class="question">
    <script>
        var ados = ados || {};ados.run = ados.run || [];
        ados.run.push(function() { ados_add_placement(22, 8277, "adzerk1544874599", 56).setZone(739) ; });
    </script>
    <div class="everyonelovesstackoverflow" id="adzerk1544874599">
    </div>

    <div class="welovestackoverflow" style="margin-top: 10px;">
        <div style="float: left;">
            <p>
                Clojure is a modern Lisp dialect for the Java Virtual Machine (with versions for the CLR and JavaScript).                          </p>
            <p style="margin-bottom: 0;">
                <a title="tag wiki" href="/tags/clojure/info">learn more&hellip;</a>
                <span class="lsep">|</span>
                <a title="top answerers and askers in this tag" href="/tags/clojure/topusers">top users</a>
                <span class="lsep">|</span>
                <a title="common, alternate spellings or phrasings for this tag" href="/tags/clojure/synonyms">synonyms (1)</a>
            </p>
        </div>
    </div>

</div>
<div id="questions" class="content-padding">
<div class="question-summary" id="question-summary-23428066">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>-4</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status unanswered">
                <strong>0</strong>answers
            </div>
        </div>
        <div class="views " title="30 views">
            30 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23428066/secure-web-sockets-with-clojure" class="question-hyperlink">Secure web sockets with Clojure [on hold]</a></h3>
        <div class="excerpt">
            Can anybody tell me how to implement secure websockets with Clojure (HttpKit)?

            Thanks

        </div>
        <div class="tags t-https t-clojure t-websocket">
            <a href="/questions/tagged/https" class="post-tag" title="show questions tagged &#39;https&#39;" rel="tag">https</a> <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a> <a href="/questions/tagged/websocket" class="post-tag" title="show questions tagged &#39;websocket&#39;" rel="tag">websocket</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 12:20:54Z" class="relativetime">3 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/721597/harikrishnan"><div><img src="https://www.gravatar.com/avatar/ea871c2fe4a4a4302034720f37d8b268?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/721597/harikrishnan">Harikrishnan</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">996</span><span title="8 silver badges"><span class="badge2"></span><span class="badgecount">8</span></span><span title="24 bronze badges"><span class="badge3"></span><span class="badgecount">24</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23427457">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>1</strong></span>
                    <div class="viewcount">vote</div>
                </div>
            </div>
            <div class="status answered-accepted">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="40 views">
            40 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23427457/clojure-using-agents-slows-down-execution-too-much" class="question-hyperlink">Clojure - Using agents slows down execution too much</a></h3>
        <div class="excerpt">
            I am writing a benchmark for a program in Clojure. I have n threads accessing a cache at the same time. Each thread will access the cache x times. Each request should be logged inside a file.

            To this ...
        </div>
        <div class="tags t-multithreading t-clojure t-agents">
            <a href="/questions/tagged/multithreading" class="post-tag" title="show questions tagged &#39;multithreading&#39;" rel="tag">multithreading</a> <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a> <a href="/questions/tagged/agents" class="post-tag" title="show questions tagged &#39;agents&#39;" rel="tag">agents</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 11:49:12Z" class="relativetime">4 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1225786/christophe-de-troyer"><div><img src="https://www.gravatar.com/avatar/3c2d965b0bfd06fc03f7d0d193812a0f?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1225786/christophe-de-troyer">Christophe De Troyer</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">560</span><span title="3 silver badges"><span class="badge2"></span><span class="badgecount">3</span></span><span title="11 bronze badges"><span class="badge3"></span><span class="badgecount">11</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23426284">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>-3</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered">
                <strong>2</strong>answers
            </div>
        </div>
        <div class="views " title="33 views">
            33 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23426284/merge-two-comma-delimited-strings-in-clojure" class="question-hyperlink">Merge two comma delimited strings in Clojure</a></h3>
        <div class="excerpt">
            I have two comma-delimited strings as below:

            stringA "a,b,c,d"
            stringB "w,x,y,z"


            How can I merge the strings as below in clojure:

            stringResult "aw,bx,cy,dz"


            Note: The comma-delimited values are ...
        </div>
        <div class="tags t-string t-clojure">
            <a href="/questions/tagged/string" class="post-tag" title="show questions tagged &#39;string&#39;" rel="tag">string</a> <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 10:47:09Z" class="relativetime">5 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1382680/rajul-gupta"><div><img src="https://www.gravatar.com/avatar/c4497a09d58c5ce7f4e8e64cfb849f71?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1382680/rajul-gupta">Rajul Gupta</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">1</span><span title="2 bronze badges"><span class="badge3"></span><span class="badgecount">2</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23422781">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status unanswered">
                <strong>0</strong>answers
            </div>
        </div>
        <div class="views " title="13 views">
            13 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23422781/how-to-set-a-timeout-on-a-hystrix-command-in-clojure" class="question-hyperlink">How to set a timeout on a Hystrix command in Clojure?</a></h3>
        <div class="excerpt">
            I'm learning about Hystrix and Clojure and don't understand how to (properly) set a timeout on a Hystrix command in Clojure.

            I searched StackOverflow and the web more generally. I looked at Hystrix's ...
        </div>
        <div class="tags t-clojure t-timeout">
            <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a> <a href="/questions/tagged/timeout" class="post-tag" title="show questions tagged &#39;timeout&#39;" rel="tag">timeout</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 07:14:52Z" class="relativetime">8 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/3554636/oliver-baier"><div><img src="https://www.gravatar.com/avatar/b4026eeaac89b2d591ae41d71fa9c502?s=32&d=identicon&r=PG&f=1" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/3554636/oliver-baier">Oliver Baier</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">1</span><span title="1 bronze badge"><span class="badge3"></span><span class="badgecount">1</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23420947">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="16 views">
            16 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23420947/use-of-other-protocol-method-in-extend-type" class="question-hyperlink">Use of other protocol method in extend-type</a></h3>
        <div class="excerpt">
            I'm building a graph editor with Piccolo2D and want to implement Loom's Graph protocol. However I run into problem

            Unable to resolve symbol: out-edges in this context


            What really confusing is that ...
        </div>
        <div class="tags t-clojure">
            <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 04:50:22Z" class="relativetime">11 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/401539/tungd"><div><img src="https://www.gravatar.com/avatar/a5b4abd71ac6fc7faa1107d51ea4f720?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/401539/tungd">tungd</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">2,693</span><span title="8 silver badges"><span class="badge2"></span><span class="badgecount">8</span></span><span title="14 bronze badges"><span class="badge3"></span><span class="badgecount">14</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23420076">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered-accepted">
                <strong>2</strong>answers
            </div>
        </div>
        <div class="views " title="29 views">
            29 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23420076/how-to-write-a-macro-used-in-cond-in-clojure" class="question-hyperlink">How to write a macro used in cond in clojure?</a></h3>
        <div class="excerpt">
            I have the following macro to ensure the data containing specific keys.

            (defmacro with-correct-format
            [data &amp; body]
            `(cond
            (nil? ~data) (throw (IllegalArgumentException.
            ...
        </div>
        <div class="tags t-macros t-clojure">
            <a href="/questions/tagged/macros" class="post-tag" title="show questions tagged &#39;macros&#39;" rel="tag">macros</a> <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 03:00:57Z" class="relativetime">13 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1042900/dang-fan"><div><img src="https://www.gravatar.com/avatar/6d74657563ed1c1b80b21c2d9c4d861f?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1042900/dang-fan">DANG Fan</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">61</span><span title="5 bronze badges"><span class="badge3"></span><span class="badgecount">5</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23419786">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>1</strong></span>
                    <div class="viewcount">vote</div>
                </div>
            </div>
            <div class="status answered-accepted">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="18 views">
            18 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23419786/classnotfoundexception-when-importing-record-from-other-namespace" class="question-hyperlink">ClassNotFoundException when importing record from other namespace</a></h3>
        <div class="excerpt">
            I have following files:

            src/my_proj/myns.clj:

            (ns my-proj.myns)
            (defrecord MyRecord  [a b c])


            test/my_proj/myns_test.clj:

            (ns my-proj.myns-test
            (:require [clojure.test :refer :all]
            ...
        </div>
        <div class="tags t-clojure t-namespaces t-leiningen">
            <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a> <a href="/questions/tagged/namespaces" class="post-tag" title="show questions tagged &#39;namespaces&#39;" rel="tag">namespaces</a> <a href="/questions/tagged/leiningen" class="post-tag" title="show questions tagged &#39;leiningen&#39;" rel="tag">leiningen</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 02:21:38Z" class="relativetime">13 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1936950/viktor-k"><div><img src="https://www.gravatar.com/avatar/6b08d0c083937020e63540797f729289?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1936950/viktor-k">Viktor K.</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">427</span><span title="2 silver badges"><span class="badge2"></span><span class="badgecount">2</span></span><span title="10 bronze badges"><span class="badge3"></span><span class="badgecount">10</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23417175">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status unanswered">
                <strong>0</strong>answers
            </div>
        </div>
        <div class="views " title="27 views">
            27 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23417175/getting-modulus-from-seq-stream" class="question-hyperlink">Getting modulus from seq-&gt;stream</a></h3>
        <div class="excerpt">
            The code below draws me the sine wave throughout the screen, and beyond.
            However, I want that x never exceeds (width). At that point, the window should be cleared, and the wave should be drawn again, ...
        </div>
        <div class="tags t-clojure t-quil">
            <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a> <a href="/questions/tagged/quil" class="post-tag" title="show questions tagged &#39;quil&#39;" rel="tag">quil</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-01 21:43:16Z" class="relativetime">18 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/664404/barerd"><div><img src="https://www.gravatar.com/avatar/f19ee49306a2a06f1ddea5ab29210b4c?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/664404/barerd">barerd</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">175</span><span title="1 gold badge"><span class="badge1"></span><span class="badgecount">1</span></span><span title="1 silver badge"><span class="badge2"></span><span class="badgecount">1</span></span><span title="13 bronze badges"><span class="badge3"></span><span class="badgecount">13</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23415815">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered-accepted">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="61 views">
            61 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23415815/more-functional-way-to-do-this" class="question-hyperlink">More functional way to do this?</a></h3>
        <div class="excerpt">
            This post of mine discusses Thomson's paradox, and simulates it in Clojure.
            The state function returns the state of the lamp at time = t.

            (defn thomsons-lamp []
            (iterate (fn [[onoff dur]]
            ...
        </div>
        <div class="tags t-clojure t-functional-programming">
            <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a> <a href="/questions/tagged/functional-programming" class="post-tag" title="show questions tagged &#39;functional-programming&#39;" rel="tag">functional-programming</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-01 20:13:59Z" class="relativetime">19 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1163490/divs1210"><div class="gravatar-wrapper-32"><img src="http://i.stack.imgur.com/5Hogj.jpg?s=32&g=1" alt=""></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1163490/divs1210">divs1210</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">77</span><span title="8 bronze badges"><span class="badge3"></span><span class="badgecount">8</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23411955">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered">
                <strong>2</strong>answers
            </div>
        </div>
        <div class="views " title="22 views">
            22 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23411955/casting-an-arrayseq-as-an-ifn" class="question-hyperlink">Casting an ArraySeq as an IFn</a></h3>
        <div class="excerpt">
            Elementary question here.. I am a little confused.

            (((fn [_ &amp; y] y) 'blah +) 3 4)


            will result in the error:


            "java.lang.ClassCastException: clojure.lang.ArraySeq cannot be cast to ...
        </div>
        <div class="tags t-clojure t-evaluation">
            <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a> <a href="/questions/tagged/evaluation" class="post-tag" title="show questions tagged &#39;evaluation&#39;" rel="tag">evaluation</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-01 16:27:40Z" class="relativetime">23 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/3043408/user3043408"><div><img src="https://www.gravatar.com/avatar/eeddd04d00cc968a3c96072f008c5b3d?s=32&d=identicon&r=PG&f=1" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/3043408/user3043408">user3043408</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">1</span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23410859">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered-accepted">
                <strong>2</strong>answers
            </div>
        </div>
        <div class="views " title="50 views">
            50 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23410859/how-to-sort-map-based-on-keys" class="question-hyperlink">how to sort map based on keys</a></h3>
        <div class="excerpt">
            I have the following map:

            MyVals {12 -3, 24 -9, 36 -777, 48 -3037, 180 0, 360 0, 240 0, 120 0, 0 0, 144 0, 3 0, 6 -1, 9 -1, 108 0, 60 0, 72 0, 84 0, 96 0}


            I am removing zero values then I need to ...
        </div>
        <div class="tags t-sorting t-clojure">
            <a href="/questions/tagged/sorting" class="post-tag" title="show questions tagged &#39;sorting&#39;" rel="tag">sorting</a> <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-01 15:27:55Z" class="relativetime">yesterday</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/2248967/redhands"><div><img src="https://www.gravatar.com/avatar/af01da1c76bcbfd9885529dd420f5b54?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/2248967/redhands">redhands</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">42</span><span title="4 bronze badges"><span class="badge3"></span><span class="badgecount">4</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23409130">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>1</strong></span>
                    <div class="viewcount">vote</div>
                </div>
            </div>
            <div class="status answered">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="21 views">
            21 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23409130/clojure-local-maven-repo-with-jni-dependency" class="question-hyperlink">Clojure local maven repo with JNI dependency</a></h3>
        <div class="excerpt">
            I am trying to create a local Maven repository for my Clojure/leiningen project, as for instance described here:

            Use Leiningen With Local M2 Repository

            I have also found out that more recent ...
        </div>
        <div class="tags t-java t-maven t-clojure t-jni t-dependencies">
            <a href="/questions/tagged/java" class="post-tag" title="show questions tagged &#39;java&#39;" rel="tag">java</a> <a href="/questions/tagged/maven" class="post-tag" title="show questions tagged &#39;maven&#39;" rel="tag">maven</a> <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a> <a href="/questions/tagged/jni" class="post-tag" title="show questions tagged &#39;jni&#39;" rel="tag">jni</a> <a href="/questions/tagged/dependencies" class="post-tag" title="show questions tagged &#39;dependencies&#39;" rel="tag">dependencies</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-01 13:54:52Z" class="relativetime">yesterday</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/3573432/ems"><div><img src="https://www.gravatar.com/avatar/d9143b22f25882694abef9e47c8e5fbc?s=32&d=identicon&r=PG&f=1" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/3573432/ems">ems</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">6</span><span title="2 bronze badges"><span class="badge3"></span><span class="badgecount">2</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23407616">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>2</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered-accepted">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="31 views">
            31 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23407616/how-to-expand-the-classname-staticfield-macro-syntax" class="question-hyperlink">How to expand the `Classname/staticField` macro syntax</a></h3>
        <div class="excerpt">
            From the Clojure docs, this is how to access a static field of a Java class:

            Classname/staticField

            Math/PI
            -&gt; 3.141592653589793


            And this is the expansion:


            The expansions are as follows:

            ...
        </div>
        <div class="tags t-macros t-clojure t-static t-interop t-expand">
            <a href="/questions/tagged/macros" class="post-tag" title="show questions tagged &#39;macros&#39;" rel="tag">macros</a> <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a> <a href="/questions/tagged/static" class="post-tag" title="show questions tagged &#39;static&#39;" rel="tag">static</a> <a href="/questions/tagged/interop" class="post-tag" title="show questions tagged &#39;interop&#39;" rel="tag">interop</a> <a href="/questions/tagged/expand" class="post-tag" title="show questions tagged &#39;expand&#39;" rel="tag">expand</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info user-hover">
                <div class="user-action-time">
                    asked <span title="2014-05-01 12:24:10Z" class="relativetime">yesterday</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/894284/matt-fenwick"><div><img src="https://www.gravatar.com/avatar/5b15ac856b808e329185b1f653805d09?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/894284/matt-fenwick">Matt Fenwick</a><br>
                    <span class="reputation-score" title="reputation score 16518" dir="ltr">16.5k</span><span title="4 gold badges"><span class="badge1"></span><span class="badgecount">4</span></span><span title="37 silver badges"><span class="badge2"></span><span class="badgecount">37</span></span><span title="102 bronze badges"><span class="badge3"></span><span class="badgecount">102</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23405852">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered-accepted">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="38 views">
            38 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23405852/clojure-printing-lazy-sequence" class="question-hyperlink">Clojure printing lazy sequence</a></h3>
        <div class="excerpt">
            I'm trying to print out my binary tree but Clojure is giving me a hard time printing out the sequences properly.

            So, I have a list of nodes '(1 2 3) for example.

            In each iteration I want to print ...
        </div>
        <div class="tags t-clojure t-lazy-sequences">
            <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a> <a href="/questions/tagged/lazy-sequences" class="post-tag" title="show questions tagged &#39;lazy-sequences&#39;" rel="tag">lazy-sequences</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-01 10:21:16Z" class="relativetime">yesterday</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1225786/christophe-de-troyer"><div><img src="https://www.gravatar.com/avatar/3c2d965b0bfd06fc03f7d0d193812a0f?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1225786/christophe-de-troyer">Christophe De Troyer</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">560</span><span title="3 silver badges"><span class="badge2"></span><span class="badgecount">3</span></span><span title="11 bronze badges"><span class="badge3"></span><span class="badgecount">11</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23405699">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>2</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered-accepted">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="27 views">
            27 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23405699/how-to-package-up-a-leiningen-project-for-recompilation-with-all-the-libraries-i" class="question-hyperlink">How to package up a leiningen project for recompilation with all the libraries included? [for users without an internet connection]</a></h3>
        <div class="excerpt">
            I'm giving a Clojure workshop and I want people to be able to modify and recompile the Clojure project. The challenge is that they won't have internet connections - so I need to give them the project ...
        </div>
        <div class="tags t-maven t-clojure t-libraries t-leiningen">
            <a href="/questions/tagged/maven" class="post-tag" title="show questions tagged &#39;maven&#39;" rel="tag">maven</a> <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a> <a href="/questions/tagged/libraries" class="post-tag" title="show questions tagged &#39;libraries&#39;" rel="tag">libraries</a> <a href="/questions/tagged/leiningen" class="post-tag" title="show questions tagged &#39;leiningen&#39;" rel="tag">leiningen</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-01 10:10:04Z" class="relativetime">yesterday</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/15441/hawkeye"><div><img src="https://www.gravatar.com/avatar/5518cfdb59367af4cb030e13d4c12542?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/15441/hawkeye">hawkeye</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">5,787</span><span title="4 gold badges"><span class="badge1"></span><span class="badgecount">4</span></span><span title="35 silver badges"><span class="badge2"></span><span class="badgecount">35</span></span><span title="105 bronze badges"><span class="badge3"></span><span class="badgecount">105</span></span>
                </div>
            </div>
        </div>
    </div>
</div>
</div>

<br class="cbt" />
<div class="pager fl">





    <span class="page-numbers current">1</span>         <a href="/questions/tagged/clojure?page=2&amp;sort=newest&amp;pagesize=15" title="go to page 2"> <span class="page-numbers">2</span> </a>
    <a href="/questions/tagged/clojure?page=3&amp;sort=newest&amp;pagesize=15" title="go to page 3"> <span class="page-numbers">3</span> </a>
    <a href="/questions/tagged/clojure?page=4&amp;sort=newest&amp;pagesize=15" title="go to page 4"> <span class="page-numbers">4</span> </a>
    <a href="/questions/tagged/clojure?page=5&amp;sort=newest&amp;pagesize=15" title="go to page 5"> <span class="page-numbers">5</span> </a>
    <span class="page-numbers dots">…</span>         <a href="/questions/tagged/clojure?page=490&amp;sort=newest&amp;pagesize=15" title="go to page 490"> <span class="page-numbers">490</span> </a>
    <a href="/questions/tagged/clojure?page=2&amp;sort=newest&amp;pagesize=15" rel="next" title="go to page 2"> <span class="page-numbers next"> next</span> </a>

</div>

<div class="page-sizer fr">
    <a href="/questions/tagged/clojure?sort=newest&pagesize=15" title="show 15 items per page" class="page-numbers current">15</a>
    <a href="/questions/tagged/clojure?sort=newest&pagesize=30" title="show 30 items per page" class="page-numbers ">30</a>
    <a href="/questions/tagged/clojure?sort=newest&pagesize=50" title="show 50 items per page" class="page-numbers ">50</a>
    <span class="page-numbers desc">per page</span>
</div>
<div id="feed-link">
    <div id="feed-link-text">
        <a href="/feeds/tag?tagnames=clojure&sort=newest" title="the 30 newest clojure questions">
            <span class="feed-icon"></span>newest clojure questions feed
        </a>
    </div>
</div>
</div>
<div id="sidebar">
<div class="module">
    <div class="summarycount al">7,337</div>
    <p>questions tagged</p>
    <div class="tagged">
        <a href="/questions/tagged/clojure" class="post-tag" title="show questions tagged &#39;clojure&#39;" rel="tag">clojure</a>
        <a style='margin-left:10px;' title='tag wiki, stats and faq' href='/tags/clojure/info'>about&nbsp;&raquo;</a>            </div>
</div>


<script>
    var ados = ados || {};ados.run = ados.run || [];
    ados.run.push(function() { ados_add_placement(22,8277,"adzerk45877259",17).setZone(45) ; });
</script>
<div class="everyonelovesstackoverflow" id="adzerk45877259">
</div>
<div id="hireme">
    <script>
        window.careers_adurl="//careers.stackoverflow.com/gethired/js",window.careers_cssurl="//cdn-careers.sstatic.net/careers/gethired/sidebar.min.css?v=c886aec35a12",window.careers_leaderboardcssurl="{leaderboardcssurl}",window.careers_companycssurl="//cdn-careers.sstatic.net/careers/gethired/company",window.careers_adselector="div#hireme",StackExchange.ready(function(){$.ajax({url:"//cdn-careers.sstatic.net/careers/gethired/loader.min.js?v=ffc1e27a5763",dataType:"script",cache:!0})});        </script>
</div>


<div class="module js-gps-related-tags">

    <h4 id="h-related-tags">Related Tags</h4>
    <div>
        <a href="/questions/tagged/clojure+java" class="post-tag" title="show questions tagged &#39;clojure java&#39;" rel="tag">java</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">571</span></span>
    </div>
    <div>
        <a href="/questions/tagged/clojure+leiningen" class="post-tag" title="show questions tagged &#39;clojure leiningen&#39;" rel="tag">leiningen</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">501</span></span>
    </div>
    <div>
        <a href="/questions/tagged/clojure+functional-programming" class="post-tag" title="show questions tagged &#39;clojure functional-programming&#39;" rel="tag">functional-programming</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">272</span></span>
    </div>
    <div>
        <a href="/questions/tagged/clojure+lisp" class="post-tag" title="show questions tagged &#39;clojure lisp&#39;" rel="tag">lisp</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">261</span></span>
    </div>
    <div>
        <a href="/questions/tagged/clojure+macros" class="post-tag" title="show questions tagged &#39;clojure macros&#39;" rel="tag">macros</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">241</span></span>
    </div>
    <div>
        <a href="/questions/tagged/clojure+clojurescript" class="post-tag" title="show questions tagged &#39;clojure clojurescript&#39;" rel="tag">clojurescript</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">206</span></span>
    </div>
    <div>
        <a href="/questions/tagged/clojure+compojure" class="post-tag" title="show questions tagged &#39;clojure compojure&#39;" rel="tag">compojure</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">200</span></span>
    </div>
    <div>
        <a href="/questions/tagged/clojure+emacs" class="post-tag" title="show questions tagged &#39;clojure emacs&#39;" rel="tag">emacs</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">190</span></span>
    </div>
    <div>
        <a href="/questions/tagged/clojure+ring" class="post-tag" title="show questions tagged &#39;clojure ring&#39;" rel="tag">ring</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">158</span></span>
    </div>
    <div>
        <a href="/questions/tagged/clojure+read-eval-print-loop" class="post-tag" title="show questions tagged &#39;clojure read-eval-print-loop&#39;" rel="tag">read-eval-print-loop</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">110</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+map" class="post-tag" title="show questions tagged &#39;clojure map&#39;" rel="tag">map</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">98</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+scala" class="post-tag" title="show questions tagged &#39;clojure scala&#39;" rel="tag">scala</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">97</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+jvm" class="post-tag" title="show questions tagged &#39;clojure jvm&#39;" rel="tag">jvm</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">91</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+clojure-contrib" class="post-tag" title="show questions tagged &#39;clojure clojure-contrib&#39;" rel="tag">clojure-contrib</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">89</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+recursion" class="post-tag" title="show questions tagged &#39;clojure recursion&#39;" rel="tag">recursion</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">82</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+noir" class="post-tag" title="show questions tagged &#39;clojure noir&#39;" rel="tag">noir</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">79</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+concurrency" class="post-tag" title="show questions tagged &#39;clojure concurrency&#39;" rel="tag">concurrency</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">77</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+vector" class="post-tag" title="show questions tagged &#39;clojure vector&#39;" rel="tag">vector</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">75</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+namespaces" class="post-tag" title="show questions tagged &#39;clojure namespaces&#39;" rel="tag">namespaces</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">74</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+lazy-evaluation" class="post-tag" title="show questions tagged &#39;clojure lazy-evaluation&#39;" rel="tag">lazy-evaluation</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">73</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+slime" class="post-tag" title="show questions tagged &#39;clojure slime&#39;" rel="tag">slime</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">71</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+clojure-java-interop" class="post-tag" title="show questions tagged &#39;clojure clojure-java-interop&#39;" rel="tag">clojure-java-interop</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">71</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+scheme" class="post-tag" title="show questions tagged &#39;clojure scheme&#39;" rel="tag">scheme</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">69</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+haskell" class="post-tag" title="show questions tagged &#39;clojure haskell&#39;" rel="tag">haskell</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">65</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/clojure+function" class="post-tag" title="show questions tagged &#39;clojure function&#39;" rel="tag">function</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">63</span></span>
    </div>
    <a href="#"
       class="show-more js-show-more js-gps-track"
       data-gps-track="related_tags.click({ item_type:2 })">
        more related tags
    </a>
    <script>
        StackExchange.ready(function () {
            var $div = $('#h-related-tags').parent();
            $div.find('.js-show-more').click(function () {
                $div.find('.js-hidden').show();
                $(this).remove();
                return false;
            });
        });
    </script>

</div>


<div id="hot-network-questions" class="module">
    <h4>
        <a href="//stackexchange.com/questions?tab=hot"
           class="js-gps-track"
           data-gps-track="posts_hot_network.click({ item_type:1, location:9 })">
            Hot Network Questions
        </a>
    </h4>
    <ul>
        <li >
            <div class="favicon favicon-graphicdesign" title="Graphic Design Stack Exchange"></div><a href="http://graphicdesign.stackexchange.com/questions/30469/3d-how-to-make-this-photo-wall-effect-in-photoshop" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:174 }); posts_hot_network.click({ item_type:2, location:9 })">
            3D - How to make this photo wall effect in Photoshop?
        </a>

        </li>
        <li >
            <div class="favicon favicon-matheducators" title="Mathematics Educators Stack Exchange"></div><a href="http://matheducators.stackexchange.com/questions/2098/what-to-do-with-students-who-think-they-already-know-it-but-actually-dont" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:548 }); posts_hot_network.click({ item_type:2, location:9 })">
            What to do with students who think they &quot;already know it,&quot; but actually don&#39;t?
        </a>

        </li>
        <li >
            <div class="favicon favicon-programmers" title="Programmers Stack Exchange"></div><a href="http://programmers.stackexchange.com/questions/237702/lexing-one-token-per-operator-or-one-universal-operator-token" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:131 }); posts_hot_network.click({ item_type:2, location:9 })">
            Lexing: One token per operator, or one universal operator token?
        </a>

        </li>
        <li >
            <div class="favicon favicon-music" title="Musical Practice &amp; Performance Stack Exchange"></div><a href="http://music.stackexchange.com/questions/17175/what-food-drink-affects-vocal-characteristics" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:240 }); posts_hot_network.click({ item_type:2, location:9 })">
            What food / drink affects vocal characteristics?
        </a>

        </li>
        <li >
            <div class="favicon favicon-programmers" title="Programmers Stack Exchange"></div><a href="http://programmers.stackexchange.com/questions/237683/how-to-deal-with-a-misnamed-function-in-production-code" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:131 }); posts_hot_network.click({ item_type:2, location:9 })">
            How to deal with a misnamed function in production code?
        </a>

        </li>
        <li >
            <div class="favicon favicon-unix" title="Unix &amp; Linux Stack Exchange"></div><a href="http://unix.stackexchange.com/questions/127551/why-does-the-history-command-do-nothing-in-a-script-file" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:106 }); posts_hot_network.click({ item_type:2, location:9 })">
            Why does the history command do nothing in a script file?
        </a>

        </li>
        <li >
            <div class="favicon favicon-rpg" title="Role-playing Games Stack Exchange"></div><a href="http://rpg.stackexchange.com/questions/36993/what-etiquette-should-a-new-player-observe-at-the-gaming-table" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:122 }); posts_hot_network.click({ item_type:2, location:9 })">
            What etiquette should a new player observe at the gaming table?
        </a>

        </li>
        <li >
            <div class="favicon favicon-stackoverflow" title="Stack Overflow"></div><a href="http://stackoverflow.com/questions/23427925/difference-between-namesdf1-and-namesdf1" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:1 }); posts_hot_network.click({ item_type:2, location:9 })">
            difference between `names(df[1]) &lt;- ` and `names(df)[1] &lt;- `
        </a>

        </li>
        <li >
            <div class="favicon favicon-math" title="Mathematics Stack Exchange"></div><a href="http://math.stackexchange.com/questions/778068/lnx-vs-lnx-when-is-the-ln-antiderivative-marked-as-an-absolute-value" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:69 }); posts_hot_network.click({ item_type:2, location:9 })">
            ln|x| vs. ln(x)? When is the ln antiderivative marked as an absolute value?
        </a>

        </li>
        <li >
            <div class="favicon favicon-physics" title="Physics Stack Exchange"></div><a href="http://physics.stackexchange.com/questions/110910/why-does-the-water-in-a-powerade-bottle-tastes-a-little-like-powerade-after-many" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:151 }); posts_hot_network.click({ item_type:2, location:9 })">
            Why does the water in a Powerade bottle tastes a little like Powerade after many refills?
        </a>

        </li>
        <li >
            <div class="favicon favicon-academia" title="Academia Stack Exchange"></div><a href="http://academia.stackexchange.com/questions/20144/is-there-independent-oversight-of-journal-impact-factors" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:415 }); posts_hot_network.click({ item_type:2, location:9 })">
            Is there independent oversight of Journal Impact Factors?
        </a>

        </li>
        <li >
            <div class="favicon favicon-codegolf" title="Programming Puzzles &amp; Code Golf Stack Exchange"></div><a href="http://codegolf.stackexchange.com/questions/26323/how-slow-is-python-really-or-how-fast-is-your-language" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:200 }); posts_hot_network.click({ item_type:2, location:9 })">
            How slow is python really? (Or how fast is your language?)
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-physics" title="Physics Stack Exchange"></div><a href="http://physics.stackexchange.com/questions/110895/does-water-have-surface-tension-in-a-vacuum" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:151 }); posts_hot_network.click({ item_type:2, location:9 })">
            Does water have surface tension in a vacuum?
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-mathematica" title="Mathematica Stack Exchange"></div><a href="http://mathematica.stackexchange.com/questions/47171/returning-all-positions-for-all-different-occurences-of-elements-in-a-list" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:387 }); posts_hot_network.click({ item_type:2, location:9 })">
            Returning all positions for all different occurences of elements in a list
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-workplace" title="The Workplace Stack Exchange"></div><a href="http://workplace.stackexchange.com/questions/23388/do-i-have-to-relinquish-my-pc-password-to-my-former-boss" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:423 }); posts_hot_network.click({ item_type:2, location:9 })">
            Do I have to relinquish my PC password to my former boss?
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-rpg" title="Role-playing Games Stack Exchange"></div><a href="http://rpg.stackexchange.com/questions/37047/what-are-the-rules-for-ability-score-maximums" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:122 }); posts_hot_network.click({ item_type:2, location:9 })">
            What are the rules for ability score maximums?
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-gamedev" title="Game Development Stack Exchange"></div><a href="http://gamedev.stackexchange.com/questions/74196/why-is-an-engine-like-unity3d-emphasized-over-a-native-library-like-opengl-for-b" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:53 }); posts_hot_network.click({ item_type:2, location:9 })">
            Why is an engine like Unity3D emphasized over a native library like OpenGL for beginners?
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-travel" title="Travel Stack Exchange"></div><a href="http://travel.stackexchange.com/questions/26635/when-i-travel-next-i-want-to-reach-the-point-on-the-earth-that-is-exactly-oppos" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:273 }); posts_hot_network.click({ item_type:2, location:9 })">
            When I travel next, I want to reach the point on the earth that is exactly opposite my home, how can I discover where that is?
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-gaming" title="Arqade"></div><a href="http://gaming.stackexchange.com/questions/166445/is-there-any-way-to-check-the-governors-daughters-beauty-level" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:41 }); posts_hot_network.click({ item_type:2, location:9 })">
            Is there any way to check the Governor&#39;s daughters&#39; beauty level?
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-codereview" title="Code Review Stack Exchange"></div><a href="http://codereview.stackexchange.com/questions/48790/can-i-simplify-this-recursive-grid-search" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:196 }); posts_hot_network.click({ item_type:2, location:9 })">
            Can I simplify this recursive grid search?
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-philosophy" title="Philosophy Stack Exchange"></div><a href="http://philosophy.stackexchange.com/questions/11173/secular-pro-life-argument" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:265 }); posts_hot_network.click({ item_type:2, location:9 })">
            Secular pro-life argument
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-mathematica" title="Mathematica Stack Exchange"></div><a href="http://mathematica.stackexchange.com/questions/47164/labeling-a-grid" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:387 }); posts_hot_network.click({ item_type:2, location:9 })">
            Labeling a grid
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-academia" title="Academia Stack Exchange"></div><a href="http://academia.stackexchange.com/questions/20139/what-can-i-do-if-my-supervisor-does-not-publish-my-research-results" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:415 }); posts_hot_network.click({ item_type:2, location:9 })">
            What can I do if my supervisor does not publish my research results?
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-tex" title="TeX - LaTeX Stack Exchange"></div><a href="http://tex.stackexchange.com/questions/174837/tikz-incorrect-node-placement-gap-between-nodes" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:85 }); posts_hot_network.click({ item_type:2, location:9 })">
            tikz incorrect node placement : gap between nodes
        </a>

        </li>
    </ul>

    <a href="#"
       class="show-more js-show-more js-gps-track"
       data-gps-track="posts_hot_network.click({ item_type:3, location:9 })">
        more hot questions
    </a>
</div>
</div>

</div>
</div>
<div id="footer" class="categories">
    <div class="footerwrap">
        <div id="footer-menu">
            <div class="top-footer-links">
                <a href="/about">about</a>
                <a href="/help">help</a>
                <a href="/help/badges">badges</a>
                <a href="http://blog.stackoverflow.com?blb=1">blog</a>
                <a href="http://chat.stackoverflow.com">chat</a>
                <a href="http://data.stackexchange.com">data</a>
                <a href="http://stackexchange.com/legal">legal</a>
                <a href="http://stackexchange.com/legal/privacy-policy">privacy policy</a>
                <a href="http://stackexchange.com/about/hiring">jobs</a>
                <a href="http://engine.adzerk.net/r?e=eyJhdiI6NDE0LCJhdCI6MjAsImNtIjo5NTQsImNoIjoxMTc4LCJjciI6Mjc3NiwiZG0iOjQsImZjIjoyODYyLCJmbCI6Mjc1MSwibnciOjIyLCJydiI6MCwicHIiOjExNSwic3QiOjAsInVyIjoiaHR0cDovL3N0YWNrb3ZlcmZsb3cuY29tL2Fib3V0L2NvbnRhY3QiLCJyZSI6MX0&s=hRods5B22XvRBwWIwtIMekcyNF8">advertising info</a>

                <a onclick='StackExchange.switchMobile("on")'>mobile</a>
                <b><a href="/contact">contact us</a></b>
                <b><a href="http://meta.stackoverflow.com">feedback</a></b>

            </div>
            <div id="footer-sites">
                <table>
                    <tr>
                        <th colspan=3>
                            Technology
                        </th>
                        <th >
                            Life / Arts
                        </th>
                        <th >
                            Culture / Recreation
                        </th>
                        <th >
                            Science
                        </th>
                        <th >
                            Other
                        </th>
                    </tr>
                    <tr>
                        <td>
                            <ol>
                                <li><a href="http://stackoverflow.com" title="professional and enthusiast programmers">Stack Overflow</a></li>
                                <li><a href="http://serverfault.com" title="professional system and network administrators">Server Fault</a></li>
                                <li><a href="http://superuser.com" title="computer enthusiasts and power users">Super User</a></li>
                                <li><a href="http://webapps.stackexchange.com" title="power users of web applications">Web Applications</a></li>
                                <li><a href="http://askubuntu.com" title="Ubuntu users and developers">Ask Ubuntu</a></li>
                                <li><a href="http://webmasters.stackexchange.com" title="pro webmasters">Webmasters</a></li>
                                <li><a href="http://gamedev.stackexchange.com" title="professional and independent game developers">Game Development</a></li>
                                <li><a href="http://tex.stackexchange.com" title="users of TeX, LaTeX, ConTeXt, and related typesetting systems">TeX - LaTeX</a></li>
                            </ol></td><td><ol>
                        <li><a href="http://programmers.stackexchange.com" title="professional programmers interested in conceptual questions about software development">Programmers</a></li>
                        <li><a href="http://unix.stackexchange.com" title="users of Linux, FreeBSD and other Un*x-like operating systems.">Unix &amp; Linux</a></li>
                        <li><a href="http://apple.stackexchange.com" title="power users of Apple hardware and software">Ask Different (Apple)</a></li>
                        <li><a href="http://wordpress.stackexchange.com" title="WordPress developers and administrators">WordPress Development</a></li>
                        <li><a href="http://gis.stackexchange.com" title="cartographers, geographers and GIS professionals">Geographic Information Systems</a></li>
                        <li><a href="http://electronics.stackexchange.com" title="electronics and electrical engineering professionals, students, and enthusiasts">Electrical Engineering</a></li>
                        <li><a href="http://android.stackexchange.com" title="enthusiasts and power users of the Android operating system">Android Enthusiasts</a></li>
                        <li><a href="http://security.stackexchange.com" title="Information security professionals">Information Security</a></li>
                    </ol></td><td><ol>
                        <li><a href="http://dba.stackexchange.com" title="database professionals who wish to improve their database skills and learn from others in the community">Database Administrators</a></li>
                        <li><a href="http://drupal.stackexchange.com" title="Drupal developers and administrators">Drupal Answers</a></li>
                        <li><a href="http://sharepoint.stackexchange.com" title="SharePoint enthusiasts">SharePoint</a></li>
                        <li><a href="http://ux.stackexchange.com" title="user experience researchers and experts">User Experience</a></li>
                        <li><a href="http://mathematica.stackexchange.com" title="users of Mathematica">Mathematica</a></li>

                        <li>
                            <a href="http://stackexchange.com/sites#technology" class="more">
                                more (14)
                            </a>
                        </li>
                    </ol>
                    </td>
                        <td>
                            <ol>
                                <li><a href="http://photo.stackexchange.com" title="professional, enthusiast and amateur photographers">Photography</a></li>
                                <li><a href="http://scifi.stackexchange.com" title="science fiction and fantasy enthusiasts">Science Fiction &amp; Fantasy</a></li>
                                <li><a href="http://graphicdesign.stackexchange.com" title="professional graphic designers and non-designers trying to do their own graphic design">Graphic Design</a></li>
                                <li><a href="http://cooking.stackexchange.com" title="professional and amateur chefs">Seasoned Advice (cooking)</a></li>
                                <li><a href="http://diy.stackexchange.com" title="contractors and serious DIYers">Home Improvement</a></li>
                                <li><a href="http://money.stackexchange.com" title="people who want to be financially literate">Personal Finance &amp; Money</a></li>
                                <li><a href="http://academia.stackexchange.com" title="academics and those enrolled in higher education">Academia</a></li>

                                <li>
                                    <a href="http://stackexchange.com/sites#lifearts" class="more">
                                        more (10)
                                    </a>
                                </li>
                            </ol>
                        </td>
                        <td>
                            <ol>
                                <li><a href="http://english.stackexchange.com" title="linguists, etymologists, and serious English language enthusiasts">English Language &amp; Usage</a></li>
                                <li><a href="http://skeptics.stackexchange.com" title="scientific skepticism">Skeptics</a></li>
                                <li><a href="http://judaism.stackexchange.com" title="those who base their lives on Jewish law and tradition and anyone interested in learning more">Mi Yodeya (Judaism)</a></li>
                                <li><a href="http://travel.stackexchange.com" title="road warriors and seasoned travelers">Travel</a></li>
                                <li><a href="http://christianity.stackexchange.com" title="committed Christians, experts in Christianity and those interested in learning more">Christianity</a></li>
                                <li><a href="http://gaming.stackexchange.com" title="passionate videogamers on all platforms">Arqade (gaming)</a></li>
                                <li><a href="http://bicycles.stackexchange.com" title="people who build and repair bicycles, people who train cycling, or commute on bicycles">Bicycles</a></li>
                                <li><a href="http://rpg.stackexchange.com" title="gamemasters and players of tabletop, paper-and-pencil role-playing games">Role-playing Games</a></li>

                                <li>
                                    <a href="http://stackexchange.com/sites#culturerecreation" class="more">
                                        more (21)
                                    </a>
                                </li>
                            </ol>
                        </td>
                        <td>
                            <ol>
                                <li><a href="http://math.stackexchange.com" title="people studying math at any level and professionals in related fields">Mathematics</a></li>
                                <li><a href="http://stats.stackexchange.com" title="people interested in statistics, machine learning, data analysis, data mining, and data visualization">Cross Validated (stats)</a></li>
                                <li><a href="http://cstheory.stackexchange.com" title="theoretical computer scientists and researchers in related fields">Theoretical Computer Science</a></li>
                                <li><a href="http://physics.stackexchange.com" title="active researchers, academics and students of physics">Physics</a></li>
                                <li><a href="http://mathoverflow.net" title="professional mathematicians">MathOverflow</a></li>

                                <li>
                                    <a href="http://stackexchange.com/sites#science" class="more">
                                        more (7)
                                    </a>
                                </li>
                            </ol>
                        </td>
                        <td>
                            <ol>
                                <li><a href="http://stackapps.com" title="apps, scripts, and development with the Stack Exchange API">Stack Apps</a></li>
                                <li><a href="http://meta.stackexchange.com" title="meta-discussion of the Stack Exchange family of Q&amp;A websites">Meta Stack Exchange</a></li>
                                <li><a href="http://area51.stackexchange.com" title="proposing new sites in the Stack Exchange network">Area 51</a></li>
                                <li><a href="http://careers.stackoverflow.com">Stack Overflow Careers</a></li>

                            </ol>
                        </td>
                    </tr>
                </table>
            </div>
        </div>

        <div id="copyright">
            site design / logo &#169; 2014 stack exchange inc; user contributions licensed under <a href="http://creativecommons.org/licenses/by-sa/3.0/" rel="license">cc by-sa 3.0</a>
            with <a href="http://blog.stackoverflow.com/2009/06/attribution-required/" rel="license">attribution required</a>
        </div>
        <div id="svnrev">
            rev 2014.4.30.1585
        </div>

    </div>
</div>
<noscript>
    <div id="noscript-warning">Stack Overflow works best with JavaScript enabled<img src="http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif" alt="" class="dno"></div>
</noscript>
<script>var p = "http", d = "static"; if (document.location.protocol == "https:") { p += "s"; d = "engine"; } var z = document.createElement("script"); z.type = "text/javascript"; z.async = true; z.src = p + "://" + d + ".adzerk.net/ados.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(z, s);</script>
<script>
    var ados = ados || {};
    ados.run = ados.run || [];
    ados.run.push(function () { ados_setKeywords('clojure');; ados_load(); });
</script>

<script>
    (function (i, s, o, g, r, a, m) {
        i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o),
                m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m);
    })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
    ga('create', 'UA-5620270-1');

    ga('set', 'dimension2', '|clojure|');
    ga('send', 'pageview');
    var _qevents = _qevents || [],
            _comscore = _comscore || [];
    (function () {
        var ssl='https:'==document.location.protocol,
                s=document.getElementsByTagName('script')[0],
                qc=document.createElement('script');
        qc.async=true;
        qc.src=(ssl?'https://secure':'http://edge')+'.quantserve.com/quant.js';
        s.parentNode.insertBefore(qc, s);
        var sc=document.createElement('script');
        sc.async=true;
        sc.src=(ssl?'https://sb':'http://b') + '.scorecardresearch.com/beacon.js';
        s.parentNode.insertBefore(sc, s);
    })();
    _comscore.push({ c1: "2", c2: "17440561" });
    _qevents.push({ qacct: "p-c1rF4kxgLUzNc" });
</script>

</body>
</html>

================================================
FILE: src/test/resources/groovy-questions.html
================================================
<!DOCTYPE html>
<html>
<head>

    <title>Newest &#39;groovy&#39; Questions - Stack Overflow</title>
    <link rel="shortcut icon" href="//cdn.sstatic.net/stackoverflow/img/favicon.ico?v=038622610830">
    <link rel="apple-touch-icon image_src" href="//cdn.sstatic.net/stackoverflow/img/apple-touch-icon.png?v=fd7230a85918">
    <link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="/opensearch.xml">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:domain" content="stackoverflow.com"/>
    <meta name="og:type" content="website" />
    <meta name="og:image" content="http://cdn.sstatic.net/stackoverflow/img/apple-touch-icon@2.png?v=fde65a5a78c6"/>
    <meta name="og:title" content="Newest &amp;#39;groovy&amp;#39; Questions" />
    <meta name="og:description" content="Q&amp;A for professional and enthusiast programmers" />
    <meta name="og:url" content="http://stackoverflow.com/questions/tagged/groovy"/>



    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script src="//cdn.sstatic.net/Js/stub.en.js?v=a085b0b86607"></script>
    <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/stackoverflow/all.css?v=7dd1e240cf1a">

    <link rel="alternate" type="application/atom+xml" title="newest groovy questions feed" href="/feeds/tag?tagnames=groovy&amp;sort=newest" />


    <script>
        StackExchange.init({"locale":"en","stackAuthUrl":"https://stackauth.com","serverTime":1399046984,"networkMetaHostname":"meta.stackexchange.com","styleCode":true,"enableUserHovercards":true,"site":{"name":"Stack Overflow","description":"Q&A for professional and enthusiast programmers","isNoticesTabEnabled":true,"recaptchaPublicKey":"6LdchgIAAAAAAJwGpIzRQSOFaO0pU6s44Xt8aTwc","recaptchaAudioLang":"en","nonAsciiTags":true,"enableSocialMediaInSharePopup":true},"user":{"fkey":"f7c22c31aff962a89f9edae6fedbf1d3","isAnonymous":true,"ab":{"welcome_email":{"v":"3","g":2}}}});
        StackExchange.using.setCacheBreakers({"js/prettify-full.en.js":"d987e8ba02e8","js/moderator.en.js":"852a9590ae2d","js/full-anon.en.js":"e0135be99202","js/full.en.js":"252aef4827ba","js/wmd.en.js":"d9dc7a9550f9","js/third-party/jquery.autocomplete.min.js":"e5f01e97f7c3","js/third-party/jquery.autocomplete.min.en.js":"","js/mobile.en.js":"dcf6dd539af8","js/help.en.js":"ceae85b045a1","js/tageditor.en.js":"7f54d0efc81e","js/tageditornew.en.js":"0bf79a6484e0","js/inline-tag-editing.en.js":"d00846e90065","js/revisions.en.js":"9a2b9be85a69","js/review.en.js":"063e88635927","js/tagsuggestions.en.js":"bb4721d888d2","js/post-validation.en.js":"0e52d1a0290c","js/explore-qlist.en.js":"24424eb238e8","js/events.en.js":"203491ffdbd7"});
        StackExchange.using("gps", function() {
            StackExchange.gps.init(true);
        });

    </script>

    <script>
        StackExchange.ready(function () {
            $('#nav-tour').click(function () {
                StackExchange.using("gps", function() {
                    StackExchange.gps.track("aboutpage.click", { aboutclick_location: "headermain" }, true);
                });
            });
        });
    </script>
</head>
<body class="tagged-questions-page new-topbar">
<noscript><div id="noscript-padding"></div></noscript>
<div id="notify-container"></div>
<div id="overlay-header"></div>
<div id="custom-header"></div>
<div class="topbar">
    <div class="topbar-wrapper">

        <div class="js-topbar-dialog-corral">

            <div class="topbar-dialog siteSwitcher-dialog dno">
                <div class="header">
                    <h3><a href="//stackoverflow.com">current community</a></h3>
                </div>
                <div class="modal-content current-site-container">
                    <ul class="current-site">
                        <li>
                            <div class="related-links">
                                <a href="http://chat.stackoverflow.com"     data-gps-track="site_switcher.click({ item_type:6 })"
                                        >chat</a>
                                <a href="http://blog.stackoverflow.com"     data-gps-track="site_switcher.click({ item_type:7 })"
                                        >blog</a>
                            </div>




                            <a href="//stackoverflow.com"
                               class="current-site-link site-link js-gps-track"
                               data-id="1"
                               data-gps-track="
        site_switcher.click({ item_type:3 })">
                                <div class="site-icon favicon favicon-stackoverflow" title="Stack Overflow"></div>
                                Stack Overflow
                            </a>

                        </li>
                        <li class="related-site">
                            <div class="L-shaped-icon-container">
                                <span class="L-shaped-icon"></span>
                            </div>





                            <a href="http://meta.stackoverflow.com"
                               class="site-link js-gps-track"
                               data-id="552"
                               data-gps-track="
            site.switch({ target_site:552, item_type:3 }),
        site_switcher.click({ item_type:4 })">
                                <div class="site-icon favicon favicon-stackoverflowmeta" title="Meta Stack Overflow"></div>
                                Meta Stack Overflow
                            </a>

                        </li>
                        <li class="related-site">
                            <div class="L-shaped-icon-container">
                                <span class="L-shaped-icon"></span>
                            </div>

                            <a class="site-link"
                               href="//careers.stackoverflow.com"
                               data-gps-track="site_switcher.click({ item_type:9 })"
                                    >
                                <div class="site-icon favicon favicon-careers" title="Stack Overflow Careers"></div>
                                Careers 2.0
                            </a>
                        </li>
                    </ul>
                </div>

                <div class="header" id="your-communities-header">
                    <h3>
                        your communities        </h3>

                </div>
                <div class="modal-content" id="your-communities-section">

                    <div class="call-to-login">
                        <a href="https://stackoverflow.com/users/signup?returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2ftagged%2fgroovy" class="js-gps-track"     data-gps-track="site_switcher.click({ item_type:10 })"
                                >Sign up</a>
                        or
                        <a href="https://stackoverflow.com/users/login?returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2ftagged%2fgroovy" class="js-gps-track"     data-gps-track="site_switcher.click({ item_type:11 })"
                                >log in</a>

                        to customize your list.
                    </div>
                </div>

                <div class="header">
                    <h3><a href="//stackexchange.com/sites">more stack exchange communities</a></h3>
                </div>
                <div class="modal-content">
                    <div class="child-content"></div>
                </div>
            </div>
        </div>

        <div class="network-items">

            <a href="//stackexchange.com"
               class="topbar-icon icon-site-switcher yes-hover js-site-switcher-button js-gps-track"
               data-gps-track="site_switcher.show"
               title="A list of all 123 Stack Exchange sites">
                <span class="hidden-text">Stack Exchange</span>
            </a>

        </div>

        <div class="topbar-links">

            <div class="links-container">
                    <span class="topbar-menu-links">
                            <a href="https://stackoverflow.com/users/signup?returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2ftagged%2fgroovy" class="login-link">sign up</a>
                            <a href="https://stackoverflow.com/users/login?returnurl=http%3a%2f%2fstackoverflow.com%2fquestions%2ftagged%2fgroovy" class="login-link">log in</a>
                            <a href="/tour">tour</a>

                            <a href="#" class="icon-help js-help-button" title="Help Center and other resources">
                                help
                                <span class="triangle"></span>
                            </a>
    <div class="topbar-dialog help-dialog js-help-dialog dno">
        <div class="modal-content">
            <ul>
                <li>
                    <a href="/tour"     class="js-gps-track" data-gps-track="help_popup.click({ item_type:1 })"
                            >
                        Tour
                        <span class="item-summary">
                            Start here for a quick overview of the site
                        </span>
                    </a>
                </li>
                <li>
                    <a href="/help"     class="js-gps-track" data-gps-track="help_popup.click({ item_type:4 })"
                            >
                        Help Center
                        <span class="item-summary">
                            Detailed answers to any questions you might have
                        </span>
                    </a>
                </li>
                <li>
                    <a href="//meta.stackoverflow.com"     class="js-gps-track" data-gps-track="help_popup.click({ item_type:2 })"
                            >
                        Meta
                            <span class="item-summary">
                                Discuss the workings and policies of this site
                            </span>
                    </a>
                </li>
            </ul>
        </div>
    </div>

                            <a href="//careers.stackoverflow.com">careers 2.0</a>
                    </span>
            </div>

            <div class="search-container">
                <form id="search" action="/search" method="get" autocomplete="off">
                    <input name="q" type="text" placeholder="search" value="[groovy]" tabindex="1" autocomplete="off" maxlength="240" />
                </form>
            </div>

        </div>
    </div>
</div>
<script>
    StackExchange.ready(function () {
        //topbar.init();
        StackExchange.topbar.init();
    });
</script>
<div class="container">
<div id="header" class=headeranon>
    <br class="cbt">
    <div id="hlogo">
        <a href="/">
            Stack Overflow
        </a>
    </div>
    <div id="hmenus">
        <div class="nav mainnavs mainnavsanon">
            <ul>
                <li class="youarehere"><a id="nav-questions" href="/questions">Questions</a></li>
                <li><a id="nav-tags" href="/tags">Tags</a></li>
                <li><a id="nav-tour" href="/about">Tour</a></li>
                <li><a id="nav-users" href="/users">Users</a></li>
            </ul>
        </div>
        <div class="nav askquestion">
            <ul>
                <li>
                    <a id="nav-askquestion"  href="/questions/ask">Ask Question</a>
                </li>
            </ul>
        </div>
    </div>
</div>




<div id="content">


<div id="mainbar">
<div class="subheader">
    <h1>Tagged Questions</h1>


    <div id="tabs">
        <a href="/tags/groovy/info" title="information about this tag">info</a>
        <a class="youarehere" href="/questions/tagged/groovy?sort=newest&pageSize=15" title="The most recently asked questions">newest</a>
        <a href="/questions/tagged/groovy?sort=featured&pageSize=15" title="Questions with open bounties">                <span class="bounty-indicator-tab">1</span>
            featured</a>
        <a href="/questions/tagged/groovy?sort=frequent&pageSize=15" title="Questions with the most links">frequent</a>
        <a href="/questions/tagged/groovy?sort=votes&pageSize=15" title="Questions with the most votes">votes</a>
        <a href="/questions/tagged/groovy?sort=active&pageSize=15" title="Questions that have recent activity">active</a>
        <a href="/questions/tagged/groovy?sort=unanswered&pageSize=15" title="Questions that have no upvoted answers">unanswered</a>
    </div>
</div>
<div class="question">
    <script>
        var ados = ados || {};ados.run = ados.run || [];
        ados.run.push(function() { ados_add_placement(22, 8277, "adzerk211256597", 56).setZone(739) ; });
    </script>
    <div class="everyonelovesstackoverflow" id="adzerk211256597">
    </div>

    <div class="welovestackoverflow" style="margin-top: 10px;">
        <div style="float: left;">
            <p>
                Groovy is an object-oriented, agile and dynamic language for the Java Virtual Machine. It builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby and Smalltalk.  It makes modern programming features available to Java developers with almost zero ...                         </p>
            <p style="margin-bottom: 0;">
                <a title="tag wiki" href="/tags/groovy/info">learn more&hellip;</a>
                <span class="lsep">|</span>
                <a title="top answerers and askers in this tag" href="/tags/groovy/topusers">top users</a>
                <span class="lsep">|</span>
                <a title="common, alternate spellings or phrasings for this tag" href="/tags/groovy/synonyms">synonyms</a>
            </p>
        </div>
    </div>

</div>
<div id="questions" class="content-padding">
<div class="question-summary" id="question-summary-23431152">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status unanswered">
                <strong>0</strong>answers
            </div>
        </div>
        <div class="views " title="6 views">
            6 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23431152/trim-domain-field-by-default" class="question-hyperlink">Trim domain field by default</a></h3>
        <div class="excerpt">
            What is the best way to trim field value in domain?

            My suggestion is to use beforeSave(), but would work something like this?

            class Book {

            String name = name?.trim()

            }


        </div>
        <div class="tags t-grails t-groovy">
            <a href="/questions/tagged/grails" class="post-tag" title="show questions tagged &#39;grails&#39;" rel="tag">grails</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 14:58:59Z" class="relativetime">1 hour ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1815058/baxxabit"><div><img src="https://www.gravatar.com/avatar/86ea4373c9642bd27135ae33439bde35?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1815058/baxxabit">baxxabit</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">718</span><span title="1 gold badge"><span class="badge1"></span><span class="badgecount">1</span></span><span title="6 silver badges"><span class="badge2"></span><span class="badgecount">6</span></span><span title="16 bronze badges"><span class="badge3"></span><span class="badgecount">16</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23428340">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status unanswered">
                <strong>0</strong>answers
            </div>
        </div>
        <div class="views " title="14 views">
            14 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23428340/get-testname-in-integration-test" class="question-hyperlink">Get testname in Integration test</a></h3>
        <div class="excerpt">
            In my grails integration test, how do I get the the currently executing test name?

            I want to do this for logging purposes.

        </div>
        <div class="tags t-grails t-groovy">
            <a href="/questions/tagged/grails" class="post-tag" title="show questions tagged &#39;grails&#39;" rel="tag">grails</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 12:35:27Z" class="relativetime">3 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1114773/more-than-five"><div><img src="https://www.gravatar.com/avatar/c8f06853a85fbcd16e776db98158675e?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1114773/more-than-five">More Than Five</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">928</span><span title="7 silver badges"><span class="badge2"></span><span class="badgecount">7</span></span><span title="23 bronze badges"><span class="badge3"></span><span class="badgecount">23</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23428000">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>1</strong></span>
                    <div class="viewcount">vote</div>
                </div>
            </div>
            <div class="status answered">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="18 views">
            18 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23428000/reusing-grails-variables-inside-config-groovy" class="question-hyperlink">Reusing Grails variables inside Config.groovy</a></h3>
        <div class="excerpt">
            In my Config.groovy I have:

            // Lots of other stuff up here...

            environments {
            development {
            myapp.port = 7500
            }
            production {
            myapp.port = 7600
            }
            }

            fizz {
            buzz {
            ...
        </div>
        <div class="tags t-grails t-groovy t-configuration">
            <a href="/questions/tagged/grails" class="post-tag" title="show questions tagged &#39;grails&#39;" rel="tag">grails</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a> <a href="/questions/tagged/configuration" class="post-tag" title="show questions tagged &#39;configuration&#39;" rel="tag">configuration</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 12:17:05Z" class="relativetime">3 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/3195065/adjustingforinflation"><div><img src="https://www.gravatar.com/avatar/82c1a4b37893b36f1a9c34e11ada3709?s=32&d=identicon&r=PG&f=1" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/3195065/adjustingforinflation">AdjustingForInflation</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">9</span><span title="8 bronze badges"><span class="badge3"></span><span class="badgecount">8</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23427266">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="12 views">
            12 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23427266/groovy-script-run-cli-command-win-xp" class="question-hyperlink">groovy script + run CLI command + WIN XP</a></h3>
        <div class="excerpt">
            I have the following command in my groovy script

            println "cmd /c remove_files.bat".execute().text


            Groovy runs the BAT file - remove_files.bat ,  but the BAT file stop on the question:

            do you ...
        </div>
        <div class="tags t-windows t-command-line t-groovy">
            <a href="/questions/tagged/windows" class="post-tag" title="show questions tagged &#39;windows&#39;" rel="tag">windows</a> <a href="/questions/tagged/command-line" class="post-tag" title="show questions tagged &#39;command-line&#39;" rel="tag">command-line</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 11:39:36Z" class="relativetime">4 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1121951/eytan"><div><img src="https://www.gravatar.com/avatar/8694acc16e1845d9598453d164c5068f?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1121951/eytan">Eytan</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">517</span><span title="1 gold badge"><span class="badge1"></span><span class="badgecount">1</span></span><span title="8 silver badges"><span class="badge2"></span><span class="badgecount">8</span></span><span title="21 bronze badges"><span class="badge3"></span><span class="badgecount">21</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23425495">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="15 views">
            15 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23425495/define-a-method-in-dsld-parameter-types" class="question-hyperlink">Define a method in DSLD (Parameter types)</a></h3>
        <div class="excerpt">
            I already have defined a DSL in Groovy. Now I'm working on the Eclipse integration so that I have auto completion and other fancy stuff.

            This doesn't work:

            method name:"myMethod", params : [param1: ...
        </div>
        <div class="tags t-eclipse t-groovy t-dsl t-dsld">
            <a href="/questions/tagged/eclipse" class="post-tag" title="show questions tagged &#39;eclipse&#39;" rel="tag">eclipse</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a> <a href="/questions/tagged/dsl" class="post-tag" title="show questions tagged &#39;dsl&#39;" rel="tag">dsl</a> <a href="/questions/tagged/dsld" class="post-tag" title="show questions tagged &#39;dsld&#39;" rel="tag">dsld</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 10:03:42Z" class="relativetime">6 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/3595743/morten-schwarzkopf"><div><img src="https://www.gravatar.com/avatar/9d4cd6059d6a31f30c392cf20b00dfe3?s=32&d=identicon&r=PG&f=1" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/3595743/morten-schwarzkopf">Morten Schwarzkopf</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">1</span><span title="1 bronze badge"><span class="badge3"></span><span class="badgecount">1</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23425096">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered">
                <strong>2</strong>answers
            </div>
        </div>
        <div class="views " title="22 views">
            22 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23425096/parsing-wikipedia-xml-dump-in-groovy" class="question-hyperlink">Parsing wikipedia xml dump in Groovy</a></h3>
        <div class="excerpt">
            recently I wanted to work on wikipedia data. In that case I downloaded its en-lang XML dump.
            It was over 44GB. I thought I would parse it with XmlSlurper that, according to documentation, is good ...
        </div>
        <div class="tags t-xml t-groovy">
            <a href="/questions/tagged/xml" class="post-tag" title="show questions tagged &#39;xml&#39;" rel="tag">xml</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 09:41:26Z" class="relativetime">6 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1131019/hexin"><div><img src="https://www.gravatar.com/avatar/4d77beb80183dff797b5e0ae8d8b9921?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1131019/hexin">hexin</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">70</span><span title="6 bronze badges"><span class="badge3"></span><span class="badgecount">6</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23424861">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="25 views">
            25 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23424861/pagination-on-a-arraylist" class="question-hyperlink">Pagination on a ArrayList</a></h3>
        <div class="excerpt">
            There are a lot of possibilities to make pagination with domain classes, but what about existing ArrayList of objects?

            Is it possible?

        </div>
        <div class="tags t-grails t-groovy">
            <a href="/questions/tagged/grails" class="post-tag" title="show questions tagged &#39;grails&#39;" rel="tag">grails</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 09:27:55Z" class="relativetime">6 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1815058/baxxabit"><div><img src="https://www.gravatar.com/avatar/86ea4373c9642bd27135ae33439bde35?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1815058/baxxabit">baxxabit</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">718</span><span title="1 gold badge"><span class="badge1"></span><span class="badgecount">1</span></span><span title="6 silver badges"><span class="badge2"></span><span class="badgecount">6</span></span><span title="16 bronze badges"><span class="badge3"></span><span class="badgecount">16</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23422999">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status unanswered">
                <strong>0</strong>answers
            </div>
        </div>
        <div class="views " title="8 views">
            8 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23422999/groovy-execute-process-hangs" class="question-hyperlink">Groovy execute process hangs</a></h3>
        <div class="excerpt">
            In a groovy script I execute an application on linux and windows with:

            def proc = command.execute()
            proc.consumeProcessOutput( System.out, System.err)
            println "here"
            proc.waitFor()
            println ...
        </div>
        <div class="tags t-groovy t-process">
            <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a> <a href="/questions/tagged/process" class="post-tag" title="show questions tagged &#39;process&#39;" rel="tag">process</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 07:30:04Z" class="relativetime">8 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/363603/u123"><div><img src="https://www.gravatar.com/avatar/f62630a57777bc90f2ec38f90f5eccfd?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/363603/u123">u123</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">941</span><span title="3 gold badges"><span class="badge1"></span><span class="badgecount">3</span></span><span title="33 silver badges"><span class="badge2"></span><span class="badgecount">33</span></span><span title="70 bronze badges"><span class="badge3"></span><span class="badgecount">70</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23422603">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>-2</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status unanswered">
                <strong>0</strong>answers
            </div>
        </div>
        <div class="views " title="22 views">
            22 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23422603/issue-in-saving-the-list-in-mongdb" class="question-hyperlink">Issue in saving the list in mongdb</a></h3>
        <div class="excerpt">
            Domain Class:
            class Questionairre {
            static hasMany = [Questions: String]
            }

            Controller Class:

            Map CONFIG_BOOK_COLUMN_MAP = [
            sheet:'Sheet1',
            startRow: 1,
            columnMap:  [
            ...
        </div>
        <div class="tags t-mongodb t-grails t-groovy">
            <a href="/questions/tagged/mongodb" class="post-tag" title="show questions tagged &#39;mongodb&#39;" rel="tag">mongodb</a> <a href="/questions/tagged/grails" class="post-tag" title="show questions tagged &#39;grails&#39;" rel="tag">grails</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-02 07:03:43Z" class="relativetime">9 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/3584616/user3584616"><div><img src="https://www.gravatar.com/avatar/7c1aab2bfe7d31a5e1b51a91c8295993?s=32&d=identicon&r=PG&f=1" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/3584616/user3584616">user3584616</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">1</span><span title="2 bronze badges"><span class="badge3"></span><span class="badgecount">2</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23419237">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered-accepted">
                <strong>2</strong>answers
            </div>
        </div>
        <div class="views " title="31 views">
            31 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23419237/how-to-test-that-a-created-value-is-unique" class="question-hyperlink">How to test that a created value is unique?</a></h3>
        <div class="excerpt">
            In my Java class I have a method that creates an object and implements certain logic to assign random values to some of its variables, using one static instance of Random (static Random rn = new ...
        </div>
        <div class="tags t-java t-unit-testing t-groovy t-spock">
            <a href="/questions/tagged/java" class="post-tag" title="show questions tagged &#39;java&#39;" rel="tag">java</a> <a href="/questions/tagged/unit-testing" class="post-tag" title="show questions tagged &#39;unit-testing&#39;" rel="tag">unit-testing</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a> <a href="/questions/tagged/spock" class="post-tag" title="show questions tagged &#39;spock&#39;" rel="tag">spock</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info user-hover">
                <div class="user-action-time">
                    asked <span title="2014-05-02 01:08:53Z" class="relativetime">15 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/2055998/pm-77-1"><div class="gravatar-wrapper-32"><img src="http://i.stack.imgur.com/2Vx3A.jpg?s=32&g=1" alt=""></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/2055998/pm-77-1">PM 77-1</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">3,351</span><span title="3 gold badges"><span class="badge1"></span><span class="badgecount">3</span></span><span title="12 silver badges"><span class="badge2"></span><span class="badgecount">12</span></span><span title="32 bronze badges"><span class="badge3"></span><span class="badgecount">32</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23418386">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status unanswered">
                <strong>0</strong>answers
            </div>
        </div>
        <div class="views " title="23 views">
            23 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23418386/how-can-a-grails-plugin-modify-the-apps-default-mappings-constraints-config" class="question-hyperlink">How can a Grails plugin modify the app&#39;s default mappings/constraints config?</a></h3>
        <div class="excerpt">
            I'm creating a Grails plugin which will modify the value of the following config property:

            grails.gorm.default.constraints


            The problem is that by the time my plugin descriptor starts running ...
        </div>
        <div class="tags t-grails t-plugins t-groovy t-grails-plugin t-grails-config">
            <a href="/questions/tagged/grails" class="post-tag" title="show questions tagged &#39;grails&#39;" rel="tag">grails</a> <a href="/questions/tagged/plugins" class="post-tag" title="show questions tagged &#39;plugins&#39;" rel="tag">plugins</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a> <a href="/questions/tagged/grails-plugin" class="post-tag" title="show questions tagged &#39;grails-plugin&#39;" rel="tag">grails-plugin</a> <a href="/questions/tagged/grails-config" class="post-tag" title="show questions tagged &#39;grails-config&#39;" rel="tag">grails-config</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-01 23:26:11Z" class="relativetime">16 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/563133/vahid-pazirandeh"><div><img src="https://www.gravatar.com/avatar/a9851496fe108c330acc2c0f1c452e80?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/563133/vahid-pazirandeh">Vahid Pazirandeh</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">100</span><span title="1 silver badge"><span class="badge2"></span><span class="badgecount">1</span></span><span title="6 bronze badges"><span class="badge3"></span><span class="badgecount">6</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23417367">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="12 views">
            12 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23417367/soap-ui-split-http-response-header-and-transfer-to-property" class="question-hyperlink">SOAP UI - Split HTTP Response Header and transfer to property</a></h3>
        <div class="excerpt">
            I am obtaining the following response to a HTTP Request in SOAP UI

            TTP/1.1 201 Created
            X-Content-Type-Options: nosniff
            X-XSS-Protection: 1; mode=block
            Cache-Control: no-cache, no-store, max-age=0, ...
        </div>
        <div class="tags t-soap t-groovy t-http-headers t-soapui">
            <a href="/questions/tagged/soap" class="post-tag" title="show questions tagged &#39;soap&#39;" rel="tag">soap</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a> <a href="/questions/tagged/http-headers" class="post-tag" title="show questions tagged &#39;http-headers&#39;" rel="tag">http-headers</a> <a href="/questions/tagged/soapui" class="post-tag" title="show questions tagged &#39;soapui&#39;" rel="tag">soapui</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info user-hover">
                <div class="user-action-time">
                    asked <span title="2014-05-01 21:59:11Z" class="relativetime">18 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1981328/sasanka-panguluri"><div><img src="https://www.gravatar.com/avatar/24a0259e1d909df019c1787814769e76?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1981328/sasanka-panguluri">Sasanka Panguluri</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">1,120</span><span title="4 silver badges"><span class="badge2"></span><span class="badgecount">4</span></span><span title="15 bronze badges"><span class="badge3"></span><span class="badgecount">15</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23413668">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>-1</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status unanswered">
                <strong>0</strong>answers
            </div>
        </div>
        <div class="views " title="29 views">
            29 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23413668/how-to-run-expect-from-groovy-script" class="question-hyperlink">how to run expect from groovy script</a></h3>
        <div class="excerpt">
            First I am very new in groovy

            I am trying to learn how groovy can work with expect

            so I take this groovy script “nslookup in interactive mode to test a DNS server”

            from the link below

            ...
        </div>
        <div class="tags t-windows t-groovy t-expect">
            <a href="/questions/tagged/windows" class="post-tag" title="show questions tagged &#39;windows&#39;" rel="tag">windows</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a> <a href="/questions/tagged/expect" class="post-tag" title="show questions tagged &#39;expect&#39;" rel="tag">expect</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-01 18:05:05Z" class="relativetime">22 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/1121951/eytan"><div><img src="https://www.gravatar.com/avatar/8694acc16e1845d9598453d164c5068f?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/1121951/eytan">Eytan</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">517</span><span title="1 gold badge"><span class="badge1"></span><span class="badgecount">1</span></span><span title="8 silver badges"><span class="badge2"></span><span class="badgecount">8</span></span><span title="21 bronze badges"><span class="badge3"></span><span class="badgecount">21</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23412992">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status answered-accepted">
                <strong>1</strong>answer
            </div>
        </div>
        <div class="views " title="24 views">
            24 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23412992/pass-a-list-as-an-argument-to-groovy-buildersupport-createnode" class="question-hyperlink">Pass a list as an argument to Groovy BuilderSupport createNode</a></h3>
        <div class="excerpt">
            I have a Groovy class that creates another classes dynamically:

            package javainterop3

            import groovy.lang.Closure;
            import groovy.lang.GroovyClassLoader;

            class DynamicClass {

            GroovyClassLoader ...
        </div>
        <div class="tags t-java t-design-patterns t-groovy">
            <a href="/questions/tagged/java" class="post-tag" title="show questions tagged &#39;java&#39;" rel="tag">java</a> <a href="/questions/tagged/design-patterns" class="post-tag" title="show questions tagged &#39;design-patterns&#39;" rel="tag">design-patterns</a> <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-01 17:27:11Z" class="relativetime">22 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/3284680/uros-calakovic"><div><img src="https://www.gravatar.com/avatar/ae87eed80be1257f7b0804d08009f257?s=32&d=identicon&r=PG&f=1" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/3284680/uros-calakovic">uros calakovic</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">24</span><span title="5 bronze badges"><span class="badge3"></span><span class="badgecount">5</span></span>
                </div>
            </div>
        </div>
    </div>
</div><div class="question-summary" id="question-summary-23412359">
    <div class="statscontainer">
        <div class="statsarrow"></div>
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post "><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>
            <div class="status unanswered">
                <strong>0</strong>answers
            </div>
        </div>
        <div class="views " title="8 views">
            8 views
        </div>
    </div>
    <div class="summary">
        <h3><a href="/questions/23412359/groovy-how-to-call-a-restful-web-service-with-post-method-if-i-have-endpoint" class="question-hyperlink">Groovy: How to call a restful web service with post method , if I have endpoint, path and xml as argument</a></h3>
        <div class="excerpt">
            I have tried hard to access the service but couldn't get. The uri is a secure one.

            a end point/URI https://www.localhost:8080/test

            Method Path: login/new session
            and XML argument:
            123xxx

        </div>
        <div class="tags t-groovy t-groovy-console t-groovyws">
            <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a> <a href="/questions/tagged/groovy-console" class="post-tag" title="show questions tagged &#39;groovy-console&#39;" rel="tag">groovy-console</a> <a href="/questions/tagged/groovyws" class="post-tag" title="show questions tagged &#39;groovyws&#39;" rel="tag">groovyws</a>

            <div class="post-menu">
            </div>
        </div>
        <div class="started fr">
            <div class="user-info ">
                <div class="user-action-time">
                    asked <span title="2014-05-01 16:49:50Z" class="relativetime">23 hours ago</span>
                </div>
                <div class="user-gravatar32">
                    <a href="/users/2355711/user2355711"><div><img src="https://www.gravatar.com/avatar/6ac02de1602e8d6c83fc1d5f0926490a?s=32&d=identicon&r=PG" alt="" width="32" height="32"></div></a>
                </div>
                <div class="user-details">
                    <a href="/users/2355711/user2355711">user2355711</a><br>
                    <span class="reputation-score" title="reputation score " dir="ltr">1</span>
                </div>
            </div>
        </div>
    </div>
</div>
</div>

<br class="cbt" />
<div class="pager fl">





    <span class="page-numbers current">1</span>         <a href="/questions/tagged/groovy?page=2&amp;sort=newest&amp;pagesize=15" title="go to page 2"> <span class="page-numbers">2</span> </a>
    <a href="/questions/tagged/groovy?page=3&amp;sort=newest&amp;pagesize=15" title="go to page 3"> <span class="page-numbers">3</span> </a>
    <a href="/questions/tagged/groovy?page=4&amp;sort=newest&amp;pagesize=15" title="go to page 4"> <span class="page-numbers">4</span> </a>
    <a href="/questions/tagged/groovy?page=5&amp;sort=newest&amp;pagesize=15" title="go to page 5"> <span class="page-numbers">5</span> </a>
    <span class="page-numbers dots">…</span>         <a href="/questions/tagged/groovy?page=568&amp;sort=newest&amp;pagesize=15" title="go to page 568"> <span class="page-numbers">568</span> </a>
    <a href="/questions/tagged/groovy?page=2&amp;sort=newest&amp;pagesize=15" rel="next" title="go to page 2"> <span class="page-numbers next"> next</span> </a>

</div>

<div class="page-sizer fr">
    <a href="/questions/tagged/groovy?sort=newest&pagesize=15" title="show 15 items per page" class="page-numbers current">15</a>
    <a href="/questions/tagged/groovy?sort=newest&pagesize=30" title="show 30 items per page" class="page-numbers ">30</a>
    <a href="/questions/tagged/groovy?sort=newest&pagesize=50" title="show 50 items per page" class="page-numbers ">50</a>
    <span class="page-numbers desc">per page</span>
</div>
<div id="feed-link">
    <div id="feed-link-text">
        <a href="/feeds/tag?tagnames=groovy&sort=newest" title="the 30 newest groovy questions">
            <span class="feed-icon"></span>newest groovy questions feed
        </a>
    </div>
</div>
</div>
<div id="sidebar">
<div class="module">
    <div class="summarycount al">8,510</div>
    <p>questions tagged</p>
    <div class="tagged">
        <a href="/questions/tagged/groovy" class="post-tag" title="show questions tagged &#39;groovy&#39;" rel="tag">groovy</a>
        <a style='margin-left:10px;' title='tag wiki, stats and faq' href='/tags/groovy/info'>about&nbsp;&raquo;</a>            </div>
</div>


<script>
    var ados = ados || {};ados.run = ados.run || [];
    ados.run.push(function() { ados_add_placement(22,8277,"adzerk345212285",17).setZone(45) ; });
</script>
<div class="everyonelovesstackoverflow" id="adzerk345212285">
</div>
<div id="hireme">
    <script>
        window.careers_adurl="//careers.stackoverflow.com/gethired/js",window.careers_cssurl="//cdn-careers.sstatic.net/careers/gethired/sidebar.min.css?v=c886aec35a12",window.careers_leaderboardcssurl="{leaderboardcssurl}",window.careers_companycssurl="//cdn-careers.sstatic.net/careers/gethired/company",window.careers_adselector="div#hireme",StackExchange.ready(function(){$.ajax({url:"//cdn-careers.sstatic.net/careers/gethired/loader.min.js?v=ffc1e27a5763",dataType:"script",cache:!0})});        </script>
</div>


<div class="module js-gps-related-tags">

    <h4 id="h-related-tags">Related Tags</h4>
    <div>
        <a href="/questions/tagged/groovy+grails" class="post-tag" title="show questions tagged &#39;groovy grails&#39;" rel="tag">grails</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">2859</span></span>
    </div>
    <div>
        <a href="/questions/tagged/groovy+java" class="post-tag" title="show questions tagged &#39;groovy java&#39;" rel="tag">java</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">1554</span></span>
    </div>
    <div>
        <a href="/questions/tagged/groovy+xml" class="post-tag" title="show questions tagged &#39;groovy xml&#39;" rel="tag">xml</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">303</span></span>
    </div>
    <div>
        <a href="/questions/tagged/groovy+gradle" class="post-tag" title="show questions tagged &#39;groovy gradle&#39;" rel="tag">gradle</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">288</span></span>
    </div>
    <div>
        <a href="/questions/tagged/groovy+gorm" class="post-tag" title="show questions tagged &#39;groovy gorm&#39;" rel="tag">gorm</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">264</span></span>
    </div>
    <div>
        <a href="/questions/tagged/groovy+eclipse" class="post-tag" title="show questions tagged &#39;groovy eclipse&#39;" rel="tag">eclipse</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">225</span></span>
    </div>
    <div>
        <a href="/questions/tagged/groovy+soapui" class="post-tag" title="show questions tagged &#39;groovy soapui&#39;" rel="tag">soapui</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">221</span></span>
    </div>
    <div>
        <a href="/questions/tagged/groovy+unit-testing" class="post-tag" title="show questions tagged &#39;groovy unit-testing&#39;" rel="tag">unit-testing</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">170</span></span>
    </div>
    <div>
        <a href="/questions/tagged/groovy+spock" class="post-tag" title="show questions tagged &#39;groovy spock&#39;" rel="tag">spock</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">167</span></span>
    </div>
    <div>
        <a href="/questions/tagged/groovy+closures" class="post-tag" title="show questions tagged &#39;groovy closures&#39;" rel="tag">closures</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">166</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+hibernate" class="post-tag" title="show questions tagged &#39;groovy hibernate&#39;" rel="tag">hibernate</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">165</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+spring" class="post-tag" title="show questions tagged &#39;groovy spring&#39;" rel="tag">spring</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">159</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+regex" class="post-tag" title="show questions tagged &#39;groovy regex&#39;" rel="tag">regex</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">151</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+json" class="post-tag" title="show questions tagged &#39;groovy json&#39;" rel="tag">json</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">143</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+jenkins" class="post-tag" title="show questions tagged &#39;groovy jenkins&#39;" rel="tag">jenkins</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">130</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+maven" class="post-tag" title="show questions tagged &#39;groovy maven&#39;" rel="tag">maven</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">128</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+sql" class="post-tag" title="show questions tagged &#39;groovy sql&#39;" rel="tag">sql</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">123</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+intellij-idea" class="post-tag" title="show questions tagged &#39;groovy intellij-idea&#39;" rel="tag">intellij-idea</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">119</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+gsp" class="post-tag" title="show questions tagged &#39;groovy gsp&#39;" rel="tag">gsp</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">117</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+geb" class="post-tag" title="show questions tagged &#39;groovy geb&#39;" rel="tag">geb</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">98</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+string" class="post-tag" title="show questions tagged &#39;groovy string&#39;" rel="tag">string</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">96</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+metaprogramming" class="post-tag" title="show questions tagged &#39;groovy metaprogramming&#39;" rel="tag">metaprogramming</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">95</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+xmlslurper" class="post-tag" title="show questions tagged &#39;groovy xmlslurper&#39;" rel="tag">xmlslurper</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">95</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+ant" class="post-tag" title="show questions tagged &#39;groovy ant&#39;" rel="tag">ant</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">86</span></span>
    </div>
    <div class="dno js-hidden">
        <a href="/questions/tagged/groovy+list" class="post-tag" title="show questions tagged &#39;groovy list&#39;" rel="tag">list</a>&nbsp;<span class="item-multiplier"><span class="item-multiplier-x">&times;</span>&nbsp;<span class="item-multiplier-count">85</span></span>
    </div>
    <a href="#"
       class="show-more js-show-more js-gps-track"
       data-gps-track="related_tags.click({ item_type:2 })">
        more related tags
    </a>
    <script>
        StackExchange.ready(function () {
            var $div = $('#h-related-tags').parent();
            $div.find('.js-show-more').click(function () {
                $div.find('.js-hidden').show();
                $(this).remove();
                return false;
            });
        });
    </script>

</div>


<div id="hot-network-questions" class="module">
    <h4>
        <a href="//stackexchange.com/questions?tab=hot"
           class="js-gps-track"
           data-gps-track="posts_hot_network.click({ item_type:1, location:9 })">
            Hot Network Questions
        </a>
    </h4>
    <ul>
        <li >
            <div class="favicon favicon-stackoverflow" title="Stack Overflow"></div><a href="http://stackoverflow.com/questions/23430296/how-do-i-create-a-user-defined-literal-for-a-signed-integer-type" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:1 }); posts_hot_network.click({ item_type:2, location:9 })">
            How do I create a user-defined literal for a signed integer type?
        </a>

        </li>
        <li >
            <div class="favicon favicon-matheducators" title="Mathematics Educators Stack Exchange"></div><a href="http://matheducators.stackexchange.com/questions/2060/how-is-calculus-helpful-for-biology-majors" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:548 }); posts_hot_network.click({ item_type:2, location:9 })">
            How is calculus helpful for biology majors?
        </a>

        </li>
        <li >
            <div class="favicon favicon-biology" title="Biology Stack Exchange"></div><a href="http://biology.stackexchange.com/questions/17077/why-evolution-does-not-make-our-life-longer" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:375 }); posts_hot_network.click({ item_type:2, location:9 })">
            Why evolution does not make our life longer?
        </a>

        </li>
        <li >
            <div class="favicon favicon-tex" title="TeX - LaTeX Stack Exchange"></div><a href="http://tex.stackexchange.com/questions/174833/running-numbers-for-comments" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:85 }); posts_hot_network.click({ item_type:2, location:9 })">
            Running numbers for comments
        </a>

        </li>
        <li >
            <div class="favicon favicon-stats" title="Cross Validated"></div><a href="http://stats.stackexchange.com/questions/96042/regression-how-do-i-know-if-my-residuals-are-normally-distributed" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:65 }); posts_hot_network.click({ item_type:2, location:9 })">
            Regression - How do I know if my residuals are normally distributed?
        </a>

        </li>
        <li >
            <div class="favicon favicon-codegolf" title="Programming Puzzles &amp; Code Golf Stack Exchange"></div><a href="http://codegolf.stackexchange.com/questions/26323/how-slow-is-python-really-or-how-fast-is-your-language" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:200 }); posts_hot_network.click({ item_type:2, location:9 })">
            How slow is python really? (Or how fast is your language?)
        </a>

        </li>
        <li >
            <div class="favicon favicon-android" title="Android Enthusiasts Stack Exchange"></div><a href="http://android.stackexchange.com/questions/68611/replacement-for-ability-to-send-tab-to-remote-device-as-removed-from-firefox-2" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:139 }); posts_hot_network.click({ item_type:2, location:9 })">
            Replacement for ability to &quot;send tab to remote device&quot; as removed from Firefox 29
        </a>

        </li>
        <li >
            <div class="favicon favicon-academia" title="Academia Stack Exchange"></div><a href="http://academia.stackexchange.com/questions/20139/what-can-i-do-if-my-supervisor-does-not-publish-my-research-results" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:415 }); posts_hot_network.click({ item_type:2, location:9 })">
            What can I do if my supervisor does not publish my research results?
        </a>

        </li>
        <li >
            <div class="favicon favicon-programmers" title="Programmers Stack Exchange"></div><a href="http://programmers.stackexchange.com/questions/237697/if-null-is-evil-and-it-is-why-do-modern-languages-implement-it" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:131 }); posts_hot_network.click({ item_type:2, location:9 })">
            If null is evil (and it is) why do modern languages implement it?
        </a>

        </li>
        <li >
            <div class="favicon favicon-joomla" title="Joomla Stack Exchange"></div><a href="http://joomla.stackexchange.com/questions/541/table-marked-as-crashed-and-repair-failed" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:555 }); posts_hot_network.click({ item_type:2, location:9 })">
            Table marked as crashed and repair failed
        </a>

        </li>
        <li >
            <div class="favicon favicon-askubuntu" title="Ask Ubuntu"></div><a href="http://askubuntu.com/questions/459402/how-to-know-running-platform-is-ubuntu-or-centos-with-help-of-bash-script" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:89 }); posts_hot_network.click({ item_type:2, location:9 })">
            How to know running platform is Ubuntu or Centos with help of bash script ?
        </a>

        </li>
        <li >
            <div class="favicon favicon-academia" title="Academia Stack Exchange"></div><a href="http://academia.stackexchange.com/questions/20084/is-using-the-phrase-is-left-as-an-exercise-for-the-reader-considered-good" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:415 }); posts_hot_network.click({ item_type:2, location:9 })">
            Is using the phrase &quot;... is left as an exercise for the reader&quot; considered good style in academic papers/theses?
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-physics" title="Physics Stack Exchange"></div><a href="http://physics.stackexchange.com/questions/110910/why-does-the-water-in-a-powerade-bottle-tastes-a-little-like-powerade-after-many" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:151 }); posts_hot_network.click({ item_type:2, location:9 })">
            Why does the water in a Powerade bottle tastes a little like Powerade after many refills?
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-gamedev" title="Game Development Stack Exchange"></div><a href="http://gamedev.stackexchange.com/questions/74196/why-is-an-engine-like-unity3d-emphasized-over-a-native-library-like-opengl-for-b" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:53 }); posts_hot_network.click({ item_type:2, location:9 })">
            Why is an engine like Unity3D emphasized over a native library like OpenGL for beginners?
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-english" title="English Language &amp; Usage Stack Exchange"></div><a href="http://english.stackexchange.com/questions/167104/singular-of-dice" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:97 }); posts_hot_network.click({ item_type:2, location:9 })">
            Singular of &quot;dice&quot;
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-mathoverflow" title="MathOverflow"></div><a href="http://mathoverflow.net/questions/164959/how-do-i-verify-the-coq-proof-of-feit-thompson" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:504 }); posts_hot_network.click({ item_type:2, location:9 })">
            How do I verify the Coq proof of Feit-Thompson?
        </a>

        </li>
        <li class="dno js-hidden">
            <div class="favicon favicon-salesforce" title="Salesforce Stack Exchange"></div><a href="http://salesforce.stackexchange.com/questions/34249/code-execution-does-not-stop-even-after-an-excepton-thrown-any-suggestions" class="js-gps-track" data-gps-track="site.switch({ item_type:9, target_site:459 }); posts_hot_network.click({ item_type:2, location:9 })">
            Code execution does not stop even after an excepton thro
Download .txt
gitextract_nam_xqsx/

├── .gitignore
├── README.md
├── pom.xml
└── src/
    └── test/
        ├── java/
        │   └── com/
        │       └── nurkiewicz/
        │           └── reactive/
        │               ├── S00_About.java
        │               ├── S01_Introduction.java
        │               ├── S02_Creating.java
        │               ├── S03_Map.java
        │               ├── S04_FlatMap.java
        │               ├── S05_Zip.java
        │               ├── S06_AllAny.java
        │               ├── S07_AsyncCallback.java
        │               ├── S08_ErrorHandling.java
        │               ├── S09_Promises.java
        │               ├── S10_AsyncHttp.java
        │               ├── S11_Cancelling.java
        │               ├── S12_RxJava.java
        │               ├── stackoverflow/
        │               │   ├── ArtificialSleepWrapper.java
        │               │   ├── FallbackStubClient.java
        │               │   ├── HttpStackOverflowClient.java
        │               │   ├── InjectErrorsWrapper.java
        │               │   ├── LoadFromStackOverflowTask.java
        │               │   ├── LoggingWrapper.java
        │               │   ├── Question.java
        │               │   └── StackOverflowClient.java
        │               └── util/
        │                   ├── AbstractFuturesTest.java
        │                   ├── Futures.java
        │                   └── InterruptibleTask.java
        └── resources/
            ├── clojure-questions.html
            ├── groovy-questions.html
            ├── java-questions.html
            ├── logback-test.xml
            ├── scala-questions.html
            └── twitter4j.properties
Download .txt
SYMBOL INDEX (100 symbols across 24 files)

FILE: src/test/java/com/nurkiewicz/reactive/S00_About.java
  class S00_About (line 14) | public class S00_About {

FILE: src/test/java/com/nurkiewicz/reactive/S01_Introduction.java
  class S01_Introduction (line 12) | public class S01_Introduction extends AbstractFuturesTest {
    method blockingCall (line 19) | @Test
    method executorService (line 25) | @Test
    method waitForFirstOrAll (line 37) | @Test
    method findQuestionsAbout (line 45) | private Future<String> findQuestionsAbout(String tag) {

FILE: src/test/java/com/nurkiewicz/reactive/S02_Creating.java
  class S02_Creating (line 10) | public class S02_Creating extends AbstractFuturesTest {
    method completed (line 17) | @Test
    method supplyAsync (line 28) | @Test
    method supplyAsyncWithCustomExecutor (line 40) | @Test

FILE: src/test/java/com/nurkiewicz/reactive/S03_Map.java
  class S03_Map (line 12) | public class S03_Map extends AbstractFuturesTest {
    method oldSchool (line 16) | @Test
    method callbacksCallbacksEverywhere (line 35) | @Test
    method thenApply (line 47) | @Test
    method thenApplyChained (line 68) | @Test

FILE: src/test/java/com/nurkiewicz/reactive/S04_FlatMap.java
  class S04_FlatMap (line 13) | public class S04_FlatMap extends AbstractFuturesTest {
    method thenApplyIsWrong (line 17) | @Test
    method thenAcceptIsPoor (line 25) | @Test
    method thenCompose (line 42) | @Test
    method chained (line 64) | @Test
    method javaQuestions (line 79) | private CompletableFuture<Document> javaQuestions() {
    method findMostInterestingQuestion (line 86) | private CompletableFuture<Question> findMostInterestingQuestion(Docume...
    method googleAnswer (line 90) | private CompletableFuture<String> googleAnswer(Question q) {
    method postAnswer (line 94) | private CompletableFuture<Integer> postAnswer(String answer) {

FILE: src/test/java/com/nurkiewicz/reactive/S05_Zip.java
  class S05_Zip (line 10) | public class S05_Zip extends AbstractFuturesTest {
    method thenCombine (line 14) | @Test
    method either (line 27) | @Test

FILE: src/test/java/com/nurkiewicz/reactive/S06_AllAny.java
  class S06_AllAny (line 11) | public class S06_AllAny extends AbstractFuturesTest {
    method allOf (line 15) | @Test
    method anyOf (line 39) | @Test

FILE: src/test/java/com/nurkiewicz/reactive/S07_AsyncCallback.java
  class S07_AsyncCallback (line 12) | public class S07_AsyncCallback extends AbstractFuturesTest {
    method whichThreadInvokesCallbacks (line 23) | @Test

FILE: src/test/java/com/nurkiewicz/reactive/S08_ErrorHandling.java
  class S08_ErrorHandling (line 10) | public class S08_ErrorHandling extends AbstractFuturesTest {
    method exceptionsShortCircuitFuture (line 14) | @Test
    method handleExceptions (line 25) | @Test
    method shouldHandleExceptionally (line 44) | @Test

FILE: src/test/java/com/nurkiewicz/reactive/S09_Promises.java
  class S09_Promises (line 15) | public class S09_Promises extends AbstractFuturesTest {
    method never (line 27) | public static <T> CompletableFuture<T> never() {
    method timeoutAfter (line 31) | public static <T> CompletableFuture<T> timeoutAfter(

FILE: src/test/java/com/nurkiewicz/reactive/S10_AsyncHttp.java
  class S10_AsyncHttp (line 17) | public class S10_AsyncHttp extends AbstractFuturesTest {
    method closeClient (line 23) | @AfterClass
    method asyncHttpWithCallbacks (line 28) | @Test
    method loadTag (line 38) | public void loadTag(
    method loadTag (line 61) | public CompletableFuture<String> loadTag(String tag) throws IOException {

FILE: src/test/java/com/nurkiewicz/reactive/S11_Cancelling.java
  class S11_Cancelling (line 12) | public class S11_Cancelling extends AbstractFuturesTest {
    method init (line 16) | @BeforeClass
    method close (line 21) | @AfterClass
    method shouldCancelFuture (line 26) | @Test
    method shouldCancelCompletableFuture (line 40) | @Ignore("Fails with CompletableFuture")

FILE: src/test/java/com/nurkiewicz/reactive/S12_RxJava.java
  class S12_RxJava (line 14) | public class S12_RxJava extends AbstractFuturesTest {
    method shouldConvertCompletedFutureToCompletedObservable (line 18) | @Test
    method shouldConvertFailedFutureIntoObservableWithFailure (line 30) | @Test
    method shouldConvertObservableWithManyItemsToFutureOfList (line 47) | @Test
    method shouldConvertObservableWithSingleItemToFuture (line 59) | @Test
    method failedFuture (line 71) | <T> CompletableFuture<T> failedFuture(Exception error) {

FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/ArtificialSleepWrapper.java
  class ArtificialSleepWrapper (line 8) | public class ArtificialSleepWrapper implements StackOverflowClient {
    method ArtificialSleepWrapper (line 14) | public ArtificialSleepWrapper(StackOverflowClient target) {
    method mostRecentQuestionAbout (line 18) | @Override
    method mostRecentQuestionsAbout (line 26) | @Override
    method artificialSleep (line 35) | protected static void artificialSleep(long expected) {

FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/FallbackStubClient.java
  class FallbackStubClient (line 13) | public class FallbackStubClient implements StackOverflowClient {
    method FallbackStubClient (line 19) | public FallbackStubClient(StackOverflowClient target) {
    method mostRecentQuestionAbout (line 23) | @Override
    method mostRecentQuestionsAbout (line 44) | @Override
    method loadStubHtmlFromDisk (line 54) | private Document loadStubHtmlFromDisk(String tag) {

FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/HttpStackOverflowClient.java
  class HttpStackOverflowClient (line 9) | public class HttpStackOverflowClient implements StackOverflowClient {
    method mostRecentQuestionAbout (line 11) | @Override
    method mostRecentQuestionsAbout (line 16) | @Override
    method fetchTitleOnline (line 27) | private String fetchTitleOnline(String tag) {

FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/InjectErrorsWrapper.java
  class InjectErrorsWrapper (line 11) | public class InjectErrorsWrapper implements StackOverflowClient {
    method InjectErrorsWrapper (line 18) | public InjectErrorsWrapper(StackOverflowClient target, String... black...
    method mostRecentQuestionAbout (line 23) | @Override
    method mostRecentQuestionsAbout (line 29) | @Override
    method throwIfBlackListed (line 35) | private void throwIfBlackListed(String tag) {

FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/LoadFromStackOverflowTask.java
  class LoadFromStackOverflowTask (line 8) | public class LoadFromStackOverflowTask implements Callable<String> {
    method LoadFromStackOverflowTask (line 15) | public LoadFromStackOverflowTask(StackOverflowClient client, String ta...
    method call (line 20) | @Override

FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/LoggingWrapper.java
  class LoggingWrapper (line 10) | public class LoggingWrapper implements StackOverflowClient {
    method LoggingWrapper (line 16) | public LoggingWrapper(StackOverflowClient target) {
    method mostRecentQuestionAbout (line 20) | @Override
    method mostRecentQuestionsAbout (line 28) | @Override
    method htmlExcerpt (line 38) | private String htmlExcerpt(Document document) {

FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/Question.java
  class Question (line 3) | public class Question {

FILE: src/test/java/com/nurkiewicz/reactive/stackoverflow/StackOverflowClient.java
  type StackOverflowClient (line 5) | public interface StackOverflowClient {
    method mostRecentQuestionAbout (line 7) | String mostRecentQuestionAbout(String tag);
    method mostRecentQuestionsAbout (line 8) | Document mostRecentQuestionsAbout(String tag);

FILE: src/test/java/com/nurkiewicz/reactive/util/AbstractFuturesTest.java
  class AbstractFuturesTest (line 14) | public class AbstractFuturesTest {
    method threadFactory (line 23) | protected ThreadFactory threadFactory(String nameFormat) {
    method logTestStart (line 37) | @Before
    method stopPool (line 42) | @After
    method questions (line 48) | protected CompletableFuture<String> questions(String tag) {

FILE: src/test/java/com/nurkiewicz/reactive/util/Futures.java
  class Futures (line 8) | public class Futures {
    method fromSingleObservable (line 10) | public static <T> CompletableFuture<T> fromSingleObservable(Observable...
    method fromObservable (line 19) | public static <T> CompletableFuture<List<T>> fromObservable(Observable...
    method toObservable (line 28) | public static <T> Observable<T> toObservable(CompletableFuture<T> futu...

FILE: src/test/java/com/nurkiewicz/reactive/util/InterruptibleTask.java
  class InterruptibleTask (line 8) | public class InterruptibleTask implements Runnable, Supplier<Void> {
    method get (line 13) | @Override
    method run (line 19) | @Override
    method blockUntilStarted (line 29) | public void blockUntilStarted() throws InterruptedException {
    method blockUntilInterrupted (line 33) | public void blockUntilInterrupted() throws InterruptedException, Timeo...
Condensed preview — 33 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (512K chars).
[
  {
    "path": ".gitignore",
    "chars": 25,
    "preview": "target\n.idea\n*.iml\n.idea\n"
  },
  {
    "path": "README.md",
    "chars": 407,
    "preview": "# CompletableFuture in Java 8 - asynchronous processing done right\n\n## Tomasz Nurkiewicz\n\nTwitter: [@tnurkiewicz](https:"
  },
  {
    "path": "pom.xml",
    "chars": 2874,
    "preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocat"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S00_About.java",
    "chars": 204,
    "preview": "package com.nurkiewicz.reactive;\n\n/**\n *\n * Tomasz Nurkiewicz\n *\n * @tnurkiewicz | @4financeit\n *\n * www.nurkiewicz.com\n"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S01_Introduction.java",
    "chars": 1424,
    "preview": "package com.nurkiewicz.reactive;\n\nimport com.nurkiewicz.reactive.stackoverflow.LoadFromStackOverflowTask;\nimport com.nur"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S02_Creating.java",
    "chars": 1198,
    "preview": "package com.nurkiewicz.reactive;\n\nimport com.nurkiewicz.reactive.util.AbstractFuturesTest;\nimport org.junit.Test;\nimport"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S03_Map.java",
    "chars": 2247,
    "preview": "package com.nurkiewicz.reactive;\n\nimport com.nurkiewicz.reactive.util.AbstractFuturesTest;\nimport org.jsoup.nodes.Docume"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S04_FlatMap.java",
    "chars": 2750,
    "preview": "package com.nurkiewicz.reactive;\n\nimport com.nurkiewicz.reactive.stackoverflow.Question;\nimport com.nurkiewicz.reactive."
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S05_Zip.java",
    "chars": 1105,
    "preview": "package com.nurkiewicz.reactive;\n\nimport com.nurkiewicz.reactive.util.AbstractFuturesTest;\nimport org.junit.Test;\nimport"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S06_AllAny.java",
    "chars": 1647,
    "preview": "package com.nurkiewicz.reactive;\n\nimport com.nurkiewicz.reactive.util.AbstractFuturesTest;\nimport org.junit.Test;\nimport"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S07_AsyncCallback.java",
    "chars": 1529,
    "preview": "package com.nurkiewicz.reactive;\n\nimport com.nurkiewicz.reactive.util.AbstractFuturesTest;\nimport org.junit.Test;\nimport"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S08_ErrorHandling.java",
    "chars": 1363,
    "preview": "package com.nurkiewicz.reactive;\n\nimport com.nurkiewicz.reactive.util.AbstractFuturesTest;\nimport org.junit.Test;\nimport"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S09_Promises.java",
    "chars": 1203,
    "preview": "package com.nurkiewicz.reactive;\n\nimport com.google.common.util.concurrent.ThreadFactoryBuilder;\nimport com.nurkiewicz.r"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S10_AsyncHttp.java",
    "chars": 2142,
    "preview": "package com.nurkiewicz.reactive;\n\nimport com.ning.http.client.AsyncCompletionHandler;\nimport com.ning.http.client.AsyncH"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S11_Cancelling.java",
    "chars": 1268,
    "preview": "package com.nurkiewicz.reactive;\n\nimport com.nurkiewicz.reactive.util.AbstractFuturesTest;\nimport com.nurkiewicz.reactiv"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/S12_RxJava.java",
    "chars": 2082,
    "preview": "package com.nurkiewicz.reactive;\n\nimport com.nurkiewicz.reactive.util.AbstractFuturesTest;\nimport com.nurkiewicz.reactiv"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/stackoverflow/ArtificialSleepWrapper.java",
    "chars": 1186,
    "preview": "package com.nurkiewicz.reactive.stackoverflow;\n\nimport org.jsoup.nodes.Document;\n\nimport java.util.Random;\nimport java.u"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/stackoverflow/FallbackStubClient.java",
    "chars": 1699,
    "preview": "package com.nurkiewicz.reactive.stackoverflow;\n\nimport com.google.common.base.Throwables;\nimport org.apache.commons.io.I"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/stackoverflow/HttpStackOverflowClient.java",
    "chars": 726,
    "preview": "package com.nurkiewicz.reactive.stackoverflow;\n\nimport com.google.common.base.Throwables;\nimport org.jsoup.Jsoup;\nimport"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/stackoverflow/InjectErrorsWrapper.java",
    "chars": 1169,
    "preview": "package com.nurkiewicz.reactive.stackoverflow;\n\nimport org.jsoup.nodes.Document;\nimport org.slf4j.Logger;\nimport org.slf"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/stackoverflow/LoadFromStackOverflowTask.java",
    "chars": 605,
    "preview": "package com.nurkiewicz.reactive.stackoverflow;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.ut"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/stackoverflow/LoggingWrapper.java",
    "chars": 1583,
    "preview": "package com.nurkiewicz.reactive.stackoverflow;\n\nimport com.google.common.base.Joiner;\nimport com.google.common.base.Spli"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/stackoverflow/Question.java",
    "chars": 73,
    "preview": "package com.nurkiewicz.reactive.stackoverflow;\n\npublic class Question {\n}"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/stackoverflow/StackOverflowClient.java",
    "chars": 218,
    "preview": "package com.nurkiewicz.reactive.stackoverflow;\n\nimport org.jsoup.nodes.Document;\n\npublic interface StackOverflowClient {"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/util/AbstractFuturesTest.java",
    "chars": 1432,
    "preview": "package com.nurkiewicz.reactive.util;\n\nimport com.google.common.util.concurrent.ThreadFactoryBuilder;\nimport com.nurkiew"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/util/Futures.java",
    "chars": 1046,
    "preview": "package com.nurkiewicz.reactive.util;\n\nimport rx.Observable;\n\nimport java.util.List;\nimport java.util.concurrent.Complet"
  },
  {
    "path": "src/test/java/com/nurkiewicz/reactive/util/InterruptibleTask.java",
    "chars": 926,
    "preview": "package com.nurkiewicz.reactive.util;\n\nimport java.util.concurrent.CountDownLatch;\nimport java.util.concurrent.TimeUnit;"
  },
  {
    "path": "src/test/resources/clojure-questions.html",
    "chars": 88498,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n\n    <title>Newest &#39;clojure&#39; Questions - Stack Overflow</title>\n    <link rel=\"sho"
  },
  {
    "path": "src/test/resources/groovy-questions.html",
    "chars": 89629,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n\n    <title>Newest &#39;groovy&#39; Questions - Stack Overflow</title>\n    <link rel=\"shor"
  },
  {
    "path": "src/test/resources/java-questions.html",
    "chars": 180844,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n\n    <title>Newest &#39;java&#39; Questions - Stack Overflow</title>\n    <link rel=\"shortc"
  },
  {
    "path": "src/test/resources/logback-test.xml",
    "chars": 419,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<configuration>\n\n\t<logger name=\"net\" level=\"INFO\"/>\n\t<logger name=\"com\" level=\"I"
  },
  {
    "path": "src/test/resources/scala-questions.html",
    "chars": 89009,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n\n    <title>Newest &#39;scala&#39; Questions - Stack Overflow</title>\n    <link rel=\"short"
  },
  {
    "path": "src/test/resources/twitter4j.properties",
    "chars": 71,
    "preview": "loggerFactory=twitter4j.internal.logging.SLF4JLoggerFactory\ndebug=true\n"
  }
]

About this extraction

This page contains the full source code of the nurkiewicz/completablefuture GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 33 files (471.3 KB), approximately 123.6k tokens, and a symbol index with 100 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!