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
{ | |
"urn:podd:repository:3efbe347-408b-4476-ad06-e8dec8eb368e" : { | |
"http://purl.org/podd/ns/repository#containsSchemaIRI" : [ { | |
"value" : "http://purl.org/podd/ns/dcTerms", | |
"type" : "uri" | |
}, { | |
"value" : "http://purl.org/podd/ns/foaf", | |
"type" : "uri" | |
}, { | |
"value" : "http://purl.org/podd/ns/poddBase", |
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.junit.Before; | |
import org.junit.Test; | |
import sun.misc.Unsafe; | |
import sun.reflect.ReflectionFactory; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Modifier; | |
import static org.junit.Assert.assertEquals; |
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
/** | |
* Finds a unique result in the given file, based on examining rows from the CSV and comparing | |
* them sequentially down the file using the given value aggregator function. | |
* | |
* @param <T> | |
* The type of the value that is being compared. | |
* @param <R> | |
* The type of the value that is being returned as the aggregation. | |
* @param nextFile | |
* The file to check |
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
sudo apt-get install r-base r-base-dev r-doc-pdf r-mathlib autoconf2.13 r-cran-rcurl libcurl4-openssl-dev | |
Download RStudio from : http://www.rstudio.com/products/rstudio/ | |
Inside RStudio run: | |
install.packages("devtools") | |
install.packages("ggplot2") |
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.apache.commons.math3.stat.regression.OLSMultipleLinearRegression; | |
public class LinearRegression { | |
public static void main(String[] args) { | |
double [] y = {-0.48812477, 0.33458213, | |
-0.52754476, -0.79863471, | |
-0.68544309, -0.12970239, | |
0.02355622, -0.31890850, | |
0.34725819, 0.08108851}; | |
double [][] x = {{1,0}, {0,0}, | |
{1,0}, {2,1}, |
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
<!-- Application class name --> | |
<context-param> | |
<param-name>org.restlet.application</param-name> | |
<param-value> | |
mypackage.WebSiteApplication | |
</param-value> | |
</context-param> | |
<!-- Restlet adapter --> | |
<servlet> |
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
1. Create class QueryTypeEnum extends QueryAllEnum | |
2. Create interface QueryTypeParser extends QueryAllParser<QueryType> | |
3. Create interface QueryTypeFactory extends QueryAllFactory<QueryTypeEnum, QueryTypeParser, QueryType> | |
4. Create class QueryTypeRegistry extends AbstractServiceLoader<QueryTypeEnum, QueryTypeFactory> |
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
michaels-imac:stardog-1.2.1 mhgrove$ ./stardog-admin db drop -n testRulesDB | |
Successfully deleted database 'testRulesDB'. | |
michaels-imac:stardog-1.2.1 mhgrove$ ./stardog-admin db create -n testRulesDB | |
Successfully created database 'testRulesDB'. | |
michaels-imac:stardog-1.2.1 mhgrove$ ./stardog data add -u admin -p admin testRulesDB ~/Downloads/rules.ttl | |
Adding data from file: /Users/mhgrove/Downloads/rules.ttl | |
Added 42 RDF triples. |
OlderNewer