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
{-# LANGUAGE ForeignFunctionInterface #-} | |
#include <bindings.dsl.h> | |
#include <opencv_generated.hpp> | |
module OpenCVRaw.Consts where | |
#strict_import | |
import Foreign.C | |
import Foreign.C.Types | |
#num CV_ADAPTIVESKINDETECTOR_MORPHING_METHOD_ERODE0 | |
#num CV_ADAPTIVESKINDETECTOR_MORPHING_METHOD_ERODE_DILATE0 | |
#num CV_ADAPTIVESKINDETECTOR_MORPHING_METHOD_ERODE_ERODE0 |
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 Information for pkg-config | |
prefix=/usr/local | |
exec_prefix=${prefix} | |
libdir= | |
includedir_old=${prefix}/include/opencv | |
includedir_new=${prefix}/include | |
Name: OpenCV | |
Description: Open Source Computer Vision Library |
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
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Heist.SpliceAPI | |
main :: IO () | |
main = print $ runSplices baz | |
foo = do |
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
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Heist.SpliceAPI | |
main :: IO () | |
main = print $ runSplices baz | |
foo = do |
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 Main where | |
import qualified Data.Map as M | |
import Data.Map.Syntax | |
-- prints: Right (fromList [("blobz",10),("smootz",12)]) | |
main = print . runMapSyntax M.lookup M.insert $ do | |
foo | |
mapK (++ "a") bar |
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
instance ISessionManager RedisSessionManager where | |
-------------------------------------------------------------------------- | |
--load grabs the session from redis. | |
load mgr@(RedisSessionManager (Just _) _ _ _ _ _ ) = return mgr | |
load mgr@(RedisSessionManager _ _ _ _ rng con) = do | |
res <- runMaybeT $ do | |
(Payload x) <- MaybeT $ getPayload mgr | |
cs <- hoistMaybe . hush $ S.decode x | |
liftIO $ runRedis con $ do |
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
------------------------------------------------------------------------------ | |
readRequestBodyHangIssue :: Test | |
readRequestBodyHangIssue = | |
testCase "readRequestBody doesn't hang" assertReadRqBody | |
where | |
assertReadRqBody = | |
do let hdl = readRequestBody 5000 >>= writeLBS | |
res <- race | |
(threadDelay 1000000) | |
(runHandler Nothing (ST.get "" Map.empty) hdl appInit) |
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
cabal sandbox add-source ../io-streams | |
cabal sandbox add-source ../io-streams-haproxy | |
cabal sandbox add-source ../map-syntax | |
cabal sandbox add-source ../snap-server | |
cabal sandbox add-source ../snap-core | |
cabal sandbox add-source ../xmlhtml | |
cabal sandbox add-source ../snap-loader-static | |
cabal sandbox add-source ../snap-loader-dynamic | |
cabal sandbox add-source ../heist |
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 Main where | |
import Data.List | |
import Codec.Picture | |
import qualified Data.Vector as V | |
r0 = 50 -- Core thickness | |
rEnd = 200 -- Tape role end thickness (no effect?) | |
thick = 1 -- Thickness of one sheet of tape |
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 Main where | |
import Control.Applicative | |
import Control.Concurrent | |
import Control.Error | |
import Control.Monad | |
import Control.Monad.Trans (lift) | |
import qualified Data.ByteString as BS | |
import qualified Data.ByteString.Lazy as BSL | |
import qualified Data.Binary.Get as B |
OlderNewer