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 sc=document.createElement("script"); | |
| sc.src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"; | |
| document.body.appendChild(sc); | |
| document.body.innerHTML="<div id='video'></div>"; | |
| url=location.href; | |
| var http=new XMLHttpRequest(); | |
| http.open("GET",url,true); | |
| setTimeout(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
| <meta http-equiv="content-type" content="charset=utf-8"> | |
| <title>dictionary</title> | |
| <script> | |
| var http; | |
| var lang=["en","ja"]; | |
| var url="http://translate.google.co.jp/translate_a/t?client=t"; | |
| function $(id){return document.getElementById(id);} | |
| function getText(){ | |
| return $("text").value.split("\n").join(" "); | |
| } |
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 sendMessage(msg){ | |
| if(!msg)return; | |
| var form=document.getElementById('new_post_modal'); | |
| var texts=form.getElementsByTagName('textarea'); | |
| var text=texts[texts.length-1]; | |
| text.value=msg; | |
| $(form).submit(); | |
| text.value=''; | |
| } | |
| var div=document.createElement("form");var text=document.createElement("input");div.appendChild(text); |
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
| for(s='',x=y=n=40;y+n;s+='-*\n'[x+n?x*x--+y*y<900|0:(x=n,y-=2,2)]);return s |
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
| #-*- encoding:utf-8 -*- | |
| require 'date' | |
| date=Date.parse ARGV[0] | |
| eras = [ | |
| [Date.parse('1989-01-08'), '平成'], | |
| [Date.parse('1926-12-25'), '昭和'], | |
| [Date.parse('1912-07-30'), '大正'], | |
| [Date.parse('1868-09-08'), '明治'], |
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 NumberParser | |
| def self.parse(s) | |
| match=->(str){ | |
| if s.start_with? str | |
| s=s[str.length..-1] | |
| true | |
| end | |
| } | |
| find=->(arr){ | |
| key,value=arr.find{|x|s.start_with? x[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
| function show(html){ | |
| var target=$("#targetID"); | |
| var old=target.children(); | |
| var next=$("<div>"); | |
| next.html(html); | |
| next.css({position:'absolute',left:0,top:0,width:'100%',height:'100%',display:'none',background:'white'}) | |
| target.append(next) | |
| next.fadeIn(1000,function(){old.remove()}) | |
| } |
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
| require './lisp_base' | |
| LISPRUN [:cdr,[:cons,L(1,2,3),L(4,5,6)]] | |
| LISPRUN [:cdr,D(L(1,2,3,D(4,5)),L(6,7,8))] | |
| LISPRUN [:do, | |
| [:print,[:car,[:cons,3,[:cons,4,5]]]], | |
| [:print,[:+,3,[:+,6,3]]], | |
| [:defun,:dist2,[:a,:b],[:+,[:*,:a,:a],[:*,:b,:b]]], | |
| [:print,[:dist2,3,4]], | |
| [:defun,:fact,[:a],[:ifelse,[:==,:a,0],1,[:*,:a,[:fact,[:-,:a,1]]]]], |
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
| require './lisp_base.rb' | |
| LISP do (cons 1,2) end | |
| LISP do (cond true,(cond false,(cons 1,2),(cons 3,4)),(cons 5,6)) end | |
| LISP do (defun :fact,:x,(cond (eq :x,0),1,(mult (sqrt (square :x)),(fact (minus :x,1))))) end | |
| LISP do (defun :abs,:x,(cond (lt :x,0),(minus 0,:x),:x)) end | |
| LISP do | |
| (defun :sqrtrec,:x,:y,:d, | |
| (cond (lt :d,0.0000000001), | |
| :y, | |
| (cond (lt (mult :y,:y),:x), |
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
| require './lisp_base.rb' | |
| require 'tweetstream' | |
| twitter_token={ | |
| :CONSUMER_KEY => 'aaa', | |
| :CONSUMER_SECRET => 'bbb', | |
| :OAUTH_TOKEN => 'ccc', | |
| :OAUTH_TOKEN_SECRET => 'ddd' | |
| } | |
| Lisp twitter_token do | |
| (progn\ |
OlderNewer