This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class ResultFuture implements Future<Result> { | |
private final CountDownLatch latch = new CountDownLatch(1); | |
private Result value; | |
@Override | |
public boolean cancel(boolean mayInterruptIfRunning) { | |
return false; | |
} | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- creating and using a Cassandra counter column in CQL | |
-- NOTE: this is CQL 2.0 syntax, it will NOT work with CQL 3 (for syntax reasons and because CQL 3.0 drops the very notion of dynamic columns...sigh) | |
CREATE KEYSPACE test WITH strategy_class = 'SimpleStrategy' | |
AND strategy_options:replication_factor = '1'; | |
USE test; | |
CREATE TABLE stats (KEY text PRIMARY KEY) WITH comparator=text AND default_validation=counter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c | |
index 0b039b6..10664c7 100644 | |
--- a/bin/varnishncsa/varnishncsa.c | |
+++ b/bin/varnishncsa/varnishncsa.c | |
@@ -39,6 +39,7 @@ | |
* %l Client user ID as reported by identd (always "-") | |
* %u User ID if using HTTP authentication, or "-" | |
* %t Date and time of request | |
+ * %D time from beginning to completion of request | |
* %r Request line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> | |
<!-- A Maven assembly plugin descriptor to bundle all WAR dependencies into a zip file, including local | |
resource files. This is useful when you don't use EARs, but still want to package several web applications | |
into one big archive, plus any additional stuff (e.g. configuration files) needed for deployment. --> | |
<id>dist</id> | |
<formats> | |
<format>zip</format> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Pull all the Mercurial repos listed in the TortoiseHg registry, in parallel. | |
Convenient if you're tracking lots of repositories. | |
""" | |
from __future__ import print_function | |
import subprocess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"asset_template": { | |
"template": "*", | |
"settings": { | |
"analysis": { | |
"filter": { | |
"metaphone_filter": { | |
"replace": false, | |
"encoder": "doublemetaphone", | |
"type": "phonetic" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.io.InputStream; | |
import java.nio.file.*; | |
import java.nio.file.attribute.BasicFileAttributes; | |
import static java.nio.file.Files.*; | |
/** | |
* Extracts files and directories of a standard zip file to a destination directory. Requires at least Java 7. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<web-app xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | |
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | |
version="3.0"> | |
<listener> | |
<listener-class>org.jboss.weld.environment.servlet.BeanManagerResourceBindingListener</listener-class> | |
</listener> | |
<listener> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ERROR [ReadStage:51] 2013-12-06 00:02:54,065 CassandraDaemon.java (line 191) Exception in thread Thread[ReadStage:51,5,main] | |
ERROR [ReadStage:51] 2013-12-06 00:02:54,065 CassandraDaemon.java (line 191) Exception in thread Thread[ReadStage:51,5,main] | |
java.lang.OutOfMemoryError: Java heap space | |
at org.apache.cassandra.io.util.RandomAccessReader.readBytes(RandomAccessReader.java:376) | |
at org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:392) | |
at org.apache.cassandra.utils.ByteBufferUtil.readWithLength(ByteBufferUtil.java:355) | |
at org.apache.cassandra.db.ColumnSerializer.deserializeColumnBody(ColumnSerializer.java:108) | |
at org.apache.cassandra.db.OnDiskAtom$Serializer.deserializeFromSSTable(OnDiskAtom.java:92) | |
at org.apache.cassandra.db.OnDiskAtom$Serializer.deserializeFromSSTable(OnDiskAtom.java:73) | |
at org.apache.cassandra.db.columniterator.SimpleSliceReader.computeNext(SimpleSliceReader.java:106) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST CONSTRUCT ON LISTENER CALLED test.ContextListener@1cadc928 | |
java.lang.Throwable | |
at test.ContextListener.myPostConstructMethod(ContextListener.java:18) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
at java.lang.reflect.Method.invoke(Method.java:606) | |
at org.eclipse.jetty.plus.annotation.LifeCycleCallback.callback(LifeCycleCallback.java:117) | |
at org.eclipse.jetty.plus.annotation.PostConstructCallback.callback(PostConstructCallback.java:57) | |
at org.eclipse.jetty.plus.annotation.LifeCycleCallbackCollection.callPostConstructCallback(LifeCycleCallbackCollection.java:115) |
OlderNewer