Skip to content

Instantly share code, notes, and snippets.

use std::io::File;
use std::vec::Vec;
fn main() {
let p = Path::new("example.hgt");
let mut file = match File::open(&p) {
Ok(f) => f,
Err(e) => fail!("file error: {}", e)
SELECT ?t (count(distinct ?c) AS ?num)
WHERE
{ ?t rdfs:comment ?c }
GROUP BY ?t
HAVING ( ?num > 1 )
@shellac
shellac / results
Created June 20, 2014 16:48
Scala benchmark results
Before
Benchmark Mode Samples Mean Mean error Units
cartBaseline avgt 10 8.188 0.067 ms/op
cartPar avgt 10 6076.148 559.259 ms/op
cartParOpt avgt 10 483.091 11.921 ms/op
cartSeq avgt 10 320.620 9.380 ms/op
cartSeqOpt avgt 10 369.548 14.823 ms/op
sumBaseline avgt 10 16.852 4.273 ms/op
sumOfSquaresBaseline avgt 10 14.663 0.569 ms/op
@shellac
shellac / df-out-mac
Created July 24, 2015 12:52
df output on mac
$ df
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1 487849984 409442400 77895584 85% 51244298 9736948 84% /
devfs 382 382 0 100% 662 0 100% /dev
map -hosts 0 0 0 100% 0 0 100% /net
map auto_home 0 0 0 100% 0 0 100% /home
localhost:/wJehW-9zBUWN7G4CfiRtVu 487849984 487849984 0 100% 0 0 100% /Volumes/MobileBackups
(0) pldms@vpn-user-248-046:~
$ df -P
Filesystem 512-blocks Used Available Capacity Mounted on
bash-3.2$ ant clean test
Buildfile: build.xml
init:
clean:
[delete] Deleting directory /Users/pldms/Development/CVS-Other/jruby/build
[delete] Deleting directory /Users/pldms/Development/CVS-Other/jruby/docs/api
[delete] Deleting directory /Users/pldms/Development/CVS-Other/jruby/src_gen
Given
a subclass of b
b subclass of c
* If <x,y> is in IEXT(I(rdfs:subClassOf)) then x and y are in IC and ICEXT(x) is a subset of ICEXT(y)
hence extension(a) subset of extension(b)
similarly extension(b) subset of extension(c)
Compiled from "SampleTask.rb"
public class SampleTask extends org.jruby.ast.executable.AbstractScript{
public SampleTask();
public static org.jruby.runtime.builtin.IRubyObject __file__(SampleTask, org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.Block);
public org.jruby.runtime.builtin.IRubyObject __file__(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.Block);
public static org.jruby.runtime.builtin.IRubyObject class_0$RUBY$SampleTask(SampleTask, org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.Block);
public static org.jruby.runtime.builtin.IRubyObject method__1$RUBY$execute(SampleTask, org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.Block);
public static org.jruby.runtime.builtin.IRubyObject method__1$RUBY$execute(SampleTask, org.jruby.run
pldms@snowball:/tmp/ant-jruby$ jruby -S gem install bitescript
pldms@snowball:/tmp/ant-jruby$ cat file.rb
require "java"
require "lib/ant.jar"
include_class "org.apache.tools.ant.Task"
class SampleTask < Task
def execute
puts "Hello from SampleTask!"
require 'java'
begin
java.lang.System.out.println(nil)
rescue java.lang.NullPointerException => e
puts "Got you! #{e}"
end
$ curl -H 'Accept: text/plain' 'http://rdf-in-html.appspot.com/translate?uri=http://www.cmlenz.net/archives/2009/12/namespaces&parser=HTML'
# Produced by java-rdfa 0.2.1
# Origin: <http://www.cmlenz.net/archives/2009/12/namespaces>
<http://www.cmlenz.net/archives/2009/12/namespaces> <http://www.w3.org/1999/xhtml/vocab#icon> <http://www.cmlenz.net/favicon.ico> .
<http://www.cmlenz.net/archives/2009/12/namespaces> <http://www.w3.org/1999/xhtml/vocab#icon> <http://www.cmlenz.net/favicon.ico> .
<http://www.cmlenz.net/archives/2009/12/namespaces> <http://www.w3.org/1999/xhtml/vocab#stylesheet> <http://www.cmlenz.net/media/style/layout.css> .
<http://www.cmlenz.net/archives/2009/12/namespaces> <http://www.w3.org/1999/xhtml/vocab#stylesheet> <http://www.cmlenz.net/media/style/print.css> .