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
| #!/bin/bash | |
| if [ -e $1 ]; then | |
| rm -f $1 | |
| else | |
| touch $1 | |
| fi |
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
| module std.kmp; | |
| export kmp; | |
| kmpl<a> :: Array<a> -> Array<a> -> Maybe<Int>; | |
| kmp<a> :: Array<a>, Array<a> -> Maybe<Int>; | |
| kmpAdvanceTable<a> :: Array<a> -> Array<Int>; | |
| kmpl(pattern) { |
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
| THINGS TO OCCUR | |
| Thursday (small team of 2-3) | |
| * If seating is out, retract seating | |
| * Mark out layout in Cube & Bar 2 | |
| * DJ riser | |
| * Power | |
| * Network | |
| * Verify facilities (projector etc) |
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
| module std; | |
| export Maybe; | |
| export Nothing; | |
| export Just; | |
| export force; | |
| export isNothing; | |
| Maybe<a> = variant Nothing, Just(a) |
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
| module std; | |
| export Maybe; | |
| export Nothing; | |
| export Just; | |
| export force; | |
| export isNothing; | |
| Maybe<a> = variant Nothing, Just(a) |
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
| module xtoa; | |
| export xtoa; | |
| export hexValue; | |
| export decValue; | |
| export binValue; | |
| xtoa :: String, Int -> String; | |
| hexValue :: Int -> String; |
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 boolean hassum(int target) { | |
| return hassum_recursive(-1, 0, 0, target); | |
| } | |
| private boolean hassum_recursive(int hi, int lo, int sum, int target) { | |
| if (sum == target) { | |
| return true; | |
| } else if (sum > target && lo < hi) { | |
| return hassum_recursive(hi, lo + 1, sum - array[lo], target); | |
| } else { |
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
| <?php | |
| require_once("auth.php"); | |
| class NoCredentialsAuth extends AuthBackend | |
| { | |
| private $authed = false; | |
| private $user; | |
| private function __construct() |
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
| #!/bin/bash | |
| # begin config section | |
| SOURCE=src | |
| BUILD=dist | |
| MAINCLASS=CrosswordApp | |
| UNCRUSTIFY=uncrustify.cfg | |
| OWNPACKAGES="com.hovercatsw uk.ac.soton" | |
| # end of config section | |
| TARGET=$BUILD/$MAINCLASS.java | |
| COMPLETE=`tempfile --prefix=flatten` |
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
| #!/bin/bash | |
| MAINCLASS=FractalApp | |
| find . -name '*.java' | xargs cat | grep "^import " | sort | uniq | |
| find . -name '*.java' | grep -v $MAINCLASS | sort | xargs cat | grep -v "^import " | sed s/public\ class/class/g | sed s/public\ interface/interface/g | sed s/public\ abstract\ class/abstract\ class/g | |
| find . -name $MAINCLASS.java | xargs cat | grep -v "^import " | |
| SLASH="/" | |
| STAR="*" | |
| OPENCOMMENT=$SLASH$STAR | |
| CLOSECOMMENT=$STAR$SLASH | |
| echo "" |