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
| describe "example group" $ do | |
| -- Equivalent with RSpec's `let!(:hoge){ 1 }`. | |
| -- An action passed to `given` function is executed every time | |
| -- an example (defined by `it`) in the `describe` block is executed, | |
| -- then the action's result is cached until the example's execution completes. | |
| hoge <- given $ return 1 | |
| -- Equivalent with RSpec's `let(:hoge){ 1 }` (without exclamation). | |
| hogeIfNecessary <- givenIfNecessary $ runOnlyIfReferred |
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
| class Parser | |
| attr_reader :value | |
| def initialize string, value = nil | |
| @string = string | |
| @value = value | |
| end | |
| def self.eval string | |
| self.new(string).expr.value |
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
| #!/bin/env stack | |
| {- | |
| stack --resolver=lts-12.24 script --package extensible | |
| -} | |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE OverloadedLabels #-} | |
| {-# LANGUAGE PolyKinds #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| import Data.Extensible |
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
| Set-PSDebug -trace 2 | |
| $FORMAT = "yyyy-MM-dd" | |
| $QUERY_FORMAT = "yyyyMMdd" | |
| $since = [DateTime]::ParseExact($args[0], $FORMAT, $null) | |
| $until = if ($args[1]) { | |
| [DateTime]::ParseExact($args[1], $FORMAT, $null) | |
| } else { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| ghc: | |
| macosx: | |
| 8.8.0.20190424: | |
| url: https://downloads.haskell.org/ghc/8.8.1-alpha1/ghc-8.8.0.20190424-x86_64-apple-darwin.tar.xz | |
| sha256: 563e34bb2d8a48fa5630136c5acc059bab0e807bf4f02b23d0fbc75f38500feb | |
| windows64: | |
| 8.8.0.20190424: | |
| url: https://downloads.haskell.org/ghc/8.8.1-alpha1/ghc-8.8.0.20190424-x86_64-unknown-mingw32.tar.xz | |
| sha256: 1b5ff7995a07e7251b26b3c7dadba57906b7e6d236d0e94c4e92d9b5b8ee3300 |
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 AllowAmbiguousTypes #-} | |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| {-# LANGUAGE DuplicateRecordFields #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE LambdaCase #-} | |
| {-# LANGUAGE NoMonomorphismRestriction #-} | |
| {-# LANGUAGE RankNTypes #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} |
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
| switch(location.hostname){ | |
| case 'twitter.com': | |
| location.href = location.href.replace(/^https:\/\/twitter/, 'https://mobile.twitter'); | |
| break; | |
| case 'mobile.twitter.com': | |
| location.href = location.href.replace(/^https:\/\/mobile\.twitter/, 'https://twitter'); | |
| break; | |
| } |
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 "stdio.h" | |
| int main() | |
| { | |
| int array[5]; | |
| int *p; | |
| int i; | |
| p = array; /* p = &array[0] と同じ */ | |
| for (i = 0; i < 5; i++) { |
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 Data.Bits | |
| import Data.Word | |
| import Data.STRef | |
| import Control.Monad.ST | |
| import Data.Function | |
| import Test.Hspec | |
| import Test.Hspec.QuickCheck |