interface IEqualable<A> {
(==)(this: IEqualable<A>, other: IEqualable<A>): Bool
}
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
import 'symbol-observable'; | |
import * as Observable from 'zen-observable'; | |
type Reducer<TAction, TState> = (state: TState, action: TAction) => TState; | |
type Delegate<TAction> = (action: TAction) => void; | |
type Middleware<TAction> = (action: TAction, next: Delegate<TAction>) => void; | |
class Dispatcher<TAction> implements Subscribable<TAction> { | |
private _observers: Set<Observer<TAction>>; |
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
diff --git a/src/rxvtfont.C b/src/rxvtfont.C | |
index 1914539..4c0189e 100644 | |
--- a/src/rxvtfont.C | |
+++ b/src/rxvtfont.C | |
@@ -1223,92 +1223,63 @@ rxvt_font_xft::load (const rxvt_fontprop &prop, bool force_prop) | |
return false; | |
int ftheight = 0; | |
- bool success = true; | |
- |
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
function removeFromArray(array, element) { | |
var index = array.indexOf(element); | |
if (index !== -1) { | |
array.splice(index, 1); | |
} | |
} | |
function publish(source) { | |
return new ConnectableObservable(source, new Subject()) | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<array> | |
<dict> | |
<key>boardFolderName</key> | |
<string>ベータテスト</string> | |
<key>child</key> | |
<array> | |
<dict> |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
public interface Optional<T> : IEnumerable<T> | |
{ | |
T GetOrElse(T other); | |
T GetOrElse(Func<T> f); | |
Optional<T> OrElse(Optional<T> other); | |
Optional<T> OrElse(Func<Optional<T>> f); |
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
import Control.Monad | |
import Control.Monad.ST | |
import Data.Array.MArray | |
import Data.Array.ST | |
import System.Random | |
swap :: (MArray a e m, Ix i) => a i e -> i -> i -> m () | |
swap array i j = do | |
tmp <- readArray array i | |
writeArray array i =<< readArray array j |
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 TypeFamilies, DataKinds, KindSignatures, TypeOperators, UndecidableInstances, ScopedTypeVariables #-} | |
module Main where | |
import Data.Proxy | |
import Data.Type.Equality | |
import GHC.TypeLits | |
data FB = NumberT Nat | FizzT | BuzzT | FizzBuzzT |
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 #-} | |
import Data.Char (isSpace) | |
import qualified Data.Text as T | |
import qualified Data.Text.IO as T | |
ngram :: Int -> T.Text -> [T.Text] | |
ngram n = filter ((==) n . T.foldl' step 0) . map (T.take n) . T.tails | |
where |