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 BangPatterns #-} | |
{-# LANGUAGE MagicHash #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main (main) where | |
import Criterion.Main | |
import Data.Function ((&)) | |
import Data.Word (Word8) |
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 #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
module Main where | |
import Control.Concurrent.Async | |
import Control.Concurrent.Chan | |
import Control.Exception | |
import Control.Monad |
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 TemplateHaskell #-} | |
module Main where | |
import Options.Applicative.Simple (simpleVersion) | |
import Paths_issue914 | |
main :: IO () | |
main = print $(simpleVersion Paths_issue914.version) |
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 <exception> | |
enum class Error { | |
A, B, C, None, | |
}; | |
namespace Exception { | |
struct A : std::exception {}; | |
struct B : std::exception {}; |
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
-- This exercise covers the first 6 chapters of "Learn You a Haskell for Great Good!" | |
-- Chapter 1 - http://learnyouahaskell.com/introduction | |
-- Chapter 2 - http://learnyouahaskell.com/starting-out | |
-- Chapter 3 - http://learnyouahaskell.com/types-and-typeclasses | |
-- Chapter 4 - http://learnyouahaskell.com/syntax-in-functions | |
-- Chapter 5 - http://learnyouahaskell.com/recursion | |
-- Chapter 6 - http://learnyouahaskell.com/higher-order-functions | |
-- Download this file and then type ":l Chapter-1-6.hs" in GHCi to load this exercise |
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
原文 GG 了請參考 archive | |
https://web.archive.org/web/20090221093708/http://d.hatena.ne.jp/yuki_neko_nyan/20090217/1234850409 | |
以下備份 | |
2009-02-17 | |
■ループが書けなくなる(或いは再帰依存症)レベル10 15:00 ループが書けなくなる(或いは再帰依存症)レベル10 - 猫的怠惰Days | |
level 0 |
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
原文 GG 了請參考 archive | |
https://web.archive.org/web/20090221093708/http://d.hatena.ne.jp/yuki_neko_nyan/20090217/1234850409 | |
以下備份 | |
2009-02-17 | |
■ループが書けなくなる(或いは再帰依存症)レベル10 15:00 ループが書けなくなる(或いは再帰依存症)レベル10 - 猫的怠惰Days | |
level 0 |
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
/* | |
* Copyright (C) 2014 TheKK <thumbd03803@gmail.com> | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
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 lrc_circuit(L, R, C, filename) | |
[s, frq, bps] = wavread(filename); | |
T = 1 / frq; | |
ss = filter([2*T*L 0 -2*T*L], [(4*L*R*C + 2*T*L + R*T^2) (-8*L*R*C + 2*R*T^2) (-4*L*R*C - 2*T*L + R*T^2)], s); | |
playaudio(ss, frq); | |
end |
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> | |
#include <stdlib.h> | |
#include <time.h> | |
int | |
main(int argc, char* argv[]) | |
{ | |
srand(time(NULL)); | |
printf("All you need is insert coins and press enter key\n"); | |
while (getchar()) { |
NewerOlder