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 Graphics.Rendering.OpenGL | |
import Graphics.UI.GLUT | |
n :: [Normal3 GLfloat] | |
n = [(Normal3 (-1.0) 0.0 0.0), | |
(Normal3 0.0 1.0 0.0), | |
(Normal3 1.0 0.0 0.0), | |
(Normal3 0.0 (-1.0) 0.0), | |
(Normal3 0.0 0.0 1.0), | |
(Normal3 0.0 0.0 (-1.0))] |
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
-- file: QuickPiet.hs | |
-- An implementation of QuickPiet by Ben Lee | |
-- based on the Piet language by ??? | |
-- I haven't tested this code, but if you'd like to, then the following will get you on your way: | |
-- $ ghc --make QuickPiet.hs | |
-- $ ./QuickPiet filename | |
-- where filename is some script file you want to run | |
-- Good Luck! |
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
(ns revelytix.test-triplestore | |
(:use [reveltix.triplestore :only (*connection* connect-to dispose execute-command resultMessage= create-graph drop-graph insert-triple load-file)])) | |
(def *HOST* "rmi://australia/server1") | |
(def *FAMILY* "family") | |
(def *N3_FAMILY_FILE* "test/data/family.n3") | |
(def *SELECT-ALL* "select ?s ?p ?o where { ?s ?p ?o }") | |
;; Connection Fixture, establishes a connection for all execute-command calls to use | |
(defn connection-fixture [f] |
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
require File.expand_path(File.dirname(__FILE__) + '/edgecase') | |
# Greed is a dice game where you roll up to five dice to accumulate | |
# points. The following "score" function will be used calculate the | |
# score of a single roll of the dice. | |
# | |
# A greed roll is scored as follows: | |
# | |
# * A set of three ones is 1000 points | |
# |
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
(ns pallet-simple | |
(:use [pallet core compute resource]) | |
(:use [pallet.crate.automated-admin-user]) | |
(:use [pallet.crate.couchdb :only (couchdb)]) | |
(:use [pallet.crate.java :only (java)]) | |
(:use [pallet.crate.jetty :only (jetty)])) | |
(def ec2-access-id "Your-Access-ID-Here") | |
(def ec2-secret-key "Your-Secret-Key-Here") |
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
(fn [m] | |
(let [keys (set (keys m)) | |
key-map (into {} (for [k keys] [k k]))] | |
(select-keys m (vals key-map)))) |
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
// This class does something with the board. I don't completely understand it, our teacher wrote it | |
package ui; | |
import centipede.Main; | |
import java.awt.event.KeyEvent; | |
import java.awt.event.KeyListener; | |
import javax.swing.JFrame; | |
import javax.swing.JTextArea; |
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
(use 'ring.middleware.stacktrace) | |
(defn buggy [_] | |
(throw (Exception. "splork"))) | |
(defn roachy [req] | |
(try | |
(buggy req) | |
(catch Exception e | |
(throw (Exception. "splunch" e))))) |
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
(ns revelytix.spyder.query.interface | |
(:require [revelytix.sparql.parse :as sparqlp] | |
[revelytix.spyder.query.plan :as plan] | |
[revelytix.spyder.query.optimize :as opt] | |
[revelytix.spyder.query.process :as process] | |
[revelytix.spyder.log :as log]) | |
(:import [revelytix.spyder.query.api QueryException] | |
[revelytix.spyder.sql.plan_tree QueryContext])) | |
(defn always [x] |
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
(query+ (frame+ {:column-metadata {"x" {:datatype :uri | |
:expression :one-to-one}} | |
:alias "topframe__1" | |
:source "topframe"} | |
(distinct+) | |
(project+ [x id]) | |
(bind+ {x (new-function | |
{:op "iri" | |
:args [(new-function | |
{:op "http://www.w3.org/2005/xpath-functions#concat" |
OlderNewer