- v5 final version
- v4: 修复了markdown标记
- v3: 增加了版权说明
- v2: 增加了前面这堆
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 ul(arr) | |
{ | |
return "<ul><li>"+arr.join("</li><li>")+"</li></ul>"; | |
} | |
function ol(arr) | |
{ | |
return "<ol><li>"+arr.join("</li><li>")+"</li></ol>"; | |
} |
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
Every time I browse the gists list, I feel like browsing twitter. |
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 9f06ef6f88d2f9d6bfd40988bc7b7e667021f0d9 Mon Sep 17 00:00:00 2001 | |
From: dramforever <[email protected]> | |
Date: Sun, 29 Jun 2014 17:11:46 +0800 | |
Subject: [PATCH] Fix sth | |
--- | |
app/controllers/images_controller.rb | 12 ++++-------- | |
1 file changed, 4 insertions(+), 8 deletions(-) | |
diff --git a/app/controllers/images_controller.rb b/app/controllers/images_controller.rb |
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 GADTs #-} | |
{-# OPTIONS -Wall #-} | |
module Flow where | |
data FlowT m a where | |
Seq :: m a -> FlowT m b -> FlowT m b | |
Cond :: m Bool -> FlowT m a -> FlowT m a -> FlowT m a | |
Term :: m a -> FlowT m a |
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 <cstdio> | |
#include <climits> | |
using namespace std; | |
const int POOL_SIZE = 10000000; | |
const int QUEUE_SIZE = 10000000; | |
const int NODES_SIZE = 10000000; | |
struct edge_node { | |
int dest; |
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
module Main where | |
import Sound.Wav | |
import Data.Int | |
import qualified Data.ByteString.Lazy as B | |
import Data.ByteString.Lazy.Builder | |
import Data.Monoid | |
import System.Environment | |
import System.Exit | |
import System.IO |
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
module Main (main) where | |
import Sound.Wav | |
import Data.Int | |
import qualified Data.ByteString.Lazy as B | |
import Data.ByteString.Lazy.Builder | |
import Data.Monoid | |
import System.Environment | |
import System.Exit | |
import System.IO |
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
linux/arch/x86/boot/ctypes.h in English | |
------------------------------------------------ | |
hash ifndef boot isdigit h | |
hash define boot isdigit h | |
static inline int isdigit int ch | |
return ch is greater than or equal to zero and ch is less than or equal to nine | |
static inline int isxdigit int ch | |
if isdigit ch return true | |
if ch is greater than or equal to A and ch is greater than or equal to 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 Data.List | |
import Data.Maybe | |
import Control.Monad | |
data Ans = A | B | C | D | Whatever deriving (Show, Eq, Ord) | |
ver ans 1 = (ans !! 1) == (ans !! 1) | |
ver ans 2 = Just (ans !! 5) == lookup (ans !! 2) [(A, C), (B, D), (C, A), (D, B)] |
OlderNewer