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
module ForeignTest where | |
import Foreign.C | |
foreign import ccall "print_double" c_print_double :: CDouble -> IO () |
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
62 Afghanistan Antarctica Barbados Botswana Canada Chad China Denmark Ethiopia Guam Guatemala Guernsey Kiribati Latvia Libya Liechtenstein Macao Malawi Martinique Mauritania Mauritius Montenegro Mozambique Namibia Narnia Nauru Netherlands Niger Niue Oman Palau Panama Paraguay Peru Poland Portugal Romania Rwanda Samoa Senegal Serbia Singapore Slovakia Slovenia Somalia Sudan Sweden Switzerland Tajikistan Thailand Togo Tokelau Tonga Turkey Turkmenistan Tuvalu Uganda Ukraine Uzbekistan Vanuatu Zambia Zimbabwe | |
ENV: haskell | |
POINT: 可視化 | |
期間が被るノード同士にエッジを引いた無向グラフにおいての最大独立集合問題として | |
解きました。 | |
このノード数だと相当頑張らないと(頑張っても?)解が得られないと考え、取り敢えず | |
可視化してみたところ、各独立頂点集合はたかだか18ノードからなる事がわかったため、 | |
各独立頂点集合に対してDFSを行い、解を導きました。 |
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
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
import GHC.TypeLits |
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
--- /Library/Frameworks/UIM.framework/Versions/Current/share/uim/skk.scm.orig 2014-07-01 05:07:16.000000000 +0900 | |
+++ /Library/Frameworks/UIM.framework/Versions/Current/share/uim/skk.scm 2014-07-01 05:15:41.000000000 +0900 | |
@@ -1031,6 +1031,11 @@ | |
(skk-return-key? key key-state)) | |
(skk-commit-raw sc key key-state) | |
#f) | |
+ ((skk-on-key? key key-state) | |
+ (skk-context-set-state! sc 'skk-state-direct) | |
+ (skk-context-set-kana-mode! sc skk-type-hiragana) | |
+ (rk-flush rkc) |
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.Monoid | |
import Data.Char | |
import Text.Read | |
import Options.Applicative | |
data Mode = Foo | Bar | Baz deriving (Show, Read, Enum, Bounded) | |
data Options = Options | |
{ verbose :: Bool | |
, limit :: Int |
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
{-# LANGUAGE ExistentialQuantification #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} |
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
{-# LANGUAGE CPP #-} | |
{-# LANGUAGE DeriveDataTypeable #-} | |
{-# LANGUAGE OverlappingInstances #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TypeFamilies #-} |
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
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE OverlappingInstances #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE NoImplicitPrelude #-} | |
{-# LANGUAGE StandaloneDeriving #-} |
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 Control.Monad | |
import Control.Applicative | |
import System.IO.Unsafe | |
import Foreign.C | |
import Foreign.ForeignPtr | |
import Foreign.Marshal | |
import Foreign.Storable | |
newtype FInt = FInt (ForeignPtr CInt) |
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
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE DataKinds #-} | |
import GHC.TypeLits | |
import GHC.Exts(Constraint) | |
data MbNat | |
= D |
OlderNewer