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 org.restlet.Context; | |
import org.restlet.Request; | |
import org.restlet.Response; | |
import org.restlet.data.Reference; | |
import org.restlet.resource.Directory; | |
public class ClassLoaderDirectory extends Directory { | |
private ClassLoader _cl; | |
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
private static class CompositeClassLoader extends ClassLoader { | |
private Vector<ClassLoader> classLoaders = new Vector<ClassLoader>(); | |
@Override | |
public URL getResource(String name) { | |
for (ClassLoader cl : classLoaders) { | |
URL resource = cl.getResource(name); |
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
@Override | |
public Restlet createRoot() { | |
final Router router = new Router(getContext()); | |
getConnectorService().getClientProtocols().add(Protocol.FILE); | |
getConnectorService().getClientProtocols().add(Protocol.CLAP); | |
LocalReference localReference = LocalReference.createClapReference(LocalReference.CLAP_THREAD, "/src/main/webapp/"); | |
CompositeClassLoader customCL = new CompositeClassLoader(); |
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
package com.clarkparsia.pellet.examples; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import com.clarkparsia.pellet.api.kb.Ontology; | |
import com.clarkparsia.pellet.api.kb.OntologyFactory; | |
import com.clarkparsia.pellet.api.kb.OntologySyntax; | |
import com.clarkparsia.pellet.api.term.TermFactory; | |
import com.clarkparsia.pellet.api.term.entity.NamedClass; |
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
// ==UserScript== | |
// @name refcontrol.uc.js | |
// @include main | |
// @description Control referer sending by refControl addon settings | |
// @version 0.3 | |
// @author bellbind | |
// @license MPL 1.1/GPL 2.0/LGPL 2.1 | |
// @homepage https://gist.github.com/777814 | |
// ==/UserScript== | |
/* Usage |
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
# How to perform a release with git & maven following the git flow conventions | |
# ---------------------------------------------------------------------------- | |
# Finding the next version: you can see the next version by looking at the | |
# version element in "pom.xml" and lopping off "-SNAPSHOT". To illustrate, | |
# if the pom's version read "0.0.2-SNAPSHOT", the following instructions would | |
# perform the release for version "0.0.2" and increment the development version | |
# of each project to "0.0.3-SNAPSHOT". | |
# branch from develop to a new release branch | |
git checkout develop |
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
Store.create(function(store){ | |
var graph = new store.rdf.createGraph(); | |
store.rdf.setPrefix("earl", "http://www.w3.org/ns/earl#"); | |
store.rdf.setDefaultPrefix("http://www.w3.org/ns/earl#") | |
store.rdf.setPrefix("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); | |
graph.add(store.rdf.createTriple( store.rdf.createNamedNode("earl:test"), |
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
package com.jayway.example; | |
public interface Delegate { | |
String doSomething(); | |
String doSomethingElse(); | |
} |
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
package sandbox.client; | |
import java.io.Serializable; | |
import sandbox.shared.SequenceAnalyzer; | |
public class FirstBases implements SequenceAnalyzer | |
{ | |
private int count=0; | |
private transient StringBuilder sequence=null; | |
public FirstBases() | |
{ |
OlderNewer