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
/** | |
* ゲットパラメータ形式の文字列からハッシュオブジェクトを取得、デリミタは&とホワイトスペース | |
* @param {String} str 処理対象パラメータ文字列 | |
* @param {Boolean} [duplicateToArray] 重複パラメータを配列化する | |
* @returns {Object} ハッシュオブジェクト | |
*/ | |
parameterToHash=function(str,duplicateToArray){ | |
if(str===void 0)str=location.search; | |
var params = str.replace(/^\?/g,"").replace(/\s/g,"&").replace(/&+/g,"&").match(/[^&]*/g); | |
var ret = {}; |
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 java.io.IOException; | |
import java.io.InputStream; | |
import java.net.URL; | |
import java.net.URLConnection; | |
import java.util.HashMap; | |
import java.util.Map; | |
import javax.xml.bind.JAXBContext; | |
import javax.xml.bind.JAXBException; | |
import javax.xml.bind.Unmarshaller; |
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 java.io.BufferedReader; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.HashMap; | |
import java.util.Map; | |
/** | |
* info.txtの中身 | |
* a,い |
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 baisu(a, b) { | |
var closure = function(x) { | |
return (x % a == 0 && x % b == 0); | |
}; | |
return closure; | |
} | |
function check(list, func) { | |
for (var i = 0; i < list.length; i++) { | |
if (func(list[i])) { |
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 closure() { | |
var count = 0; | |
return function(plus) { | |
return count += plus; | |
}; | |
} | |
var close = closure(); | |
var plus1 = close(1); | |
var plus2 = close(2); | |
console.log(plus1); // 1 |
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 isIE() { | |
return false; | |
} | |
function isMoz() { | |
return false; | |
} | |
function isOpera() { | |
return true; | |
} | |
var fn = isIE() ? function() { |
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 func = function(args) { | |
var pub = {}; | |
var pri = args || {}; | |
pub.get = function(name) { | |
return pri[name]; | |
}; | |
return pub; |
NewerOlder