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 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] { |
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 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] { |
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 main() { | |
let m: &fn() = foo(true); | |
println(fmt!("%?", m)); | |
// m(); | |
} | |
fn foo(x: bool) -> &fn(){ | |
match x { | |
true => ||{ println("Hello") }, |
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 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 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 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 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
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() |
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 datetime | |
import os | |
import boto | |
from boto.emr.instance_group import InstanceGroup | |
from boto.emr.step import InstallPigStep, PigStep | |
conn = boto.connect_emr() |
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
#!/usr/bin/env python2.7 | |
import argparse | |
import contextlib | |
import httplib | |
import json | |
import os | |
import re | |
import sys |
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 qualified Data.Map as M | |
import Data.Monoid | |
import Data.Ratio | |
import Control.Monad | |
import XMonad | |
import XMonad.Actions.CycleWS | |
import XMonad.Actions.FloatKeys |
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
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(); |