Skip to content

Instantly share code, notes, and snippets.

View dcolish's full-sized avatar

Dan dcolish

View GitHub Profile
use std::str::*;
use std::vec;
fn main() {
let s = "Hello";
let v = replicate(&s, 10);
println(fmt!("%?", v));
}
fn replicate<'r, T> (el: &'r T, n: uint) -> ~[&'r T] {
use std::str::*;
use std::vec;
fn main() {
let s = "Hello";
let v = replicate(&s, 10);
println(fmt!("%?", v));
}
fn replicate<'r, T> (el: &'r T, n: uint) -> ~[&'r T] {
fn main() {
let m: &fn() = foo(true);
println(fmt!("%?", m));
// m();
}
fn foo(x: bool) -> &fn(){
match x {
true => ||{ println("Hello") },
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.8
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package org.xapian;
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.8
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package org.xapian;
package org.xapian;
import java.net.URL;
public class LoaderUtils {
public static boolean runningInJar() {
String classResourcePath = LoaderUtils.class.getName().replace('.', '/') + ".class";
URL resource = Thread.currentThread()
.getContextClassLoader()
import datetime
import os
import boto
from boto.emr.instance_group import InstanceGroup
from boto.emr.step import InstallPigStep, PigStep
conn = boto.connect_emr()
#!/usr/bin/env python2.7
import argparse
import contextlib
import httplib
import json
import os
import re
import sys
--
--
--
import qualified Data.Map as M
import Data.Monoid
import Data.Ratio
import Control.Monad
import XMonad
import XMonad.Actions.CycleWS
import XMonad.Actions.FloatKeys
diff --git a/xapian-bindings/java/SmokeTest.java b/xapian-bindings/java/SmokeTest.java
index 2304aff..4765a0b 100644
--- a/xapian-bindings/java/SmokeTest.java
+++ b/xapian-bindings/java/SmokeTest.java
@@ -117,8 +117,7 @@ public class SmokeTest {
}
Document m_doc = null;
- for (MSetIterator it = mset.iterator(); it.hasNext();) {
- Long docid = it.next();