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
//汎用的なレスポンス | |
<script type="text/javasciprt"> | |
var xhr = new XMLHttpRequest(); | |
// ... | |
var foo = document.getElementById('foo'); | |
foo.innerHTML = xhr.responseText; | |
//レスポンスがXMLの場合 | |
// var xml = xhr.responseXML; | |
// XMLの中身はこのようになっている |
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
//レスポンスがJSONの場合 | |
<script type="text/javasciprt"> | |
var xhr = new XMLHttpRequest(); | |
// ... | |
var json = JSON.parse(xhr.responseText); | |
// jsonの中身はこのようになっている | |
// { | |
// "apiversion": 1.0, | |
// "value": "foo" |
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
rightTriangle = [ (a,b,c) | c <- [1..10], a <- [1..c], b <- [1..a], a^2+b^2 == c^2, a+b+c == 24 ] |
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
quicksort :: (Ord a) => [a] -> [a] | |
quicksort [] = [] | |
quicksort (x:xs) = | |
let smallerOrEqual = filter (<= x) xs | |
larger = filter (> x) xs | |
in quicksort smallerOrEqual ++ [x] ++ quicksort larger |
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
var id; //for recording | |
var promise = $.get(...,...,function(){ //$.get returns value having "promise" interface | |
... | |
id = json['id']; //take Ajax result into id | |
... | |
}); | |
$.when(id,promise).done(function(arg1,promise){ | |
alert(id); //check value; | |
}); |
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
function controll(){ | |
if(this.isShade) | |
this.open() | |
else | |
this.close() | |
} | |
window.all().controll() | |
blind.all().controll() | |
//輻射熱はこうして対策しよう!! |
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
表題: | |
作品分析「ドラえもんのび太のパラレル西遊記」日常・常識・記号、そして成長 | |
1.作品概要 | |
「ドラえもん のび太のパラレル西遊記」は1988年3月12日に公 | |
開された藤子・F・不二雄の漫画「ドラえもん」の映画作品である。 | |
1980年「ドラえもん のび太の恐竜」に始まる映画作品の原作は、 | |
藤子が執筆、「大長編ドラえもん」として小学館の少年誌・コロコ | |
ロコミックに大型連載していた。それ以降、映画ドラえもんは毎年 | |
3月に公開を繰り返し、脚本もまた藤子が手掛けていた。だが、 |
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
javascript:(function(){ | |
var url = location.protocol+location.hostname+'/'+location.pathname.split('/')[1]; | |
var ter = 'twitter.com'; | |
var log = 'aclog.koba789.com'; | |
var host = [ter,log]; | |
var scheme = ['https','http']; | |
var swt = host.indexOf(location.host)==-1 ?-1 :(location.host==ter ?0 :1); | |
if(swt==-1){ | |
alert('Twitterまたはaclogのユーザページでのみ動きます'); | |
return; |
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
javascript:(function(){var url=location.protocol+location.hostname+'/'+location.pathname.split('/')[1];var ter='twitter.com';var log='aclog.koba789.com';var host=[ter,log];var scheme=['https','http'];var swt=host.indexOf(location.host)==-1?-1:(location.host==ter?0:1);if(swt==-1){alert('Twitterまたはaclogのユーザページでのみ動きます');return;}url=url.replace(host[swt],host[1-swt]);url=url.replace(scheme[swt],scheme[1-swt]);window.open(url,'_blank');})(); |
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
javascript:(function(){ | |
var scheme = ['https://','http://']; /* スキーム */ | |
var ter = 'twitter.com'; | |
var log = 'favstar.fm'; | |
var host = [ter,log]; /* ホスト */ | |
var path = ['/','/users/']; /* 共通するパス */ | |
var usr = location.pathname.split('/')[location.host==ter?1:2]; /* ユーザ */ | |
var url = location.href; /* 現在のURL */ | |
var swt = host.indexOf(location.host)==-1 ?-1 :(location.host==ter ?0 :1); /* スイッチャ */ | |
if(swt==-1){/* 例外 */ |