This file contains hidden or 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
| object AllCombinations extends App { | |
| /** | |
| * Returns all permutations of all combinations | |
| * of everything in the input data | |
| * | |
| * For example, given the `data` List('a', 'b', 'c') | |
| * will return the result: | |
| * | |
| * List( |
This file contains hidden or 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 wlhn | |
| import com.twitter.hashing.KeyHasher | |
| object BloomApp extends App { | |
| /** | |
| * A bloom filter is used to test whether an element is a member of a set. | |
| * |
This file contains hidden or 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
| (:~ | |
| : Neat examples of zero-padding a one digit month, for later | |
| : construction of xs:date etc. | |
| :) | |
| (: Example 1: When given a single digit month :) | |
| let $month := '4' | |
| return | |
| substring(concat('0', $month), string-length($month)) |
This file contains hidden or 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
| object Blah extends App { | |
| trait ArgProvider { | |
| } | |
| case class ColumnReference(value: String) extends ArgProvider | |
| abstract class Rule(name: String, val argProviders: ArgProvider*) |
This file contains hidden or 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 wlhn | |
| import java.net.ServerSocket | |
| import scala.io.BufferedSource | |
| import java.io.PrintStream | |
| import java.net.Socket | |
| import java.net.InetAddress | |
| import scala.collection.mutable.ArrayBuffer | |
| /** |
This file contains hidden or 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
| xquery version "3.0"; | |
| module namespace search = "http://xmlss/search"; | |
| import module namespace web = "http://xmlss/web" at "web.xqm"; | |
| declare namespace rest = "http://exquery.org/ns/restxq"; | |
| declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; | |
| declare |
This file contains hidden or 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 scala.collection.generic.{GenericCompanion, GenericTraversableTemplate, SeqFactory} | |
| import scala.collection.mutable.{ArrayBuffer, Builder} | |
| class MyCollectionBuilder[A] extends Builder[A, MyCollection[A]] { | |
| val data = ArrayBuffer[A]() | |
| def +=(elem: A) = { | |
| data += elem | |
| this | |
| } |
This file contains hidden or 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
| public abstract boolean isApplicable(Class<? extends AbstractProject> jobType); | |
| public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends AbstractBuild<P,R>> extends Job<P,R> | |
| implements BuildableItem, ModelObjectWithChildren { | |
| ... | |
| } |
This file contains hidden or 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
| <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | |
| <!-- | |
| This jelly script is used for per-project configuration. | |
| See global.jelly for a general discussion about jelly script. | |
| --> | |
| <!-- | |
| Creates a checkbox that maps to the "remoteDebug" property. | |
| If selected, creates a checkbox that maps to the "suspend" property and a textbox that maps to the "port" property. |
This file contains hidden or 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 hudson.plugins.scalabuilder; | |
| import hudson.EnvVars; | |
| import hudson.Extension; | |
| import hudson.Launcher; | |
| import hudson.FilePath; | |
| import hudson.model.BuildListener; | |
| import hudson.model.AbstractBuild; | |
| import hudson.model.AbstractProject; | |
| import hudson.model.Computer; |