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 -jar eulergui-1.9-SNAPSHOT-jar-with-dependencies.jar | |
Oct 03, 2011 3:49:35 PM eulergui.project.ProjectFactory restoreXMLFile | |
INFO: opening Project from "/home/pldms/Downloads/euler_project.xml.n3p" ( file:/home/pldms/Downloads/euler_project.xml.n3p ) | |
Oct 03, 2011 3:49:35 PM eulergui.project.ProjectFactory restoreXMLFile | |
INFO: Blank Project created: /home/pldms/Downloads/euler_project.xml.n3p | |
Oct 03, 2011 3:49:35 PM eulergui.project.ProjectChangeSupport addProjectListener | |
INFO: ProjectChangeSupport.addProjectListener(): added listener eulergui.project.ProjectState@1f488344 | |
Oct 03, 2011 3:49:35 PM eulergui.project.ProjectChangeSupport addProjectListener | |
INFO: ProjectChangeSupport.addProjectListener(): added listener eulergui.project.ProjectState@1f488344 | |
Oct 03, 2011 3:49:35 PM eulergui.project.ProjectChangeSupport addProjectListener |
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
package org.ilrt.researchrevealed.describehandler; | |
import com.hp.hpl.jena.query.Dataset; | |
import com.hp.hpl.jena.rdf.model.Model; | |
import com.hp.hpl.jena.rdf.model.ModelFactory; | |
import com.hp.hpl.jena.rdf.model.RDFNode; | |
import com.hp.hpl.jena.rdf.model.Resource; | |
import com.hp.hpl.jena.rdf.model.Statement; | |
import com.hp.hpl.jena.rdf.model.StmtIterator; | |
import com.hp.hpl.jena.rdf.model.impl.StmtIteratorImpl; |
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
# Explanation: | |
# ASK returns 'true' if there are any results | |
# The inner query says: | |
# Get agents and (if there) bio:event | |
# Count agents and bios, and check if there are agents present, but no bios | |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | |
PREFIX bio: <http://purl.org/vocab/bio/0.1/> | |
ASK { | |
SELECT (count(?x) as ?agents) (count(?y) as ?bios) |
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
require 'benchmark' | |
array_size = 32768 | |
data = Array.new(array_size) | |
array_size.times { |c| data[c] = rand(256)} | |
data_sorted = data.sort | |
def sum(array) |
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
$ jruby -v | |
jruby 1.7.0.preview2.dev (ruby-1.9.3-p203) (2012-07-03 a364a87) (OpenJDK 64-Bit Server VM 1.7.0_03) [linux-amd64-java] | |
$ jruby test.rb | |
==== Text in English ==== | |
#<MatchData "@chichi dog dog" 1:"@" 2:"chichi" 3:" dog dog"> | |
1. 11 | |
2. 12 | |
3. 18 | |
==== Text in Chinese ==== | |
#<MatchData "@chichi 狗狗" 1:"@" 2:"chichi" 3:" 狗狗"> |
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
<div vocab="http://example.com/eg/elements/1.1/"> | |
<h3 property="title">5 Centimeters Per Second</h3> | |
<h4 property="maker">Makoto Shinkai</h4> | |
</div> |
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
import java.util.Set; | |
import org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; | |
public class Jsoup { | |
public static void main(String... args) throws Exception { | |
Document html = Jsoup.parse("<html><body><p>Bye</p><p class=\"baz\">Hi</p></body></html>"); | |
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
SELECT DISTINCT ?Sensor0 ?LeftBoundary1 ?RightBoundary2 ?TopBoundary3 ?BottomBoundary4 | |
WHERE { | |
{ | |
?PathRow5 <http://toto/#bottomBoundary> ?BottomBoundary4 . | |
?PathRow5 <http://toto/#topBoundary> ?TopBoundary3 . | |
?PathRow5 <http://toto/#leftBoundary> ?LeftBoundary1 . | |
?PathRow5 <http://toto/#rightBoundary> ?RightBoundary2 . | |
?PathRow5 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://toto/#PathRow> . |
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
<!DOCTYPE html> | |
<html version="HTML+RDFa 1.1" | |
xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema#" | |
xmlns:cc="http://creativecommons.org/ns#" | |
xmlns:dc="http://purl.org/dc/elements/1.1/" | |
xmlns:foaf="http://xmlns.com/foaf/0.1/" | |
xmlns:aa="http://activearchives.org/terms/"> |
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
# On the pi | |
$ raspivid -t 999999 -o - | nc 192.168.1.87 5001 | |
# On the mac | |
$ nc -l 5001 | mplayer -fps 31 -cache 1024 -vf halfpack - |