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
#!/bin/sh -e | |
if [ ! $SBT_VERSION ]; then SBT_VERSION=0.11.0; fi | |
if [ ! $SBT_DIR ]; then SBT_DIR=$HOME/.sbt; fi | |
if [ ! $SBT_FILENAME ]; then SBT_FILENAME=sbt-launch-$SBT_VERSION.jar; fi | |
if [ ! $SBT_LOCATION ]; then SBT_LOCATION=$SBT_DIR/$SBT_FILENAME; fi | |
if expr match $SBT_VERSION "0.7" > /dev/null; | |
then | |
SBT_URL="http://simple-build-tool.googlecode.com/files/$SBT_FILENAME" |
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
setting 'ivy.default.settings.dir' to 'jar:file:/home/jesse/.sbt/sbt-launch-0.11.0.jar!/org/apache/ivy/core/settings' | |
setting 'ivy.basedir' to '/home/jesse/projects/scala/.' | |
setting 'ivy.default.conf.dir' to 'jar:file:/home/jesse/.sbt/sbt-launch-0.11.0.jar!/org/apache/ivy/core/settings' | |
impossible to define new type: class not found: org.apache.ivy.plugins.version.PatternVersionMatcher in [] nor Ivy classloader | |
impossible to define new type: class not found: org.apache.ivy.plugins.trigger.LogTrigger in [] nor Ivy classloader | |
impossible to define new type: class not found: org.apache.ivy.plugins.resolver.DualResolver in [] nor Ivy classloader | |
impossible to define new type: class not found: org.apache.ivy.plugins.resolver.VsftpResolver in [] nor Ivy classloader | |
impossible to define new type: class not found: org.apache.ivy.plugins.conflict.RegexpConflictManager in [] nor Ivy classloader | |
impossible to define new type: class not found: org.apache.ivy.plugins.resolver.SshResolver in [] nor Ivy classloader | |
impossib |
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
#!/bin/sh -e | |
if [ ! $SBT_VERSION ]; then SBT_VERSION=0.11.0; fi | |
if [ ! $SBT_DIR ]; then SBT_DIR=$HOME/.sbt; fi | |
if [ ! $SBT_FILENAME ]; then SBT_FILENAME=sbt-launch-$SBT_VERSION.jar; fi | |
if [ ! $SBT_LOCATION ]; then SBT_LOCATION=$SBT_DIR/$SBT_FILENAME; fi | |
if expr match $SBT_VERSION "0.7" > /dev/null; | |
then | |
SBT_URL="http://simple-build-tool.googlecode.com/files/$SBT_FILENAME" |
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
/* | |
* An incomplete parser intended to import rules from the WordNet[1] | |
* Prolog-formatted database. Rules are of the form: | |
* | |
* s(101942869,1,'abalone',n,1,0). | |
* sk(101942869,1,'abalone%1:05:00::'). | |
* | |
* and so forth. | |
* | |
* [1]: http://wordnet.princeton.edu/ "WordNet" |
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
<!doctype html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script> | |
$(document).ready(function() { | |
for (var i = 1; i < 5; i += 1) { | |
var elemId = "#user"+ i; | |
$.get('/users/'+ i, function(content) { | |
$(elemId).html(content); |
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
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} | |
-- FlexibleInstances and MultiParamTypeClasses are necessary for the | |
-- LayoutClass instance declaration of Flip. | |
-- I use two monitors. The default tiled layout in XMonad, Tall, puts | |
-- the master window on the left side of the screen. That feels right | |
-- for my right screen. But for my left screen I would prefer the | |
-- master window to be on the right side of the screen because that side |
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
function f() {} | |
f.prototype = { i: 10 }; | |
var i = new f(); | |
f.prototype = { j: 11 }; | |
var j = new f(); | |
equal(i.i, ?); | |
equal(i.j, ?); | |
equal(j.i, ?); |
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
<!doctype html> | |
<html> | |
<head> | |
<title>iFrame memory leak prevention test</title> | |
</head> | |
<body> | |
<h1>iFrame memory leak prevention test (void)</h1> | |
<p>In IE up through version 8 adding an iframe to a page and | |
removing it produces a memory leak in some cases. The pattern |
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
$.flatMap = function(promise, f) { | |
var deferred = $.Deferred(); | |
function reject(/* arguments */) { | |
// The reject() method puts a deferred into its failure | |
// state. | |
deferred.reject.apply(deferred, arguments); | |
} | |
promise.then(function(/* values... */) { |
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
-- Converts unsigned integers to and from base36 representations | |
module Numeric.Base36 ( | |
readBase36 | |
, showBase36 | |
) where | |
import Data.Char (isAscii, isLetter, isDigit, ord, chr, toLower) | |
import Numeric (readInt, showIntAtBase) |