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
// ==UserScript== | |
// @name googleMemorize | |
// @namespace http://passion.s25.xrea.com/ | |
// @description 前回検索した単語を検索テキストボックスに表示します。 | |
// @include http://www.google.co.jp/* | |
// @include http://www.google.com/* | |
// ==/UserScript== | |
(function(){ | |
/*関数定義*/ | |
// 検索単語を保存 |
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
// ==UserScript== | |
// @include http://api.wassr.jp/statuses/update.json | |
// ==/UserScript== | |
location.href='http://wassr.jp/my/' |
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
(defn fib [x] | |
(cond | |
(<= x 2) 1 | |
:else (+ (fib (- x 1)) (fib (- x 2))) | |
)) |
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
(. javax.swing.JOptionPane (showMessageDialog nil "Hello World")) |
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
// 連想配列のメンバー数を求める | |
Object.prototype.len_m=function(){ | |
var i=0; | |
for(a in this){ | |
if(typeof(this[a])!=="function")i++; | |
} | |
return i; | |
} | |
var a={"key":"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
var loop = function(n,fn){ | |
for(var i=0;i<n;i++)fn(); | |
} | |
console.time("id1"); | |
loop(3,function(){console.log("hello");}); | |
console.timeEnd("id1"); |
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
#!/usr/bin/env python | |
import time | |
import datetime | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.web | |
from tornado import websocket | |
import os |
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
// お題:[本当にLispはカッコが多い?]http://e-arrows.sakura.ne.jp/2010/08/is-lisp-really-has-too-many-parenthesis.html | |
// Rhinoにて実行可能 | |
// >java -classpath js.jar org.mozilla.javascript.tools.shell.Main fib.js 20 | |
// | |
for(n=m=1,z=arguments[0]||1;z>=n;n++,m*=n)print(n+"! = "+m) |
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
var BF=(function(){ | |
// "[","]"でジャンプする先をあらかじめ見つけて対応関係を作っておく | |
var _getJump=function(str){ | |
var pairs=[]; | |
var result=0; | |
var l=str.length,point = l; | |
for(var i=0;i<l;i++){ | |
if(str[i]==="["){ | |
result=str.lastIndexOf("]",point) |
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
(define apply-in-underlying-scheme apply) | |
(define (myeval exp env) | |
(cond ((self-evaluating? exp) exp) | |
((variable? exp) (lookup-variable-value exp env)) | |
((quoted? exp) (text-of-quotation exp)) | |
((assignment? exp) (eval-assignment exp env)) | |
((definition? exp) (eval-definition exp env)) | |
((if? exp) (eval-if exp env)) | |
((lambda? exp) | |
(make-procedure (lambda-parameters exp) |
OlderNewer