This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.lang.AssertionError: Timed out | |
at org.testng.Assert.fail(Assert.java:84) | |
at com.ning.http.client.async.ConnectionPoolTest.asyncDoGetKeepAliveHandlerTest_channelClosedDoesNotFail(ConnectionPoolTest.java:101) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | |
at java.lang.reflect.Method.invoke(Method.java:597) | |
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580) | |
at org.testng.internal.Invoker.invokeMethod(Invoker.java:478) | |
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:617) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns tmp | |
(:use clojure.contrib.java-utils)) | |
(def *default* {:a 1}) | |
(def *provided* {:c 2}) | |
(def *mapping* | |
{:c :b | |
:a :c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create custom :external selector | |
$.expr[':'].external = function(obj){ | |
return obj.hostname && obj.hostname !== location.hostname; | |
}; | |
$(document).ready(function() { | |
// apply additional style to external links | |
$('a:external').addClass('external'); | |
// and behavior | |
$('a:external').click(function() { | |
_gaq.push(['_trackEvent', 'Outbound Links', 'Click', $(this).attr('href')]);});}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns twitter-stream | |
(:require [http.async.client :as c] | |
[org.danlarkin.json :as j])) | |
(def u ".") | |
(def p ".") | |
(defn track [s] | |
(let [resp (c/stream-seq :post "http://stream.twitter.com/1/statuses/filter.json" | |
:body {"track" (str s)} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.io.IOException: too many bytes written | |
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:2789) | |
at com.google.common.io.ByteStreams.copy(ByteStreams.java:171) | |
at org.jclouds.io.payloads.BasePayload.writeTo(BasePayload.java:68) | |
at org.jclouds.http.internal.JavaUrlHttpCommandExecutorService.convert(JavaUrlHttpCommandExecutorService.java:221) | |
at org.jclouds.http.internal.JavaUrlHttpCommandExecutorService.convert(JavaUrlHttpCommandExecutorService.java:76) | |
at org.jclouds.http.internal.BaseHttpCommandExecutorService$HttpResponseCallable.call(BaseHttpCommandExecutorService.java:153) | |
at org.jclouds.http.internal.BaseHttpCommandExecutorService$HttpResponseCallable.call(BaseHttpCommandExecutorService.java:132) | |
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) | |
at java.util.concurrent.FutureTask.run(FutureTask.java:138) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2011-05-09 14:19:21 | |
Full thread dump Java HotSpot(TM) 64-Bit Server VM (19.1-b02-334 mixed mode): | |
"Thread-2" daemon prio=5 tid=10c34a000 nid=0x10bb07000 waiting on condition [10bb06000] | |
java.lang.Thread.State: TIMED_WAITING (sleeping) | |
at java.lang.Thread.sleep(Native Method) | |
at org.apache.commons.exec.InputStreamPumper.run(InputStreamPumper.java:69) | |
at java.lang.Thread.run(Thread.java:680) | |
"Thread-4" daemon prio=5 tid=10c349800 nid=0x10adae000 runnable [10adad000] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Copyright 2011 Hubert Iwaniuk | |
; | |
; Licensed under the Apache License, Version 2.0 (the "License"); | |
; you may not use this file except in compliance with the License. | |
; You may obtain a copy of the License at | |
; | |
; http://www.apache.org/licenses/LICENSE-2.0 | |
; | |
; Unless required by applicable law or agreed to in writing, software | |
; distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns explicit-client | |
(:require [http.async.client :as http])) | |
(with-open [client (http/create-client)] | |
(let [response (http/GET client "http://clojure.org")] | |
(println "status" (:code (http/status response))) | |
(println "body" (-> http/await http/string)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns twitter-sample | |
(:require [http.async.client :as c] | |
[org.danlarkin.json :as j])) | |
(def u "username") | |
(def p "password") | |
(defn print-user-and-text [prefix s] | |
(let [twit (j/decode-from-str s) | |
user (:screen_name (:user twit)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user=> (use 'clojure.tools.logging) | |
nil | |
user=> (info "abc") | |
Sep 8, 2011 10:37:34 AM clojure.tools.logging$eval319$fn__320 invoke | |
INFO: abc | |
nil |