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
def load_module(m): | |
import imp | |
try: | |
f, p,d = imp.find_module(m) | |
return imp.load_module(m, f, p, d) | |
except: | |
return None | |
random = load_module("random") | |
hoge = load_module("hoge") |
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 <Cocoa/Cocoa.h> | |
@class Hoge; | |
typedef Hoge *(^setter)(int); | |
@interface Hoge : NSObject | |
@property int a,b; | |
@property (nonatomic, readonly, copy) setter setA; | |
@property (nonatomic, readonly, copy) setter setB; |
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 Control.Monad.State | |
import Control.Monad.Writer | |
newtype A = A [B] deriving(Show) | |
newtype B = B Int deriving(Show) | |
type Checker a = StateT Int (WriterT [String] Maybe) a |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.Char | |
import Data.List | |
import Data.Function | |
import Data.Monoid | |
comp::String->String->Ordering | |
comp (as@(a:ax)) (bs@(b:bx)) | |
| isNumber a && isNumber b = | |
ncomp as bs <> (comp `on` dropWhile isNumber) as bs | |
| otherwise = compare a b <> comp ax bx |
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
#lang racket | |
(require racket/control) | |
(define (amb args) | |
(shift k | |
(for ([v args]) | |
(k v)))) | |
(define (perm li) | |
(if (null? (cdr li)) |
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
create table inputtmp (v integer); | |
create table input (i integer primary key autoincrement, v integer); | |
.separator X " " | |
.import /dev/stdin inputtmp | |
.headers on | |
.mode column | |
.separator "|" "\n" | |
delete from inputtmp limit 1; | |
insert into input select v from inputtmp; |
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
// ==UserScript== | |
// @name quote remover | |
// @namespace test | |
// @description quote/regular postを全部削除します | |
// @include http://www.tumblr.com/dashboard* | |
// @author joodle | |
// @compatibility Firefox 5.0(Scriptish 0.1), Chrome 12.0.742.112, Opera 11.50 | |
// @charset UTF-8 | |
// @version 1.4 | |
// ==/UserScript== |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright 2007 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
OlderNewer