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 | |
| UndecidableInstances, RankNTypes, TypeOperators, TypeFamilies, | |
| StandaloneDeriving, DataKinds, PolyKinds, DeriveFunctor, DeriveFoldable, | |
| DeriveTraversable, LambdaCase, PatternSynonyms, TemplateHaskell #-} | |
| import Control.Monad | |
| import Control.Applicative | |
| import Data.Singletons.TH | |
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
| logOnPageTarget = document.getElementById('log-on-page-target'); | |
| function resetOnPageLog () { | |
| logOnPageTarget.innerText = ''; | |
| } | |
| function logOnPage (text) { | |
| logOnPageTarget.innerText = text + '\n' + logOnPageTarget.innerText; | |
| } |
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
| //: Playground - noun: a place where people can play | |
| import Cocoa | |
| var str = "Hello, playground" | |
| class Node {} | |
| class NodeList {} | |
| enum MutationRecord { |
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
| // POJ 1093 | |
| // This problem asks us to justify monospaced texts with a given width. | |
| // For details, see http://poj.org/problem?id=1093. | |
| let email = "Writing e-mails is fun, and with this program, they even look nice." | |
| let width = 25 | |
| let words = email.characters.split(separator: " ").map { String($0) } | |
| let metrics: [Int] = words.map { $0.characters.count } |
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
| body { | |
| background-color: #1A1A1A; | |
| font-family: -webkit-system-font, sans-serif; | |
| } | |
| main { | |
| width: 300px; | |
| margin-top: calc(40vh - 82px); | |
| margin-left: auto; |
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
| FROM debian:sid | |
| MAINTAINER Minsheng Liu <lambda@liu.ms> | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| asymptote \ | |
| biber \ | |
| chktex \ | |
| cm-super \ | |
| context \ | |
| dvidvi \ |
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
| #!/usr/bin/env stack | |
| -- stack --install-ghc runghc --package turtle | |
| {-# LANGUAGE OverloadedStrings #-} | |
| import Turtle | |
| main = do | |
| containerArg <- format (fp%":/latex") <$> pwd | |
| userArgs <- arguments |
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
| #include <sys/types.h> | |
| #include <sys/mman.h> | |
| #include <fcntl.h> | |
| #include <unistd.h> | |
| #include <iostream> | |
| int main() { | |
| int fd = open("./test_file", O_RDWR); |
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 CPP, ForeignFunctionInterface #-} | |
| module Lib where | |
| import Data.Word | |
| import Foreign | |
| import Foreign.C.Types | |
| import Foreign.C.Error | |
| import Foreign.C.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
| {-@ LIQUID "--exact-data-con" @-} | |
| {-@ LIQUID "--higherorder" @-} | |
| {-@ LIQUID "--totality" @-} | |
| {-@ LIQUID "--automatic-instances=liquidinstances" @-} | |
| module A where | |
| import qualified Prelude | |
| import Prelude (Char, Int, Bool (..)) | |
| import Language.Haskell.Liquid.ProofCombinators |