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
# Usage (from project root): ./docgen.sh <Repo Name> <Version> <Hackage Username> <Hackage Password> | |
# e.g. ./docgen.sh Bang 0.1.1.0 5outh F4kePa55word | |
#!/bin/bash | |
cabal configure && cabal build && cabal haddock --hyperlink-source \ | |
--html-location='http://hackage.haskell.org/package/$pkg/docs' \ | |
--contents-location='http://hackage.haskell.org/package/$pkg' | |
S=$? | |
if [ "${S}" -eq "0" ]; then | |
cd "dist/doc/html" | |
DDIR="${1}-${2}-docs" |
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
puts "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
bubbleSort :: (Ord a) => [a] -> [a] | |
bubbleSort [] = [] | |
bubbleSort [x] = [x] | |
bubbleSort (x:y:xs) = if sorted thisSort then thisSort else bubbleSort thisSort | |
where thisSort = (min x y) : bubbleSort ((max x y):xs) | |
sorted :: (Ord a) => [a] -> Bool | |
sorted [] = True | |
sorted [x] = True | |
sorted (x:y:xs) = if x <= y then sorted (y:xs) else False |
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
puts "Hello world" |
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
bubbleSort :: (Ord a) => [a] -> [a] | |
bubbleSort [] = [] | |
bubbleSort [x] = [x] | |
bubbleSort (x:y:xs) = if sorted thisSort then thisSort else bubbleSort thisSort | |
where thisSort = (min x y) : bubbleSort ((max x y):xs) | |
sorted :: (Ord a) => [a] -> Bool | |
sorted [] = True | |
sorted [x] = True | |
sorted (x:y:xs) = if x <= y then sorted (y:xs) else False |
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 Data.List | |
insertionSort :: (Ord a) => [a] -> [a] | |
insertionSort = foldr insert [] |
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
quickSort :: (Ord a) => [a] -> [a] | |
quickSort [] = [] | |
quickSort (x:xs) = quickSort smaller ++ [x] ++ quickSort larger | |
where smaller = filter (<=x) xs | |
larger = filter (>x) xs |
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
data Count = Multiple Int Char | |
| Single Char | |
deriving (Eq, Show) | |
encodeDirect :: [Char] -> [Count] | |
encodeDirect = map toCount . foldr encode [] | |
where | |
toCount (x, y) = case x of | |
1 -> Single y | |
_ -> Multiple x y |
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
#pragma strict | |
var forwardSpeed = 10; | |
var backwardSpeed = 8; | |
var sideSpeed = 10; | |
var xDisplacement:float; | |
var zDisplacement:float; | |
var displacement:Vector3; |
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
var target : Transform; | |
var distance = 10.0; | |
var xSpeed = 250.0; | |
var ySpeed = 120.0; | |
var zoomSpeed = 10; | |
var yMinLimit = -20; | |
var yMaxLimit = 80; | |
var zoomMinLimit = 10; |
OlderNewer